// Code generated by ogen, DO NOT EDIT.

package ogent

import (
	"github.com/go-faster/jx"
)

type CreateTodoReq struct {
	Title string  `json:"title"`
	Done  OptBool `json:"done"`
}

// GetTitle returns the value of Title.
func (s *CreateTodoReq) GetTitle() string {
	return s.Title
}

// GetDone returns the value of Done.
func (s *CreateTodoReq) GetDone() OptBool {
	return s.Done
}

// SetTitle sets the value of Title.
func (s *CreateTodoReq) SetTitle(val string) {
	s.Title = val
}

// SetDone sets the value of Done.
func (s *CreateTodoReq) SetDone(val OptBool) {
	s.Done = val
}

// DeleteTodoNoContent is response for DeleteTodo operation.
type DeleteTodoNoContent struct{}

func (*DeleteTodoNoContent) deleteTodoRes() {}

type ListTodoOKApplicationJSON []TodoList

func (*ListTodoOKApplicationJSON) listTodoRes() {}

// MarkDoneNoContent is response for MarkDone operation.
type MarkDoneNoContent struct{}

// NewOptBool returns new OptBool with value set to v.
func NewOptBool(v bool) OptBool {
	return OptBool{
		Value: v,
		Set:   true,
	}
}

// OptBool is optional bool.
type OptBool struct {
	Value bool
	Set   bool
}

// IsSet returns true if OptBool was set.
func (o OptBool) IsSet() bool { return o.Set }

// Reset unsets value.
func (o *OptBool) Reset() {
	var v bool
	o.Value = v
	o.Set = false
}

// SetTo sets value to v.
func (o *OptBool) SetTo(v bool) {
	o.Set = true
	o.Value = v
}

// Get returns value and boolean that denotes whether value was set.
func (o OptBool) Get() (v bool, ok bool) {
	if !o.Set {
		return v, false
	}
	return o.Value, true
}

// Or returns value if set, or given parameter if does not.
func (o OptBool) Or(d bool) bool {
	if v, ok := o.Get(); ok {
		return v
	}
	return d
}

// NewOptInt returns new OptInt with value set to v.
func NewOptInt(v int) OptInt {
	return OptInt{
		Value: v,
		Set:   true,
	}
}

// OptInt is optional int.
type OptInt struct {
	Value int
	Set   bool
}

// IsSet returns true if OptInt was set.
func (o OptInt) IsSet() bool { return o.Set }

// Reset unsets value.
func (o *OptInt) Reset() {
	var v int
	o.Value = v
	o.Set = false
}

// SetTo sets value to v.
func (o *OptInt) SetTo(v int) {
	o.Set = true
	o.Value = v
}

// Get returns value and boolean that denotes whether value was set.
func (o OptInt) Get() (v int, ok bool) {
	if !o.Set {
		return v, false
	}
	return o.Value, true
}

// Or returns value if set, or given parameter if does not.
func (o OptInt) Or(d int) int {
	if v, ok := o.Get(); ok {
		return v
	}
	return d
}

// NewOptString returns new OptString with value set to v.
func NewOptString(v string) OptString {
	return OptString{
		Value: v,
		Set:   true,
	}
}

// OptString is optional string.
type OptString struct {
	Value string
	Set   bool
}

// IsSet returns true if OptString was set.
func (o OptString) IsSet() bool { return o.Set }

// Reset unsets value.
func (o *OptString) Reset() {
	var v string
	o.Value = v
	o.Set = false
}

// SetTo sets value to v.
func (o *OptString) SetTo(v string) {
	o.Set = true
	o.Value = v
}

// Get returns value and boolean that denotes whether value was set.
func (o OptString) Get() (v string, ok bool) {
	if !o.Set {
		return v, false
	}
	return o.Value, true
}

// Or returns value if set, or given parameter if does not.
func (o OptString) Or(d string) string {
	if v, ok := o.Get(); ok {
		return v
	}
	return d
}

type R400 struct {
	Code   int    `json:"code"`
	Status string `json:"status"`
	Errors jx.Raw `json:"errors"`
}

