forked from sngular/kloadgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
avro-example.avsc
151 lines (151 loc) · 5.71 KB
/
avro-example.avsc
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
{
"type": "record",
"name": "User",
"namespace": "com.example.avro",
"doc": "This is a user record in a fictitious to-do-list management app. It supports arbitrary grouping and nesting of items, and allows you to add items by email or by tweeting.\n\nNote this app doesn't actually exist. The schema is just a demo for [Avrodoc](https://github.com/ept/avrodoc)!",
"fields": [
{
"name": "id",
"doc": "System-assigned numeric user ID. Cannot be changed by the user.",
"type": "int"
},
{
"name": "username",
"doc": "The username chosen by the user. Can be changed by the user.",
"type": "string"
},
{
"name": "passwordHash",
"doc": "The user's password, hashed using [scrypt](http://www.tarsnap.com/scrypt.html).",
"type": "string"
},
{
"name": "signupDate",
"doc": "Timestamp (milliseconds since epoch) when the user signed up",
"type": "long"
},
{
"name": "emailAddresses",
"doc": "All email addresses on the user's account",
"type": {
"type": "array",
"items": {
"type": "record",
"name": "EmailAddress",
"doc": "Stores details about an email address that a user has associated with their account.",
"fields": [
{
"name": "address",
"doc": "The email address, e.g. `[email protected]`",
"type": "string"
},
{
"name": "verified",
"doc": "true if the user has clicked the link in a confirmation email to this address.",
"type": "boolean",
"default": false
},
{
"name": "dateAdded",
"doc": "Timestamp (milliseconds since epoch) when the email address was added to the account.",
"type": "long"
},
{
"name": "dateBounced",
"doc": "Timestamp (milliseconds since epoch) when an email sent to this address last bounced. Reset to null when the address no longer bounces.",
"type": ["null", "long"]
}
]
}
}
},
{
"name": "twitterAccounts",
"doc": "All Twitter accounts that the user has OAuthed",
"type": {
"type": "array",
"items": {
"type": "record",
"name": "TwitterAccount",
"doc": "Stores access credentials for one Twitter account, as granted to us by the user by OAuth.",
"fields": [
{
"name": "status",
"doc": "Indicator of whether this authorization is currently active, or has been revoked",
"type": {
"type": "enum",
"name": "OAuthStatus",
"doc": "* `PENDING`: the user has started authorizing, but not yet finished\n* `ACTIVE`: the token should work\n* `DENIED`: the user declined the authorization\n* `EXPIRED`: the token used to work, but now it doesn't\n* `REVOKED`: the user has explicitly revoked the token",
"symbols": ["PENDING", "ACTIVE", "DENIED", "EXPIRED", "REVOKED"]
}
},
{
"name": "userId",
"doc": "Twitter's numeric ID for this user",
"type": "long"
},
{
"name": "screenName",
"doc": "The twitter username for this account (can be changed by the user)",
"type": "string"
},
{
"name": "oauthToken",
"doc": "The OAuth token for this Twitter account",
"type": "string"
},
{
"name": "oauthTokenSecret",
"doc": "The OAuth secret, used for signing requests on behalf of this Twitter account. `null` whilst the OAuth flow is not yet complete.",
"type": ["null", "string"]
},
{
"name": "dateAuthorized",
"doc": "Timestamp (milliseconds since epoch) when the user last authorized this Twitter account",
"type": "long"
}
]
}
}
},
{
"name": "toDoItems",
"doc": "The top-level items in the user's to-do list",
"type": {
"type": "array",
"items": {
"type": "record",
"name": "ToDoItem",
"doc": "A record is one node in a To-Do item tree (every record can contain nested sub-records).",
"fields": [
{
"name": "status",
"doc": "User-selected state for this item (e.g. whether or not it is marked as done)",
"type": {
"type": "enum",
"name": "ToDoStatus",
"doc": "* `HIDDEN`: not currently visible, e.g. because it becomes actionable in future\n* `ACTIONABLE`: appears in the current to-do list\n* `DONE`: marked as done, but still appears in the list\n* `ARCHIVED`: marked as done and no longer visible\n* `DELETED`: not done and removed from list (preserved for undo purposes)",
"symbols": ["HIDDEN", "ACTIONABLE", "DONE", "ARCHIVED", "DELETED"]
}
},
{
"name": "title",
"doc": "One-line summary of the item",
"type": "string"
},
{
"name": "description",
"doc": "Detailed description (may contain HTML markup)",
"type": ["null", "string"]
},
{
"name": "snoozeDate",
"doc": "Timestamp (milliseconds since epoch) at which the item should go from `HIDDEN` to `ACTIONABLE` status",
"type": ["null", "long"]
}
]
}
}
}
]
}