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

	if o == nil {
		return nil
	}

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

	if s.AUID != nil {
		o.AUID = s.AUID
	}
	if s.CWD != nil {
		o.CWD = s.CWD
	}
	if s.EGID != nil {
		o.EGID = s.EGID
	}
	if s.EUID != nil {
		o.EUID = s.EUID
	}
	if s.EXE != nil {
		o.EXE = s.EXE
	}
	if s.FSGID != nil {
		o.FSGID = s.FSGID
	}
	if s.FSUID != nil {
		o.FSUID = s.FSUID
	}
	if s.FilePath != nil {
		o.FilePath = s.FilePath
	}
	if s.GID != nil {
		o.GID = s.GID
	}
	id := s.ID.Hex()
	o.ID = &id
	if s.PER != nil {
		o.PER = s.PER
	}
	if s.PID != nil {
		o.PID = s.PID
	}
	if s.PPID != nil {
		o.PPID = s.PPID
	}
	if s.SGID != nil {
		o.SGID = s.SGID
	}
	if s.SUID != nil {
		o.SUID = s.SUID
	}
	if s.UID != nil {
		o.UID = s.UID
	}
	if s.A0 != nil {
		o.A0 = s.A0
	}
	if s.A1 != nil {
		o.A1 = s.A1
	}
	if s.A2 != nil {
		o.A2 = s.A2
	}
	if s.A3 != nil {
		o.A3 = s.A3
	}
	if s.Arch != nil {
		o.Arch = s.Arch
	}
	if s.Arguments != nil {
		o.Arguments = s.Arguments
	}
	if s.AuditProfileID != nil {
		o.AuditProfileID = s.AuditProfileID
	}
	if s.AuditProfileNamespace != nil {
		o.AuditProfileNamespace = s.AuditProfileNamespace
	}
	if s.Command != nil {
		o.Command = s.Command
	}
	if s.EnforcerID != nil {
		o.EnforcerID = s.EnforcerID
	}
	if s.EnforcerNamespace != nil {
		o.EnforcerNamespace = s.EnforcerNamespace
	}
	if s.Exit != nil {
		o.Exit = s.Exit
	}
	if s.MigrationsLog != nil {
		o.MigrationsLog = s.MigrationsLog
	}
	if s.ProcessingUnitID != nil {
		o.ProcessingUnitID = s.ProcessingUnitID
	}
	if s.ProcessingUnitNamespace != nil {
		o.ProcessingUnitNamespace = s.ProcessingUnitNamespace
	}
	if s.RecordType != nil {
		o.RecordType = s.RecordType
	}
	if s.Sequence != nil {
		o.Sequence = s.Sequence
	}
	if s.Success != nil {
		o.Success = s.Success
	}
	if s.Syscall != nil {
		o.Syscall = s.Syscall
	}
	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 *SparseAuditReport) SetBSON(raw bson.Raw) error {
	if o == nil {
		return nil
	}
	s := &mongoAttributesSparseAuditReport{}
	if err := raw.Unmarshal(s); err != nil {
		return err
	}
	if s.AUID != nil {
		o.AUID = s.AUID
	}
	if s.CWD != nil {
		o.CWD = s.CWD
	}
	if s.EGID != nil {
		o.EGID = s.EGID
	}
	if s.EUID != nil {
		o.EUID = s.EUID
	}
	if s.EXE != nil {
		o.EXE = s.EXE
	}
	if s.FSGID != nil {
		o.FSGID = s.FSGID
	}
	if s.FSUID != nil {
		o.FSUID = s.FSUID
	}
	if s.FilePath != nil {
		o.FilePath = s.FilePath
	}
	if s.GID != nil {
		o.GID = s.GID
	}
	id := s.ID.Hex()
	o.ID = &id
	if s.PER != nil {
		o.PER = s.PER
	}
	if s.PID != nil {
		o.PID = s.PID
	}
	if s.PPID != nil {
		o.PPID = s.PPID
	}
	if s.SGID != nil {
		o.SGID = s.SGID
	}
	if s.SUID != nil {
		o.SUID = s.SUID
	}
	if s.UID != nil {
		o.UID = s.UID
	}
	if s.A0 != nil {
		o.A0 = s.A0
	}
	if s.A1 != nil {
		o.A1 = s.A1
	}
	if s.A2 != nil {
		o.A2 = s.A2
	}
	if s.A3 != nil {
		o.A3 = s.A3
	}
	if s.Arch != nil {
		o.Arch = s.Arch
	}
	if s.Arguments != nil {
		o.Arguments = s.Arguments
	}
	if s.AuditProfileID != nil {
		o.AuditProfileID = s.AuditProfileID
	}
	if s.AuditProfileNamespace != nil {
		o.AuditProfileNamespace = s.AuditProfileNamespace
	}
	if s.Command != nil {
		o.Command = s.Command
	}
	if s.EnforcerID != nil {
		o.EnforcerID = s.EnforcerID
	}
	if s.EnforcerNamespace != nil {
		o.EnforcerNamespace = s.EnforcerNamespace
	}
	if s.Exit != nil {
		o.Exit = s.Exit
	}
	if s.MigrationsLog != nil {
		o.MigrationsLog = s.MigrationsLog
	}
	if s.ProcessingUnitID != nil {
		o.ProcessingUnitID = s.ProcessingUnitID
	}
	if s.ProcessingUnitNamespace != nil {
		o.ProcessingUnitNamespace = s.ProcessingUnitNamespace
	}
	if s.RecordType != nil {
		o.RecordType = s.RecordType
	}
	if s.Sequence != nil {
		o.Sequence = s.Sequence
	}
	if s.Success != nil {
		o.Success = s.Success
	}
	if s.Syscall != nil {
		o.Syscall = s.Syscall
	}
	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 * SparseAuditReport ) SetBSON ( raw bson . Raw ) error { if o == nil { return nil } s := & mongoAttributesSparseAuditReport { } if err := raw . Unmarshal ( s ) ; err != nil { return err } if s . AUID != nil { o . AUID = s . AUID } if s . CWD != nil { o . CWD = s . CWD } if s . EGID != nil { o . EGID = s . EGID } if s . EUID != nil { o . EUID = s . EUID } if s . EXE != nil { o . EXE = s . EXE } if s . FSGID != nil { o . FSGID = s . FSGID } if s . FSUID != nil { o . FSUID = s . FSUID } if s . FilePath != nil { o . FilePath = s . FilePath } if s . GID != nil { o . GID = s . GID } id := s . ID . Hex ( ) o . ID = & id if s . PER != nil { o . PER = s . PER } if s . PID != nil { o . PID = s . PID } if s . PPID != nil { o . PPID = s . PPID } if s . SGID != nil { o . SGID = s . SGID } if s . SUID != nil { o . SUID = s . SUID } if s . UID != nil { o . UID = s . UID } if s . A0 != nil { o . A0 = s . A0 } if s . A1 != nil { o . A1 = s . A1 } if s . A2 != nil { o . A2 = s . A2 } if s . A3 != nil { o . A3 = s . A3 } if s . Arch != nil { o . Arch = s . Arch } if s . Arguments != nil { o . Arguments = s . Arguments } if s . AuditProfileID != nil { o . AuditProfileID = s . AuditProfileID } if s . AuditProfileNamespace != nil { o . AuditProfileNamespace = s . AuditProfileNamespace } if s . Command != nil { o . Command = s . Command } if s . EnforcerID != nil { o . EnforcerID = s . EnforcerID } if s . EnforcerNamespace != nil { o . EnforcerNamespace = s . EnforcerNamespace } if s . Exit != nil { o . Exit = s . Exit } if s . MigrationsLog != nil { o . MigrationsLog = s . MigrationsLog } if s . ProcessingUnitID != nil { o . ProcessingUnitID = s . ProcessingUnitID } if s . ProcessingUnitNamespace != nil { o . ProcessingUnitNamespace = s . ProcessingUnitNamespace } if s . RecordType != nil { o . RecordType = s . RecordType } if s . Sequence != nil { o . Sequence = s . Sequence } if s . Success != nil { o . Success = s . Success } if s . Syscall != nil { o . Syscall = s . Syscall } 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 .