// Code generated by go-swagger; DO NOT EDIT.

package backup

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"context"
	"fmt"
	"io"
	"strconv"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)

// CreateBackupReader is a Reader for the CreateBackup structure.
type CreateBackupReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *CreateBackupReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewCreateBackupOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewCreateBackupBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewCreateBackupUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewCreateBackupForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewCreateBackupNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 429:
		result := NewCreateBackupTooManyRequests()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewCreateBackupInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		result := NewCreateBackupDefault(response.Code())
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		if response.Code()/100 == 2 {
			return result, nil
		}
		return nil, result
	}
}

// NewCreateBackupOK creates a CreateBackupOK with default headers values
func NewCreateBackupOK() *CreateBackupOK {
	return &CreateBackupOK{}
}

/*
CreateBackupOK describes a response with status code 200, with default header values.

A successful response.
*/
type CreateBackupOK struct {
	Payload *CreateBackupOKBody
}

// IsSuccess returns true when this create backup o k response has a 2xx status code
func (o *CreateBackupOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this create backup o k response has a 3xx status code
func (o *CreateBackupOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this create backup o k response has a 4xx status code
func (o *CreateBackupOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this create backup o k response has a 5xx status code
func (o *CreateBackupOK) IsServerError() bool {
	return false
}

// IsCode returns true when this create backup o k response a status code equal to that given
func (o *CreateBackupOK) IsCode(code int) bool {
	return code == 200
}

// Code gets the status code for the create backup o k response
func (o *CreateBackupOK) Code() int {
	return 200
}

func (o *CreateBackupOK) Error() string {
	return fmt.Sprintf("[POST /api/v1beta/projects/{project_id}/clusters/{cluster_id}/backups][%d] createBackupOK  %+v", 200, o.Payload)
}

func (o *CreateBackupOK) String() string {
	return fmt.Sprintf("[POST /api/v1beta/projects/{project_id}/clusters/{cluster_id}/backups][%d] createBackupOK  %+v", 200, o.Payload)
}

func (o *CreateBackupOK) GetPayload() *CreateBackupOKBody {
	return o.Payload
}

func (o *CreateBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(CreateBackupOKBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewCreateBackupBadRequest creates a CreateBackupBadRequest with default headers values
func NewCreateBackupBadRequest() *CreateBackupBadRequest {
	return &CreateBackupBadRequest{}
}

/*
CreateBackupBadRequest describes a response with status code 400, with default header values.

A request field is invalid.
*/
type CreateBackupBadRequest struct {
	Payload *CreateBackupBadRequestBody
}

// IsSuccess returns true when this create backup bad request response has a 2xx status code
func (o *CreateBackupBadRequest) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this create backup bad request response has a 3xx status code
func (o *CreateBackupBadRequest) IsRedirect() bool {
	return false
}

// IsClientError returns true when this create backup bad request response has a 4xx status code
func (o *CreateBackupBadRequest) IsClientError() bool {
	return true
}

// IsServerError returns true when this create backup bad request response has a 5xx status code
func (o *CreateBackupBadRequest) IsServerError() bool {
	return false
}

// IsCode returns true when this create backup bad request response a status code equal to that given
func (o *CreateBackupBadRequest) IsCode(code int) bool {
	return code == 400
}

// Code gets the status code for the create backup bad request response
func (o *CreateBackupBadRequest) Code() int {
	return 400
}

func (o *CreateBackupBadRequest) Error() string {
	return fmt.Sprintf("[POST /api/v1beta/projects/{project_id}/clusters/{cluster_id}/backups][%d] createBackupBadRequest  %+v", 400, o.Payload)
}

func (o *CreateBackupBadRequest) String() string {
	return fmt.Sprintf("[POST /api/v1beta/projects/{project_id}/clusters/{cluster_id}/backups][%d] createBackupBadRequest  %+v", 400, o.Payload)
}

func (o *CreateBackupBadRequest) GetPayload() *CreateBackupBadRequestBody {
	return o.Payload
}

func (o *CreateBackupBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(CreateBackupBadRequestBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewCreateBackupUnauthorized creates a CreateBackupUnauthorized with default headers values
func NewCreateBackupUnauthorized() *CreateBackupUnauthorized {
	return &CreateBackupUnauthorized{}
}

/*
CreateBackupUnauthorized describes a response with status code 401, with default header values.

The API key cannot be authenticated.
*/
type CreateBackupUnauthorized struct {
	Payload interface{}
}

// IsSuccess returns true when this create backup unauthorized response has a 2xx status code
func (o *CreateBackupUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this create backup unauthorized response has a 3xx status code
func (o *CreateBackupUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this create backup unauthorized response has a 4xx status code
func (o *CreateBackupUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this create backup unauthorized response has a 5xx status code
func (o *CreateBackupUnauthorized) IsServerError() bool {
	return false
}

// IsCode returns true when this create backup unauthorized response a status code equal to that given
func (o *CreateBackupUnauthorized) IsCode(code int) bool {
	return code == 401
}

// Code gets the status code for the create backup unauthorized response
func (o *CreateBackupUnauthorized) Code() int {
	return 401
}

func (o *CreateBackupUnauthorized) Error() string {
	return fmt.Sprintf("[POST /api/v1beta/projects/{project_id}/clusters/{cluster_id}/backups][%d] createBackupUnauthorized  %+v", 401, o.Payload)
}

func (o *CreateBackupUnauthorized) String() string {
	return fmt.Sprintf("[POST /api/v1beta/projects/{project_id}/clusters/{cluster_id}/backups][%d] createBackupUnauthorized  %+v", 401, o.Payload)
}

func (o *CreateBackupUnauthorized) GetPayload() interface{} {
	return o.Payload
}

func (o *CreateBackupUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	// response payload
	if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewCreateBackupForbidden creates a CreateBackupForbidden with default headers values
func NewCreateBackupForbidden() *CreateBackupForbidden {
	return &CreateBackupForbidden{}
}

/*
CreateBackupForbidden describes a response with status code 403, with default header values.

The API key does not have permission to access the resource.
*/
type CreateBackupForbidden struct {
	Payload *CreateBackupForbiddenBody
}

// IsSuccess returns true when this create backup forbidden response has a 2xx status code
func (o *CreateBackupForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this create backup forbidden response has a 3xx status code
func (o *CreateBackupForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this create backup forbidden response has a 4xx status code
func (o *CreateBackupForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this create backup forbidden response has a 5xx status code
func (o *CreateBackupForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this create backup forbidden response a status code equal to that given
func (o *CreateBackupForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the create backup forbidden response
func (o *CreateBackupForbidden) Code() int {
	return 403
}

func (o *CreateBackupForbidden) Error() string {
	return fmt.Sprintf("[POST /api/v1beta/projects/{project_id}/clusters/{cluster_id}/backups][%d] createBackupForbidden  %+v", 403, o.Payload)
}

func (o *CreateBackupForbidden) String() string {
	return fmt.Sprintf("[POST /api/v1beta/projects/{project_id}/clusters/{cluster_id}/backups][%d] createBackupForbidden  %+v", 403, o.Payload)
}

func (o *CreateBackupForbidden) GetPayload() *CreateBackupForbiddenBody {
	return o.Payload
}

func (o *CreateBackupForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(CreateBackupForbiddenBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewCreateBackupNotFound creates a CreateBackupNotFound with default headers values
func NewCreateBackupNotFound() *CreateBackupNotFound {
	return &CreateBackupNotFound{}
}

/*
CreateBackupNotFound describes a response with status code 404, with default header values.

The requested resource does not exist.
*/
type CreateBackupNotFound struct {
	Payload *CreateBackupNotFoundBody
}

// IsSuccess returns true when this create backup not found response has a 2xx status code
func (o *CreateBackupNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this create backup not found response has a 3xx status code
func (o *CreateBackupNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this create backup not found response has a 4xx status code
func (o *CreateBackupNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this create backup not found response has a 5xx status code
func (o *CreateBackupNotFound) IsServerError() bool {
	return false
}

// IsCode returns true when this create backup not found response a status code equal to that given
func (o *CreateBackupNotFound) IsCode(code int) bool {
	return code == 404
}

// Code gets the status code for the create backup not found response
func (o *CreateBackupNotFound) Code() int {
	return 404
}

func (o *CreateBackupNotFound) Error() string {
	return fmt.Sprintf("[POST /api/v1beta/projects/{project_id}/clusters/{cluster_id}/backups][%d] createBackupNotFound  %+v", 404, o.Payload)
}

func (o *CreateBackupNotFound) String() string {
	return fmt.Sprintf("[POST /api/v1beta/projects/{project_id}/clusters/{cluster_id}/backups][%d] createBackupNotFound  %+v", 404, o.Payload)
}

func (o *CreateBackupNotFound) GetPayload() *CreateBackupNotFoundBody {
	return o.Payload
}

func (o *CreateBackupNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(CreateBackupNotFoundBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewCreateBackupTooManyRequests creates a CreateBackupTooManyRequests with default headers values
func NewCreateBackupTooManyRequests() *CreateBackupTooManyRequests {
	return &CreateBackupTooManyRequests{}
}

/*
CreateBackupTooManyRequests describes a response with status code 429, with default header values.

You have exceed the rate limit.
*/
type CreateBackupTooManyRequests struct {
	Payload *CreateBackupTooManyRequestsBody
}

// IsSuccess returns true when this create backup too many requests response has a 2xx status code
func (o *CreateBackupTooManyRequests) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this create backup too many requests response has a 3xx status code
func (o *CreateBackupTooManyRequests) IsRedirect() bool {
	return false
}

// IsClientError returns true when this create backup too many requests response has a 4xx status code
func (o *CreateBackupTooManyRequests) IsClientError() bool {
	return true
}

// IsServerError returns true when this create backup too many requests response has a 5xx status code
func (o *CreateBackupTooManyRequests) IsServerError() bool {
	return false
}

// IsCode returns true when this create backup too many requests response a status code equal to that given
func (o *CreateBackupTooManyRequests) IsCode(code int) bool {
	return code == 429
}

// Code gets the status code for the create backup too many requests response
func (o *CreateBackupTooManyRequests) Code() int {
	return 429
}

func (o *CreateBackupTooManyRequests) Error() string {
	return fmt.Sprintf("[POST /api/v1beta/projects/{project_id}/clusters/{cluster_id}/backups][%d] createBackupTooManyRequests  %+v", 429, o.Payload)
}

func (o *CreateBackupTooManyRequests) String() string {
	return fmt.Sprintf("[POST /api/v1beta/projects/{project_id}/clusters/{cluster_id}/backups][%d] createBackupTooManyRequests  %+v", 429, o.Payload)
}

func (o *CreateBackupTooManyRequests) GetPayload() *CreateBackupTooManyRequestsBody {
	return o.Payload
}

func (o *CreateBackupTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(CreateBackupTooManyRequestsBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewCreateBackupInternalServerError creates a CreateBackupInternalServerError with default headers values
func NewCreateBackupInternalServerError() *CreateBackupInternalServerError {
	return &CreateBackupInternalServerError{}
}

/*
CreateBackupInternalServerError describes a response with status code 500, with default header values.

Server error.
*/
type CreateBackupInternalServerError struct {
	Payload *CreateBackupInternalServerErrorBody
}

// IsSuccess returns true when this create backup internal server error response has a 2xx status code
func (o *CreateBackupInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this create backup internal server error response has a 3xx status code
func (o *CreateBackupInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this create backup internal server error response has a 4xx status code
func (o *CreateBackupInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this create backup internal server error response has a 5xx status code
func (o *CreateBackupInternalServerError) IsServerError() bool {
	return true
}

// IsCode returns true when this create backup internal server error response a status code equal to that given
func (o *CreateBackupInternalServerError) IsCode(code int) bool {
	return code == 500
}

// Code gets the status code for the create backup internal server error response
func (o *CreateBackupInternalServerError) Code() int {
	return 500
}

func (o *CreateBackupInternalServerError) Error() string {
	return fmt.Sprintf("[POST /api/v1beta/projects/{project_id}/clusters/{cluster_id}/backups][%d] createBackupInternalServerError  %+v", 500, o.Payload)
}

func (o *CreateBackupInternalServerError) String() string {
	return fmt.Sprintf("[POST /api/v1beta/projects/{project_id}/clusters/{cluster_id}/backups][%d] createBackupInternalServerError  %+v", 500, o.Payload)
}

func (o *CreateBackupInternalServerError) GetPayload() *CreateBackupInternalServerErrorBody {
	return o.Payload
}

func (o *CreateBackupInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(CreateBackupInternalServerErrorBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewCreateBackupDefault creates a CreateBackupDefault with default headers values
func NewCreateBackupDefault(code int) *CreateBackupDefault {
	return &CreateBackupDefault{
		_statusCode: code,
	}
}

/*
CreateBackupDefault describes a response with status code -1, with default header values.

An unexpected error response.
*/
type CreateBackupDefault struct {
	_statusCode int

	Payload *CreateBackupDefaultBody
}

// IsSuccess returns true when this create backup default response has a 2xx status code
func (o *CreateBackupDefault) IsSuccess() bool {
	return o._statusCode/100 == 2
}

// IsRedirect returns true when this create backup default response has a 3xx status code
func (o *CreateBackupDefault) IsRedirect() bool {
	return o._statusCode/100 == 3
}

// IsClientError returns true when this create backup default response has a 4xx status code
func (o *CreateBackupDefault) IsClientError() bool {
	return o._statusCode/100 == 4
}

// IsServerError returns true when this create backup default response has a 5xx status code
func (o *CreateBackupDefault) IsServerError() bool {
	return o._statusCode/100 == 5
}

// IsCode returns true when this create backup default response a status code equal to that given
func (o *CreateBackupDefault) IsCode(code int) bool {
	return o._statusCode == code
}

// Code gets the status code for the create backup default response
func (o *CreateBackupDefault) Code() int {
	return o._statusCode
}

func (o *CreateBackupDefault) Error() string {
	return fmt.Sprintf("[POST /api/v1beta/projects/{project_id}/clusters/{cluster_id}/backups][%d] CreateBackup default  %+v", o._statusCode, o.Payload)
}

func (o *CreateBackupDefault) String() string {
	return fmt.Sprintf("[POST /api/v1beta/projects/{project_id}/clusters/{cluster_id}/backups][%d] CreateBackup default  %+v", o._statusCode, o.Payload)
}

func (o *CreateBackupDefault) GetPayload() *CreateBackupDefaultBody {
	return o.Payload
}

func (o *CreateBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(CreateBackupDefaultBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

/*
CreateBackupBadRequestBody create backup bad request body
swagger:model CreateBackupBadRequestBody
*/
type CreateBackupBadRequestBody struct {

	// code
	//
	// Error code returned with this error.
	Code int64 `json:"code,omitempty"`

	// details
	//
	// Error details returned with this error.
	Details []string `json:"details"`

	// message
	//
	// Error message returned with this error.
	Message string `json:"message,omitempty"`
}

// Validate validates this create backup bad request body
func (o *CreateBackupBadRequestBody) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this create backup bad request body based on context it is used
func (o *CreateBackupBadRequestBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *CreateBackupBadRequestBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *CreateBackupBadRequestBody) UnmarshalBinary(b []byte) error {
	var res CreateBackupBadRequestBody
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
CreateBackupBody CreateBackupReq
//
// This request for creating a MANUAL type backup.
swagger:model CreateBackupBody
*/
type CreateBackupBody struct {

	// The description of the backup. It helps you add additional information to the backup. Allows up to 256 characters.
	// Example: backup-1
	Description string `json:"description,omitempty"`

	// Specify the name for a manual backup. It is recommended that you use a unique name, so that it is easy to distinguish the backup when you query the backups.
	// Example: backup-1
	// Required: true
	Name *string `json:"name"`
}

// Validate validates this create backup body
func (o *CreateBackupBody) Validate(formats strfmt.Registry) error {
	var res []error

	if err := o.validateName(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *CreateBackupBody) validateName(formats strfmt.Registry) error {

	if err := validate.Required("body"+"."+"name", "body", o.Name); err != nil {
		return err
	}

	return nil
}

// ContextValidate validates this create backup body based on context it is used
func (o *CreateBackupBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *CreateBackupBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *CreateBackupBody) UnmarshalBinary(b []byte) error {
	var res CreateBackupBody
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
CreateBackupDefaultBody create backup default body
swagger:model CreateBackupDefaultBody
*/
type CreateBackupDefaultBody struct {

	// code
	Code int32 `json:"code,omitempty"`

	// details
	Details []*CreateBackupDefaultBodyDetailsItems0 `json:"details"`

	// message
	Message string `json:"message,omitempty"`
}

// Validate validates this create backup default body
func (o *CreateBackupDefaultBody) Validate(formats strfmt.Registry) error {
	var res []error

	if err := o.validateDetails(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *CreateBackupDefaultBody) validateDetails(formats strfmt.Registry) error {
	if swag.IsZero(o.Details) { // not required
		return nil
	}

	for i := 0; i < len(o.Details); i++ {
		if swag.IsZero(o.Details[i]) { // not required
			continue
		}

		if o.Details[i] != nil {
			if err := o.Details[i].Validate(formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("CreateBackup default" + "." + "details" + "." + strconv.Itoa(i))
				} else if ce, ok := err.(*errors.CompositeError); ok {
					return ce.ValidateName("CreateBackup default" + "." + "details" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

// ContextValidate validate this create backup default body based on the context it is used
func (o *CreateBackupDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	var res []error

	if err := o.contextValidateDetails(ctx, formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *CreateBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error {

	for i := 0; i < len(o.Details); i++ {

		if o.Details[i] != nil {

			if swag.IsZero(o.Details[i]) { // not required
				return nil
			}

			if err := o.Details[i].ContextValidate(ctx, formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("CreateBackup default" + "." + "details" + "." + strconv.Itoa(i))
				} else if ce, ok := err.(*errors.CompositeError); ok {
					return ce.ValidateName("CreateBackup default" + "." + "details" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

// MarshalBinary interface implementation
func (o *CreateBackupDefaultBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *CreateBackupDefaultBody) UnmarshalBinary(b []byte) error {
	var res CreateBackupDefaultBody
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
CreateBackupDefaultBodyDetailsItems0 create backup default body details items0
swagger:model CreateBackupDefaultBodyDetailsItems0
*/
type CreateBackupDefaultBodyDetailsItems0 struct {

	// at type
	AtType string `json:"@type,omitempty"`
}

// Validate validates this create backup default body details items0
func (o *CreateBackupDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this create backup default body details items0 based on context it is used
func (o *CreateBackupDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *CreateBackupDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *CreateBackupDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error {
	var res CreateBackupDefaultBodyDetailsItems0
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
CreateBackupForbiddenBody create backup forbidden body
swagger:model CreateBackupForbiddenBody
*/
type CreateBackupForbiddenBody struct {

	// code
	//
	// Error code returned with this error.
	Code int64 `json:"code,omitempty"`

	// details
	//
	// Error details returned with this error.
	Details []string `json:"details"`

	// message
	//
	// Error message returned with this error.
	Message string `json:"message,omitempty"`
}

// Validate validates this create backup forbidden body
func (o *CreateBackupForbiddenBody) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this create backup forbidden body based on context it is used
func (o *CreateBackupForbiddenBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *CreateBackupForbiddenBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *CreateBackupForbiddenBody) UnmarshalBinary(b []byte) error {
	var res CreateBackupForbiddenBody
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
CreateBackupInternalServerErrorBody create backup internal server error body
swagger:model CreateBackupInternalServerErrorBody
*/
type CreateBackupInternalServerErrorBody struct {

	// code
	//
	// Error code returned with this error.
	Code int64 `json:"code,omitempty"`

	// details
	//
	// Error details returned with this error.
	Details []string `json:"details"`

	// message
	//
	// Error message returned with this error.
	Message string `json:"message,omitempty"`
}

// Validate validates this create backup internal server error body
func (o *CreateBackupInternalServerErrorBody) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this create backup internal server error body based on context it is used
func (o *CreateBackupInternalServerErrorBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *CreateBackupInternalServerErrorBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *CreateBackupInternalServerErrorBody) UnmarshalBinary(b []byte) error {
	var res CreateBackupInternalServerErrorBody
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
CreateBackupNotFoundBody create backup not found body
swagger:model CreateBackupNotFoundBody
*/
type CreateBackupNotFoundBody struct {

	// code
	//
	// Error code returned with this error.
	Code int64 `json:"code,omitempty"`

	// details
	//
	// Error details returned with this error.
	Details []string `json:"details"`

	// message
	//
	// Error message returned with this error.
	Message string `json:"message,omitempty"`
}

// Validate validates this create backup not found body
func (o *CreateBackupNotFoundBody) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this create backup not found body based on context it is used
func (o *CreateBackupNotFoundBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *CreateBackupNotFoundBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *CreateBackupNotFoundBody) UnmarshalBinary(b []byte) error {
	var res CreateBackupNotFoundBody
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
CreateBackupOKBody CreateBackupResp
//
// This response for creating a MANUAL type backup.
swagger:model CreateBackupOKBody
*/
type CreateBackupOKBody struct {

	// The ID of the backup.
	// Example: 1
	ID string `json:"id,omitempty"`
}

// Validate validates this create backup o k body
func (o *CreateBackupOKBody) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this create backup o k body based on context it is used
func (o *CreateBackupOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *CreateBackupOKBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *CreateBackupOKBody) UnmarshalBinary(b []byte) error {
	var res CreateBackupOKBody
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
CreateBackupTooManyRequestsBody create backup too many requests body
swagger:model CreateBackupTooManyRequestsBody
*/
type CreateBackupTooManyRequestsBody struct {

	// code
	//
	// Error code returned with this error.
	Code int64 `json:"code,omitempty"`

	// details
	//
	// Error details returned with this error.
	Details []string `json:"details"`

	// message
	//
	// Error message returned with this error.
	Message string `json:"message,omitempty"`
}

// Validate validates this create backup too many requests body
func (o *CreateBackupTooManyRequestsBody) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this create backup too many requests body based on context it is used
func (o *CreateBackupTooManyRequestsBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *CreateBackupTooManyRequestsBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *CreateBackupTooManyRequestsBody) UnmarshalBinary(b []byte) error {
	var res CreateBackupTooManyRequestsBody
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}
