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

	if o == nil {
		return nil
	}

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

	o.VPCAttached = s.VPCAttached
	o.VPCAttachments = s.VPCAttachments
	o.AssociatedRouteTables = s.AssociatedRouteTables
	o.AttachedInterfaces = s.AttachedInterfaces
	o.ForwardingEnabled = s.ForwardingEnabled
	o.HasPublicIP = s.HasPublicIP
	o.ImageID = s.ImageID
	o.ProductInfo = s.ProductInfo
	o.ServiceName = s.ServiceName
	o.ServiceType = s.ServiceType
	o.Type = s.Type

	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 *CloudEndpointData) SetBSON(raw bson.Raw) error {
	if o == nil {
		return nil
	}
	s := &mongoAttributesCloudEndpointData{}
	if err := raw.Unmarshal(s); err != nil {
		return err
	}
	o.VPCAttached = s.VPCAttached
	o.VPCAttachments = s.VPCAttachments
	o.AssociatedRouteTables = s.AssociatedRouteTables
	o.AttachedInterfaces = s.AttachedInterfaces
	o.ForwardingEnabled = s.ForwardingEnabled
	o.HasPublicIP = s.HasPublicIP
	o.ImageID = s.ImageID
	o.ProductInfo = s.ProductInfo
	o.ServiceName = s.ServiceName
	o.ServiceType = s.ServiceType
	o.Type = s.Type
	return nil
}
func ( o * CloudEndpointData ) SetBSON ( raw bson . Raw ) error { if o == nil { return nil } s := & mongoAttributesCloudEndpointData { } if err := raw . Unmarshal ( s ) ; err != nil { return err } o . VPCAttached = s . VPCAttached o . VPCAttachments = s . VPCAttachments o . AssociatedRouteTables = s . AssociatedRouteTables o . AttachedInterfaces = s . AttachedInterfaces o . ForwardingEnabled = s . ForwardingEnabled o . HasPublicIP = s . HasPublicIP o . ImageID = s . ImageID o . ProductInfo = s . ProductInfo o . ServiceName = s . ServiceName o . ServiceType = s . ServiceType o . Type = s . Type return nil }
SetBSON implements the bson marshaling interface.
SetBSON implements the bson marshaling interface .