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

	if o == nil {
		return nil
	}

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

	if s.CPULoad != nil {
		o.CPULoad = s.CPULoad
	}
	id := s.ID.Hex()
	o.ID = &id
	if s.EnforcerID != nil {
		o.EnforcerID = s.EnforcerID
	}
	if s.LicenseType != nil {
		o.LicenseType = s.LicenseType
	}
	if s.Memory != nil {
		o.Memory = s.Memory
	}
	if s.MigrationsLog != nil {
		o.MigrationsLog = s.MigrationsLog
	}
	if s.Name != nil {
		o.Name = s.Name
	}
	if s.Namespace != nil {
		o.Namespace = s.Namespace
	}
	if s.Processes != nil {
		o.Processes = s.Processes
	}
	if s.Timestamp != nil {
		o.Timestamp = s.Timestamp
	}
	if s.ZHash != nil {
		o.ZHash = s.ZHash
	}
	if s.Zone != nil {
		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 *SparseEnforcerReport) SetBSON(raw bson.Raw) error {
	if o == nil {
		return nil
	}
	s := &mongoAttributesSparseEnforcerReport{}
	if err := raw.Unmarshal(s); err != nil {
		return err
	}
	if s.CPULoad != nil {
		o.CPULoad = s.CPULoad
	}
	id := s.ID.Hex()
	o.ID = &id
	if s.EnforcerID != nil {
		o.EnforcerID = s.EnforcerID
	}
	if s.LicenseType != nil {
		o.LicenseType = s.LicenseType
	}
	if s.Memory != nil {
		o.Memory = s.Memory
	}
	if s.MigrationsLog != nil {
		o.MigrationsLog = s.MigrationsLog
	}
	if s.Name != nil {
		o.Name = s.Name
	}
	if s.Namespace != nil {
		o.Namespace = s.Namespace
	}
	if s.Processes != nil {
		o.Processes = s.Processes
	}
	if s.Timestamp != nil {
		o.Timestamp = s.Timestamp
	}
	if s.ZHash != nil {
		o.ZHash = s.ZHash
	}
	if s.Zone != nil {
		o.Zone = s.Zone
	}
	return nil
}
func ( o * SparseEnforcerReport ) SetBSON ( raw bson . Raw ) error { if o == nil { return nil } s := & mongoAttributesSparseEnforcerReport { } if err := raw . Unmarshal ( s ) ; err != nil { return err } if s . CPULoad != nil { o . CPULoad = s . CPULoad } id := s . ID . Hex ( ) o . ID = & id if s . EnforcerID != nil { o . EnforcerID = s . EnforcerID } if s . LicenseType != nil { o . LicenseType = s . LicenseType } if s . Memory != nil { o . Memory = s . Memory } if s . MigrationsLog != nil { o . MigrationsLog = s . MigrationsLog } if s . Name != nil { o . Name = s . Name } if s . Namespace != nil { o . Namespace = s . Namespace } if s . Processes != nil { o . Processes = s . Processes } if s . Timestamp != nil { o . Timestamp = s . Timestamp } if s . ZHash != nil { o . ZHash = s . ZHash } if s . Zone != nil { o . Zone = s . Zone } return nil }
SetBSON implements the bson marshaling interface.
SetBSON implements the bson marshaling interface .