public static PSVirtualMachineInstanceView ToPSVirtualMachineInstanceView(
            this VirtualMachineInstanceView virtualMachineInstanceView,
            string resourceGroupName = null,
            string vmName            = null)
        {
            PSVirtualMachineInstanceView result = new PSVirtualMachineInstanceView
            {
                ResourceGroupName = resourceGroupName,
                Name                      = vmName,
                BootDiagnostics           = virtualMachineInstanceView.BootDiagnostics,
                Disks                     = virtualMachineInstanceView.Disks,
                Extensions                = virtualMachineInstanceView.Extensions,
                Statuses                  = virtualMachineInstanceView.Statuses,
                PlatformFaultDomain       = virtualMachineInstanceView.PlatformFaultDomain,
                PlatformUpdateDomain      = virtualMachineInstanceView.PlatformUpdateDomain,
                RemoteDesktopThumbprint   = virtualMachineInstanceView.RdpThumbPrint,
                VMAgent                   = virtualMachineInstanceView.VmAgent,
                MaintenanceRedeployStatus = virtualMachineInstanceView.MaintenanceRedeployStatus,
                ComputerName              = virtualMachineInstanceView.ComputerName,
                OsName                    = virtualMachineInstanceView.OsName,
                OsVersion                 = virtualMachineInstanceView.OsVersion,
                HyperVGeneration          = virtualMachineInstanceView.HyperVGeneration
            };

            return(result);
        }
        public static PSVirtualMachineInstanceView ToPSVirtualMachineInstanceView(
            this VirtualMachineInstanceView virtualMachineInstanceView,
            string resourceGroupName = null,
            string vmName            = null)
        {
            PSVirtualMachineInstanceView result = new PSVirtualMachineInstanceView
            {
                ResourceGroupName = resourceGroupName,
                Name                    = vmName,
                Disks                   = virtualMachineInstanceView.Disks,
                Extensions              = virtualMachineInstanceView.Extensions,
                Statuses                = virtualMachineInstanceView.Statuses,
                PlatformFaultDomain     = virtualMachineInstanceView.PlatformFaultDomain,
                PlatformUpdateDomain    = virtualMachineInstanceView.PlatformUpdateDomain,
                RemoteDesktopThumbprint = virtualMachineInstanceView.RemoteDesktopThumbprint,
                VMAgent                 = virtualMachineInstanceView.VMAgent
            };

            return(result);
        }
        public static PSVirtualMachineInstanceView ToPSVirtualMachineInstanceView(
            this VirtualMachineInstanceView virtualMachineInstanceView,
            string resourceGroupName = null,
            string vmName = null)
        {
            PSVirtualMachineInstanceView result = new PSVirtualMachineInstanceView
            {
                ResourceGroupName = resourceGroupName,
                Name = vmName,
                Disks = virtualMachineInstanceView.Disks,
                Extensions = virtualMachineInstanceView.Extensions,
                Statuses = virtualMachineInstanceView.Statuses,
                PlatformFaultDomain = virtualMachineInstanceView.PlatformFaultDomain,
                PlatformUpdateDomain = virtualMachineInstanceView.PlatformUpdateDomain,
                RemoteDesktopThumbprint = virtualMachineInstanceView.RemoteDesktopThumbprint,
                VMAgent = virtualMachineInstanceView.VMAgent
            };

            return result;
        }