func (ctx *CreateElementsContext) OKFull(r *RankdbElementFull) error {
	if ctx.ResponseData.Header().Get("Content-Type") == "" {
		ctx.ResponseData.Header().Set("Content-Type", "application/vnd.rankdb.element+json")
	}
	return ctx.ResponseData.Service.Send(ctx.Context, 200, r)
}
OKFull sends a HTTP response with status code 200.
package app
import (
	"context"
	"net/http"
	"strconv"
	"unicode/utf8"
	"github.com/goadesign/goa"
)
type DeleteBackupContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	BackupID string
}
func NewDeleteBackupContext(ctx context.Context, r *http.Request, service *goa.Service) (*DeleteBackupContext, error) {
	var err error
	resp := goa.ContextResponse(ctx)
	resp.Service = service
	req := goa.ContextRequest(ctx)
	req.Request = r
	rctx := DeleteBackupContext{Context: ctx, ResponseData: resp, RequestData: req}
	paramBackupID := req.Params["backup_id"]
	if len(paramBackupID) > 0 {
		rawBackupID := paramBackupID[0]
		rctx.BackupID = rawBackupID
	}
	return &rctx, err
}
func (ctx *DeleteBackupContext) NoContent() error {
	ctx.ResponseData.WriteHeader(204)
	return nil
}
func (ctx *DeleteBackupContext) Unauthorized(r error) error {
	if ctx.ResponseData.Header().Get("Content-Type") == "" {
		ctx.ResponseData.Header().Set("Content-Type", "application/vnd.goa.error")
	}
	return ctx.ResponseData.Service.Send(ctx.Context, 401, r)
}
func (ctx *DeleteBackupContext) NotFound(r error) error {
	if ctx.ResponseData.Header().Get("Content-Type") == "" {
		ctx.ResponseData.Header().Set("Content-Type", "application/vnd.goa.error")
	}
	return ctx.ResponseData.Service.Send(ctx.Context, 404, r)
}
type StatusBackupContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	BackupID string
}
func NewStatusBackupContext(ctx context.Context, r *http.Request, service *goa.Service) (*StatusBackupContext, error) {
	var err error
	resp := goa.ContextResponse(ctx)
	resp.Service = service
	req := goa.ContextRequest(ctx)
	req.Request = r
	rctx := StatusBackupContext{Context: ctx, ResponseData: resp, RequestData: req}
	paramBackupID := req.Params["backup_id"]
	if len(paramBackupID) > 0 {
		rawBackupID := paramBackupID[0]
		rctx.BackupID = rawBackupID
	}
	return &rctx, err
}
func (ctx *StatusBackupContext) OK(r *RankdbBackupStatus) error {
	if ctx.ResponseData.Header().Get("Content-Type") == "" {
		ctx.ResponseData.Header().Set("Content-Type", "application/vnd.rankdb.backup_status+json")
	}
	return ctx.ResponseData.Service.Send(ctx.Context, 200, r)
}
func (ctx *StatusBackupContext) OKFull(r *RankdbBackupStatusFull) error {
	if ctx.ResponseData.Header().Get("Content-Type") == "" {
		ctx.ResponseData.Header().Set("Content-Type", "application/vnd.rankdb.backup_status+json")
	}
	return ctx.ResponseData.Service.Send(ctx.Context, 200, r)
}
func (ctx *StatusBackupContext) OKTiny(r *RankdbBackupStatusTiny) error {
	if ctx.ResponseData.Header().Get("Content-Type") == "" {
		ctx.ResponseData.Header().Set("Content-Type", "application/vnd.rankdb.backup_status+json")
	}
	return ctx.ResponseData.Service.Send(ctx.Context, 200, r)
}
func (ctx *StatusBackupContext) Unauthorized(r error) error {
	if ctx.ResponseData.Header().Get("Content-Type") == "" {
		ctx.ResponseData.Header().Set("Content-Type", "application/vnd.goa.error")
	}
	return ctx.ResponseData.Service.Send(ctx.Context, 401, r)
}
func (ctx *StatusBackupContext) NotFound(r error) error {
	if ctx.ResponseData.Header().Get("Content-Type") == "" {
		ctx.ResponseData.Header().Set("Content-Type", "application/vnd.goa.error")
	}
	return ctx.ResponseData.Service.Send(ctx.Context, 404, r)
}
type CreateElementsContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	ListID  string
	Range   int
	Payload *Element
}
func NewCreateElementsContext(ctx context.Context, r *http.Request, service *goa.Service) (*CreateElementsContext, error) {
	var err error
	resp := goa.ContextResponse(ctx)
	resp.Service = service
	req := goa.ContextRequest(ctx)
	req.Request = r
	rctx := CreateElementsContext{Context: ctx, ResponseData: resp, RequestData: req}
	paramListID := req.Params["list_id"]
	if len(paramListID) > 0 {
		rawListID := paramListID[0]
		rctx.ListID = rawListID
		if ok := goa.ValidatePattern(`^[a-zA-Z0-9-_.]+$`, rctx.ListID); !ok {
			err = goa.MergeErrors(err, goa.InvalidPatternError(`list_id`, rctx.ListID, `^[a-zA-Z0-9-_.]+$`))
		}
		if utf8.RuneCountInString(rctx.ListID) < 2 {
			err = goa.MergeErrors(err, goa.InvalidLengthError(`list_id`, rctx.ListID, utf8.RuneCountInString(rctx.ListID), 2, true))
		}
		if utf8.RuneCountInString(rctx.ListID) > 100 {
			err = goa.MergeErrors(err, goa.InvalidLengthError(`list_id`, rctx.ListID, utf8.RuneCountInString(rctx.ListID), 100, false))
		}
	}
	paramRange := req.Params["range"]
	if len(paramRange) == 0 {
		rctx.Range = 5
	} else {
		rawRange := paramRange[0]
		if range_, err2 := strconv.Atoi(rawRange); err2 == nil {
			rctx.Range = range_
		} else {
			err = goa.MergeErrors(err, goa.InvalidParamTypeError("range", rawRange, "integer"))
		}
		if rctx.Range < 0 {
			err = goa.MergeErrors(err, goa.InvalidRangeError(`range`, rctx.Range, 0, true))
		}
		if rctx.Range > 100 {
			err = goa.MergeErrors(err, goa.InvalidRangeError(`range`, rctx.Range, 100, false))
		}
	}
	return &rctx, err
}