func (o *GetCSPMAwsAccountScriptsAttachmentDefault) Code() int {
	return o._statusCode
}
Code gets the status code for the get c s p m aws account scripts attachment default response
package cspm_registration
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 GetCSPMAwsAccountScriptsAttachmentReader struct {
	formats strfmt.Registry
}
func (o *GetCSPMAwsAccountScriptsAttachmentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetCSPMAwsAccountScriptsAttachmentOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewGetCSPMAwsAccountScriptsAttachmentBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewGetCSPMAwsAccountScriptsAttachmentForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 429:
		result := NewGetCSPMAwsAccountScriptsAttachmentTooManyRequests()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewGetCSPMAwsAccountScriptsAttachmentInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		result := NewGetCSPMAwsAccountScriptsAttachmentDefault(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
	}
}
func NewGetCSPMAwsAccountScriptsAttachmentOK() *GetCSPMAwsAccountScriptsAttachmentOK {
	return &GetCSPMAwsAccountScriptsAttachmentOK{}
}
type GetCSPMAwsAccountScriptsAttachmentOK struct {
	XRateLimitLimit int64
	XRateLimitRemaining int64
	Payload *models.RegistrationAWSProvisionGetAccountScriptResponseV2
}
func (o *GetCSPMAwsAccountScriptsAttachmentOK) Error() string {
	return fmt.Sprintf("[GET /cloud-connect-cspm-aws/entities/user-scripts-download/v1][%d] getCSPMAwsAccountScriptsAttachmentOK  %+v", 200, o.Payload)
}
func (o *GetCSPMAwsAccountScriptsAttachmentOK) GetPayload() *models.RegistrationAWSProvisionGetAccountScriptResponseV2 {
	return o.Payload
}
func (o *GetCSPMAwsAccountScriptsAttachmentOK) 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.RegistrationAWSProvisionGetAccountScriptResponseV2)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewGetCSPMAwsAccountScriptsAttachmentBadRequest() *GetCSPMAwsAccountScriptsAttachmentBadRequest {
	return &GetCSPMAwsAccountScriptsAttachmentBadRequest{}
}
type GetCSPMAwsAccountScriptsAttachmentBadRequest struct {
	XRateLimitLimit int64
	XRateLimitRemaining int64
	Payload *models.RegistrationAWSProvisionGetAccountScriptResponseV2
}
func (o *GetCSPMAwsAccountScriptsAttachmentBadRequest) Error() string {
	return fmt.Sprintf("[GET /cloud-connect-cspm-aws/entities/user-scripts-download/v1][%d] getCSPMAwsAccountScriptsAttachmentBadRequest  %+v", 400, o.Payload)
}
func (o *GetCSPMAwsAccountScriptsAttachmentBadRequest) GetPayload() *models.RegistrationAWSProvisionGetAccountScriptResponseV2 {
	return o.Payload
}
func (o *GetCSPMAwsAccountScriptsAttachmentBadRequest) 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.RegistrationAWSProvisionGetAccountScriptResponseV2)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewGetCSPMAwsAccountScriptsAttachmentForbidden() *GetCSPMAwsAccountScriptsAttachmentForbidden {
	return &GetCSPMAwsAccountScriptsAttachmentForbidden{}
}
type GetCSPMAwsAccountScriptsAttachmentForbidden struct {
	XRateLimitLimit int64
	XRateLimitRemaining int64
	Payload *models.MsaReplyMetaOnly
}
func (o *GetCSPMAwsAccountScriptsAttachmentForbidden) Error() string {
	return fmt.Sprintf("[GET /cloud-connect-cspm-aws/entities/user-scripts-download/v1][%d] getCSPMAwsAccountScriptsAttachmentForbidden  %+v", 403, o.Payload)
}
func (o *GetCSPMAwsAccountScriptsAttachmentForbidden) GetPayload() *models.MsaReplyMetaOnly {
	return o.Payload
}
func (o *GetCSPMAwsAccountScriptsAttachmentForbidden) 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
}
func NewGetCSPMAwsAccountScriptsAttachmentTooManyRequests() *GetCSPMAwsAccountScriptsAttachmentTooManyRequests {
	return &GetCSPMAwsAccountScriptsAttachmentTooManyRequests{}
}
type GetCSPMAwsAccountScriptsAttachmentTooManyRequests struct {
	XRateLimitLimit int64
	XRateLimitRemaining int64
	XRateLimitRetryAfter int64
	Payload *models.MsaReplyMetaOnly
}
func (o *GetCSPMAwsAccountScriptsAttachmentTooManyRequests) Error() string {
	return fmt.Sprintf("[GET /cloud-connect-cspm-aws/entities/user-scripts-download/v1][%d] getCSPMAwsAccountScriptsAttachmentTooManyRequests  %+v", 429, o.Payload)
}
func (o *GetCSPMAwsAccountScriptsAttachmentTooManyRequests) GetPayload() *models.MsaReplyMetaOnly {
	return o.Payload
}
func (o *GetCSPMAwsAccountScriptsAttachmentTooManyRequests) 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
	}
	hdrXRateLimitRetryAfter := response.GetHeader("X-RateLimit-RetryAfter")
	if hdrXRateLimitRetryAfter != "" {
		valxRateLimitRetryAfter, err := swag.ConvertInt64(hdrXRateLimitRetryAfter)
		if err != nil {
			return errors.InvalidType("X-RateLimit-RetryAfter", "header", "int64", hdrXRateLimitRetryAfter)
		}
		o.XRateLimitRetryAfter = valxRateLimitRetryAfter
	}
	o.Payload = new(models.MsaReplyMetaOnly)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewGetCSPMAwsAccountScriptsAttachmentInternalServerError() *GetCSPMAwsAccountScriptsAttachmentInternalServerError {
	return &GetCSPMAwsAccountScriptsAttachmentInternalServerError{}
}
type GetCSPMAwsAccountScriptsAttachmentInternalServerError struct {
	XRateLimitLimit int64
	XRateLimitRemaining int64
	Payload *models.RegistrationAWSProvisionGetAccountScriptResponseV2
}
func (o *GetCSPMAwsAccountScriptsAttachmentInternalServerError) Error() string {
	return fmt.Sprintf("[GET /cloud-connect-cspm-aws/entities/user-scripts-download/v1][%d] getCSPMAwsAccountScriptsAttachmentInternalServerError  %+v", 500, o.Payload)
}
func (o *GetCSPMAwsAccountScriptsAttachmentInternalServerError) GetPayload() *models.RegistrationAWSProvisionGetAccountScriptResponseV2 {
	return o.Payload
}
func (o *GetCSPMAwsAccountScriptsAttachmentInternalServerError) 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.RegistrationAWSProvisionGetAccountScriptResponseV2)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewGetCSPMAwsAccountScriptsAttachmentDefault(code int) *GetCSPMAwsAccountScriptsAttachmentDefault {
	return &GetCSPMAwsAccountScriptsAttachmentDefault{
		_statusCode: code,
	}
}
type GetCSPMAwsAccountScriptsAttachmentDefault struct {
	_statusCode int
	Payload *models.RegistrationAWSProvisionGetAccountScriptResponseV2
}