// 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 ( "fmt" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" ) // DeleteAdminRunnerReader is a Reader for the DeleteAdminRunner structure. type DeleteAdminRunnerReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *DeleteAdminRunnerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 204: result := NewDeleteAdminRunnerNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 400: result := NewDeleteAdminRunnerBadRequest() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewDeleteAdminRunnerNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result default: return nil, runtime.NewAPIError("[DELETE /admin/actions/runners/{runner_id}] deleteAdminRunner", response, response.Code()) } } // NewDeleteAdminRunnerNoContent creates a DeleteAdminRunnerNoContent with default headers values func NewDeleteAdminRunnerNoContent() *DeleteAdminRunnerNoContent { return &DeleteAdminRunnerNoContent{} } /* DeleteAdminRunnerNoContent describes a response with status code 204, with default header values. runner has been deleted */ type DeleteAdminRunnerNoContent struct { } // IsSuccess returns true when this delete admin runner no content response has a 2xx status code func (o *DeleteAdminRunnerNoContent) IsSuccess() bool { return true } // IsRedirect returns true when this delete admin runner no content response has a 3xx status code func (o *DeleteAdminRunnerNoContent) IsRedirect() bool { return false } // IsClientError returns true when this delete admin runner no content response has a 4xx status code func (o *DeleteAdminRunnerNoContent) IsClientError() bool { return false } // IsServerError returns true when this delete admin runner no content response has a 5xx status code func (o *DeleteAdminRunnerNoContent) IsServerError() bool { return false } // IsCode returns true when this delete admin runner no content response a status code equal to that given func (o *DeleteAdminRunnerNoContent) IsCode(code int) bool { return code == 204 } // Code gets the status code for the delete admin runner no content response func (o *DeleteAdminRunnerNoContent) Code() int { return 204 } func (o *DeleteAdminRunnerNoContent) Error() string { return fmt.Sprintf("[DELETE /admin/actions/runners/{runner_id}][%d] deleteAdminRunnerNoContent", 204) } func (o *DeleteAdminRunnerNoContent) String() string { return fmt.Sprintf("[DELETE /admin/actions/runners/{runner_id}][%d] deleteAdminRunnerNoContent", 204) } func (o *DeleteAdminRunnerNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewDeleteAdminRunnerBadRequest creates a DeleteAdminRunnerBadRequest with default headers values func NewDeleteAdminRunnerBadRequest() *DeleteAdminRunnerBadRequest { return &DeleteAdminRunnerBadRequest{} } /* DeleteAdminRunnerBadRequest describes a response with status code 400, with default header values. APIError is error format response */ type DeleteAdminRunnerBadRequest struct { Message string URL string } // IsSuccess returns true when this delete admin runner bad request response has a 2xx status code func (o *DeleteAdminRunnerBadRequest) IsSuccess() bool { return false } // IsRedirect returns true when this delete admin runner bad request response has a 3xx status code func (o *DeleteAdminRunnerBadRequest) IsRedirect() bool { return false } // IsClientError returns true when this delete admin runner bad request response has a 4xx status code func (o *DeleteAdminRunnerBadRequest) IsClientError() bool { return true } // IsServerError returns true when this delete admin runner bad request response has a 5xx status code func (o *DeleteAdminRunnerBadRequest) IsServerError() bool { return false } // IsCode returns true when this delete admin runner bad request response a status code equal to that given func (o *DeleteAdminRunnerBadRequest) IsCode(code int) bool { return code == 400 } // Code gets the status code for the delete admin runner bad request response func (o *DeleteAdminRunnerBadRequest) Code() int { return 400 } func (o *DeleteAdminRunnerBadRequest) Error() string { return fmt.Sprintf("[DELETE /admin/actions/runners/{runner_id}][%d] deleteAdminRunnerBadRequest", 400) } func (o *DeleteAdminRunnerBadRequest) String() string { return fmt.Sprintf("[DELETE /admin/actions/runners/{runner_id}][%d] deleteAdminRunnerBadRequest", 400) } func (o *DeleteAdminRunnerBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // hydrates response header message hdrMessage := response.GetHeader("message") if hdrMessage != "" { o.Message = hdrMessage } // hydrates response header url hdrURL := response.GetHeader("url") if hdrURL != "" { o.URL = hdrURL } return nil } // NewDeleteAdminRunnerNotFound creates a DeleteAdminRunnerNotFound with default headers values func NewDeleteAdminRunnerNotFound() *DeleteAdminRunnerNotFound { return &DeleteAdminRunnerNotFound{} } /* DeleteAdminRunnerNotFound describes a response with status code 404, with default header values. APINotFound is a not found empty response */ type DeleteAdminRunnerNotFound struct { } // IsSuccess returns true when this delete admin runner not found response has a 2xx status code func (o *DeleteAdminRunnerNotFound) IsSuccess() bool { return false } // IsRedirect returns true when this delete admin runner not found response has a 3xx status code func (o *DeleteAdminRunnerNotFound) IsRedirect() bool { return false } // IsClientError returns true when this delete admin runner not found response has a 4xx status code func (o *DeleteAdminRunnerNotFound) IsClientError() bool { return true } // IsServerError returns true when this delete admin runner not found response has a 5xx status code func (o *DeleteAdminRunnerNotFound) IsServerError() bool { return false } // IsCode returns true when this delete admin runner not found response a status code equal to that given func (o *DeleteAdminRunnerNotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the delete admin runner not found response func (o *DeleteAdminRunnerNotFound) Code() int { return 404 } func (o *DeleteAdminRunnerNotFound) Error() string { return fmt.Sprintf("[DELETE /admin/actions/runners/{runner_id}][%d] deleteAdminRunnerNotFound", 404) } func (o *DeleteAdminRunnerNotFound) String() string { return fmt.Sprintf("[DELETE /admin/actions/runners/{runner_id}][%d] deleteAdminRunnerNotFound", 404) } func (o *DeleteAdminRunnerNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil }