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

// (c) 2012-2023 by Vernon Keenan
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed

package issued_certificates

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

	"code.tnxs.net/work/lib/api/members/members_models"
)

// PutIssuedCertificatesReader is a Reader for the PutIssuedCertificates structure.
type PutIssuedCertificatesReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PutIssuedCertificatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewPutIssuedCertificatesOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewPutIssuedCertificatesUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPutIssuedCertificatesForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPutIssuedCertificatesNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewPutIssuedCertificatesUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPutIssuedCertificatesInternalServerError()
		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())
	}
}

// NewPutIssuedCertificatesOK creates a PutIssuedCertificatesOK with default headers values
func NewPutIssuedCertificatesOK() *PutIssuedCertificatesOK {
	return &PutIssuedCertificatesOK{}
}

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

IssuedCertificate Response Object
*/
type PutIssuedCertificatesOK struct {
	Payload *members_models.IssuedCertificateResponse
}

// IsSuccess returns true when this put issued certificates o k response has a 2xx status code
func (o *PutIssuedCertificatesOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this put issued certificates o k response has a 3xx status code
func (o *PutIssuedCertificatesOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this put issued certificates o k response has a 4xx status code
func (o *PutIssuedCertificatesOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this put issued certificates o k response has a 5xx status code
func (o *PutIssuedCertificatesOK) IsServerError() bool {
	return false
}

// IsCode returns true when this put issued certificates o k response a status code equal to that given
func (o *PutIssuedCertificatesOK) IsCode(code int) bool {
	return code == 200
}

// Code gets the status code for the put issued certificates o k response
func (o *PutIssuedCertificatesOK) Code() int {
	return 200
}

func (o *PutIssuedCertificatesOK) Error() string {
	return fmt.Sprintf("[PUT /issuedcertificates][%d] putIssuedCertificatesOK  %+v", 200, o.Payload)
}

func (o *PutIssuedCertificatesOK) String() string {
	return fmt.Sprintf("[PUT /issuedcertificates][%d] putIssuedCertificatesOK  %+v", 200, o.Payload)
}

func (o *PutIssuedCertificatesOK) GetPayload() *members_models.IssuedCertificateResponse {
	return o.Payload
}

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

	o.Payload = new(members_models.IssuedCertificateResponse)

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

	return nil
}

// NewPutIssuedCertificatesUnauthorized creates a PutIssuedCertificatesUnauthorized with default headers values
func NewPutIssuedCertificatesUnauthorized() *PutIssuedCertificatesUnauthorized {
	return &PutIssuedCertificatesUnauthorized{}
}

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

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

// IsSuccess returns true when this put issued certificates unauthorized response has a 2xx status code
func (o *PutIssuedCertificatesUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this put issued certificates unauthorized response has a 3xx status code
func (o *PutIssuedCertificatesUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this put issued certificates unauthorized response has a 4xx status code
func (o *PutIssuedCertificatesUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this put issued certificates unauthorized response has a 5xx status code
func (o *PutIssuedCertificatesUnauthorized) IsServerError() bool {
	return false
}

// IsCode returns true when this put issued certificates unauthorized response a status code equal to that given
func (o *PutIssuedCertificatesUnauthorized) IsCode(code int) bool {
	return code == 401
}

// Code gets the status code for the put issued certificates unauthorized response
func (o *PutIssuedCertificatesUnauthorized) Code() int {
	return 401
}

func (o *PutIssuedCertificatesUnauthorized) Error() string {
	return fmt.Sprintf("[PUT /issuedcertificates][%d] putIssuedCertificatesUnauthorized  %+v", 401, o.Payload)
}

func (o *PutIssuedCertificatesUnauthorized) String() string {
	return fmt.Sprintf("[PUT /issuedcertificates][%d] putIssuedCertificatesUnauthorized  %+v", 401, o.Payload)
}

func (o *PutIssuedCertificatesUnauthorized) GetPayload() *members_models.Error {
	return o.Payload
}

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

	o.Payload = new(members_models.Error)

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

	return nil
}

// NewPutIssuedCertificatesForbidden creates a PutIssuedCertificatesForbidden with default headers values
func NewPutIssuedCertificatesForbidden() *PutIssuedCertificatesForbidden {
	return &PutIssuedCertificatesForbidden{}
}

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

Access forbidden, account lacks access
*/
type PutIssuedCertificatesForbidden struct {
	AccessControlAllowOrigin string

	Payload *members_models.Error
}

// IsSuccess returns true when this put issued certificates forbidden response has a 2xx status code
func (o *PutIssuedCertificatesForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this put issued certificates forbidden response has a 3xx status code
func (o *PutIssuedCertificatesForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this put issued certificates forbidden response has a 4xx status code
func (o *PutIssuedCertificatesForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this put issued certificates forbidden response has a 5xx status code
func (o *PutIssuedCertificatesForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this put issued certificates forbidden response a status code equal to that given
func (o *PutIssuedCertificatesForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the put issued certificates forbidden response
func (o *PutIssuedCertificatesForbidden) Code() int {
	return 403
}

func (o *PutIssuedCertificatesForbidden) Error() string {
	return fmt.Sprintf("[PUT /issuedcertificates][%d] putIssuedCertificatesForbidden  %+v", 403, o.Payload)
}

func (o *PutIssuedCertificatesForbidden) String() string {
	return fmt.Sprintf("[PUT /issuedcertificates][%d] putIssuedCertificatesForbidden  %+v", 403, o.Payload)
}

func (o *PutIssuedCertificatesForbidden) GetPayload() *members_models.Error {
	return o.Payload
}

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

	// hydrates response header Access-Control-Allow-Origin
	hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")

	if hdrAccessControlAllowOrigin != "" {
		o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
	}

	o.Payload = new(members_models.Error)

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

	return nil
}

// NewPutIssuedCertificatesNotFound creates a PutIssuedCertificatesNotFound with default headers values
func NewPutIssuedCertificatesNotFound() *PutIssuedCertificatesNotFound {
	return &PutIssuedCertificatesNotFound{}
}

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

Resource was not found
*/
type PutIssuedCertificatesNotFound struct {
	Payload *members_models.Error
}

// IsSuccess returns true when this put issued certificates not found response has a 2xx status code
func (o *PutIssuedCertificatesNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this put issued certificates not found response has a 3xx status code
func (o *PutIssuedCertificatesNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this put issued certificates not found response has a 4xx status code
func (o *PutIssuedCertificatesNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this put issued certificates not found response has a 5xx status code
func (o *PutIssuedCertificatesNotFound) IsServerError() bool {
	return false
}

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

// Code gets the status code for the put issued certificates not found response
func (o *PutIssuedCertificatesNotFound) Code() int {
	return 404
}

func (o *PutIssuedCertificatesNotFound) Error() string {
	return fmt.Sprintf("[PUT /issuedcertificates][%d] putIssuedCertificatesNotFound  %+v", 404, o.Payload)
}

func (o *PutIssuedCertificatesNotFound) String() string {
	return fmt.Sprintf("[PUT /issuedcertificates][%d] putIssuedCertificatesNotFound  %+v", 404, o.Payload)
}

func (o *PutIssuedCertificatesNotFound) GetPayload() *members_models.Error {
	return o.Payload
}

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

	o.Payload = new(members_models.Error)

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

	return nil
}

// NewPutIssuedCertificatesUnprocessableEntity creates a PutIssuedCertificatesUnprocessableEntity with default headers values
func NewPutIssuedCertificatesUnprocessableEntity() *PutIssuedCertificatesUnprocessableEntity {
	return &PutIssuedCertificatesUnprocessableEntity{}
}

/*
PutIssuedCertificatesUnprocessableEntity describes a response with status code 422, with default header values.

Unprocessable Entity, likely a bad parameter
*/
type PutIssuedCertificatesUnprocessableEntity struct {
	Payload *members_models.Error
}

// IsSuccess returns true when this put issued certificates unprocessable entity response has a 2xx status code
func (o *PutIssuedCertificatesUnprocessableEntity) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this put issued certificates unprocessable entity response has a 3xx status code
func (o *PutIssuedCertificatesUnprocessableEntity) IsRedirect() bool {
	return false
}

// IsClientError returns true when this put issued certificates unprocessable entity response has a 4xx status code
func (o *PutIssuedCertificatesUnprocessableEntity) IsClientError() bool {
	return true
}

// IsServerError returns true when this put issued certificates unprocessable entity response has a 5xx status code
func (o *PutIssuedCertificatesUnprocessableEntity) IsServerError() bool {
	return false
}

// IsCode returns true when this put issued certificates unprocessable entity response a status code equal to that given
func (o *PutIssuedCertificatesUnprocessableEntity) IsCode(code int) bool {
	return code == 422
}

// Code gets the status code for the put issued certificates unprocessable entity response
func (o *PutIssuedCertificatesUnprocessableEntity) Code() int {
	return 422
}

func (o *PutIssuedCertificatesUnprocessableEntity) Error() string {
	return fmt.Sprintf("[PUT /issuedcertificates][%d] putIssuedCertificatesUnprocessableEntity  %+v", 422, o.Payload)
}

func (o *PutIssuedCertificatesUnprocessableEntity) String() string {
	return fmt.Sprintf("[PUT /issuedcertificates][%d] putIssuedCertificatesUnprocessableEntity  %+v", 422, o.Payload)
}

func (o *PutIssuedCertificatesUnprocessableEntity) GetPayload() *members_models.Error {
	return o.Payload
}

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

	o.Payload = new(members_models.Error)

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

	return nil
}

// NewPutIssuedCertificatesInternalServerError creates a PutIssuedCertificatesInternalServerError with default headers values
func NewPutIssuedCertificatesInternalServerError() *PutIssuedCertificatesInternalServerError {
	return &PutIssuedCertificatesInternalServerError{}
}

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

Server Internal Error
*/
type PutIssuedCertificatesInternalServerError struct {
	Payload *members_models.Error
}

// IsSuccess returns true when this put issued certificates internal server error response has a 2xx status code
func (o *PutIssuedCertificatesInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this put issued certificates internal server error response has a 3xx status code
func (o *PutIssuedCertificatesInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this put issued certificates internal server error response has a 4xx status code
func (o *PutIssuedCertificatesInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this put issued certificates internal server error response has a 5xx status code
func (o *PutIssuedCertificatesInternalServerError) IsServerError() bool {
	return true
}

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

// Code gets the status code for the put issued certificates internal server error response
func (o *PutIssuedCertificatesInternalServerError) Code() int {
	return 500
}

func (o *PutIssuedCertificatesInternalServerError) Error() string {
	return fmt.Sprintf("[PUT /issuedcertificates][%d] putIssuedCertificatesInternalServerError  %+v", 500, o.Payload)
}

func (o *PutIssuedCertificatesInternalServerError) String() string {
	return fmt.Sprintf("[PUT /issuedcertificates][%d] putIssuedCertificatesInternalServerError  %+v", 500, o.Payload)
}

func (o *PutIssuedCertificatesInternalServerError) GetPayload() *members_models.Error {
	return o.Payload
}

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

	o.Payload = new(members_models.Error)

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

	return nil
}
