Cyclops 4 HPC is the purpose built stack to support large HPC centers with resource accounting and billing of cluster as well as cloud resources.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cyclops-4-hpc/services/billing/client/bulk_management/get_bill_run_responses.go

148 lines
4.0 KiB

// Code generated by go-swagger; DO NOT EDIT.
package bulk_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/billing/models"
)
// GetBillRunReader is a Reader for the GetBillRun structure.
type GetBillRunReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetBillRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetBillRunOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 404:
result := NewGetBillRunNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetBillRunInternalServerError()
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())
}
}
// NewGetBillRunOK creates a GetBillRunOK with default headers values
func NewGetBillRunOK() *GetBillRunOK {
return &GetBillRunOK{}
}
/*GetBillRunOK handles this case with default header values.
Description of a successfully operation
*/
type GetBillRunOK struct {
Payload *models.BillRunReport
}
func (o *GetBillRunOK) Error() string {
return fmt.Sprintf("[GET /billrun/{id}][%d] getBillRunOK %+v", 200, o.Payload)
}
func (o *GetBillRunOK) GetPayload() *models.BillRunReport {
return o.Payload
}
func (o *GetBillRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.BillRunReport)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetBillRunNotFound creates a GetBillRunNotFound with default headers values
func NewGetBillRunNotFound() *GetBillRunNotFound {
return &GetBillRunNotFound{}
}
/*GetBillRunNotFound handles this case with default header values.
The invoice id provided doesn't exist
*/
type GetBillRunNotFound struct {
Payload *models.ErrorResponse
}
func (o *GetBillRunNotFound) Error() string {
return fmt.Sprintf("[GET /billrun/{id}][%d] getBillRunNotFound %+v", 404, o.Payload)
}
func (o *GetBillRunNotFound) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *GetBillRunNotFound) 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
}
// NewGetBillRunInternalServerError creates a GetBillRunInternalServerError with default headers values
func NewGetBillRunInternalServerError() *GetBillRunInternalServerError {
return &GetBillRunInternalServerError{}
}
/*GetBillRunInternalServerError handles this case with default header values.
Something unexpected happend, error raised
*/
type GetBillRunInternalServerError struct {
Payload *models.ErrorResponse
}
func (o *GetBillRunInternalServerError) Error() string {
return fmt.Sprintf("[GET /billrun/{id}][%d] getBillRunInternalServerError %+v", 500, o.Payload)
}
func (o *GetBillRunInternalServerError) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *GetBillRunInternalServerError) 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
}