/
service_explain_responses.go
238 lines (177 loc) · 6.74 KB
/
service_explain_responses.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
// Code generated by go-swagger; DO NOT EDIT.
package service
// 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/kuberlogic/kuberlogic/modules/dynamic-apiserver/pkg/generated/models"
)
// ServiceExplainOKCode is the HTTP code returned for type ServiceExplainOK
const ServiceExplainOKCode int = 200
/*ServiceExplainOK kuberlogic service explain
swagger:response serviceExplainOK
*/
type ServiceExplainOK struct {
/*
In: Body
*/
Payload *models.Explain `json:"body,omitempty"`
}
// NewServiceExplainOK creates ServiceExplainOK with default headers values
func NewServiceExplainOK() *ServiceExplainOK {
return &ServiceExplainOK{}
}
// WithPayload adds the payload to the service explain o k response
func (o *ServiceExplainOK) WithPayload(payload *models.Explain) *ServiceExplainOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the service explain o k response
func (o *ServiceExplainOK) SetPayload(payload *models.Explain) {
o.Payload = payload
}
// WriteResponse to the client
func (o *ServiceExplainOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
// ServiceExplainBadRequestCode is the HTTP code returned for type ServiceExplainBadRequest
const ServiceExplainBadRequestCode int = 400
/*ServiceExplainBadRequest bad input parameter
swagger:response serviceExplainBadRequest
*/
type ServiceExplainBadRequest struct {
/*
In: Body
*/
Payload *models.Error `json:"body,omitempty"`
}
// NewServiceExplainBadRequest creates ServiceExplainBadRequest with default headers values
func NewServiceExplainBadRequest() *ServiceExplainBadRequest {
return &ServiceExplainBadRequest{}
}
// WithPayload adds the payload to the service explain bad request response
func (o *ServiceExplainBadRequest) WithPayload(payload *models.Error) *ServiceExplainBadRequest {
o.Payload = payload
return o
}
// SetPayload sets the payload to the service explain bad request response
func (o *ServiceExplainBadRequest) SetPayload(payload *models.Error) {
o.Payload = payload
}
// WriteResponse to the client
func (o *ServiceExplainBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(400)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
// ServiceExplainUnauthorizedCode is the HTTP code returned for type ServiceExplainUnauthorized
const ServiceExplainUnauthorizedCode int = 401
/*ServiceExplainUnauthorized bad authentication
swagger:response serviceExplainUnauthorized
*/
type ServiceExplainUnauthorized struct {
}
// NewServiceExplainUnauthorized creates ServiceExplainUnauthorized with default headers values
func NewServiceExplainUnauthorized() *ServiceExplainUnauthorized {
return &ServiceExplainUnauthorized{}
}
// WriteResponse to the client
func (o *ServiceExplainUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(401)
}
// ServiceExplainForbiddenCode is the HTTP code returned for type ServiceExplainForbidden
const ServiceExplainForbiddenCode int = 403
/*ServiceExplainForbidden bad permissions
swagger:response serviceExplainForbidden
*/
type ServiceExplainForbidden struct {
}
// NewServiceExplainForbidden creates ServiceExplainForbidden with default headers values
func NewServiceExplainForbidden() *ServiceExplainForbidden {
return &ServiceExplainForbidden{}
}
// WriteResponse to the client
func (o *ServiceExplainForbidden) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(403)
}
// ServiceExplainUnprocessableEntityCode is the HTTP code returned for type ServiceExplainUnprocessableEntity
const ServiceExplainUnprocessableEntityCode int = 422
/*ServiceExplainUnprocessableEntity bad validation
swagger:response serviceExplainUnprocessableEntity
*/
type ServiceExplainUnprocessableEntity struct {
/*
In: Body
*/
Payload *models.Error `json:"body,omitempty"`
}
// NewServiceExplainUnprocessableEntity creates ServiceExplainUnprocessableEntity with default headers values
func NewServiceExplainUnprocessableEntity() *ServiceExplainUnprocessableEntity {
return &ServiceExplainUnprocessableEntity{}
}
// WithPayload adds the payload to the service explain unprocessable entity response
func (o *ServiceExplainUnprocessableEntity) WithPayload(payload *models.Error) *ServiceExplainUnprocessableEntity {
o.Payload = payload
return o
}
// SetPayload sets the payload to the service explain unprocessable entity response
func (o *ServiceExplainUnprocessableEntity) SetPayload(payload *models.Error) {
o.Payload = payload
}
// WriteResponse to the client
func (o *ServiceExplainUnprocessableEntity) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(422)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
// ServiceExplainServiceUnavailableCode is the HTTP code returned for type ServiceExplainServiceUnavailable
const ServiceExplainServiceUnavailableCode int = 503
/*ServiceExplainServiceUnavailable internal server error
swagger:response serviceExplainServiceUnavailable
*/
type ServiceExplainServiceUnavailable struct {
/*
In: Body
*/
Payload *models.Error `json:"body,omitempty"`
}
// NewServiceExplainServiceUnavailable creates ServiceExplainServiceUnavailable with default headers values
func NewServiceExplainServiceUnavailable() *ServiceExplainServiceUnavailable {
return &ServiceExplainServiceUnavailable{}
}
// WithPayload adds the payload to the service explain service unavailable response
func (o *ServiceExplainServiceUnavailable) WithPayload(payload *models.Error) *ServiceExplainServiceUnavailable {
o.Payload = payload
return o
}
// SetPayload sets the payload to the service explain service unavailable response
func (o *ServiceExplainServiceUnavailable) SetPayload(payload *models.Error) {
o.Payload = payload
}
// WriteResponse to the client
func (o *ServiceExplainServiceUnavailable) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(503)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}