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

package p_cloud_tenants_ssh_keys

// 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/IBM-Cloud/power-go-client/power/models"
)

// PcloudTenantsSshkeysPostReader is a Reader for the PcloudTenantsSshkeysPost structure.
type PcloudTenantsSshkeysPostReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PcloudTenantsSshkeysPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewPcloudTenantsSshkeysPostOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 201:
		result := NewPcloudTenantsSshkeysPostCreated()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPcloudTenantsSshkeysPostBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewPcloudTenantsSshkeysPostUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPcloudTenantsSshkeysPostForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPcloudTenantsSshkeysPostNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 409:
		result := NewPcloudTenantsSshkeysPostConflict()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewPcloudTenantsSshkeysPostUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPcloudTenantsSshkeysPostInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys] pcloud.tenants.sshkeys.post", response, response.Code())
	}
}

// NewPcloudTenantsSshkeysPostOK creates a PcloudTenantsSshkeysPostOK with default headers values
func NewPcloudTenantsSshkeysPostOK() *PcloudTenantsSshkeysPostOK {
	return &PcloudTenantsSshkeysPostOK{}
}

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

OK
*/
type PcloudTenantsSshkeysPostOK struct {
	Payload *models.SSHKey
}

// IsSuccess returns true when this pcloud tenants sshkeys post o k response has a 2xx status code
func (o *PcloudTenantsSshkeysPostOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this pcloud tenants sshkeys post o k response has a 3xx status code
func (o *PcloudTenantsSshkeysPostOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud tenants sshkeys post o k response has a 4xx status code
func (o *PcloudTenantsSshkeysPostOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this pcloud tenants sshkeys post o k response has a 5xx status code
func (o *PcloudTenantsSshkeysPostOK) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud tenants sshkeys post o k response a status code equal to that given
func (o *PcloudTenantsSshkeysPostOK) IsCode(code int) bool {
	return code == 200
}

// Code gets the status code for the pcloud tenants sshkeys post o k response
func (o *PcloudTenantsSshkeysPostOK) Code() int {
	return 200
}

func (o *PcloudTenantsSshkeysPostOK) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostOK  %+v", 200, o.Payload)
}

func (o *PcloudTenantsSshkeysPostOK) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostOK  %+v", 200, o.Payload)
}

func (o *PcloudTenantsSshkeysPostOK) GetPayload() *models.SSHKey {
	return o.Payload
}

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

	o.Payload = new(models.SSHKey)

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

	return nil
}

// NewPcloudTenantsSshkeysPostCreated creates a PcloudTenantsSshkeysPostCreated with default headers values
func NewPcloudTenantsSshkeysPostCreated() *PcloudTenantsSshkeysPostCreated {
	return &PcloudTenantsSshkeysPostCreated{}
}

/*
PcloudTenantsSshkeysPostCreated describes a response with status code 201, with default header values.

Created
*/
type PcloudTenantsSshkeysPostCreated struct {
	Payload *models.SSHKey
}

// IsSuccess returns true when this pcloud tenants sshkeys post created response has a 2xx status code
func (o *PcloudTenantsSshkeysPostCreated) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this pcloud tenants sshkeys post created response has a 3xx status code
func (o *PcloudTenantsSshkeysPostCreated) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud tenants sshkeys post created response has a 4xx status code
func (o *PcloudTenantsSshkeysPostCreated) IsClientError() bool {
	return false
}

// IsServerError returns true when this pcloud tenants sshkeys post created response has a 5xx status code
func (o *PcloudTenantsSshkeysPostCreated) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud tenants sshkeys post created response a status code equal to that given
func (o *PcloudTenantsSshkeysPostCreated) IsCode(code int) bool {
	return code == 201
}

// Code gets the status code for the pcloud tenants sshkeys post created response
func (o *PcloudTenantsSshkeysPostCreated) Code() int {
	return 201
}

func (o *PcloudTenantsSshkeysPostCreated) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostCreated  %+v", 201, o.Payload)
}

func (o *PcloudTenantsSshkeysPostCreated) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostCreated  %+v", 201, o.Payload)
}

func (o *PcloudTenantsSshkeysPostCreated) GetPayload() *models.SSHKey {
	return o.Payload
}

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

	o.Payload = new(models.SSHKey)

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

	return nil
}

