Organizer ist der Backend-Server der Organizer-App.
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.
Organizer/restapi/operations/timetable/get_timetable_responses.go

81 lines
2.0 KiB

// Code generated by go-swagger; DO NOT EDIT.
package timetable
// 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"
"git.jonasfranz.software/JonasFranzDEV/Organizer/models"
)
// GetTimetableOKCode is the HTTP code returned for type GetTimetableOK
const GetTimetableOKCode int = 200
/*GetTimetableOK Lessons sorted by weekday, period and teacher.
swagger:response getTimetableOK
*/
type GetTimetableOK struct {
/*
In: Body
*/
Payload []*models.Lesson `json:"body,omitempty"`
}
// NewGetTimetableOK creates GetTimetableOK with default headers values
func NewGetTimetableOK() *GetTimetableOK {
return &GetTimetableOK{}
}
// WithPayload adds the payload to the get timetable o k response
func (o *GetTimetableOK) WithPayload(payload []*models.Lesson) *GetTimetableOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get timetable o k response
func (o *GetTimetableOK) SetPayload(payload []*models.Lesson) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetTimetableOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
payload := o.Payload
if payload == nil {
payload = make([]*models.Lesson, 0, 50)
}
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
// GetTimetableNotFoundCode is the HTTP code returned for type GetTimetableNotFound
const GetTimetableNotFoundCode int = 404
/*GetTimetableNotFound Cannot find the course
swagger:response getTimetableNotFound
*/
type GetTimetableNotFound struct {
}
// NewGetTimetableNotFound creates GetTimetableNotFound with default headers values
func NewGetTimetableNotFound() *GetTimetableNotFound {
return &GetTimetableNotFound{}
}
// WriteResponse to the client
func (o *GetTimetableNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(404)
}