// Code generated by go-swagger; DO NOT EDIT. package plan_management // 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/Cyclops-Labs/cyclops-4-hpc.git/services/plan-manager/models" ) // GetCompletePlanReader is a Reader for the GetCompletePlan structure. type GetCompletePlanReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *GetCompletePlanReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewGetCompletePlanOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 404: result := NewGetCompletePlanNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewGetCompletePlanInternalServerError() 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()) } } // NewGetCompletePlanOK creates a GetCompletePlanOK with default headers values func NewGetCompletePlanOK() *GetCompletePlanOK { return &GetCompletePlanOK{} } /*GetCompletePlanOK handles this case with default header values. plan returned */ type GetCompletePlanOK struct { Payload *models.Plan } func (o *GetCompletePlanOK) Error() string { return fmt.Sprintf("[GET /plan/complete/{id}][%d] getCompletePlanOK %+v", 200, o.Payload) } func (o *GetCompletePlanOK) GetPayload() *models.Plan { return o.Payload } func (o *GetCompletePlanOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Plan) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetCompletePlanNotFound creates a GetCompletePlanNotFound with default headers values func NewGetCompletePlanNotFound() *GetCompletePlanNotFound { return &GetCompletePlanNotFound{} } /*GetCompletePlanNotFound handles this case with default header values. complete plan with planid not found */ type GetCompletePlanNotFound struct { Payload *models.ErrorResponse } func (o *GetCompletePlanNotFound) Error() string { return fmt.Sprintf("[GET /plan/complete/{id}][%d] getCompletePlanNotFound %+v", 404, o.Payload) } func (o *GetCompletePlanNotFound) GetPayload() *models.ErrorResponse { return o.Payload } func (o *GetCompletePlanNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ErrorResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetCompletePlanInternalServerError creates a GetCompletePlanInternalServerError with default headers values func NewGetCompletePlanInternalServerError() *GetCompletePlanInternalServerError { return &GetCompletePlanInternalServerError{} } /*GetCompletePlanInternalServerError handles this case with default header values. unexpected error */ type GetCompletePlanInternalServerError struct { Payload *models.ErrorResponse } func (o *GetCompletePlanInternalServerError) Error() string { return fmt.Sprintf("[GET /plan/complete/{id}][%d] getCompletePlanInternalServerError %+v", 500, o.Payload) } func (o *GetCompletePlanInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } func (o *GetCompletePlanInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ErrorResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil }