go-kimai/client/default_operations/get_api_ping_responses.go

90 lines
2.6 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package default_operations
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// GetAPIPingReader is a Reader for the GetAPIPing structure.
type GetAPIPingReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetAPIPingReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
result := NewGetAPIPingDefault(response.Code())
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
if response.Code()/100 == 2 {
return result, nil
}
return nil, result
}
// NewGetAPIPingDefault creates a GetAPIPingDefault with default headers values
func NewGetAPIPingDefault(code int) *GetAPIPingDefault {
return &GetAPIPingDefault{
_statusCode: code,
}
}
/*
GetAPIPingDefault describes a response with status code -1, with default header values.
GetAPIPingDefault get API ping default
*/
type GetAPIPingDefault struct {
_statusCode int
}
// Code gets the status code for the get API ping default response
func (o *GetAPIPingDefault) Code() int {
return o._statusCode
}
// IsSuccess returns true when this get API ping default response has a 2xx status code
func (o *GetAPIPingDefault) IsSuccess() bool {
return o._statusCode/100 == 2
}
// IsRedirect returns true when this get API ping default response has a 3xx status code
func (o *GetAPIPingDefault) IsRedirect() bool {
return o._statusCode/100 == 3
}
// IsClientError returns true when this get API ping default response has a 4xx status code
func (o *GetAPIPingDefault) IsClientError() bool {
return o._statusCode/100 == 4
}
// IsServerError returns true when this get API ping default response has a 5xx status code
func (o *GetAPIPingDefault) IsServerError() bool {
return o._statusCode/100 == 5
}
// IsCode returns true when this get API ping default response a status code equal to that given
func (o *GetAPIPingDefault) IsCode(code int) bool {
return o._statusCode == code
}
func (o *GetAPIPingDefault) Error() string {
return fmt.Sprintf("[GET /api/ping][%d] GetAPIPing default ", o._statusCode)
}
func (o *GetAPIPingDefault) String() string {
return fmt.Sprintf("[GET /api/ping][%d] GetAPIPing default ", o._statusCode)
}
func (o *GetAPIPingDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}