func (o *SparseProcessingUnit) GetBSON() (interface{}, error) {

	if o == nil {
		return nil, nil
	}

	s := &mongoAttributesSparseProcessingUnit{}

	if o.ID != nil {
		s.ID = bson.ObjectIdHex(*o.ID)
	}
	if o.Annotations != nil {
		s.Annotations = o.Annotations
	}
	if o.Archived != nil {
		s.Archived = o.Archived
	}
	if o.AssociatedTags != nil {
		s.AssociatedTags = o.AssociatedTags
	}
	if o.ClientLocalID != nil {
		s.ClientLocalID = o.ClientLocalID
	}
	if o.CollectInfo != nil {
		s.CollectInfo = o.CollectInfo
	}
	if o.CollectedInfo != nil {
		s.CollectedInfo = o.CollectedInfo
	}
	if o.Controller != nil {
		s.Controller = o.Controller
	}
	if o.CreateIdempotencyKey != nil {
		s.CreateIdempotencyKey = o.CreateIdempotencyKey
	}
	if o.CreateTime != nil {
		s.CreateTime = o.CreateTime
	}
	if o.DatapathType != nil {
		s.DatapathType = o.DatapathType
	}
	if o.Description != nil {
		s.Description = o.Description
	}
	if o.EnforcementStatus != nil {
		s.EnforcementStatus = o.EnforcementStatus
	}
	if o.EnforcerID != nil {
		s.EnforcerID = o.EnforcerID
	}
	if o.EnforcerNamespace != nil {
		s.EnforcerNamespace = o.EnforcerNamespace
	}
	if o.Images != nil {
		s.Images = o.Images
	}
	if o.LastCollectionTime != nil {
		s.LastCollectionTime = o.LastCollectionTime
	}
	if o.LastSyncTime != nil {
		s.LastSyncTime = o.LastSyncTime
	}
	if o.Metadata != nil {
		s.Metadata = o.Metadata
	}
	if o.MigrationsLog != nil {
		s.MigrationsLog = o.MigrationsLog
	}
	if o.Name != nil {
		s.Name = o.Name
	}
	if o.Namespace != nil {
		s.Namespace = o.Namespace
	}
	if o.NativeContextID != nil {
		s.NativeContextID = o.NativeContextID
	}
	if o.NetworkServices != nil {
		s.NetworkServices = o.NetworkServices
	}
	if o.NormalizedTags != nil {
		s.NormalizedTags = o.NormalizedTags
	}
	if o.OperationalStatus != nil {
		s.OperationalStatus = o.OperationalStatus
	}
	if o.Protected != nil {
		s.Protected = o.Protected
	}
	if o.Type != nil {
		s.Type = o.Type
	}
	if o.UpdateIdempotencyKey != nil {
		s.UpdateIdempotencyKey = o.UpdateIdempotencyKey
	}
	if o.UpdateTime != nil {
		s.UpdateTime = o.UpdateTime
	}
	if o.Vulnerabilities != nil {
		s.Vulnerabilities = o.Vulnerabilities
	}
	if o.VulnerabilityLevel != nil {
		s.VulnerabilityLevel = o.VulnerabilityLevel
	}
	if o.ZHash != nil {
		s.ZHash = o.ZHash
	}
	if o.Zone != nil {
		s.Zone = o.Zone
	}

	return s, nil
}
// GetBSON implements the bson marshaling interface.
// This is used to transparently convert ID to MongoDBID as ObectID.
GetBSON implements the bson marshaling interface.
This is used to transparently convert ID to MongoDBID as ObectID.
// GetBSON implements the bson marshaling interface . // This is used to transparently convert ID to MongoDBID as ObectID .
func (o *SparseProcessingUnit) GetBSON() (interface{}, error) {
	if o == nil {
		return nil, nil
	}
	s := &mongoAttributesSparseProcessingUnit{}
	if o.ID != nil {
		s.ID = bson.ObjectIdHex(*o.ID)
	}
	if o.Annotations != nil {
		s.Annotations = o.Annotations
	}
	if o.Archived != nil {
		s.Archived = o.Archived
	}
	if o.AssociatedTags != nil {
		s.AssociatedTags = o.AssociatedTags
	}
	if o.ClientLocalID != nil {
		s.ClientLocalID = o.ClientLocalID
	}
	if o.CollectInfo != nil {
		s.CollectInfo = o.CollectInfo
	}
	if o.CollectedInfo != nil {
		s.CollectedInfo = o.CollectedInfo
	}
	if o.Controller != nil {
		s.Controller = o.Controller
	}
	if o.CreateIdempotencyKey != nil {
		s.CreateIdempotencyKey = o.CreateIdempotencyKey
	}
	if o.CreateTime != nil {
		s.CreateTime = o.CreateTime
	}
	if o.DatapathType != nil {
		s.DatapathType = o.DatapathType
	}
	if o.Description != nil {
		s.Description = o.Description
	}
	if o.EnforcementStatus != nil {
		s.EnforcementStatus = o.EnforcementStatus
	}
	if o.EnforcerID != nil {
		s.EnforcerID = o.EnforcerID
	}
	if o.EnforcerNamespace != nil {
		s.EnforcerNamespace = o.EnforcerNamespace
	}
	if o.Images != nil {
		s.Images = o.Images
	}
	if o.LastCollectionTime != nil {
		s.LastCollectionTime = o.LastCollectionTime
	}
	if o.LastSyncTime != nil {
		s.LastSyncTime = o.LastSyncTime
	}
	if o.Metadata != nil {
		s.Metadata = o.Metadata
	}
	if o.MigrationsLog != nil {
		s.MigrationsLog = o.MigrationsLog
	}
	if o.Name != nil {
		s.Name = o.Name
	}
	if o.Namespace != nil {
		s.Namespace = o.Namespace
	}
	if o.NativeContextID != nil {
		s.NativeContextID = o.NativeContextID
	}
	if o.NetworkServices != nil {
		s.NetworkServices = o.NetworkServices
	}
	if o.NormalizedTags != nil {
		s.NormalizedTags = o.NormalizedTags
	}
	if o.OperationalStatus != nil {
		s.OperationalStatus = o.OperationalStatus
	}
	if o.Protected != nil {
		s.Protected = o.Protected
	}
	if o.Type != nil {
		s.Type = o.Type
	}
	if o.UpdateIdempotencyKey != nil {
		s.UpdateIdempotencyKey = o.UpdateIdempotencyKey
	}
	if o.UpdateTime != nil {
		s.UpdateTime = o.UpdateTime
	}
	if o.Vulnerabilities != nil {
		s.Vulnerabilities = o.Vulnerabilities
	}
	if o.VulnerabilityLevel != nil {
		s.VulnerabilityLevel = o.VulnerabilityLevel
	}
	if o.ZHash != nil {
		s.ZHash = o.ZHash
	}
	if o.Zone != nil {
		s.Zone = o.Zone
	}
	return s, nil
}
func ( o * SparseProcessingUnit ) GetBSON ( ) ( interface { } , error ) { if o == nil { return nil , nil } s := & mongoAttributesSparseProcessingUnit { } if o . ID != nil { s . ID = bson . ObjectIdHex ( * o . ID ) } if o . Annotations != nil { s . Annotations = o . Annotations } if o . Archived != nil { s . Archived = o . Archived } if o . AssociatedTags != nil { s . AssociatedTags = o . AssociatedTags } if o . ClientLocalID != nil { s . ClientLocalID = o . ClientLocalID } if o . CollectInfo != nil { s . CollectInfo = o . CollectInfo } if o . CollectedInfo != nil { s . CollectedInfo = o . CollectedInfo } if o . Controller != nil { s . Controller = o . Controller } if o . CreateIdempotencyKey != nil { s . CreateIdempotencyKey = o . CreateIdempotencyKey } if o . CreateTime != nil { s . CreateTime = o . CreateTime } if o . DatapathType != nil { s . DatapathType = o . DatapathType } if o . Description != nil { s . Description = o . Description } if o . EnforcementStatus != nil { s . EnforcementStatus = o . EnforcementStatus } if o . EnforcerID != nil { s . EnforcerID = o . EnforcerID } if o . EnforcerNamespace != nil { s . EnforcerNamespace = o . EnforcerNamespace } if o . Images != nil { s . Images = o . Images } if o . LastCollectionTime != nil { s . LastCollectionTime = o . LastCollectionTime } if o . LastSyncTime != nil { s . LastSyncTime = o . LastSyncTime } if o . Metadata != nil { s . Metadata = o . Metadata } if o . MigrationsLog != nil { s . MigrationsLog = o . MigrationsLog } if o . Name != nil { s . Name = o . Name } if o . Namespace != nil { s . Namespace = o . Namespace } if o . NativeContextID != nil { s . NativeContextID = o . NativeContextID } if o . NetworkServices != nil { s . NetworkServices = o . NetworkServices } if o . NormalizedTags != nil { s . NormalizedTags = o . NormalizedTags } if o . OperationalStatus != nil { s . OperationalStatus = o . OperationalStatus } if o . Protected != nil { s . Protected = o . Protected } if o . Type != nil { s . Type = o . Type } if o . UpdateIdempotencyKey != nil { s . UpdateIdempotencyKey = o . UpdateIdempotencyKey } if o . UpdateTime != nil { s . UpdateTime = o . UpdateTime } if o . Vulnerabilities != nil { s . Vulnerabilities = o . Vulnerabilities } if o . VulnerabilityLevel != nil { s . VulnerabilityLevel = o . VulnerabilityLevel } if o . ZHash != nil { s . ZHash = o . ZHash } if o . Zone != nil { s . Zone = o . Zone } return s , nil }
GetBSON implements the bson marshaling interface.
GetBSON implements the bson marshaling interface .