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

	if o == nil {
		return nil
	}

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

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