2023-08-12 22:41:00 +00:00
|
|
|
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
|
|
|
|
|
|
package controller_info
|
|
|
|
|
|
|
|
|
|
// This file was generated by the swagger tool.
|
|
|
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
|
|
|
|
|
|
import (
|
2024-05-23 10:24:44 +00:00
|
|
|
"encoding/json"
|
2023-08-12 22:41:00 +00:00
|
|
|
"fmt"
|
|
|
|
|
"io"
|
|
|
|
|
|
|
|
|
|
"github.com/go-openapi/runtime"
|
|
|
|
|
"github.com/go-openapi/strfmt"
|
|
|
|
|
|
|
|
|
|
apiserver_params "github.com/cloudbase/garm/apiserver/params"
|
|
|
|
|
garm_params "github.com/cloudbase/garm/params"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// ControllerInfoReader is a Reader for the ControllerInfo structure.
|
|
|
|
|
type ControllerInfoReader struct {
|
|
|
|
|
formats strfmt.Registry
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
|
|
|
func (o *ControllerInfoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
|
|
|
switch response.Code() {
|
|
|
|
|
case 200:
|
|
|
|
|
result := NewControllerInfoOK()
|
|
|
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return result, nil
|
|
|
|
|
case 409:
|
|
|
|
|
result := NewControllerInfoConflict()
|
|
|
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return nil, result
|
|
|
|
|
default:
|
|
|
|
|
return nil, runtime.NewAPIError("[GET /controller-info] ControllerInfo", response, response.Code())
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewControllerInfoOK creates a ControllerInfoOK with default headers values
|
|
|
|
|
func NewControllerInfoOK() *ControllerInfoOK {
|
|
|
|
|
return &ControllerInfoOK{}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
ControllerInfoOK describes a response with status code 200, with default header values.
|
|
|
|
|
|
|
|
|
|
ControllerInfo
|
|
|
|
|
*/
|
|
|
|
|
type ControllerInfoOK struct {
|
|
|
|
|
Payload garm_params.ControllerInfo
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// IsSuccess returns true when this controller info o k response has a 2xx status code
|
|
|
|
|
func (o *ControllerInfoOK) IsSuccess() bool {
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// IsRedirect returns true when this controller info o k response has a 3xx status code
|
|
|
|
|
func (o *ControllerInfoOK) IsRedirect() bool {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// IsClientError returns true when this controller info o k response has a 4xx status code
|
|
|
|
|
func (o *ControllerInfoOK) IsClientError() bool {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// IsServerError returns true when this controller info o k response has a 5xx status code
|
|
|
|
|
func (o *ControllerInfoOK) IsServerError() bool {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// IsCode returns true when this controller info o k response a status code equal to that given
|
|
|
|
|
func (o *ControllerInfoOK) IsCode(code int) bool {
|
|
|
|
|
return code == 200
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Code gets the status code for the controller info o k response
|
|
|
|
|
func (o *ControllerInfoOK) Code() int {
|
|
|
|
|
return 200
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (o *ControllerInfoOK) Error() string {
|
2024-05-23 10:24:44 +00:00
|
|
|
payload, _ := json.Marshal(o.Payload)
|
|
|
|
|
return fmt.Sprintf("[GET /controller-info][%d] controllerInfoOK %s", 200, payload)
|
2023-08-12 22:41:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (o *ControllerInfoOK) String() string {
|
2024-05-23 10:24:44 +00:00
|
|
|
payload, _ := json.Marshal(o.Payload)
|
|
|
|
|
return fmt.Sprintf("[GET /controller-info][%d] controllerInfoOK %s", 200, payload)
|
2023-08-12 22:41:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (o *ControllerInfoOK) GetPayload() garm_params.ControllerInfo {
|
|
|
|
|
return o.Payload
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (o *ControllerInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
|
|
|
|
|
|
// response payload
|
|
|
|
|
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewControllerInfoConflict creates a ControllerInfoConflict with default headers values
|
|
|
|
|
func NewControllerInfoConflict() *ControllerInfoConflict {
|
|
|
|
|
return &ControllerInfoConflict{}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
ControllerInfoConflict describes a response with status code 409, with default header values.
|
|
|
|
|
|
|
|
|
|
APIErrorResponse
|
|
|
|
|
*/
|
|
|
|
|
type ControllerInfoConflict struct {
|
|
|
|
|
Payload apiserver_params.APIErrorResponse
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// IsSuccess returns true when this controller info conflict response has a 2xx status code
|
|
|
|
|
func (o *ControllerInfoConflict) IsSuccess() bool {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// IsRedirect returns true when this controller info conflict response has a 3xx status code
|
|
|
|
|
func (o *ControllerInfoConflict) IsRedirect() bool {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// IsClientError returns true when this controller info conflict response has a 4xx status code
|
|
|
|
|
func (o *ControllerInfoConflict) IsClientError() bool {
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// IsServerError returns true when this controller info conflict response has a 5xx status code
|
|
|
|
|
func (o *ControllerInfoConflict) IsServerError() bool {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// IsCode returns true when this controller info conflict response a status code equal to that given
|
|
|
|
|
func (o *ControllerInfoConflict) IsCode(code int) bool {
|
|
|
|
|
return code == 409
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Code gets the status code for the controller info conflict response
|
|
|
|
|
func (o *ControllerInfoConflict) Code() int {
|
|
|
|
|
return 409
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (o *ControllerInfoConflict) Error() string {
|
2024-05-23 10:24:44 +00:00
|
|
|
payload, _ := json.Marshal(o.Payload)
|
|
|
|
|
return fmt.Sprintf("[GET /controller-info][%d] controllerInfoConflict %s", 409, payload)
|
2023-08-12 22:41:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (o *ControllerInfoConflict) String() string {
|
2024-05-23 10:24:44 +00:00
|
|
|
payload, _ := json.Marshal(o.Payload)
|
|
|
|
|
return fmt.Sprintf("[GET /controller-info][%d] controllerInfoConflict %s", 409, payload)
|
2023-08-12 22:41:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (o *ControllerInfoConflict) GetPayload() apiserver_params.APIErrorResponse {
|
|
|
|
|
return o.Payload
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (o *ControllerInfoConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
|
|
|
|
|
|
// response payload
|
|
|
|
|
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return nil
|
|
|
|
|
}
|