func (o *migration) Update(migration *v1.VirtualMachineInstanceMigration) (*v1.VirtualMachineInstanceMigration, error) {
	updatedVm := &v1.VirtualMachineInstanceMigration{}
	err := o.restClient.Put().
		Resource(o.resource).
		Namespace(o.namespace).
		Name(migration.Name).
		Body(migration).
		Do(context.Background()).
		Into(updatedVm)
	updatedVm.SetGroupVersionKind(v1.VirtualMachineInstanceMigrationGroupVersionKind)
	return updatedVm, err
}
Update the VirtualMachineInstanceMigration instance in the cluster in given namespace
package kubecli
import (
	"context"
	k8smetav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/types"
	"k8s.io/client-go/kubernetes/scheme"
	"k8s.io/client-go/rest"
	v1 "kubevirt.io/client-go/api/v1"
)
func (k *kubevirt) VirtualMachineInstanceMigration(namespace string) VirtualMachineInstanceMigrationInterface {
	return &migration{
		restClient: k.restClient,
		namespace:  namespace,
		resource:   "virtualmachineinstancemigrations",
	}
}
type migration struct {
	restClient *rest.RESTClient
	namespace  string
	resource   string
}
func (o *migration) Create(newMigration *v1.VirtualMachineInstanceMigration) (*v1.VirtualMachineInstanceMigration, error) {
	newMigrationResult := &v1.VirtualMachineInstanceMigration{}
	err := o.restClient.Post().
		Resource(o.resource).
		Namespace(o.namespace).
		Body(newMigration).
		Do(context.Background()).
		Into(newMigrationResult)
	newMigrationResult.SetGroupVersionKind(v1.VirtualMachineInstanceMigrationGroupVersionKind)
	return newMigrationResult, err
}
func (o *migration) Get(name string, options *k8smetav1.GetOptions) (*v1.VirtualMachineInstanceMigration, error) {
	newVm := &v1.VirtualMachineInstanceMigration{}
	err := o.restClient.Get().
		Resource(o.resource).
		Namespace(o.namespace).
		Name(name).
		VersionedParams(options, scheme.ParameterCodec).
		Do(context.Background()).
		Into(newVm)
	newVm.SetGroupVersionKind(v1.VirtualMachineInstanceMigrationGroupVersionKind)
	return newVm, err
}