// NewPcloudTenantsSshkeysPostBadRequest creates a PcloudTenantsSshkeysPostBadRequest with default headers values
func NewPcloudTenantsSshkeysPostBadRequest() *PcloudTenantsSshkeysPostBadRequest {
	return &PcloudTenantsSshkeysPostBadRequest{}
}

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

Bad Request
*/
type PcloudTenantsSshkeysPostBadRequest struct {
	Payload *models.Error
}

// IsSuccess returns true when this pcloud tenants sshkeys post bad request response has a 2xx status code
func (o *PcloudTenantsSshkeysPostBadRequest) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud tenants sshkeys post bad request response has a 3xx status code
func (o *PcloudTenantsSshkeysPostBadRequest) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud tenants sshkeys post bad request response has a 4xx status code
func (o *PcloudTenantsSshkeysPostBadRequest) IsClientError() bool {
	return true
}

// IsServerError returns true when this pcloud tenants sshkeys post bad request response has a 5xx status code
func (o *PcloudTenantsSshkeysPostBadRequest) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud tenants sshkeys post bad request response a status code equal to that given
func (o *PcloudTenantsSshkeysPostBadRequest) IsCode(code int) bool {
	return code == 400
}

// Code gets the status code for the pcloud tenants sshkeys post bad request response
func (o *PcloudTenantsSshkeysPostBadRequest) Code() int {
	return 400
}

func (o *PcloudTenantsSshkeysPostBadRequest) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostBadRequest  %+v", 400, o.Payload)
}

func (o *PcloudTenantsSshkeysPostBadRequest) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostBadRequest  %+v", 400, o.Payload)
}

func (o *PcloudTenantsSshkeysPostBadRequest) GetPayload() *models.Error {
	return o.Payload
}

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

	o.Payload = new(models.Error)

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

	return nil
}

// NewPcloudTenantsSshkeysPostUnauthorized creates a PcloudTenantsSshkeysPostUnauthorized with default headers values
func NewPcloudTenantsSshkeysPostUnauthorized() *PcloudTenantsSshkeysPostUnauthorized {
	return &PcloudTenantsSshkeysPostUnauthorized{}
}

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

Unauthorized
*/
type PcloudTenantsSshkeysPostUnauthorized struct {
	Payload *models.Error
}

// IsSuccess returns true when this pcloud tenants sshkeys post unauthorized response has a 2xx status code
func (o *PcloudTenantsSshkeysPostUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud tenants sshkeys post unauthorized response has a 3xx status code
func (o *PcloudTenantsSshkeysPostUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud tenants sshkeys post unauthorized response has a 4xx status code
func (o *PcloudTenantsSshkeysPostUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this pcloud tenants sshkeys post unauthorized response has a 5xx status code
func (o *PcloudTenantsSshkeysPostUnauthorized) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud tenants sshkeys post unauthorized response a status code equal to that given
func (o *PcloudTenantsSshkeysPostUnauthorized) IsCode(code int) bool {
	return code == 401
}

// Code gets the status code for the pcloud tenants sshkeys post unauthorized response
func (o *PcloudTenantsSshkeysPostUnauthorized) Code() int {
	return 401
}

func (o *PcloudTenantsSshkeysPostUnauthorized) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostUnauthorized  %+v", 401, o.Payload)
}

func (o *PcloudTenantsSshkeysPostUnauthorized) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostUnauthorized  %+v", 401, o.Payload)
}

func (o *PcloudTenantsSshkeysPostUnauthorized) GetPayload() *models.Error {
	return o.Payload
}

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

	o.Payload = new(models.Error)

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

	return nil
}

// NewPcloudTenantsSshkeysPostForbidden creates a PcloudTenantsSshkeysPostForbidden with default headers values
func NewPcloudTenantsSshkeysPostForbidden() *PcloudTenantsSshkeysPostForbidden {
	return &PcloudTenantsSshkeysPostForbidden{}
}

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

Forbidden
*/
type PcloudTenantsSshkeysPostForbidden struct {
	Payload *models.Error
}

// IsSuccess returns true when this pcloud tenants sshkeys post forbidden response has a 2xx status code
func (o *PcloudTenantsSshkeysPostForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud tenants sshkeys post forbidden response has a 3xx status code
func (o *PcloudTenantsSshkeysPostForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud tenants sshkeys post forbidden response has a 4xx status code
func (o *PcloudTenantsSshkeysPostForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this pcloud tenants sshkeys post forbidden response has a 5xx status code
func (o *PcloudTenantsSshkeysPostForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud tenants sshkeys post forbidden response a status code equal to that given
func (o *PcloudTenantsSshkeysPostForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the pcloud tenants sshkeys post forbidden response
func (o *PcloudTenantsSshkeysPostForbidden) Code() int {
	return 403
}

func (o *PcloudTenantsSshkeysPostForbidden) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostForbidden  %+v", 403, o.Payload)
}

func (o *PcloudTenantsSshkeysPostForbidden) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostForbidden  %+v", 403, o.Payload)
}

func (o *PcloudTenantsSshkeysPostForbidden) GetPayload() *models.Error {
	return o.Payload
}

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

	o.Payload = new(models.Error)

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

	return nil
}

// NewPcloudTenantsSshkeysPostNotFound creates a PcloudTenantsSshkeysPostNotFound with default headers values
func NewPcloudTenantsSshkeysPostNotFound() *PcloudTenantsSshkeysPostNotFound {
	return &PcloudTenantsSshkeysPostNotFound{}
}

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

Not Found
*/
type PcloudTenantsSshkeysPostNotFound struct {
	Payload *models.Error
}

// IsSuccess returns true when this pcloud tenants sshkeys post not found response has a 2xx status code
func (o *PcloudTenantsSshkeysPostNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud tenants sshkeys post not found response has a 3xx status code
func (o *PcloudTenantsSshkeysPostNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud tenants sshkeys post not found response has a 4xx status code
func (o *PcloudTenantsSshkeysPostNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this pcloud tenants sshkeys post not found response has a 5xx status code
func (o *PcloudTenantsSshkeysPostNotFound) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud tenants sshkeys post not found response a status code equal to that given
func (o *PcloudTenantsSshkeysPostNotFound) IsCode(code int) bool {
	return code == 404
}

// Code gets the status code for the pcloud tenants sshkeys post not found response
func (o *PcloudTenantsSshkeysPostNotFound) Code() int {
	return 404
}

func (o *PcloudTenantsSshkeysPostNotFound) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostNotFound  %+v", 404, o.Payload)
}

func (o *PcloudTenantsSshkeysPostNotFound) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostNotFound  %+v", 404, o.Payload)
}

func (o *PcloudTenantsSshkeysPostNotFound) GetPayload() *models.Error {
	return o.Payload
}

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

	o.Payload = new(models.Error)

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

	return nil
}

// NewPcloudTenantsSshkeysPostConflict creates a PcloudTenantsSshkeysPostConflict with default headers values
func NewPcloudTenantsSshkeysPostConflict() *PcloudTenantsSshkeysPostConflict {
	return &PcloudTenantsSshkeysPostConflict{}
}

/*
PcloudTenantsSshkeysPostConflict describes a response with status code 409, with default header values.

Conflict
*/
type PcloudTenantsSshkeysPostConflict struct {
	Payload *models.Error
}

// IsSuccess returns true when this pcloud tenants sshkeys post conflict response has a 2xx status code
func (o *PcloudTenantsSshkeysPostConflict) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud tenants sshkeys post conflict response has a 3xx status code
func (o *PcloudTenantsSshkeysPostConflict) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud tenants sshkeys post conflict response has a 4xx status code
func (o *PcloudTenantsSshkeysPostConflict) IsClientError() bool {
	return true
}

// IsServerError returns true when this pcloud tenants sshkeys post conflict response has a 5xx status code
func (o *PcloudTenantsSshkeysPostConflict) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud tenants sshkeys post conflict response a status code equal to that given
func (o *PcloudTenantsSshkeysPostConflict) IsCode(code int) bool {
	return code == 409
}

// Code gets the status code for the pcloud tenants sshkeys post conflict response
func (o *PcloudTenantsSshkeysPostConflict) Code() int {
	return 409
}

func (o *PcloudTenantsSshkeysPostConflict) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostConflict  %+v", 409, o.Payload)
}

func (o *PcloudTenantsSshkeysPostConflict) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostConflict  %+v", 409, o.Payload)
}

func (o *PcloudTenantsSshkeysPostConflict) GetPayload() *models.Error {
	return o.Payload
}

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

	o.Payload = new(models.Error)

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

	return nil
}

// NewPcloudTenantsSshkeysPostUnprocessableEntity creates a PcloudTenantsSshkeysPostUnprocessableEntity with default headers values
func NewPcloudTenantsSshkeysPostUnprocessableEntity() *PcloudTenantsSshkeysPostUnprocessableEntity {
	return &PcloudTenantsSshkeysPostUnprocessableEntity{}
}

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

Unprocessable Entity
*/
type PcloudTenantsSshkeysPostUnprocessableEntity struct {
	Payload *models.Error
}

// IsSuccess returns true when this pcloud tenants sshkeys post unprocessable entity response has a 2xx status code
func (o *PcloudTenantsSshkeysPostUnprocessableEntity) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud tenants sshkeys post unprocessable entity response has a 3xx status code
func (o *PcloudTenantsSshkeysPostUnprocessableEntity) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud tenants sshkeys post unprocessable entity response has a 4xx status code
func (o *PcloudTenantsSshkeysPostUnprocessableEntity) IsClientError() bool {
	return true
}

// IsServerError returns true when this pcloud tenants sshkeys post unprocessable entity response has a 5xx status code
func (o *PcloudTenantsSshkeysPostUnprocessableEntity) IsServerError() bool {
	return false
}

// IsCode returns true when this pcloud tenants sshkeys post unprocessable entity response a status code equal to that given
func (o *PcloudTenantsSshkeysPostUnprocessableEntity) IsCode(code int) bool {
	return code == 422
}

// Code gets the status code for the pcloud tenants sshkeys post unprocessable entity response
func (o *PcloudTenantsSshkeysPostUnprocessableEntity) Code() int {
	return 422
}

func (o *PcloudTenantsSshkeysPostUnprocessableEntity) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostUnprocessableEntity  %+v", 422, o.Payload)
}

func (o *PcloudTenantsSshkeysPostUnprocessableEntity) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostUnprocessableEntity  %+v", 422, o.Payload)
}

func (o *PcloudTenantsSshkeysPostUnprocessableEntity) GetPayload() *models.Error {
	return o.Payload
}

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

	o.Payload = new(models.Error)

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

	return nil
}

// NewPcloudTenantsSshkeysPostInternalServerError creates a PcloudTenantsSshkeysPostInternalServerError with default headers values
func NewPcloudTenantsSshkeysPostInternalServerError() *PcloudTenantsSshkeysPostInternalServerError {
	return &PcloudTenantsSshkeysPostInternalServerError{}
}

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

Internal Server Error
*/
type PcloudTenantsSshkeysPostInternalServerError struct {
	Payload *models.Error
}

// IsSuccess returns true when this pcloud tenants sshkeys post internal server error response has a 2xx status code
func (o *PcloudTenantsSshkeysPostInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this pcloud tenants sshkeys post internal server error response has a 3xx status code
func (o *PcloudTenantsSshkeysPostInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this pcloud tenants sshkeys post internal server error response has a 4xx status code
func (o *PcloudTenantsSshkeysPostInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this pcloud tenants sshkeys post internal server error response has a 5xx status code
func (o *PcloudTenantsSshkeysPostInternalServerError) IsServerError() bool {
	return true
}

// IsCode returns true when this pcloud tenants sshkeys post internal server error response a status code equal to that given
func (o *PcloudTenantsSshkeysPostInternalServerError) IsCode(code int) bool {
	return code == 500
}

// Code gets the status code for the pcloud tenants sshkeys post internal server error response
func (o *PcloudTenantsSshkeysPostInternalServerError) Code() int {
	return 500
}

func (o *PcloudTenantsSshkeysPostInternalServerError) Error() string {
	return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostInternalServerError  %+v", 500, o.Payload)
}

func (o *PcloudTenantsSshkeysPostInternalServerError) String() string {
	return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostInternalServerError  %+v", 500, o.Payload)
}

func (o *PcloudTenantsSshkeysPostInternalServerError) GetPayload() *models.Error {
	return o.Payload
}

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

	o.Payload = new(models.Error)

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

	return nil
}
