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

	if o == nil {
		return nil
	}

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

	o.ID = s.ID.Hex()
	o.TCPFlags = s.TCPFlags
	o.Claims = s.Claims
	o.DestinationIP = s.DestinationIP
	o.DestinationPort = s.DestinationPort
	o.DropReason = s.DropReason
	o.Encrypt = s.Encrypt
	o.EnforcerID = s.EnforcerID
	o.EnforcerNamespace = s.EnforcerNamespace
	o.Event = s.Event
	o.Length = s.Length
	o.Mark = s.Mark
	o.MigrationsLog = s.MigrationsLog
	o.Namespace = s.Namespace
	o.PacketID = s.PacketID
	o.Protocol = s.Protocol
	o.PuID = s.PuID
	o.RawPacket = s.RawPacket
	o.SourceIP = s.SourceIP
	o.SourcePort = s.SourcePort
	o.Timestamp = s.Timestamp
	o.TriremePacket = s.TriremePacket
	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 *PacketReport) SetBSON(raw bson.Raw) error {
	if o == nil {
		return nil
	}
	s := &mongoAttributesPacketReport{}
	if err := raw.Unmarshal(s); err != nil {
		return err
	}
	o.ID = s.ID.Hex()
	o.TCPFlags = s.TCPFlags
	o.Claims = s.Claims
	o.DestinationIP = s.DestinationIP
	o.DestinationPort = s.DestinationPort
	o.DropReason = s.DropReason
	o.Encrypt = s.Encrypt
	o.EnforcerID = s.EnforcerID
	o.EnforcerNamespace = s.EnforcerNamespace
	o.Event = s.Event
	o.Length = s.Length
	o.Mark = s.Mark
	o.MigrationsLog = s.MigrationsLog
	o.Namespace = s.Namespace
	o.PacketID = s.PacketID
	o.Protocol = s.Protocol
	o.PuID = s.PuID
	o.RawPacket = s.RawPacket
	o.SourceIP = s.SourceIP
	o.SourcePort = s.SourcePort
	o.Timestamp = s.Timestamp
	o.TriremePacket = s.TriremePacket
	o.ZHash = s.ZHash
	o.Zone = s.Zone
	return nil
}
func ( o * PacketReport ) SetBSON ( raw bson . Raw ) error { if o == nil { return nil } s := & mongoAttributesPacketReport { } if err := raw . Unmarshal ( s ) ; err != nil { return err } o . ID = s . ID . Hex ( ) o . TCPFlags = s . TCPFlags o . Claims = s . Claims o . DestinationIP = s . DestinationIP o . DestinationPort = s . DestinationPort o . DropReason = s . DropReason o . Encrypt = s . Encrypt o . EnforcerID = s . EnforcerID o . EnforcerNamespace = s . EnforcerNamespace o . Event = s . Event o . Length = s . Length o . Mark = s . Mark o . MigrationsLog = s . MigrationsLog o . Namespace = s . Namespace o . PacketID = s . PacketID o . Protocol = s . Protocol o . PuID = s . PuID o . RawPacket = s . RawPacket o . SourceIP = s . SourceIP o . SourcePort = s . SourcePort o . Timestamp = s . Timestamp o . TriremePacket = s . TriremePacket o . ZHash = s . ZHash o . Zone = s . Zone return nil }
SetBSON implements the bson marshaling interface.
SetBSON implements the bson marshaling interface .