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

	if o == nil {
		return nil, nil
	}

	s := &mongoAttributesSparseCachedFlowReport{}

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