~james/core

core/api/org_tangled/tempactordefs.go -rw-r--r-- 4.8 KiB
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 17 hours ago
                                                                                
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
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.

package org_tangled

// schema: org.tangled.temp.actor.defs

import (
	"encoding/json"
	"fmt"

	"github.com/bluesky-social/indigo/lex/util"
)

const ()

// TempActorDefs_OnboardingPref is a "onboardingPref" in the org.tangled.temp.actor.defs schema.
type TempActorDefs_OnboardingPref struct {
	CompletedAt      *string `json:"completedAt,omitempty" cborgen:"completedAt,omitempty"`
	NudgeDismissedAt *string `json:"nudgeDismissedAt,omitempty" cborgen:"nudgeDismissedAt,omitempty"`
	StartedAt        string  `json:"startedAt" cborgen:"startedAt"`
}

// TempActorDefs_RecentIssue is a "recentIssue" in the org.tangled.temp.actor.defs schema.
//
// RECORDTYPE: TempActorDefs_RecentIssue
type TempActorDefs_RecentIssue struct {
	LexiconTypeID string `json:"$type,const=org.tangled.temp.actor.defs#recentIssue" cborgen:"$type,const=org.tangled.temp.actor.defs#recentIssue"`
	Open          bool   `json:"open" cborgen:"open"`
	OwnerHandle   string `json:"ownerHandle" cborgen:"ownerHandle"`
	RepoName      string `json:"repoName" cborgen:"repoName"`
	Rkey          string `json:"rkey" cborgen:"rkey"`
	Title         string `json:"title" cborgen:"title"`
	Visited       string `json:"visited" cborgen:"visited"`
}

// TempActorDefs_RecentPull is a "recentPull" in the org.tangled.temp.actor.defs schema.
//
// RECORDTYPE: TempActorDefs_RecentPull
type TempActorDefs_RecentPull struct {
	LexiconTypeID string `json:"$type,const=org.tangled.temp.actor.defs#recentPull" cborgen:"$type,const=org.tangled.temp.actor.defs#recentPull"`
	OwnerHandle   string `json:"ownerHandle" cborgen:"ownerHandle"`
	RepoName      string `json:"repoName" cborgen:"repoName"`
	Rkey          string `json:"rkey" cborgen:"rkey"`
	State         string `json:"state" cborgen:"state"`
	Title         string `json:"title" cborgen:"title"`
	Visited       string `json:"visited" cborgen:"visited"`
}

// TempActorDefs_RecentRepo is a "recentRepo" in the org.tangled.temp.actor.defs schema.
//
// RECORDTYPE: TempActorDefs_RecentRepo
type TempActorDefs_RecentRepo struct {
	LexiconTypeID string  `json:"$type,const=org.tangled.temp.actor.defs#recentRepo" cborgen:"$type,const=org.tangled.temp.actor.defs#recentRepo"`
	Name          string  `json:"name" cborgen:"name"`
	OwnerDid      *string `json:"ownerDid,omitempty" cborgen:"ownerDid,omitempty"`
	OwnerHandle   string  `json:"ownerHandle" cborgen:"ownerHandle"`
	Visited       string  `json:"visited" cborgen:"visited"`
}

// TempActorDefs_RecentsPref is a "recentsPref" in the org.tangled.temp.actor.defs schema.
type TempActorDefs_RecentsPref struct {
	Items []*TempActorDefs_RecentsPref_Items_Elem `json:"items" cborgen:"items"`
}

type TempActorDefs_RecentsPref_Items_Elem struct {
	TempActorDefs_RecentRepo  *TempActorDefs_RecentRepo
	TempActorDefs_RecentIssue *TempActorDefs_RecentIssue
	TempActorDefs_RecentPull  *TempActorDefs_RecentPull
}

func (t *TempActorDefs_RecentsPref_Items_Elem) MarshalJSON() ([]byte, error) {
	if t.TempActorDefs_RecentRepo != nil {
		t.TempActorDefs_RecentRepo.LexiconTypeID = "org.tangled.temp.actor.defs#recentRepo"
		return json.Marshal(t.TempActorDefs_RecentRepo)
	}
	if t.TempActorDefs_RecentIssue != nil {
		t.TempActorDefs_RecentIssue.LexiconTypeID = "org.tangled.temp.actor.defs#recentIssue"
		return json.Marshal(t.TempActorDefs_RecentIssue)
	}
	if t.TempActorDefs_RecentPull != nil {
		t.TempActorDefs_RecentPull.LexiconTypeID = "org.tangled.temp.actor.defs#recentPull"
		return json.Marshal(t.TempActorDefs_RecentPull)
	}
	return nil, fmt.Errorf("cannot marshal empty enum")
}
func (t *TempActorDefs_RecentsPref_Items_Elem) UnmarshalJSON(b []byte) error {
	typ, err := util.TypeExtract(b)
	if err != nil {
		return err
	}

	switch typ {
	case "org.tangled.temp.actor.defs#recentRepo":
		t.TempActorDefs_RecentRepo = new(TempActorDefs_RecentRepo)
		return json.Unmarshal(b, t.TempActorDefs_RecentRepo)
	case "org.tangled.temp.actor.defs#recentIssue":
		t.TempActorDefs_RecentIssue = new(TempActorDefs_RecentIssue)
		return json.Unmarshal(b, t.TempActorDefs_RecentIssue)
	case "org.tangled.temp.actor.defs#recentPull":
		t.TempActorDefs_RecentPull = new(TempActorDefs_RecentPull)
		return json.Unmarshal(b, t.TempActorDefs_RecentPull)

	default:
		return nil
	}
}

// TempActorDefs_SavedKnotPref is a "savedKnotPref" in the org.tangled.temp.actor.defs schema.
type TempActorDefs_SavedKnotPref struct {
	Items []*TempActorDefs_SavedService `json:"items" cborgen:"items"`
}

// TempActorDefs_SavedService is a "savedService" in the org.tangled.temp.actor.defs schema.
type TempActorDefs_SavedService struct {
	Id    string `json:"id" cborgen:"id"`
	Value string `json:"value" cborgen:"value"`
}

// TempActorDefs_SavedSpindlePref is a "savedSpindlePref" in the org.tangled.temp.actor.defs schema.
type TempActorDefs_SavedSpindlePref struct {
	Items []*TempActorDefs_SavedService `json:"items" cborgen:"items"`
}