// Code generated by go-swagger; DO NOT EDIT. package admin // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "git.coopcloud.tech/decentral1se/gtslib/models" ) // AdminReportGetReader is a Reader for the AdminReportGet structure. type AdminReportGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *AdminReportGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewAdminReportGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 400: result := NewAdminReportGetBadRequest() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 401: result := NewAdminReportGetUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewAdminReportGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 406: result := NewAdminReportGetNotAcceptable() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewAdminReportGetInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result default: return nil, runtime.NewAPIError("[GET /api/v1/admin/reports/{id}] adminReportGet", response, response.Code()) } } // NewAdminReportGetOK creates a AdminReportGetOK with default headers values func NewAdminReportGetOK() *AdminReportGetOK { return &AdminReportGetOK{} } /* AdminReportGetOK describes a response with status code 200, with default header values. The requested report. */ type AdminReportGetOK struct { Payload *models.AdminReport } // IsSuccess returns true when this admin report get o k response has a 2xx status code func (o *AdminReportGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this admin report get o k response has a 3xx status code func (o *AdminReportGetOK) IsRedirect() bool { return false } // IsClientError returns true when this admin report get o k response has a 4xx status code func (o *AdminReportGetOK) IsClientError() bool { return false } // IsServerError returns true when this admin report get o k response has a 5xx status code func (o *AdminReportGetOK) IsServerError() bool { return false } // IsCode returns true when this admin report get o k response a status code equal to that given func (o *AdminReportGetOK) IsCode(code int) bool { return code == 200 } // Code gets the status code for the admin report get o k response func (o *AdminReportGetOK) Code() int { return 200 } func (o *AdminReportGetOK) Error() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[GET /api/v1/admin/reports/{id}][%d] adminReportGetOK %s", 200, payload) } func (o *AdminReportGetOK) String() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[GET /api/v1/admin/reports/{id}][%d] adminReportGetOK %s", 200, payload) } func (o *AdminReportGetOK) GetPayload() *models.AdminReport { return o.Payload } func (o *AdminReportGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.AdminReport) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewAdminReportGetBadRequest creates a AdminReportGetBadRequest with default headers values func NewAdminReportGetBadRequest() *AdminReportGetBadRequest { return &AdminReportGetBadRequest{} } /* AdminReportGetBadRequest describes a response with status code 400, with default header values. bad request */ type AdminReportGetBadRequest struct { } // IsSuccess returns true when this admin report get bad request response has a 2xx status code func (o *AdminReportGetBadRequest) IsSuccess() bool { return false } // IsRedirect returns true when this admin report get bad request response has a 3xx status code func (o *AdminReportGetBadRequest) IsRedirect() bool { return false } // IsClientError returns true when this admin report get bad request response has a 4xx status code func (o *AdminReportGetBadRequest) IsClientError() bool { return true } // IsServerError returns true when this admin report get bad request response has a 5xx status code func (o *AdminReportGetBadRequest) IsServerError() bool { return false } // IsCode returns true when this admin report get bad request response a status code equal to that given func (o *AdminReportGetBadRequest) IsCode(code int) bool { return code == 400 } // Code gets the status code for the admin report get bad request response func (o *AdminReportGetBadRequest) Code() int { return 400 } func (o *AdminReportGetBadRequest) Error() string { return fmt.Sprintf("[GET /api/v1/admin/reports/{id}][%d] adminReportGetBadRequest", 400) } func (o *AdminReportGetBadRequest) String() string { return fmt.Sprintf("[GET /api/v1/admin/reports/{id}][%d] adminReportGetBadRequest", 400) } func (o *AdminReportGetBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAdminReportGetUnauthorized creates a AdminReportGetUnauthorized with default headers values func NewAdminReportGetUnauthorized() *AdminReportGetUnauthorized { return &AdminReportGetUnauthorized{} } /* AdminReportGetUnauthorized describes a response with status code 401, with default header values. unauthorized */ type AdminReportGetUnauthorized struct { } // IsSuccess returns true when this admin report get unauthorized response has a 2xx status code func (o *AdminReportGetUnauthorized) IsSuccess() bool { return false } // IsRedirect returns true when this admin report get unauthorized response has a 3xx status code func (o *AdminReportGetUnauthorized) IsRedirect() bool { return false } // IsClientError returns true when this admin report get unauthorized response has a 4xx status code func (o *AdminReportGetUnauthorized) IsClientError() bool { return true } // IsServerError returns true when this admin report get unauthorized response has a 5xx status code func (o *AdminReportGetUnauthorized) IsServerError() bool { return false } // IsCode returns true when this admin report get unauthorized response a status code equal to that given func (o *AdminReportGetUnauthorized) IsCode(code int) bool { return code == 401 } // Code gets the status code for the admin report get unauthorized response func (o *AdminReportGetUnauthorized) Code() int { return 401 } func (o *AdminReportGetUnauthorized) Error() string { return fmt.Sprintf("[GET /api/v1/admin/reports/{id}][%d] adminReportGetUnauthorized", 401) } func (o *AdminReportGetUnauthorized) String() string { return fmt.Sprintf("[GET /api/v1/admin/reports/{id}][%d] adminReportGetUnauthorized", 401) } func (o *AdminReportGetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAdminReportGetNotFound creates a AdminReportGetNotFound with default headers values func NewAdminReportGetNotFound() *AdminReportGetNotFound { return &AdminReportGetNotFound{} } /* AdminReportGetNotFound describes a response with status code 404, with default header values. not found */ type AdminReportGetNotFound struct { } // IsSuccess returns true when this admin report get not found response has a 2xx status code func (o *AdminReportGetNotFound) IsSuccess() bool { return false } // IsRedirect returns true when this admin report get not found response has a 3xx status code func (o *AdminReportGetNotFound) IsRedirect() bool { return false } // IsClientError returns true when this admin report get not found response has a 4xx status code func (o *AdminReportGetNotFound) IsClientError() bool { return true } // IsServerError returns true when this admin report get not found response has a 5xx status code func (o *AdminReportGetNotFound) IsServerError() bool { return false } // IsCode returns true when this admin report get not found response a status code equal to that given func (o *AdminReportGetNotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the admin report get not found response func (o *AdminReportGetNotFound) Code() int { return 404 } func (o *AdminReportGetNotFound) Error() string { return fmt.Sprintf("[GET /api/v1/admin/reports/{id}][%d] adminReportGetNotFound", 404) } func (o *AdminReportGetNotFound) String() string { return fmt.Sprintf("[GET /api/v1/admin/reports/{id}][%d] adminReportGetNotFound", 404) } func (o *AdminReportGetNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAdminReportGetNotAcceptable creates a AdminReportGetNotAcceptable with default headers values func NewAdminReportGetNotAcceptable() *AdminReportGetNotAcceptable { return &AdminReportGetNotAcceptable{} } /* AdminReportGetNotAcceptable describes a response with status code 406, with default header values. not acceptable */ type AdminReportGetNotAcceptable struct { } // IsSuccess returns true when this admin report get not acceptable response has a 2xx status code func (o *AdminReportGetNotAcceptable) IsSuccess() bool { return false } // IsRedirect returns true when this admin report get not acceptable response has a 3xx status code func (o *AdminReportGetNotAcceptable) IsRedirect() bool { return false } // IsClientError returns true when this admin report get not acceptable response has a 4xx status code func (o *AdminReportGetNotAcceptable) IsClientError() bool { return true } // IsServerError returns true when this admin report get not acceptable response has a 5xx status code func (o *AdminReportGetNotAcceptable) IsServerError() bool { return false } // IsCode returns true when this admin report get not acceptable response a status code equal to that given func (o *AdminReportGetNotAcceptable) IsCode(code int) bool { return code == 406 } // Code gets the status code for the admin report get not acceptable response func (o *AdminReportGetNotAcceptable) Code() int { return 406 } func (o *AdminReportGetNotAcceptable) Error() string { return fmt.Sprintf("[GET /api/v1/admin/reports/{id}][%d] adminReportGetNotAcceptable", 406) } func (o *AdminReportGetNotAcceptable) String() string { return fmt.Sprintf("[GET /api/v1/admin/reports/{id}][%d] adminReportGetNotAcceptable", 406) } func (o *AdminReportGetNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAdminReportGetInternalServerError creates a AdminReportGetInternalServerError with default headers values func NewAdminReportGetInternalServerError() *AdminReportGetInternalServerError { return &AdminReportGetInternalServerError{} } /* AdminReportGetInternalServerError describes a response with status code 500, with default header values. internal server error */ type AdminReportGetInternalServerError struct { } // IsSuccess returns true when this admin report get internal server error response has a 2xx status code func (o *AdminReportGetInternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this admin report get internal server error response has a 3xx status code func (o *AdminReportGetInternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this admin report get internal server error response has a 4xx status code func (o *AdminReportGetInternalServerError) IsClientError() bool { return false } // IsServerError returns true when this admin report get internal server error response has a 5xx status code func (o *AdminReportGetInternalServerError) IsServerError() bool { return true } // IsCode returns true when this admin report get internal server error response a status code equal to that given func (o *AdminReportGetInternalServerError) IsCode(code int) bool { return code == 500 } // Code gets the status code for the admin report get internal server error response func (o *AdminReportGetInternalServerError) Code() int { return 500 } func (o *AdminReportGetInternalServerError) Error() string { return fmt.Sprintf("[GET /api/v1/admin/reports/{id}][%d] adminReportGetInternalServerError", 500) } func (o *AdminReportGetInternalServerError) String() string { return fmt.Sprintf("[GET /api/v1/admin/reports/{id}][%d] adminReportGetInternalServerError", 500) } func (o *AdminReportGetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil }