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

	if o == nil {
		return nil, nil
	}

	s := &mongoAttributesSparsePacketReport{}

	if o.ID != nil {
		s.ID = bson.ObjectIdHex(*o.ID)
	}
	if o.TCPFlags != nil {
		s.TCPFlags = o.TCPFlags
	}
	if o.Claims != nil {
		s.Claims = o.Claims
	}
	if o.DestinationIP != nil {
		s.DestinationIP = o.DestinationIP
	}
	if o.DestinationPort != nil {
		s.DestinationPort = o.DestinationPort
	}
	if o.DropReason != nil {
		s.DropReason = o.DropReason
	}
	if o.Encrypt != nil {
		s.Encrypt = o.Encrypt
	}
	if o.EnforcerID != nil {
		s.EnforcerID = o.EnforcerID
	}
	if o.EnforcerNamespace != nil {
		s.EnforcerNamespace = o.EnforcerNamespace
	}
	if o.Event != nil {
		s.Event = o.Event
	}
	if o.Length != nil {
		s.Length = o.Length
	}
	if o.Mark != nil {
		s.Mark = o.Mark
	}
	if o.MigrationsLog != nil {
		s.MigrationsLog = o.MigrationsLog
	}
	if o.Namespace != nil {
		s.Namespace = o.Namespace
	}
	if o.PacketID != nil {
		s.PacketID = o.PacketID
	}
	if o.Protocol != nil {
		s.Protocol = o.Protocol
	}
	if o.PuID != nil {
		s.PuID = o.PuID
	}
	if o.RawPacket != nil {
		s.RawPacket = o.RawPacket
	}
	if o.SourceIP != nil {
		s.SourceIP = o.SourceIP
	}
	if o.SourcePort != nil {
		s.SourcePort = o.SourcePort
	}
	if o.Timestamp != nil {
		s.Timestamp = o.Timestamp
	}
	if o.TriremePacket != nil {
		s.TriremePacket = o.TriremePacket
	}
	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 *SparsePacketReport) GetBSON() (interface{}, error) {
	if o == nil {
		return nil, nil
	}
	s := &mongoAttributesSparsePacketReport{}
	if o.ID != nil {
		s.ID = bson.ObjectIdHex(*o.ID)
	}
	if o.TCPFlags != nil {
		s.TCPFlags = o.TCPFlags
	}
	if o.Claims != nil {
		s.Claims = o.Claims
	}
	if o.DestinationIP != nil {
		s.DestinationIP = o.DestinationIP
	}
	if o.DestinationPort != nil {
		s.DestinationPort = o.DestinationPort
	}
	if o.DropReason != nil {
		s.DropReason = o.DropReason
	}
	if o.Encrypt != nil {
		s.Encrypt = o.Encrypt
	}
	if o.EnforcerID != nil {
		s.EnforcerID = o.EnforcerID
	}
	if o.EnforcerNamespace != nil {
		s.EnforcerNamespace = o.EnforcerNamespace
	}
	if o.Event != nil {
		s.Event = o.Event
	}
	if o.Length != nil {
		s.Length = o.Length
	}
	if o.Mark != nil {
		s.Mark = o.Mark
	}
	if o.MigrationsLog != nil {
		s.MigrationsLog = o.MigrationsLog
	}
	if o.Namespace != nil {
		s.Namespace = o.Namespace
	}
	if o.PacketID != nil {
		s.PacketID = o.PacketID
	}
	if o.Protocol != nil {
		s.Protocol = o.Protocol
	}
	if o.PuID != nil {
		s.PuID = o.PuID
	}
	if o.RawPacket != nil {
		s.RawPacket = o.RawPacket
	}
	if o.SourceIP != nil {
		s.SourceIP = o.SourceIP
	}
	if o.SourcePort != nil {
		s.SourcePort = o.SourcePort
	}
	if o.Timestamp != nil {
		s.Timestamp = o.Timestamp
	}
	if o.TriremePacket != nil {
		s.TriremePacket = o.TriremePacket
	}
	if o.ZHash != nil {
		s.ZHash = o.ZHash
	}
	if o.Zone != nil {
		s.Zone = o.Zone
	}
	return s, nil
}
func ( o * SparsePacketReport ) GetBSON ( ) ( interface { } , error ) { if o == nil { return nil , nil } s := & mongoAttributesSparsePacketReport { } if o . ID != nil { s . ID = bson . ObjectIdHex ( * o . ID ) } if o . TCPFlags != nil { s . TCPFlags = o . TCPFlags } if o . Claims != nil { s . Claims = o . Claims } if o . DestinationIP != nil { s . DestinationIP = o . DestinationIP } if o . DestinationPort != nil { s . DestinationPort = o . DestinationPort } if o . DropReason != nil { s . DropReason = o . DropReason } if o . Encrypt != nil { s . Encrypt = o . Encrypt } if o . EnforcerID != nil { s . EnforcerID = o . EnforcerID } if o . EnforcerNamespace != nil { s . EnforcerNamespace = o . EnforcerNamespace } if o . Event != nil { s . Event = o . Event } if o . Length != nil { s . Length = o . Length } if o . Mark != nil { s . Mark = o . Mark } if o . MigrationsLog != nil { s . MigrationsLog = o . MigrationsLog } if o . Namespace != nil { s . Namespace = o . Namespace } if o . PacketID != nil { s . PacketID = o . PacketID } if o . Protocol != nil { s . Protocol = o . Protocol } if o . PuID != nil { s . PuID = o . PuID } if o . RawPacket != nil { s . RawPacket = o . RawPacket } if o . SourceIP != nil { s . SourceIP = o . SourceIP } if o . SourcePort != nil { s . SourcePort = o . SourcePort } if o . Timestamp != nil { s . Timestamp = o . Timestamp } if o . TriremePacket != nil { s . TriremePacket = o . TriremePacket } 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 .