func (o *ProcessingUnit) ToSparse(fields ...string) elemental.SparseIdentifiable {

	if len(fields) == 0 {
		// nolint: goimports
		return &SparseProcessingUnit{
			ID:                   &o.ID,
			Annotations:          &o.Annotations,
			Archived:             &o.Archived,
			AssociatedTags:       &o.AssociatedTags,
			ClientLocalID:        &o.ClientLocalID,
			CollectInfo:          &o.CollectInfo,
			CollectedInfo:        &o.CollectedInfo,
			Controller:           &o.Controller,
			CreateIdempotencyKey: &o.CreateIdempotencyKey,
			CreateTime:           &o.CreateTime,
			DatapathType:         &o.DatapathType,
			Description:          &o.Description,
			EnforcementStatus:    &o.EnforcementStatus,
			EnforcerID:           &o.EnforcerID,
			EnforcerNamespace:    &o.EnforcerNamespace,
			Image:                &o.Image,
			Images:               &o.Images,
			LastCollectionTime:   &o.LastCollectionTime,
			LastLocalTimestamp:   &o.LastLocalTimestamp,
			LastSyncTime:         &o.LastSyncTime,
			Metadata:             &o.Metadata,
			MigrationsLog:        &o.MigrationsLog,
			Name:                 &o.Name,
			Namespace:            &o.Namespace,
			NativeContextID:      &o.NativeContextID,
			NetworkServices:      &o.NetworkServices,
			NormalizedTags:       &o.NormalizedTags,
			OperationalStatus:    &o.OperationalStatus,
			Protected:            &o.Protected,
			Tracing:              o.Tracing,
			Type:                 &o.Type,
			UpdateIdempotencyKey: &o.UpdateIdempotencyKey,
			UpdateTime:           &o.UpdateTime,
			Vulnerabilities:      &o.Vulnerabilities,
			VulnerabilityLevel:   &o.VulnerabilityLevel,
			ZHash:                &o.ZHash,
			Zone:                 &o.Zone,
		}
	}

	sp := &SparseProcessingUnit{}
	for _, f := range fields {
		switch f {
		case "ID":
			sp.ID = &(o.ID)
		case "annotations":
			sp.Annotations = &(o.Annotations)
		case "archived":
			sp.Archived = &(o.Archived)
		case "associatedTags":
			sp.AssociatedTags = &(o.AssociatedTags)
		case "clientLocalID":
			sp.ClientLocalID = &(o.ClientLocalID)
		case "collectInfo":
			sp.CollectInfo = &(o.CollectInfo)
		case "collectedInfo":
			sp.CollectedInfo = &(o.CollectedInfo)
		case "controller":
			sp.Controller = &(o.Controller)
		case "createIdempotencyKey":
			sp.CreateIdempotencyKey = &(o.CreateIdempotencyKey)
		case "createTime":
			sp.CreateTime = &(o.CreateTime)
		case "datapathType":
			sp.DatapathType = &(o.DatapathType)
		case "description":
			sp.Description = &(o.Description)
		case "enforcementStatus":
			sp.EnforcementStatus = &(o.EnforcementStatus)
		case "enforcerID":
			sp.EnforcerID = &(o.EnforcerID)
		case "enforcerNamespace":
			sp.EnforcerNamespace = &(o.EnforcerNamespace)
		case "image":
			sp.Image = &(o.Image)
		case "images":
			sp.Images = &(o.Images)
		case "lastCollectionTime":
			sp.LastCollectionTime = &(o.LastCollectionTime)
		case "lastLocalTimestamp":
			sp.LastLocalTimestamp = &(o.LastLocalTimestamp)
		case "lastSyncTime":
			sp.LastSyncTime = &(o.LastSyncTime)
		case "metadata":
			sp.Metadata = &(o.Metadata)
		case "migrationsLog":
			sp.MigrationsLog = &(o.MigrationsLog)
		case "name":
			sp.Name = &(o.Name)
		case "namespace":
			sp.Namespace = &(o.Namespace)
		case "nativeContextID":
			sp.NativeContextID = &(o.NativeContextID)
		case "networkServices":
			sp.NetworkServices = &(o.NetworkServices)
		case "normalizedTags":
			sp.NormalizedTags = &(o.NormalizedTags)
		case "operationalStatus":
			sp.OperationalStatus = &(o.OperationalStatus)
		case "protected":
			sp.Protected = &(o.Protected)
		case "tracing":
			sp.Tracing = o.Tracing
		case "type":
			sp.Type = &(o.Type)
		case "updateIdempotencyKey":
			sp.UpdateIdempotencyKey = &(o.UpdateIdempotencyKey)
		case "updateTime":
			sp.UpdateTime = &(o.UpdateTime)
		case "vulnerabilities":
			sp.Vulnerabilities = &(o.Vulnerabilities)
		case "vulnerabilityLevel":
			sp.VulnerabilityLevel = &(o.VulnerabilityLevel)
		case "zHash":
			sp.ZHash = &(o.ZHash)
		case "zone":
			sp.Zone = &(o.Zone)
		}
	}

	return sp
}
// ToSparse returns the sparse version of the model.
// The returned object will only contain the given fields. No field means entire field set.
ToSparse returns the sparse version of the model.
The returned object will only contain the given fields. No field means entire field set.
// ToSparse returns the sparse version of the model . // The returned object will only contain the given fields . No field means entire field set .
func (o *ProcessingUnit) ToSparse(fields ...string) elemental.SparseIdentifiable {
	if len(fields) == 0 {
		return &SparseProcessingUnit{
			ID:                   &o.ID,
			Annotations:          &o.Annotations,
			Archived:             &o.Archived,
			AssociatedTags:       &o.AssociatedTags,
			ClientLocalID:        &o.ClientLocalID,
			CollectInfo:          &o.CollectInfo,
			CollectedInfo:        &o.CollectedInfo,
			Controller:           &o.Controller,
			CreateIdempotencyKey: &o.CreateIdempotencyKey,
			CreateTime:           &o.CreateTime,
			DatapathType:         &o.DatapathType,
			Description:          &o.Description,
			EnforcementStatus:    &o.EnforcementStatus,
			EnforcerID:           &o.EnforcerID,
			EnforcerNamespace:    &o.EnforcerNamespace,
			Image:                &o.Image,
			Images:               &o.Images,
			LastCollectionTime:   &o.LastCollectionTime,
			LastLocalTimestamp:   &o.LastLocalTimestamp,
			LastSyncTime:         &o.LastSyncTime,
			Metadata:             &o.Metadata,
			MigrationsLog:        &o.MigrationsLog,
			Name:                 &o.Name,
			Namespace:            &o.Namespace,
			NativeContextID:      &o.NativeContextID,
			NetworkServices:      &o.NetworkServices,
			NormalizedTags:       &o.NormalizedTags,
			OperationalStatus:    &o.OperationalStatus,
			Protected:            &o.Protected,
			Tracing:              o.Tracing,
			Type:                 &o.Type,
			UpdateIdempotencyKey: &o.UpdateIdempotencyKey,
			UpdateTime:           &o.UpdateTime,
			Vulnerabilities:      &o.Vulnerabilities,
			VulnerabilityLevel:   &o.VulnerabilityLevel,
			ZHash:                &o.ZHash,
			Zone:                 &o.Zone,
		}
	}
	sp := &SparseProcessingUnit{}
	for _, f := range fields {
		switch f {
		case "ID":
			sp.ID = &(o.ID)
		case "annotations":
			sp.Annotations = &(o.Annotations)
		case "archived":
			sp.Archived = &(o.Archived)
		case "associatedTags":
			sp.AssociatedTags = &(o.AssociatedTags)
		case "clientLocalID":
			sp.ClientLocalID = &(o.ClientLocalID)
		case "collectInfo":
			sp.CollectInfo = &(o.CollectInfo)
		case "collectedInfo":
			sp.CollectedInfo = &(o.CollectedInfo)
		case "controller":
			sp.Controller = &(o.Controller)
		case "createIdempotencyKey":
			sp.CreateIdempotencyKey = &(o.CreateIdempotencyKey)
		case "createTime":
			sp.CreateTime = &(o.CreateTime)
		case "datapathType":
			sp.DatapathType = &(o.DatapathType)
		case "description":
			sp.Description = &(o.Description)
		case "enforcementStatus":
			sp.EnforcementStatus = &(o.EnforcementStatus)
		case "enforcerID":
			sp.EnforcerID = &(o.EnforcerID)
		case "enforcerNamespace":
			sp.EnforcerNamespace = &(o.EnforcerNamespace)
		case "image":
			sp.Image = &(o.Image)
		case "images":
			sp.Images = &(o.Images)
		case "lastCollectionTime":
			sp.LastCollectionTime = &(o.LastCollectionTime)
		case "lastLocalTimestamp":
			sp.LastLocalTimestamp = &(o.LastLocalTimestamp)
		case "lastSyncTime":
			sp.LastSyncTime = &(o.LastSyncTime)
		case "metadata":
			sp.Metadata = &(o.Metadata)
		case "migrationsLog":
			sp.MigrationsLog = &(o.MigrationsLog)
		case "name":
			sp.Name = &(o.Name)
		case "namespace":
			sp.Namespace = &(o.Namespace)
		case "nativeContextID":
			sp.NativeContextID = &(o.NativeContextID)
		case "networkServices":
			sp.NetworkServices = &(o.NetworkServices)
		case "normalizedTags":
			sp.NormalizedTags = &(o.NormalizedTags)
		case "operationalStatus":
			sp.OperationalStatus = &(o.OperationalStatus)
		case "protected":
			sp.Protected = &(o.Protected)
		case "tracing":
			sp.Tracing = o.Tracing
		case "type":
			sp.Type = &(o.Type)
		case "updateIdempotencyKey":
			sp.UpdateIdempotencyKey = &(o.UpdateIdempotencyKey)
		case "updateTime":
			sp.UpdateTime = &(o.UpdateTime)
		case "vulnerabilities":
			sp.Vulnerabilities = &(o.Vulnerabilities)
		case "vulnerabilityLevel":
			sp.VulnerabilityLevel = &(o.VulnerabilityLevel)
		case "zHash":
			sp.ZHash = &(o.ZHash)
		case "zone":
			sp.Zone = &(o.Zone)
		}
	}
	return sp
}
func ( o * ProcessingUnit ) ToSparse ( fields ... string ) elemental . SparseIdentifiable { if len ( fields ) == 0 { return & SparseProcessingUnit { ID : & o . ID , Annotations : & o . Annotations , Archived : & o . Archived , AssociatedTags : & o . AssociatedTags , ClientLocalID : & o . ClientLocalID , CollectInfo : & o . CollectInfo , CollectedInfo : & o . CollectedInfo , Controller : & o . Controller , CreateIdempotencyKey : & o . CreateIdempotencyKey , CreateTime : & o . CreateTime , DatapathType : & o . DatapathType , Description : & o . Description , EnforcementStatus : & o . EnforcementStatus , EnforcerID : & o . EnforcerID , EnforcerNamespace : & o . EnforcerNamespace , Image : & o . Image , Images : & o . Images , LastCollectionTime : & o . LastCollectionTime , LastLocalTimestamp : & o . LastLocalTimestamp , LastSyncTime : & o . LastSyncTime , Metadata : & o . Metadata , MigrationsLog : & o . MigrationsLog , Name : & o . Name , Namespace : & o . Namespace , NativeContextID : & o . NativeContextID , NetworkServices : & o . NetworkServices , NormalizedTags : & o . NormalizedTags , OperationalStatus : & o . OperationalStatus , Protected : & o . Protected , Tracing : o . Tracing , Type : & o . Type , UpdateIdempotencyKey : & o . UpdateIdempotencyKey , UpdateTime : & o . UpdateTime , Vulnerabilities : & o . Vulnerabilities , VulnerabilityLevel : & o . VulnerabilityLevel , ZHash : & o . ZHash , Zone : & o . Zone , } } sp := & SparseProcessingUnit { } for _ , f := range fields { switch f { case " " : sp . ID = & ( o . ID ) case " " : sp . Annotations = & ( o . Annotations ) case " " : sp . Archived = & ( o . Archived ) case " " : sp . AssociatedTags = & ( o . AssociatedTags ) case " " : sp . ClientLocalID = & ( o . ClientLocalID ) case " " : sp . CollectInfo = & ( o . CollectInfo ) case " " : sp . CollectedInfo = & ( o . CollectedInfo ) case " " : sp . Controller = & ( o . Controller ) case " " : sp . CreateIdempotencyKey = & ( o . CreateIdempotencyKey ) case " " : sp . CreateTime = & ( o . CreateTime ) case " " : sp . DatapathType = & ( o . DatapathType ) case " " : sp . Description = & ( o . Description ) case " " : sp . EnforcementStatus = & ( o . EnforcementStatus ) case " " : sp . EnforcerID = & ( o . EnforcerID ) case " " : sp . EnforcerNamespace = & ( o . EnforcerNamespace ) case " " : sp . Image = & ( o . Image ) case " " : sp . Images = & ( o . Images ) case " " : sp . LastCollectionTime = & ( o . LastCollectionTime ) case " " : sp . LastLocalTimestamp = & ( o . LastLocalTimestamp ) case " " : sp . LastSyncTime = & ( o . LastSyncTime ) case " " : sp . Metadata = & ( o . Metadata ) case " " : sp . MigrationsLog = & ( o . MigrationsLog ) case " " : sp . Name = & ( o . Name ) case " " : sp . Namespace = & ( o . Namespace ) case " " : sp . NativeContextID = & ( o . NativeContextID ) case " " : sp . NetworkServices = & ( o . NetworkServices ) case " " : sp . NormalizedTags = & ( o . NormalizedTags ) case " " : sp . OperationalStatus = & ( o . OperationalStatus ) case " " : sp . Protected = & ( o . Protected ) case " " : sp . Tracing = o . Tracing case " " : sp . Type = & ( o . Type ) case " " : sp . UpdateIdempotencyKey = & ( o . UpdateIdempotencyKey ) case " " : sp . UpdateTime = & ( o . UpdateTime ) case " " : sp . Vulnerabilities = & ( o . Vulnerabilities ) case " " : sp . VulnerabilityLevel = & ( o . VulnerabilityLevel ) case " " : sp . ZHash = & ( o . ZHash ) case " " : sp . Zone = & ( o . Zone ) } } return sp }
ToSparse returns the sparse version of the model.
ToSparse returns the sparse version of the model .
// nolint: goimports