229 lines
6.7 KiB
Go
229 lines
6.7 KiB
Go
// 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"
|
|
)
|
|
|
|
// GetAdminRunnerReader is a Reader for the GetAdminRunner structure.
|
|
type GetAdminRunnerReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetAdminRunnerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetAdminRunnerOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 400:
|
|
result := NewGetAdminRunnerBadRequest()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewGetAdminRunnerNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("[GET /admin/actions/runners/{runner_id}] getAdminRunner", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewGetAdminRunnerOK creates a GetAdminRunnerOK with default headers values
|
|
func NewGetAdminRunnerOK() *GetAdminRunnerOK {
|
|
return &GetAdminRunnerOK{}
|
|
}
|
|
|
|
/*
|
|
GetAdminRunnerOK describes a response with status code 200, with default header values.
|
|
|
|
ActionRunner represents a Runner
|
|
*/
|
|
type GetAdminRunnerOK struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this get admin runner o k response has a 2xx status code
|
|
func (o *GetAdminRunnerOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this get admin runner o k response has a 3xx status code
|
|
func (o *GetAdminRunnerOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get admin runner o k response has a 4xx status code
|
|
func (o *GetAdminRunnerOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get admin runner o k response has a 5xx status code
|
|
func (o *GetAdminRunnerOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get admin runner o k response a status code equal to that given
|
|
func (o *GetAdminRunnerOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the get admin runner o k response
|
|
func (o *GetAdminRunnerOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *GetAdminRunnerOK) Error() string {
|
|
return fmt.Sprintf("[GET /admin/actions/runners/{runner_id}][%d] getAdminRunnerOK", 200)
|
|
}
|
|
|
|
func (o *GetAdminRunnerOK) String() string {
|
|
return fmt.Sprintf("[GET /admin/actions/runners/{runner_id}][%d] getAdminRunnerOK", 200)
|
|
}
|
|
|
|
func (o *GetAdminRunnerOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetAdminRunnerBadRequest creates a GetAdminRunnerBadRequest with default headers values
|
|
func NewGetAdminRunnerBadRequest() *GetAdminRunnerBadRequest {
|
|
return &GetAdminRunnerBadRequest{}
|
|
}
|
|
|
|
/*
|
|
GetAdminRunnerBadRequest describes a response with status code 400, with default header values.
|
|
|
|
APIError is error format response
|
|
*/
|
|
type GetAdminRunnerBadRequest struct {
|
|
Message string
|
|
URL string
|
|
}
|
|
|
|
// IsSuccess returns true when this get admin runner bad request response has a 2xx status code
|
|
func (o *GetAdminRunnerBadRequest) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get admin runner bad request response has a 3xx status code
|
|
func (o *GetAdminRunnerBadRequest) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get admin runner bad request response has a 4xx status code
|
|
func (o *GetAdminRunnerBadRequest) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get admin runner bad request response has a 5xx status code
|
|
func (o *GetAdminRunnerBadRequest) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get admin runner bad request response a status code equal to that given
|
|
func (o *GetAdminRunnerBadRequest) IsCode(code int) bool {
|
|
return code == 400
|
|
}
|
|
|
|
// Code gets the status code for the get admin runner bad request response
|
|
func (o *GetAdminRunnerBadRequest) Code() int {
|
|
return 400
|
|
}
|
|
|
|
func (o *GetAdminRunnerBadRequest) Error() string {
|
|
return fmt.Sprintf("[GET /admin/actions/runners/{runner_id}][%d] getAdminRunnerBadRequest", 400)
|
|
}
|
|
|
|
func (o *GetAdminRunnerBadRequest) String() string {
|
|
return fmt.Sprintf("[GET /admin/actions/runners/{runner_id}][%d] getAdminRunnerBadRequest", 400)
|
|
}
|
|
|
|
func (o *GetAdminRunnerBadRequest) 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
|
|
}
|
|
|
|
// NewGetAdminRunnerNotFound creates a GetAdminRunnerNotFound with default headers values
|
|
func NewGetAdminRunnerNotFound() *GetAdminRunnerNotFound {
|
|
return &GetAdminRunnerNotFound{}
|
|
}
|
|
|
|
/*
|
|
GetAdminRunnerNotFound describes a response with status code 404, with default header values.
|
|
|
|
APINotFound is a not found empty response
|
|
*/
|
|
type GetAdminRunnerNotFound struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this get admin runner not found response has a 2xx status code
|
|
func (o *GetAdminRunnerNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get admin runner not found response has a 3xx status code
|
|
func (o *GetAdminRunnerNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get admin runner not found response has a 4xx status code
|
|
func (o *GetAdminRunnerNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get admin runner not found response has a 5xx status code
|
|
func (o *GetAdminRunnerNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get admin runner not found response a status code equal to that given
|
|
func (o *GetAdminRunnerNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the get admin runner not found response
|
|
func (o *GetAdminRunnerNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *GetAdminRunnerNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /admin/actions/runners/{runner_id}][%d] getAdminRunnerNotFound", 404)
|
|
}
|
|
|
|
func (o *GetAdminRunnerNotFound) String() string {
|
|
return fmt.Sprintf("[GET /admin/actions/runners/{runner_id}][%d] getAdminRunnerNotFound", 404)
|
|
}
|
|
|
|
func (o *GetAdminRunnerNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|