// 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 } } }