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

package cluster

// 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"
)

// DeleteAccesspointReader is a Reader for the DeleteAccesspoint structure.
type DeleteAccesspointReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *DeleteAccesspointReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewDeleteAccesspointOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewDeleteAccesspointBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewDeleteAccesspointUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewDeleteAccesspointForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewDeleteAccesspointNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 429:
		result := NewDeleteAccesspointTooManyRequests()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewDeleteAccesspointInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		result := NewDeleteAccesspointDefault(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
	}
}

// NewDeleteAccesspointOK creates a DeleteAccesspointOK with default headers values
func NewDeleteAccesspointOK() *DeleteAccesspointOK {
	return &DeleteAccesspointOK{}
}

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

A successful response.
*/
type DeleteAccesspointOK struct {
	Payload interface{}
}

// IsSuccess returns true when this delete accesspoint o k response has a 2xx status code
func (o *DeleteAccesspointOK) IsSuccess() bool {
	return true
}

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

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

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

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

// Code gets the status code for the delete accesspoint o k response
func (o *DeleteAccesspointOK) Code() int {
	return 200
}

func (o *DeleteAccesspointOK) Error() string {
	return fmt.Sprintf("[DELETE /api/v1beta/projects/{project_id}/clusters/{cluster_id}/accesspoints/{accesspoint_id}][%d] deleteAccesspointOK  %+v", 200, o.Payload)
}

func (o *DeleteAccesspointOK) String() string {
	return fmt.Sprintf("[DELETE /api/v1beta/projects/{project_id}/clusters/{cluster_id}/accesspoints/{accesspoint_id}][%d] deleteAccesspointOK  %+v", 200, o.Payload)
}

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

func (o *DeleteAccesspointOK) 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
}

// NewDeleteAccesspointBadRequest creates a DeleteAccesspointBadRequest with default headers values
func NewDeleteAccesspointBadRequest() *DeleteAccesspointBadRequest {
	return &DeleteAccesspointBadRequest{}
}

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

A request field is invalid.
*/
type DeleteAccesspointBadRequest struct {
	Payload *DeleteAccesspointBadRequestBody
}

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

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

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

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

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

// Code gets the status code for the delete accesspoint bad request response
func (o *DeleteAccesspointBadRequest) Code() int {
	return 400
}

func (o *DeleteAccesspointBadRequest) Error() string {
	return fmt.Sprintf("[DELETE /api/v1beta/projects/{project_id}/clusters/{cluster_id}/accesspoints/{accesspoint_id}][%d] deleteAccesspointBadRequest  %+v", 400, o.Payload)
}

func (o *DeleteAccesspointBadRequest) String() string {
	return fmt.Sprintf("[DELETE /api/v1beta/projects/{project_id}/clusters/{cluster_id}/accesspoints/{accesspoint_id}][%d] deleteAccesspointBadRequest  %+v", 400, o.Payload)
}

func (o *DeleteAccesspointBadRequest) GetPayload() *DeleteAccesspointBadRequestBody {
	return o.Payload
}

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

	o.Payload = new(DeleteAccesspointBadRequestBody)

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

	return nil
}

// NewDeleteAccesspointUnauthorized creates a DeleteAccesspointUnauthorized with default headers values
func NewDeleteAccesspointUnauthorized() *DeleteAccesspointUnauthorized {
	return &DeleteAccesspointUnauthorized{}
}

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

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

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

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

// IsClientError returns true when this delete accesspoint unauthorized response has a 4xx status code
func (o *DeleteAccesspointUnauthorized) IsClientError() bool {
	return true
}

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

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

// Code gets the status code for the delete accesspoint unauthorized response
func (o *DeleteAccesspointUnauthorized) Code() int {
	return 401
}

func (o *DeleteAccesspointUnauthorized) Error() string {
	return fmt.Sprintf("[DELETE /api/v1beta/projects/{project_id}/clusters/{cluster_id}/accesspoints/{accesspoint_id}][%d] deleteAccesspointUnauthorized  %+v", 401, o.Payload)
}

func (o *DeleteAccesspointUnauthorized) String() string {
	return fmt.Sprintf("[DELETE /api/v1beta/projects/{project_id}/clusters/{cluster_id}/accesspoints/{accesspoint_id}][%d] deleteAccesspointUnauthorized  %+v", 401, o.Payload)
}

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

func (o *DeleteAccesspointUnauthorized) 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
}

// NewDeleteAccesspointForbidden creates a DeleteAccesspointForbidden with default headers values
func NewDeleteAccesspointForbidden() *DeleteAccesspointForbidden {
	return &DeleteAccesspointForbidden{}
}

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

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

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

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

// IsClientError returns true when this delete accesspoint forbidden response has a 4xx status code
func (o *DeleteAccesspointForbidden) IsClientError() bool {
	return true
}

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

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

