forked from mittwald/goharbor-client
/
delete_users_user_id_responses.go
189 lines (146 loc) · 5.78 KB
/
delete_users_user_id_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
// Code generated by go-swagger; DO NOT EDIT.
package products
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// DeleteUsersUserIDReader is a Reader for the DeleteUsersUserID structure.
type DeleteUsersUserIDReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *DeleteUsersUserIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewDeleteUsersUserIDOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewDeleteUsersUserIDBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewDeleteUsersUserIDUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewDeleteUsersUserIDForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewDeleteUsersUserIDNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewDeleteUsersUserIDInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
// NewDeleteUsersUserIDOK creates a DeleteUsersUserIDOK with default headers values
func NewDeleteUsersUserIDOK() *DeleteUsersUserIDOK {
return &DeleteUsersUserIDOK{}
}
/*DeleteUsersUserIDOK handles this case with default header values.
Marked user as be removed successfully.
*/
type DeleteUsersUserIDOK struct {
}
func (o *DeleteUsersUserIDOK) Error() string {
return fmt.Sprintf("[DELETE /users/{user_id}][%d] deleteUsersUserIdOK ", 200)
}
func (o *DeleteUsersUserIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewDeleteUsersUserIDBadRequest creates a DeleteUsersUserIDBadRequest with default headers values
func NewDeleteUsersUserIDBadRequest() *DeleteUsersUserIDBadRequest {
return &DeleteUsersUserIDBadRequest{}
}
/*DeleteUsersUserIDBadRequest handles this case with default header values.
Invalid user ID.
*/
type DeleteUsersUserIDBadRequest struct {
}
func (o *DeleteUsersUserIDBadRequest) Error() string {
return fmt.Sprintf("[DELETE /users/{user_id}][%d] deleteUsersUserIdBadRequest ", 400)
}
func (o *DeleteUsersUserIDBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewDeleteUsersUserIDUnauthorized creates a DeleteUsersUserIDUnauthorized with default headers values
func NewDeleteUsersUserIDUnauthorized() *DeleteUsersUserIDUnauthorized {
return &DeleteUsersUserIDUnauthorized{}
}
/*DeleteUsersUserIDUnauthorized handles this case with default header values.
User need to log in first.
*/
type DeleteUsersUserIDUnauthorized struct {
}
func (o *DeleteUsersUserIDUnauthorized) Error() string {
return fmt.Sprintf("[DELETE /users/{user_id}][%d] deleteUsersUserIdUnauthorized ", 401)
}
func (o *DeleteUsersUserIDUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewDeleteUsersUserIDForbidden creates a DeleteUsersUserIDForbidden with default headers values
func NewDeleteUsersUserIDForbidden() *DeleteUsersUserIDForbidden {
return &DeleteUsersUserIDForbidden{}
}
/*DeleteUsersUserIDForbidden handles this case with default header values.
User does not have permission of admin role.
*/
type DeleteUsersUserIDForbidden struct {
}
func (o *DeleteUsersUserIDForbidden) Error() string {
return fmt.Sprintf("[DELETE /users/{user_id}][%d] deleteUsersUserIdForbidden ", 403)
}
func (o *DeleteUsersUserIDForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewDeleteUsersUserIDNotFound creates a DeleteUsersUserIDNotFound with default headers values
func NewDeleteUsersUserIDNotFound() *DeleteUsersUserIDNotFound {
return &DeleteUsersUserIDNotFound{}
}
/*DeleteUsersUserIDNotFound handles this case with default header values.
User ID does not exist.
*/
type DeleteUsersUserIDNotFound struct {
}
func (o *DeleteUsersUserIDNotFound) Error() string {
return fmt.Sprintf("[DELETE /users/{user_id}][%d] deleteUsersUserIdNotFound ", 404)
}
func (o *DeleteUsersUserIDNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewDeleteUsersUserIDInternalServerError creates a DeleteUsersUserIDInternalServerError with default headers values
func NewDeleteUsersUserIDInternalServerError() *DeleteUsersUserIDInternalServerError {
return &DeleteUsersUserIDInternalServerError{}
}
/*DeleteUsersUserIDInternalServerError handles this case with default header values.
Unexpected internal errors.
*/
type DeleteUsersUserIDInternalServerError struct {
}
func (o *DeleteUsersUserIDInternalServerError) Error() string {
return fmt.Sprintf("[DELETE /users/{user_id}][%d] deleteUsersUserIdInternalServerError ", 500)
}
func (o *DeleteUsersUserIDInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}