Cleanup v1

This commit is contained in:
Sam
2020-04-09 14:47:19 -04:00
parent 274002b616
commit 3e5afcc7f9
314 changed files with 0 additions and 84526 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +0,0 @@
// Auto-generated to Go types using avdl-compiler v1.4.6 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/chat1/blocking.avdl
package chat1

File diff suppressed because it is too large Load Diff

View File

@ -1,199 +0,0 @@
// Auto-generated to Go types using avdl-compiler v1.4.6 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/chat1/commands.avdl
package chat1
import (
"errors"
"fmt"
)
type ConversationCommand struct {
Description string `codec:"description" json:"description"`
Name string `codec:"name" json:"name"`
Usage string `codec:"usage" json:"usage"`
HasHelpText bool `codec:"hasHelpText" json:"hasHelpText"`
Username *string `codec:"username,omitempty" json:"username,omitempty"`
}
func (o ConversationCommand) DeepCopy() ConversationCommand {
return ConversationCommand{
Description: o.Description,
Name: o.Name,
Usage: o.Usage,
HasHelpText: o.HasHelpText,
Username: (func(x *string) *string {
if x == nil {
return nil
}
tmp := (*x)
return &tmp
})(o.Username),
}
}
type ConversationCommandGroupsTyp int
const (
ConversationCommandGroupsTyp_BUILTIN ConversationCommandGroupsTyp = 0
ConversationCommandGroupsTyp_CUSTOM ConversationCommandGroupsTyp = 1
ConversationCommandGroupsTyp_NONE ConversationCommandGroupsTyp = 2
)
func (o ConversationCommandGroupsTyp) DeepCopy() ConversationCommandGroupsTyp { return o }
var ConversationCommandGroupsTypMap = map[string]ConversationCommandGroupsTyp{
"BUILTIN": 0,
"CUSTOM": 1,
"NONE": 2,
}
var ConversationCommandGroupsTypRevMap = map[ConversationCommandGroupsTyp]string{
0: "BUILTIN",
1: "CUSTOM",
2: "NONE",
}
func (e ConversationCommandGroupsTyp) String() string {
if v, ok := ConversationCommandGroupsTypRevMap[e]; ok {
return v
}
return fmt.Sprintf("%v", int(e))
}
type ConversationBuiltinCommandTyp int
const (
ConversationBuiltinCommandTyp_NONE ConversationBuiltinCommandTyp = 0
ConversationBuiltinCommandTyp_ADHOC ConversationBuiltinCommandTyp = 1
ConversationBuiltinCommandTyp_SMALLTEAM ConversationBuiltinCommandTyp = 2
ConversationBuiltinCommandTyp_BIGTEAM ConversationBuiltinCommandTyp = 3
ConversationBuiltinCommandTyp_BIGTEAMGENERAL ConversationBuiltinCommandTyp = 4
)
func (o ConversationBuiltinCommandTyp) DeepCopy() ConversationBuiltinCommandTyp { return o }
var ConversationBuiltinCommandTypMap = map[string]ConversationBuiltinCommandTyp{
"NONE": 0,
"ADHOC": 1,
"SMALLTEAM": 2,
"BIGTEAM": 3,
"BIGTEAMGENERAL": 4,
}
var ConversationBuiltinCommandTypRevMap = map[ConversationBuiltinCommandTyp]string{
0: "NONE",
1: "ADHOC",
2: "SMALLTEAM",
3: "BIGTEAM",
4: "BIGTEAMGENERAL",
}
func (e ConversationBuiltinCommandTyp) String() string {
if v, ok := ConversationBuiltinCommandTypRevMap[e]; ok {
return v
}
return fmt.Sprintf("%v", int(e))
}
type ConversationCommandGroupsCustom struct {
Commands []ConversationCommand `codec:"commands" json:"commands"`
}
func (o ConversationCommandGroupsCustom) DeepCopy() ConversationCommandGroupsCustom {
return ConversationCommandGroupsCustom{
Commands: (func(x []ConversationCommand) []ConversationCommand {
if x == nil {
return nil
}
ret := make([]ConversationCommand, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.Commands),
}
}
type ConversationCommandGroups struct {
Typ__ ConversationCommandGroupsTyp `codec:"typ" json:"typ"`
Builtin__ *ConversationBuiltinCommandTyp `codec:"builtin,omitempty" json:"builtin,omitempty"`
Custom__ *ConversationCommandGroupsCustom `codec:"custom,omitempty" json:"custom,omitempty"`
}
func (o *ConversationCommandGroups) Typ() (ret ConversationCommandGroupsTyp, err error) {
switch o.Typ__ {
case ConversationCommandGroupsTyp_BUILTIN:
if o.Builtin__ == nil {
err = errors.New("unexpected nil value for Builtin__")
return ret, err
}
case ConversationCommandGroupsTyp_CUSTOM:
if o.Custom__ == nil {
err = errors.New("unexpected nil value for Custom__")
return ret, err
}
}
return o.Typ__, nil
}
func (o ConversationCommandGroups) Builtin() (res ConversationBuiltinCommandTyp) {
if o.Typ__ != ConversationCommandGroupsTyp_BUILTIN {
panic("wrong case accessed")
}
if o.Builtin__ == nil {
return
}
return *o.Builtin__
}
func (o ConversationCommandGroups) Custom() (res ConversationCommandGroupsCustom) {
if o.Typ__ != ConversationCommandGroupsTyp_CUSTOM {
panic("wrong case accessed")
}
if o.Custom__ == nil {
return
}
return *o.Custom__
}
func NewConversationCommandGroupsWithBuiltin(v ConversationBuiltinCommandTyp) ConversationCommandGroups {
return ConversationCommandGroups{
Typ__: ConversationCommandGroupsTyp_BUILTIN,
Builtin__: &v,
}
}
func NewConversationCommandGroupsWithCustom(v ConversationCommandGroupsCustom) ConversationCommandGroups {
return ConversationCommandGroups{
Typ__: ConversationCommandGroupsTyp_CUSTOM,
Custom__: &v,
}
}
func NewConversationCommandGroupsWithNone() ConversationCommandGroups {
return ConversationCommandGroups{
Typ__: ConversationCommandGroupsTyp_NONE,
}
}
func (o ConversationCommandGroups) DeepCopy() ConversationCommandGroups {
return ConversationCommandGroups{
Typ__: o.Typ__.DeepCopy(),
Builtin__: (func(x *ConversationBuiltinCommandTyp) *ConversationBuiltinCommandTyp {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Builtin__),
Custom__: (func(x *ConversationCommandGroupsCustom) *ConversationCommandGroupsCustom {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Custom__),
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,361 +0,0 @@
// Auto-generated to Go types using avdl-compiler v1.4.6 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/chat1/emoji.avdl
package chat1
import (
gregor1 "samhofi.us/x/keybase/v2/types/gregor1"
"errors"
"fmt"
)
type EmojiLoadSourceTyp int
const (
EmojiLoadSourceTyp_HTTPSRV EmojiLoadSourceTyp = 0
EmojiLoadSourceTyp_STR EmojiLoadSourceTyp = 1
)
func (o EmojiLoadSourceTyp) DeepCopy() EmojiLoadSourceTyp { return o }
var EmojiLoadSourceTypMap = map[string]EmojiLoadSourceTyp{
"HTTPSRV": 0,
"STR": 1,
}
var EmojiLoadSourceTypRevMap = map[EmojiLoadSourceTyp]string{
0: "HTTPSRV",
1: "STR",
}
func (e EmojiLoadSourceTyp) String() string {
if v, ok := EmojiLoadSourceTypRevMap[e]; ok {
return v
}
return fmt.Sprintf("%v", int(e))
}
type EmojiLoadSource struct {
Typ__ EmojiLoadSourceTyp `codec:"typ" json:"typ"`
Httpsrv__ *string `codec:"httpsrv,omitempty" json:"httpsrv,omitempty"`
Str__ *string `codec:"str,omitempty" json:"str,omitempty"`
}
func (o *EmojiLoadSource) Typ() (ret EmojiLoadSourceTyp, err error) {
switch o.Typ__ {
case EmojiLoadSourceTyp_HTTPSRV:
if o.Httpsrv__ == nil {
err = errors.New("unexpected nil value for Httpsrv__")
return ret, err
}
case EmojiLoadSourceTyp_STR:
if o.Str__ == nil {
err = errors.New("unexpected nil value for Str__")
return ret, err
}
}
return o.Typ__, nil
}
func (o EmojiLoadSource) Httpsrv() (res string) {
if o.Typ__ != EmojiLoadSourceTyp_HTTPSRV {
panic("wrong case accessed")
}
if o.Httpsrv__ == nil {
return
}
return *o.Httpsrv__
}
func (o EmojiLoadSource) Str() (res string) {
if o.Typ__ != EmojiLoadSourceTyp_STR {
panic("wrong case accessed")
}
if o.Str__ == nil {
return
}
return *o.Str__
}
func NewEmojiLoadSourceWithHttpsrv(v string) EmojiLoadSource {
return EmojiLoadSource{
Typ__: EmojiLoadSourceTyp_HTTPSRV,
Httpsrv__: &v,
}
}
func NewEmojiLoadSourceWithStr(v string) EmojiLoadSource {
return EmojiLoadSource{
Typ__: EmojiLoadSourceTyp_STR,
Str__: &v,
}
}
func (o EmojiLoadSource) DeepCopy() EmojiLoadSource {
return EmojiLoadSource{
Typ__: o.Typ__.DeepCopy(),
Httpsrv__: (func(x *string) *string {
if x == nil {
return nil
}
tmp := (*x)
return &tmp
})(o.Httpsrv__),
Str__: (func(x *string) *string {
if x == nil {
return nil
}
tmp := (*x)
return &tmp
})(o.Str__),
}
}
type EmojiRemoteSourceTyp int
const (
EmojiRemoteSourceTyp_MESSAGE EmojiRemoteSourceTyp = 0
EmojiRemoteSourceTyp_STOCKALIAS EmojiRemoteSourceTyp = 1
)
func (o EmojiRemoteSourceTyp) DeepCopy() EmojiRemoteSourceTyp { return o }
var EmojiRemoteSourceTypMap = map[string]EmojiRemoteSourceTyp{
"MESSAGE": 0,
"STOCKALIAS": 1,
}
var EmojiRemoteSourceTypRevMap = map[EmojiRemoteSourceTyp]string{
0: "MESSAGE",
1: "STOCKALIAS",
}
func (e EmojiRemoteSourceTyp) String() string {
if v, ok := EmojiRemoteSourceTypRevMap[e]; ok {
return v
}
return fmt.Sprintf("%v", int(e))
}
type EmojiMessage struct {
ConvID ConversationID `codec:"convID" json:"convID"`
MsgID MessageID `codec:"msgID" json:"msgID"`
IsAlias bool `codec:"isAlias" json:"isAlias"`
}
func (o EmojiMessage) DeepCopy() EmojiMessage {
return EmojiMessage{
ConvID: o.ConvID.DeepCopy(),
MsgID: o.MsgID.DeepCopy(),
IsAlias: o.IsAlias,
}
}
type EmojiStockAlias struct {
Text string `codec:"text" json:"text"`
Username string `codec:"username" json:"username"`
Time gregor1.Time `codec:"time" json:"time"`
}
func (o EmojiStockAlias) DeepCopy() EmojiStockAlias {
return EmojiStockAlias{
Text: o.Text,
Username: o.Username,
Time: o.Time.DeepCopy(),
}
}
type EmojiRemoteSource struct {
Typ__ EmojiRemoteSourceTyp `codec:"typ" json:"typ"`
Message__ *EmojiMessage `codec:"message,omitempty" json:"message,omitempty"`
Stockalias__ *EmojiStockAlias `codec:"stockalias,omitempty" json:"stockalias,omitempty"`
}
func (o *EmojiRemoteSource) Typ() (ret EmojiRemoteSourceTyp, err error) {
switch o.Typ__ {
case EmojiRemoteSourceTyp_MESSAGE:
if o.Message__ == nil {
err = errors.New("unexpected nil value for Message__")
return ret, err
}
case EmojiRemoteSourceTyp_STOCKALIAS:
if o.Stockalias__ == nil {
err = errors.New("unexpected nil value for Stockalias__")
return ret, err
}
}
return o.Typ__, nil
}
func (o EmojiRemoteSource) Message() (res EmojiMessage) {
if o.Typ__ != EmojiRemoteSourceTyp_MESSAGE {
panic("wrong case accessed")
}
if o.Message__ == nil {
return
}
return *o.Message__
}
func (o EmojiRemoteSource) Stockalias() (res EmojiStockAlias) {
if o.Typ__ != EmojiRemoteSourceTyp_STOCKALIAS {
panic("wrong case accessed")
}
if o.Stockalias__ == nil {
return
}
return *o.Stockalias__
}
func NewEmojiRemoteSourceWithMessage(v EmojiMessage) EmojiRemoteSource {
return EmojiRemoteSource{
Typ__: EmojiRemoteSourceTyp_MESSAGE,
Message__: &v,
}
}
func NewEmojiRemoteSourceWithStockalias(v EmojiStockAlias) EmojiRemoteSource {
return EmojiRemoteSource{
Typ__: EmojiRemoteSourceTyp_STOCKALIAS,
Stockalias__: &v,
}
}
func (o EmojiRemoteSource) DeepCopy() EmojiRemoteSource {
return EmojiRemoteSource{
Typ__: o.Typ__.DeepCopy(),
Message__: (func(x *EmojiMessage) *EmojiMessage {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Message__),
Stockalias__: (func(x *EmojiStockAlias) *EmojiStockAlias {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Stockalias__),
}
}
type HarvestedEmoji struct {
Alias string `codec:"alias" json:"alias"`
IsBig bool `codec:"isBig" json:"isBig"`
IsCrossTeam bool `codec:"isCrossTeam" json:"isCrossTeam"`
Source EmojiRemoteSource `codec:"source" json:"source"`
}
func (o HarvestedEmoji) DeepCopy() HarvestedEmoji {
return HarvestedEmoji{
Alias: o.Alias,
IsBig: o.IsBig,
IsCrossTeam: o.IsCrossTeam,
Source: o.Source.DeepCopy(),
}
}
type EmojiCreationInfo struct {
Username string `codec:"username" json:"username"`
Time gregor1.Time `codec:"time" json:"time"`
}
func (o EmojiCreationInfo) DeepCopy() EmojiCreationInfo {
return EmojiCreationInfo{
Username: o.Username,
Time: o.Time.DeepCopy(),
}
}
type Emoji struct {
Alias string `codec:"alias" json:"alias"`
IsBig bool `codec:"isBig" json:"isBig"`
IsReacji bool `codec:"isReacji" json:"isReacji"`
IsCrossTeam bool `codec:"isCrossTeam" json:"isCrossTeam"`
Source EmojiLoadSource `codec:"source" json:"source"`
RemoteSource EmojiRemoteSource `codec:"remoteSource" json:"remoteSource"`
CreationInfo *EmojiCreationInfo `codec:"creationInfo,omitempty" json:"creationInfo,omitempty"`
}
func (o Emoji) DeepCopy() Emoji {
return Emoji{
Alias: o.Alias,
IsBig: o.IsBig,
IsReacji: o.IsReacji,
IsCrossTeam: o.IsCrossTeam,
Source: o.Source.DeepCopy(),
RemoteSource: o.RemoteSource.DeepCopy(),
CreationInfo: (func(x *EmojiCreationInfo) *EmojiCreationInfo {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.CreationInfo),
}
}
type EmojiGroup struct {
Name string `codec:"name" json:"name"`
Emojis []Emoji `codec:"emojis" json:"emojis"`
}
func (o EmojiGroup) DeepCopy() EmojiGroup {
return EmojiGroup{
Name: o.Name,
Emojis: (func(x []Emoji) []Emoji {
if x == nil {
return nil
}
ret := make([]Emoji, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.Emojis),
}
}
type UserEmojis struct {
Emojis []EmojiGroup `codec:"emojis" json:"emojis"`
}
func (o UserEmojis) DeepCopy() UserEmojis {
return UserEmojis{
Emojis: (func(x []EmojiGroup) []EmojiGroup {
if x == nil {
return nil
}
ret := make([]EmojiGroup, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.Emojis),
}
}
type EmojiStorage struct {
Mapping map[string]EmojiRemoteSource `codec:"mapping" json:"mapping"`
}
func (o EmojiStorage) DeepCopy() EmojiStorage {
return EmojiStorage{
Mapping: (func(x map[string]EmojiRemoteSource) map[string]EmojiRemoteSource {
if x == nil {
return nil
}
ret := make(map[string]EmojiRemoteSource, len(x))
for k, v := range x {
kCopy := k
vCopy := v.DeepCopy()
ret[kCopy] = vCopy
}
return ret
})(o.Mapping),
}
}

View File

@ -1,538 +0,0 @@
// Auto-generated to Go types using avdl-compiler v1.4.6 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/chat1/gregor.avdl
package chat1
import (
gregor1 "samhofi.us/x/keybase/v2/types/gregor1"
keybase1 "samhofi.us/x/keybase/v2/types/keybase1"
)
type GenericPayload struct {
Action string `codec:"Action" json:"Action"`
InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"`
ConvID ConversationID `codec:"convID" json:"convID"`
TopicType TopicType `codec:"topicType" json:"topicType"`
UnreadUpdate *UnreadUpdate `codec:"unreadUpdate,omitempty" json:"unreadUpdate,omitempty"`
}
func (o GenericPayload) DeepCopy() GenericPayload {
return GenericPayload{
Action: o.Action,
InboxVers: o.InboxVers.DeepCopy(),
ConvID: o.ConvID.DeepCopy(),
TopicType: o.TopicType.DeepCopy(),
UnreadUpdate: (func(x *UnreadUpdate) *UnreadUpdate {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.UnreadUpdate),
}
}
type NewConversationPayload struct {
Action string `codec:"Action" json:"Action"`
ConvID ConversationID `codec:"convID" json:"convID"`
InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"`
TopicType TopicType `codec:"topicType" json:"topicType"`
UnreadUpdate *UnreadUpdate `codec:"unreadUpdate,omitempty" json:"unreadUpdate,omitempty"`
}
func (o NewConversationPayload) DeepCopy() NewConversationPayload {
return NewConversationPayload{
Action: o.Action,
ConvID: o.ConvID.DeepCopy(),
InboxVers: o.InboxVers.DeepCopy(),
TopicType: o.TopicType.DeepCopy(),
UnreadUpdate: (func(x *UnreadUpdate) *UnreadUpdate {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.UnreadUpdate),
}
}
type NewMessagePayload struct {
Action string `codec:"Action" json:"Action"`
ConvID ConversationID `codec:"convID" json:"convID"`
Message MessageBoxed `codec:"message" json:"message"`
InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"`
TopicType TopicType `codec:"topicType" json:"topicType"`
UnreadUpdate *UnreadUpdate `codec:"unreadUpdate,omitempty" json:"unreadUpdate,omitempty"`
UntrustedTeamRole keybase1.TeamRole `codec:"untrustedTeamRole" json:"untrustedTeamRole"`
MaxMsgs []MessageSummary `codec:"maxMsgs" json:"maxMsgs"`
}
func (o NewMessagePayload) DeepCopy() NewMessagePayload {
return NewMessagePayload{
Action: o.Action,
ConvID: o.ConvID.DeepCopy(),
Message: o.Message.DeepCopy(),
InboxVers: o.InboxVers.DeepCopy(),
TopicType: o.TopicType.DeepCopy(),
UnreadUpdate: (func(x *UnreadUpdate) *UnreadUpdate {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.UnreadUpdate),
UntrustedTeamRole: o.UntrustedTeamRole.DeepCopy(),
MaxMsgs: (func(x []MessageSummary) []MessageSummary {
if x == nil {
return nil
}
ret := make([]MessageSummary, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.MaxMsgs),
}
}
type ReadMessagePayload struct {
Action string `codec:"Action" json:"Action"`
ConvID ConversationID `codec:"convID" json:"convID"`
MsgID MessageID `codec:"msgID" json:"msgID"`
InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"`
TopicType TopicType `codec:"topicType" json:"topicType"`
UnreadUpdate *UnreadUpdate `codec:"unreadUpdate,omitempty" json:"unreadUpdate,omitempty"`
}
func (o ReadMessagePayload) DeepCopy() ReadMessagePayload {
return ReadMessagePayload{
Action: o.Action,
ConvID: o.ConvID.DeepCopy(),
MsgID: o.MsgID.DeepCopy(),
InboxVers: o.InboxVers.DeepCopy(),
TopicType: o.TopicType.DeepCopy(),
UnreadUpdate: (func(x *UnreadUpdate) *UnreadUpdate {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.UnreadUpdate),
}
}
type SetStatusPayload struct {
Action string `codec:"Action" json:"Action"`
ConvID ConversationID `codec:"convID" json:"convID"`
Status ConversationStatus `codec:"status" json:"status"`
InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"`
TopicType TopicType `codec:"topicType" json:"topicType"`
UnreadUpdate *UnreadUpdate `codec:"unreadUpdate,omitempty" json:"unreadUpdate,omitempty"`
}
func (o SetStatusPayload) DeepCopy() SetStatusPayload {
return SetStatusPayload{
Action: o.Action,
ConvID: o.ConvID.DeepCopy(),
Status: o.Status.DeepCopy(),
InboxVers: o.InboxVers.DeepCopy(),
TopicType: o.TopicType.DeepCopy(),
UnreadUpdate: (func(x *UnreadUpdate) *UnreadUpdate {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.UnreadUpdate),
}
}
type TeamTypePayload struct {
Action string `codec:"Action" json:"Action"`
ConvID ConversationID `codec:"convID" json:"convID"`
TeamType TeamType `codec:"teamType" json:"teamType"`
InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"`
TopicType TopicType `codec:"topicType" json:"topicType"`
UnreadUpdate *UnreadUpdate `codec:"unreadUpdate,omitempty" json:"unreadUpdate,omitempty"`
}
func (o TeamTypePayload) DeepCopy() TeamTypePayload {
return TeamTypePayload{
Action: o.Action,
ConvID: o.ConvID.DeepCopy(),
TeamType: o.TeamType.DeepCopy(),
InboxVers: o.InboxVers.DeepCopy(),
TopicType: o.TopicType.DeepCopy(),
UnreadUpdate: (func(x *UnreadUpdate) *UnreadUpdate {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.UnreadUpdate),
}
}
type SetAppNotificationSettingsPayload struct {
Action string `codec:"Action" json:"Action"`
ConvID ConversationID `codec:"convID" json:"convID"`
InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"`
Settings ConversationNotificationInfo `codec:"settings" json:"settings"`
TopicType TopicType `codec:"topicType" json:"topicType"`
UnreadUpdate *UnreadUpdate `codec:"unreadUpdate,omitempty" json:"unreadUpdate,omitempty"`
}
func (o SetAppNotificationSettingsPayload) DeepCopy() SetAppNotificationSettingsPayload {
return SetAppNotificationSettingsPayload{
Action: o.Action,
ConvID: o.ConvID.DeepCopy(),
InboxVers: o.InboxVers.DeepCopy(),
Settings: o.Settings.DeepCopy(),
TopicType: o.TopicType.DeepCopy(),
UnreadUpdate: (func(x *UnreadUpdate) *UnreadUpdate {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.UnreadUpdate),
}
}
type ExpungePayload struct {
Action string `codec:"Action" json:"Action"`
ConvID ConversationID `codec:"convID" json:"convID"`
InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"`
Expunge Expunge `codec:"expunge" json:"expunge"`
MaxMsgs []MessageSummary `codec:"maxMsgs" json:"maxMsgs"`
TopicType TopicType `codec:"topicType" json:"topicType"`
UnreadUpdate *UnreadUpdate `codec:"unreadUpdate,omitempty" json:"unreadUpdate,omitempty"`
}
func (o ExpungePayload) DeepCopy() ExpungePayload {
return ExpungePayload{
Action: o.Action,
ConvID: o.ConvID.DeepCopy(),
InboxVers: o.InboxVers.DeepCopy(),
Expunge: o.Expunge.DeepCopy(),
MaxMsgs: (func(x []MessageSummary) []MessageSummary {
if x == nil {
return nil
}
ret := make([]MessageSummary, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.MaxMsgs),
TopicType: o.TopicType.DeepCopy(),
UnreadUpdate: (func(x *UnreadUpdate) *UnreadUpdate {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.UnreadUpdate),
}
}
type UnreadUpdate struct {
ConvID ConversationID `codec:"convID" json:"convID"`
UnreadMessages int `codec:"unreadMessages" json:"unreadMessages"`
UnreadNotifyingMessages map[keybase1.DeviceType]int `codec:"unreadNotifyingMessages" json:"unreadNotifyingMessages"`
CompatUnreadMessages int `codec:"UnreadMessages" json:"UnreadMessages"`
Diff bool `codec:"diff" json:"diff"`
}
func (o UnreadUpdate) DeepCopy() UnreadUpdate {
return UnreadUpdate{
ConvID: o.ConvID.DeepCopy(),
UnreadMessages: o.UnreadMessages,
UnreadNotifyingMessages: (func(x map[keybase1.DeviceType]int) map[keybase1.DeviceType]int {
if x == nil {
return nil
}
ret := make(map[keybase1.DeviceType]int, len(x))
for k, v := range x {
kCopy := k.DeepCopy()
vCopy := v
ret[kCopy] = vCopy
}
return ret
})(o.UnreadNotifyingMessages),
CompatUnreadMessages: o.CompatUnreadMessages,
Diff: o.Diff,
}
}
type TLFFinalizeUpdate struct {
FinalizeInfo ConversationFinalizeInfo `codec:"finalizeInfo" json:"finalizeInfo"`
ConvIDs []ConversationID `codec:"convIDs" json:"convIDs"`
InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"`
}
func (o TLFFinalizeUpdate) DeepCopy() TLFFinalizeUpdate {
return TLFFinalizeUpdate{
FinalizeInfo: o.FinalizeInfo.DeepCopy(),
ConvIDs: (func(x []ConversationID) []ConversationID {
if x == nil {
return nil
}
ret := make([]ConversationID, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.ConvIDs),
InboxVers: o.InboxVers.DeepCopy(),
}
}
type TLFResolveUpdate struct {
ConvID ConversationID `codec:"convID" json:"convID"`
InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"`
}
func (o TLFResolveUpdate) DeepCopy() TLFResolveUpdate {
return TLFResolveUpdate{
ConvID: o.ConvID.DeepCopy(),
InboxVers: o.InboxVers.DeepCopy(),
}
}
type RemoteUserTypingUpdate struct {
Uid gregor1.UID `codec:"uid" json:"uid"`
DeviceID gregor1.DeviceID `codec:"deviceID" json:"deviceID"`
ConvID ConversationID `codec:"convID" json:"convID"`
Typing bool `codec:"typing" json:"typing"`
TeamType TeamType `codec:"t" json:"teamType"`
}
func (o RemoteUserTypingUpdate) DeepCopy() RemoteUserTypingUpdate {
return RemoteUserTypingUpdate{
Uid: o.Uid.DeepCopy(),
DeviceID: o.DeviceID.DeepCopy(),
ConvID: o.ConvID.DeepCopy(),
Typing: o.Typing,
TeamType: o.TeamType.DeepCopy(),
}
}
type TeamMemberRoleUpdate struct {
TlfID TLFID `codec:"tlfID" json:"tlfID"`
Role keybase1.TeamRole `codec:"role" json:"role"`
}
func (o TeamMemberRoleUpdate) DeepCopy() TeamMemberRoleUpdate {
return TeamMemberRoleUpdate{
TlfID: o.TlfID.DeepCopy(),
Role: o.Role.DeepCopy(),
}
}
type UpdateConversationMembership struct {
InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"`
TeamMemberRoleUpdate *TeamMemberRoleUpdate `codec:"teamMemberRoleUpdate,omitempty" json:"teamMemberRoleUpdate,omitempty"`
Joined []ConversationMember `codec:"joined" json:"joined"`
Removed []ConversationMember `codec:"removed" json:"removed"`
Reset []ConversationMember `codec:"reset" json:"reset"`
Previewed []ConversationID `codec:"previewed" json:"previewed"`
UnreadUpdate *UnreadUpdate `codec:"unreadUpdate,omitempty" json:"unreadUpdate,omitempty"`
UnreadUpdates []UnreadUpdate `codec:"unreadUpdates" json:"unreadUpdates"`
}
func (o UpdateConversationMembership) DeepCopy() UpdateConversationMembership {
return UpdateConversationMembership{
InboxVers: o.InboxVers.DeepCopy(),
TeamMemberRoleUpdate: (func(x *TeamMemberRoleUpdate) *TeamMemberRoleUpdate {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.TeamMemberRoleUpdate),
Joined: (func(x []ConversationMember) []ConversationMember {
if x == nil {
return nil
}
ret := make([]ConversationMember, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.Joined),
Removed: (func(x []ConversationMember) []ConversationMember {
if x == nil {
return nil
}
ret := make([]ConversationMember, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.Removed),
Reset: (func(x []ConversationMember) []ConversationMember {
if x == nil {
return nil
}
ret := make([]ConversationMember, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.Reset),
Previewed: (func(x []ConversationID) []ConversationID {
if x == nil {
return nil
}
ret := make([]ConversationID, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.Previewed),
UnreadUpdate: (func(x *UnreadUpdate) *UnreadUpdate {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.UnreadUpdate),
UnreadUpdates: (func(x []UnreadUpdate) []UnreadUpdate {
if x == nil {
return nil
}
ret := make([]UnreadUpdate, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.UnreadUpdates),
}
}
type ConversationUpdate struct {
ConvID ConversationID `codec:"convID" json:"convID"`
Existence ConversationExistence `codec:"existence" json:"existence"`
}
func (o ConversationUpdate) DeepCopy() ConversationUpdate {
return ConversationUpdate{
ConvID: o.ConvID.DeepCopy(),
Existence: o.Existence.DeepCopy(),
}
}
type UpdateConversations struct {
InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"`
ConvUpdates []ConversationUpdate `codec:"convUpdates" json:"convUpdates"`
}
func (o UpdateConversations) DeepCopy() UpdateConversations {
return UpdateConversations{
InboxVers: o.InboxVers.DeepCopy(),
ConvUpdates: (func(x []ConversationUpdate) []ConversationUpdate {
if x == nil {
return nil
}
ret := make([]ConversationUpdate, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.ConvUpdates),
}
}
type SetConvRetentionUpdate struct {
InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"`
ConvID ConversationID `codec:"convID" json:"convID"`
Policy RetentionPolicy `codec:"policy" json:"policy"`
}
func (o SetConvRetentionUpdate) DeepCopy() SetConvRetentionUpdate {
return SetConvRetentionUpdate{
InboxVers: o.InboxVers.DeepCopy(),
ConvID: o.ConvID.DeepCopy(),
Policy: o.Policy.DeepCopy(),
}
}
type SetTeamRetentionUpdate struct {
InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"`
TeamID keybase1.TeamID `codec:"teamID" json:"teamID"`
Policy RetentionPolicy `codec:"policy" json:"policy"`
}
func (o SetTeamRetentionUpdate) DeepCopy() SetTeamRetentionUpdate {
return SetTeamRetentionUpdate{
InboxVers: o.InboxVers.DeepCopy(),
TeamID: o.TeamID.DeepCopy(),
Policy: o.Policy.DeepCopy(),
}
}
type SetConvSettingsUpdate struct {
InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"`
ConvID ConversationID `codec:"convID" json:"convID"`
ConvSettings *ConversationSettings `codec:"convSettings,omitempty" json:"convSettings,omitempty"`
}
func (o SetConvSettingsUpdate) DeepCopy() SetConvSettingsUpdate {
return SetConvSettingsUpdate{
InboxVers: o.InboxVers.DeepCopy(),
ConvID: o.ConvID.DeepCopy(),
ConvSettings: (func(x *ConversationSettings) *ConversationSettings {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.ConvSettings),
}
}
type KBFSImpteamUpgradeUpdate struct {
ConvID ConversationID `codec:"convID" json:"convID"`
InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"`
TopicType TopicType `codec:"topicType" json:"topicType"`
}
func (o KBFSImpteamUpgradeUpdate) DeepCopy() KBFSImpteamUpgradeUpdate {
return KBFSImpteamUpgradeUpdate{
ConvID: o.ConvID.DeepCopy(),
InboxVers: o.InboxVers.DeepCopy(),
TopicType: o.TopicType.DeepCopy(),
}
}
type SubteamRenameUpdate struct {
ConvIDs []ConversationID `codec:"convIDs" json:"convIDs"`
InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"`
}
func (o SubteamRenameUpdate) DeepCopy() SubteamRenameUpdate {
return SubteamRenameUpdate{
ConvIDs: (func(x []ConversationID) []ConversationID {
if x == nil {
return nil
}
ret := make([]ConversationID, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.ConvIDs),
InboxVers: o.InboxVers.DeepCopy(),
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,933 +0,0 @@
// Auto-generated to Go types using avdl-compiler v1.4.6 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/chat1/notify.avdl
package chat1
import (
keybase1 "samhofi.us/x/keybase/v2/types/keybase1"
"errors"
"fmt"
)
type ChatActivitySource int
const (
ChatActivitySource_LOCAL ChatActivitySource = 0
ChatActivitySource_REMOTE ChatActivitySource = 1
)
func (o ChatActivitySource) DeepCopy() ChatActivitySource { return o }
var ChatActivitySourceMap = map[string]ChatActivitySource{
"LOCAL": 0,
"REMOTE": 1,
}
var ChatActivitySourceRevMap = map[ChatActivitySource]string{
0: "LOCAL",
1: "REMOTE",
}
func (e ChatActivitySource) String() string {
if v, ok := ChatActivitySourceRevMap[e]; ok {
return v
}
return fmt.Sprintf("%v", int(e))
}
type ChatActivityType int
const (
ChatActivityType_RESERVED ChatActivityType = 0
ChatActivityType_INCOMING_MESSAGE ChatActivityType = 1
ChatActivityType_READ_MESSAGE ChatActivityType = 2
ChatActivityType_NEW_CONVERSATION ChatActivityType = 3
ChatActivityType_SET_STATUS ChatActivityType = 4
ChatActivityType_FAILED_MESSAGE ChatActivityType = 5
ChatActivityType_MEMBERS_UPDATE ChatActivityType = 6
ChatActivityType_SET_APP_NOTIFICATION_SETTINGS ChatActivityType = 7
ChatActivityType_TEAMTYPE ChatActivityType = 8
ChatActivityType_EXPUNGE ChatActivityType = 9
ChatActivityType_EPHEMERAL_PURGE ChatActivityType = 10
ChatActivityType_REACTION_UPDATE ChatActivityType = 11
ChatActivityType_MESSAGES_UPDATED ChatActivityType = 12
)
func (o ChatActivityType) DeepCopy() ChatActivityType { return o }
var ChatActivityTypeMap = map[string]ChatActivityType{
"RESERVED": 0,
"INCOMING_MESSAGE": 1,
"READ_MESSAGE": 2,
"NEW_CONVERSATION": 3,
"SET_STATUS": 4,
"FAILED_MESSAGE": 5,
"MEMBERS_UPDATE": 6,
"SET_APP_NOTIFICATION_SETTINGS": 7,
"TEAMTYPE": 8,
"EXPUNGE": 9,
"EPHEMERAL_PURGE": 10,
"REACTION_UPDATE": 11,
"MESSAGES_UPDATED": 12,
}
var ChatActivityTypeRevMap = map[ChatActivityType]string{
0: "RESERVED",
1: "INCOMING_MESSAGE",
2: "READ_MESSAGE",
3: "NEW_CONVERSATION",
4: "SET_STATUS",
5: "FAILED_MESSAGE",
6: "MEMBERS_UPDATE",
7: "SET_APP_NOTIFICATION_SETTINGS",
8: "TEAMTYPE",
9: "EXPUNGE",
10: "EPHEMERAL_PURGE",
11: "REACTION_UPDATE",
12: "MESSAGES_UPDATED",
}
func (e ChatActivityType) String() string {
if v, ok := ChatActivityTypeRevMap[e]; ok {
return v
}
return fmt.Sprintf("%v", int(e))
}
type IncomingMessage struct {
Message UIMessage `codec:"message" json:"message"`
ModifiedMessage *UIMessage `codec:"modifiedMessage,omitempty" json:"modifiedMessage,omitempty"`
ConvID ConversationID `codec:"convID" json:"convID"`
DisplayDesktopNotification bool `codec:"displayDesktopNotification" json:"displayDesktopNotification"`
DesktopNotificationSnippet string `codec:"desktopNotificationSnippet" json:"desktopNotificationSnippet"`
Conv *InboxUIItem `codec:"conv,omitempty" json:"conv,omitempty"`
Pagination *UIPagination `codec:"pagination,omitempty" json:"pagination,omitempty"`
}
func (o IncomingMessage) DeepCopy() IncomingMessage {
return IncomingMessage{
Message: o.Message.DeepCopy(),
ModifiedMessage: (func(x *UIMessage) *UIMessage {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.ModifiedMessage),
ConvID: o.ConvID.DeepCopy(),
DisplayDesktopNotification: o.DisplayDesktopNotification,
DesktopNotificationSnippet: o.DesktopNotificationSnippet,
Conv: (func(x *InboxUIItem) *InboxUIItem {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Conv),
Pagination: (func(x *UIPagination) *UIPagination {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Pagination),
}
}
type ReadMessageInfo struct {
ConvID ConversationID `codec:"convID" json:"convID"`
MsgID MessageID `codec:"msgID" json:"msgID"`
Conv *InboxUIItem `codec:"conv,omitempty" json:"conv,omitempty"`
}
func (o ReadMessageInfo) DeepCopy() ReadMessageInfo {
return ReadMessageInfo{
ConvID: o.ConvID.DeepCopy(),
MsgID: o.MsgID.DeepCopy(),
Conv: (func(x *InboxUIItem) *InboxUIItem {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Conv),
}
}
type NewConversationInfo struct {
ConvID ConversationID `codec:"convID" json:"convID"`
Conv *InboxUIItem `codec:"conv,omitempty" json:"conv,omitempty"`
}
func (o NewConversationInfo) DeepCopy() NewConversationInfo {
return NewConversationInfo{
ConvID: o.ConvID.DeepCopy(),
Conv: (func(x *InboxUIItem) *InboxUIItem {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Conv),
}
}
type SetStatusInfo struct {
ConvID ConversationID `codec:"convID" json:"convID"`
Status ConversationStatus `codec:"status" json:"status"`
Conv *InboxUIItem `codec:"conv,omitempty" json:"conv,omitempty"`
}
func (o SetStatusInfo) DeepCopy() SetStatusInfo {
return SetStatusInfo{
ConvID: o.ConvID.DeepCopy(),
Status: o.Status.DeepCopy(),
Conv: (func(x *InboxUIItem) *InboxUIItem {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Conv),
}
}
type SetAppNotificationSettingsInfo struct {
ConvID ConversationID `codec:"convID" json:"convID"`
Settings ConversationNotificationInfo `codec:"settings" json:"settings"`
}
func (o SetAppNotificationSettingsInfo) DeepCopy() SetAppNotificationSettingsInfo {
return SetAppNotificationSettingsInfo{
ConvID: o.ConvID.DeepCopy(),
Settings: o.Settings.DeepCopy(),
}
}
type FailedMessageInfo struct {
OutboxRecords []OutboxRecord `codec:"outboxRecords" json:"outboxRecords"`
IsEphemeralPurge bool `codec:"isEphemeralPurge" json:"isEphemeralPurge"`
Conv *InboxUIItem `codec:"conv,omitempty" json:"conv,omitempty"`
}
func (o FailedMessageInfo) DeepCopy() FailedMessageInfo {
return FailedMessageInfo{
OutboxRecords: (func(x []OutboxRecord) []OutboxRecord {
if x == nil {
return nil
}
ret := make([]OutboxRecord, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.OutboxRecords),
IsEphemeralPurge: o.IsEphemeralPurge,
Conv: (func(x *InboxUIItem) *InboxUIItem {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Conv),
}
}
type MemberInfo struct {
Member string `codec:"member" json:"member"`
Status ConversationMemberStatus `codec:"status" json:"status"`
}
func (o MemberInfo) DeepCopy() MemberInfo {
return MemberInfo{
Member: o.Member,
Status: o.Status.DeepCopy(),
}
}
type MembersUpdateInfo struct {
ConvID ConversationID `codec:"convID" json:"convID"`
Members []MemberInfo `codec:"members" json:"members"`
}
func (o MembersUpdateInfo) DeepCopy() MembersUpdateInfo {
return MembersUpdateInfo{
ConvID: o.ConvID.DeepCopy(),
Members: (func(x []MemberInfo) []MemberInfo {
if x == nil {
return nil
}
ret := make([]MemberInfo, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.Members),
}
}
type TeamTypeInfo struct {
ConvID ConversationID `codec:"convID" json:"convID"`
TeamType TeamType `codec:"teamType" json:"teamType"`
Conv *InboxUIItem `codec:"conv,omitempty" json:"conv,omitempty"`
}
func (o TeamTypeInfo) DeepCopy() TeamTypeInfo {
return TeamTypeInfo{
ConvID: o.ConvID.DeepCopy(),
TeamType: o.TeamType.DeepCopy(),
Conv: (func(x *InboxUIItem) *InboxUIItem {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Conv),
}
}
type ExpungeInfo struct {
ConvID ConversationID `codec:"convID" json:"convID"`
Expunge Expunge `codec:"expunge" json:"expunge"`
}
func (o ExpungeInfo) DeepCopy() ExpungeInfo {
return ExpungeInfo{
ConvID: o.ConvID.DeepCopy(),
Expunge: o.Expunge.DeepCopy(),
}
}
type EphemeralPurgeNotifInfo struct {
ConvID ConversationID `codec:"convID" json:"convID"`
Msgs []UIMessage `codec:"msgs" json:"msgs"`
}
func (o EphemeralPurgeNotifInfo) DeepCopy() EphemeralPurgeNotifInfo {
return EphemeralPurgeNotifInfo{
ConvID: o.ConvID.DeepCopy(),
Msgs: (func(x []UIMessage) []UIMessage {
if x == nil {
return nil
}
ret := make([]UIMessage, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.Msgs),
}
}
type ReactionUpdate struct {
Reactions UIReactionMap `codec:"reactions" json:"reactions"`
TargetMsgID MessageID `codec:"targetMsgID" json:"targetMsgID"`
}
func (o ReactionUpdate) DeepCopy() ReactionUpdate {
return ReactionUpdate{
Reactions: o.Reactions.DeepCopy(),
TargetMsgID: o.TargetMsgID.DeepCopy(),
}
}
type ReactionUpdateNotif struct {
ConvID ConversationID `codec:"convID" json:"convID"`
UserReacjis keybase1.UserReacjis `codec:"userReacjis" json:"userReacjis"`
ReactionUpdates []ReactionUpdate `codec:"reactionUpdates" json:"reactionUpdates"`
}
func (o ReactionUpdateNotif) DeepCopy() ReactionUpdateNotif {
return ReactionUpdateNotif{
ConvID: o.ConvID.DeepCopy(),
UserReacjis: o.UserReacjis.DeepCopy(),
ReactionUpdates: (func(x []ReactionUpdate) []ReactionUpdate {
if x == nil {
return nil
}
ret := make([]ReactionUpdate, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.ReactionUpdates),
}
}
type MessagesUpdated struct {
ConvID ConversationID `codec:"convID" json:"convID"`
Updates []UIMessage `codec:"updates" json:"updates"`
}
func (o MessagesUpdated) DeepCopy() MessagesUpdated {
return MessagesUpdated{
ConvID: o.ConvID.DeepCopy(),
Updates: (func(x []UIMessage) []UIMessage {
if x == nil {
return nil
}
ret := make([]UIMessage, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.Updates),
}
}
type ChatActivity struct {
ActivityType__ ChatActivityType `codec:"activityType" json:"activityType"`
IncomingMessage__ *IncomingMessage `codec:"incomingMessage,omitempty" json:"incomingMessage,omitempty"`
ReadMessage__ *ReadMessageInfo `codec:"readMessage,omitempty" json:"readMessage,omitempty"`
NewConversation__ *NewConversationInfo `codec:"newConversation,omitempty" json:"newConversation,omitempty"`
SetStatus__ *SetStatusInfo `codec:"setStatus,omitempty" json:"setStatus,omitempty"`
FailedMessage__ *FailedMessageInfo `codec:"failedMessage,omitempty" json:"failedMessage,omitempty"`
MembersUpdate__ *MembersUpdateInfo `codec:"membersUpdate,omitempty" json:"membersUpdate,omitempty"`
SetAppNotificationSettings__ *SetAppNotificationSettingsInfo `codec:"setAppNotificationSettings,omitempty" json:"setAppNotificationSettings,omitempty"`
Teamtype__ *TeamTypeInfo `codec:"teamtype,omitempty" json:"teamtype,omitempty"`
Expunge__ *ExpungeInfo `codec:"expunge,omitempty" json:"expunge,omitempty"`
EphemeralPurge__ *EphemeralPurgeNotifInfo `codec:"ephemeralPurge,omitempty" json:"ephemeralPurge,omitempty"`
ReactionUpdate__ *ReactionUpdateNotif `codec:"reactionUpdate,omitempty" json:"reactionUpdate,omitempty"`
MessagesUpdated__ *MessagesUpdated `codec:"messagesUpdated,omitempty" json:"messagesUpdated,omitempty"`
}
func (o *ChatActivity) ActivityType() (ret ChatActivityType, err error) {
switch o.ActivityType__ {
case ChatActivityType_INCOMING_MESSAGE:
if o.IncomingMessage__ == nil {
err = errors.New("unexpected nil value for IncomingMessage__")
return ret, err
}
case ChatActivityType_READ_MESSAGE:
if o.ReadMessage__ == nil {
err = errors.New("unexpected nil value for ReadMessage__")
return ret, err
}
case ChatActivityType_NEW_CONVERSATION:
if o.NewConversation__ == nil {
err = errors.New("unexpected nil value for NewConversation__")
return ret, err
}
case ChatActivityType_SET_STATUS:
if o.SetStatus__ == nil {
err = errors.New("unexpected nil value for SetStatus__")
return ret, err
}
case ChatActivityType_FAILED_MESSAGE:
if o.FailedMessage__ == nil {
err = errors.New("unexpected nil value for FailedMessage__")
return ret, err
}
case ChatActivityType_MEMBERS_UPDATE:
if o.MembersUpdate__ == nil {
err = errors.New("unexpected nil value for MembersUpdate__")
return ret, err
}
case ChatActivityType_SET_APP_NOTIFICATION_SETTINGS:
if o.SetAppNotificationSettings__ == nil {
err = errors.New("unexpected nil value for SetAppNotificationSettings__")
return ret, err
}
case ChatActivityType_TEAMTYPE:
if o.Teamtype__ == nil {
err = errors.New("unexpected nil value for Teamtype__")
return ret, err
}
case ChatActivityType_EXPUNGE:
if o.Expunge__ == nil {
err = errors.New("unexpected nil value for Expunge__")
return ret, err
}
case ChatActivityType_EPHEMERAL_PURGE:
if o.EphemeralPurge__ == nil {
err = errors.New("unexpected nil value for EphemeralPurge__")
return ret, err
}
case ChatActivityType_REACTION_UPDATE:
if o.ReactionUpdate__ == nil {
err = errors.New("unexpected nil value for ReactionUpdate__")
return ret, err
}
case ChatActivityType_MESSAGES_UPDATED:
if o.MessagesUpdated__ == nil {
err = errors.New("unexpected nil value for MessagesUpdated__")
return ret, err
}
}
return o.ActivityType__, nil
}
func (o ChatActivity) IncomingMessage() (res IncomingMessage) {
if o.ActivityType__ != ChatActivityType_INCOMING_MESSAGE {
panic("wrong case accessed")
}
if o.IncomingMessage__ == nil {
return
}
return *o.IncomingMessage__
}
func (o ChatActivity) ReadMessage() (res ReadMessageInfo) {
if o.ActivityType__ != ChatActivityType_READ_MESSAGE {
panic("wrong case accessed")
}
if o.ReadMessage__ == nil {
return
}
return *o.ReadMessage__
}
func (o ChatActivity) NewConversation() (res NewConversationInfo) {
if o.ActivityType__ != ChatActivityType_NEW_CONVERSATION {
panic("wrong case accessed")
}
if o.NewConversation__ == nil {
return
}
return *o.NewConversation__
}
func (o ChatActivity) SetStatus() (res SetStatusInfo) {
if o.ActivityType__ != ChatActivityType_SET_STATUS {
panic("wrong case accessed")
}
if o.SetStatus__ == nil {
return
}
return *o.SetStatus__
}
func (o ChatActivity) FailedMessage() (res FailedMessageInfo) {
if o.ActivityType__ != ChatActivityType_FAILED_MESSAGE {
panic("wrong case accessed")
}
if o.FailedMessage__ == nil {
return
}
return *o.FailedMessage__
}
func (o ChatActivity) MembersUpdate() (res MembersUpdateInfo) {
if o.ActivityType__ != ChatActivityType_MEMBERS_UPDATE {
panic("wrong case accessed")
}
if o.MembersUpdate__ == nil {
return
}
return *o.MembersUpdate__
}
func (o ChatActivity) SetAppNotificationSettings() (res SetAppNotificationSettingsInfo) {
if o.ActivityType__ != ChatActivityType_SET_APP_NOTIFICATION_SETTINGS {
panic("wrong case accessed")
}
if o.SetAppNotificationSettings__ == nil {
return
}
return *o.SetAppNotificationSettings__
}
func (o ChatActivity) Teamtype() (res TeamTypeInfo) {
if o.ActivityType__ != ChatActivityType_TEAMTYPE {
panic("wrong case accessed")
}
if o.Teamtype__ == nil {
return
}
return *o.Teamtype__
}
func (o ChatActivity) Expunge() (res ExpungeInfo) {
if o.ActivityType__ != ChatActivityType_EXPUNGE {
panic("wrong case accessed")
}
if o.Expunge__ == nil {
return
}
return *o.Expunge__
}
func (o ChatActivity) EphemeralPurge() (res EphemeralPurgeNotifInfo) {
if o.ActivityType__ != ChatActivityType_EPHEMERAL_PURGE {
panic("wrong case accessed")
}
if o.EphemeralPurge__ == nil {
return
}
return *o.EphemeralPurge__
}
func (o ChatActivity) ReactionUpdate() (res ReactionUpdateNotif) {
if o.ActivityType__ != ChatActivityType_REACTION_UPDATE {
panic("wrong case accessed")
}
if o.ReactionUpdate__ == nil {
return
}
return *o.ReactionUpdate__
}
func (o ChatActivity) MessagesUpdated() (res MessagesUpdated) {
if o.ActivityType__ != ChatActivityType_MESSAGES_UPDATED {
panic("wrong case accessed")
}
if o.MessagesUpdated__ == nil {
return
}
return *o.MessagesUpdated__
}
func NewChatActivityWithIncomingMessage(v IncomingMessage) ChatActivity {
return ChatActivity{
ActivityType__: ChatActivityType_INCOMING_MESSAGE,
IncomingMessage__: &v,
}
}
func NewChatActivityWithReadMessage(v ReadMessageInfo) ChatActivity {
return ChatActivity{
ActivityType__: ChatActivityType_READ_MESSAGE,
ReadMessage__: &v,
}
}
func NewChatActivityWithNewConversation(v NewConversationInfo) ChatActivity {
return ChatActivity{
ActivityType__: ChatActivityType_NEW_CONVERSATION,
NewConversation__: &v,
}
}
func NewChatActivityWithSetStatus(v SetStatusInfo) ChatActivity {
return ChatActivity{
ActivityType__: ChatActivityType_SET_STATUS,
SetStatus__: &v,
}
}
func NewChatActivityWithFailedMessage(v FailedMessageInfo) ChatActivity {
return ChatActivity{
ActivityType__: ChatActivityType_FAILED_MESSAGE,
FailedMessage__: &v,
}
}
func NewChatActivityWithMembersUpdate(v MembersUpdateInfo) ChatActivity {
return ChatActivity{
ActivityType__: ChatActivityType_MEMBERS_UPDATE,
MembersUpdate__: &v,
}
}
func NewChatActivityWithSetAppNotificationSettings(v SetAppNotificationSettingsInfo) ChatActivity {
return ChatActivity{
ActivityType__: ChatActivityType_SET_APP_NOTIFICATION_SETTINGS,
SetAppNotificationSettings__: &v,
}
}
func NewChatActivityWithTeamtype(v TeamTypeInfo) ChatActivity {
return ChatActivity{
ActivityType__: ChatActivityType_TEAMTYPE,
Teamtype__: &v,
}
}
func NewChatActivityWithExpunge(v ExpungeInfo) ChatActivity {
return ChatActivity{
ActivityType__: ChatActivityType_EXPUNGE,
Expunge__: &v,
}
}
func NewChatActivityWithEphemeralPurge(v EphemeralPurgeNotifInfo) ChatActivity {
return ChatActivity{
ActivityType__: ChatActivityType_EPHEMERAL_PURGE,
EphemeralPurge__: &v,
}
}
func NewChatActivityWithReactionUpdate(v ReactionUpdateNotif) ChatActivity {
return ChatActivity{
ActivityType__: ChatActivityType_REACTION_UPDATE,
ReactionUpdate__: &v,
}
}
func NewChatActivityWithMessagesUpdated(v MessagesUpdated) ChatActivity {
return ChatActivity{
ActivityType__: ChatActivityType_MESSAGES_UPDATED,
MessagesUpdated__: &v,
}
}
func (o ChatActivity) DeepCopy() ChatActivity {
return ChatActivity{
ActivityType__: o.ActivityType__.DeepCopy(),
IncomingMessage__: (func(x *IncomingMessage) *IncomingMessage {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.IncomingMessage__),
ReadMessage__: (func(x *ReadMessageInfo) *ReadMessageInfo {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.ReadMessage__),
NewConversation__: (func(x *NewConversationInfo) *NewConversationInfo {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.NewConversation__),
SetStatus__: (func(x *SetStatusInfo) *SetStatusInfo {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.SetStatus__),
FailedMessage__: (func(x *FailedMessageInfo) *FailedMessageInfo {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.FailedMessage__),
MembersUpdate__: (func(x *MembersUpdateInfo) *MembersUpdateInfo {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.MembersUpdate__),
SetAppNotificationSettings__: (func(x *SetAppNotificationSettingsInfo) *SetAppNotificationSettingsInfo {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.SetAppNotificationSettings__),
Teamtype__: (func(x *TeamTypeInfo) *TeamTypeInfo {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Teamtype__),
Expunge__: (func(x *ExpungeInfo) *ExpungeInfo {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Expunge__),
EphemeralPurge__: (func(x *EphemeralPurgeNotifInfo) *EphemeralPurgeNotifInfo {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.EphemeralPurge__),
ReactionUpdate__: (func(x *ReactionUpdateNotif) *ReactionUpdateNotif {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.ReactionUpdate__),
MessagesUpdated__: (func(x *MessagesUpdated) *MessagesUpdated {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.MessagesUpdated__),
}
}
type TyperInfo struct {
Uid keybase1.UID `codec:"uid" json:"uid"`
Username string `codec:"username" json:"username"`
DeviceID keybase1.DeviceID `codec:"deviceID" json:"deviceID"`
}
func (o TyperInfo) DeepCopy() TyperInfo {
return TyperInfo{
Uid: o.Uid.DeepCopy(),
Username: o.Username,
DeviceID: o.DeviceID.DeepCopy(),
}
}
type ConvTypingUpdate struct {
ConvID ConversationID `codec:"convID" json:"convID"`
Typers []TyperInfo `codec:"typers" json:"typers"`
}
func (o ConvTypingUpdate) DeepCopy() ConvTypingUpdate {
return ConvTypingUpdate{
ConvID: o.ConvID.DeepCopy(),
Typers: (func(x []TyperInfo) []TyperInfo {
if x == nil {
return nil
}
ret := make([]TyperInfo, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.Typers),
}
}
type StaleUpdateType int
const (
StaleUpdateType_CLEAR StaleUpdateType = 0
StaleUpdateType_NEWACTIVITY StaleUpdateType = 1
)
func (o StaleUpdateType) DeepCopy() StaleUpdateType { return o }
var StaleUpdateTypeMap = map[string]StaleUpdateType{
"CLEAR": 0,
"NEWACTIVITY": 1,
}
var StaleUpdateTypeRevMap = map[StaleUpdateType]string{
0: "CLEAR",
1: "NEWACTIVITY",
}
func (e StaleUpdateType) String() string {
if v, ok := StaleUpdateTypeRevMap[e]; ok {
return v
}
return fmt.Sprintf("%v", int(e))
}
type ConversationStaleUpdate struct {
ConvID ConversationID `codec:"convID" json:"convID"`
UpdateType StaleUpdateType `codec:"updateType" json:"updateType"`
}
func (o ConversationStaleUpdate) DeepCopy() ConversationStaleUpdate {
return ConversationStaleUpdate{
ConvID: o.ConvID.DeepCopy(),
UpdateType: o.UpdateType.DeepCopy(),
}
}
type ChatSyncIncrementalConv struct {
Conv UnverifiedInboxUIItem `codec:"conv" json:"conv"`
ShouldUnbox bool `codec:"shouldUnbox" json:"shouldUnbox"`
}
func (o ChatSyncIncrementalConv) DeepCopy() ChatSyncIncrementalConv {
return ChatSyncIncrementalConv{
Conv: o.Conv.DeepCopy(),
ShouldUnbox: o.ShouldUnbox,
}
}
type ChatSyncIncrementalInfo struct {
Items []ChatSyncIncrementalConv `codec:"items" json:"items"`
Removals []string `codec:"removals" json:"removals"`
}
func (o ChatSyncIncrementalInfo) DeepCopy() ChatSyncIncrementalInfo {
return ChatSyncIncrementalInfo{
Items: (func(x []ChatSyncIncrementalConv) []ChatSyncIncrementalConv {
if x == nil {
return nil
}
ret := make([]ChatSyncIncrementalConv, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.Items),
Removals: (func(x []string) []string {
if x == nil {
return nil
}
ret := make([]string, len(x))
for i, v := range x {
vCopy := v
ret[i] = vCopy
}
return ret
})(o.Removals),
}
}
type ChatSyncResult struct {
SyncType__ SyncInboxResType `codec:"syncType" json:"syncType"`
Incremental__ *ChatSyncIncrementalInfo `codec:"incremental,omitempty" json:"incremental,omitempty"`
}
func (o *ChatSyncResult) SyncType() (ret SyncInboxResType, err error) {
switch o.SyncType__ {
case SyncInboxResType_INCREMENTAL:
if o.Incremental__ == nil {
err = errors.New("unexpected nil value for Incremental__")
return ret, err
}
}
return o.SyncType__, nil
}
func (o ChatSyncResult) Incremental() (res ChatSyncIncrementalInfo) {
if o.SyncType__ != SyncInboxResType_INCREMENTAL {
panic("wrong case accessed")
}
if o.Incremental__ == nil {
return
}
return *o.Incremental__
}
func NewChatSyncResultWithCurrent() ChatSyncResult {
return ChatSyncResult{
SyncType__: SyncInboxResType_CURRENT,
}
}
func NewChatSyncResultWithClear() ChatSyncResult {
return ChatSyncResult{
SyncType__: SyncInboxResType_CLEAR,
}
}
func NewChatSyncResultWithIncremental(v ChatSyncIncrementalInfo) ChatSyncResult {
return ChatSyncResult{
SyncType__: SyncInboxResType_INCREMENTAL,
Incremental__: &v,
}
}
func (o ChatSyncResult) DeepCopy() ChatSyncResult {
return ChatSyncResult{
SyncType__: o.SyncType__.DeepCopy(),
Incremental__: (func(x *ChatSyncIncrementalInfo) *ChatSyncIncrementalInfo {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Incremental__),
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,849 +0,0 @@
// Auto-generated to Go types using avdl-compiler v1.4.6 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/chat1/unfurl.avdl
package chat1
import (
gregor1 "samhofi.us/x/keybase/v2/types/gregor1"
"errors"
"fmt"
)
type UnfurlType int
const (
UnfurlType_GENERIC UnfurlType = 0
UnfurlType_YOUTUBE UnfurlType = 1
UnfurlType_GIPHY UnfurlType = 2
UnfurlType_MAPS UnfurlType = 3
)
func (o UnfurlType) DeepCopy() UnfurlType { return o }
var UnfurlTypeMap = map[string]UnfurlType{
"GENERIC": 0,
"YOUTUBE": 1,
"GIPHY": 2,
"MAPS": 3,
}
var UnfurlTypeRevMap = map[UnfurlType]string{
0: "GENERIC",
1: "YOUTUBE",
2: "GIPHY",
3: "MAPS",
}
func (e UnfurlType) String() string {
if v, ok := UnfurlTypeRevMap[e]; ok {
return v
}
return fmt.Sprintf("%v", int(e))
}
type UnfurlVideo struct {
Url string `codec:"url" json:"url"`
MimeType string `codec:"mimeType" json:"mimeType"`
Height int `codec:"height" json:"height"`
Width int `codec:"width" json:"width"`
}
func (o UnfurlVideo) DeepCopy() UnfurlVideo {
return UnfurlVideo{
Url: o.Url,
MimeType: o.MimeType,
Height: o.Height,
Width: o.Width,
}
}
type UnfurlGenericRaw struct {
Title string `codec:"title" json:"title"`
Url string `codec:"url" json:"url"`
SiteName string `codec:"siteName" json:"siteName"`
FaviconUrl *string `codec:"faviconUrl,omitempty" json:"faviconUrl,omitempty"`
ImageUrl *string `codec:"imageUrl,omitempty" json:"imageUrl,omitempty"`
Video *UnfurlVideo `codec:"video,omitempty" json:"video,omitempty"`
PublishTime *int `codec:"publishTime,omitempty" json:"publishTime,omitempty"`
Description *string `codec:"description,omitempty" json:"description,omitempty"`
}
func (o UnfurlGenericRaw) DeepCopy() UnfurlGenericRaw {
return UnfurlGenericRaw{
Title: o.Title,
Url: o.Url,
SiteName: o.SiteName,
FaviconUrl: (func(x *string) *string {
if x == nil {
return nil
}
tmp := (*x)
return &tmp
})(o.FaviconUrl),
ImageUrl: (func(x *string) *string {
if x == nil {
return nil
}
tmp := (*x)
return &tmp
})(o.ImageUrl),
Video: (func(x *UnfurlVideo) *UnfurlVideo {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Video),
PublishTime: (func(x *int) *int {
if x == nil {
return nil
}
tmp := (*x)
return &tmp
})(o.PublishTime),
Description: (func(x *string) *string {
if x == nil {
return nil
}
tmp := (*x)
return &tmp
})(o.Description),
}
}
type UnfurlYoutubeRaw struct {
}
func (o UnfurlYoutubeRaw) DeepCopy() UnfurlYoutubeRaw {
return UnfurlYoutubeRaw{}
}
type UnfurlGiphyRaw struct {
ImageUrl *string `codec:"imageUrl,omitempty" json:"imageUrl,omitempty"`
Video *UnfurlVideo `codec:"video,omitempty" json:"video,omitempty"`
FaviconUrl *string `codec:"faviconUrl,omitempty" json:"faviconUrl,omitempty"`
}
func (o UnfurlGiphyRaw) DeepCopy() UnfurlGiphyRaw {
return UnfurlGiphyRaw{
ImageUrl: (func(x *string) *string {
if x == nil {
return nil
}
tmp := (*x)
return &tmp
})(o.ImageUrl),
Video: (func(x *UnfurlVideo) *UnfurlVideo {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Video),
FaviconUrl: (func(x *string) *string {
if x == nil {
return nil
}
tmp := (*x)
return &tmp
})(o.FaviconUrl),
}
}
type UnfurlMapsRaw struct {
Title string `codec:"title" json:"title"`
Url string `codec:"url" json:"url"`
SiteName string `codec:"siteName" json:"siteName"`
ImageUrl string `codec:"imageUrl" json:"imageUrl"`
HistoryImageUrl *string `codec:"historyImageUrl,omitempty" json:"historyImageUrl,omitempty"`
Description string `codec:"description" json:"description"`
Coord Coordinate `codec:"coord" json:"coord"`
Time gregor1.Time `codec:"time" json:"time"`
LiveLocationEndTime *gregor1.Time `codec:"liveLocationEndTime,omitempty" json:"liveLocationEndTime,omitempty"`
LiveLocationDone bool `codec:"liveLocationDone" json:"liveLocationDone"`
}
func (o UnfurlMapsRaw) DeepCopy() UnfurlMapsRaw {
return UnfurlMapsRaw{
Title: o.Title,
Url: o.Url,
SiteName: o.SiteName,
ImageUrl: o.ImageUrl,
HistoryImageUrl: (func(x *string) *string {
if x == nil {
return nil
}
tmp := (*x)
return &tmp
})(o.HistoryImageUrl),
Description: o.Description,
Coord: o.Coord.DeepCopy(),
Time: o.Time.DeepCopy(),
LiveLocationEndTime: (func(x *gregor1.Time) *gregor1.Time {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.LiveLocationEndTime),
LiveLocationDone: o.LiveLocationDone,
}
}
type UnfurlRaw struct {
UnfurlType__ UnfurlType `codec:"unfurlType" json:"unfurlType"`
Generic__ *UnfurlGenericRaw `codec:"generic,omitempty" json:"generic,omitempty"`
Youtube__ *UnfurlYoutubeRaw `codec:"youtube,omitempty" json:"youtube,omitempty"`
Giphy__ *UnfurlGiphyRaw `codec:"giphy,omitempty" json:"giphy,omitempty"`
Maps__ *UnfurlMapsRaw `codec:"maps,omitempty" json:"maps,omitempty"`
}
func (o *UnfurlRaw) UnfurlType() (ret UnfurlType, err error) {
switch o.UnfurlType__ {
case UnfurlType_GENERIC:
if o.Generic__ == nil {
err = errors.New("unexpected nil value for Generic__")
return ret, err
}
case UnfurlType_YOUTUBE:
if o.Youtube__ == nil {
err = errors.New("unexpected nil value for Youtube__")
return ret, err
}
case UnfurlType_GIPHY:
if o.Giphy__ == nil {
err = errors.New("unexpected nil value for Giphy__")
return ret, err
}
case UnfurlType_MAPS:
if o.Maps__ == nil {
err = errors.New("unexpected nil value for Maps__")
return ret, err
}
}
return o.UnfurlType__, nil
}
func (o UnfurlRaw) Generic() (res UnfurlGenericRaw) {
if o.UnfurlType__ != UnfurlType_GENERIC {
panic("wrong case accessed")
}
if o.Generic__ == nil {
return
}
return *o.Generic__
}
func (o UnfurlRaw) Youtube() (res UnfurlYoutubeRaw) {
if o.UnfurlType__ != UnfurlType_YOUTUBE {
panic("wrong case accessed")
}
if o.Youtube__ == nil {
return
}
return *o.Youtube__
}
func (o UnfurlRaw) Giphy() (res UnfurlGiphyRaw) {
if o.UnfurlType__ != UnfurlType_GIPHY {
panic("wrong case accessed")
}
if o.Giphy__ == nil {
return
}
return *o.Giphy__
}
func (o UnfurlRaw) Maps() (res UnfurlMapsRaw) {
if o.UnfurlType__ != UnfurlType_MAPS {
panic("wrong case accessed")
}
if o.Maps__ == nil {
return
}
return *o.Maps__
}
func NewUnfurlRawWithGeneric(v UnfurlGenericRaw) UnfurlRaw {
return UnfurlRaw{
UnfurlType__: UnfurlType_GENERIC,
Generic__: &v,
}
}
func NewUnfurlRawWithYoutube(v UnfurlYoutubeRaw) UnfurlRaw {
return UnfurlRaw{
UnfurlType__: UnfurlType_YOUTUBE,
Youtube__: &v,
}
}
func NewUnfurlRawWithGiphy(v UnfurlGiphyRaw) UnfurlRaw {
return UnfurlRaw{
UnfurlType__: UnfurlType_GIPHY,
Giphy__: &v,
}
}
func NewUnfurlRawWithMaps(v UnfurlMapsRaw) UnfurlRaw {
return UnfurlRaw{
UnfurlType__: UnfurlType_MAPS,
Maps__: &v,
}
}
func (o UnfurlRaw) DeepCopy() UnfurlRaw {
return UnfurlRaw{
UnfurlType__: o.UnfurlType__.DeepCopy(),
Generic__: (func(x *UnfurlGenericRaw) *UnfurlGenericRaw {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Generic__),
Youtube__: (func(x *UnfurlYoutubeRaw) *UnfurlYoutubeRaw {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Youtube__),
Giphy__: (func(x *UnfurlGiphyRaw) *UnfurlGiphyRaw {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Giphy__),
Maps__: (func(x *UnfurlMapsRaw) *UnfurlMapsRaw {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Maps__),
}
}
type UnfurlGenericMapInfo struct {
Coord Coordinate `codec:"coord" json:"coord"`
Time gregor1.Time `codec:"time" json:"time"`
LiveLocationEndTime *gregor1.Time `codec:"liveLocationEndTime,omitempty" json:"liveLocationEndTime,omitempty"`
IsLiveLocationDone bool `codec:"isLiveLocationDone" json:"isLiveLocationDone"`
}
func (o UnfurlGenericMapInfo) DeepCopy() UnfurlGenericMapInfo {
return UnfurlGenericMapInfo{
Coord: o.Coord.DeepCopy(),
Time: o.Time.DeepCopy(),
LiveLocationEndTime: (func(x *gregor1.Time) *gregor1.Time {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.LiveLocationEndTime),
IsLiveLocationDone: o.IsLiveLocationDone,
}
}
type UnfurlGeneric struct {
Title string `codec:"title" json:"title"`
Url string `codec:"url" json:"url"`
SiteName string `codec:"siteName" json:"siteName"`
Favicon *Asset `codec:"favicon,omitempty" json:"favicon,omitempty"`
Image *Asset `codec:"image,omitempty" json:"image,omitempty"`
PublishTime *int `codec:"publishTime,omitempty" json:"publishTime,omitempty"`
Description *string `codec:"description,omitempty" json:"description,omitempty"`
MapInfo *UnfurlGenericMapInfo `codec:"mapInfo,omitempty" json:"mapInfo,omitempty"`
}
func (o UnfurlGeneric) DeepCopy() UnfurlGeneric {
return UnfurlGeneric{
Title: o.Title,
Url: o.Url,
SiteName: o.SiteName,
Favicon: (func(x *Asset) *Asset {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Favicon),
Image: (func(x *Asset) *Asset {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Image),
PublishTime: (func(x *int) *int {
if x == nil {
return nil
}
tmp := (*x)
return &tmp
})(o.PublishTime),
Description: (func(x *string) *string {
if x == nil {
return nil
}
tmp := (*x)
return &tmp
})(o.Description),
MapInfo: (func(x *UnfurlGenericMapInfo) *UnfurlGenericMapInfo {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.MapInfo),
}
}
type UnfurlYoutube struct {
}
func (o UnfurlYoutube) DeepCopy() UnfurlYoutube {
return UnfurlYoutube{}
}
type UnfurlGiphy struct {
Favicon *Asset `codec:"favicon,omitempty" json:"favicon,omitempty"`
Image *Asset `codec:"image,omitempty" json:"image,omitempty"`
Video *Asset `codec:"video,omitempty" json:"video,omitempty"`
}
func (o UnfurlGiphy) DeepCopy() UnfurlGiphy {
return UnfurlGiphy{
Favicon: (func(x *Asset) *Asset {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Favicon),
Image: (func(x *Asset) *Asset {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Image),
Video: (func(x *Asset) *Asset {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Video),
}
}
type Unfurl struct {
UnfurlType__ UnfurlType `codec:"unfurlType" json:"unfurlType"`
Generic__ *UnfurlGeneric `codec:"generic,omitempty" json:"generic,omitempty"`
Youtube__ *UnfurlYoutube `codec:"youtube,omitempty" json:"youtube,omitempty"`
Giphy__ *UnfurlGiphy `codec:"giphy,omitempty" json:"giphy,omitempty"`
}
func (o *Unfurl) UnfurlType() (ret UnfurlType, err error) {
switch o.UnfurlType__ {
case UnfurlType_GENERIC:
if o.Generic__ == nil {
err = errors.New("unexpected nil value for Generic__")
return ret, err
}
case UnfurlType_YOUTUBE:
if o.Youtube__ == nil {
err = errors.New("unexpected nil value for Youtube__")
return ret, err
}
case UnfurlType_GIPHY:
if o.Giphy__ == nil {
err = errors.New("unexpected nil value for Giphy__")
return ret, err
}
}
return o.UnfurlType__, nil
}
func (o Unfurl) Generic() (res UnfurlGeneric) {
if o.UnfurlType__ != UnfurlType_GENERIC {
panic("wrong case accessed")
}
if o.Generic__ == nil {
return
}
return *o.Generic__
}
func (o Unfurl) Youtube() (res UnfurlYoutube) {
if o.UnfurlType__ != UnfurlType_YOUTUBE {
panic("wrong case accessed")
}
if o.Youtube__ == nil {
return
}
return *o.Youtube__
}
func (o Unfurl) Giphy() (res UnfurlGiphy) {
if o.UnfurlType__ != UnfurlType_GIPHY {
panic("wrong case accessed")
}
if o.Giphy__ == nil {
return
}
return *o.Giphy__
}
func NewUnfurlWithGeneric(v UnfurlGeneric) Unfurl {
return Unfurl{
UnfurlType__: UnfurlType_GENERIC,
Generic__: &v,
}
}
func NewUnfurlWithYoutube(v UnfurlYoutube) Unfurl {
return Unfurl{
UnfurlType__: UnfurlType_YOUTUBE,
Youtube__: &v,
}
}
func NewUnfurlWithGiphy(v UnfurlGiphy) Unfurl {
return Unfurl{
UnfurlType__: UnfurlType_GIPHY,
Giphy__: &v,
}
}
func (o Unfurl) DeepCopy() Unfurl {
return Unfurl{
UnfurlType__: o.UnfurlType__.DeepCopy(),
Generic__: (func(x *UnfurlGeneric) *UnfurlGeneric {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Generic__),
Youtube__: (func(x *UnfurlYoutube) *UnfurlYoutube {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Youtube__),
Giphy__: (func(x *UnfurlGiphy) *UnfurlGiphy {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Giphy__),
}
}
type UnfurlResult struct {
Unfurl Unfurl `codec:"unfurl" json:"unfurl"`
Url string `codec:"url" json:"url"`
}
func (o UnfurlResult) DeepCopy() UnfurlResult {
return UnfurlResult{
Unfurl: o.Unfurl.DeepCopy(),
Url: o.Url,
}
}
type UnfurlImageDisplay struct {
Url string `codec:"url" json:"url"`
Height int `codec:"height" json:"height"`
Width int `codec:"width" json:"width"`
IsVideo bool `codec:"isVideo" json:"isVideo"`
}
func (o UnfurlImageDisplay) DeepCopy() UnfurlImageDisplay {
return UnfurlImageDisplay{
Url: o.Url,
Height: o.Height,
Width: o.Width,
IsVideo: o.IsVideo,
}
}
type UnfurlGenericDisplay struct {
Title string `codec:"title" json:"title"`
Url string `codec:"url" json:"url"`
SiteName string `codec:"siteName" json:"siteName"`
Favicon *UnfurlImageDisplay `codec:"favicon,omitempty" json:"favicon,omitempty"`
Media *UnfurlImageDisplay `codec:"media,omitempty" json:"media,omitempty"`
PublishTime *int `codec:"publishTime,omitempty" json:"publishTime,omitempty"`
Description *string `codec:"description,omitempty" json:"description,omitempty"`
MapInfo *UnfurlGenericMapInfo `codec:"mapInfo,omitempty" json:"mapInfo,omitempty"`
}
func (o UnfurlGenericDisplay) DeepCopy() UnfurlGenericDisplay {
return UnfurlGenericDisplay{
Title: o.Title,
Url: o.Url,
SiteName: o.SiteName,
Favicon: (func(x *UnfurlImageDisplay) *UnfurlImageDisplay {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Favicon),
Media: (func(x *UnfurlImageDisplay) *UnfurlImageDisplay {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Media),
PublishTime: (func(x *int) *int {
if x == nil {
return nil
}
tmp := (*x)
return &tmp
})(o.PublishTime),
Description: (func(x *string) *string {
if x == nil {
return nil
}
tmp := (*x)
return &tmp
})(o.Description),
MapInfo: (func(x *UnfurlGenericMapInfo) *UnfurlGenericMapInfo {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.MapInfo),
}
}
type UnfurlYoutubeDisplay struct {
}
func (o UnfurlYoutubeDisplay) DeepCopy() UnfurlYoutubeDisplay {
return UnfurlYoutubeDisplay{}
}
type UnfurlGiphyDisplay struct {
Favicon *UnfurlImageDisplay `codec:"favicon,omitempty" json:"favicon,omitempty"`
Image *UnfurlImageDisplay `codec:"image,omitempty" json:"image,omitempty"`
Video *UnfurlImageDisplay `codec:"video,omitempty" json:"video,omitempty"`
}
func (o UnfurlGiphyDisplay) DeepCopy() UnfurlGiphyDisplay {
return UnfurlGiphyDisplay{
Favicon: (func(x *UnfurlImageDisplay) *UnfurlImageDisplay {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Favicon),
Image: (func(x *UnfurlImageDisplay) *UnfurlImageDisplay {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Image),
Video: (func(x *UnfurlImageDisplay) *UnfurlImageDisplay {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Video),
}
}
type UnfurlDisplay struct {
UnfurlType__ UnfurlType `codec:"unfurlType" json:"unfurlType"`
Generic__ *UnfurlGenericDisplay `codec:"generic,omitempty" json:"generic,omitempty"`
Youtube__ *UnfurlYoutubeDisplay `codec:"youtube,omitempty" json:"youtube,omitempty"`
Giphy__ *UnfurlGiphyDisplay `codec:"giphy,omitempty" json:"giphy,omitempty"`
}
func (o *UnfurlDisplay) UnfurlType() (ret UnfurlType, err error) {
switch o.UnfurlType__ {
case UnfurlType_GENERIC:
if o.Generic__ == nil {
err = errors.New("unexpected nil value for Generic__")
return ret, err
}
case UnfurlType_YOUTUBE:
if o.Youtube__ == nil {
err = errors.New("unexpected nil value for Youtube__")
return ret, err
}
case UnfurlType_GIPHY:
if o.Giphy__ == nil {
err = errors.New("unexpected nil value for Giphy__")
return ret, err
}
}
return o.UnfurlType__, nil
}
func (o UnfurlDisplay) Generic() (res UnfurlGenericDisplay) {
if o.UnfurlType__ != UnfurlType_GENERIC {
panic("wrong case accessed")
}
if o.Generic__ == nil {
return
}
return *o.Generic__
}
func (o UnfurlDisplay) Youtube() (res UnfurlYoutubeDisplay) {
if o.UnfurlType__ != UnfurlType_YOUTUBE {
panic("wrong case accessed")
}
if o.Youtube__ == nil {
return
}
return *o.Youtube__
}
func (o UnfurlDisplay) Giphy() (res UnfurlGiphyDisplay) {
if o.UnfurlType__ != UnfurlType_GIPHY {
panic("wrong case accessed")
}
if o.Giphy__ == nil {
return
}
return *o.Giphy__
}
func NewUnfurlDisplayWithGeneric(v UnfurlGenericDisplay) UnfurlDisplay {
return UnfurlDisplay{
UnfurlType__: UnfurlType_GENERIC,
Generic__: &v,
}
}
func NewUnfurlDisplayWithYoutube(v UnfurlYoutubeDisplay) UnfurlDisplay {
return UnfurlDisplay{
UnfurlType__: UnfurlType_YOUTUBE,
Youtube__: &v,
}
}
func NewUnfurlDisplayWithGiphy(v UnfurlGiphyDisplay) UnfurlDisplay {
return UnfurlDisplay{
UnfurlType__: UnfurlType_GIPHY,
Giphy__: &v,
}
}
func (o UnfurlDisplay) DeepCopy() UnfurlDisplay {
return UnfurlDisplay{
UnfurlType__: o.UnfurlType__.DeepCopy(),
Generic__: (func(x *UnfurlGenericDisplay) *UnfurlGenericDisplay {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Generic__),
Youtube__: (func(x *UnfurlYoutubeDisplay) *UnfurlYoutubeDisplay {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Youtube__),
Giphy__: (func(x *UnfurlGiphyDisplay) *UnfurlGiphyDisplay {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.Giphy__),
}
}
type UnfurlMode int
const (
UnfurlMode_ALWAYS UnfurlMode = 0
UnfurlMode_NEVER UnfurlMode = 1
UnfurlMode_WHITELISTED UnfurlMode = 2
)
func (o UnfurlMode) DeepCopy() UnfurlMode { return o }
var UnfurlModeMap = map[string]UnfurlMode{
"ALWAYS": 0,
"NEVER": 1,
"WHITELISTED": 2,
}
var UnfurlModeRevMap = map[UnfurlMode]string{
0: "ALWAYS",
1: "NEVER",
2: "WHITELISTED",
}
func (e UnfurlMode) String() string {
if v, ok := UnfurlModeRevMap[e]; ok {
return v
}
return fmt.Sprintf("%v", int(e))
}
type UnfurlSettings struct {
Mode UnfurlMode `codec:"mode" json:"mode"`
Whitelist map[string]bool `codec:"whitelist" json:"whitelist"`
}
func (o UnfurlSettings) DeepCopy() UnfurlSettings {
return UnfurlSettings{
Mode: o.Mode.DeepCopy(),
Whitelist: (func(x map[string]bool) map[string]bool {
if x == nil {
return nil
}
ret := make(map[string]bool, len(x))
for k, v := range x {
kCopy := k
vCopy := v
ret[kCopy] = vCopy
}
return ret
})(o.Whitelist),
}
}
type UnfurlSettingsDisplay struct {
Mode UnfurlMode `codec:"mode" json:"mode"`
Whitelist []string `codec:"whitelist" json:"whitelist"`
}
func (o UnfurlSettingsDisplay) DeepCopy() UnfurlSettingsDisplay {
return UnfurlSettingsDisplay{
Mode: o.Mode.DeepCopy(),
Whitelist: (func(x []string) []string {
if x == nil {
return nil
}
ret := make([]string, len(x))
for i, v := range x {
vCopy := v
ret[i] = vCopy
}
return ret
})(o.Whitelist),
}
}