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

package faction_warfare

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

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

	"git.inf3.xyz/tschwery/eve-goclient.git/models"
)

// GetFwLeaderboardsCorporationsReader is a Reader for the GetFwLeaderboardsCorporations structure.
type GetFwLeaderboardsCorporationsReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *GetFwLeaderboardsCorporationsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {

	case 200:
		result := NewGetFwLeaderboardsCorporationsOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil

	case 500:
		result := NewGetFwLeaderboardsCorporationsInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result

	default:
		return nil, runtime.NewAPIError("unknown error", response, response.Code())
	}
}

// NewGetFwLeaderboardsCorporationsOK creates a GetFwLeaderboardsCorporationsOK with default headers values
func NewGetFwLeaderboardsCorporationsOK() *GetFwLeaderboardsCorporationsOK {
	return &GetFwLeaderboardsCorporationsOK{}
}

/*GetFwLeaderboardsCorporationsOK handles this case with default header values.

Corporation leaderboard of kills and victory points within faction warfare.
*/
type GetFwLeaderboardsCorporationsOK struct {
	/*The caching mechanism used
	 */
	CacheControl string
	/*RFC7231 formatted datetime string
	 */
	Expires string
	/*RFC7231 formatted datetime string
	 */
	LastModified string

	Payload *models.GetFwLeaderboardsCorporationsOKBody
}

func (o *GetFwLeaderboardsCorporationsOK) Error() string {
	return fmt.Sprintf("[GET /fw/leaderboards/corporations/][%d] getFwLeaderboardsCorporationsOK  %+v", 200, o.Payload)
}

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

	// response header Cache-Control
	o.CacheControl = response.GetHeader("Cache-Control")

	// response header Expires
	o.Expires = response.GetHeader("Expires")

	// response header Last-Modified
	o.LastModified = response.GetHeader("Last-Modified")

	o.Payload = new(models.GetFwLeaderboardsCorporationsOKBody)

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

	return nil
}

// NewGetFwLeaderboardsCorporationsInternalServerError creates a GetFwLeaderboardsCorporationsInternalServerError with default headers values
func NewGetFwLeaderboardsCorporationsInternalServerError() *GetFwLeaderboardsCorporationsInternalServerError {
	return &GetFwLeaderboardsCorporationsInternalServerError{}
}

/*GetFwLeaderboardsCorporationsInternalServerError handles this case with default header values.

Internal server error
*/
type GetFwLeaderboardsCorporationsInternalServerError struct {
	Payload *models.InternalServerError
}

func (o *GetFwLeaderboardsCorporationsInternalServerError) Error() string {
	return fmt.Sprintf("[GET /fw/leaderboards/corporations/][%d] getFwLeaderboardsCorporationsInternalServerError  %+v", 500, o.Payload)
}

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

	o.Payload = new(models.InternalServerError)

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

	return nil
}
