func (bd *BundleData) SetBSON(raw bson.Raw) error {
	// TODO(wallyworld) - bson deserialisation is not handling the inline directive,
	// so we need to unmarshal the bundle data manually.
	var b *noMethodsBundleData
	if err := raw.Unmarshal(&b); err != nil {
		return err
	}
	if b == nil {
		return bson.SetZero
	}

	var bdc legacyBundleData
	if err := raw.Unmarshal(&bdc); err != nil {
		return err
	}
	// As per the above TODO, we manually set the inline data.
	bdc.noMethodsBundleData = *b
	return bdc.setBundleData(bd)
}
// SetBSON implements the bson.Setter interface.
SetBSON implements the bson.Setter interface.
// SetBSON implements the bson . Setter interface .
func (bd *BundleData) SetBSON(raw bson.Raw) error {
	var b *noMethodsBundleData
	if err := raw.Unmarshal(&b); err != nil {
		return err
	}
	if b == nil {
		return bson.SetZero
	}
	var bdc legacyBundleData
	if err := raw.Unmarshal(&bdc); err != nil {
		return err
	}
	bdc.noMethodsBundleData = *b
	return bdc.setBundleData(bd)
}
func ( bd * BundleData ) SetBSON ( raw bson . Raw ) error { var b * noMethodsBundleData if err := raw . Unmarshal ( & b ) ; err != nil { return err } if b == nil { return bson . SetZero } var bdc legacyBundleData if err := raw . Unmarshal ( & bdc ) ; err != nil { return err } bdc . noMethodsBundleData = * b return bdc . setBundleData ( bd ) }
SetBSON implements the bson.Setter interface.
SetBSON implements the bson . Setter interface .
// TODO(wallyworld) - bson deserialisation is not handling the inline directive, // so we need to unmarshal the bundle data manually. // As per the above TODO, we manually set the inline data.