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

	if o == nil {
		return nil
	}

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

	id := s.ID.Hex()
	o.ID = &id
	if s.CreateTime != nil {
		o.CreateTime = s.CreateTime
	}
	if s.Errors != nil {
		o.Errors = s.Errors
	}
	if s.MigrationsLog != nil {
		o.MigrationsLog = s.MigrationsLog
	}
	if s.Namespace != nil {
		o.Namespace = s.Namespace
	}
	if s.PingID != nil {
		o.PingID = s.PingID
	}
	if s.PingPairs != nil {
		o.PingPairs = s.PingPairs
	}
	if s.RefreshID != nil {
		o.RefreshID = s.RefreshID
	}
	if s.RemoteProbes != nil {
		o.RemoteProbes = s.RemoteProbes
	}
	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 *SparsePingResult) SetBSON(raw bson.Raw) error {
	if o == nil {
		return nil
	}
	s := &mongoAttributesSparsePingResult{}
	if err := raw.Unmarshal(s); err != nil {
		return err
	}
	id := s.ID.Hex()
	o.ID = &id
	if s.CreateTime != nil {
		o.CreateTime = s.CreateTime
	}
	if s.Errors != nil {
		o.Errors = s.Errors
	}
	if s.MigrationsLog != nil {
		o.MigrationsLog = s.MigrationsLog
	}
	if s.Namespace != nil {
		o.Namespace = s.Namespace
	}
	if s.PingID != nil {
		o.PingID = s.PingID
	}
	if s.PingPairs != nil {
		o.PingPairs = s.PingPairs
	}
	if s.RefreshID != nil {
		o.RefreshID = s.RefreshID
	}
	if s.RemoteProbes != nil {
		o.RemoteProbes = s.RemoteProbes
	}
	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 * SparsePingResult ) SetBSON ( raw bson . Raw ) error { if o == nil { return nil } s := & mongoAttributesSparsePingResult { } if err := raw . Unmarshal ( s ) ; err != nil { return err } id := s . ID . Hex ( ) o . ID = & id if s . CreateTime != nil { o . CreateTime = s . CreateTime } if s . Errors != nil { o . Errors = s . Errors } if s . MigrationsLog != nil { o . MigrationsLog = s . MigrationsLog } if s . Namespace != nil { o . Namespace = s . Namespace } if s . PingID != nil { o . PingID = s . PingID } if s . PingPairs != nil { o . PingPairs = s . PingPairs } if s . RefreshID != nil { o . RefreshID = s . RefreshID } if s . RemoteProbes != nil { o . RemoteProbes = s . RemoteProbes } 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 .