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

// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed

package user

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

import (
	"fmt"
	"io"

	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"

	"github.com/taxnexus/go/lib/api/auth0/auth0_models"
)

// DeleteAPIV2UsersUserIDRolesReader is a Reader for the DeleteAPIV2UsersUserIDRoles structure.
type DeleteAPIV2UsersUserIDRolesReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *DeleteAPIV2UsersUserIDRolesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 204:
		result := NewDeleteAPIV2UsersUserIDRolesNoContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewDeleteAPIV2UsersUserIDRolesUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewDeleteAPIV2UsersUserIDRolesForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewDeleteAPIV2UsersUserIDRolesNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewDeleteAPIV2UsersUserIDRolesInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result

	default:
		return nil, runtime.NewAPIError("unknown error", response, response.Code())
	}
}

// NewDeleteAPIV2UsersUserIDRolesNoContent creates a DeleteAPIV2UsersUserIDRolesNoContent with default headers values
func NewDeleteAPIV2UsersUserIDRolesNoContent() *DeleteAPIV2UsersUserIDRolesNoContent {
	return &DeleteAPIV2UsersUserIDRolesNoContent{}
}

/*DeleteAPIV2UsersUserIDRolesNoContent handles this case with default header values.

User roles successfully removed
*/
type DeleteAPIV2UsersUserIDRolesNoContent struct {
}

func (o *DeleteAPIV2UsersUserIDRolesNoContent) Error() string {
	return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesNoContent ", 204)
}

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

	return nil
}

// NewDeleteAPIV2UsersUserIDRolesUnauthorized creates a DeleteAPIV2UsersUserIDRolesUnauthorized with default headers values
func NewDeleteAPIV2UsersUserIDRolesUnauthorized() *DeleteAPIV2UsersUserIDRolesUnauthorized {
	return &DeleteAPIV2UsersUserIDRolesUnauthorized{}
}

/*DeleteAPIV2UsersUserIDRolesUnauthorized handles this case with default header values.

Access Unauthorized, invalid API-KEY was used
*/
type DeleteAPIV2UsersUserIDRolesUnauthorized struct {
	Payload *auth0_models.Error
}

func (o *DeleteAPIV2UsersUserIDRolesUnauthorized) Error() string {
	return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesUnauthorized  %+v", 401, o.Payload)
}

func (o *DeleteAPIV2UsersUserIDRolesUnauthorized) GetPayload() *auth0_models.Error {
	return o.Payload
}

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

	o.Payload = new(auth0_models.Error)

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

	return nil
}

// NewDeleteAPIV2UsersUserIDRolesForbidden creates a DeleteAPIV2UsersUserIDRolesForbidden with default headers values
func NewDeleteAPIV2UsersUserIDRolesForbidden() *DeleteAPIV2UsersUserIDRolesForbidden {
	return &DeleteAPIV2UsersUserIDRolesForbidden{}
}

/*DeleteAPIV2UsersUserIDRolesForbidden handles this case with default header values.

Access forbidden, account lacks access
*/
type DeleteAPIV2UsersUserIDRolesForbidden struct {
	Payload *auth0_models.Error
}

func (o *DeleteAPIV2UsersUserIDRolesForbidden) Error() string {
	return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesForbidden  %+v", 403, o.Payload)
}

func (o *DeleteAPIV2UsersUserIDRolesForbidden) GetPayload() *auth0_models.Error {
	return o.Payload
}

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

	o.Payload = new(auth0_models.Error)

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

	return nil
}

// NewDeleteAPIV2UsersUserIDRolesNotFound creates a DeleteAPIV2UsersUserIDRolesNotFound with default headers values
func NewDeleteAPIV2UsersUserIDRolesNotFound() *DeleteAPIV2UsersUserIDRolesNotFound {
	return &DeleteAPIV2UsersUserIDRolesNotFound{}
}

/*DeleteAPIV2UsersUserIDRolesNotFound handles this case with default header values.

Resource was not found
*/
type DeleteAPIV2UsersUserIDRolesNotFound struct {
	Payload *auth0_models.Error
}

func (o *DeleteAPIV2UsersUserIDRolesNotFound) Error() string {
	return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesNotFound  %+v", 404, o.Payload)
}

func (o *DeleteAPIV2UsersUserIDRolesNotFound) GetPayload() *auth0_models.Error {
	return o.Payload
}

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

	o.Payload = new(auth0_models.Error)

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

	return nil
}

// NewDeleteAPIV2UsersUserIDRolesInternalServerError creates a DeleteAPIV2UsersUserIDRolesInternalServerError with default headers values
func NewDeleteAPIV2UsersUserIDRolesInternalServerError() *DeleteAPIV2UsersUserIDRolesInternalServerError {
	return &DeleteAPIV2UsersUserIDRolesInternalServerError{}
}

/*DeleteAPIV2UsersUserIDRolesInternalServerError handles this case with default header values.

Server Internal Error
*/
type DeleteAPIV2UsersUserIDRolesInternalServerError struct {
	Payload *auth0_models.Error
}

func (o *DeleteAPIV2UsersUserIDRolesInternalServerError) Error() string {
	return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesInternalServerError  %+v", 500, o.Payload)
}

func (o *DeleteAPIV2UsersUserIDRolesInternalServerError) GetPayload() *auth0_models.Error {
	return o.Payload
}

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

	o.Payload = new(auth0_models.Error)

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

	return nil
}
