func NewPerformActionV2Conflict() *PerformActionV2Conflict {
	return &PerformActionV2Conflict{}
}
NewPerformActionV2Conflict creates a PerformActionV2Conflict with default headers values
package hosts
import (
	"fmt"
	"io"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/crowdstrike/gofalcon/falcon/models"
)
type PerformActionV2Reader struct {
	formats strfmt.Registry
}
func (o *PerformActionV2Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 202:
		result := NewPerformActionV2Accepted()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPerformActionV2BadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPerformActionV2Forbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 409:
		result := NewPerformActionV2Conflict()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 429:
		result := NewPerformActionV2TooManyRequests()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPerformActionV2InternalServerError()
		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())
	}
}
func NewPerformActionV2Accepted() *PerformActionV2Accepted {
	return &PerformActionV2Accepted{}
}
type PerformActionV2Accepted struct {
	XRateLimitLimit int64
	XRateLimitRemaining int64
	Payload *models.MsaReplyAffectedEntities
}
func (o *PerformActionV2Accepted) Error() string {
	return fmt.Sprintf("[POST /devices/entities/devices-actions/v2][%d] performActionV2Accepted  %+v", 202, o.Payload)
}
func (o *PerformActionV2Accepted) GetPayload() *models.MsaReplyAffectedEntities {
	return o.Payload
}
func (o *PerformActionV2Accepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit")
	if hdrXRateLimitLimit != "" {
		valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit)
		if err != nil {
			return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit)
		}
		o.XRateLimitLimit = valxRateLimitLimit
	}
	hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining")
	if hdrXRateLimitRemaining != "" {
		valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining)
		if err != nil {
			return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining)
		}
		o.XRateLimitRemaining = valxRateLimitRemaining
	}
	o.Payload = new(models.MsaReplyAffectedEntities)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewPerformActionV2BadRequest() *PerformActionV2BadRequest {
	return &PerformActionV2BadRequest{}
}
type PerformActionV2BadRequest struct {
	XRateLimitLimit int64
	XRateLimitRemaining int64
	Payload *models.MsaReplyAffectedEntities
}
func (o *PerformActionV2BadRequest) Error() string {
	return fmt.Sprintf("[POST /devices/entities/devices-actions/v2][%d] performActionV2BadRequest  %+v", 400, o.Payload)
}
func (o *PerformActionV2BadRequest) GetPayload() *models.MsaReplyAffectedEntities {
	return o.Payload
}
func (o *PerformActionV2BadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit")
	if hdrXRateLimitLimit != "" {
		valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit)
		if err != nil {
			return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit)
		}
		o.XRateLimitLimit = valxRateLimitLimit
	}
	hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining")
	if hdrXRateLimitRemaining != "" {
		valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining)
		if err != nil {
			return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining)
		}
		o.XRateLimitRemaining = valxRateLimitRemaining
	}
	o.Payload = new(models.MsaReplyAffectedEntities)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewPerformActionV2Forbidden() *PerformActionV2Forbidden {
	return &PerformActionV2Forbidden{}
}
type PerformActionV2Forbidden struct {
	XRateLimitLimit int64
	XRateLimitRemaining int64
	Payload *models.MsaReplyMetaOnly
}
func (o *PerformActionV2Forbidden) Error() string {
	return fmt.Sprintf("[POST /devices/entities/devices-actions/v2][%d] performActionV2Forbidden  %+v", 403, o.Payload)
}
func (o *PerformActionV2Forbidden) GetPayload() *models.MsaReplyMetaOnly {
	return o.Payload
}
func (o *PerformActionV2Forbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	hdrXRateLimitLimit := response.GetHeader("X-RateLimit-Limit")
	if hdrXRateLimitLimit != "" {
		valxRateLimitLimit, err := swag.ConvertInt64(hdrXRateLimitLimit)
		if err != nil {
			return errors.InvalidType("X-RateLimit-Limit", "header", "int64", hdrXRateLimitLimit)
		}
		o.XRateLimitLimit = valxRateLimitLimit
	}
	hdrXRateLimitRemaining := response.GetHeader("X-RateLimit-Remaining")
	if hdrXRateLimitRemaining != "" {
		valxRateLimitRemaining, err := swag.ConvertInt64(hdrXRateLimitRemaining)
		if err != nil {
			return errors.InvalidType("X-RateLimit-Remaining", "header", "int64", hdrXRateLimitRemaining)
		}
		o.XRateLimitRemaining = valxRateLimitRemaining
	}
	o.Payload = new(models.MsaReplyMetaOnly)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}