// AddPayloadFormat migration from 2.4.1 to 2.6.1
439731
func AddPayloadFormat(prefix string) storage.MigrateFunction {
	return func(client *redis.Client, key string, obj map[string]string) (string, map[string]string, error) {
		usesCustom := false
		if decoder, ok := obj["decoder"]; ok {
			delete(obj, "decoder")
			obj["custom_decoder"] = decoder
			usesCustom = true
		}
		if converter, ok := obj["converter"]; ok {
			delete(obj, "converter")
			obj["custom_converter"] = converter
			usesCustom = true
		}
		if validator, ok := obj["validator"]; ok {
			delete(obj, "validator")
			obj["custom_validator"] = validator
			usesCustom = true
		}
		if encoder, ok := obj["encoder"]; ok {
			delete(obj, "encoder")
			obj["custom_encoder"] = encoder
			usesCustom = true
		}
		if usesCustom {
			obj["payload_format"] = "custom"
		}
		return "2.6.1", obj, nil
	}
}
1042562
func (o *PutPolicyInvalidPolicy) WithPayload(payload models.Error) *PutPolicyInvalidPolicy {
	o.Payload = payload
	return o
}
71404
func (r *Result) addRootObjectSchemata(s *spec.Schema) {
	r.rootObjectSchemata.Append(schemata{one: s})
}
1072780
func (s *Server) AddMiddlewareFunc(m func(ctx MiddlewareContext, w http.ResponseWriter, r *http.Request, app *models.App) error) {
	s.AddMiddleware(MiddlewareFunc(m))
}
1083268
func (o *GetIDNotFound) WithPayload(payload *models.Error) *GetIDNotFound {
	o.Payload = payload
	return o
}
355812
func (o *CreateDefault) WithPayload(payload *models.Error) *CreateDefault {
	o.Payload = payload
	return o
}
71507
func (o *PatchEndpointIDConfigFailed) WithPayload(payload models.Error) *PatchEndpointIDConfigFailed {
	o.Payload = payload
	return o
}
1070422
func (o *UpdateTaskOK) WithPayload(payload *models.Task) *UpdateTaskOK {
	o.Payload = payload
	return o
}
391958
func (api *VPCRouterAPI) AddPremiumInterface(routerID int64, switchID int64, ipaddresses []string, maskLen int, virtualIP string) (*sacloud.VPCRouter, error) {
	return api.addInterface(routerID, switchID, &sacloud.VPCRouterInterface{
		IPAddress:        ipaddresses,
		NetworkMaskLen:   maskLen,
		VirtualIPAddress: virtualIP,
	})
}
861779
func (r Account) AddReferralPartnerPaymentOption(paymentOption *datatypes.Container_Referral_Partner_Payment_Option) (resp bool, err error) {
	params := []interface{}{
		paymentOption,
	}
	err = r.Session.DoRequest("SoftLayer_Account", "addReferralPartnerPaymentOption", params, &r.Options, &resp)
	return
}
165711
func (o *GetServiceIDOK) WithPayload(payload *models.Service) *GetServiceIDOK {
	o.Payload = payload
	return o
}
238815
func (o *PostIPAMCreated) WithPayload(payload *models.IPAMResponse) *PostIPAMCreated {
	o.Payload = payload
	return o
}
304485
func addHostPathVolume(pod *v1.Pod, container *v1.Container, hostPath v1.HostPathVolumeSource, volumeMount v1.VolumeMount) {
	vol := v1.Volume{
		Name: volumeMount.Name,
		VolumeSource: v1.VolumeSource{
			HostPath: &hostPath,
		},
	}

	if volumeMount.MountPath == "" {
		volumeMount.MountPath = hostPath.Path
	}

	pod.Spec.Volumes = append(pod.Spec.Volumes, vol)
	container.VolumeMounts = append(container.VolumeMounts, volumeMount)
}
848888
func (o *FindTodosDefault) WithPayload(payload *models.Error) *FindTodosDefault {
	o.Payload = payload
	return o
}
1156196
func (o *PetListOK) WithPayload(payload []*models.Pet) *PetListOK {
	o.Payload = payload
	return o
}
1189090
func (o *AddOrderDefault) WithPayload(payload *models.Error) *AddOrderDefault {
	o.Payload = payload
	return o
}
581706
func (o *UpdateOneOK) WithPayload(payload *models.Item) *UpdateOneOK {
	o.Payload = payload
	return o
}