Add avdl compiled types
This commit is contained in:
933
types/chat1/api.go
Normal file
933
types/chat1/api.go
Normal file
@ -0,0 +1,933 @@
|
||||
// Auto-generated to Go types using avdl-compiler v1.4.6 (https://github.com/keybase/node-avdl-compiler)
|
||||
// Input file: ../client/protocol/avdl/chat1/api.avdl
|
||||
|
||||
package chat1
|
||||
|
||||
import (
|
||||
gregor1 "samhofi.us/x/keybase/types/gregor1"
|
||||
keybase1 "samhofi.us/x/keybase/types/keybase1"
|
||||
)
|
||||
|
||||
type ConvIDStr string
|
||||
|
||||
func (o ConvIDStr) DeepCopy() ConvIDStr {
|
||||
return o
|
||||
}
|
||||
|
||||
type TLFIDStr string
|
||||
|
||||
func (o TLFIDStr) DeepCopy() TLFIDStr {
|
||||
return o
|
||||
}
|
||||
|
||||
type FlipGameIDStr string
|
||||
|
||||
func (o FlipGameIDStr) DeepCopy() FlipGameIDStr {
|
||||
return o
|
||||
}
|
||||
|
||||
type RateLimitRes struct {
|
||||
Tank string `codec:"tank" json:"tank"`
|
||||
Capacity int `codec:"capacity" json:"capacity"`
|
||||
Reset int `codec:"reset" json:"reset"`
|
||||
Gas int `codec:"gas" json:"gas"`
|
||||
}
|
||||
|
||||
func (o RateLimitRes) DeepCopy() RateLimitRes {
|
||||
return RateLimitRes{
|
||||
Tank: o.Tank,
|
||||
Capacity: o.Capacity,
|
||||
Reset: o.Reset,
|
||||
Gas: o.Gas,
|
||||
}
|
||||
}
|
||||
|
||||
// A Keybase chat channel. This can be a channel in a team, or just an informal channel between two users.
|
||||
// name: the name of the team or comma-separated list of participants
|
||||
type ChatChannel struct {
|
||||
Name string `codec:"name" json:"name"`
|
||||
Public bool `codec:"public,omitempty" json:"public,omitempty"`
|
||||
MembersType string `codec:"membersType,omitempty" json:"members_type,omitempty"`
|
||||
TopicType string `codec:"topicType,omitempty" json:"topic_type,omitempty"`
|
||||
TopicName string `codec:"topicName,omitempty" json:"topic_name,omitempty"`
|
||||
}
|
||||
|
||||
func (o ChatChannel) DeepCopy() ChatChannel {
|
||||
return ChatChannel{
|
||||
Name: o.Name,
|
||||
Public: o.Public,
|
||||
MembersType: o.MembersType,
|
||||
TopicType: o.TopicType,
|
||||
TopicName: o.TopicName,
|
||||
}
|
||||
}
|
||||
|
||||
// A chat message. The content goes in the `body` property!
|
||||
type ChatMessage struct {
|
||||
Body string `codec:"body" json:"body"`
|
||||
}
|
||||
|
||||
func (o ChatMessage) DeepCopy() ChatMessage {
|
||||
return ChatMessage{
|
||||
Body: o.Body,
|
||||
}
|
||||
}
|
||||
|
||||
type MsgSender struct {
|
||||
Uid keybase1.UID `codec:"uid" json:"uid"`
|
||||
Username string `codec:"username,omitempty" json:"username,omitempty"`
|
||||
DeviceID keybase1.DeviceID `codec:"deviceID" json:"device_id"`
|
||||
DeviceName string `codec:"deviceName,omitempty" json:"device_name,omitempty"`
|
||||
}
|
||||
|
||||
func (o MsgSender) DeepCopy() MsgSender {
|
||||
return MsgSender{
|
||||
Uid: o.Uid.DeepCopy(),
|
||||
Username: o.Username,
|
||||
DeviceID: o.DeviceID.DeepCopy(),
|
||||
DeviceName: o.DeviceName,
|
||||
}
|
||||
}
|
||||
|
||||
type MsgBotInfo struct {
|
||||
BotUID keybase1.UID `codec:"botUID" json:"bot_uid"`
|
||||
BotUsername string `codec:"botUsername,omitempty" json:"bot_username,omitempty"`
|
||||
}
|
||||
|
||||
func (o MsgBotInfo) DeepCopy() MsgBotInfo {
|
||||
return MsgBotInfo{
|
||||
BotUID: o.BotUID.DeepCopy(),
|
||||
BotUsername: o.BotUsername,
|
||||
}
|
||||
}
|
||||
|
||||
type MsgFlipContent struct {
|
||||
Text string `codec:"text" json:"text"`
|
||||
GameID FlipGameIDStr `codec:"gameID" json:"game_id"`
|
||||
FlipConvID ConvIDStr `codec:"flipConvID" json:"flip_conv_id"`
|
||||
UserMentions []KnownUserMention `codec:"userMentions" json:"user_mentions"`
|
||||
TeamMentions []KnownTeamMention `codec:"teamMentions" json:"team_mentions"`
|
||||
}
|
||||
|
||||
func (o MsgFlipContent) DeepCopy() MsgFlipContent {
|
||||
return MsgFlipContent{
|
||||
Text: o.Text,
|
||||
GameID: o.GameID.DeepCopy(),
|
||||
FlipConvID: o.FlipConvID.DeepCopy(),
|
||||
UserMentions: (func(x []KnownUserMention) []KnownUserMention {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]KnownUserMention, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.UserMentions),
|
||||
TeamMentions: (func(x []KnownTeamMention) []KnownTeamMention {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]KnownTeamMention, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.TeamMentions),
|
||||
}
|
||||
}
|
||||
|
||||
type MsgContent struct {
|
||||
TypeName string `codec:"typeName" json:"type"`
|
||||
Text *MessageText `codec:"text,omitempty" json:"text,omitempty"`
|
||||
Attachment *MessageAttachment `codec:"attachment,omitempty" json:"attachment,omitempty"`
|
||||
Edit *MessageEdit `codec:"edit,omitempty" json:"edit,omitempty"`
|
||||
Reaction *MessageReaction `codec:"reaction,omitempty" json:"reaction,omitempty"`
|
||||
Delete *MessageDelete `codec:"delete,omitempty" json:"delete,omitempty"`
|
||||
Metadata *MessageConversationMetadata `codec:"metadata,omitempty" json:"metadata,omitempty"`
|
||||
Headline *MessageHeadline `codec:"headline,omitempty" json:"headline,omitempty"`
|
||||
AttachmentUploaded *MessageAttachmentUploaded `codec:"attachmentUploaded,omitempty" json:"attachment_uploaded,omitempty"`
|
||||
System *MessageSystem `codec:"system,omitempty" json:"system,omitempty"`
|
||||
SendPayment *MessageSendPayment `codec:"sendPayment,omitempty" json:"send_payment,omitempty"`
|
||||
RequestPayment *MessageRequestPayment `codec:"requestPayment,omitempty" json:"request_payment,omitempty"`
|
||||
Unfurl *MessageUnfurl `codec:"unfurl,omitempty" json:"unfurl,omitempty"`
|
||||
Flip *MsgFlipContent `codec:"flip,omitempty" json:"flip,omitempty"`
|
||||
}
|
||||
|
||||
func (o MsgContent) DeepCopy() MsgContent {
|
||||
return MsgContent{
|
||||
TypeName: o.TypeName,
|
||||
Text: (func(x *MessageText) *MessageText {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.Text),
|
||||
Attachment: (func(x *MessageAttachment) *MessageAttachment {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.Attachment),
|
||||
Edit: (func(x *MessageEdit) *MessageEdit {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.Edit),
|
||||
Reaction: (func(x *MessageReaction) *MessageReaction {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.Reaction),
|
||||
Delete: (func(x *MessageDelete) *MessageDelete {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.Delete),
|
||||
Metadata: (func(x *MessageConversationMetadata) *MessageConversationMetadata {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.Metadata),
|
||||
Headline: (func(x *MessageHeadline) *MessageHeadline {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.Headline),
|
||||
AttachmentUploaded: (func(x *MessageAttachmentUploaded) *MessageAttachmentUploaded {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.AttachmentUploaded),
|
||||
System: (func(x *MessageSystem) *MessageSystem {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.System),
|
||||
SendPayment: (func(x *MessageSendPayment) *MessageSendPayment {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.SendPayment),
|
||||
RequestPayment: (func(x *MessageRequestPayment) *MessageRequestPayment {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.RequestPayment),
|
||||
Unfurl: (func(x *MessageUnfurl) *MessageUnfurl {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.Unfurl),
|
||||
Flip: (func(x *MsgFlipContent) *MsgFlipContent {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.Flip),
|
||||
}
|
||||
}
|
||||
|
||||
type MsgSummary struct {
|
||||
Id MessageID `codec:"id" json:"id"`
|
||||
ConvID ConvIDStr `codec:"convID" json:"conversation_id"`
|
||||
Channel ChatChannel `codec:"channel" json:"channel"`
|
||||
Sender MsgSender `codec:"sender" json:"sender"`
|
||||
SentAt int64 `codec:"sentAt" json:"sent_at"`
|
||||
SentAtMs int64 `codec:"sentAtMs" json:"sent_at_ms"`
|
||||
Content MsgContent `codec:"content" json:"content"`
|
||||
Prev []MessagePreviousPointer `codec:"prev" json:"prev"`
|
||||
Unread bool `codec:"unread" json:"unread"`
|
||||
RevokedDevice bool `codec:"revokedDevice,omitempty" json:"revoked_device,omitempty"`
|
||||
Offline bool `codec:"offline,omitempty" json:"offline,omitempty"`
|
||||
KbfsEncrypted bool `codec:"kbfsEncrypted,omitempty" json:"kbfs_encrypted,omitempty"`
|
||||
IsEphemeral bool `codec:"isEphemeral,omitempty" json:"is_ephemeral,omitempty"`
|
||||
IsEphemeralExpired bool `codec:"isEphemeralExpired,omitempty" json:"is_ephemeral_expired,omitempty"`
|
||||
ETime gregor1.Time `codec:"eTime,omitempty" json:"e_time,omitempty"`
|
||||
Reactions *ReactionMap `codec:"reactions,omitempty" json:"reactions,omitempty"`
|
||||
HasPairwiseMacs bool `codec:"hasPairwiseMacs,omitempty" json:"has_pairwise_macs,omitempty"`
|
||||
AtMentionUsernames []string `codec:"atMentionUsernames,omitempty" json:"at_mention_usernames,omitempty"`
|
||||
ChannelMention string `codec:"channelMention,omitempty" json:"channel_mention,omitempty"`
|
||||
ChannelNameMentions []UIChannelNameMention `codec:"channelNameMentions,omitempty" json:"channel_name_mentions,omitempty"`
|
||||
BotInfo *MsgBotInfo `codec:"botInfo,omitempty" json:"bot_info,omitempty"`
|
||||
}
|
||||
|
||||
func (o MsgSummary) DeepCopy() MsgSummary {
|
||||
return MsgSummary{
|
||||
Id: o.Id.DeepCopy(),
|
||||
ConvID: o.ConvID.DeepCopy(),
|
||||
Channel: o.Channel.DeepCopy(),
|
||||
Sender: o.Sender.DeepCopy(),
|
||||
SentAt: o.SentAt,
|
||||
SentAtMs: o.SentAtMs,
|
||||
Content: o.Content.DeepCopy(),
|
||||
Prev: (func(x []MessagePreviousPointer) []MessagePreviousPointer {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]MessagePreviousPointer, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.Prev),
|
||||
Unread: o.Unread,
|
||||
RevokedDevice: o.RevokedDevice,
|
||||
Offline: o.Offline,
|
||||
KbfsEncrypted: o.KbfsEncrypted,
|
||||
IsEphemeral: o.IsEphemeral,
|
||||
IsEphemeralExpired: o.IsEphemeralExpired,
|
||||
ETime: o.ETime.DeepCopy(),
|
||||
Reactions: (func(x *ReactionMap) *ReactionMap {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.Reactions),
|
||||
HasPairwiseMacs: o.HasPairwiseMacs,
|
||||
AtMentionUsernames: (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.AtMentionUsernames),
|
||||
ChannelMention: o.ChannelMention,
|
||||
ChannelNameMentions: (func(x []UIChannelNameMention) []UIChannelNameMention {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]UIChannelNameMention, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.ChannelNameMentions),
|
||||
BotInfo: (func(x *MsgBotInfo) *MsgBotInfo {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.BotInfo),
|
||||
}
|
||||
}
|
||||
|
||||
type Message struct {
|
||||
Msg *MsgSummary `codec:"msg,omitempty" json:"msg,omitempty"`
|
||||
Error *string `codec:"error,omitempty" json:"error,omitempty"`
|
||||
}
|
||||
|
||||
func (o Message) DeepCopy() Message {
|
||||
return Message{
|
||||
Msg: (func(x *MsgSummary) *MsgSummary {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.Msg),
|
||||
Error: (func(x *string) *string {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x)
|
||||
return &tmp
|
||||
})(o.Error),
|
||||
}
|
||||
}
|
||||
|
||||
type Thread struct {
|
||||
Messages []Message `codec:"messages" json:"messages"`
|
||||
Pagination *Pagination `codec:"pagination,omitempty" json:"pagination,omitempty"`
|
||||
Offline bool `codec:"offline,omitempty" json:"offline,omitempty"`
|
||||
IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures,omitempty" json:"identify_failures,omitempty"`
|
||||
RateLimits []RateLimitRes `codec:"rateLimits,omitempty" json:"ratelimits,omitempty"`
|
||||
}
|
||||
|
||||
func (o Thread) DeepCopy() Thread {
|
||||
return Thread{
|
||||
Messages: (func(x []Message) []Message {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]Message, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.Messages),
|
||||
Pagination: (func(x *Pagination) *Pagination {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.Pagination),
|
||||
Offline: o.Offline,
|
||||
IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]keybase1.TLFIdentifyFailure, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.IdentifyFailures),
|
||||
RateLimits: (func(x []RateLimitRes) []RateLimitRes {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]RateLimitRes, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.RateLimits),
|
||||
}
|
||||
}
|
||||
|
||||
// A chat conversation. This is essentially a chat channel plus some additional metadata.
|
||||
type ConvSummary struct {
|
||||
Id ConvIDStr `codec:"id" json:"id"`
|
||||
Channel ChatChannel `codec:"channel" json:"channel"`
|
||||
IsDefaultConv bool `codec:"isDefaultConv" json:"is_default_conv"`
|
||||
Unread bool `codec:"unread" json:"unread"`
|
||||
ActiveAt int64 `codec:"activeAt" json:"active_at"`
|
||||
ActiveAtMs int64 `codec:"activeAtMs" json:"active_at_ms"`
|
||||
MemberStatus string `codec:"memberStatus" json:"member_status"`
|
||||
ResetUsers []string `codec:"resetUsers,omitempty" json:"reset_users,omitempty"`
|
||||
FinalizeInfo *ConversationFinalizeInfo `codec:"finalizeInfo,omitempty" json:"finalize_info,omitempty"`
|
||||
Supersedes []string `codec:"supersedes,omitempty" json:"supersedes,omitempty"`
|
||||
SupersededBy []string `codec:"supersededBy,omitempty" json:"superseded_by,omitempty"`
|
||||
Error string `codec:"error,omitempty" json:"error,omitempty"`
|
||||
CreatorInfo *ConversationCreatorInfoLocal `codec:"creatorInfo,omitempty" json:"creator_info,omitempty"`
|
||||
}
|
||||
|
||||
func (o ConvSummary) DeepCopy() ConvSummary {
|
||||
return ConvSummary{
|
||||
Id: o.Id.DeepCopy(),
|
||||
Channel: o.Channel.DeepCopy(),
|
||||
IsDefaultConv: o.IsDefaultConv,
|
||||
Unread: o.Unread,
|
||||
ActiveAt: o.ActiveAt,
|
||||
ActiveAtMs: o.ActiveAtMs,
|
||||
MemberStatus: o.MemberStatus,
|
||||
ResetUsers: (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.ResetUsers),
|
||||
FinalizeInfo: (func(x *ConversationFinalizeInfo) *ConversationFinalizeInfo {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.FinalizeInfo),
|
||||
Supersedes: (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.Supersedes),
|
||||
SupersededBy: (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.SupersededBy),
|
||||
Error: o.Error,
|
||||
CreatorInfo: (func(x *ConversationCreatorInfoLocal) *ConversationCreatorInfoLocal {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.CreatorInfo),
|
||||
}
|
||||
}
|
||||
|
||||
type ChatList struct {
|
||||
Conversations []ConvSummary `codec:"conversations" json:"conversations"`
|
||||
Offline bool `codec:"offline" json:"offline"`
|
||||
IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures,omitempty" json:"identify_failures,omitempty"`
|
||||
RateLimits []RateLimitRes `codec:"rateLimits,omitempty" json:"ratelimits,omitempty"`
|
||||
}
|
||||
|
||||
func (o ChatList) DeepCopy() ChatList {
|
||||
return ChatList{
|
||||
Conversations: (func(x []ConvSummary) []ConvSummary {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]ConvSummary, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.Conversations),
|
||||
Offline: o.Offline,
|
||||
IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]keybase1.TLFIdentifyFailure, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.IdentifyFailures),
|
||||
RateLimits: (func(x []RateLimitRes) []RateLimitRes {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]RateLimitRes, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.RateLimits),
|
||||
}
|
||||
}
|
||||
|
||||
type SendRes struct {
|
||||
Message string `codec:"message" json:"message"`
|
||||
MessageID *MessageID `codec:"messageID,omitempty" json:"id,omitempty"`
|
||||
OutboxID *OutboxID `codec:"outboxID,omitempty" json:"outbox_id,omitempty"`
|
||||
IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures,omitempty" json:"identify_failures,omitempty"`
|
||||
RateLimits []RateLimitRes `codec:"rateLimits,omitempty" json:"ratelimits,omitempty"`
|
||||
}
|
||||
|
||||
func (o SendRes) DeepCopy() SendRes {
|
||||
return SendRes{
|
||||
Message: o.Message,
|
||||
MessageID: (func(x *MessageID) *MessageID {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.MessageID),
|
||||
OutboxID: (func(x *OutboxID) *OutboxID {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.OutboxID),
|
||||
IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]keybase1.TLFIdentifyFailure, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.IdentifyFailures),
|
||||
RateLimits: (func(x []RateLimitRes) []RateLimitRes {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]RateLimitRes, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.RateLimits),
|
||||
}
|
||||
}
|
||||
|
||||
type SearchInboxResOutput struct {
|
||||
Results *ChatSearchInboxResults `codec:"results,omitempty" json:"results,omitempty"`
|
||||
IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures,omitempty" json:"identify_failures,omitempty"`
|
||||
RateLimits []RateLimitRes `codec:"rateLimits,omitempty" json:"ratelimits,omitempty"`
|
||||
}
|
||||
|
||||
func (o SearchInboxResOutput) DeepCopy() SearchInboxResOutput {
|
||||
return SearchInboxResOutput{
|
||||
Results: (func(x *ChatSearchInboxResults) *ChatSearchInboxResults {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.Results),
|
||||
IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]keybase1.TLFIdentifyFailure, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.IdentifyFailures),
|
||||
RateLimits: (func(x []RateLimitRes) []RateLimitRes {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]RateLimitRes, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.RateLimits),
|
||||
}
|
||||
}
|
||||
|
||||
type RegexpRes struct {
|
||||
Hits []ChatSearchHit `codec:"hits" json:"hits"`
|
||||
IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures,omitempty" json:"identify_failures,omitempty"`
|
||||
RateLimits []RateLimitRes `codec:"rateLimits,omitempty" json:"ratelimits,omitempty"`
|
||||
}
|
||||
|
||||
func (o RegexpRes) DeepCopy() RegexpRes {
|
||||
return RegexpRes{
|
||||
Hits: (func(x []ChatSearchHit) []ChatSearchHit {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]ChatSearchHit, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.Hits),
|
||||
IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]keybase1.TLFIdentifyFailure, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.IdentifyFailures),
|
||||
RateLimits: (func(x []RateLimitRes) []RateLimitRes {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]RateLimitRes, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.RateLimits),
|
||||
}
|
||||
}
|
||||
|
||||
type NewConvRes struct {
|
||||
Id ConvIDStr `codec:"id" json:"id"`
|
||||
IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures,omitempty" json:"identify_failures,omitempty"`
|
||||
RateLimits []RateLimitRes `codec:"rateLimits,omitempty" json:"ratelimits,omitempty"`
|
||||
}
|
||||
|
||||
func (o NewConvRes) DeepCopy() NewConvRes {
|
||||
return NewConvRes{
|
||||
Id: o.Id.DeepCopy(),
|
||||
IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]keybase1.TLFIdentifyFailure, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.IdentifyFailures),
|
||||
RateLimits: (func(x []RateLimitRes) []RateLimitRes {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]RateLimitRes, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.RateLimits),
|
||||
}
|
||||
}
|
||||
|
||||
type ListCommandsRes struct {
|
||||
Commands []UserBotCommandOutput `codec:"commands" json:"commands"`
|
||||
RateLimits []RateLimitRes `codec:"rateLimits,omitempty" json:"ratelimits,omitempty"`
|
||||
}
|
||||
|
||||
func (o ListCommandsRes) DeepCopy() ListCommandsRes {
|
||||
return ListCommandsRes{
|
||||
Commands: (func(x []UserBotCommandOutput) []UserBotCommandOutput {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]UserBotCommandOutput, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.Commands),
|
||||
RateLimits: (func(x []RateLimitRes) []RateLimitRes {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]RateLimitRes, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.RateLimits),
|
||||
}
|
||||
}
|
||||
|
||||
type EmptyRes struct {
|
||||
RateLimits []RateLimitRes `codec:"rateLimits,omitempty" json:"ratelimits,omitempty"`
|
||||
}
|
||||
|
||||
func (o EmptyRes) DeepCopy() EmptyRes {
|
||||
return EmptyRes{
|
||||
RateLimits: (func(x []RateLimitRes) []RateLimitRes {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]RateLimitRes, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.RateLimits),
|
||||
}
|
||||
}
|
||||
|
||||
type MsgNotification struct {
|
||||
Type string `codec:"type" json:"type"`
|
||||
Source string `codec:"source" json:"source"`
|
||||
Msg *MsgSummary `codec:"msg,omitempty" json:"msg,omitempty"`
|
||||
Error *string `codec:"error,omitempty" json:"error,omitempty"`
|
||||
Pagination *UIPagination `codec:"pagination,omitempty" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (o MsgNotification) DeepCopy() MsgNotification {
|
||||
return MsgNotification{
|
||||
Type: o.Type,
|
||||
Source: o.Source,
|
||||
Msg: (func(x *MsgSummary) *MsgSummary {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.Msg),
|
||||
Error: (func(x *string) *string {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x)
|
||||
return &tmp
|
||||
})(o.Error),
|
||||
Pagination: (func(x *UIPagination) *UIPagination {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.Pagination),
|
||||
}
|
||||
}
|
||||
|
||||
type ConvNotification struct {
|
||||
Type string `codec:"type" json:"type"`
|
||||
Conv *ConvSummary `codec:"conv,omitempty" json:"conv,omitempty"`
|
||||
Error *string `codec:"error,omitempty" json:"error,omitempty"`
|
||||
}
|
||||
|
||||
func (o ConvNotification) DeepCopy() ConvNotification {
|
||||
return ConvNotification{
|
||||
Type: o.Type,
|
||||
Conv: (func(x *ConvSummary) *ConvSummary {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x).DeepCopy()
|
||||
return &tmp
|
||||
})(o.Conv),
|
||||
Error: (func(x *string) *string {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
tmp := (*x)
|
||||
return &tmp
|
||||
})(o.Error),
|
||||
}
|
||||
}
|
||||
|
||||
type AdvertiseCommandAPIParam struct {
|
||||
Typ string `codec:"typ" json:"type"`
|
||||
Commands []UserBotCommandInput `codec:"commands" json:"commands"`
|
||||
TeamName string `codec:"teamName,omitempty" json:"team_name,omitempty"`
|
||||
}
|
||||
|
||||
func (o AdvertiseCommandAPIParam) DeepCopy() AdvertiseCommandAPIParam {
|
||||
return AdvertiseCommandAPIParam{
|
||||
Typ: o.Typ,
|
||||
Commands: (func(x []UserBotCommandInput) []UserBotCommandInput {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]UserBotCommandInput, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.Commands),
|
||||
TeamName: o.TeamName,
|
||||
}
|
||||
}
|
||||
|
||||
type ResetConvMemberAPI struct {
|
||||
ConversationID ConvIDStr `codec:"conversationID" json:"conversationID"`
|
||||
Username string `codec:"username" json:"username"`
|
||||
}
|
||||
|
||||
func (o ResetConvMemberAPI) DeepCopy() ResetConvMemberAPI {
|
||||
return ResetConvMemberAPI{
|
||||
ConversationID: o.ConversationID.DeepCopy(),
|
||||
Username: o.Username,
|
||||
}
|
||||
}
|
||||
|
||||
type GetResetConvMembersRes struct {
|
||||
Members []ResetConvMemberAPI `codec:"members" json:"members"`
|
||||
RateLimits []RateLimitRes `codec:"rateLimits" json:"rateLimits"`
|
||||
}
|
||||
|
||||
func (o GetResetConvMembersRes) DeepCopy() GetResetConvMembersRes {
|
||||
return GetResetConvMembersRes{
|
||||
Members: (func(x []ResetConvMemberAPI) []ResetConvMemberAPI {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]ResetConvMemberAPI, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.Members),
|
||||
RateLimits: (func(x []RateLimitRes) []RateLimitRes {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]RateLimitRes, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.RateLimits),
|
||||
}
|
||||
}
|
||||
|
||||
type DeviceInfo struct {
|
||||
DeviceID keybase1.DeviceID `codec:"deviceID" json:"id"`
|
||||
DeviceDescription string `codec:"deviceDescription" json:"description"`
|
||||
DeviceType string `codec:"deviceType" json:"type"`
|
||||
DeviceCtime int64 `codec:"deviceCtime" json:"ctime"`
|
||||
}
|
||||
|
||||
func (o DeviceInfo) DeepCopy() DeviceInfo {
|
||||
return DeviceInfo{
|
||||
DeviceID: o.DeviceID.DeepCopy(),
|
||||
DeviceDescription: o.DeviceDescription,
|
||||
DeviceType: o.DeviceType,
|
||||
DeviceCtime: o.DeviceCtime,
|
||||
}
|
||||
}
|
||||
|
||||
type GetDeviceInfoRes struct {
|
||||
Devices []DeviceInfo `codec:"devices" json:"devices"`
|
||||
}
|
||||
|
||||
func (o GetDeviceInfoRes) DeepCopy() GetDeviceInfoRes {
|
||||
return GetDeviceInfoRes{
|
||||
Devices: (func(x []DeviceInfo) []DeviceInfo {
|
||||
if x == nil {
|
||||
return nil
|
||||
}
|
||||
ret := make([]DeviceInfo, len(x))
|
||||
for i, v := range x {
|
||||
vCopy := v.DeepCopy()
|
||||
ret[i] = vCopy
|
||||
}
|
||||
return ret
|
||||
})(o.Devices),
|
||||
}
|
||||
}
|
||||
4
types/chat1/blocking.go
Normal file
4
types/chat1/blocking.go
Normal file
@ -0,0 +1,4 @@
|
||||
// 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
|
||||
2893
types/chat1/chat_ui.go
Normal file
2893
types/chat1/chat_ui.go
Normal file
File diff suppressed because it is too large
Load Diff
199
types/chat1/commands.go
Normal file
199
types/chat1/commands.go
Normal file
@ -0,0 +1,199 @@
|
||||
// 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__),
|
||||
}
|
||||
}
|
||||
2474
types/chat1/common.go
Normal file
2474
types/chat1/common.go
Normal file
File diff suppressed because it is too large
Load Diff
548
types/chat1/gregor.go
Normal file
548
types/chat1/gregor.go
Normal file
@ -0,0 +1,548 @@
|
||||
// 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/types/gregor1"
|
||||
keybase1 "samhofi.us/x/keybase/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 TeamChannelUpdate struct {
|
||||
TeamID TLFID `codec:"teamID" json:"teamID"`
|
||||
}
|
||||
|
||||
func (o TeamChannelUpdate) DeepCopy() TeamChannelUpdate {
|
||||
return TeamChannelUpdate{
|
||||
TeamID: o.TeamID.DeepCopy(),
|
||||
}
|
||||
}
|
||||
|
||||
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(),
|
||||
}
|
||||
}
|
||||
5888
types/chat1/local.go
Normal file
5888
types/chat1/local.go
Normal file
File diff suppressed because it is too large
Load Diff
937
types/chat1/notify.go
Normal file
937
types/chat1/notify.go
Normal file
@ -0,0 +1,937 @@
|
||||
// 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/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 ReactionMap `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"`
|
||||
DeviceName string `codec:"deviceName" json:"deviceName"`
|
||||
DeviceType string `codec:"deviceType" json:"deviceType"`
|
||||
}
|
||||
|
||||
func (o TyperInfo) DeepCopy() TyperInfo {
|
||||
return TyperInfo{
|
||||
Uid: o.Uid.DeepCopy(),
|
||||
Username: o.Username,
|
||||
DeviceID: o.DeviceID.DeepCopy(),
|
||||
DeviceName: o.DeviceName,
|
||||
DeviceType: o.DeviceType,
|
||||
}
|
||||
}
|
||||
|
||||
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__),
|
||||
}
|
||||
}
|
||||
1249
types/chat1/remote.go
Normal file
1249
types/chat1/remote.go
Normal file
File diff suppressed because it is too large
Load Diff
849
types/chat1/unfurl.go
Normal file
849
types/chat1/unfurl.go
Normal file
@ -0,0 +1,849 @@
|
||||
// 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/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),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user