// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT 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.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;
import java.util.Map;

/** VMwareCbt specific enable migration input. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType")
@JsonTypeName("VMwareCbt")
@Fluent
public final class VMwareCbtEnableMigrationInput extends EnableMigrationProviderSpecificInput {
    /*
     * The ARM Id of the VM discovered in VMware.
     */
    @JsonProperty(value = "vmwareMachineId", required = true)
    private String vmwareMachineId;

    /*
     * The disks to include list.
     */
    @JsonProperty(value = "disksToInclude", required = true)
    private List<VMwareCbtDiskInput> disksToInclude;

    /*
     * License type.
     */
    @JsonProperty(value = "licenseType")
    private LicenseType licenseType;

    /*
     * The SQL Server license type.
     */
    @JsonProperty(value = "sqlServerLicenseType")
    private SqlServerLicenseType sqlServerLicenseType;

    /*
     * A value indicating whether bulk SQL RP registration to be done.
     */
    @JsonProperty(value = "performSqlBulkRegistration")
    private String performSqlBulkRegistration;

    /*
     * The data mover run as account Id.
     */
    @JsonProperty(value = "dataMoverRunAsAccountId", required = true)
    private String dataMoverRunAsAccountId;

    /*
     * The snapshot run as account Id.
     */
    @JsonProperty(value = "snapshotRunAsAccountId", required = true)
    private String snapshotRunAsAccountId;

    /*
     * The target VM name.
     */
    @JsonProperty(value = "targetVmName")
    private String targetVmName;

    /*
     * The target VM size.
     */
    @JsonProperty(value = "targetVmSize")
    private String targetVmSize;

    /*
     * The target resource group ARM Id.
     */
    @JsonProperty(value = "targetResourceGroupId", required = true)
    private String targetResourceGroupId;

    /*
     * The target network ARM Id.
     */
    @JsonProperty(value = "targetNetworkId", required = true)
    private String targetNetworkId;

    /*
     * The selected test network ARM Id.
     */
    @JsonProperty(value = "testNetworkId")
    private String testNetworkId;

    /*
     * The target subnet name.
     */
    @JsonProperty(value = "targetSubnetName")
    private String targetSubnetName;

    /*
     * The selected test subnet name.
     */
    @JsonProperty(value = "testSubnetName")
    private String testSubnetName;

    /*
     * The target availability set ARM Id.
     */
    @JsonProperty(value = "targetAvailabilitySetId")
    private String targetAvailabilitySetId;

    /*
     * The target availability zone.
     */
    @JsonProperty(value = "targetAvailabilityZone")
    private String targetAvailabilityZone;

    /*
     * The target proximity placement group ARM Id.
     */
    @JsonProperty(value = "targetProximityPlacementGroupId")
    private String targetProximityPlacementGroupId;

    /*
     * The target boot diagnostics storage account ARM Id.
     */
    @JsonProperty(value = "targetBootDiagnosticsStorageAccountId")
    private String targetBootDiagnosticsStorageAccountId;

    /*
     * A value indicating whether auto resync is to be done.
     */
    @JsonProperty(value = "performAutoResync")
    private String performAutoResync;

    /*
     * The target VM tags.
     */
    @JsonProperty(value = "targetVmTags")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> targetVmTags;

    /*
     * The tags for the seed disks.
     */
    @JsonProperty(value = "seedDiskTags")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> seedDiskTags;

    /*
     * The tags for the target disks.
     */
    @JsonProperty(value = "targetDiskTags")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> targetDiskTags;

    /*
     * The tags for the target NICs.
     */
    @JsonProperty(value = "targetNicTags")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> targetNicTags;

    /** Creates an instance of VMwareCbtEnableMigrationInput class. */
    public VMwareCbtEnableMigrationInput() {
    }

    /**
     * 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<VMwareCbtDiskInput> 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<VMwareCbtDiskInput> 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 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<String, String> 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<String, String> targetVmTags) {
        this.targetVmTags = targetVmTags;
        return this;
    }

    /**
     * Get the seedDiskTags property: The tags for the seed disks.
     *
     * @return the seedDiskTags value.
     */
    public Map<String, String> 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<String, String> seedDiskTags) {
        this.seedDiskTags = seedDiskTags;
        return this;
    }

    /**
     * Get the targetDiskTags property: The tags for the target disks.
     *
     * @return the targetDiskTags value.
     */
    public Map<String, String> 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<String, String> targetDiskTags) {
        this.targetDiskTags = targetDiskTags;
        return this;
    }

    /**
     * Get the targetNicTags property: The tags for the target NICs.
     *
     * @return the targetNicTags value.
     */
    public Map<String, String> 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<String, String> targetNicTags) {
        this.targetNicTags = targetNicTags;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
        if (vmwareMachineId() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property vmwareMachineId in model VMwareCbtEnableMigrationInput"));
        }
        if (disksToInclude() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property disksToInclude in model VMwareCbtEnableMigrationInput"));
        } else {
            disksToInclude().forEach(e -> e.validate());
        }
        if (dataMoverRunAsAccountId() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property dataMoverRunAsAccountId in model VMwareCbtEnableMigrationInput"));
        }
        if (snapshotRunAsAccountId() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property snapshotRunAsAccountId in model VMwareCbtEnableMigrationInput"));
        }
        if (targetResourceGroupId() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property targetResourceGroupId in model VMwareCbtEnableMigrationInput"));
        }
        if (targetNetworkId() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property targetNetworkId in model VMwareCbtEnableMigrationInput"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(VMwareCbtEnableMigrationInput.class);
}