// GetCode returns the value of Code.
func (s *R400) GetCode() int {
	return s.Code
}

// GetStatus returns the value of Status.
func (s *R400) GetStatus() string {
	return s.Status
}

// GetErrors returns the value of Errors.
func (s *R400) GetErrors() jx.Raw {
	return s.Errors
}

// SetCode sets the value of Code.
func (s *R400) SetCode(val int) {
	s.Code = val
}

// SetStatus sets the value of Status.
func (s *R400) SetStatus(val string) {
	s.Status = val
}

// SetErrors sets the value of Errors.
func (s *R400) SetErrors(val jx.Raw) {
	s.Errors = val
}

func (*R400) createTodoRes() {}
func (*R400) deleteTodoRes() {}
func (*R400) listTodoRes()   {}
func (*R400) readTodoRes()   {}
func (*R400) updateTodoRes() {}

type R404 struct {
	Code   int    `json:"code"`
	Status string `json:"status"`
	Errors jx.Raw `json:"errors"`
}

// GetCode returns the value of Code.
func (s *R404) GetCode() int {
	return s.Code
}

// GetStatus returns the value of Status.
func (s *R404) GetStatus() string {
	return s.Status
}

// GetErrors returns the value of Errors.
func (s *R404) GetErrors() jx.Raw {
	return s.Errors
}

// SetCode sets the value of Code.
func (s *R404) SetCode(val int) {
	s.Code = val
}

// SetStatus sets the value of Status.
func (s *R404) SetStatus(val string) {
	s.Status = val
}

// SetErrors sets the value of Errors.
func (s *R404) SetErrors(val jx.Raw) {
	s.Errors = val
}

func (*R404) deleteTodoRes() {}
func (*R404) listTodoRes()   {}
func (*R404) readTodoRes()   {}
func (*R404) updateTodoRes() {}

type R409 struct {
	Code   int    `json:"code"`
	Status string `json:"status"`
	Errors jx.Raw `json:"errors"`
}

// GetCode returns the value of Code.
func (s *R409) GetCode() int {
	return s.Code
}

// GetStatus returns the value of Status.
func (s *R409) GetStatus() string {
	return s.Status
}

// GetErrors returns the value of Errors.
func (s *R409) GetErrors() jx.Raw {
	return s.Errors
}

// SetCode sets the value of Code.
func (s *R409) SetCode(val int) {
	s.Code = val
}

// SetStatus sets the value of Status.
func (s *R409) SetStatus(val string) {
	s.Status = val
}

// SetErrors sets the value of Errors.
func (s *R409) SetErrors(val jx.Raw) {
	s.Errors = val
}

func (*R409) createTodoRes() {}
func (*R409) deleteTodoRes() {}
func (*R409) listTodoRes()   {}
func (*R409) readTodoRes()   {}
func (*R409) updateTodoRes() {}

type R500 struct {
	Code   int    `json:"code"`
	Status string `json:"status"`
	Errors jx.Raw `json:"errors"`
}

// GetCode returns the value of Code.
func (s *R500) GetCode() int {
	return s.Code
}

// GetStatus returns the value of Status.
func (s *R500) GetStatus() string {
	return s.Status
}

// GetErrors returns the value of Errors.
func (s *R500) GetErrors() jx.Raw {
	return s.Errors
}

// SetCode sets the value of Code.
func (s *R500) SetCode(val int) {
	s.Code = val
}

// SetStatus sets the value of Status.
func (s *R500) SetStatus(val string) {
	s.Status = val
}

// SetErrors sets the value of Errors.
func (s *R500) SetErrors(val jx.Raw) {
	s.Errors = val
}

func (*R500) createTodoRes() {}
func (*R500) deleteTodoRes() {}
func (*R500) listTodoRes()   {}
func (*R500) readTodoRes()   {}
func (*R500) updateTodoRes() {}

// Ref: #/components/schemas/TodoCreate
type TodoCreate struct {
	ID    int     `json:"id"`
	Title string  `json:"title"`
	Done  OptBool `json:"done"`
}

