func ConvertIteration(request *goa.RequestData, itr iteration.Iteration, additional ...IterationConvertFunc) *app.Iteration {
	iterationType := iteration.APIStringTypeIteration
	spaceID := itr.SpaceID.String()
	selfURL := rest.AbsoluteURL(request, app.IterationHref(itr.ID))
	spaceSelfURL := rest.AbsoluteURL(request, app.SpaceHref(spaceID))
	workitemsRelatedURL := rest.AbsoluteURL(request, app.WorkitemHref(spaceID, "?filter[iteration]="+itr.ID.String()))
	pathToTopMostParent := itr.Path.String()
	i := &app.Iteration{
		Type: iterationType,
		ID:   &itr.ID,
		Attributes: &app.IterationAttributes{
			Name:        &itr.Name,
			CreatedAt:   &itr.CreatedAt,
			UpdatedAt:   &itr.UpdatedAt,
			StartAt:     itr.StartAt,
			EndAt:       itr.EndAt,
			Description: itr.Description,
			State:       &itr.State,
			ParentPath:  &pathToTopMostParent,
		},
		Relationships: &app.IterationRelations{
			Space: &app.RelationGeneric{
				Data: &app.GenericData{
					Type: &space.SpaceType,
					ID:   &spaceID,
				},
				Links: &app.GenericLinks{
					Self: &spaceSelfURL,
				},
			},
			Workitems: &app.RelationGeneric{
				Links: &app.GenericLinks{
					Related: &workitemsRelatedURL,
				},
			},
		},
		Links: &app.GenericLinks{
			Self: &selfURL,
		},
	}
	if itr.Path.IsEmpty() == false {
		parentID := itr.Path.This().String()
		parentSelfURL := rest.AbsoluteURL(request, app.IterationHref(parentID))
		i.Relationships.Parent = &app.RelationGeneric{
			Data: &app.GenericData{
				Type: &iterationType,
				ID:   &parentID,
			},
			Links: &app.GenericLinks{
				Self: &parentSelfURL,
			},
		}
	}
	for _, add := range additional {
		add(request, &itr, i)
	}
	return i
}
// ConvertIteration converts between internal and external REST representation
ConvertIteration converts between internal and external REST representation
// ConvertIteration converts between internal and external REST representation
func ConvertIteration(request *goa.RequestData, itr iteration.Iteration, additional ...IterationConvertFunc) *app.Iteration {
	iterationType := iteration.APIStringTypeIteration
	spaceID := itr.SpaceID.String()
	selfURL := rest.AbsoluteURL(request, app.IterationHref(itr.ID))
	spaceSelfURL := rest.AbsoluteURL(request, app.SpaceHref(spaceID))
	workitemsRelatedURL := rest.AbsoluteURL(request, app.WorkitemHref(spaceID, "?filter[iteration]="+itr.ID.String()))
	pathToTopMostParent := itr.Path.String()
	i := &app.Iteration{
		Type: iterationType,
		ID:   &itr.ID,
		Attributes: &app.IterationAttributes{
			Name:        &itr.Name,
			CreatedAt:   &itr.CreatedAt,
			UpdatedAt:   &itr.UpdatedAt,
			StartAt:     itr.StartAt,
			EndAt:       itr.EndAt,
			Description: itr.Description,
			State:       &itr.State,
			ParentPath:  &pathToTopMostParent,
		},
		Relationships: &app.IterationRelations{
			Space: &app.RelationGeneric{
				Data: &app.GenericData{
					Type: &space.SpaceType,
					ID:   &spaceID,
				},
				Links: &app.GenericLinks{
					Self: &spaceSelfURL,
				},
			},
			Workitems: &app.RelationGeneric{
				Links: &app.GenericLinks{
					Related: &workitemsRelatedURL,
				},
			},
		},
		Links: &app.GenericLinks{
			Self: &selfURL,
		},
	}
	if itr.Path.IsEmpty() == false {
		parentID := itr.Path.This().String()
		parentSelfURL := rest.AbsoluteURL(request, app.IterationHref(parentID))
		i.Relationships.Parent = &app.RelationGeneric{
			Data: &app.GenericData{
				Type: &iterationType,
				ID:   &parentID,
			},
			Links: &app.GenericLinks{
				Self: &parentSelfURL,
			},
		}
	}
	for _, add := range additional {
		add(request, &itr, i)
	}
	return i
}
func ConvertIteration ( request * goa . RequestData , itr iteration . Iteration , additional ... IterationConvertFunc ) * app . Iteration { iterationType := iteration . APIStringTypeIteration spaceID := itr . SpaceID . String ( ) selfURL := rest . AbsoluteURL ( request , app . IterationHref ( itr . ID ) ) spaceSelfURL := rest . AbsoluteURL ( request , app . SpaceHref ( spaceID ) ) workitemsRelatedURL := rest . AbsoluteURL ( request , app . WorkitemHref ( spaceID , " " + itr . ID . String ( ) ) ) pathToTopMostParent := itr . Path . String ( ) i := & app . Iteration { Type : iterationType , ID : & itr . ID , Attributes : & app . IterationAttributes { Name : & itr . Name , CreatedAt : & itr . CreatedAt , UpdatedAt : & itr . UpdatedAt , StartAt : itr . StartAt , EndAt : itr . EndAt , Description : itr . Description , State : & itr . State , ParentPath : & pathToTopMostParent , } , Relationships : & app . IterationRelations { Space : & app . RelationGeneric { Data : & app . GenericData { Type : & space . SpaceType , ID : & spaceID , } , Links : & app . GenericLinks { Self : & spaceSelfURL , } , } , Workitems : & app . RelationGeneric { Links : & app . GenericLinks { Related : & workitemsRelatedURL , } , } , } , Links : & app . GenericLinks { Self : & selfURL , } , } if itr . Path . IsEmpty ( ) == false { parentID := itr . Path . This ( ) . String ( ) parentSelfURL := rest . AbsoluteURL ( request , app . IterationHref ( parentID ) ) i . Relationships . Parent = & app . RelationGeneric { Data : & app . GenericData { Type : & iterationType , ID : & parentID , } , Links : & app . GenericLinks { Self : & parentSelfURL , } , } } for _ , add := range additional { add ( request , & itr , i ) } return i }
ConvertIteration converts between internal and external REST representation
ConvertIteration converts between internal and external REST representation