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

	if o == nil {
		return nil
	}

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

	o.DestinationIPv4CIDR = s.DestinationIPv4CIDR
	o.DestinationIPv6CIDR = s.DestinationIPv6CIDR
	o.DestinationPrefixListID = s.DestinationPrefixListID
	o.NextHopID = s.NextHopID
	o.NextHopType = s.NextHopType
	o.StoredDestinationIPv4CIDR = s.StoredDestinationIPv4CIDR
	o.StoredDestinationIPv6CIDR = s.StoredDestinationIPv6CIDR

	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 *CloudRoute) SetBSON(raw bson.Raw) error {
	if o == nil {
		return nil
	}
	s := &mongoAttributesCloudRoute{}
	if err := raw.Unmarshal(s); err != nil {
		return err
	}
	o.DestinationIPv4CIDR = s.DestinationIPv4CIDR
	o.DestinationIPv6CIDR = s.DestinationIPv6CIDR
	o.DestinationPrefixListID = s.DestinationPrefixListID
	o.NextHopID = s.NextHopID
	o.NextHopType = s.NextHopType
	o.StoredDestinationIPv4CIDR = s.StoredDestinationIPv4CIDR
	o.StoredDestinationIPv6CIDR = s.StoredDestinationIPv6CIDR
	return nil
}
func ( o * CloudRoute ) SetBSON ( raw bson . Raw ) error { if o == nil { return nil } s := & mongoAttributesCloudRoute { } if err := raw . Unmarshal ( s ) ; err != nil { return err } o . DestinationIPv4CIDR = s . DestinationIPv4CIDR o . DestinationIPv6CIDR = s . DestinationIPv6CIDR o . DestinationPrefixListID = s . DestinationPrefixListID o . NextHopID = s . NextHopID o . NextHopType = s . NextHopType o . StoredDestinationIPv4CIDR = s . StoredDestinationIPv4CIDR o . StoredDestinationIPv6CIDR = s . StoredDestinationIPv6CIDR return nil }
SetBSON implements the bson marshaling interface.
SetBSON implements the bson marshaling interface .