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

package security_management_privileges

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

import (
	"fmt"

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

// CreatePrivilegeReader is a Reader for the CreatePrivilege structure.
type CreatePrivilegeReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *CreatePrivilegeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 400:
		result := NewCreatePrivilegeBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewCreatePrivilegeForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
	}
}

// NewCreatePrivilegeBadRequest creates a CreatePrivilegeBadRequest with default headers values
func NewCreatePrivilegeBadRequest() *CreatePrivilegeBadRequest {
	return &CreatePrivilegeBadRequest{}
}

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

Privilege object not configured properly.
*/
type CreatePrivilegeBadRequest struct {
}

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

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

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

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

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

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

func (o *CreatePrivilegeBadRequest) Error() string {
	return fmt.Sprintf("[POST /v1/security/privileges/wildcard][%d] createPrivilegeBadRequest ", 400)
}

func (o *CreatePrivilegeBadRequest) String() string {
	return fmt.Sprintf("[POST /v1/security/privileges/wildcard][%d] createPrivilegeBadRequest ", 400)
}

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

	return nil
}

// NewCreatePrivilegeForbidden creates a CreatePrivilegeForbidden with default headers values
func NewCreatePrivilegeForbidden() *CreatePrivilegeForbidden {
	return &CreatePrivilegeForbidden{}
}

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

The user does not have permission to perform the operation.
*/
type CreatePrivilegeForbidden struct {
}

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

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

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

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

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

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

func (o *CreatePrivilegeForbidden) Error() string {
	return fmt.Sprintf("[POST /v1/security/privileges/wildcard][%d] createPrivilegeForbidden ", 403)
}

func (o *CreatePrivilegeForbidden) String() string {
	return fmt.Sprintf("[POST /v1/security/privileges/wildcard][%d] createPrivilegeForbidden ", 403)
}

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

	return nil
}
