func (o *ProcessingUnit) SetBSON(raw bson.Raw) error {

	if o == nil {
		return nil
	}

	s := &mongoAttributesProcessingUnit{}
	if err := raw.Unmarshal(s); err != nil {
		return err
	}

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

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