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

	if o == nil {
		return nil
	}

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

	if s.ACLPolicyAction != nil {
		o.ACLPolicyAction = s.ACLPolicyAction
	}
	if s.ACLPolicyID != nil {
		o.ACLPolicyID = s.ACLPolicyID
	}
	id := s.ID.Hex()
	o.ID = &id
	if s.RTT != nil {
		o.RTT = s.RTT
	}
	if s.ApplicationListening != nil {
		o.ApplicationListening = s.ApplicationListening
	}
	if s.Claims != nil {
		o.Claims = s.Claims
	}
	if s.ClaimsType != nil {
		o.ClaimsType = s.ClaimsType
	}
	if s.CreateTime != nil {
		o.CreateTime = s.CreateTime
	}
	if s.EnforcerID != nil {
		o.EnforcerID = s.EnforcerID
	}
	if s.EnforcerNamespace != nil {
		o.EnforcerNamespace = s.EnforcerNamespace
	}
	if s.EnforcerVersion != nil {
		o.EnforcerVersion = s.EnforcerVersion
	}
	if s.Error != nil {
		o.Error = s.Error
	}
	if s.ExcludedNetworks != nil {
		o.ExcludedNetworks = s.ExcludedNetworks
	}
	if s.FourTuple != nil {
		o.FourTuple = s.FourTuple
	}
	if s.IsServer != nil {
		o.IsServer = s.IsServer
	}
	if s.IterationIndex != nil {
		o.IterationIndex = s.IterationIndex
	}
	if s.MigrationsLog != nil {
		o.MigrationsLog = s.MigrationsLog
	}
	if s.Namespace != nil {
		o.Namespace = s.Namespace
	}
	if s.PayloadSize != nil {
		o.PayloadSize = s.PayloadSize
	}
	if s.PayloadSizeType != nil {
		o.PayloadSizeType = s.PayloadSizeType
	}
	if s.PeerCertExpiry != nil {
		o.PeerCertExpiry = s.PeerCertExpiry
	}
	if s.PeerCertIssuer != nil {
		o.PeerCertIssuer = s.PeerCertIssuer
	}
	if s.PeerCertSubject != nil {
		o.PeerCertSubject = s.PeerCertSubject
	}
	if s.PingID != nil {
		o.PingID = s.PingID
	}
	if s.PolicyAction != nil {
		o.PolicyAction = s.PolicyAction
	}
	if s.PolicyID != nil {
		o.PolicyID = s.PolicyID
	}
	if s.PolicyNamespace != nil {
		o.PolicyNamespace = s.PolicyNamespace
	}
	if s.ProcessingUnitID != nil {
		o.ProcessingUnitID = s.ProcessingUnitID
	}
	if s.Protocol != nil {
		o.Protocol = s.Protocol
	}
	if s.RemoteController != nil {
		o.RemoteController = s.RemoteController
	}
	if s.RemoteEndpointType != nil {
		o.RemoteEndpointType = s.RemoteEndpointType
	}
	if s.RemoteNamespace != nil {
		o.RemoteNamespace = s.RemoteNamespace
	}
	if s.RemoteNamespaceType != nil {
		o.RemoteNamespaceType = s.RemoteNamespaceType
	}
	if s.RemoteProcessingUnitID != nil {
		o.RemoteProcessingUnitID = s.RemoteProcessingUnitID
	}
	if s.SeqNum != nil {
		o.SeqNum = s.SeqNum
	}
	if s.ServiceID != nil {
		o.ServiceID = s.ServiceID
	}
	if s.ServiceType != nil {
		o.ServiceType = s.ServiceType
	}
	if s.TargetTCPNetworks != nil {
		o.TargetTCPNetworks = s.TargetTCPNetworks
	}
	if s.Type != nil {
		o.Type = s.Type
	}
	if s.UpdateTime != nil {
		o.UpdateTime = s.UpdateTime
	}
	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 *SparsePingProbe) SetBSON(raw bson.Raw) error {
	if o == nil {
		return nil
	}
	s := &mongoAttributesSparsePingProbe{}
	if err := raw.Unmarshal(s); err != nil {
		return err
	}
	if s.ACLPolicyAction != nil {
		o.ACLPolicyAction = s.ACLPolicyAction
	}
	if s.ACLPolicyID != nil {
		o.ACLPolicyID = s.ACLPolicyID
	}
	id := s.ID.Hex()
	o.ID = &id
	if s.RTT != nil {
		o.RTT = s.RTT
	}
	if s.ApplicationListening != nil {
		o.ApplicationListening = s.ApplicationListening
	}
	if s.Claims != nil {
		o.Claims = s.Claims
	}
	if s.ClaimsType != nil {
		o.ClaimsType = s.ClaimsType
	}
	if s.CreateTime != nil {
		o.CreateTime = s.CreateTime
	}
	if s.EnforcerID != nil {
		o.EnforcerID = s.EnforcerID
	}
	if s.EnforcerNamespace != nil {
		o.EnforcerNamespace = s.EnforcerNamespace
	}
	if s.EnforcerVersion != nil {
		o.EnforcerVersion = s.EnforcerVersion
	}
	if s.Error != nil {
		o.Error = s.Error
	}
	if s.ExcludedNetworks != nil {
		o.ExcludedNetworks = s.ExcludedNetworks
	}
	if s.FourTuple != nil {
		o.FourTuple = s.FourTuple
	}
	if s.IsServer != nil {
		o.IsServer = s.IsServer
	}
	if s.IterationIndex != nil {
		o.IterationIndex = s.IterationIndex
	}
	if s.MigrationsLog != nil {
		o.MigrationsLog = s.MigrationsLog
	}
	if s.Namespace != nil {
		o.Namespace = s.Namespace
	}
	if s.PayloadSize != nil {
		o.PayloadSize = s.PayloadSize
	}
	if s.PayloadSizeType != nil {
		o.PayloadSizeType = s.PayloadSizeType
	}
	if s.PeerCertExpiry != nil {
		o.PeerCertExpiry = s.PeerCertExpiry
	}
	if s.PeerCertIssuer != nil {
		o.PeerCertIssuer = s.PeerCertIssuer
	}
	if s.PeerCertSubject != nil {
		o.PeerCertSubject = s.PeerCertSubject
	}
	if s.PingID != nil {
		o.PingID = s.PingID
	}
	if s.PolicyAction != nil {
		o.PolicyAction = s.PolicyAction
	}
	if s.PolicyID != nil {
		o.PolicyID = s.PolicyID
	}
	if s.PolicyNamespace != nil {
		o.PolicyNamespace = s.PolicyNamespace
	}
	if s.ProcessingUnitID != nil {
		o.ProcessingUnitID = s.ProcessingUnitID
	}
	if s.Protocol != nil {
		o.Protocol = s.Protocol
	}
	if s.RemoteController != nil {
		o.RemoteController = s.RemoteController
	}
	if s.RemoteEndpointType != nil {
		o.RemoteEndpointType = s.RemoteEndpointType
	}
	if s.RemoteNamespace != nil {
		o.RemoteNamespace = s.RemoteNamespace
	}
	if s.RemoteNamespaceType != nil {
		o.RemoteNamespaceType = s.RemoteNamespaceType
	}
	if s.RemoteProcessingUnitID != nil {
		o.RemoteProcessingUnitID = s.RemoteProcessingUnitID
	}
	if s.SeqNum != nil {
		o.SeqNum = s.SeqNum
	}
	if s.ServiceID != nil {
		o.ServiceID = s.ServiceID
	}
	if s.ServiceType != nil {
		o.ServiceType = s.ServiceType
	}
	if s.TargetTCPNetworks != nil {
		o.TargetTCPNetworks = s.TargetTCPNetworks
	}
	if s.Type != nil {
		o.Type = s.Type
	}
	if s.UpdateTime != nil {
		o.UpdateTime = s.UpdateTime
	}
	if s.ZHash != nil {
		o.ZHash = s.ZHash
	}
	if s.Zone != nil {
		o.Zone = s.Zone
	}
	return nil
}
func ( o * SparsePingProbe ) SetBSON ( raw bson . Raw ) error { if o == nil { return nil } s := & mongoAttributesSparsePingProbe { } if err := raw . Unmarshal ( s ) ; err != nil { return err } if s . ACLPolicyAction != nil { o . ACLPolicyAction = s . ACLPolicyAction } if s . ACLPolicyID != nil { o . ACLPolicyID = s . ACLPolicyID } id := s . ID . Hex ( ) o . ID = & id if s . RTT != nil { o . RTT = s . RTT } if s . ApplicationListening != nil { o . ApplicationListening = s . ApplicationListening } if s . Claims != nil { o . Claims = s . Claims } if s . ClaimsType != nil { o . ClaimsType = s . ClaimsType } if s . CreateTime != nil { o . CreateTime = s . CreateTime } if s . EnforcerID != nil { o . EnforcerID = s . EnforcerID } if s . EnforcerNamespace != nil { o . EnforcerNamespace = s . EnforcerNamespace } if s . EnforcerVersion != nil { o . EnforcerVersion = s . EnforcerVersion } if s . Error != nil { o . Error = s . Error } if s . ExcludedNetworks != nil { o . ExcludedNetworks = s . ExcludedNetworks } if s . FourTuple != nil { o . FourTuple = s . FourTuple } if s . IsServer != nil { o . IsServer = s . IsServer } if s . IterationIndex != nil { o . IterationIndex = s . IterationIndex } if s . MigrationsLog != nil { o . MigrationsLog = s . MigrationsLog } if s . Namespace != nil { o . Namespace = s . Namespace } if s . PayloadSize != nil { o . PayloadSize = s . PayloadSize } if s . PayloadSizeType != nil { o . PayloadSizeType = s . PayloadSizeType } if s . PeerCertExpiry != nil { o . PeerCertExpiry = s . PeerCertExpiry } if s . PeerCertIssuer != nil { o . PeerCertIssuer = s . PeerCertIssuer } if s . PeerCertSubject != nil { o . PeerCertSubject = s . PeerCertSubject } if s . PingID != nil { o . PingID = s . PingID } if s . PolicyAction != nil { o . PolicyAction = s . PolicyAction } if s . PolicyID != nil { o . PolicyID = s . PolicyID } if s . PolicyNamespace != nil { o . PolicyNamespace = s . PolicyNamespace } if s . ProcessingUnitID != nil { o . ProcessingUnitID = s . ProcessingUnitID } if s . Protocol != nil { o . Protocol = s . Protocol } if s . RemoteController != nil { o . RemoteController = s . RemoteController } if s . RemoteEndpointType != nil { o . RemoteEndpointType = s . RemoteEndpointType } if s . RemoteNamespace != nil { o . RemoteNamespace = s . RemoteNamespace } if s . RemoteNamespaceType != nil { o . RemoteNamespaceType = s . RemoteNamespaceType } if s . RemoteProcessingUnitID != nil { o . RemoteProcessingUnitID = s . RemoteProcessingUnitID } if s . SeqNum != nil { o . SeqNum = s . SeqNum } if s . ServiceID != nil { o . ServiceID = s . ServiceID } if s . ServiceType != nil { o . ServiceType = s . ServiceType } if s . TargetTCPNetworks != nil { o . TargetTCPNetworks = s . TargetTCPNetworks } if s . Type != nil { o . Type = s . Type } if s . UpdateTime != nil { o . UpdateTime = s . UpdateTime } 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 .