// GetID returns the value of ID.
func (s *TodoCreate) GetID() int {
	return s.ID
}

// GetTitle returns the value of Title.
func (s *TodoCreate) GetTitle() string {
	return s.Title
}

// GetDone returns the value of Done.
func (s *TodoCreate) GetDone() OptBool {
	return s.Done
}

// SetID sets the value of ID.
func (s *TodoCreate) SetID(val int) {
	s.ID = val
}

// SetTitle sets the value of Title.
func (s *TodoCreate) SetTitle(val string) {
	s.Title = val
}

// SetDone sets the value of Done.
func (s *TodoCreate) SetDone(val OptBool) {
	s.Done = val
}

func (*TodoCreate) createTodoRes() {}

// Ref: #/components/schemas/TodoList
type TodoList struct {
	ID    int     `json:"id"`
	Title string  `json:"title"`
	Done  OptBool `json:"done"`
}

// GetID returns the value of ID.
func (s *TodoList) GetID() int {
	return s.ID
}

// GetTitle returns the value of Title.
func (s *TodoList) GetTitle() string {
	return s.Title
}

// GetDone returns the value of Done.
func (s *TodoList) GetDone() OptBool {
	return s.Done
}

// SetID sets the value of ID.
func (s *TodoList) SetID(val int) {
	s.ID = val
}

// SetTitle sets the value of Title.
func (s *TodoList) SetTitle(val string) {
	s.Title = val
}

// SetDone sets the value of Done.
func (s *TodoList) SetDone(val OptBool) {
	s.Done = val
}

// Ref: #/components/schemas/TodoRead
type TodoRead struct {
	ID    int     `json:"id"`
	Title string  `json:"title"`
	Done  OptBool `json:"done"`
}

// GetID returns the value of ID.
func (s *TodoRead) GetID() int {
	return s.ID
}

// GetTitle returns the value of Title.
func (s *TodoRead) GetTitle() string {
	return s.Title
}

// GetDone returns the value of Done.
func (s *TodoRead) GetDone() OptBool {
	return s.Done
}

// SetID sets the value of ID.
func (s *TodoRead) SetID(val int) {
	s.ID = val
}

// SetTitle sets the value of Title.
func (s *TodoRead) SetTitle(val string) {
	s.Title = val
}

// SetDone sets the value of Done.
func (s *TodoRead) SetDone(val OptBool) {
	s.Done = val
}

func (*TodoRead) readTodoRes() {}

// Ref: #/components/schemas/TodoUpdate
type TodoUpdate struct {
	ID    int     `json:"id"`
	Title string  `json:"title"`
	Done  OptBool `json:"done"`
}

// GetID returns the value of ID.
func (s *TodoUpdate) GetID() int {
	return s.ID
}

// GetTitle returns the value of Title.
func (s *TodoUpdate) GetTitle() string {
	return s.Title
}

// GetDone returns the value of Done.
func (s *TodoUpdate) GetDone() OptBool {
	return s.Done
}

// SetID sets the value of ID.
func (s *TodoUpdate) SetID(val int) {
	s.ID = val
}

// SetTitle sets the value of Title.
func (s *TodoUpdate) SetTitle(val string) {
	s.Title = val
}

// SetDone sets the value of Done.
func (s *TodoUpdate) SetDone(val OptBool) {
	s.Done = val
}

func (*TodoUpdate) updateTodoRes() {}

type UpdateTodoReq struct {
	Title OptString `json:"title"`
	Done  OptBool   `json:"done"`
}

// GetTitle returns the value of Title.
func (s *UpdateTodoReq) GetTitle() OptString {
	return s.Title
}

// GetDone returns the value of Done.
func (s *UpdateTodoReq) GetDone() OptBool {
	return s.Done
}

// SetTitle sets the value of Title.
func (s *UpdateTodoReq) SetTitle(val OptString) {
	s.Title = val
}

// SetDone sets the value of Done.
func (s *UpdateTodoReq) SetDone(val OptBool) {
	s.Done = val
}
