// Code generated by ogen, DO NOT EDIT.
package gen
import (
"github.com/go-faster/jx"
)
// Ref: #/components/schemas/AddCommentRequest
type AddCommentRequest struct {
Parent jx.Raw `json:"parent"`
RichText []jx.Raw `json:"rich_text"`
}
// GetParent returns the value of Parent.
func (s *AddCommentRequest) GetParent() jx.Raw {
return s.Parent
}
// GetRichText returns the value of RichText.
func (s *AddCommentRequest) GetRichText() []jx.Raw {
return s.RichText
}
// SetParent sets the value of Parent.
func (s *AddCommentRequest) SetParent(val jx.Raw) {
s.Parent = val
}
// SetRichText sets the value of RichText.
func (s *AddCommentRequest) SetRichText(val []jx.Raw) {
s.RichText = val
}
// Ref: #/components/schemas/AppendBlockChildrenRequest
type AppendBlockChildrenRequest struct {
Children []jx.Raw `json:"children"`
}
// GetChildren returns the value of Children.
func (s *AppendBlockChildrenRequest) GetChildren() []jx.Raw {
return s.Children
}
// SetChildren sets the value of Children.
func (s *AppendBlockChildrenRequest) SetChildren(val []jx.Raw) {
s.Children = val
}
type BearerAuth struct {
Token string
Roles []string
}
// GetToken returns the value of Token.
func (s *BearerAuth) GetToken() string {
return s.Token
}
// GetRoles returns the value of Roles.
func (s *BearerAuth) GetRoles() []string {
return s.Roles
}
// SetToken sets the value of Token.
func (s *BearerAuth) SetToken(val string) {
s.Token = val
}
// SetRoles sets the value of Roles.
func (s *BearerAuth) SetRoles(val []string) {
s.Roles = val
}
// Ref: #/components/schemas/Block
type Block struct {
Object OptString `json:"object"`
ID OptString `json:"id"`
Type OptString `json:"type"`
Archived OptBool `json:"archived"`
HasChildren OptBool `json:"has_children"`
Parent jx.Raw `json:"parent"`
}
// GetObject returns the value of Object.
func (s *Block) GetObject() OptString {
return s.Object
}
// GetID returns the value of ID.
func (s *Block) GetID() OptString {
return s.ID
}
// GetType returns the value of Type.
func (s *Block) GetType() OptString {
return s.Type
}
// GetArchived returns the value of Archived.
func (s *Block) GetArchived() OptBool {
return s.Archived
}
// GetHasChildren returns the value of HasChildren.
func (s *Block) GetHasChildren() OptBool {
return s.HasChildren
}
// GetParent returns the value of Parent.
func (s *Block) GetParent() jx.Raw {
return s.Parent
}
// SetObject sets the value of Object.
func (s *Block) SetObject(val OptString) {
s.Object = val
}
// SetID sets the value of ID.
func (s *Block) SetID(val OptString) {
s.ID = val
}
// SetType sets the value of Type.
func (s *Block) SetType(val OptString) {
s.Type = val
}
// SetArchived sets the value of Archived.
func (s *Block) SetArchived(val OptBool) {
s.Archived = val
}
// SetHasChildren sets the value of HasChildren.
func (s *Block) SetHasChildren(val OptBool) {
s.HasChildren = val
}
// SetParent sets the value of Parent.
func (s *Block) SetParent(val jx.Raw) {
s.Parent = val
}
// Ref: #/components/schemas/Comment
type Comment struct {
Object OptString `json:"object"`
ID OptString `json:"id"`
Parent jx.Raw `json:"parent"`
DiscussionID OptString `json:"discussion_id"`
RichText []jx.Raw `json:"rich_text"`
CreatedTime OptString `json:"created_time"`
CreatedBy jx.Raw `json:"created_by"`
}
// GetObject returns the value of Object.
func (s *Comment) GetObject() OptString {
return s.Object
}
// GetID returns the value of ID.
func (s *Comment) GetID() OptString {
return s.ID
}
// GetParent returns the value of Parent.
func (s *Comment) GetParent() jx.Raw {
return s.Parent
}
// GetDiscussionID returns the value of DiscussionID.
func (s *Comment) GetDiscussionID() OptString {
return s.DiscussionID
}
// GetRichText returns the value of RichText.
func (s *Comment) GetRichText() []jx.Raw {
return s.RichText
}
// GetCreatedTime returns the value of CreatedTime.
func (s *Comment) GetCreatedTime() OptString {
return s.CreatedTime
}
// GetCreatedBy returns the value of CreatedBy.
func (s *Comment) GetCreatedBy() jx.Raw {
return s.CreatedBy
}
// SetObject sets the value of Object.
func (s *Comment) SetObject(val OptString) {
s.Object = val
}
// SetID sets the value of ID.
func (s *Comment) SetID(val OptString) {
s.ID = val
}
// SetParent sets the value of Parent.
func (s *Comment) SetParent(val jx.Raw) {
s.Parent = val
}
// SetDiscussionID sets the value of DiscussionID.
func (s *Comment) SetDiscussionID(val OptString) {
s.DiscussionID = val
}
// SetRichText sets the value of RichText.
func (s *Comment) SetRichText(val []jx.Raw) {
s.RichText = val
}
// SetCreatedTime sets the value of CreatedTime.
func (s *Comment) SetCreatedTime(val OptString) {
s.CreatedTime = val
}
// SetCreatedBy sets the value of CreatedBy.
func (s *Comment) SetCreatedBy(val jx.Raw) {
s.CreatedBy = val
}
// Ref: #/components/schemas/CreatePageRequest
type CreatePageRequest struct {
Parent jx.Raw `json:"parent"`
Properties jx.Raw `json:"properties"`
}
// GetParent returns the value of Parent.
func (s *CreatePageRequest) GetParent() jx.Raw {
return s.Parent
}
// GetProperties returns the value of Properties.
func (s *CreatePageRequest) GetProperties() jx.Raw {
return s.Properties
}
// SetParent sets the value of Parent.
func (s *CreatePageRequest) SetParent(val jx.Raw) {
s.Parent = val
}
// SetProperties sets the value of Properties.
func (s *CreatePageRequest) SetProperties(val jx.Raw) {
s.Properties = val
}
// Ref: #/components/schemas/Database
type Database struct {
Object OptString `json:"object"`
ID OptString `json:"id"`
Title []jx.Raw `json:"title"`
Description []jx.Raw `json:"description"`
Properties jx.Raw `json:"properties"`
Parent jx.Raw `json:"parent"`
URL OptString `json:"url"`
Archived OptBool `json:"archived"`
}
// GetObject returns the value of Object.
func (s *Database) GetObject() OptString {
return s.Object
}
// GetID returns the value of ID.
func (s *Database) GetID() OptString {
return s.ID
}
// GetTitle returns the value of Title.
func (s *Database) GetTitle() []jx.Raw {
return s.Title
}
// GetDescription returns the value of Description.
func (s *Database) GetDescription() []jx.Raw {
return s.Description
}
// GetProperties returns the value of Properties.
func (s *Database) GetProperties() jx.Raw {
return s.Properties
}
// GetParent returns the value of Parent.
func (s *Database) GetParent() jx.Raw {
return s.Parent
}
// GetURL returns the value of URL.
func (s *Database) GetURL() OptString {
return s.URL
}
// GetArchived returns the value of Archived.
func (s *Database) GetArchived() OptBool {
return s.Archived
}
// SetObject sets the value of Object.
func (s *Database) SetObject(val OptString) {
s.Object = val
}
// SetID sets the value of ID.
func (s *Database) SetID(val OptString) {
s.ID = val
}
// SetTitle sets the value of Title.
func (s *Database) SetTitle(val []jx.Raw) {
s.Title = val
}
// SetDescription sets the value of Description.
func (s *Database) SetDescription(val []jx.Raw) {
s.Description = val
}
// SetProperties sets the value of Properties.
func (s *Database) SetProperties(val jx.Raw) {
s.Properties = val
}
// SetParent sets the value of Parent.
func (s *Database) SetParent(val jx.Raw) {
s.Parent = val
}
// SetURL sets the value of URL.
func (s *Database) SetURL(val OptString) {
s.URL = val
}
// SetArchived sets the value of Archived.
func (s *Database) SetArchived(val OptBool) {
s.Archived = val
}
// 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
}
// NewOptNilString returns new OptNilString with value set to v.
func NewOptNilString(v string) OptNilString {
return OptNilString{
Value: v,
Set: true,
}
}
// OptNilString is optional nullable string.
type OptNilString struct {
Value string
Set bool
Null bool
}
// IsSet returns true if OptNilString was set.
func (o OptNilString) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptNilString) Reset() {
var v string
o.Value = v
o.Set = false
o.Null = false
}
// SetTo sets value to v.
func (o *OptNilString) SetTo(v string) {
o.Set = true
o.Null = false
o.Value = v
}
// IsNull returns true if value is Null.
func (o OptNilString) IsNull() bool { return o.Null }
// SetToNull sets value to null.
func (o *OptNilString) SetToNull() {
o.Set = true
o.Null = true
var v string
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptNilString) Get() (v string, ok bool) {
if o.Null {
return v, false
}
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptNilString) Or(d string) string {
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
}
// Ref: #/components/schemas/Page
type Page struct {
Object OptString `json:"object"`
ID OptString `json:"id"`
CreatedTime OptString `json:"created_time"`
LastEditedTime OptString `json:"last_edited_time"`
Archived OptBool `json:"archived"`
URL OptString `json:"url"`
Parent jx.Raw `json:"parent"`
Properties jx.Raw `json:"properties"`
Icon jx.Raw `json:"icon"`
Cover jx.Raw `json:"cover"`
}
// GetObject returns the value of Object.
func (s *Page) GetObject() OptString {
return s.Object
}
// GetID returns the value of ID.
func (s *Page) GetID() OptString {
return s.ID
}
// GetCreatedTime returns the value of CreatedTime.
func (s *Page) GetCreatedTime() OptString {
return s.CreatedTime
}
// GetLastEditedTime returns the value of LastEditedTime.
func (s *Page) GetLastEditedTime() OptString {
return s.LastEditedTime
}
// GetArchived returns the value of Archived.
func (s *Page) GetArchived() OptBool {
return s.Archived
}
// GetURL returns the value of URL.
func (s *Page) GetURL() OptString {
return s.URL
}
// GetParent returns the value of Parent.
func (s *Page) GetParent() jx.Raw {
return s.Parent
}
// GetProperties returns the value of Properties.
func (s *Page) GetProperties() jx.Raw {
return s.Properties
}
// GetIcon returns the value of Icon.
func (s *Page) GetIcon() jx.Raw {
return s.Icon
}
// GetCover returns the value of Cover.
func (s *Page) GetCover() jx.Raw {
return s.Cover
}
// SetObject sets the value of Object.
func (s *Page) SetObject(val OptString) {
s.Object = val
}
// SetID sets the value of ID.
func (s *Page) SetID(val OptString) {
s.ID = val
}
// SetCreatedTime sets the value of CreatedTime.
func (s *Page) SetCreatedTime(val OptString) {
s.CreatedTime = val
}
// SetLastEditedTime sets the value of LastEditedTime.
func (s *Page) SetLastEditedTime(val OptString) {
s.LastEditedTime = val
}
// SetArchived sets the value of Archived.
func (s *Page) SetArchived(val OptBool) {
s.Archived = val
}
// SetURL sets the value of URL.
func (s *Page) SetURL(val OptString) {
s.URL = val
}
// SetParent sets the value of Parent.
func (s *Page) SetParent(val jx.Raw) {
s.Parent = val
}
// SetProperties sets the value of Properties.
func (s *Page) SetProperties(val jx.Raw) {
s.Properties = val
}
// SetIcon sets the value of Icon.
func (s *Page) SetIcon(val jx.Raw) {
s.Icon = val
}
// SetCover sets the value of Cover.
func (s *Page) SetCover(val jx.Raw) {
s.Cover = val
}
// Ref: #/components/schemas/PaginatedList
type PaginatedList struct {
Object OptString `json:"object"`
Results []jx.Raw `json:"results"`
HasMore OptBool `json:"has_more"`
NextCursor OptNilString `json:"next_cursor"`
Type OptString `json:"type"`
}
// GetObject returns the value of Object.
func (s *PaginatedList) GetObject() OptString {
return s.Object
}
// GetResults returns the value of Results.
func (s *PaginatedList) GetResults() []jx.Raw {
return s.Results
}
// GetHasMore returns the value of HasMore.
func (s *PaginatedList) GetHasMore() OptBool {
return s.HasMore
}
// GetNextCursor returns the value of NextCursor.
func (s *PaginatedList) GetNextCursor() OptNilString {
return s.NextCursor
}
// GetType returns the value of Type.
func (s *PaginatedList) GetType() OptString {
return s.Type
}
// SetObject sets the value of Object.
func (s *PaginatedList) SetObject(val OptString) {
s.Object = val
}
// SetResults sets the value of Results.
func (s *PaginatedList) SetResults(val []jx.Raw) {
s.Results = val
}
// SetHasMore sets the value of HasMore.
func (s *PaginatedList) SetHasMore(val OptBool) {
s.HasMore = val
}
// SetNextCursor sets the value of NextCursor.
func (s *PaginatedList) SetNextCursor(val OptNilString) {
s.NextCursor = val
}
// SetType sets the value of Type.
func (s *PaginatedList) SetType(val OptString) {
s.Type = val
}
// Ref: #/components/schemas/QueryDatabaseRequest
type QueryDatabaseRequest struct {
Filter jx.Raw `json:"filter"`
Sorts jx.Raw `json:"sorts"`
PageSize OptInt `json:"page_size"`
}
// GetFilter returns the value of Filter.
func (s *QueryDatabaseRequest) GetFilter() jx.Raw {
return s.Filter
}
// GetSorts returns the value of Sorts.
func (s *QueryDatabaseRequest) GetSorts() jx.Raw {
return s.Sorts
}
// GetPageSize returns the value of PageSize.
func (s *QueryDatabaseRequest) GetPageSize() OptInt {
return s.PageSize
}
// SetFilter sets the value of Filter.
func (s *QueryDatabaseRequest) SetFilter(val jx.Raw) {
s.Filter = val
}
// SetSorts sets the value of Sorts.
func (s *QueryDatabaseRequest) SetSorts(val jx.Raw) {
s.Sorts = val
}
// SetPageSize sets the value of PageSize.
func (s *QueryDatabaseRequest) SetPageSize(val OptInt) {
s.PageSize = val
}
// Ref: #/components/schemas/SearchRequest
type SearchRequest struct {
Query OptString `json:"query"`
Filter jx.Raw `json:"filter"`
Sort jx.Raw `json:"sort"`
PageSize OptInt `json:"page_size"`
}
// GetQuery returns the value of Query.
func (s *SearchRequest) GetQuery() OptString {
return s.Query
}
// GetFilter returns the value of Filter.
func (s *SearchRequest) GetFilter() jx.Raw {
return s.Filter
}
// GetSort returns the value of Sort.
func (s *SearchRequest) GetSort() jx.Raw {
return s.Sort
}
// GetPageSize returns the value of PageSize.
func (s *SearchRequest) GetPageSize() OptInt {
return s.PageSize
}
// SetQuery sets the value of Query.
func (s *SearchRequest) SetQuery(val OptString) {
s.Query = val
}
// SetFilter sets the value of Filter.
func (s *SearchRequest) SetFilter(val jx.Raw) {
s.Filter = val
}
// SetSort sets the value of Sort.
func (s *SearchRequest) SetSort(val jx.Raw) {
s.Sort = val
}
// SetPageSize sets the value of PageSize.
func (s *SearchRequest) SetPageSize(val OptInt) {
s.PageSize = val
}
// Ref: #/components/schemas/UpdatePageRequest
type UpdatePageRequest struct {
Properties jx.Raw `json:"properties"`
}
// GetProperties returns the value of Properties.
func (s *UpdatePageRequest) GetProperties() jx.Raw {
return s.Properties
}
// SetProperties sets the value of Properties.
func (s *UpdatePageRequest) SetProperties(val jx.Raw) {
s.Properties = val
}
// Ref: #/components/schemas/User
type User struct {
Object OptString `json:"object"`
ID OptString `json:"id"`
Type OptString `json:"type"`
Name OptNilString `json:"name"`
AvatarURL OptNilString `json:"avatar_url"`
Person jx.Raw `json:"person"`
Bot jx.Raw `json:"bot"`
}
// GetObject returns the value of Object.
func (s *User) GetObject() OptString {
return s.Object
}
// GetID returns the value of ID.
func (s *User) GetID() OptString {
return s.ID
}
// GetType returns the value of Type.
func (s *User) GetType() OptString {
return s.Type
}
// GetName returns the value of Name.
func (s *User) GetName() OptNilString {
return s.Name
}
// GetAvatarURL returns the value of AvatarURL.
func (s *User) GetAvatarURL() OptNilString {
return s.AvatarURL
}
// GetPerson returns the value of Person.
func (s *User) GetPerson() jx.Raw {
return s.Person
}
// GetBot returns the value of Bot.
func (s *User) GetBot() jx.Raw {
return s.Bot
}
// SetObject sets the value of Object.
func (s *User) SetObject(val OptString) {
s.Object = val
}
// SetID sets the value of ID.
func (s *User) SetID(val OptString) {
s.ID = val
}
// SetType sets the value of Type.
func (s *User) SetType(val OptString) {
s.Type = val
}
// SetName sets the value of Name.
func (s *User) SetName(val OptNilString) {
s.Name = val
}
// SetAvatarURL sets the value of AvatarURL.
func (s *User) SetAvatarURL(val OptNilString) {
s.AvatarURL = val
}
// SetPerson sets the value of Person.
func (s *User) SetPerson(val jx.Raw) {
s.Person = val
}
// SetBot sets the value of Bot.
func (s *User) SetBot(val jx.Raw) {
s.Bot = val
}