Migration/hyper_v/RiverMeadow.HyperVNetworkConfiguration/RiverMeadow.HyperVNetworkConfiguration.psm1

class RMHyperVDestinationNetworkConfiguration {
    [string] $VirtualSwitchName
    [string] $IPType
    [string] $IPAddress
    [string] $Netmask
    [string] $VirtualLANIdentification

    RMHyperVDestinationNetworkConfiguration([string] $VirtualSwitchName) {
        $this.VirtualSwitchName = $VirtualSwitchName
        $this.IPType = "dhcp"
        $this.IPAddress = ""
        $this.Netmask = ""
        $this.VirtualLANIdentification = ""
    }

    RMHyperVDestinationNetworkConfiguration([string] $VirtualSwitchName, [string] $IPType) {
        $this.VirtualSwitchName = $VirtualSwitchName
        if ([string]::IsNullOrEmpty($IPType)) {
            $this.IPType = "dhcp"
        } else {
            $this.IPType = $IPType.ToLower()
        }
        $this.IPAddress = ""
        $this.Netmask = ""
        $this.VirtualLANIdentification = ""
    }

    RMHyperVDestinationNetworkConfiguration([string] $VirtualSwitchName, [string] $IPType, [string] $IPAddress) {
        $this.VirtualSwitchName = $VirtualSwitchName
        if ([string]::IsNullOrEmpty($IPType)) {
            $this.IPType = "dhcp"
        } else {
            $this.IPType = $IPType.ToLower()
        }
        $this.IPAddress = $IPAddress
        $this.Netmask = ""
        $this.VirtualLANIdentification = ""
    }

    
    RMHyperVDestinationNetworkConfiguration([string] $VirtualSwitchName, [string] $IPType, [string] $IPAddress, [string] $Netmask) {
        $this.VirtualSwitchName = $VirtualSwitchName
        if ([string]::IsNullOrEmpty($IPType)) {
            $this.IPType = "dhcp"
        } else {
            $this.IPType = $IPType.ToLower()
        }
        $this.IPAddress = $IPAddress
        $this.Netmask = $Netmask
        $this.VirtualLANIdentification = ""
    }

    RMHyperVDestinationNetworkConfiguration([string] $VirtualSwitchName, [string] $IPType, [string] $IPAddress,
                                            [string] $Netmask , [string] $VirtualLANIdentification) {
        $this.VirtualSwitchName = $VirtualSwitchName
        if ([string]::IsNullOrEmpty($IPType)) {
            $this.IPType = "dhcp"
        } else {
            $this.IPType = $IPType.ToLower()
        }
        $this.IPAddress = $IPAddress
        $this.Netmask = $Netmask
        $this.VirtualLANIdentification = $VirtualLANIdentification
    }
}