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

	if o == nil {
		return nil
	}

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

	o.ID = s.ID.Hex()
	o.Action = s.Action
	o.DestinationController = s.DestinationController
	o.DestinationID = s.DestinationID
	o.DestinationIP = s.DestinationIP
	o.DestinationNamespace = s.DestinationNamespace
	o.DestinationPlatform = s.DestinationPlatform
	o.DestinationPort = s.DestinationPort
	o.DestinationType = s.DestinationType
	o.DropReason = s.DropReason
	o.Encrypted = s.Encrypted
	o.EnforcerID = s.EnforcerID
	o.IsLocalDestinationID = s.IsLocalDestinationID
	o.IsLocalSourceID = s.IsLocalSourceID
	o.MigrationsLog = s.MigrationsLog
	o.Namespace = s.Namespace
	o.Observed = s.Observed
	o.ObservedAction = s.ObservedAction
	o.ObservedDropReason = s.ObservedDropReason
	o.ObservedEncrypted = s.ObservedEncrypted
	o.ObservedPolicyID = s.ObservedPolicyID
	o.ObservedPolicyNamespace = s.ObservedPolicyNamespace
	o.PolicyID = s.PolicyID
	o.PolicyNamespace = s.PolicyNamespace
	o.Protocol = s.Protocol
	o.RemoteNamespace = s.RemoteNamespace
	o.RuleName = s.RuleName
	o.ServiceClaimHash = s.ServiceClaimHash
	o.ServiceID = s.ServiceID
	o.ServiceNamespace = s.ServiceNamespace
	o.ServiceType = s.ServiceType
	o.ServiceURL = s.ServiceURL
	o.SourceController = s.SourceController
	o.SourceID = s.SourceID
	o.SourceIP = s.SourceIP
	o.SourceNamespace = s.SourceNamespace
	o.SourcePlatform = s.SourcePlatform
	o.SourceType = s.SourceType
	o.Timestamp = s.Timestamp
	o.Value = s.Value
	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 *CachedFlowReport) SetBSON(raw bson.Raw) error {
	if o == nil {
		return nil
	}
	s := &mongoAttributesCachedFlowReport{}
	if err := raw.Unmarshal(s); err != nil {
		return err
	}
	o.ID = s.ID.Hex()
	o.Action = s.Action
	o.DestinationController = s.DestinationController
	o.DestinationID = s.DestinationID
	o.DestinationIP = s.DestinationIP
	o.DestinationNamespace = s.DestinationNamespace
	o.DestinationPlatform = s.DestinationPlatform
	o.DestinationPort = s.DestinationPort
	o.DestinationType = s.DestinationType
	o.DropReason = s.DropReason
	o.Encrypted = s.Encrypted
	o.EnforcerID = s.EnforcerID
	o.IsLocalDestinationID = s.IsLocalDestinationID
	o.IsLocalSourceID = s.IsLocalSourceID
	o.MigrationsLog = s.MigrationsLog
	o.Namespace = s.Namespace
	o.Observed = s.Observed
	o.ObservedAction = s.ObservedAction
	o.ObservedDropReason = s.ObservedDropReason
	o.ObservedEncrypted = s.ObservedEncrypted
	o.ObservedPolicyID = s.ObservedPolicyID
	o.ObservedPolicyNamespace = s.ObservedPolicyNamespace
	o.PolicyID = s.PolicyID
	o.PolicyNamespace = s.PolicyNamespace
	o.Protocol = s.Protocol
	o.RemoteNamespace = s.RemoteNamespace
	o.RuleName = s.RuleName
	o.ServiceClaimHash = s.ServiceClaimHash
	o.ServiceID = s.ServiceID
	o.ServiceNamespace = s.ServiceNamespace
	o.ServiceType = s.ServiceType
	o.ServiceURL = s.ServiceURL
	o.SourceController = s.SourceController
	o.SourceID = s.SourceID
	o.SourceIP = s.SourceIP
	o.SourceNamespace = s.SourceNamespace
	o.SourcePlatform = s.SourcePlatform
	o.SourceType = s.SourceType
	o.Timestamp = s.Timestamp
	o.Value = s.Value
	o.ZHash = s.ZHash
	o.Zone = s.Zone
	return nil
}
func ( o * CachedFlowReport ) SetBSON ( raw bson . Raw ) error { if o == nil { return nil } s := & mongoAttributesCachedFlowReport { } if err := raw . Unmarshal ( s ) ; err != nil { return err } o . ID = s . ID . Hex ( ) o . Action = s . Action o . DestinationController = s . DestinationController o . DestinationID = s . DestinationID o . DestinationIP = s . DestinationIP o . DestinationNamespace = s . DestinationNamespace o . DestinationPlatform = s . DestinationPlatform o . DestinationPort = s . DestinationPort o . DestinationType = s . DestinationType o . DropReason = s . DropReason o . Encrypted = s . Encrypted o . EnforcerID = s . EnforcerID o . IsLocalDestinationID = s . IsLocalDestinationID o . IsLocalSourceID = s . IsLocalSourceID o . MigrationsLog = s . MigrationsLog o . Namespace = s . Namespace o . Observed = s . Observed o . ObservedAction = s . ObservedAction o . ObservedDropReason = s . ObservedDropReason o . ObservedEncrypted = s . ObservedEncrypted o . ObservedPolicyID = s . ObservedPolicyID o . ObservedPolicyNamespace = s . ObservedPolicyNamespace o . PolicyID = s . PolicyID o . PolicyNamespace = s . PolicyNamespace o . Protocol = s . Protocol o . RemoteNamespace = s . RemoteNamespace o . RuleName = s . RuleName o . ServiceClaimHash = s . ServiceClaimHash o . ServiceID = s . ServiceID o . ServiceNamespace = s . ServiceNamespace o . ServiceType = s . ServiceType o . ServiceURL = s . ServiceURL o . SourceController = s . SourceController o . SourceID = s . SourceID o . SourceIP = s . SourceIP o . SourceNamespace = s . SourceNamespace o . SourcePlatform = s . SourcePlatform o . SourceType = s . SourceType o . Timestamp = s . Timestamp o . Value = s . Value o . ZHash = s . ZHash o . Zone = s . Zone return nil }
SetBSON implements the bson marshaling interface.
SetBSON implements the bson marshaling interface .