func (ctx *DeleteMultiElementsContext) NoContent() error {
	ctx.ResponseData.WriteHeader(204)
	return nil
}
NoContent sends a HTTP response with status code 204.
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
}
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)
}
func (ctx *CreateElementsContext) BadRequest(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, 400, r)
}
func (ctx *CreateElementsContext) 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 *CreateElementsContext) 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)
}
func (ctx *CreateElementsContext) Conflict(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, 409, r)
}
type DeleteElementsContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	ElementID string
	ListID    string
}
func NewDeleteElementsContext(ctx context.Context, r *http.Request, service *goa.Service) (*DeleteElementsContext, error) {
	var err error
	resp := goa.ContextResponse(ctx)
	resp.Service = service
	req := goa.ContextRequest(ctx)
	req.Request = r
	rctx := DeleteElementsContext{Context: ctx, ResponseData: resp, RequestData: req}
	paramElementID := req.Params["element_id"]
	if len(paramElementID) > 0 {
		rawElementID := paramElementID[0]
		rctx.ElementID = rawElementID
		if ok := goa.ValidatePattern(`^[0-9]+$`, rctx.ElementID); !ok {
			err = goa.MergeErrors(err, goa.InvalidPatternError(`element_id`, rctx.ElementID, `^[0-9]+$`))
		}
		if utf8.RuneCountInString(rctx.ElementID) < 1 {
			err = goa.MergeErrors(err, goa.InvalidLengthError(`element_id`, rctx.ElementID, utf8.RuneCountInString(rctx.ElementID), 1, true))
		}
		if utf8.RuneCountInString(rctx.ElementID) > 20 {
			err = goa.MergeErrors(err, goa.InvalidLengthError(`element_id`, rctx.ElementID, utf8.RuneCountInString(rctx.ElementID), 20, false))
		}
	}
	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))
		}
	}
	return &rctx, err
}
func (ctx *DeleteElementsContext) NoContent() error {
	ctx.ResponseData.WriteHeader(204)
	return nil
}
func (ctx *DeleteElementsContext) BadRequest(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, 400, r)
}
func (ctx *DeleteElementsContext) 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 *DeleteElementsContext) 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 DeleteMultiElementsContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	ElementIds []string
	ListID     string
}
func NewDeleteMultiElementsContext(ctx context.Context, r *http.Request, service *goa.Service) (*DeleteMultiElementsContext, error) {
	var err error
	resp := goa.ContextResponse(ctx)
	resp.Service = service
	req := goa.ContextRequest(ctx)
	req.Request = r
	rctx := DeleteMultiElementsContext{Context: ctx, ResponseData: resp, RequestData: req}
	paramElementIds := req.Params["element_ids"]
	if len(paramElementIds) > 0 {
		params := paramElementIds
		rctx.ElementIds = params
		for _, param := range rctx.ElementIds {
			if ok := goa.ValidatePattern(`^[0-9]+$`, param); !ok {
				err = goa.MergeErrors(err, goa.InvalidPatternError(`element_ids[0]`, param, `^[0-9]+$`))
			}
			if utf8.RuneCountInString(param) < 1 {
				err = goa.MergeErrors(err, goa.InvalidLengthError(`element_ids[0]`, param, utf8.RuneCountInString(param), 1, true))
			}
			if utf8.RuneCountInString(param) > 20 {
				err = goa.MergeErrors(err, goa.InvalidLengthError(`element_ids[0]`, param, utf8.RuneCountInString(param), 20, false))
			}
		}
	}
	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))
		}
	}
	return &rctx, err
}