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

	if o == nil {
		return nil
	}

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

	o.ID = s.ID.Hex()
	o.Annotations = s.Annotations
	o.AssociatedTags = s.AssociatedTags
	o.CreateIdempotencyKey = s.CreateIdempotencyKey
	o.CreateTime = s.CreateTime
	o.EnableNetEffectivePermissions = s.EnableNetEffectivePermissions
	o.EnableNetworkSecurity = s.EnableNetworkSecurity
	o.MigrationsLog = s.MigrationsLog
	o.Namespace = s.Namespace
	o.NormalizedTags = s.NormalizedTags
	o.PrismaID = s.PrismaID
	o.Protected = s.Protected
	o.UpdateIdempotencyKey = s.UpdateIdempotencyKey
	o.UpdateTime = s.UpdateTime
	o.ZHash = s.ZHash
	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 *CNSConfig) SetBSON(raw bson.Raw) error {
	if o == nil {
		return nil
	}
	s := &mongoAttributesCNSConfig{}
	if err := raw.Unmarshal(s); err != nil {
		return err
	}
	o.ID = s.ID.Hex()
	o.Annotations = s.Annotations
	o.AssociatedTags = s.AssociatedTags
	o.CreateIdempotencyKey = s.CreateIdempotencyKey
	o.CreateTime = s.CreateTime
	o.EnableNetEffectivePermissions = s.EnableNetEffectivePermissions
	o.EnableNetworkSecurity = s.EnableNetworkSecurity
	o.MigrationsLog = s.MigrationsLog
	o.Namespace = s.Namespace
	o.NormalizedTags = s.NormalizedTags
	o.PrismaID = s.PrismaID
	o.Protected = s.Protected
	o.UpdateIdempotencyKey = s.UpdateIdempotencyKey
	o.UpdateTime = s.UpdateTime
	o.ZHash = s.ZHash
	o.Zone = s.Zone
	return nil
}
func ( o * CNSConfig ) SetBSON ( raw bson . Raw ) error { if o == nil { return nil } s := & mongoAttributesCNSConfig { } if err := raw . Unmarshal ( s ) ; err != nil { return err } o . ID = s . ID . Hex ( ) o . Annotations = s . Annotations o . AssociatedTags = s . AssociatedTags o . CreateIdempotencyKey = s . CreateIdempotencyKey o . CreateTime = s . CreateTime o . EnableNetEffectivePermissions = s . EnableNetEffectivePermissions o . EnableNetworkSecurity = s . EnableNetworkSecurity o . MigrationsLog = s . MigrationsLog o . Namespace = s . Namespace o . NormalizedTags = s . NormalizedTags o . PrismaID = s . PrismaID o . Protected = s . Protected o . UpdateIdempotencyKey = s . UpdateIdempotencyKey o . UpdateTime = s . UpdateTime o . ZHash = s . ZHash o . Zone = s . Zone return nil }
SetBSON implements the bson marshaling interface.
SetBSON implements the bson marshaling interface .