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

	if o == nil {
		return nil
	}

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

	o.Action = s.Action
	o.Networks = s.Networks
	o.Object = s.Object
	o.Priority = s.Priority
	o.ProtocolPorts = s.ProtocolPorts
	o.StoredNetworks = s.StoredNetworks

	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 *CloudNetworkRule) SetBSON(raw bson.Raw) error {
	if o == nil {
		return nil
	}
	s := &mongoAttributesCloudNetworkRule{}
	if err := raw.Unmarshal(s); err != nil {
		return err
	}
	o.Action = s.Action
	o.Networks = s.Networks
	o.Object = s.Object
	o.Priority = s.Priority
	o.ProtocolPorts = s.ProtocolPorts
	o.StoredNetworks = s.StoredNetworks
	return nil
}
func ( o * CloudNetworkRule ) SetBSON ( raw bson . Raw ) error { if o == nil { return nil } s := & mongoAttributesCloudNetworkRule { } if err := raw . Unmarshal ( s ) ; err != nil { return err } o . Action = s . Action o . Networks = s . Networks o . Object = s . Object o . Priority = s . Priority o . ProtocolPorts = s . ProtocolPorts o . StoredNetworks = s . StoredNetworks return nil }
SetBSON implements the bson marshaling interface.
SetBSON implements the bson marshaling interface .