Cyclops 4 HPC is the purpose built stack to support large HPC centers with resource accounting and billing of cluster as well as cloud resources.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
cyclops-4-hpc/services/udr/restapi/operations/metrics_management/get_metrics_responses.go

105 lines
2.8 KiB

// Code generated by go-swagger; DO NOT EDIT.
package metrics_management
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/Cyclops-Labs/cyclops-4-hpc.git/services/udr/models"
)
// GetMetricsOKCode is the HTTP code returned for type GetMetricsOK
const GetMetricsOKCode int = 200
/*GetMetricsOK Description of a successfully operation
swagger:response getMetricsOK
*/
type GetMetricsOK struct {
/*
In: Body
*/
Payload []*models.Metric `json:"body,omitempty"`
}
// NewGetMetricsOK creates GetMetricsOK with default headers values
func NewGetMetricsOK() *GetMetricsOK {
return &GetMetricsOK{}
}
// WithPayload adds the payload to the get metrics o k response
func (o *GetMetricsOK) WithPayload(payload []*models.Metric) *GetMetricsOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get metrics o k response
func (o *GetMetricsOK) SetPayload(payload []*models.Metric) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetMetricsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
payload := o.Payload
if payload == nil {
// return empty array
payload = make([]*models.Metric, 0, 50)
}
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
// GetMetricsInternalServerErrorCode is the HTTP code returned for type GetMetricsInternalServerError
const GetMetricsInternalServerErrorCode int = 500
/*GetMetricsInternalServerError Something unexpected happend, error raised
swagger:response getMetricsInternalServerError
*/
type GetMetricsInternalServerError struct {
/*
In: Body
*/
Payload *models.ErrorResponse `json:"body,omitempty"`
}
// NewGetMetricsInternalServerError creates GetMetricsInternalServerError with default headers values
func NewGetMetricsInternalServerError() *GetMetricsInternalServerError {
return &GetMetricsInternalServerError{}
}
// WithPayload adds the payload to the get metrics internal server error response
func (o *GetMetricsInternalServerError) WithPayload(payload *models.ErrorResponse) *GetMetricsInternalServerError {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get metrics internal server error response
func (o *GetMetricsInternalServerError) SetPayload(payload *models.ErrorResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetMetricsInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(500)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}