// Code gets the status code for the delete accesspoint forbidden response
func (o *DeleteAccesspointForbidden) Code() int {
	return 403
}

func (o *DeleteAccesspointForbidden) Error() string {
	return fmt.Sprintf("[DELETE /api/v1beta/projects/{project_id}/clusters/{cluster_id}/accesspoints/{accesspoint_id}][%d] deleteAccesspointForbidden  %+v", 403, o.Payload)
}

func (o *DeleteAccesspointForbidden) String() string {
	return fmt.Sprintf("[DELETE /api/v1beta/projects/{project_id}/clusters/{cluster_id}/accesspoints/{accesspoint_id}][%d] deleteAccesspointForbidden  %+v", 403, o.Payload)
}

func (o *DeleteAccesspointForbidden) GetPayload() *DeleteAccesspointForbiddenBody {
	return o.Payload
}

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

	o.Payload = new(DeleteAccesspointForbiddenBody)

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

	return nil
}

// NewDeleteAccesspointNotFound creates a DeleteAccesspointNotFound with default headers values
func NewDeleteAccesspointNotFound() *DeleteAccesspointNotFound {
	return &DeleteAccesspointNotFound{}
}

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

The requested resource does not exist.
*/
type DeleteAccesspointNotFound struct {
	Payload *DeleteAccesspointNotFoundBody
}

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

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

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

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

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

// Code gets the status code for the delete accesspoint not found response
func (o *DeleteAccesspointNotFound) Code() int {
	return 404
}

func (o *DeleteAccesspointNotFound) Error() string {
	return fmt.Sprintf("[DELETE /api/v1beta/projects/{project_id}/clusters/{cluster_id}/accesspoints/{accesspoint_id}][%d] deleteAccesspointNotFound  %+v", 404, o.Payload)
}

func (o *DeleteAccesspointNotFound) String() string {
	return fmt.Sprintf("[DELETE /api/v1beta/projects/{project_id}/clusters/{cluster_id}/accesspoints/{accesspoint_id}][%d] deleteAccesspointNotFound  %+v", 404, o.Payload)
}

func (o *DeleteAccesspointNotFound) GetPayload() *DeleteAccesspointNotFoundBody {
	return o.Payload
}

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

	o.Payload = new(DeleteAccesspointNotFoundBody)

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

	return nil
}

// NewDeleteAccesspointTooManyRequests creates a DeleteAccesspointTooManyRequests with default headers values
func NewDeleteAccesspointTooManyRequests() *DeleteAccesspointTooManyRequests {
	return &DeleteAccesspointTooManyRequests{}
}

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

You have exceed the rate limit.
*/
type DeleteAccesspointTooManyRequests struct {
	Payload *DeleteAccesspointTooManyRequestsBody
}

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

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

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

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

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

// Code gets the status code for the delete accesspoint too many requests response
func (o *DeleteAccesspointTooManyRequests) Code() int {
	return 429
}

func (o *DeleteAccesspointTooManyRequests) Error() string {
	return fmt.Sprintf("[DELETE /api/v1beta/projects/{project_id}/clusters/{cluster_id}/accesspoints/{accesspoint_id}][%d] deleteAccesspointTooManyRequests  %+v", 429, o.Payload)
}

func (o *DeleteAccesspointTooManyRequests) String() string {
	return fmt.Sprintf("[DELETE /api/v1beta/projects/{project_id}/clusters/{cluster_id}/accesspoints/{accesspoint_id}][%d] deleteAccesspointTooManyRequests  %+v", 429, o.Payload)
}

func (o *DeleteAccesspointTooManyRequests) GetPayload() *DeleteAccesspointTooManyRequestsBody {
	return o.Payload
}

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

	o.Payload = new(DeleteAccesspointTooManyRequestsBody)

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

	return nil
}

// NewDeleteAccesspointInternalServerError creates a DeleteAccesspointInternalServerError with default headers values
func NewDeleteAccesspointInternalServerError() *DeleteAccesspointInternalServerError {
	return &DeleteAccesspointInternalServerError{}
}

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

Server error.
*/
type DeleteAccesspointInternalServerError struct {
	Payload *DeleteAccesspointInternalServerErrorBody
}

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

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

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

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

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

// Code gets the status code for the delete accesspoint internal server error response
func (o *DeleteAccesspointInternalServerError) Code() int {
	return 500
}

func (o *DeleteAccesspointInternalServerError) Error() string {
	return fmt.Sprintf("[DELETE /api/v1beta/projects/{project_id}/clusters/{cluster_id}/accesspoints/{accesspoint_id}][%d] deleteAccesspointInternalServerError  %+v", 500, o.Payload)
}

func (o *DeleteAccesspointInternalServerError) String() string {
	return fmt.Sprintf("[DELETE /api/v1beta/projects/{project_id}/clusters/{cluster_id}/accesspoints/{accesspoint_id}][%d] deleteAccesspointInternalServerError  %+v", 500, o.Payload)
}

func (o *DeleteAccesspointInternalServerError) GetPayload() *DeleteAccesspointInternalServerErrorBody {
	return o.Payload
}

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

	o.Payload = new(DeleteAccesspointInternalServerErrorBody)

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

	return nil
}

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

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

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

	Payload *DeleteAccesspointDefaultBody
}

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

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

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

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

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

// Code gets the status code for the delete accesspoint default response
func (o *DeleteAccesspointDefault) Code() int {
	return o._statusCode
}

func (o *DeleteAccesspointDefault) Error() string {
	return fmt.Sprintf("[DELETE /api/v1beta/projects/{project_id}/clusters/{cluster_id}/accesspoints/{accesspoint_id}][%d] DeleteAccesspoint default  %+v", o._statusCode, o.Payload)
}

func (o *DeleteAccesspointDefault) String() string {
	return fmt.Sprintf("[DELETE /api/v1beta/projects/{project_id}/clusters/{cluster_id}/accesspoints/{accesspoint_id}][%d] DeleteAccesspoint default  %+v", o._statusCode, o.Payload)
}

func (o *DeleteAccesspointDefault) GetPayload() *DeleteAccesspointDefaultBody {
	return o.Payload
}

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

	o.Payload = new(DeleteAccesspointDefaultBody)

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

	return nil
}

/*
DeleteAccesspointBadRequestBody delete accesspoint bad request body
swagger:model DeleteAccesspointBadRequestBody
*/
type DeleteAccesspointBadRequestBody 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 delete accesspoint bad request body
func (o *DeleteAccesspointBadRequestBody) Validate(formats strfmt.Registry) error {
	return nil
}

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

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

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

/*
DeleteAccesspointDefaultBody delete accesspoint default body
swagger:model DeleteAccesspointDefaultBody
*/
type DeleteAccesspointDefaultBody struct {

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

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

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

// Validate validates this delete accesspoint default body
func (o *DeleteAccesspointDefaultBody) 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 *DeleteAccesspointDefaultBody) 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("DeleteAccesspoint default" + "." + "details" + "." + strconv.Itoa(i))
				} else if ce, ok := err.(*errors.CompositeError); ok {
					return ce.ValidateName("DeleteAccesspoint default" + "." + "details" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

// ContextValidate validate this delete accesspoint default body based on the context it is used
func (o *DeleteAccesspointDefaultBody) 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 *DeleteAccesspointDefaultBody) 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("DeleteAccesspoint default" + "." + "details" + "." + strconv.Itoa(i))
				} else if ce, ok := err.(*errors.CompositeError); ok {
					return ce.ValidateName("DeleteAccesspoint default" + "." + "details" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

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

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

/*
DeleteAccesspointDefaultBodyDetailsItems0 delete accesspoint default body details items0
swagger:model DeleteAccesspointDefaultBodyDetailsItems0
*/
type DeleteAccesspointDefaultBodyDetailsItems0 struct {

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

// Validate validates this delete accesspoint default body details items0
func (o *DeleteAccesspointDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error {
	return nil
}

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

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

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

/*
DeleteAccesspointForbiddenBody delete accesspoint forbidden body
swagger:model DeleteAccesspointForbiddenBody
*/
type DeleteAccesspointForbiddenBody 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 delete accesspoint forbidden body
func (o *DeleteAccesspointForbiddenBody) Validate(formats strfmt.Registry) error {
	return nil
}

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

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

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

/*
DeleteAccesspointInternalServerErrorBody delete accesspoint internal server error body
swagger:model DeleteAccesspointInternalServerErrorBody
*/
type DeleteAccesspointInternalServerErrorBody 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 delete accesspoint internal server error body
func (o *DeleteAccesspointInternalServerErrorBody) Validate(formats strfmt.Registry) error {
	return nil
}

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

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

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

/*
DeleteAccesspointNotFoundBody delete accesspoint not found body
swagger:model DeleteAccesspointNotFoundBody
*/
type DeleteAccesspointNotFoundBody 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 delete accesspoint not found body
func (o *DeleteAccesspointNotFoundBody) Validate(formats strfmt.Registry) error {
	return nil
}

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

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

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

/*
DeleteAccesspointTooManyRequestsBody delete accesspoint too many requests body
swagger:model DeleteAccesspointTooManyRequestsBody
*/
type DeleteAccesspointTooManyRequestsBody 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 delete accesspoint too many requests body
func (o *DeleteAccesspointTooManyRequestsBody) Validate(formats strfmt.Registry) error {
	return nil
}

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

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

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