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

	if o == nil {
		return nil
	}

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

	id := s.ID.Hex()
	o.ID = &id
	if s.Count != nil {
		o.Count = s.Count
	}
	if s.Namespace != nil {
		o.Namespace = s.Namespace
	}
	if s.Value != nil {
		o.Value = s.Value
	}

	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 *SparseTag) SetBSON(raw bson.Raw) error {
	if o == nil {
		return nil
	}
	s := &mongoAttributesSparseTag{}
	if err := raw.Unmarshal(s); err != nil {
		return err
	}
	id := s.ID.Hex()
	o.ID = &id
	if s.Count != nil {
		o.Count = s.Count
	}
	if s.Namespace != nil {
		o.Namespace = s.Namespace
	}
	if s.Value != nil {
		o.Value = s.Value
	}
	return nil
}
func ( o * SparseTag ) SetBSON ( raw bson . Raw ) error { if o == nil { return nil } s := & mongoAttributesSparseTag { } if err := raw . Unmarshal ( s ) ; err != nil { return err } id := s . ID . Hex ( ) o . ID = & id if s . Count != nil { o . Count = s . Count } if s . Namespace != nil { o . Namespace = s . Namespace } if s . Value != nil { o . Value = s . Value } return nil }
SetBSON implements the bson marshaling interface.
SetBSON implements the bson marshaling interface .