233 lines
4.5 KiB
Go
233 lines
4.5 KiB
Go
// Code generated by ogen, DO NOT EDIT.
|
|
|
|
package openapi
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
func (s *ErrorStatusCode) Error() string {
|
|
return fmt.Sprintf("code %d: %+v", s.StatusCode, s.Response)
|
|
}
|
|
|
|
// Ref: #/components/schemas/Error
|
|
type Error struct {
|
|
Message string `json:"message"`
|
|
Code int `json:"code"`
|
|
}
|
|
|
|
// GetMessage returns the value of Message.
|
|
func (s *Error) GetMessage() string {
|
|
return s.Message
|
|
}
|
|
|
|
// GetCode returns the value of Code.
|
|
func (s *Error) GetCode() int {
|
|
return s.Code
|
|
}
|
|
|
|
// SetMessage sets the value of Message.
|
|
func (s *Error) SetMessage(val string) {
|
|
s.Message = val
|
|
}
|
|
|
|
// SetCode sets the value of Code.
|
|
func (s *Error) SetCode(val int) {
|
|
s.Code = val
|
|
}
|
|
|
|
func (*Error) groupsIDDeleteRes() {}
|
|
func (*Error) groupsIDGetRes() {}
|
|
func (*Error) groupsIDPutRes() {}
|
|
func (*Error) usersIDDeleteRes() {}
|
|
func (*Error) usersIDGetRes() {}
|
|
func (*Error) usersIDPutRes() {}
|
|
|
|
// ErrorStatusCode wraps Error with StatusCode.
|
|
type ErrorStatusCode struct {
|
|
StatusCode int
|
|
Response Error
|
|
}
|
|
|
|
// GetStatusCode returns the value of StatusCode.
|
|
func (s *ErrorStatusCode) GetStatusCode() int {
|
|
return s.StatusCode
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *ErrorStatusCode) GetResponse() Error {
|
|
return s.Response
|
|
}
|
|
|
|
// SetStatusCode sets the value of StatusCode.
|
|
func (s *ErrorStatusCode) SetStatusCode(val int) {
|
|
s.StatusCode = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *ErrorStatusCode) SetResponse(val Error) {
|
|
s.Response = val
|
|
}
|
|
|
|
// Ref: #/components/schemas/Group
|
|
type Group struct {
|
|
ID ID `json:"id"`
|
|
Name string `json:"name"`
|
|
UserIds []ID `json:"user_ids"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *Group) GetID() ID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetName returns the value of Name.
|
|
func (s *Group) GetName() string {
|
|
return s.Name
|
|
}
|
|
|
|
// GetUserIds returns the value of UserIds.
|
|
func (s *Group) GetUserIds() []ID {
|
|
return s.UserIds
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *Group) SetID(val ID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetName sets the value of Name.
|
|
func (s *Group) SetName(val string) {
|
|
s.Name = val
|
|
}
|
|
|
|
// SetUserIds sets the value of UserIds.
|
|
func (s *Group) SetUserIds(val []ID) {
|
|
s.UserIds = val
|
|
}
|
|
|
|
func (*Group) groupsIDGetRes() {}
|
|
func (*Group) groupsIDPutRes() {}
|
|
|
|
// Ref: #/components/schemas/GroupUpdate
|
|
type GroupUpdate struct {
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
// GetName returns the value of Name.
|
|
func (s *GroupUpdate) GetName() string {
|
|
return s.Name
|
|
}
|
|
|
|
// SetName sets the value of Name.
|
|
func (s *GroupUpdate) SetName(val string) {
|
|
s.Name = val
|
|
}
|
|
|
|
type ID int64
|
|
|
|
// Ref: #/components/schemas/Ok
|
|
type Ok struct {
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
// GetMessage returns the value of Message.
|
|
func (s *Ok) GetMessage() string {
|
|
return s.Message
|
|
}
|
|
|
|
// SetMessage sets the value of Message.
|
|
func (s *Ok) SetMessage(val string) {
|
|
s.Message = val
|
|
}
|
|
|
|
func (*Ok) groupsIDDeleteRes() {}
|
|
func (*Ok) usersIDDeleteRes() {}
|
|
|
|
// Ref: #/components/schemas/User
|
|
type User struct {
|
|
ID ID `json:"id"`
|
|
Name string `json:"name"`
|
|
Email string `json:"email"`
|
|
GroupID ID `json:"group_id"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *User) GetID() ID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetName returns the value of Name.
|
|
func (s *User) GetName() string {
|
|
return s.Name
|
|
}
|
|
|
|
// GetEmail returns the value of Email.
|
|
func (s *User) GetEmail() string {
|
|
return s.Email
|
|
}
|
|
|
|
// GetGroupID returns the value of GroupID.
|
|
func (s *User) GetGroupID() ID {
|
|
return s.GroupID
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *User) SetID(val ID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetName sets the value of Name.
|
|
func (s *User) SetName(val string) {
|
|
s.Name = val
|
|
}
|
|
|
|
// SetEmail sets the value of Email.
|
|
func (s *User) SetEmail(val string) {
|
|
s.Email = val
|
|
}
|
|
|
|
// SetGroupID sets the value of GroupID.
|
|
func (s *User) SetGroupID(val ID) {
|
|
s.GroupID = val
|
|
}
|
|
|
|
func (*User) usersIDGetRes() {}
|
|
func (*User) usersIDPutRes() {}
|
|
|
|
// Ref: #/components/schemas/UserUpdate
|
|
type UserUpdate struct {
|
|
Name string `json:"name"`
|
|
Email string `json:"email"`
|
|
GroupID ID `json:"group_id"`
|
|
}
|
|
|
|
// GetName returns the value of Name.
|
|
func (s *UserUpdate) GetName() string {
|
|
return s.Name
|
|
}
|
|
|
|
// GetEmail returns the value of Email.
|
|
func (s *UserUpdate) GetEmail() string {
|
|
return s.Email
|
|
}
|
|
|
|
// GetGroupID returns the value of GroupID.
|
|
func (s *UserUpdate) GetGroupID() ID {
|
|
return s.GroupID
|
|
}
|
|
|
|
// SetName sets the value of Name.
|
|
func (s *UserUpdate) SetName(val string) {
|
|
s.Name = val
|
|
}
|
|
|
|
// SetEmail sets the value of Email.
|
|
func (s *UserUpdate) SetEmail(val string) {
|
|
s.Email = val
|
|
}
|
|
|
|
// SetGroupID sets the value of GroupID.
|
|
func (s *UserUpdate) SetGroupID(val ID) {
|
|
s.GroupID = val
|
|
}
|