1// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler) 2// Input file: ../client/protocol/avdl/chat1/local.avdl 3 4package chat1 5 6import ( 7 "errors" 8 "fmt" 9 10 gregor1 "github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1" 11 keybase1 "github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1" 12 stellar1 "github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1" 13) 14 15type VersionKind string 16 17func (o VersionKind) DeepCopy() VersionKind { 18 return o 19} 20 21type TextPaymentResultTyp int 22 23const ( 24 TextPaymentResultTyp_SENT TextPaymentResultTyp = 0 25 TextPaymentResultTyp_ERROR TextPaymentResultTyp = 1 26) 27 28func (o TextPaymentResultTyp) DeepCopy() TextPaymentResultTyp { return o } 29 30var TextPaymentResultTypMap = map[string]TextPaymentResultTyp{ 31 "SENT": 0, 32 "ERROR": 1, 33} 34 35var TextPaymentResultTypRevMap = map[TextPaymentResultTyp]string{ 36 0: "SENT", 37 1: "ERROR", 38} 39 40func (e TextPaymentResultTyp) String() string { 41 if v, ok := TextPaymentResultTypRevMap[e]; ok { 42 return v 43 } 44 return fmt.Sprintf("%v", int(e)) 45} 46 47type TextPaymentResult struct { 48 ResultTyp__ TextPaymentResultTyp `codec:"resultTyp" json:"resultTyp"` 49 Error__ *string `codec:"error,omitempty" json:"error,omitempty"` 50 Sent__ *stellar1.PaymentID `codec:"sent,omitempty" json:"sent,omitempty"` 51} 52 53func (o *TextPaymentResult) ResultTyp() (ret TextPaymentResultTyp, err error) { 54 switch o.ResultTyp__ { 55 case TextPaymentResultTyp_ERROR: 56 if o.Error__ == nil { 57 err = errors.New("unexpected nil value for Error__") 58 return ret, err 59 } 60 case TextPaymentResultTyp_SENT: 61 if o.Sent__ == nil { 62 err = errors.New("unexpected nil value for Sent__") 63 return ret, err 64 } 65 } 66 return o.ResultTyp__, nil 67} 68 69func (o TextPaymentResult) Error() (res string) { 70 if o.ResultTyp__ != TextPaymentResultTyp_ERROR { 71 panic("wrong case accessed") 72 } 73 if o.Error__ == nil { 74 return 75 } 76 return *o.Error__ 77} 78 79func (o TextPaymentResult) Sent() (res stellar1.PaymentID) { 80 if o.ResultTyp__ != TextPaymentResultTyp_SENT { 81 panic("wrong case accessed") 82 } 83 if o.Sent__ == nil { 84 return 85 } 86 return *o.Sent__ 87} 88 89func NewTextPaymentResultWithError(v string) TextPaymentResult { 90 return TextPaymentResult{ 91 ResultTyp__: TextPaymentResultTyp_ERROR, 92 Error__: &v, 93 } 94} 95 96func NewTextPaymentResultWithSent(v stellar1.PaymentID) TextPaymentResult { 97 return TextPaymentResult{ 98 ResultTyp__: TextPaymentResultTyp_SENT, 99 Sent__: &v, 100 } 101} 102 103func (o TextPaymentResult) DeepCopy() TextPaymentResult { 104 return TextPaymentResult{ 105 ResultTyp__: o.ResultTyp__.DeepCopy(), 106 Error__: (func(x *string) *string { 107 if x == nil { 108 return nil 109 } 110 tmp := (*x) 111 return &tmp 112 })(o.Error__), 113 Sent__: (func(x *stellar1.PaymentID) *stellar1.PaymentID { 114 if x == nil { 115 return nil 116 } 117 tmp := (*x).DeepCopy() 118 return &tmp 119 })(o.Sent__), 120 } 121} 122 123type TextPayment struct { 124 Username string `codec:"username" json:"username"` 125 PaymentText string `codec:"paymentText" json:"paymentText"` 126 Result TextPaymentResult `codec:"result" json:"result"` 127} 128 129func (o TextPayment) DeepCopy() TextPayment { 130 return TextPayment{ 131 Username: o.Username, 132 PaymentText: o.PaymentText, 133 Result: o.Result.DeepCopy(), 134 } 135} 136 137type KnownUserMention struct { 138 Text string `codec:"text" json:"text"` 139 Uid gregor1.UID `codec:"uid" json:"uid"` 140} 141 142func (o KnownUserMention) DeepCopy() KnownUserMention { 143 return KnownUserMention{ 144 Text: o.Text, 145 Uid: o.Uid.DeepCopy(), 146 } 147} 148 149type KnownTeamMention struct { 150 Name string `codec:"name" json:"name"` 151 Channel string `codec:"channel" json:"channel"` 152} 153 154func (o KnownTeamMention) DeepCopy() KnownTeamMention { 155 return KnownTeamMention{ 156 Name: o.Name, 157 Channel: o.Channel, 158 } 159} 160 161type MaybeMention struct { 162 Name string `codec:"name" json:"name"` 163 Channel string `codec:"channel" json:"channel"` 164} 165 166func (o MaybeMention) DeepCopy() MaybeMention { 167 return MaybeMention{ 168 Name: o.Name, 169 Channel: o.Channel, 170 } 171} 172 173type Coordinate struct { 174 Lat float64 `codec:"lat" json:"lat"` 175 Lon float64 `codec:"lon" json:"lon"` 176 Accuracy float64 `codec:"accuracy" json:"accuracy"` 177} 178 179func (o Coordinate) DeepCopy() Coordinate { 180 return Coordinate{ 181 Lat: o.Lat, 182 Lon: o.Lon, 183 Accuracy: o.Accuracy, 184 } 185} 186 187type LiveLocation struct { 188 EndTime gregor1.Time `codec:"endTime" json:"endTime"` 189} 190 191func (o LiveLocation) DeepCopy() LiveLocation { 192 return LiveLocation{ 193 EndTime: o.EndTime.DeepCopy(), 194 } 195} 196 197type MessageText struct { 198 Body string `codec:"body" json:"body"` 199 Payments []TextPayment `codec:"payments" json:"payments"` 200 ReplyTo *MessageID `codec:"replyTo,omitempty" json:"replyTo,omitempty"` 201 ReplyToUID *gregor1.UID `codec:"replyToUID,omitempty" json:"replyToUID,omitempty"` 202 UserMentions []KnownUserMention `codec:"userMentions" json:"userMentions"` 203 TeamMentions []KnownTeamMention `codec:"teamMentions" json:"teamMentions"` 204 LiveLocation *LiveLocation `codec:"liveLocation,omitempty" json:"liveLocation,omitempty"` 205 Emojis map[string]HarvestedEmoji `codec:"emojis" json:"emojis"` 206} 207 208func (o MessageText) DeepCopy() MessageText { 209 return MessageText{ 210 Body: o.Body, 211 Payments: (func(x []TextPayment) []TextPayment { 212 if x == nil { 213 return nil 214 } 215 ret := make([]TextPayment, len(x)) 216 for i, v := range x { 217 vCopy := v.DeepCopy() 218 ret[i] = vCopy 219 } 220 return ret 221 })(o.Payments), 222 ReplyTo: (func(x *MessageID) *MessageID { 223 if x == nil { 224 return nil 225 } 226 tmp := (*x).DeepCopy() 227 return &tmp 228 })(o.ReplyTo), 229 ReplyToUID: (func(x *gregor1.UID) *gregor1.UID { 230 if x == nil { 231 return nil 232 } 233 tmp := (*x).DeepCopy() 234 return &tmp 235 })(o.ReplyToUID), 236 UserMentions: (func(x []KnownUserMention) []KnownUserMention { 237 if x == nil { 238 return nil 239 } 240 ret := make([]KnownUserMention, len(x)) 241 for i, v := range x { 242 vCopy := v.DeepCopy() 243 ret[i] = vCopy 244 } 245 return ret 246 })(o.UserMentions), 247 TeamMentions: (func(x []KnownTeamMention) []KnownTeamMention { 248 if x == nil { 249 return nil 250 } 251 ret := make([]KnownTeamMention, len(x)) 252 for i, v := range x { 253 vCopy := v.DeepCopy() 254 ret[i] = vCopy 255 } 256 return ret 257 })(o.TeamMentions), 258 LiveLocation: (func(x *LiveLocation) *LiveLocation { 259 if x == nil { 260 return nil 261 } 262 tmp := (*x).DeepCopy() 263 return &tmp 264 })(o.LiveLocation), 265 Emojis: (func(x map[string]HarvestedEmoji) map[string]HarvestedEmoji { 266 if x == nil { 267 return nil 268 } 269 ret := make(map[string]HarvestedEmoji, len(x)) 270 for k, v := range x { 271 kCopy := k 272 vCopy := v.DeepCopy() 273 ret[kCopy] = vCopy 274 } 275 return ret 276 })(o.Emojis), 277 } 278} 279 280type MessageConversationMetadata struct { 281 ConversationTitle string `codec:"conversationTitle" json:"conversationTitle"` 282} 283 284func (o MessageConversationMetadata) DeepCopy() MessageConversationMetadata { 285 return MessageConversationMetadata{ 286 ConversationTitle: o.ConversationTitle, 287 } 288} 289 290type MessageEdit struct { 291 MessageID MessageID `codec:"messageID" json:"messageID"` 292 Body string `codec:"body" json:"body"` 293 UserMentions []KnownUserMention `codec:"userMentions" json:"userMentions"` 294 TeamMentions []KnownTeamMention `codec:"teamMentions" json:"teamMentions"` 295 Emojis map[string]HarvestedEmoji `codec:"emojis" json:"emojis"` 296} 297 298func (o MessageEdit) DeepCopy() MessageEdit { 299 return MessageEdit{ 300 MessageID: o.MessageID.DeepCopy(), 301 Body: o.Body, 302 UserMentions: (func(x []KnownUserMention) []KnownUserMention { 303 if x == nil { 304 return nil 305 } 306 ret := make([]KnownUserMention, len(x)) 307 for i, v := range x { 308 vCopy := v.DeepCopy() 309 ret[i] = vCopy 310 } 311 return ret 312 })(o.UserMentions), 313 TeamMentions: (func(x []KnownTeamMention) []KnownTeamMention { 314 if x == nil { 315 return nil 316 } 317 ret := make([]KnownTeamMention, len(x)) 318 for i, v := range x { 319 vCopy := v.DeepCopy() 320 ret[i] = vCopy 321 } 322 return ret 323 })(o.TeamMentions), 324 Emojis: (func(x map[string]HarvestedEmoji) map[string]HarvestedEmoji { 325 if x == nil { 326 return nil 327 } 328 ret := make(map[string]HarvestedEmoji, len(x)) 329 for k, v := range x { 330 kCopy := k 331 vCopy := v.DeepCopy() 332 ret[kCopy] = vCopy 333 } 334 return ret 335 })(o.Emojis), 336 } 337} 338 339type MessageDelete struct { 340 MessageIDs []MessageID `codec:"messageIDs" json:"messageIDs"` 341} 342 343func (o MessageDelete) DeepCopy() MessageDelete { 344 return MessageDelete{ 345 MessageIDs: (func(x []MessageID) []MessageID { 346 if x == nil { 347 return nil 348 } 349 ret := make([]MessageID, len(x)) 350 for i, v := range x { 351 vCopy := v.DeepCopy() 352 ret[i] = vCopy 353 } 354 return ret 355 })(o.MessageIDs), 356 } 357} 358 359type MessageHeadline struct { 360 Headline string `codec:"headline" json:"headline"` 361 Emojis map[string]HarvestedEmoji `codec:"emojis" json:"emojis"` 362} 363 364func (o MessageHeadline) DeepCopy() MessageHeadline { 365 return MessageHeadline{ 366 Headline: o.Headline, 367 Emojis: (func(x map[string]HarvestedEmoji) map[string]HarvestedEmoji { 368 if x == nil { 369 return nil 370 } 371 ret := make(map[string]HarvestedEmoji, len(x)) 372 for k, v := range x { 373 kCopy := k 374 vCopy := v.DeepCopy() 375 ret[kCopy] = vCopy 376 } 377 return ret 378 })(o.Emojis), 379 } 380} 381 382type MessageFlip struct { 383 Text string `codec:"text" json:"text"` 384 GameID FlipGameID `codec:"gameID" json:"gameID"` 385 FlipConvID ConversationID `codec:"flipConvID" json:"flipConvID"` 386 UserMentions []KnownUserMention `codec:"userMentions" json:"userMentions"` 387 TeamMentions []KnownTeamMention `codec:"teamMentions" json:"teamMentions"` 388} 389 390func (o MessageFlip) DeepCopy() MessageFlip { 391 return MessageFlip{ 392 Text: o.Text, 393 GameID: o.GameID.DeepCopy(), 394 FlipConvID: o.FlipConvID.DeepCopy(), 395 UserMentions: (func(x []KnownUserMention) []KnownUserMention { 396 if x == nil { 397 return nil 398 } 399 ret := make([]KnownUserMention, len(x)) 400 for i, v := range x { 401 vCopy := v.DeepCopy() 402 ret[i] = vCopy 403 } 404 return ret 405 })(o.UserMentions), 406 TeamMentions: (func(x []KnownTeamMention) []KnownTeamMention { 407 if x == nil { 408 return nil 409 } 410 ret := make([]KnownTeamMention, len(x)) 411 for i, v := range x { 412 vCopy := v.DeepCopy() 413 ret[i] = vCopy 414 } 415 return ret 416 })(o.TeamMentions), 417 } 418} 419 420type MessagePin struct { 421 MsgID MessageID `codec:"msgID" json:"msgID"` 422} 423 424func (o MessagePin) DeepCopy() MessagePin { 425 return MessagePin{ 426 MsgID: o.MsgID.DeepCopy(), 427 } 428} 429 430type MessageSystemType int 431 432const ( 433 MessageSystemType_ADDEDTOTEAM MessageSystemType = 0 434 MessageSystemType_INVITEADDEDTOTEAM MessageSystemType = 1 435 MessageSystemType_COMPLEXTEAM MessageSystemType = 2 436 MessageSystemType_CREATETEAM MessageSystemType = 3 437 MessageSystemType_GITPUSH MessageSystemType = 4 438 MessageSystemType_CHANGEAVATAR MessageSystemType = 5 439 MessageSystemType_CHANGERETENTION MessageSystemType = 6 440 MessageSystemType_BULKADDTOCONV MessageSystemType = 7 441 MessageSystemType_SBSRESOLVE MessageSystemType = 8 442 MessageSystemType_NEWCHANNEL MessageSystemType = 9 443) 444 445func (o MessageSystemType) DeepCopy() MessageSystemType { return o } 446 447var MessageSystemTypeMap = map[string]MessageSystemType{ 448 "ADDEDTOTEAM": 0, 449 "INVITEADDEDTOTEAM": 1, 450 "COMPLEXTEAM": 2, 451 "CREATETEAM": 3, 452 "GITPUSH": 4, 453 "CHANGEAVATAR": 5, 454 "CHANGERETENTION": 6, 455 "BULKADDTOCONV": 7, 456 "SBSRESOLVE": 8, 457 "NEWCHANNEL": 9, 458} 459 460var MessageSystemTypeRevMap = map[MessageSystemType]string{ 461 0: "ADDEDTOTEAM", 462 1: "INVITEADDEDTOTEAM", 463 2: "COMPLEXTEAM", 464 3: "CREATETEAM", 465 4: "GITPUSH", 466 5: "CHANGEAVATAR", 467 6: "CHANGERETENTION", 468 7: "BULKADDTOCONV", 469 8: "SBSRESOLVE", 470 9: "NEWCHANNEL", 471} 472 473func (e MessageSystemType) String() string { 474 if v, ok := MessageSystemTypeRevMap[e]; ok { 475 return v 476 } 477 return fmt.Sprintf("%v", int(e)) 478} 479 480type MessageSystemAddedToTeam struct { 481 Team string `codec:"team" json:"team"` 482 Adder string `codec:"adder" json:"adder"` 483 Addee string `codec:"addee" json:"addee"` 484 Role keybase1.TeamRole `codec:"role" json:"role"` 485 BulkAdds []string `codec:"bulkAdds" json:"bulkAdds"` 486} 487 488func (o MessageSystemAddedToTeam) DeepCopy() MessageSystemAddedToTeam { 489 return MessageSystemAddedToTeam{ 490 Team: o.Team, 491 Adder: o.Adder, 492 Addee: o.Addee, 493 Role: o.Role.DeepCopy(), 494 BulkAdds: (func(x []string) []string { 495 if x == nil { 496 return nil 497 } 498 ret := make([]string, len(x)) 499 for i, v := range x { 500 vCopy := v 501 ret[i] = vCopy 502 } 503 return ret 504 })(o.BulkAdds), 505 } 506} 507 508type MessageSystemInviteAddedToTeam struct { 509 Team string `codec:"team" json:"team"` 510 Inviter string `codec:"inviter" json:"inviter"` 511 Invitee string `codec:"invitee" json:"invitee"` 512 Adder string `codec:"adder" json:"adder"` 513 InviteType keybase1.TeamInviteCategory `codec:"inviteType" json:"inviteType"` 514 Role keybase1.TeamRole `codec:"role" json:"role"` 515} 516 517func (o MessageSystemInviteAddedToTeam) DeepCopy() MessageSystemInviteAddedToTeam { 518 return MessageSystemInviteAddedToTeam{ 519 Team: o.Team, 520 Inviter: o.Inviter, 521 Invitee: o.Invitee, 522 Adder: o.Adder, 523 InviteType: o.InviteType.DeepCopy(), 524 Role: o.Role.DeepCopy(), 525 } 526} 527 528type MessageSystemComplexTeam struct { 529 Team string `codec:"team" json:"team"` 530} 531 532func (o MessageSystemComplexTeam) DeepCopy() MessageSystemComplexTeam { 533 return MessageSystemComplexTeam{ 534 Team: o.Team, 535 } 536} 537 538type MessageSystemCreateTeam struct { 539 Team string `codec:"team" json:"team"` 540 Creator string `codec:"creator" json:"creator"` 541} 542 543func (o MessageSystemCreateTeam) DeepCopy() MessageSystemCreateTeam { 544 return MessageSystemCreateTeam{ 545 Team: o.Team, 546 Creator: o.Creator, 547 } 548} 549 550type MessageSystemGitPush struct { 551 Team string `codec:"team" json:"team"` 552 Pusher string `codec:"pusher" json:"pusher"` 553 RepoName string `codec:"repoName" json:"repoName"` 554 RepoID keybase1.RepoID `codec:"repoID" json:"repoID"` 555 Refs []keybase1.GitRefMetadata `codec:"refs" json:"refs"` 556 PushType keybase1.GitPushType `codec:"pushType" json:"pushType"` 557 PreviousRepoName string `codec:"previousRepoName" json:"previousRepoName"` 558} 559 560func (o MessageSystemGitPush) DeepCopy() MessageSystemGitPush { 561 return MessageSystemGitPush{ 562 Team: o.Team, 563 Pusher: o.Pusher, 564 RepoName: o.RepoName, 565 RepoID: o.RepoID.DeepCopy(), 566 Refs: (func(x []keybase1.GitRefMetadata) []keybase1.GitRefMetadata { 567 if x == nil { 568 return nil 569 } 570 ret := make([]keybase1.GitRefMetadata, len(x)) 571 for i, v := range x { 572 vCopy := v.DeepCopy() 573 ret[i] = vCopy 574 } 575 return ret 576 })(o.Refs), 577 PushType: o.PushType.DeepCopy(), 578 PreviousRepoName: o.PreviousRepoName, 579 } 580} 581 582type MessageSystemChangeAvatar struct { 583 Team string `codec:"team" json:"team"` 584 User string `codec:"user" json:"user"` 585} 586 587func (o MessageSystemChangeAvatar) DeepCopy() MessageSystemChangeAvatar { 588 return MessageSystemChangeAvatar{ 589 Team: o.Team, 590 User: o.User, 591 } 592} 593 594type MessageSystemChangeRetention struct { 595 IsTeam bool `codec:"isTeam" json:"isTeam"` 596 IsInherit bool `codec:"isInherit" json:"isInherit"` 597 MembersType ConversationMembersType `codec:"membersType" json:"membersType"` 598 Policy RetentionPolicy `codec:"policy" json:"policy"` 599 User string `codec:"user" json:"user"` 600} 601 602func (o MessageSystemChangeRetention) DeepCopy() MessageSystemChangeRetention { 603 return MessageSystemChangeRetention{ 604 IsTeam: o.IsTeam, 605 IsInherit: o.IsInherit, 606 MembersType: o.MembersType.DeepCopy(), 607 Policy: o.Policy.DeepCopy(), 608 User: o.User, 609 } 610} 611 612type MessageSystemBulkAddToConv struct { 613 Usernames []string `codec:"usernames" json:"usernames"` 614} 615 616func (o MessageSystemBulkAddToConv) DeepCopy() MessageSystemBulkAddToConv { 617 return MessageSystemBulkAddToConv{ 618 Usernames: (func(x []string) []string { 619 if x == nil { 620 return nil 621 } 622 ret := make([]string, len(x)) 623 for i, v := range x { 624 vCopy := v 625 ret[i] = vCopy 626 } 627 return ret 628 })(o.Usernames), 629 } 630} 631 632type MessageSystemSbsResolve struct { 633 AssertionService string `codec:"assertionService" json:"assertionService"` 634 AssertionUsername string `codec:"assertionUsername" json:"assertionUsername"` 635 Prover string `codec:"prover" json:"prover"` 636} 637 638func (o MessageSystemSbsResolve) DeepCopy() MessageSystemSbsResolve { 639 return MessageSystemSbsResolve{ 640 AssertionService: o.AssertionService, 641 AssertionUsername: o.AssertionUsername, 642 Prover: o.Prover, 643 } 644} 645 646type MessageSystemNewChannel struct { 647 Creator string `codec:"creator" json:"creator"` 648 NameAtCreation string `codec:"nameAtCreation" json:"nameAtCreation"` 649 ConvID ConversationID `codec:"convID" json:"convID"` 650 ConvIDs []ConversationID `codec:"convIDs" json:"convIDs"` 651} 652 653func (o MessageSystemNewChannel) DeepCopy() MessageSystemNewChannel { 654 return MessageSystemNewChannel{ 655 Creator: o.Creator, 656 NameAtCreation: o.NameAtCreation, 657 ConvID: o.ConvID.DeepCopy(), 658 ConvIDs: (func(x []ConversationID) []ConversationID { 659 if x == nil { 660 return nil 661 } 662 ret := make([]ConversationID, len(x)) 663 for i, v := range x { 664 vCopy := v.DeepCopy() 665 ret[i] = vCopy 666 } 667 return ret 668 })(o.ConvIDs), 669 } 670} 671 672type MessageSystem struct { 673 SystemType__ MessageSystemType `codec:"systemType" json:"systemType"` 674 Addedtoteam__ *MessageSystemAddedToTeam `codec:"addedtoteam,omitempty" json:"addedtoteam,omitempty"` 675 Inviteaddedtoteam__ *MessageSystemInviteAddedToTeam `codec:"inviteaddedtoteam,omitempty" json:"inviteaddedtoteam,omitempty"` 676 Complexteam__ *MessageSystemComplexTeam `codec:"complexteam,omitempty" json:"complexteam,omitempty"` 677 Createteam__ *MessageSystemCreateTeam `codec:"createteam,omitempty" json:"createteam,omitempty"` 678 Gitpush__ *MessageSystemGitPush `codec:"gitpush,omitempty" json:"gitpush,omitempty"` 679 Changeavatar__ *MessageSystemChangeAvatar `codec:"changeavatar,omitempty" json:"changeavatar,omitempty"` 680 Changeretention__ *MessageSystemChangeRetention `codec:"changeretention,omitempty" json:"changeretention,omitempty"` 681 Bulkaddtoconv__ *MessageSystemBulkAddToConv `codec:"bulkaddtoconv,omitempty" json:"bulkaddtoconv,omitempty"` 682 Sbsresolve__ *MessageSystemSbsResolve `codec:"sbsresolve,omitempty" json:"sbsresolve,omitempty"` 683 Newchannel__ *MessageSystemNewChannel `codec:"newchannel,omitempty" json:"newchannel,omitempty"` 684} 685 686func (o *MessageSystem) SystemType() (ret MessageSystemType, err error) { 687 switch o.SystemType__ { 688 case MessageSystemType_ADDEDTOTEAM: 689 if o.Addedtoteam__ == nil { 690 err = errors.New("unexpected nil value for Addedtoteam__") 691 return ret, err 692 } 693 case MessageSystemType_INVITEADDEDTOTEAM: 694 if o.Inviteaddedtoteam__ == nil { 695 err = errors.New("unexpected nil value for Inviteaddedtoteam__") 696 return ret, err 697 } 698 case MessageSystemType_COMPLEXTEAM: 699 if o.Complexteam__ == nil { 700 err = errors.New("unexpected nil value for Complexteam__") 701 return ret, err 702 } 703 case MessageSystemType_CREATETEAM: 704 if o.Createteam__ == nil { 705 err = errors.New("unexpected nil value for Createteam__") 706 return ret, err 707 } 708 case MessageSystemType_GITPUSH: 709 if o.Gitpush__ == nil { 710 err = errors.New("unexpected nil value for Gitpush__") 711 return ret, err 712 } 713 case MessageSystemType_CHANGEAVATAR: 714 if o.Changeavatar__ == nil { 715 err = errors.New("unexpected nil value for Changeavatar__") 716 return ret, err 717 } 718 case MessageSystemType_CHANGERETENTION: 719 if o.Changeretention__ == nil { 720 err = errors.New("unexpected nil value for Changeretention__") 721 return ret, err 722 } 723 case MessageSystemType_BULKADDTOCONV: 724 if o.Bulkaddtoconv__ == nil { 725 err = errors.New("unexpected nil value for Bulkaddtoconv__") 726 return ret, err 727 } 728 case MessageSystemType_SBSRESOLVE: 729 if o.Sbsresolve__ == nil { 730 err = errors.New("unexpected nil value for Sbsresolve__") 731 return ret, err 732 } 733 case MessageSystemType_NEWCHANNEL: 734 if o.Newchannel__ == nil { 735 err = errors.New("unexpected nil value for Newchannel__") 736 return ret, err 737 } 738 } 739 return o.SystemType__, nil 740} 741 742func (o MessageSystem) Addedtoteam() (res MessageSystemAddedToTeam) { 743 if o.SystemType__ != MessageSystemType_ADDEDTOTEAM { 744 panic("wrong case accessed") 745 } 746 if o.Addedtoteam__ == nil { 747 return 748 } 749 return *o.Addedtoteam__ 750} 751 752func (o MessageSystem) Inviteaddedtoteam() (res MessageSystemInviteAddedToTeam) { 753 if o.SystemType__ != MessageSystemType_INVITEADDEDTOTEAM { 754 panic("wrong case accessed") 755 } 756 if o.Inviteaddedtoteam__ == nil { 757 return 758 } 759 return *o.Inviteaddedtoteam__ 760} 761 762func (o MessageSystem) Complexteam() (res MessageSystemComplexTeam) { 763 if o.SystemType__ != MessageSystemType_COMPLEXTEAM { 764 panic("wrong case accessed") 765 } 766 if o.Complexteam__ == nil { 767 return 768 } 769 return *o.Complexteam__ 770} 771 772func (o MessageSystem) Createteam() (res MessageSystemCreateTeam) { 773 if o.SystemType__ != MessageSystemType_CREATETEAM { 774 panic("wrong case accessed") 775 } 776 if o.Createteam__ == nil { 777 return 778 } 779 return *o.Createteam__ 780} 781 782func (o MessageSystem) Gitpush() (res MessageSystemGitPush) { 783 if o.SystemType__ != MessageSystemType_GITPUSH { 784 panic("wrong case accessed") 785 } 786 if o.Gitpush__ == nil { 787 return 788 } 789 return *o.Gitpush__ 790} 791 792func (o MessageSystem) Changeavatar() (res MessageSystemChangeAvatar) { 793 if o.SystemType__ != MessageSystemType_CHANGEAVATAR { 794 panic("wrong case accessed") 795 } 796 if o.Changeavatar__ == nil { 797 return 798 } 799 return *o.Changeavatar__ 800} 801 802func (o MessageSystem) Changeretention() (res MessageSystemChangeRetention) { 803 if o.SystemType__ != MessageSystemType_CHANGERETENTION { 804 panic("wrong case accessed") 805 } 806 if o.Changeretention__ == nil { 807 return 808 } 809 return *o.Changeretention__ 810} 811 812func (o MessageSystem) Bulkaddtoconv() (res MessageSystemBulkAddToConv) { 813 if o.SystemType__ != MessageSystemType_BULKADDTOCONV { 814 panic("wrong case accessed") 815 } 816 if o.Bulkaddtoconv__ == nil { 817 return 818 } 819 return *o.Bulkaddtoconv__ 820} 821 822func (o MessageSystem) Sbsresolve() (res MessageSystemSbsResolve) { 823 if o.SystemType__ != MessageSystemType_SBSRESOLVE { 824 panic("wrong case accessed") 825 } 826 if o.Sbsresolve__ == nil { 827 return 828 } 829 return *o.Sbsresolve__ 830} 831 832func (o MessageSystem) Newchannel() (res MessageSystemNewChannel) { 833 if o.SystemType__ != MessageSystemType_NEWCHANNEL { 834 panic("wrong case accessed") 835 } 836 if o.Newchannel__ == nil { 837 return 838 } 839 return *o.Newchannel__ 840} 841 842func NewMessageSystemWithAddedtoteam(v MessageSystemAddedToTeam) MessageSystem { 843 return MessageSystem{ 844 SystemType__: MessageSystemType_ADDEDTOTEAM, 845 Addedtoteam__: &v, 846 } 847} 848 849func NewMessageSystemWithInviteaddedtoteam(v MessageSystemInviteAddedToTeam) MessageSystem { 850 return MessageSystem{ 851 SystemType__: MessageSystemType_INVITEADDEDTOTEAM, 852 Inviteaddedtoteam__: &v, 853 } 854} 855 856func NewMessageSystemWithComplexteam(v MessageSystemComplexTeam) MessageSystem { 857 return MessageSystem{ 858 SystemType__: MessageSystemType_COMPLEXTEAM, 859 Complexteam__: &v, 860 } 861} 862 863func NewMessageSystemWithCreateteam(v MessageSystemCreateTeam) MessageSystem { 864 return MessageSystem{ 865 SystemType__: MessageSystemType_CREATETEAM, 866 Createteam__: &v, 867 } 868} 869 870func NewMessageSystemWithGitpush(v MessageSystemGitPush) MessageSystem { 871 return MessageSystem{ 872 SystemType__: MessageSystemType_GITPUSH, 873 Gitpush__: &v, 874 } 875} 876 877func NewMessageSystemWithChangeavatar(v MessageSystemChangeAvatar) MessageSystem { 878 return MessageSystem{ 879 SystemType__: MessageSystemType_CHANGEAVATAR, 880 Changeavatar__: &v, 881 } 882} 883 884func NewMessageSystemWithChangeretention(v MessageSystemChangeRetention) MessageSystem { 885 return MessageSystem{ 886 SystemType__: MessageSystemType_CHANGERETENTION, 887 Changeretention__: &v, 888 } 889} 890 891func NewMessageSystemWithBulkaddtoconv(v MessageSystemBulkAddToConv) MessageSystem { 892 return MessageSystem{ 893 SystemType__: MessageSystemType_BULKADDTOCONV, 894 Bulkaddtoconv__: &v, 895 } 896} 897 898func NewMessageSystemWithSbsresolve(v MessageSystemSbsResolve) MessageSystem { 899 return MessageSystem{ 900 SystemType__: MessageSystemType_SBSRESOLVE, 901 Sbsresolve__: &v, 902 } 903} 904 905func NewMessageSystemWithNewchannel(v MessageSystemNewChannel) MessageSystem { 906 return MessageSystem{ 907 SystemType__: MessageSystemType_NEWCHANNEL, 908 Newchannel__: &v, 909 } 910} 911 912func (o MessageSystem) DeepCopy() MessageSystem { 913 return MessageSystem{ 914 SystemType__: o.SystemType__.DeepCopy(), 915 Addedtoteam__: (func(x *MessageSystemAddedToTeam) *MessageSystemAddedToTeam { 916 if x == nil { 917 return nil 918 } 919 tmp := (*x).DeepCopy() 920 return &tmp 921 })(o.Addedtoteam__), 922 Inviteaddedtoteam__: (func(x *MessageSystemInviteAddedToTeam) *MessageSystemInviteAddedToTeam { 923 if x == nil { 924 return nil 925 } 926 tmp := (*x).DeepCopy() 927 return &tmp 928 })(o.Inviteaddedtoteam__), 929 Complexteam__: (func(x *MessageSystemComplexTeam) *MessageSystemComplexTeam { 930 if x == nil { 931 return nil 932 } 933 tmp := (*x).DeepCopy() 934 return &tmp 935 })(o.Complexteam__), 936 Createteam__: (func(x *MessageSystemCreateTeam) *MessageSystemCreateTeam { 937 if x == nil { 938 return nil 939 } 940 tmp := (*x).DeepCopy() 941 return &tmp 942 })(o.Createteam__), 943 Gitpush__: (func(x *MessageSystemGitPush) *MessageSystemGitPush { 944 if x == nil { 945 return nil 946 } 947 tmp := (*x).DeepCopy() 948 return &tmp 949 })(o.Gitpush__), 950 Changeavatar__: (func(x *MessageSystemChangeAvatar) *MessageSystemChangeAvatar { 951 if x == nil { 952 return nil 953 } 954 tmp := (*x).DeepCopy() 955 return &tmp 956 })(o.Changeavatar__), 957 Changeretention__: (func(x *MessageSystemChangeRetention) *MessageSystemChangeRetention { 958 if x == nil { 959 return nil 960 } 961 tmp := (*x).DeepCopy() 962 return &tmp 963 })(o.Changeretention__), 964 Bulkaddtoconv__: (func(x *MessageSystemBulkAddToConv) *MessageSystemBulkAddToConv { 965 if x == nil { 966 return nil 967 } 968 tmp := (*x).DeepCopy() 969 return &tmp 970 })(o.Bulkaddtoconv__), 971 Sbsresolve__: (func(x *MessageSystemSbsResolve) *MessageSystemSbsResolve { 972 if x == nil { 973 return nil 974 } 975 tmp := (*x).DeepCopy() 976 return &tmp 977 })(o.Sbsresolve__), 978 Newchannel__: (func(x *MessageSystemNewChannel) *MessageSystemNewChannel { 979 if x == nil { 980 return nil 981 } 982 tmp := (*x).DeepCopy() 983 return &tmp 984 })(o.Newchannel__), 985 } 986} 987 988type MessageDeleteHistory struct { 989 Upto MessageID `codec:"upto" json:"upto"` 990} 991 992func (o MessageDeleteHistory) DeepCopy() MessageDeleteHistory { 993 return MessageDeleteHistory{ 994 Upto: o.Upto.DeepCopy(), 995 } 996} 997 998type MessageAttachment struct { 999 Object Asset `codec:"object" json:"object"` 1000 Preview *Asset `codec:"preview,omitempty" json:"preview,omitempty"` 1001 Previews []Asset `codec:"previews" json:"previews"` 1002 Metadata []byte `codec:"metadata" json:"metadata"` 1003 Uploaded bool `codec:"uploaded" json:"uploaded"` 1004 UserMentions []KnownUserMention `codec:"userMentions" json:"userMentions"` 1005 TeamMentions []KnownTeamMention `codec:"teamMentions" json:"teamMentions"` 1006 Emojis map[string]HarvestedEmoji `codec:"emojis" json:"emojis"` 1007} 1008 1009func (o MessageAttachment) DeepCopy() MessageAttachment { 1010 return MessageAttachment{ 1011 Object: o.Object.DeepCopy(), 1012 Preview: (func(x *Asset) *Asset { 1013 if x == nil { 1014 return nil 1015 } 1016 tmp := (*x).DeepCopy() 1017 return &tmp 1018 })(o.Preview), 1019 Previews: (func(x []Asset) []Asset { 1020 if x == nil { 1021 return nil 1022 } 1023 ret := make([]Asset, len(x)) 1024 for i, v := range x { 1025 vCopy := v.DeepCopy() 1026 ret[i] = vCopy 1027 } 1028 return ret 1029 })(o.Previews), 1030 Metadata: (func(x []byte) []byte { 1031 if x == nil { 1032 return nil 1033 } 1034 return append([]byte{}, x...) 1035 })(o.Metadata), 1036 Uploaded: o.Uploaded, 1037 UserMentions: (func(x []KnownUserMention) []KnownUserMention { 1038 if x == nil { 1039 return nil 1040 } 1041 ret := make([]KnownUserMention, len(x)) 1042 for i, v := range x { 1043 vCopy := v.DeepCopy() 1044 ret[i] = vCopy 1045 } 1046 return ret 1047 })(o.UserMentions), 1048 TeamMentions: (func(x []KnownTeamMention) []KnownTeamMention { 1049 if x == nil { 1050 return nil 1051 } 1052 ret := make([]KnownTeamMention, len(x)) 1053 for i, v := range x { 1054 vCopy := v.DeepCopy() 1055 ret[i] = vCopy 1056 } 1057 return ret 1058 })(o.TeamMentions), 1059 Emojis: (func(x map[string]HarvestedEmoji) map[string]HarvestedEmoji { 1060 if x == nil { 1061 return nil 1062 } 1063 ret := make(map[string]HarvestedEmoji, len(x)) 1064 for k, v := range x { 1065 kCopy := k 1066 vCopy := v.DeepCopy() 1067 ret[kCopy] = vCopy 1068 } 1069 return ret 1070 })(o.Emojis), 1071 } 1072} 1073 1074type MessageAttachmentUploaded struct { 1075 MessageID MessageID `codec:"messageID" json:"messageID"` 1076 Object Asset `codec:"object" json:"object"` 1077 Previews []Asset `codec:"previews" json:"previews"` 1078 Metadata []byte `codec:"metadata" json:"metadata"` 1079} 1080 1081func (o MessageAttachmentUploaded) DeepCopy() MessageAttachmentUploaded { 1082 return MessageAttachmentUploaded{ 1083 MessageID: o.MessageID.DeepCopy(), 1084 Object: o.Object.DeepCopy(), 1085 Previews: (func(x []Asset) []Asset { 1086 if x == nil { 1087 return nil 1088 } 1089 ret := make([]Asset, len(x)) 1090 for i, v := range x { 1091 vCopy := v.DeepCopy() 1092 ret[i] = vCopy 1093 } 1094 return ret 1095 })(o.Previews), 1096 Metadata: (func(x []byte) []byte { 1097 if x == nil { 1098 return nil 1099 } 1100 return append([]byte{}, x...) 1101 })(o.Metadata), 1102 } 1103} 1104 1105type MessageJoin struct { 1106 Joiners []string `codec:"joiners" json:"joiners"` 1107 Leavers []string `codec:"leavers" json:"leavers"` 1108} 1109 1110func (o MessageJoin) DeepCopy() MessageJoin { 1111 return MessageJoin{ 1112 Joiners: (func(x []string) []string { 1113 if x == nil { 1114 return nil 1115 } 1116 ret := make([]string, len(x)) 1117 for i, v := range x { 1118 vCopy := v 1119 ret[i] = vCopy 1120 } 1121 return ret 1122 })(o.Joiners), 1123 Leavers: (func(x []string) []string { 1124 if x == nil { 1125 return nil 1126 } 1127 ret := make([]string, len(x)) 1128 for i, v := range x { 1129 vCopy := v 1130 ret[i] = vCopy 1131 } 1132 return ret 1133 })(o.Leavers), 1134 } 1135} 1136 1137type MessageLeave struct { 1138} 1139 1140func (o MessageLeave) DeepCopy() MessageLeave { 1141 return MessageLeave{} 1142} 1143 1144type MessageReaction struct { 1145 MessageID MessageID `codec:"m" json:"m"` 1146 Body string `codec:"b" json:"b"` 1147 TargetUID *gregor1.UID `codec:"t,omitempty" json:"t,omitempty"` 1148 Emojis map[string]HarvestedEmoji `codec:"e" json:"e"` 1149} 1150 1151func (o MessageReaction) DeepCopy() MessageReaction { 1152 return MessageReaction{ 1153 MessageID: o.MessageID.DeepCopy(), 1154 Body: o.Body, 1155 TargetUID: (func(x *gregor1.UID) *gregor1.UID { 1156 if x == nil { 1157 return nil 1158 } 1159 tmp := (*x).DeepCopy() 1160 return &tmp 1161 })(o.TargetUID), 1162 Emojis: (func(x map[string]HarvestedEmoji) map[string]HarvestedEmoji { 1163 if x == nil { 1164 return nil 1165 } 1166 ret := make(map[string]HarvestedEmoji, len(x)) 1167 for k, v := range x { 1168 kCopy := k 1169 vCopy := v.DeepCopy() 1170 ret[kCopy] = vCopy 1171 } 1172 return ret 1173 })(o.Emojis), 1174 } 1175} 1176 1177type MessageSendPayment struct { 1178 PaymentID stellar1.PaymentID `codec:"paymentID" json:"paymentID"` 1179} 1180 1181func (o MessageSendPayment) DeepCopy() MessageSendPayment { 1182 return MessageSendPayment{ 1183 PaymentID: o.PaymentID.DeepCopy(), 1184 } 1185} 1186 1187type MessageRequestPayment struct { 1188 RequestID stellar1.KeybaseRequestID `codec:"requestID" json:"requestID"` 1189 Note string `codec:"note" json:"note"` 1190} 1191 1192func (o MessageRequestPayment) DeepCopy() MessageRequestPayment { 1193 return MessageRequestPayment{ 1194 RequestID: o.RequestID.DeepCopy(), 1195 Note: o.Note, 1196 } 1197} 1198 1199type MessageUnfurl struct { 1200 Unfurl UnfurlResult `codec:"unfurl" json:"unfurl"` 1201 MessageID MessageID `codec:"messageID" json:"messageID"` 1202} 1203 1204func (o MessageUnfurl) DeepCopy() MessageUnfurl { 1205 return MessageUnfurl{ 1206 Unfurl: o.Unfurl.DeepCopy(), 1207 MessageID: o.MessageID.DeepCopy(), 1208 } 1209} 1210 1211type MessageBody struct { 1212 MessageType__ MessageType `codec:"messageType" json:"messageType"` 1213 Text__ *MessageText `codec:"text,omitempty" json:"text,omitempty"` 1214 Attachment__ *MessageAttachment `codec:"attachment,omitempty" json:"attachment,omitempty"` 1215 Edit__ *MessageEdit `codec:"edit,omitempty" json:"edit,omitempty"` 1216 Delete__ *MessageDelete `codec:"delete,omitempty" json:"delete,omitempty"` 1217 Metadata__ *MessageConversationMetadata `codec:"metadata,omitempty" json:"metadata,omitempty"` 1218 Headline__ *MessageHeadline `codec:"headline,omitempty" json:"headline,omitempty"` 1219 Attachmentuploaded__ *MessageAttachmentUploaded `codec:"attachmentuploaded,omitempty" json:"attachmentuploaded,omitempty"` 1220 Join__ *MessageJoin `codec:"join,omitempty" json:"join,omitempty"` 1221 Leave__ *MessageLeave `codec:"leave,omitempty" json:"leave,omitempty"` 1222 System__ *MessageSystem `codec:"system,omitempty" json:"system,omitempty"` 1223 Deletehistory__ *MessageDeleteHistory `codec:"deletehistory,omitempty" json:"deletehistory,omitempty"` 1224 Reaction__ *MessageReaction `codec:"reaction,omitempty" json:"reaction,omitempty"` 1225 Sendpayment__ *MessageSendPayment `codec:"sendpayment,omitempty" json:"sendpayment,omitempty"` 1226 Requestpayment__ *MessageRequestPayment `codec:"requestpayment,omitempty" json:"requestpayment,omitempty"` 1227 Unfurl__ *MessageUnfurl `codec:"unfurl,omitempty" json:"unfurl,omitempty"` 1228 Flip__ *MessageFlip `codec:"flip,omitempty" json:"flip,omitempty"` 1229 Pin__ *MessagePin `codec:"pin,omitempty" json:"pin,omitempty"` 1230} 1231 1232func (o *MessageBody) MessageType() (ret MessageType, err error) { 1233 switch o.MessageType__ { 1234 case MessageType_TEXT: 1235 if o.Text__ == nil { 1236 err = errors.New("unexpected nil value for Text__") 1237 return ret, err 1238 } 1239 case MessageType_ATTACHMENT: 1240 if o.Attachment__ == nil { 1241 err = errors.New("unexpected nil value for Attachment__") 1242 return ret, err 1243 } 1244 case MessageType_EDIT: 1245 if o.Edit__ == nil { 1246 err = errors.New("unexpected nil value for Edit__") 1247 return ret, err 1248 } 1249 case MessageType_DELETE: 1250 if o.Delete__ == nil { 1251 err = errors.New("unexpected nil value for Delete__") 1252 return ret, err 1253 } 1254 case MessageType_METADATA: 1255 if o.Metadata__ == nil { 1256 err = errors.New("unexpected nil value for Metadata__") 1257 return ret, err 1258 } 1259 case MessageType_HEADLINE: 1260 if o.Headline__ == nil { 1261 err = errors.New("unexpected nil value for Headline__") 1262 return ret, err 1263 } 1264 case MessageType_ATTACHMENTUPLOADED: 1265 if o.Attachmentuploaded__ == nil { 1266 err = errors.New("unexpected nil value for Attachmentuploaded__") 1267 return ret, err 1268 } 1269 case MessageType_JOIN: 1270 if o.Join__ == nil { 1271 err = errors.New("unexpected nil value for Join__") 1272 return ret, err 1273 } 1274 case MessageType_LEAVE: 1275 if o.Leave__ == nil { 1276 err = errors.New("unexpected nil value for Leave__") 1277 return ret, err 1278 } 1279 case MessageType_SYSTEM: 1280 if o.System__ == nil { 1281 err = errors.New("unexpected nil value for System__") 1282 return ret, err 1283 } 1284 case MessageType_DELETEHISTORY: 1285 if o.Deletehistory__ == nil { 1286 err = errors.New("unexpected nil value for Deletehistory__") 1287 return ret, err 1288 } 1289 case MessageType_REACTION: 1290 if o.Reaction__ == nil { 1291 err = errors.New("unexpected nil value for Reaction__") 1292 return ret, err 1293 } 1294 case MessageType_SENDPAYMENT: 1295 if o.Sendpayment__ == nil { 1296 err = errors.New("unexpected nil value for Sendpayment__") 1297 return ret, err 1298 } 1299 case MessageType_REQUESTPAYMENT: 1300 if o.Requestpayment__ == nil { 1301 err = errors.New("unexpected nil value for Requestpayment__") 1302 return ret, err 1303 } 1304 case MessageType_UNFURL: 1305 if o.Unfurl__ == nil { 1306 err = errors.New("unexpected nil value for Unfurl__") 1307 return ret, err 1308 } 1309 case MessageType_FLIP: 1310 if o.Flip__ == nil { 1311 err = errors.New("unexpected nil value for Flip__") 1312 return ret, err 1313 } 1314 case MessageType_PIN: 1315 if o.Pin__ == nil { 1316 err = errors.New("unexpected nil value for Pin__") 1317 return ret, err 1318 } 1319 } 1320 return o.MessageType__, nil 1321} 1322 1323func (o MessageBody) Text() (res MessageText) { 1324 if o.MessageType__ != MessageType_TEXT { 1325 panic("wrong case accessed") 1326 } 1327 if o.Text__ == nil { 1328 return 1329 } 1330 return *o.Text__ 1331} 1332 1333func (o MessageBody) Attachment() (res MessageAttachment) { 1334 if o.MessageType__ != MessageType_ATTACHMENT { 1335 panic("wrong case accessed") 1336 } 1337 if o.Attachment__ == nil { 1338 return 1339 } 1340 return *o.Attachment__ 1341} 1342 1343func (o MessageBody) Edit() (res MessageEdit) { 1344 if o.MessageType__ != MessageType_EDIT { 1345 panic("wrong case accessed") 1346 } 1347 if o.Edit__ == nil { 1348 return 1349 } 1350 return *o.Edit__ 1351} 1352 1353func (o MessageBody) Delete() (res MessageDelete) { 1354 if o.MessageType__ != MessageType_DELETE { 1355 panic("wrong case accessed") 1356 } 1357 if o.Delete__ == nil { 1358 return 1359 } 1360 return *o.Delete__ 1361} 1362 1363func (o MessageBody) Metadata() (res MessageConversationMetadata) { 1364 if o.MessageType__ != MessageType_METADATA { 1365 panic("wrong case accessed") 1366 } 1367 if o.Metadata__ == nil { 1368 return 1369 } 1370 return *o.Metadata__ 1371} 1372 1373func (o MessageBody) Headline() (res MessageHeadline) { 1374 if o.MessageType__ != MessageType_HEADLINE { 1375 panic("wrong case accessed") 1376 } 1377 if o.Headline__ == nil { 1378 return 1379 } 1380 return *o.Headline__ 1381} 1382 1383func (o MessageBody) Attachmentuploaded() (res MessageAttachmentUploaded) { 1384 if o.MessageType__ != MessageType_ATTACHMENTUPLOADED { 1385 panic("wrong case accessed") 1386 } 1387 if o.Attachmentuploaded__ == nil { 1388 return 1389 } 1390 return *o.Attachmentuploaded__ 1391} 1392 1393func (o MessageBody) Join() (res MessageJoin) { 1394 if o.MessageType__ != MessageType_JOIN { 1395 panic("wrong case accessed") 1396 } 1397 if o.Join__ == nil { 1398 return 1399 } 1400 return *o.Join__ 1401} 1402 1403func (o MessageBody) Leave() (res MessageLeave) { 1404 if o.MessageType__ != MessageType_LEAVE { 1405 panic("wrong case accessed") 1406 } 1407 if o.Leave__ == nil { 1408 return 1409 } 1410 return *o.Leave__ 1411} 1412 1413func (o MessageBody) System() (res MessageSystem) { 1414 if o.MessageType__ != MessageType_SYSTEM { 1415 panic("wrong case accessed") 1416 } 1417 if o.System__ == nil { 1418 return 1419 } 1420 return *o.System__ 1421} 1422 1423func (o MessageBody) Deletehistory() (res MessageDeleteHistory) { 1424 if o.MessageType__ != MessageType_DELETEHISTORY { 1425 panic("wrong case accessed") 1426 } 1427 if o.Deletehistory__ == nil { 1428 return 1429 } 1430 return *o.Deletehistory__ 1431} 1432 1433func (o MessageBody) Reaction() (res MessageReaction) { 1434 if o.MessageType__ != MessageType_REACTION { 1435 panic("wrong case accessed") 1436 } 1437 if o.Reaction__ == nil { 1438 return 1439 } 1440 return *o.Reaction__ 1441} 1442 1443func (o MessageBody) Sendpayment() (res MessageSendPayment) { 1444 if o.MessageType__ != MessageType_SENDPAYMENT { 1445 panic("wrong case accessed") 1446 } 1447 if o.Sendpayment__ == nil { 1448 return 1449 } 1450 return *o.Sendpayment__ 1451} 1452 1453func (o MessageBody) Requestpayment() (res MessageRequestPayment) { 1454 if o.MessageType__ != MessageType_REQUESTPAYMENT { 1455 panic("wrong case accessed") 1456 } 1457 if o.Requestpayment__ == nil { 1458 return 1459 } 1460 return *o.Requestpayment__ 1461} 1462 1463func (o MessageBody) Unfurl() (res MessageUnfurl) { 1464 if o.MessageType__ != MessageType_UNFURL { 1465 panic("wrong case accessed") 1466 } 1467 if o.Unfurl__ == nil { 1468 return 1469 } 1470 return *o.Unfurl__ 1471} 1472 1473func (o MessageBody) Flip() (res MessageFlip) { 1474 if o.MessageType__ != MessageType_FLIP { 1475 panic("wrong case accessed") 1476 } 1477 if o.Flip__ == nil { 1478 return 1479 } 1480 return *o.Flip__ 1481} 1482 1483func (o MessageBody) Pin() (res MessagePin) { 1484 if o.MessageType__ != MessageType_PIN { 1485 panic("wrong case accessed") 1486 } 1487 if o.Pin__ == nil { 1488 return 1489 } 1490 return *o.Pin__ 1491} 1492 1493func NewMessageBodyWithText(v MessageText) MessageBody { 1494 return MessageBody{ 1495 MessageType__: MessageType_TEXT, 1496 Text__: &v, 1497 } 1498} 1499 1500func NewMessageBodyWithAttachment(v MessageAttachment) MessageBody { 1501 return MessageBody{ 1502 MessageType__: MessageType_ATTACHMENT, 1503 Attachment__: &v, 1504 } 1505} 1506 1507func NewMessageBodyWithEdit(v MessageEdit) MessageBody { 1508 return MessageBody{ 1509 MessageType__: MessageType_EDIT, 1510 Edit__: &v, 1511 } 1512} 1513 1514func NewMessageBodyWithDelete(v MessageDelete) MessageBody { 1515 return MessageBody{ 1516 MessageType__: MessageType_DELETE, 1517 Delete__: &v, 1518 } 1519} 1520 1521func NewMessageBodyWithMetadata(v MessageConversationMetadata) MessageBody { 1522 return MessageBody{ 1523 MessageType__: MessageType_METADATA, 1524 Metadata__: &v, 1525 } 1526} 1527 1528func NewMessageBodyWithHeadline(v MessageHeadline) MessageBody { 1529 return MessageBody{ 1530 MessageType__: MessageType_HEADLINE, 1531 Headline__: &v, 1532 } 1533} 1534 1535func NewMessageBodyWithAttachmentuploaded(v MessageAttachmentUploaded) MessageBody { 1536 return MessageBody{ 1537 MessageType__: MessageType_ATTACHMENTUPLOADED, 1538 Attachmentuploaded__: &v, 1539 } 1540} 1541 1542func NewMessageBodyWithJoin(v MessageJoin) MessageBody { 1543 return MessageBody{ 1544 MessageType__: MessageType_JOIN, 1545 Join__: &v, 1546 } 1547} 1548 1549func NewMessageBodyWithLeave(v MessageLeave) MessageBody { 1550 return MessageBody{ 1551 MessageType__: MessageType_LEAVE, 1552 Leave__: &v, 1553 } 1554} 1555 1556func NewMessageBodyWithSystem(v MessageSystem) MessageBody { 1557 return MessageBody{ 1558 MessageType__: MessageType_SYSTEM, 1559 System__: &v, 1560 } 1561} 1562 1563func NewMessageBodyWithDeletehistory(v MessageDeleteHistory) MessageBody { 1564 return MessageBody{ 1565 MessageType__: MessageType_DELETEHISTORY, 1566 Deletehistory__: &v, 1567 } 1568} 1569 1570func NewMessageBodyWithReaction(v MessageReaction) MessageBody { 1571 return MessageBody{ 1572 MessageType__: MessageType_REACTION, 1573 Reaction__: &v, 1574 } 1575} 1576 1577func NewMessageBodyWithSendpayment(v MessageSendPayment) MessageBody { 1578 return MessageBody{ 1579 MessageType__: MessageType_SENDPAYMENT, 1580 Sendpayment__: &v, 1581 } 1582} 1583 1584func NewMessageBodyWithRequestpayment(v MessageRequestPayment) MessageBody { 1585 return MessageBody{ 1586 MessageType__: MessageType_REQUESTPAYMENT, 1587 Requestpayment__: &v, 1588 } 1589} 1590 1591func NewMessageBodyWithUnfurl(v MessageUnfurl) MessageBody { 1592 return MessageBody{ 1593 MessageType__: MessageType_UNFURL, 1594 Unfurl__: &v, 1595 } 1596} 1597 1598func NewMessageBodyWithFlip(v MessageFlip) MessageBody { 1599 return MessageBody{ 1600 MessageType__: MessageType_FLIP, 1601 Flip__: &v, 1602 } 1603} 1604 1605func NewMessageBodyWithPin(v MessagePin) MessageBody { 1606 return MessageBody{ 1607 MessageType__: MessageType_PIN, 1608 Pin__: &v, 1609 } 1610} 1611 1612func (o MessageBody) DeepCopy() MessageBody { 1613 return MessageBody{ 1614 MessageType__: o.MessageType__.DeepCopy(), 1615 Text__: (func(x *MessageText) *MessageText { 1616 if x == nil { 1617 return nil 1618 } 1619 tmp := (*x).DeepCopy() 1620 return &tmp 1621 })(o.Text__), 1622 Attachment__: (func(x *MessageAttachment) *MessageAttachment { 1623 if x == nil { 1624 return nil 1625 } 1626 tmp := (*x).DeepCopy() 1627 return &tmp 1628 })(o.Attachment__), 1629 Edit__: (func(x *MessageEdit) *MessageEdit { 1630 if x == nil { 1631 return nil 1632 } 1633 tmp := (*x).DeepCopy() 1634 return &tmp 1635 })(o.Edit__), 1636 Delete__: (func(x *MessageDelete) *MessageDelete { 1637 if x == nil { 1638 return nil 1639 } 1640 tmp := (*x).DeepCopy() 1641 return &tmp 1642 })(o.Delete__), 1643 Metadata__: (func(x *MessageConversationMetadata) *MessageConversationMetadata { 1644 if x == nil { 1645 return nil 1646 } 1647 tmp := (*x).DeepCopy() 1648 return &tmp 1649 })(o.Metadata__), 1650 Headline__: (func(x *MessageHeadline) *MessageHeadline { 1651 if x == nil { 1652 return nil 1653 } 1654 tmp := (*x).DeepCopy() 1655 return &tmp 1656 })(o.Headline__), 1657 Attachmentuploaded__: (func(x *MessageAttachmentUploaded) *MessageAttachmentUploaded { 1658 if x == nil { 1659 return nil 1660 } 1661 tmp := (*x).DeepCopy() 1662 return &tmp 1663 })(o.Attachmentuploaded__), 1664 Join__: (func(x *MessageJoin) *MessageJoin { 1665 if x == nil { 1666 return nil 1667 } 1668 tmp := (*x).DeepCopy() 1669 return &tmp 1670 })(o.Join__), 1671 Leave__: (func(x *MessageLeave) *MessageLeave { 1672 if x == nil { 1673 return nil 1674 } 1675 tmp := (*x).DeepCopy() 1676 return &tmp 1677 })(o.Leave__), 1678 System__: (func(x *MessageSystem) *MessageSystem { 1679 if x == nil { 1680 return nil 1681 } 1682 tmp := (*x).DeepCopy() 1683 return &tmp 1684 })(o.System__), 1685 Deletehistory__: (func(x *MessageDeleteHistory) *MessageDeleteHistory { 1686 if x == nil { 1687 return nil 1688 } 1689 tmp := (*x).DeepCopy() 1690 return &tmp 1691 })(o.Deletehistory__), 1692 Reaction__: (func(x *MessageReaction) *MessageReaction { 1693 if x == nil { 1694 return nil 1695 } 1696 tmp := (*x).DeepCopy() 1697 return &tmp 1698 })(o.Reaction__), 1699 Sendpayment__: (func(x *MessageSendPayment) *MessageSendPayment { 1700 if x == nil { 1701 return nil 1702 } 1703 tmp := (*x).DeepCopy() 1704 return &tmp 1705 })(o.Sendpayment__), 1706 Requestpayment__: (func(x *MessageRequestPayment) *MessageRequestPayment { 1707 if x == nil { 1708 return nil 1709 } 1710 tmp := (*x).DeepCopy() 1711 return &tmp 1712 })(o.Requestpayment__), 1713 Unfurl__: (func(x *MessageUnfurl) *MessageUnfurl { 1714 if x == nil { 1715 return nil 1716 } 1717 tmp := (*x).DeepCopy() 1718 return &tmp 1719 })(o.Unfurl__), 1720 Flip__: (func(x *MessageFlip) *MessageFlip { 1721 if x == nil { 1722 return nil 1723 } 1724 tmp := (*x).DeepCopy() 1725 return &tmp 1726 })(o.Flip__), 1727 Pin__: (func(x *MessagePin) *MessagePin { 1728 if x == nil { 1729 return nil 1730 } 1731 tmp := (*x).DeepCopy() 1732 return &tmp 1733 })(o.Pin__), 1734 } 1735} 1736 1737type SenderPrepareOptions struct { 1738 SkipTopicNameState bool `codec:"skipTopicNameState" json:"skipTopicNameState"` 1739 ReplyTo *MessageID `codec:"replyTo,omitempty" json:"replyTo,omitempty"` 1740} 1741 1742func (o SenderPrepareOptions) DeepCopy() SenderPrepareOptions { 1743 return SenderPrepareOptions{ 1744 SkipTopicNameState: o.SkipTopicNameState, 1745 ReplyTo: (func(x *MessageID) *MessageID { 1746 if x == nil { 1747 return nil 1748 } 1749 tmp := (*x).DeepCopy() 1750 return &tmp 1751 })(o.ReplyTo), 1752 } 1753} 1754 1755type SenderSendOptions struct { 1756 JoinMentionsAs *ConversationMemberStatus `codec:"joinMentionsAs,omitempty" json:"joinMentionsAs,omitempty"` 1757} 1758 1759func (o SenderSendOptions) DeepCopy() SenderSendOptions { 1760 return SenderSendOptions{ 1761 JoinMentionsAs: (func(x *ConversationMemberStatus) *ConversationMemberStatus { 1762 if x == nil { 1763 return nil 1764 } 1765 tmp := (*x).DeepCopy() 1766 return &tmp 1767 })(o.JoinMentionsAs), 1768 } 1769} 1770 1771type OutboxStateType int 1772 1773const ( 1774 OutboxStateType_SENDING OutboxStateType = 0 1775 OutboxStateType_ERROR OutboxStateType = 1 1776) 1777 1778func (o OutboxStateType) DeepCopy() OutboxStateType { return o } 1779 1780var OutboxStateTypeMap = map[string]OutboxStateType{ 1781 "SENDING": 0, 1782 "ERROR": 1, 1783} 1784 1785var OutboxStateTypeRevMap = map[OutboxStateType]string{ 1786 0: "SENDING", 1787 1: "ERROR", 1788} 1789 1790func (e OutboxStateType) String() string { 1791 if v, ok := OutboxStateTypeRevMap[e]; ok { 1792 return v 1793 } 1794 return fmt.Sprintf("%v", int(e)) 1795} 1796 1797type OutboxErrorType int 1798 1799const ( 1800 OutboxErrorType_MISC OutboxErrorType = 0 1801 OutboxErrorType_OFFLINE OutboxErrorType = 1 1802 OutboxErrorType_IDENTIFY OutboxErrorType = 2 1803 OutboxErrorType_TOOLONG OutboxErrorType = 3 1804 OutboxErrorType_DUPLICATE OutboxErrorType = 4 1805 OutboxErrorType_EXPIRED OutboxErrorType = 5 1806 OutboxErrorType_TOOMANYATTEMPTS OutboxErrorType = 6 1807 OutboxErrorType_ALREADY_DELETED OutboxErrorType = 7 1808 OutboxErrorType_UPLOADFAILED OutboxErrorType = 8 1809 OutboxErrorType_RESTRICTEDBOT OutboxErrorType = 9 1810 OutboxErrorType_MINWRITER OutboxErrorType = 10 1811) 1812 1813func (o OutboxErrorType) DeepCopy() OutboxErrorType { return o } 1814 1815var OutboxErrorTypeMap = map[string]OutboxErrorType{ 1816 "MISC": 0, 1817 "OFFLINE": 1, 1818 "IDENTIFY": 2, 1819 "TOOLONG": 3, 1820 "DUPLICATE": 4, 1821 "EXPIRED": 5, 1822 "TOOMANYATTEMPTS": 6, 1823 "ALREADY_DELETED": 7, 1824 "UPLOADFAILED": 8, 1825 "RESTRICTEDBOT": 9, 1826 "MINWRITER": 10, 1827} 1828 1829var OutboxErrorTypeRevMap = map[OutboxErrorType]string{ 1830 0: "MISC", 1831 1: "OFFLINE", 1832 2: "IDENTIFY", 1833 3: "TOOLONG", 1834 4: "DUPLICATE", 1835 5: "EXPIRED", 1836 6: "TOOMANYATTEMPTS", 1837 7: "ALREADY_DELETED", 1838 8: "UPLOADFAILED", 1839 9: "RESTRICTEDBOT", 1840 10: "MINWRITER", 1841} 1842 1843func (e OutboxErrorType) String() string { 1844 if v, ok := OutboxErrorTypeRevMap[e]; ok { 1845 return v 1846 } 1847 return fmt.Sprintf("%v", int(e)) 1848} 1849 1850type OutboxStateError struct { 1851 Message string `codec:"message" json:"message"` 1852 Typ OutboxErrorType `codec:"typ" json:"typ"` 1853} 1854 1855func (o OutboxStateError) DeepCopy() OutboxStateError { 1856 return OutboxStateError{ 1857 Message: o.Message, 1858 Typ: o.Typ.DeepCopy(), 1859 } 1860} 1861 1862type OutboxState struct { 1863 State__ OutboxStateType `codec:"state" json:"state"` 1864 Sending__ *int `codec:"sending,omitempty" json:"sending,omitempty"` 1865 Error__ *OutboxStateError `codec:"error,omitempty" json:"error,omitempty"` 1866} 1867 1868func (o *OutboxState) State() (ret OutboxStateType, err error) { 1869 switch o.State__ { 1870 case OutboxStateType_SENDING: 1871 if o.Sending__ == nil { 1872 err = errors.New("unexpected nil value for Sending__") 1873 return ret, err 1874 } 1875 case OutboxStateType_ERROR: 1876 if o.Error__ == nil { 1877 err = errors.New("unexpected nil value for Error__") 1878 return ret, err 1879 } 1880 } 1881 return o.State__, nil 1882} 1883 1884func (o OutboxState) Sending() (res int) { 1885 if o.State__ != OutboxStateType_SENDING { 1886 panic("wrong case accessed") 1887 } 1888 if o.Sending__ == nil { 1889 return 1890 } 1891 return *o.Sending__ 1892} 1893 1894func (o OutboxState) Error() (res OutboxStateError) { 1895 if o.State__ != OutboxStateType_ERROR { 1896 panic("wrong case accessed") 1897 } 1898 if o.Error__ == nil { 1899 return 1900 } 1901 return *o.Error__ 1902} 1903 1904func NewOutboxStateWithSending(v int) OutboxState { 1905 return OutboxState{ 1906 State__: OutboxStateType_SENDING, 1907 Sending__: &v, 1908 } 1909} 1910 1911func NewOutboxStateWithError(v OutboxStateError) OutboxState { 1912 return OutboxState{ 1913 State__: OutboxStateType_ERROR, 1914 Error__: &v, 1915 } 1916} 1917 1918func (o OutboxState) DeepCopy() OutboxState { 1919 return OutboxState{ 1920 State__: o.State__.DeepCopy(), 1921 Sending__: (func(x *int) *int { 1922 if x == nil { 1923 return nil 1924 } 1925 tmp := (*x) 1926 return &tmp 1927 })(o.Sending__), 1928 Error__: (func(x *OutboxStateError) *OutboxStateError { 1929 if x == nil { 1930 return nil 1931 } 1932 tmp := (*x).DeepCopy() 1933 return &tmp 1934 })(o.Error__), 1935 } 1936} 1937 1938type OutboxRecord struct { 1939 State OutboxState `codec:"state" json:"state"` 1940 OutboxID OutboxID `codec:"outboxID" json:"outboxID"` 1941 ConvID ConversationID `codec:"convID" json:"convID"` 1942 Ctime gregor1.Time `codec:"ctime" json:"ctime"` 1943 Msg MessagePlaintext `codec:"Msg" json:"Msg"` 1944 IdentifyBehavior keybase1.TLFIdentifyBehavior `codec:"identifyBehavior" json:"identifyBehavior"` 1945 PrepareOpts *SenderPrepareOptions `codec:"prepareOpts,omitempty" json:"prepareOpts,omitempty"` 1946 SendOpts *SenderSendOptions `codec:"sendOpts,omitempty" json:"sendOpts,omitempty"` 1947 Ordinal int `codec:"ordinal" json:"ordinal"` 1948 Preview *MakePreviewRes `codec:"preview,omitempty" json:"preview,omitempty"` 1949 ReplyTo *MessageUnboxed `codec:"replyTo,omitempty" json:"replyTo,omitempty"` 1950} 1951 1952func (o OutboxRecord) DeepCopy() OutboxRecord { 1953 return OutboxRecord{ 1954 State: o.State.DeepCopy(), 1955 OutboxID: o.OutboxID.DeepCopy(), 1956 ConvID: o.ConvID.DeepCopy(), 1957 Ctime: o.Ctime.DeepCopy(), 1958 Msg: o.Msg.DeepCopy(), 1959 IdentifyBehavior: o.IdentifyBehavior.DeepCopy(), 1960 PrepareOpts: (func(x *SenderPrepareOptions) *SenderPrepareOptions { 1961 if x == nil { 1962 return nil 1963 } 1964 tmp := (*x).DeepCopy() 1965 return &tmp 1966 })(o.PrepareOpts), 1967 SendOpts: (func(x *SenderSendOptions) *SenderSendOptions { 1968 if x == nil { 1969 return nil 1970 } 1971 tmp := (*x).DeepCopy() 1972 return &tmp 1973 })(o.SendOpts), 1974 Ordinal: o.Ordinal, 1975 Preview: (func(x *MakePreviewRes) *MakePreviewRes { 1976 if x == nil { 1977 return nil 1978 } 1979 tmp := (*x).DeepCopy() 1980 return &tmp 1981 })(o.Preview), 1982 ReplyTo: (func(x *MessageUnboxed) *MessageUnboxed { 1983 if x == nil { 1984 return nil 1985 } 1986 tmp := (*x).DeepCopy() 1987 return &tmp 1988 })(o.ReplyTo), 1989 } 1990} 1991 1992type HeaderPlaintextVersion int 1993 1994const ( 1995 HeaderPlaintextVersion_V1 HeaderPlaintextVersion = 1 1996 HeaderPlaintextVersion_V2 HeaderPlaintextVersion = 2 1997 HeaderPlaintextVersion_V3 HeaderPlaintextVersion = 3 1998 HeaderPlaintextVersion_V4 HeaderPlaintextVersion = 4 1999 HeaderPlaintextVersion_V5 HeaderPlaintextVersion = 5 2000 HeaderPlaintextVersion_V6 HeaderPlaintextVersion = 6 2001 HeaderPlaintextVersion_V7 HeaderPlaintextVersion = 7 2002 HeaderPlaintextVersion_V8 HeaderPlaintextVersion = 8 2003 HeaderPlaintextVersion_V9 HeaderPlaintextVersion = 9 2004 HeaderPlaintextVersion_V10 HeaderPlaintextVersion = 10 2005) 2006 2007func (o HeaderPlaintextVersion) DeepCopy() HeaderPlaintextVersion { return o } 2008 2009var HeaderPlaintextVersionMap = map[string]HeaderPlaintextVersion{ 2010 "V1": 1, 2011 "V2": 2, 2012 "V3": 3, 2013 "V4": 4, 2014 "V5": 5, 2015 "V6": 6, 2016 "V7": 7, 2017 "V8": 8, 2018 "V9": 9, 2019 "V10": 10, 2020} 2021 2022var HeaderPlaintextVersionRevMap = map[HeaderPlaintextVersion]string{ 2023 1: "V1", 2024 2: "V2", 2025 3: "V3", 2026 4: "V4", 2027 5: "V5", 2028 6: "V6", 2029 7: "V7", 2030 8: "V8", 2031 9: "V9", 2032 10: "V10", 2033} 2034 2035func (e HeaderPlaintextVersion) String() string { 2036 if v, ok := HeaderPlaintextVersionRevMap[e]; ok { 2037 return v 2038 } 2039 return fmt.Sprintf("%v", int(e)) 2040} 2041 2042type HeaderPlaintextMetaInfo struct { 2043 Crit bool `codec:"crit" json:"crit"` 2044} 2045 2046func (o HeaderPlaintextMetaInfo) DeepCopy() HeaderPlaintextMetaInfo { 2047 return HeaderPlaintextMetaInfo{ 2048 Crit: o.Crit, 2049 } 2050} 2051 2052type HeaderPlaintextUnsupported struct { 2053 Mi HeaderPlaintextMetaInfo `codec:"mi" json:"mi"` 2054} 2055 2056func (o HeaderPlaintextUnsupported) DeepCopy() HeaderPlaintextUnsupported { 2057 return HeaderPlaintextUnsupported{ 2058 Mi: o.Mi.DeepCopy(), 2059 } 2060} 2061 2062type HeaderPlaintextV1 struct { 2063 Conv ConversationIDTriple `codec:"conv" json:"conv"` 2064 TlfName string `codec:"tlfName" json:"tlfName"` 2065 TlfPublic bool `codec:"tlfPublic" json:"tlfPublic"` 2066 MessageType MessageType `codec:"messageType" json:"messageType"` 2067 Prev []MessagePreviousPointer `codec:"prev" json:"prev"` 2068 Sender gregor1.UID `codec:"sender" json:"sender"` 2069 SenderDevice gregor1.DeviceID `codec:"senderDevice" json:"senderDevice"` 2070 KbfsCryptKeysUsed *bool `codec:"kbfsCryptKeysUsed,omitempty" json:"kbfsCryptKeysUsed,omitempty"` 2071 BodyHash Hash `codec:"bodyHash" json:"bodyHash"` 2072 OutboxInfo *OutboxInfo `codec:"outboxInfo,omitempty" json:"outboxInfo,omitempty"` 2073 OutboxID *OutboxID `codec:"outboxID,omitempty" json:"outboxID,omitempty"` 2074 HeaderSignature *SignatureInfo `codec:"headerSignature,omitempty" json:"headerSignature,omitempty"` 2075 MerkleRoot *MerkleRoot `codec:"merkleRoot,omitempty" json:"merkleRoot,omitempty"` 2076 EphemeralMetadata *MsgEphemeralMetadata `codec:"em,omitempty" json:"em,omitempty"` 2077 BotUID *gregor1.UID `codec:"b,omitempty" json:"b,omitempty"` 2078} 2079 2080func (o HeaderPlaintextV1) DeepCopy() HeaderPlaintextV1 { 2081 return HeaderPlaintextV1{ 2082 Conv: o.Conv.DeepCopy(), 2083 TlfName: o.TlfName, 2084 TlfPublic: o.TlfPublic, 2085 MessageType: o.MessageType.DeepCopy(), 2086 Prev: (func(x []MessagePreviousPointer) []MessagePreviousPointer { 2087 if x == nil { 2088 return nil 2089 } 2090 ret := make([]MessagePreviousPointer, len(x)) 2091 for i, v := range x { 2092 vCopy := v.DeepCopy() 2093 ret[i] = vCopy 2094 } 2095 return ret 2096 })(o.Prev), 2097 Sender: o.Sender.DeepCopy(), 2098 SenderDevice: o.SenderDevice.DeepCopy(), 2099 KbfsCryptKeysUsed: (func(x *bool) *bool { 2100 if x == nil { 2101 return nil 2102 } 2103 tmp := (*x) 2104 return &tmp 2105 })(o.KbfsCryptKeysUsed), 2106 BodyHash: o.BodyHash.DeepCopy(), 2107 OutboxInfo: (func(x *OutboxInfo) *OutboxInfo { 2108 if x == nil { 2109 return nil 2110 } 2111 tmp := (*x).DeepCopy() 2112 return &tmp 2113 })(o.OutboxInfo), 2114 OutboxID: (func(x *OutboxID) *OutboxID { 2115 if x == nil { 2116 return nil 2117 } 2118 tmp := (*x).DeepCopy() 2119 return &tmp 2120 })(o.OutboxID), 2121 HeaderSignature: (func(x *SignatureInfo) *SignatureInfo { 2122 if x == nil { 2123 return nil 2124 } 2125 tmp := (*x).DeepCopy() 2126 return &tmp 2127 })(o.HeaderSignature), 2128 MerkleRoot: (func(x *MerkleRoot) *MerkleRoot { 2129 if x == nil { 2130 return nil 2131 } 2132 tmp := (*x).DeepCopy() 2133 return &tmp 2134 })(o.MerkleRoot), 2135 EphemeralMetadata: (func(x *MsgEphemeralMetadata) *MsgEphemeralMetadata { 2136 if x == nil { 2137 return nil 2138 } 2139 tmp := (*x).DeepCopy() 2140 return &tmp 2141 })(o.EphemeralMetadata), 2142 BotUID: (func(x *gregor1.UID) *gregor1.UID { 2143 if x == nil { 2144 return nil 2145 } 2146 tmp := (*x).DeepCopy() 2147 return &tmp 2148 })(o.BotUID), 2149 } 2150} 2151 2152type HeaderPlaintext struct { 2153 Version__ HeaderPlaintextVersion `codec:"version" json:"version"` 2154 V1__ *HeaderPlaintextV1 `codec:"v1,omitempty" json:"v1,omitempty"` 2155 V2__ *HeaderPlaintextUnsupported `codec:"v2,omitempty" json:"v2,omitempty"` 2156 V3__ *HeaderPlaintextUnsupported `codec:"v3,omitempty" json:"v3,omitempty"` 2157 V4__ *HeaderPlaintextUnsupported `codec:"v4,omitempty" json:"v4,omitempty"` 2158 V5__ *HeaderPlaintextUnsupported `codec:"v5,omitempty" json:"v5,omitempty"` 2159 V6__ *HeaderPlaintextUnsupported `codec:"v6,omitempty" json:"v6,omitempty"` 2160 V7__ *HeaderPlaintextUnsupported `codec:"v7,omitempty" json:"v7,omitempty"` 2161 V8__ *HeaderPlaintextUnsupported `codec:"v8,omitempty" json:"v8,omitempty"` 2162 V9__ *HeaderPlaintextUnsupported `codec:"v9,omitempty" json:"v9,omitempty"` 2163 V10__ *HeaderPlaintextUnsupported `codec:"v10,omitempty" json:"v10,omitempty"` 2164} 2165 2166func (o *HeaderPlaintext) Version() (ret HeaderPlaintextVersion, err error) { 2167 switch o.Version__ { 2168 case HeaderPlaintextVersion_V1: 2169 if o.V1__ == nil { 2170 err = errors.New("unexpected nil value for V1__") 2171 return ret, err 2172 } 2173 case HeaderPlaintextVersion_V2: 2174 if o.V2__ == nil { 2175 err = errors.New("unexpected nil value for V2__") 2176 return ret, err 2177 } 2178 case HeaderPlaintextVersion_V3: 2179 if o.V3__ == nil { 2180 err = errors.New("unexpected nil value for V3__") 2181 return ret, err 2182 } 2183 case HeaderPlaintextVersion_V4: 2184 if o.V4__ == nil { 2185 err = errors.New("unexpected nil value for V4__") 2186 return ret, err 2187 } 2188 case HeaderPlaintextVersion_V5: 2189 if o.V5__ == nil { 2190 err = errors.New("unexpected nil value for V5__") 2191 return ret, err 2192 } 2193 case HeaderPlaintextVersion_V6: 2194 if o.V6__ == nil { 2195 err = errors.New("unexpected nil value for V6__") 2196 return ret, err 2197 } 2198 case HeaderPlaintextVersion_V7: 2199 if o.V7__ == nil { 2200 err = errors.New("unexpected nil value for V7__") 2201 return ret, err 2202 } 2203 case HeaderPlaintextVersion_V8: 2204 if o.V8__ == nil { 2205 err = errors.New("unexpected nil value for V8__") 2206 return ret, err 2207 } 2208 case HeaderPlaintextVersion_V9: 2209 if o.V9__ == nil { 2210 err = errors.New("unexpected nil value for V9__") 2211 return ret, err 2212 } 2213 case HeaderPlaintextVersion_V10: 2214 if o.V10__ == nil { 2215 err = errors.New("unexpected nil value for V10__") 2216 return ret, err 2217 } 2218 } 2219 return o.Version__, nil 2220} 2221 2222func (o HeaderPlaintext) V1() (res HeaderPlaintextV1) { 2223 if o.Version__ != HeaderPlaintextVersion_V1 { 2224 panic("wrong case accessed") 2225 } 2226 if o.V1__ == nil { 2227 return 2228 } 2229 return *o.V1__ 2230} 2231 2232func (o HeaderPlaintext) V2() (res HeaderPlaintextUnsupported) { 2233 if o.Version__ != HeaderPlaintextVersion_V2 { 2234 panic("wrong case accessed") 2235 } 2236 if o.V2__ == nil { 2237 return 2238 } 2239 return *o.V2__ 2240} 2241 2242func (o HeaderPlaintext) V3() (res HeaderPlaintextUnsupported) { 2243 if o.Version__ != HeaderPlaintextVersion_V3 { 2244 panic("wrong case accessed") 2245 } 2246 if o.V3__ == nil { 2247 return 2248 } 2249 return *o.V3__ 2250} 2251 2252func (o HeaderPlaintext) V4() (res HeaderPlaintextUnsupported) { 2253 if o.Version__ != HeaderPlaintextVersion_V4 { 2254 panic("wrong case accessed") 2255 } 2256 if o.V4__ == nil { 2257 return 2258 } 2259 return *o.V4__ 2260} 2261 2262func (o HeaderPlaintext) V5() (res HeaderPlaintextUnsupported) { 2263 if o.Version__ != HeaderPlaintextVersion_V5 { 2264 panic("wrong case accessed") 2265 } 2266 if o.V5__ == nil { 2267 return 2268 } 2269 return *o.V5__ 2270} 2271 2272func (o HeaderPlaintext) V6() (res HeaderPlaintextUnsupported) { 2273 if o.Version__ != HeaderPlaintextVersion_V6 { 2274 panic("wrong case accessed") 2275 } 2276 if o.V6__ == nil { 2277 return 2278 } 2279 return *o.V6__ 2280} 2281 2282func (o HeaderPlaintext) V7() (res HeaderPlaintextUnsupported) { 2283 if o.Version__ != HeaderPlaintextVersion_V7 { 2284 panic("wrong case accessed") 2285 } 2286 if o.V7__ == nil { 2287 return 2288 } 2289 return *o.V7__ 2290} 2291 2292func (o HeaderPlaintext) V8() (res HeaderPlaintextUnsupported) { 2293 if o.Version__ != HeaderPlaintextVersion_V8 { 2294 panic("wrong case accessed") 2295 } 2296 if o.V8__ == nil { 2297 return 2298 } 2299 return *o.V8__ 2300} 2301 2302func (o HeaderPlaintext) V9() (res HeaderPlaintextUnsupported) { 2303 if o.Version__ != HeaderPlaintextVersion_V9 { 2304 panic("wrong case accessed") 2305 } 2306 if o.V9__ == nil { 2307 return 2308 } 2309 return *o.V9__ 2310} 2311 2312func (o HeaderPlaintext) V10() (res HeaderPlaintextUnsupported) { 2313 if o.Version__ != HeaderPlaintextVersion_V10 { 2314 panic("wrong case accessed") 2315 } 2316 if o.V10__ == nil { 2317 return 2318 } 2319 return *o.V10__ 2320} 2321 2322func NewHeaderPlaintextWithV1(v HeaderPlaintextV1) HeaderPlaintext { 2323 return HeaderPlaintext{ 2324 Version__: HeaderPlaintextVersion_V1, 2325 V1__: &v, 2326 } 2327} 2328 2329func NewHeaderPlaintextWithV2(v HeaderPlaintextUnsupported) HeaderPlaintext { 2330 return HeaderPlaintext{ 2331 Version__: HeaderPlaintextVersion_V2, 2332 V2__: &v, 2333 } 2334} 2335 2336func NewHeaderPlaintextWithV3(v HeaderPlaintextUnsupported) HeaderPlaintext { 2337 return HeaderPlaintext{ 2338 Version__: HeaderPlaintextVersion_V3, 2339 V3__: &v, 2340 } 2341} 2342 2343func NewHeaderPlaintextWithV4(v HeaderPlaintextUnsupported) HeaderPlaintext { 2344 return HeaderPlaintext{ 2345 Version__: HeaderPlaintextVersion_V4, 2346 V4__: &v, 2347 } 2348} 2349 2350func NewHeaderPlaintextWithV5(v HeaderPlaintextUnsupported) HeaderPlaintext { 2351 return HeaderPlaintext{ 2352 Version__: HeaderPlaintextVersion_V5, 2353 V5__: &v, 2354 } 2355} 2356 2357func NewHeaderPlaintextWithV6(v HeaderPlaintextUnsupported) HeaderPlaintext { 2358 return HeaderPlaintext{ 2359 Version__: HeaderPlaintextVersion_V6, 2360 V6__: &v, 2361 } 2362} 2363 2364func NewHeaderPlaintextWithV7(v HeaderPlaintextUnsupported) HeaderPlaintext { 2365 return HeaderPlaintext{ 2366 Version__: HeaderPlaintextVersion_V7, 2367 V7__: &v, 2368 } 2369} 2370 2371func NewHeaderPlaintextWithV8(v HeaderPlaintextUnsupported) HeaderPlaintext { 2372 return HeaderPlaintext{ 2373 Version__: HeaderPlaintextVersion_V8, 2374 V8__: &v, 2375 } 2376} 2377 2378func NewHeaderPlaintextWithV9(v HeaderPlaintextUnsupported) HeaderPlaintext { 2379 return HeaderPlaintext{ 2380 Version__: HeaderPlaintextVersion_V9, 2381 V9__: &v, 2382 } 2383} 2384 2385func NewHeaderPlaintextWithV10(v HeaderPlaintextUnsupported) HeaderPlaintext { 2386 return HeaderPlaintext{ 2387 Version__: HeaderPlaintextVersion_V10, 2388 V10__: &v, 2389 } 2390} 2391 2392func (o HeaderPlaintext) DeepCopy() HeaderPlaintext { 2393 return HeaderPlaintext{ 2394 Version__: o.Version__.DeepCopy(), 2395 V1__: (func(x *HeaderPlaintextV1) *HeaderPlaintextV1 { 2396 if x == nil { 2397 return nil 2398 } 2399 tmp := (*x).DeepCopy() 2400 return &tmp 2401 })(o.V1__), 2402 V2__: (func(x *HeaderPlaintextUnsupported) *HeaderPlaintextUnsupported { 2403 if x == nil { 2404 return nil 2405 } 2406 tmp := (*x).DeepCopy() 2407 return &tmp 2408 })(o.V2__), 2409 V3__: (func(x *HeaderPlaintextUnsupported) *HeaderPlaintextUnsupported { 2410 if x == nil { 2411 return nil 2412 } 2413 tmp := (*x).DeepCopy() 2414 return &tmp 2415 })(o.V3__), 2416 V4__: (func(x *HeaderPlaintextUnsupported) *HeaderPlaintextUnsupported { 2417 if x == nil { 2418 return nil 2419 } 2420 tmp := (*x).DeepCopy() 2421 return &tmp 2422 })(o.V4__), 2423 V5__: (func(x *HeaderPlaintextUnsupported) *HeaderPlaintextUnsupported { 2424 if x == nil { 2425 return nil 2426 } 2427 tmp := (*x).DeepCopy() 2428 return &tmp 2429 })(o.V5__), 2430 V6__: (func(x *HeaderPlaintextUnsupported) *HeaderPlaintextUnsupported { 2431 if x == nil { 2432 return nil 2433 } 2434 tmp := (*x).DeepCopy() 2435 return &tmp 2436 })(o.V6__), 2437 V7__: (func(x *HeaderPlaintextUnsupported) *HeaderPlaintextUnsupported { 2438 if x == nil { 2439 return nil 2440 } 2441 tmp := (*x).DeepCopy() 2442 return &tmp 2443 })(o.V7__), 2444 V8__: (func(x *HeaderPlaintextUnsupported) *HeaderPlaintextUnsupported { 2445 if x == nil { 2446 return nil 2447 } 2448 tmp := (*x).DeepCopy() 2449 return &tmp 2450 })(o.V8__), 2451 V9__: (func(x *HeaderPlaintextUnsupported) *HeaderPlaintextUnsupported { 2452 if x == nil { 2453 return nil 2454 } 2455 tmp := (*x).DeepCopy() 2456 return &tmp 2457 })(o.V9__), 2458 V10__: (func(x *HeaderPlaintextUnsupported) *HeaderPlaintextUnsupported { 2459 if x == nil { 2460 return nil 2461 } 2462 tmp := (*x).DeepCopy() 2463 return &tmp 2464 })(o.V10__), 2465 } 2466} 2467 2468type BodyPlaintextVersion int 2469 2470const ( 2471 BodyPlaintextVersion_V1 BodyPlaintextVersion = 1 2472 BodyPlaintextVersion_V2 BodyPlaintextVersion = 2 2473 BodyPlaintextVersion_V3 BodyPlaintextVersion = 3 2474 BodyPlaintextVersion_V4 BodyPlaintextVersion = 4 2475 BodyPlaintextVersion_V5 BodyPlaintextVersion = 5 2476 BodyPlaintextVersion_V6 BodyPlaintextVersion = 6 2477 BodyPlaintextVersion_V7 BodyPlaintextVersion = 7 2478 BodyPlaintextVersion_V8 BodyPlaintextVersion = 8 2479 BodyPlaintextVersion_V9 BodyPlaintextVersion = 9 2480 BodyPlaintextVersion_V10 BodyPlaintextVersion = 10 2481) 2482 2483func (o BodyPlaintextVersion) DeepCopy() BodyPlaintextVersion { return o } 2484 2485var BodyPlaintextVersionMap = map[string]BodyPlaintextVersion{ 2486 "V1": 1, 2487 "V2": 2, 2488 "V3": 3, 2489 "V4": 4, 2490 "V5": 5, 2491 "V6": 6, 2492 "V7": 7, 2493 "V8": 8, 2494 "V9": 9, 2495 "V10": 10, 2496} 2497 2498var BodyPlaintextVersionRevMap = map[BodyPlaintextVersion]string{ 2499 1: "V1", 2500 2: "V2", 2501 3: "V3", 2502 4: "V4", 2503 5: "V5", 2504 6: "V6", 2505 7: "V7", 2506 8: "V8", 2507 9: "V9", 2508 10: "V10", 2509} 2510 2511func (e BodyPlaintextVersion) String() string { 2512 if v, ok := BodyPlaintextVersionRevMap[e]; ok { 2513 return v 2514 } 2515 return fmt.Sprintf("%v", int(e)) 2516} 2517 2518type BodyPlaintextMetaInfo struct { 2519 Crit bool `codec:"crit" json:"crit"` 2520} 2521 2522func (o BodyPlaintextMetaInfo) DeepCopy() BodyPlaintextMetaInfo { 2523 return BodyPlaintextMetaInfo{ 2524 Crit: o.Crit, 2525 } 2526} 2527 2528type BodyPlaintextUnsupported struct { 2529 Mi BodyPlaintextMetaInfo `codec:"mi" json:"mi"` 2530} 2531 2532func (o BodyPlaintextUnsupported) DeepCopy() BodyPlaintextUnsupported { 2533 return BodyPlaintextUnsupported{ 2534 Mi: o.Mi.DeepCopy(), 2535 } 2536} 2537 2538type BodyPlaintextV1 struct { 2539 MessageBody MessageBody `codec:"messageBody" json:"messageBody"` 2540} 2541 2542func (o BodyPlaintextV1) DeepCopy() BodyPlaintextV1 { 2543 return BodyPlaintextV1{ 2544 MessageBody: o.MessageBody.DeepCopy(), 2545 } 2546} 2547 2548type BodyPlaintextV2 struct { 2549 MessageBody MessageBody `codec:"messageBody" json:"messageBody"` 2550 Mi BodyPlaintextMetaInfo `codec:"mi" json:"mi"` 2551} 2552 2553func (o BodyPlaintextV2) DeepCopy() BodyPlaintextV2 { 2554 return BodyPlaintextV2{ 2555 MessageBody: o.MessageBody.DeepCopy(), 2556 Mi: o.Mi.DeepCopy(), 2557 } 2558} 2559 2560type BodyPlaintext struct { 2561 Version__ BodyPlaintextVersion `codec:"version" json:"version"` 2562 V1__ *BodyPlaintextV1 `codec:"v1,omitempty" json:"v1,omitempty"` 2563 V2__ *BodyPlaintextV2 `codec:"v2,omitempty" json:"v2,omitempty"` 2564 V3__ *BodyPlaintextUnsupported `codec:"v3,omitempty" json:"v3,omitempty"` 2565 V4__ *BodyPlaintextUnsupported `codec:"v4,omitempty" json:"v4,omitempty"` 2566 V5__ *BodyPlaintextUnsupported `codec:"v5,omitempty" json:"v5,omitempty"` 2567 V6__ *BodyPlaintextUnsupported `codec:"v6,omitempty" json:"v6,omitempty"` 2568 V7__ *BodyPlaintextUnsupported `codec:"v7,omitempty" json:"v7,omitempty"` 2569 V8__ *BodyPlaintextUnsupported `codec:"v8,omitempty" json:"v8,omitempty"` 2570 V9__ *BodyPlaintextUnsupported `codec:"v9,omitempty" json:"v9,omitempty"` 2571 V10__ *BodyPlaintextUnsupported `codec:"v10,omitempty" json:"v10,omitempty"` 2572} 2573 2574func (o *BodyPlaintext) Version() (ret BodyPlaintextVersion, err error) { 2575 switch o.Version__ { 2576 case BodyPlaintextVersion_V1: 2577 if o.V1__ == nil { 2578 err = errors.New("unexpected nil value for V1__") 2579 return ret, err 2580 } 2581 case BodyPlaintextVersion_V2: 2582 if o.V2__ == nil { 2583 err = errors.New("unexpected nil value for V2__") 2584 return ret, err 2585 } 2586 case BodyPlaintextVersion_V3: 2587 if o.V3__ == nil { 2588 err = errors.New("unexpected nil value for V3__") 2589 return ret, err 2590 } 2591 case BodyPlaintextVersion_V4: 2592 if o.V4__ == nil { 2593 err = errors.New("unexpected nil value for V4__") 2594 return ret, err 2595 } 2596 case BodyPlaintextVersion_V5: 2597 if o.V5__ == nil { 2598 err = errors.New("unexpected nil value for V5__") 2599 return ret, err 2600 } 2601 case BodyPlaintextVersion_V6: 2602 if o.V6__ == nil { 2603 err = errors.New("unexpected nil value for V6__") 2604 return ret, err 2605 } 2606 case BodyPlaintextVersion_V7: 2607 if o.V7__ == nil { 2608 err = errors.New("unexpected nil value for V7__") 2609 return ret, err 2610 } 2611 case BodyPlaintextVersion_V8: 2612 if o.V8__ == nil { 2613 err = errors.New("unexpected nil value for V8__") 2614 return ret, err 2615 } 2616 case BodyPlaintextVersion_V9: 2617 if o.V9__ == nil { 2618 err = errors.New("unexpected nil value for V9__") 2619 return ret, err 2620 } 2621 case BodyPlaintextVersion_V10: 2622 if o.V10__ == nil { 2623 err = errors.New("unexpected nil value for V10__") 2624 return ret, err 2625 } 2626 } 2627 return o.Version__, nil 2628} 2629 2630func (o BodyPlaintext) V1() (res BodyPlaintextV1) { 2631 if o.Version__ != BodyPlaintextVersion_V1 { 2632 panic("wrong case accessed") 2633 } 2634 if o.V1__ == nil { 2635 return 2636 } 2637 return *o.V1__ 2638} 2639 2640func (o BodyPlaintext) V2() (res BodyPlaintextV2) { 2641 if o.Version__ != BodyPlaintextVersion_V2 { 2642 panic("wrong case accessed") 2643 } 2644 if o.V2__ == nil { 2645 return 2646 } 2647 return *o.V2__ 2648} 2649 2650func (o BodyPlaintext) V3() (res BodyPlaintextUnsupported) { 2651 if o.Version__ != BodyPlaintextVersion_V3 { 2652 panic("wrong case accessed") 2653 } 2654 if o.V3__ == nil { 2655 return 2656 } 2657 return *o.V3__ 2658} 2659 2660func (o BodyPlaintext) V4() (res BodyPlaintextUnsupported) { 2661 if o.Version__ != BodyPlaintextVersion_V4 { 2662 panic("wrong case accessed") 2663 } 2664 if o.V4__ == nil { 2665 return 2666 } 2667 return *o.V4__ 2668} 2669 2670func (o BodyPlaintext) V5() (res BodyPlaintextUnsupported) { 2671 if o.Version__ != BodyPlaintextVersion_V5 { 2672 panic("wrong case accessed") 2673 } 2674 if o.V5__ == nil { 2675 return 2676 } 2677 return *o.V5__ 2678} 2679 2680func (o BodyPlaintext) V6() (res BodyPlaintextUnsupported) { 2681 if o.Version__ != BodyPlaintextVersion_V6 { 2682 panic("wrong case accessed") 2683 } 2684 if o.V6__ == nil { 2685 return 2686 } 2687 return *o.V6__ 2688} 2689 2690func (o BodyPlaintext) V7() (res BodyPlaintextUnsupported) { 2691 if o.Version__ != BodyPlaintextVersion_V7 { 2692 panic("wrong case accessed") 2693 } 2694 if o.V7__ == nil { 2695 return 2696 } 2697 return *o.V7__ 2698} 2699 2700func (o BodyPlaintext) V8() (res BodyPlaintextUnsupported) { 2701 if o.Version__ != BodyPlaintextVersion_V8 { 2702 panic("wrong case accessed") 2703 } 2704 if o.V8__ == nil { 2705 return 2706 } 2707 return *o.V8__ 2708} 2709 2710func (o BodyPlaintext) V9() (res BodyPlaintextUnsupported) { 2711 if o.Version__ != BodyPlaintextVersion_V9 { 2712 panic("wrong case accessed") 2713 } 2714 if o.V9__ == nil { 2715 return 2716 } 2717 return *o.V9__ 2718} 2719 2720func (o BodyPlaintext) V10() (res BodyPlaintextUnsupported) { 2721 if o.Version__ != BodyPlaintextVersion_V10 { 2722 panic("wrong case accessed") 2723 } 2724 if o.V10__ == nil { 2725 return 2726 } 2727 return *o.V10__ 2728} 2729 2730func NewBodyPlaintextWithV1(v BodyPlaintextV1) BodyPlaintext { 2731 return BodyPlaintext{ 2732 Version__: BodyPlaintextVersion_V1, 2733 V1__: &v, 2734 } 2735} 2736 2737func NewBodyPlaintextWithV2(v BodyPlaintextV2) BodyPlaintext { 2738 return BodyPlaintext{ 2739 Version__: BodyPlaintextVersion_V2, 2740 V2__: &v, 2741 } 2742} 2743 2744func NewBodyPlaintextWithV3(v BodyPlaintextUnsupported) BodyPlaintext { 2745 return BodyPlaintext{ 2746 Version__: BodyPlaintextVersion_V3, 2747 V3__: &v, 2748 } 2749} 2750 2751func NewBodyPlaintextWithV4(v BodyPlaintextUnsupported) BodyPlaintext { 2752 return BodyPlaintext{ 2753 Version__: BodyPlaintextVersion_V4, 2754 V4__: &v, 2755 } 2756} 2757 2758func NewBodyPlaintextWithV5(v BodyPlaintextUnsupported) BodyPlaintext { 2759 return BodyPlaintext{ 2760 Version__: BodyPlaintextVersion_V5, 2761 V5__: &v, 2762 } 2763} 2764 2765func NewBodyPlaintextWithV6(v BodyPlaintextUnsupported) BodyPlaintext { 2766 return BodyPlaintext{ 2767 Version__: BodyPlaintextVersion_V6, 2768 V6__: &v, 2769 } 2770} 2771 2772func NewBodyPlaintextWithV7(v BodyPlaintextUnsupported) BodyPlaintext { 2773 return BodyPlaintext{ 2774 Version__: BodyPlaintextVersion_V7, 2775 V7__: &v, 2776 } 2777} 2778 2779func NewBodyPlaintextWithV8(v BodyPlaintextUnsupported) BodyPlaintext { 2780 return BodyPlaintext{ 2781 Version__: BodyPlaintextVersion_V8, 2782 V8__: &v, 2783 } 2784} 2785 2786func NewBodyPlaintextWithV9(v BodyPlaintextUnsupported) BodyPlaintext { 2787 return BodyPlaintext{ 2788 Version__: BodyPlaintextVersion_V9, 2789 V9__: &v, 2790 } 2791} 2792 2793func NewBodyPlaintextWithV10(v BodyPlaintextUnsupported) BodyPlaintext { 2794 return BodyPlaintext{ 2795 Version__: BodyPlaintextVersion_V10, 2796 V10__: &v, 2797 } 2798} 2799 2800func (o BodyPlaintext) DeepCopy() BodyPlaintext { 2801 return BodyPlaintext{ 2802 Version__: o.Version__.DeepCopy(), 2803 V1__: (func(x *BodyPlaintextV1) *BodyPlaintextV1 { 2804 if x == nil { 2805 return nil 2806 } 2807 tmp := (*x).DeepCopy() 2808 return &tmp 2809 })(o.V1__), 2810 V2__: (func(x *BodyPlaintextV2) *BodyPlaintextV2 { 2811 if x == nil { 2812 return nil 2813 } 2814 tmp := (*x).DeepCopy() 2815 return &tmp 2816 })(o.V2__), 2817 V3__: (func(x *BodyPlaintextUnsupported) *BodyPlaintextUnsupported { 2818 if x == nil { 2819 return nil 2820 } 2821 tmp := (*x).DeepCopy() 2822 return &tmp 2823 })(o.V3__), 2824 V4__: (func(x *BodyPlaintextUnsupported) *BodyPlaintextUnsupported { 2825 if x == nil { 2826 return nil 2827 } 2828 tmp := (*x).DeepCopy() 2829 return &tmp 2830 })(o.V4__), 2831 V5__: (func(x *BodyPlaintextUnsupported) *BodyPlaintextUnsupported { 2832 if x == nil { 2833 return nil 2834 } 2835 tmp := (*x).DeepCopy() 2836 return &tmp 2837 })(o.V5__), 2838 V6__: (func(x *BodyPlaintextUnsupported) *BodyPlaintextUnsupported { 2839 if x == nil { 2840 return nil 2841 } 2842 tmp := (*x).DeepCopy() 2843 return &tmp 2844 })(o.V6__), 2845 V7__: (func(x *BodyPlaintextUnsupported) *BodyPlaintextUnsupported { 2846 if x == nil { 2847 return nil 2848 } 2849 tmp := (*x).DeepCopy() 2850 return &tmp 2851 })(o.V7__), 2852 V8__: (func(x *BodyPlaintextUnsupported) *BodyPlaintextUnsupported { 2853 if x == nil { 2854 return nil 2855 } 2856 tmp := (*x).DeepCopy() 2857 return &tmp 2858 })(o.V8__), 2859 V9__: (func(x *BodyPlaintextUnsupported) *BodyPlaintextUnsupported { 2860 if x == nil { 2861 return nil 2862 } 2863 tmp := (*x).DeepCopy() 2864 return &tmp 2865 })(o.V9__), 2866 V10__: (func(x *BodyPlaintextUnsupported) *BodyPlaintextUnsupported { 2867 if x == nil { 2868 return nil 2869 } 2870 tmp := (*x).DeepCopy() 2871 return &tmp 2872 })(o.V10__), 2873 } 2874} 2875 2876type MessagePlaintext struct { 2877 ClientHeader MessageClientHeader `codec:"clientHeader" json:"clientHeader"` 2878 MessageBody MessageBody `codec:"messageBody" json:"messageBody"` 2879 SupersedesOutboxID *OutboxID `codec:"supersedesOutboxID,omitempty" json:"supersedesOutboxID,omitempty"` 2880 Emojis []HarvestedEmoji `codec:"emojis" json:"emojis"` 2881} 2882 2883func (o MessagePlaintext) DeepCopy() MessagePlaintext { 2884 return MessagePlaintext{ 2885 ClientHeader: o.ClientHeader.DeepCopy(), 2886 MessageBody: o.MessageBody.DeepCopy(), 2887 SupersedesOutboxID: (func(x *OutboxID) *OutboxID { 2888 if x == nil { 2889 return nil 2890 } 2891 tmp := (*x).DeepCopy() 2892 return &tmp 2893 })(o.SupersedesOutboxID), 2894 Emojis: (func(x []HarvestedEmoji) []HarvestedEmoji { 2895 if x == nil { 2896 return nil 2897 } 2898 ret := make([]HarvestedEmoji, len(x)) 2899 for i, v := range x { 2900 vCopy := v.DeepCopy() 2901 ret[i] = vCopy 2902 } 2903 return ret 2904 })(o.Emojis), 2905 } 2906} 2907 2908type MessageUnboxedValid struct { 2909 ClientHeader MessageClientHeaderVerified `codec:"clientHeader" json:"clientHeader"` 2910 ServerHeader MessageServerHeader `codec:"serverHeader" json:"serverHeader"` 2911 MessageBody MessageBody `codec:"messageBody" json:"messageBody"` 2912 SenderUsername string `codec:"senderUsername" json:"senderUsername"` 2913 SenderDeviceName string `codec:"senderDeviceName" json:"senderDeviceName"` 2914 SenderDeviceType keybase1.DeviceTypeV2 `codec:"senderDeviceType" json:"senderDeviceType"` 2915 BodyHash Hash `codec:"bodyHash" json:"bodyHash"` 2916 HeaderHash Hash `codec:"headerHash" json:"headerHash"` 2917 HeaderSignature *SignatureInfo `codec:"headerSignature,omitempty" json:"headerSignature,omitempty"` 2918 VerificationKey *[]byte `codec:"verificationKey,omitempty" json:"verificationKey,omitempty"` 2919 SenderDeviceRevokedAt *gregor1.Time `codec:"senderDeviceRevokedAt,omitempty" json:"senderDeviceRevokedAt,omitempty"` 2920 AtMentionUsernames []string `codec:"atMentionUsernames" json:"atMentionUsernames"` 2921 AtMentions []gregor1.UID `codec:"atMentions" json:"atMentions"` 2922 ChannelMention ChannelMention `codec:"channelMention" json:"channelMention"` 2923 MaybeMentions []MaybeMention `codec:"maybeMentions" json:"maybeMentions"` 2924 ChannelNameMentions []ChannelNameMention `codec:"channelNameMentions" json:"channelNameMentions"` 2925 Reactions ReactionMap `codec:"reactions" json:"reactions"` 2926 Unfurls map[MessageID]UnfurlResult `codec:"unfurls" json:"unfurls"` 2927 Emojis []HarvestedEmoji `codec:"emojis" json:"emojis"` 2928 ReplyTo *MessageUnboxed `codec:"replyTo,omitempty" json:"replyTo,omitempty"` 2929 BotUsername string `codec:"botUsername" json:"botUsername"` 2930} 2931 2932func (o MessageUnboxedValid) DeepCopy() MessageUnboxedValid { 2933 return MessageUnboxedValid{ 2934 ClientHeader: o.ClientHeader.DeepCopy(), 2935 ServerHeader: o.ServerHeader.DeepCopy(), 2936 MessageBody: o.MessageBody.DeepCopy(), 2937 SenderUsername: o.SenderUsername, 2938 SenderDeviceName: o.SenderDeviceName, 2939 SenderDeviceType: o.SenderDeviceType.DeepCopy(), 2940 BodyHash: o.BodyHash.DeepCopy(), 2941 HeaderHash: o.HeaderHash.DeepCopy(), 2942 HeaderSignature: (func(x *SignatureInfo) *SignatureInfo { 2943 if x == nil { 2944 return nil 2945 } 2946 tmp := (*x).DeepCopy() 2947 return &tmp 2948 })(o.HeaderSignature), 2949 VerificationKey: (func(x *[]byte) *[]byte { 2950 if x == nil { 2951 return nil 2952 } 2953 tmp := (func(x []byte) []byte { 2954 if x == nil { 2955 return nil 2956 } 2957 return append([]byte{}, x...) 2958 })((*x)) 2959 return &tmp 2960 })(o.VerificationKey), 2961 SenderDeviceRevokedAt: (func(x *gregor1.Time) *gregor1.Time { 2962 if x == nil { 2963 return nil 2964 } 2965 tmp := (*x).DeepCopy() 2966 return &tmp 2967 })(o.SenderDeviceRevokedAt), 2968 AtMentionUsernames: (func(x []string) []string { 2969 if x == nil { 2970 return nil 2971 } 2972 ret := make([]string, len(x)) 2973 for i, v := range x { 2974 vCopy := v 2975 ret[i] = vCopy 2976 } 2977 return ret 2978 })(o.AtMentionUsernames), 2979 AtMentions: (func(x []gregor1.UID) []gregor1.UID { 2980 if x == nil { 2981 return nil 2982 } 2983 ret := make([]gregor1.UID, len(x)) 2984 for i, v := range x { 2985 vCopy := v.DeepCopy() 2986 ret[i] = vCopy 2987 } 2988 return ret 2989 })(o.AtMentions), 2990 ChannelMention: o.ChannelMention.DeepCopy(), 2991 MaybeMentions: (func(x []MaybeMention) []MaybeMention { 2992 if x == nil { 2993 return nil 2994 } 2995 ret := make([]MaybeMention, len(x)) 2996 for i, v := range x { 2997 vCopy := v.DeepCopy() 2998 ret[i] = vCopy 2999 } 3000 return ret 3001 })(o.MaybeMentions), 3002 ChannelNameMentions: (func(x []ChannelNameMention) []ChannelNameMention { 3003 if x == nil { 3004 return nil 3005 } 3006 ret := make([]ChannelNameMention, len(x)) 3007 for i, v := range x { 3008 vCopy := v.DeepCopy() 3009 ret[i] = vCopy 3010 } 3011 return ret 3012 })(o.ChannelNameMentions), 3013 Reactions: o.Reactions.DeepCopy(), 3014 Unfurls: (func(x map[MessageID]UnfurlResult) map[MessageID]UnfurlResult { 3015 if x == nil { 3016 return nil 3017 } 3018 ret := make(map[MessageID]UnfurlResult, len(x)) 3019 for k, v := range x { 3020 kCopy := k.DeepCopy() 3021 vCopy := v.DeepCopy() 3022 ret[kCopy] = vCopy 3023 } 3024 return ret 3025 })(o.Unfurls), 3026 Emojis: (func(x []HarvestedEmoji) []HarvestedEmoji { 3027 if x == nil { 3028 return nil 3029 } 3030 ret := make([]HarvestedEmoji, len(x)) 3031 for i, v := range x { 3032 vCopy := v.DeepCopy() 3033 ret[i] = vCopy 3034 } 3035 return ret 3036 })(o.Emojis), 3037 ReplyTo: (func(x *MessageUnboxed) *MessageUnboxed { 3038 if x == nil { 3039 return nil 3040 } 3041 tmp := (*x).DeepCopy() 3042 return &tmp 3043 })(o.ReplyTo), 3044 BotUsername: o.BotUsername, 3045 } 3046} 3047 3048type MessageUnboxedErrorType int 3049 3050const ( 3051 MessageUnboxedErrorType_MISC MessageUnboxedErrorType = 0 3052 MessageUnboxedErrorType_BADVERSION_CRITICAL MessageUnboxedErrorType = 1 3053 MessageUnboxedErrorType_BADVERSION MessageUnboxedErrorType = 2 3054 MessageUnboxedErrorType_IDENTIFY MessageUnboxedErrorType = 3 3055 MessageUnboxedErrorType_EPHEMERAL MessageUnboxedErrorType = 4 3056 MessageUnboxedErrorType_PAIRWISE_MISSING MessageUnboxedErrorType = 5 3057) 3058 3059func (o MessageUnboxedErrorType) DeepCopy() MessageUnboxedErrorType { return o } 3060 3061var MessageUnboxedErrorTypeMap = map[string]MessageUnboxedErrorType{ 3062 "MISC": 0, 3063 "BADVERSION_CRITICAL": 1, 3064 "BADVERSION": 2, 3065 "IDENTIFY": 3, 3066 "EPHEMERAL": 4, 3067 "PAIRWISE_MISSING": 5, 3068} 3069 3070var MessageUnboxedErrorTypeRevMap = map[MessageUnboxedErrorType]string{ 3071 0: "MISC", 3072 1: "BADVERSION_CRITICAL", 3073 2: "BADVERSION", 3074 3: "IDENTIFY", 3075 4: "EPHEMERAL", 3076 5: "PAIRWISE_MISSING", 3077} 3078 3079func (e MessageUnboxedErrorType) String() string { 3080 if v, ok := MessageUnboxedErrorTypeRevMap[e]; ok { 3081 return v 3082 } 3083 return fmt.Sprintf("%v", int(e)) 3084} 3085 3086type MessageUnboxedError struct { 3087 ErrType MessageUnboxedErrorType `codec:"errType" json:"errType"` 3088 ErrMsg string `codec:"errMsg" json:"errMsg"` 3089 InternalErrMsg string `codec:"internalErrMsg" json:"internalErrMsg"` 3090 VersionKind VersionKind `codec:"versionKind" json:"versionKind"` 3091 VersionNumber int `codec:"versionNumber" json:"versionNumber"` 3092 IsCritical bool `codec:"isCritical" json:"isCritical"` 3093 SenderUsername string `codec:"senderUsername" json:"senderUsername"` 3094 SenderDeviceName string `codec:"senderDeviceName" json:"senderDeviceName"` 3095 SenderDeviceType keybase1.DeviceTypeV2 `codec:"senderDeviceType" json:"senderDeviceType"` 3096 MessageID MessageID `codec:"messageID" json:"messageID"` 3097 MessageType MessageType `codec:"messageType" json:"messageType"` 3098 Ctime gregor1.Time `codec:"ctime" json:"ctime"` 3099 IsEphemeral bool `codec:"isEphemeral" json:"isEphemeral"` 3100 ExplodedBy *string `codec:"explodedBy,omitempty" json:"explodedBy,omitempty"` 3101 Etime gregor1.Time `codec:"etime" json:"etime"` 3102 BotUsername string `codec:"botUsername" json:"botUsername"` 3103} 3104 3105func (o MessageUnboxedError) DeepCopy() MessageUnboxedError { 3106 return MessageUnboxedError{ 3107 ErrType: o.ErrType.DeepCopy(), 3108 ErrMsg: o.ErrMsg, 3109 InternalErrMsg: o.InternalErrMsg, 3110 VersionKind: o.VersionKind.DeepCopy(), 3111 VersionNumber: o.VersionNumber, 3112 IsCritical: o.IsCritical, 3113 SenderUsername: o.SenderUsername, 3114 SenderDeviceName: o.SenderDeviceName, 3115 SenderDeviceType: o.SenderDeviceType.DeepCopy(), 3116 MessageID: o.MessageID.DeepCopy(), 3117 MessageType: o.MessageType.DeepCopy(), 3118 Ctime: o.Ctime.DeepCopy(), 3119 IsEphemeral: o.IsEphemeral, 3120 ExplodedBy: (func(x *string) *string { 3121 if x == nil { 3122 return nil 3123 } 3124 tmp := (*x) 3125 return &tmp 3126 })(o.ExplodedBy), 3127 Etime: o.Etime.DeepCopy(), 3128 BotUsername: o.BotUsername, 3129 } 3130} 3131 3132type MessageUnboxedPlaceholder struct { 3133 MessageID MessageID `codec:"messageID" json:"messageID"` 3134 Hidden bool `codec:"hidden" json:"hidden"` 3135} 3136 3137func (o MessageUnboxedPlaceholder) DeepCopy() MessageUnboxedPlaceholder { 3138 return MessageUnboxedPlaceholder{ 3139 MessageID: o.MessageID.DeepCopy(), 3140 Hidden: o.Hidden, 3141 } 3142} 3143 3144type JourneycardType int 3145 3146const ( 3147 JourneycardType_WELCOME JourneycardType = 0 3148 JourneycardType_POPULAR_CHANNELS JourneycardType = 1 3149 JourneycardType_ADD_PEOPLE JourneycardType = 2 3150 JourneycardType_CREATE_CHANNELS JourneycardType = 3 3151 JourneycardType_MSG_ATTENTION JourneycardType = 4 3152 JourneycardType_UNUSED JourneycardType = 5 3153 JourneycardType_CHANNEL_INACTIVE JourneycardType = 6 3154 JourneycardType_MSG_NO_ANSWER JourneycardType = 7 3155) 3156 3157func (o JourneycardType) DeepCopy() JourneycardType { return o } 3158 3159var JourneycardTypeMap = map[string]JourneycardType{ 3160 "WELCOME": 0, 3161 "POPULAR_CHANNELS": 1, 3162 "ADD_PEOPLE": 2, 3163 "CREATE_CHANNELS": 3, 3164 "MSG_ATTENTION": 4, 3165 "UNUSED": 5, 3166 "CHANNEL_INACTIVE": 6, 3167 "MSG_NO_ANSWER": 7, 3168} 3169 3170var JourneycardTypeRevMap = map[JourneycardType]string{ 3171 0: "WELCOME", 3172 1: "POPULAR_CHANNELS", 3173 2: "ADD_PEOPLE", 3174 3: "CREATE_CHANNELS", 3175 4: "MSG_ATTENTION", 3176 5: "UNUSED", 3177 6: "CHANNEL_INACTIVE", 3178 7: "MSG_NO_ANSWER", 3179} 3180 3181func (e JourneycardType) String() string { 3182 if v, ok := JourneycardTypeRevMap[e]; ok { 3183 return v 3184 } 3185 return fmt.Sprintf("%v", int(e)) 3186} 3187 3188type MessageUnboxedJourneycard struct { 3189 PrevID MessageID `codec:"prevID" json:"prevID"` 3190 Ordinal int `codec:"ordinal" json:"ordinal"` 3191 CardType JourneycardType `codec:"cardType" json:"cardType"` 3192 HighlightMsgID MessageID `codec:"highlightMsgID" json:"highlightMsgID"` 3193 OpenTeam bool `codec:"openTeam" json:"openTeam"` 3194} 3195 3196func (o MessageUnboxedJourneycard) DeepCopy() MessageUnboxedJourneycard { 3197 return MessageUnboxedJourneycard{ 3198 PrevID: o.PrevID.DeepCopy(), 3199 Ordinal: o.Ordinal, 3200 CardType: o.CardType.DeepCopy(), 3201 HighlightMsgID: o.HighlightMsgID.DeepCopy(), 3202 OpenTeam: o.OpenTeam, 3203 } 3204} 3205 3206type MessageUnboxed struct { 3207 State__ MessageUnboxedState `codec:"state" json:"state"` 3208 Valid__ *MessageUnboxedValid `codec:"valid,omitempty" json:"valid,omitempty"` 3209 Error__ *MessageUnboxedError `codec:"error,omitempty" json:"error,omitempty"` 3210 Outbox__ *OutboxRecord `codec:"outbox,omitempty" json:"outbox,omitempty"` 3211 Placeholder__ *MessageUnboxedPlaceholder `codec:"placeholder,omitempty" json:"placeholder,omitempty"` 3212 Journeycard__ *MessageUnboxedJourneycard `codec:"journeycard,omitempty" json:"journeycard,omitempty"` 3213} 3214 3215func (o *MessageUnboxed) State() (ret MessageUnboxedState, err error) { 3216 switch o.State__ { 3217 case MessageUnboxedState_VALID: 3218 if o.Valid__ == nil { 3219 err = errors.New("unexpected nil value for Valid__") 3220 return ret, err 3221 } 3222 case MessageUnboxedState_ERROR: 3223 if o.Error__ == nil { 3224 err = errors.New("unexpected nil value for Error__") 3225 return ret, err 3226 } 3227 case MessageUnboxedState_OUTBOX: 3228 if o.Outbox__ == nil { 3229 err = errors.New("unexpected nil value for Outbox__") 3230 return ret, err 3231 } 3232 case MessageUnboxedState_PLACEHOLDER: 3233 if o.Placeholder__ == nil { 3234 err = errors.New("unexpected nil value for Placeholder__") 3235 return ret, err 3236 } 3237 case MessageUnboxedState_JOURNEYCARD: 3238 if o.Journeycard__ == nil { 3239 err = errors.New("unexpected nil value for Journeycard__") 3240 return ret, err 3241 } 3242 } 3243 return o.State__, nil 3244} 3245 3246func (o MessageUnboxed) Valid() (res MessageUnboxedValid) { 3247 if o.State__ != MessageUnboxedState_VALID { 3248 panic("wrong case accessed") 3249 } 3250 if o.Valid__ == nil { 3251 return 3252 } 3253 return *o.Valid__ 3254} 3255 3256func (o MessageUnboxed) Error() (res MessageUnboxedError) { 3257 if o.State__ != MessageUnboxedState_ERROR { 3258 panic("wrong case accessed") 3259 } 3260 if o.Error__ == nil { 3261 return 3262 } 3263 return *o.Error__ 3264} 3265 3266func (o MessageUnboxed) Outbox() (res OutboxRecord) { 3267 if o.State__ != MessageUnboxedState_OUTBOX { 3268 panic("wrong case accessed") 3269 } 3270 if o.Outbox__ == nil { 3271 return 3272 } 3273 return *o.Outbox__ 3274} 3275 3276func (o MessageUnboxed) Placeholder() (res MessageUnboxedPlaceholder) { 3277 if o.State__ != MessageUnboxedState_PLACEHOLDER { 3278 panic("wrong case accessed") 3279 } 3280 if o.Placeholder__ == nil { 3281 return 3282 } 3283 return *o.Placeholder__ 3284} 3285 3286func (o MessageUnboxed) Journeycard() (res MessageUnboxedJourneycard) { 3287 if o.State__ != MessageUnboxedState_JOURNEYCARD { 3288 panic("wrong case accessed") 3289 } 3290 if o.Journeycard__ == nil { 3291 return 3292 } 3293 return *o.Journeycard__ 3294} 3295 3296func NewMessageUnboxedWithValid(v MessageUnboxedValid) MessageUnboxed { 3297 return MessageUnboxed{ 3298 State__: MessageUnboxedState_VALID, 3299 Valid__: &v, 3300 } 3301} 3302 3303func NewMessageUnboxedWithError(v MessageUnboxedError) MessageUnboxed { 3304 return MessageUnboxed{ 3305 State__: MessageUnboxedState_ERROR, 3306 Error__: &v, 3307 } 3308} 3309 3310func NewMessageUnboxedWithOutbox(v OutboxRecord) MessageUnboxed { 3311 return MessageUnboxed{ 3312 State__: MessageUnboxedState_OUTBOX, 3313 Outbox__: &v, 3314 } 3315} 3316 3317func NewMessageUnboxedWithPlaceholder(v MessageUnboxedPlaceholder) MessageUnboxed { 3318 return MessageUnboxed{ 3319 State__: MessageUnboxedState_PLACEHOLDER, 3320 Placeholder__: &v, 3321 } 3322} 3323 3324func NewMessageUnboxedWithJourneycard(v MessageUnboxedJourneycard) MessageUnboxed { 3325 return MessageUnboxed{ 3326 State__: MessageUnboxedState_JOURNEYCARD, 3327 Journeycard__: &v, 3328 } 3329} 3330 3331func (o MessageUnboxed) DeepCopy() MessageUnboxed { 3332 return MessageUnboxed{ 3333 State__: o.State__.DeepCopy(), 3334 Valid__: (func(x *MessageUnboxedValid) *MessageUnboxedValid { 3335 if x == nil { 3336 return nil 3337 } 3338 tmp := (*x).DeepCopy() 3339 return &tmp 3340 })(o.Valid__), 3341 Error__: (func(x *MessageUnboxedError) *MessageUnboxedError { 3342 if x == nil { 3343 return nil 3344 } 3345 tmp := (*x).DeepCopy() 3346 return &tmp 3347 })(o.Error__), 3348 Outbox__: (func(x *OutboxRecord) *OutboxRecord { 3349 if x == nil { 3350 return nil 3351 } 3352 tmp := (*x).DeepCopy() 3353 return &tmp 3354 })(o.Outbox__), 3355 Placeholder__: (func(x *MessageUnboxedPlaceholder) *MessageUnboxedPlaceholder { 3356 if x == nil { 3357 return nil 3358 } 3359 tmp := (*x).DeepCopy() 3360 return &tmp 3361 })(o.Placeholder__), 3362 Journeycard__: (func(x *MessageUnboxedJourneycard) *MessageUnboxedJourneycard { 3363 if x == nil { 3364 return nil 3365 } 3366 tmp := (*x).DeepCopy() 3367 return &tmp 3368 })(o.Journeycard__), 3369 } 3370} 3371 3372type UnreadFirstNumLimit struct { 3373 NumRead int `codec:"NumRead" json:"NumRead"` 3374 AtLeast int `codec:"AtLeast" json:"AtLeast"` 3375 AtMost int `codec:"AtMost" json:"AtMost"` 3376} 3377 3378func (o UnreadFirstNumLimit) DeepCopy() UnreadFirstNumLimit { 3379 return UnreadFirstNumLimit{ 3380 NumRead: o.NumRead, 3381 AtLeast: o.AtLeast, 3382 AtMost: o.AtMost, 3383 } 3384} 3385 3386type ConversationLocalParticipant struct { 3387 Username string `codec:"username" json:"username"` 3388 InConvName bool `codec:"inConvName" json:"inConvName"` 3389 Fullname *string `codec:"fullname,omitempty" json:"fullname,omitempty"` 3390 ContactName *string `codec:"contactName,omitempty" json:"contactName,omitempty"` 3391} 3392 3393func (o ConversationLocalParticipant) DeepCopy() ConversationLocalParticipant { 3394 return ConversationLocalParticipant{ 3395 Username: o.Username, 3396 InConvName: o.InConvName, 3397 Fullname: (func(x *string) *string { 3398 if x == nil { 3399 return nil 3400 } 3401 tmp := (*x) 3402 return &tmp 3403 })(o.Fullname), 3404 ContactName: (func(x *string) *string { 3405 if x == nil { 3406 return nil 3407 } 3408 tmp := (*x) 3409 return &tmp 3410 })(o.ContactName), 3411 } 3412} 3413 3414type ConversationPinnedMessage struct { 3415 Message MessageUnboxed `codec:"message" json:"message"` 3416 PinnerUsername string `codec:"pinnerUsername" json:"pinnerUsername"` 3417} 3418 3419func (o ConversationPinnedMessage) DeepCopy() ConversationPinnedMessage { 3420 return ConversationPinnedMessage{ 3421 Message: o.Message.DeepCopy(), 3422 PinnerUsername: o.PinnerUsername, 3423 } 3424} 3425 3426type ConversationInfoLocal struct { 3427 Id ConversationID `codec:"id" json:"id"` 3428 Triple ConversationIDTriple `codec:"triple" json:"triple"` 3429 TlfName string `codec:"tlfName" json:"tlfName"` 3430 TopicName string `codec:"topicName" json:"topicName"` 3431 Headline string `codec:"headline" json:"headline"` 3432 HeadlineEmojis []HarvestedEmoji `codec:"headlineEmojis" json:"headlineEmojis"` 3433 SnippetMsg *MessageUnboxed `codec:"snippetMsg,omitempty" json:"snippetMsg,omitempty"` 3434 PinnedMsg *ConversationPinnedMessage `codec:"pinnedMsg,omitempty" json:"pinnedMsg,omitempty"` 3435 Draft *string `codec:"draft,omitempty" json:"draft,omitempty"` 3436 Visibility keybase1.TLFVisibility `codec:"visibility" json:"visibility"` 3437 IsDefaultConv bool `codec:"isDefaultConv" json:"isDefaultConv"` 3438 Status ConversationStatus `codec:"status" json:"status"` 3439 MembersType ConversationMembersType `codec:"membersType" json:"membersType"` 3440 MemberStatus ConversationMemberStatus `codec:"memberStatus" json:"memberStatus"` 3441 TeamType TeamType `codec:"teamType" json:"teamType"` 3442 Existence ConversationExistence `codec:"existence" json:"existence"` 3443 Version ConversationVers `codec:"version" json:"version"` 3444 LocalVersion LocalConversationVers `codec:"localVersion" json:"localVersion"` 3445 Participants []ConversationLocalParticipant `codec:"participants" json:"participants"` 3446 FinalizeInfo *ConversationFinalizeInfo `codec:"finalizeInfo,omitempty" json:"finalizeInfo,omitempty"` 3447 ResetNames []string `codec:"resetNames" json:"resetNames"` 3448} 3449 3450func (o ConversationInfoLocal) DeepCopy() ConversationInfoLocal { 3451 return ConversationInfoLocal{ 3452 Id: o.Id.DeepCopy(), 3453 Triple: o.Triple.DeepCopy(), 3454 TlfName: o.TlfName, 3455 TopicName: o.TopicName, 3456 Headline: o.Headline, 3457 HeadlineEmojis: (func(x []HarvestedEmoji) []HarvestedEmoji { 3458 if x == nil { 3459 return nil 3460 } 3461 ret := make([]HarvestedEmoji, len(x)) 3462 for i, v := range x { 3463 vCopy := v.DeepCopy() 3464 ret[i] = vCopy 3465 } 3466 return ret 3467 })(o.HeadlineEmojis), 3468 SnippetMsg: (func(x *MessageUnboxed) *MessageUnboxed { 3469 if x == nil { 3470 return nil 3471 } 3472 tmp := (*x).DeepCopy() 3473 return &tmp 3474 })(o.SnippetMsg), 3475 PinnedMsg: (func(x *ConversationPinnedMessage) *ConversationPinnedMessage { 3476 if x == nil { 3477 return nil 3478 } 3479 tmp := (*x).DeepCopy() 3480 return &tmp 3481 })(o.PinnedMsg), 3482 Draft: (func(x *string) *string { 3483 if x == nil { 3484 return nil 3485 } 3486 tmp := (*x) 3487 return &tmp 3488 })(o.Draft), 3489 Visibility: o.Visibility.DeepCopy(), 3490 IsDefaultConv: o.IsDefaultConv, 3491 Status: o.Status.DeepCopy(), 3492 MembersType: o.MembersType.DeepCopy(), 3493 MemberStatus: o.MemberStatus.DeepCopy(), 3494 TeamType: o.TeamType.DeepCopy(), 3495 Existence: o.Existence.DeepCopy(), 3496 Version: o.Version.DeepCopy(), 3497 LocalVersion: o.LocalVersion.DeepCopy(), 3498 Participants: (func(x []ConversationLocalParticipant) []ConversationLocalParticipant { 3499 if x == nil { 3500 return nil 3501 } 3502 ret := make([]ConversationLocalParticipant, len(x)) 3503 for i, v := range x { 3504 vCopy := v.DeepCopy() 3505 ret[i] = vCopy 3506 } 3507 return ret 3508 })(o.Participants), 3509 FinalizeInfo: (func(x *ConversationFinalizeInfo) *ConversationFinalizeInfo { 3510 if x == nil { 3511 return nil 3512 } 3513 tmp := (*x).DeepCopy() 3514 return &tmp 3515 })(o.FinalizeInfo), 3516 ResetNames: (func(x []string) []string { 3517 if x == nil { 3518 return nil 3519 } 3520 ret := make([]string, len(x)) 3521 for i, v := range x { 3522 vCopy := v 3523 ret[i] = vCopy 3524 } 3525 return ret 3526 })(o.ResetNames), 3527 } 3528} 3529 3530type ConversationErrorType int 3531 3532const ( 3533 ConversationErrorType_PERMANENT ConversationErrorType = 0 3534 ConversationErrorType_MISSINGINFO ConversationErrorType = 1 3535 ConversationErrorType_SELFREKEYNEEDED ConversationErrorType = 2 3536 ConversationErrorType_OTHERREKEYNEEDED ConversationErrorType = 3 3537 ConversationErrorType_IDENTIFY ConversationErrorType = 4 3538 ConversationErrorType_TRANSIENT ConversationErrorType = 5 3539 ConversationErrorType_NONE ConversationErrorType = 6 3540) 3541 3542func (o ConversationErrorType) DeepCopy() ConversationErrorType { return o } 3543 3544var ConversationErrorTypeMap = map[string]ConversationErrorType{ 3545 "PERMANENT": 0, 3546 "MISSINGINFO": 1, 3547 "SELFREKEYNEEDED": 2, 3548 "OTHERREKEYNEEDED": 3, 3549 "IDENTIFY": 4, 3550 "TRANSIENT": 5, 3551 "NONE": 6, 3552} 3553 3554var ConversationErrorTypeRevMap = map[ConversationErrorType]string{ 3555 0: "PERMANENT", 3556 1: "MISSINGINFO", 3557 2: "SELFREKEYNEEDED", 3558 3: "OTHERREKEYNEEDED", 3559 4: "IDENTIFY", 3560 5: "TRANSIENT", 3561 6: "NONE", 3562} 3563 3564func (e ConversationErrorType) String() string { 3565 if v, ok := ConversationErrorTypeRevMap[e]; ok { 3566 return v 3567 } 3568 return fmt.Sprintf("%v", int(e)) 3569} 3570 3571type ConversationErrorLocal struct { 3572 Typ ConversationErrorType `codec:"typ" json:"typ"` 3573 Message string `codec:"message" json:"message"` 3574 RemoteConv Conversation `codec:"remoteConv" json:"remoteConv"` 3575 UnverifiedTLFName string `codec:"unverifiedTLFName" json:"unverifiedTLFName"` 3576 RekeyInfo *ConversationErrorRekey `codec:"rekeyInfo,omitempty" json:"rekeyInfo,omitempty"` 3577} 3578 3579func (o ConversationErrorLocal) DeepCopy() ConversationErrorLocal { 3580 return ConversationErrorLocal{ 3581 Typ: o.Typ.DeepCopy(), 3582 Message: o.Message, 3583 RemoteConv: o.RemoteConv.DeepCopy(), 3584 UnverifiedTLFName: o.UnverifiedTLFName, 3585 RekeyInfo: (func(x *ConversationErrorRekey) *ConversationErrorRekey { 3586 if x == nil { 3587 return nil 3588 } 3589 tmp := (*x).DeepCopy() 3590 return &tmp 3591 })(o.RekeyInfo), 3592 } 3593} 3594 3595type ConversationErrorRekey struct { 3596 TlfName string `codec:"tlfName" json:"tlfName"` 3597 TlfPublic bool `codec:"tlfPublic" json:"tlfPublic"` 3598 Rekeyers []string `codec:"rekeyers" json:"rekeyers"` 3599 WriterNames []string `codec:"writerNames" json:"writerNames"` 3600 ReaderNames []string `codec:"readerNames" json:"readerNames"` 3601} 3602 3603func (o ConversationErrorRekey) DeepCopy() ConversationErrorRekey { 3604 return ConversationErrorRekey{ 3605 TlfName: o.TlfName, 3606 TlfPublic: o.TlfPublic, 3607 Rekeyers: (func(x []string) []string { 3608 if x == nil { 3609 return nil 3610 } 3611 ret := make([]string, len(x)) 3612 for i, v := range x { 3613 vCopy := v 3614 ret[i] = vCopy 3615 } 3616 return ret 3617 })(o.Rekeyers), 3618 WriterNames: (func(x []string) []string { 3619 if x == nil { 3620 return nil 3621 } 3622 ret := make([]string, len(x)) 3623 for i, v := range x { 3624 vCopy := v 3625 ret[i] = vCopy 3626 } 3627 return ret 3628 })(o.WriterNames), 3629 ReaderNames: (func(x []string) []string { 3630 if x == nil { 3631 return nil 3632 } 3633 ret := make([]string, len(x)) 3634 for i, v := range x { 3635 vCopy := v 3636 ret[i] = vCopy 3637 } 3638 return ret 3639 })(o.ReaderNames), 3640 } 3641} 3642 3643type ConversationMinWriterRoleInfoLocal struct { 3644 ChangedBy string `codec:"changedBy" json:"changedBy"` 3645 CannotWrite bool `codec:"cannotWrite" json:"cannotWrite"` 3646 Role keybase1.TeamRole `codec:"role" json:"role"` 3647} 3648 3649func (o ConversationMinWriterRoleInfoLocal) DeepCopy() ConversationMinWriterRoleInfoLocal { 3650 return ConversationMinWriterRoleInfoLocal{ 3651 ChangedBy: o.ChangedBy, 3652 CannotWrite: o.CannotWrite, 3653 Role: o.Role.DeepCopy(), 3654 } 3655} 3656 3657type ConversationSettingsLocal struct { 3658 MinWriterRoleInfo *ConversationMinWriterRoleInfoLocal `codec:"minWriterRoleInfo,omitempty" json:"minWriterRoleInfo,omitempty"` 3659} 3660 3661func (o ConversationSettingsLocal) DeepCopy() ConversationSettingsLocal { 3662 return ConversationSettingsLocal{ 3663 MinWriterRoleInfo: (func(x *ConversationMinWriterRoleInfoLocal) *ConversationMinWriterRoleInfoLocal { 3664 if x == nil { 3665 return nil 3666 } 3667 tmp := (*x).DeepCopy() 3668 return &tmp 3669 })(o.MinWriterRoleInfo), 3670 } 3671} 3672 3673type ConversationLocal struct { 3674 Error *ConversationErrorLocal `codec:"error,omitempty" json:"error,omitempty"` 3675 Info ConversationInfoLocal `codec:"info" json:"info"` 3676 ReaderInfo ConversationReaderInfo `codec:"readerInfo" json:"readerInfo"` 3677 CreatorInfo *ConversationCreatorInfoLocal `codec:"creatorInfo,omitempty" json:"creatorInfo,omitempty"` 3678 Notifications *ConversationNotificationInfo `codec:"notifications,omitempty" json:"notifications,omitempty"` 3679 Supersedes []ConversationMetadata `codec:"supersedes" json:"supersedes"` 3680 SupersededBy []ConversationMetadata `codec:"supersededBy" json:"supersededBy"` 3681 MaxMessages []MessageSummary `codec:"maxMessages" json:"maxMessages"` 3682 IsEmpty bool `codec:"isEmpty" json:"isEmpty"` 3683 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 3684 Expunge Expunge `codec:"expunge" json:"expunge"` 3685 ConvRetention *RetentionPolicy `codec:"convRetention,omitempty" json:"convRetention,omitempty"` 3686 TeamRetention *RetentionPolicy `codec:"teamRetention,omitempty" json:"teamRetention,omitempty"` 3687 ConvSettings *ConversationSettingsLocal `codec:"convSettings,omitempty" json:"convSettings,omitempty"` 3688 Commands ConversationCommandGroups `codec:"commands" json:"commands"` 3689 BotCommands ConversationCommandGroups `codec:"botCommands" json:"botCommands"` 3690 BotAliases map[string]string `codec:"botAliases" json:"botAliases"` 3691} 3692 3693func (o ConversationLocal) DeepCopy() ConversationLocal { 3694 return ConversationLocal{ 3695 Error: (func(x *ConversationErrorLocal) *ConversationErrorLocal { 3696 if x == nil { 3697 return nil 3698 } 3699 tmp := (*x).DeepCopy() 3700 return &tmp 3701 })(o.Error), 3702 Info: o.Info.DeepCopy(), 3703 ReaderInfo: o.ReaderInfo.DeepCopy(), 3704 CreatorInfo: (func(x *ConversationCreatorInfoLocal) *ConversationCreatorInfoLocal { 3705 if x == nil { 3706 return nil 3707 } 3708 tmp := (*x).DeepCopy() 3709 return &tmp 3710 })(o.CreatorInfo), 3711 Notifications: (func(x *ConversationNotificationInfo) *ConversationNotificationInfo { 3712 if x == nil { 3713 return nil 3714 } 3715 tmp := (*x).DeepCopy() 3716 return &tmp 3717 })(o.Notifications), 3718 Supersedes: (func(x []ConversationMetadata) []ConversationMetadata { 3719 if x == nil { 3720 return nil 3721 } 3722 ret := make([]ConversationMetadata, len(x)) 3723 for i, v := range x { 3724 vCopy := v.DeepCopy() 3725 ret[i] = vCopy 3726 } 3727 return ret 3728 })(o.Supersedes), 3729 SupersededBy: (func(x []ConversationMetadata) []ConversationMetadata { 3730 if x == nil { 3731 return nil 3732 } 3733 ret := make([]ConversationMetadata, len(x)) 3734 for i, v := range x { 3735 vCopy := v.DeepCopy() 3736 ret[i] = vCopy 3737 } 3738 return ret 3739 })(o.SupersededBy), 3740 MaxMessages: (func(x []MessageSummary) []MessageSummary { 3741 if x == nil { 3742 return nil 3743 } 3744 ret := make([]MessageSummary, len(x)) 3745 for i, v := range x { 3746 vCopy := v.DeepCopy() 3747 ret[i] = vCopy 3748 } 3749 return ret 3750 })(o.MaxMessages), 3751 IsEmpty: o.IsEmpty, 3752 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 3753 if x == nil { 3754 return nil 3755 } 3756 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 3757 for i, v := range x { 3758 vCopy := v.DeepCopy() 3759 ret[i] = vCopy 3760 } 3761 return ret 3762 })(o.IdentifyFailures), 3763 Expunge: o.Expunge.DeepCopy(), 3764 ConvRetention: (func(x *RetentionPolicy) *RetentionPolicy { 3765 if x == nil { 3766 return nil 3767 } 3768 tmp := (*x).DeepCopy() 3769 return &tmp 3770 })(o.ConvRetention), 3771 TeamRetention: (func(x *RetentionPolicy) *RetentionPolicy { 3772 if x == nil { 3773 return nil 3774 } 3775 tmp := (*x).DeepCopy() 3776 return &tmp 3777 })(o.TeamRetention), 3778 ConvSettings: (func(x *ConversationSettingsLocal) *ConversationSettingsLocal { 3779 if x == nil { 3780 return nil 3781 } 3782 tmp := (*x).DeepCopy() 3783 return &tmp 3784 })(o.ConvSettings), 3785 Commands: o.Commands.DeepCopy(), 3786 BotCommands: o.BotCommands.DeepCopy(), 3787 BotAliases: (func(x map[string]string) map[string]string { 3788 if x == nil { 3789 return nil 3790 } 3791 ret := make(map[string]string, len(x)) 3792 for k, v := range x { 3793 kCopy := k 3794 vCopy := v 3795 ret[kCopy] = vCopy 3796 } 3797 return ret 3798 })(o.BotAliases), 3799 } 3800} 3801 3802type NonblockFetchRes struct { 3803 Offline bool `codec:"offline" json:"offline"` 3804 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 3805 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 3806} 3807 3808func (o NonblockFetchRes) DeepCopy() NonblockFetchRes { 3809 return NonblockFetchRes{ 3810 Offline: o.Offline, 3811 RateLimits: (func(x []RateLimit) []RateLimit { 3812 if x == nil { 3813 return nil 3814 } 3815 ret := make([]RateLimit, len(x)) 3816 for i, v := range x { 3817 vCopy := v.DeepCopy() 3818 ret[i] = vCopy 3819 } 3820 return ret 3821 })(o.RateLimits), 3822 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 3823 if x == nil { 3824 return nil 3825 } 3826 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 3827 for i, v := range x { 3828 vCopy := v.DeepCopy() 3829 ret[i] = vCopy 3830 } 3831 return ret 3832 })(o.IdentifyFailures), 3833 } 3834} 3835 3836type ThreadView struct { 3837 Messages []MessageUnboxed `codec:"messages" json:"messages"` 3838 Pagination *Pagination `codec:"pagination,omitempty" json:"pagination,omitempty"` 3839} 3840 3841func (o ThreadView) DeepCopy() ThreadView { 3842 return ThreadView{ 3843 Messages: (func(x []MessageUnboxed) []MessageUnboxed { 3844 if x == nil { 3845 return nil 3846 } 3847 ret := make([]MessageUnboxed, len(x)) 3848 for i, v := range x { 3849 vCopy := v.DeepCopy() 3850 ret[i] = vCopy 3851 } 3852 return ret 3853 })(o.Messages), 3854 Pagination: (func(x *Pagination) *Pagination { 3855 if x == nil { 3856 return nil 3857 } 3858 tmp := (*x).DeepCopy() 3859 return &tmp 3860 })(o.Pagination), 3861 } 3862} 3863 3864type MessageIDControlMode int 3865 3866const ( 3867 MessageIDControlMode_OLDERMESSAGES MessageIDControlMode = 0 3868 MessageIDControlMode_NEWERMESSAGES MessageIDControlMode = 1 3869 MessageIDControlMode_CENTERED MessageIDControlMode = 2 3870 MessageIDControlMode_UNREADLINE MessageIDControlMode = 3 3871) 3872 3873func (o MessageIDControlMode) DeepCopy() MessageIDControlMode { return o } 3874 3875var MessageIDControlModeMap = map[string]MessageIDControlMode{ 3876 "OLDERMESSAGES": 0, 3877 "NEWERMESSAGES": 1, 3878 "CENTERED": 2, 3879 "UNREADLINE": 3, 3880} 3881 3882var MessageIDControlModeRevMap = map[MessageIDControlMode]string{ 3883 0: "OLDERMESSAGES", 3884 1: "NEWERMESSAGES", 3885 2: "CENTERED", 3886 3: "UNREADLINE", 3887} 3888 3889func (e MessageIDControlMode) String() string { 3890 if v, ok := MessageIDControlModeRevMap[e]; ok { 3891 return v 3892 } 3893 return fmt.Sprintf("%v", int(e)) 3894} 3895 3896type MessageIDControl struct { 3897 Pivot *MessageID `codec:"pivot,omitempty" json:"pivot,omitempty"` 3898 Mode MessageIDControlMode `codec:"mode" json:"mode"` 3899 Num int `codec:"num" json:"num"` 3900} 3901 3902func (o MessageIDControl) DeepCopy() MessageIDControl { 3903 return MessageIDControl{ 3904 Pivot: (func(x *MessageID) *MessageID { 3905 if x == nil { 3906 return nil 3907 } 3908 tmp := (*x).DeepCopy() 3909 return &tmp 3910 })(o.Pivot), 3911 Mode: o.Mode.DeepCopy(), 3912 Num: o.Num, 3913 } 3914} 3915 3916type GetThreadQuery struct { 3917 MarkAsRead bool `codec:"markAsRead" json:"markAsRead"` 3918 MessageTypes []MessageType `codec:"messageTypes" json:"messageTypes"` 3919 DisableResolveSupersedes bool `codec:"disableResolveSupersedes" json:"disableResolveSupersedes"` 3920 EnableDeletePlaceholders bool `codec:"enableDeletePlaceholders" json:"enableDeletePlaceholders"` 3921 DisablePostProcessThread bool `codec:"disablePostProcessThread" json:"disablePostProcessThread"` 3922 Before *gregor1.Time `codec:"before,omitempty" json:"before,omitempty"` 3923 After *gregor1.Time `codec:"after,omitempty" json:"after,omitempty"` 3924 MessageIDControl *MessageIDControl `codec:"messageIDControl,omitempty" json:"messageIDControl,omitempty"` 3925} 3926 3927func (o GetThreadQuery) DeepCopy() GetThreadQuery { 3928 return GetThreadQuery{ 3929 MarkAsRead: o.MarkAsRead, 3930 MessageTypes: (func(x []MessageType) []MessageType { 3931 if x == nil { 3932 return nil 3933 } 3934 ret := make([]MessageType, len(x)) 3935 for i, v := range x { 3936 vCopy := v.DeepCopy() 3937 ret[i] = vCopy 3938 } 3939 return ret 3940 })(o.MessageTypes), 3941 DisableResolveSupersedes: o.DisableResolveSupersedes, 3942 EnableDeletePlaceholders: o.EnableDeletePlaceholders, 3943 DisablePostProcessThread: o.DisablePostProcessThread, 3944 Before: (func(x *gregor1.Time) *gregor1.Time { 3945 if x == nil { 3946 return nil 3947 } 3948 tmp := (*x).DeepCopy() 3949 return &tmp 3950 })(o.Before), 3951 After: (func(x *gregor1.Time) *gregor1.Time { 3952 if x == nil { 3953 return nil 3954 } 3955 tmp := (*x).DeepCopy() 3956 return &tmp 3957 })(o.After), 3958 MessageIDControl: (func(x *MessageIDControl) *MessageIDControl { 3959 if x == nil { 3960 return nil 3961 } 3962 tmp := (*x).DeepCopy() 3963 return &tmp 3964 })(o.MessageIDControl), 3965 } 3966} 3967 3968type GetThreadLocalRes struct { 3969 Thread ThreadView `codec:"thread" json:"thread"` 3970 Offline bool `codec:"offline" json:"offline"` 3971 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 3972 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 3973} 3974 3975func (o GetThreadLocalRes) DeepCopy() GetThreadLocalRes { 3976 return GetThreadLocalRes{ 3977 Thread: o.Thread.DeepCopy(), 3978 Offline: o.Offline, 3979 RateLimits: (func(x []RateLimit) []RateLimit { 3980 if x == nil { 3981 return nil 3982 } 3983 ret := make([]RateLimit, len(x)) 3984 for i, v := range x { 3985 vCopy := v.DeepCopy() 3986 ret[i] = vCopy 3987 } 3988 return ret 3989 })(o.RateLimits), 3990 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 3991 if x == nil { 3992 return nil 3993 } 3994 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 3995 for i, v := range x { 3996 vCopy := v.DeepCopy() 3997 ret[i] = vCopy 3998 } 3999 return ret 4000 })(o.IdentifyFailures), 4001 } 4002} 4003 4004type GetThreadNonblockCbMode int 4005 4006const ( 4007 GetThreadNonblockCbMode_FULL GetThreadNonblockCbMode = 0 4008 GetThreadNonblockCbMode_INCREMENTAL GetThreadNonblockCbMode = 1 4009) 4010 4011func (o GetThreadNonblockCbMode) DeepCopy() GetThreadNonblockCbMode { return o } 4012 4013var GetThreadNonblockCbModeMap = map[string]GetThreadNonblockCbMode{ 4014 "FULL": 0, 4015 "INCREMENTAL": 1, 4016} 4017 4018var GetThreadNonblockCbModeRevMap = map[GetThreadNonblockCbMode]string{ 4019 0: "FULL", 4020 1: "INCREMENTAL", 4021} 4022 4023func (e GetThreadNonblockCbMode) String() string { 4024 if v, ok := GetThreadNonblockCbModeRevMap[e]; ok { 4025 return v 4026 } 4027 return fmt.Sprintf("%v", int(e)) 4028} 4029 4030type GetThreadNonblockPgMode int 4031 4032const ( 4033 GetThreadNonblockPgMode_DEFAULT GetThreadNonblockPgMode = 0 4034 GetThreadNonblockPgMode_SERVER GetThreadNonblockPgMode = 1 4035) 4036 4037func (o GetThreadNonblockPgMode) DeepCopy() GetThreadNonblockPgMode { return o } 4038 4039var GetThreadNonblockPgModeMap = map[string]GetThreadNonblockPgMode{ 4040 "DEFAULT": 0, 4041 "SERVER": 1, 4042} 4043 4044var GetThreadNonblockPgModeRevMap = map[GetThreadNonblockPgMode]string{ 4045 0: "DEFAULT", 4046 1: "SERVER", 4047} 4048 4049func (e GetThreadNonblockPgMode) String() string { 4050 if v, ok := GetThreadNonblockPgModeRevMap[e]; ok { 4051 return v 4052 } 4053 return fmt.Sprintf("%v", int(e)) 4054} 4055 4056type UnreadlineRes struct { 4057 Offline bool `codec:"offline" json:"offline"` 4058 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 4059 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 4060 UnreadlineID *MessageID `codec:"unreadlineID,omitempty" json:"unreadlineID,omitempty"` 4061} 4062 4063func (o UnreadlineRes) DeepCopy() UnreadlineRes { 4064 return UnreadlineRes{ 4065 Offline: o.Offline, 4066 RateLimits: (func(x []RateLimit) []RateLimit { 4067 if x == nil { 4068 return nil 4069 } 4070 ret := make([]RateLimit, len(x)) 4071 for i, v := range x { 4072 vCopy := v.DeepCopy() 4073 ret[i] = vCopy 4074 } 4075 return ret 4076 })(o.RateLimits), 4077 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 4078 if x == nil { 4079 return nil 4080 } 4081 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 4082 for i, v := range x { 4083 vCopy := v.DeepCopy() 4084 ret[i] = vCopy 4085 } 4086 return ret 4087 })(o.IdentifyFailures), 4088 UnreadlineID: (func(x *MessageID) *MessageID { 4089 if x == nil { 4090 return nil 4091 } 4092 tmp := (*x).DeepCopy() 4093 return &tmp 4094 })(o.UnreadlineID), 4095 } 4096} 4097 4098type NameQuery struct { 4099 Name string `codec:"name" json:"name"` 4100 TlfID *TLFID `codec:"tlfID,omitempty" json:"tlfID,omitempty"` 4101 MembersType ConversationMembersType `codec:"membersType" json:"membersType"` 4102} 4103 4104func (o NameQuery) DeepCopy() NameQuery { 4105 return NameQuery{ 4106 Name: o.Name, 4107 TlfID: (func(x *TLFID) *TLFID { 4108 if x == nil { 4109 return nil 4110 } 4111 tmp := (*x).DeepCopy() 4112 return &tmp 4113 })(o.TlfID), 4114 MembersType: o.MembersType.DeepCopy(), 4115 } 4116} 4117 4118type GetInboxLocalQuery struct { 4119 Name *NameQuery `codec:"name,omitempty" json:"name,omitempty"` 4120 TopicName *string `codec:"topicName,omitempty" json:"topicName,omitempty"` 4121 ConvIDs []ConversationID `codec:"convIDs" json:"convIDs"` 4122 TopicType *TopicType `codec:"topicType,omitempty" json:"topicType,omitempty"` 4123 TlfVisibility *keybase1.TLFVisibility `codec:"tlfVisibility,omitempty" json:"tlfVisibility,omitempty"` 4124 Before *gregor1.Time `codec:"before,omitempty" json:"before,omitempty"` 4125 After *gregor1.Time `codec:"after,omitempty" json:"after,omitempty"` 4126 OneChatTypePerTLF *bool `codec:"oneChatTypePerTLF,omitempty" json:"oneChatTypePerTLF,omitempty"` 4127 Status []ConversationStatus `codec:"status" json:"status"` 4128 MemberStatus []ConversationMemberStatus `codec:"memberStatus" json:"memberStatus"` 4129 UnreadOnly bool `codec:"unreadOnly" json:"unreadOnly"` 4130 ReadOnly bool `codec:"readOnly" json:"readOnly"` 4131 ComputeActiveList bool `codec:"computeActiveList" json:"computeActiveList"` 4132} 4133 4134func (o GetInboxLocalQuery) DeepCopy() GetInboxLocalQuery { 4135 return GetInboxLocalQuery{ 4136 Name: (func(x *NameQuery) *NameQuery { 4137 if x == nil { 4138 return nil 4139 } 4140 tmp := (*x).DeepCopy() 4141 return &tmp 4142 })(o.Name), 4143 TopicName: (func(x *string) *string { 4144 if x == nil { 4145 return nil 4146 } 4147 tmp := (*x) 4148 return &tmp 4149 })(o.TopicName), 4150 ConvIDs: (func(x []ConversationID) []ConversationID { 4151 if x == nil { 4152 return nil 4153 } 4154 ret := make([]ConversationID, len(x)) 4155 for i, v := range x { 4156 vCopy := v.DeepCopy() 4157 ret[i] = vCopy 4158 } 4159 return ret 4160 })(o.ConvIDs), 4161 TopicType: (func(x *TopicType) *TopicType { 4162 if x == nil { 4163 return nil 4164 } 4165 tmp := (*x).DeepCopy() 4166 return &tmp 4167 })(o.TopicType), 4168 TlfVisibility: (func(x *keybase1.TLFVisibility) *keybase1.TLFVisibility { 4169 if x == nil { 4170 return nil 4171 } 4172 tmp := (*x).DeepCopy() 4173 return &tmp 4174 })(o.TlfVisibility), 4175 Before: (func(x *gregor1.Time) *gregor1.Time { 4176 if x == nil { 4177 return nil 4178 } 4179 tmp := (*x).DeepCopy() 4180 return &tmp 4181 })(o.Before), 4182 After: (func(x *gregor1.Time) *gregor1.Time { 4183 if x == nil { 4184 return nil 4185 } 4186 tmp := (*x).DeepCopy() 4187 return &tmp 4188 })(o.After), 4189 OneChatTypePerTLF: (func(x *bool) *bool { 4190 if x == nil { 4191 return nil 4192 } 4193 tmp := (*x) 4194 return &tmp 4195 })(o.OneChatTypePerTLF), 4196 Status: (func(x []ConversationStatus) []ConversationStatus { 4197 if x == nil { 4198 return nil 4199 } 4200 ret := make([]ConversationStatus, len(x)) 4201 for i, v := range x { 4202 vCopy := v.DeepCopy() 4203 ret[i] = vCopy 4204 } 4205 return ret 4206 })(o.Status), 4207 MemberStatus: (func(x []ConversationMemberStatus) []ConversationMemberStatus { 4208 if x == nil { 4209 return nil 4210 } 4211 ret := make([]ConversationMemberStatus, len(x)) 4212 for i, v := range x { 4213 vCopy := v.DeepCopy() 4214 ret[i] = vCopy 4215 } 4216 return ret 4217 })(o.MemberStatus), 4218 UnreadOnly: o.UnreadOnly, 4219 ReadOnly: o.ReadOnly, 4220 ComputeActiveList: o.ComputeActiveList, 4221 } 4222} 4223 4224type GetInboxAndUnboxLocalRes struct { 4225 Conversations []ConversationLocal `codec:"conversations" json:"conversations"` 4226 Offline bool `codec:"offline" json:"offline"` 4227 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 4228 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 4229} 4230 4231func (o GetInboxAndUnboxLocalRes) DeepCopy() GetInboxAndUnboxLocalRes { 4232 return GetInboxAndUnboxLocalRes{ 4233 Conversations: (func(x []ConversationLocal) []ConversationLocal { 4234 if x == nil { 4235 return nil 4236 } 4237 ret := make([]ConversationLocal, len(x)) 4238 for i, v := range x { 4239 vCopy := v.DeepCopy() 4240 ret[i] = vCopy 4241 } 4242 return ret 4243 })(o.Conversations), 4244 Offline: o.Offline, 4245 RateLimits: (func(x []RateLimit) []RateLimit { 4246 if x == nil { 4247 return nil 4248 } 4249 ret := make([]RateLimit, len(x)) 4250 for i, v := range x { 4251 vCopy := v.DeepCopy() 4252 ret[i] = vCopy 4253 } 4254 return ret 4255 })(o.RateLimits), 4256 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 4257 if x == nil { 4258 return nil 4259 } 4260 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 4261 for i, v := range x { 4262 vCopy := v.DeepCopy() 4263 ret[i] = vCopy 4264 } 4265 return ret 4266 })(o.IdentifyFailures), 4267 } 4268} 4269 4270type GetInboxAndUnboxUILocalRes struct { 4271 Conversations []InboxUIItem `codec:"conversations" json:"conversations"` 4272 Offline bool `codec:"offline" json:"offline"` 4273 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 4274 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 4275} 4276 4277func (o GetInboxAndUnboxUILocalRes) DeepCopy() GetInboxAndUnboxUILocalRes { 4278 return GetInboxAndUnboxUILocalRes{ 4279 Conversations: (func(x []InboxUIItem) []InboxUIItem { 4280 if x == nil { 4281 return nil 4282 } 4283 ret := make([]InboxUIItem, len(x)) 4284 for i, v := range x { 4285 vCopy := v.DeepCopy() 4286 ret[i] = vCopy 4287 } 4288 return ret 4289 })(o.Conversations), 4290 Offline: o.Offline, 4291 RateLimits: (func(x []RateLimit) []RateLimit { 4292 if x == nil { 4293 return nil 4294 } 4295 ret := make([]RateLimit, len(x)) 4296 for i, v := range x { 4297 vCopy := v.DeepCopy() 4298 ret[i] = vCopy 4299 } 4300 return ret 4301 })(o.RateLimits), 4302 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 4303 if x == nil { 4304 return nil 4305 } 4306 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 4307 for i, v := range x { 4308 vCopy := v.DeepCopy() 4309 ret[i] = vCopy 4310 } 4311 return ret 4312 })(o.IdentifyFailures), 4313 } 4314} 4315 4316type InboxLayoutReselectMode int 4317 4318const ( 4319 InboxLayoutReselectMode_DEFAULT InboxLayoutReselectMode = 0 4320 InboxLayoutReselectMode_FORCE InboxLayoutReselectMode = 1 4321) 4322 4323func (o InboxLayoutReselectMode) DeepCopy() InboxLayoutReselectMode { return o } 4324 4325var InboxLayoutReselectModeMap = map[string]InboxLayoutReselectMode{ 4326 "DEFAULT": 0, 4327 "FORCE": 1, 4328} 4329 4330var InboxLayoutReselectModeRevMap = map[InboxLayoutReselectMode]string{ 4331 0: "DEFAULT", 4332 1: "FORCE", 4333} 4334 4335func (e InboxLayoutReselectMode) String() string { 4336 if v, ok := InboxLayoutReselectModeRevMap[e]; ok { 4337 return v 4338 } 4339 return fmt.Sprintf("%v", int(e)) 4340} 4341 4342type PostLocalRes struct { 4343 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 4344 MessageID MessageID `codec:"messageID" json:"messageID"` 4345 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 4346} 4347 4348func (o PostLocalRes) DeepCopy() PostLocalRes { 4349 return PostLocalRes{ 4350 RateLimits: (func(x []RateLimit) []RateLimit { 4351 if x == nil { 4352 return nil 4353 } 4354 ret := make([]RateLimit, len(x)) 4355 for i, v := range x { 4356 vCopy := v.DeepCopy() 4357 ret[i] = vCopy 4358 } 4359 return ret 4360 })(o.RateLimits), 4361 MessageID: o.MessageID.DeepCopy(), 4362 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 4363 if x == nil { 4364 return nil 4365 } 4366 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 4367 for i, v := range x { 4368 vCopy := v.DeepCopy() 4369 ret[i] = vCopy 4370 } 4371 return ret 4372 })(o.IdentifyFailures), 4373 } 4374} 4375 4376type PostLocalNonblockRes struct { 4377 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 4378 OutboxID OutboxID `codec:"outboxID" json:"outboxID"` 4379 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 4380} 4381 4382func (o PostLocalNonblockRes) DeepCopy() PostLocalNonblockRes { 4383 return PostLocalNonblockRes{ 4384 RateLimits: (func(x []RateLimit) []RateLimit { 4385 if x == nil { 4386 return nil 4387 } 4388 ret := make([]RateLimit, len(x)) 4389 for i, v := range x { 4390 vCopy := v.DeepCopy() 4391 ret[i] = vCopy 4392 } 4393 return ret 4394 })(o.RateLimits), 4395 OutboxID: o.OutboxID.DeepCopy(), 4396 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 4397 if x == nil { 4398 return nil 4399 } 4400 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 4401 for i, v := range x { 4402 vCopy := v.DeepCopy() 4403 ret[i] = vCopy 4404 } 4405 return ret 4406 })(o.IdentifyFailures), 4407 } 4408} 4409 4410type EditTarget struct { 4411 MessageID *MessageID `codec:"messageID,omitempty" json:"messageID,omitempty"` 4412 OutboxID *OutboxID `codec:"outboxID,omitempty" json:"outboxID,omitempty"` 4413} 4414 4415func (o EditTarget) DeepCopy() EditTarget { 4416 return EditTarget{ 4417 MessageID: (func(x *MessageID) *MessageID { 4418 if x == nil { 4419 return nil 4420 } 4421 tmp := (*x).DeepCopy() 4422 return &tmp 4423 })(o.MessageID), 4424 OutboxID: (func(x *OutboxID) *OutboxID { 4425 if x == nil { 4426 return nil 4427 } 4428 tmp := (*x).DeepCopy() 4429 return &tmp 4430 })(o.OutboxID), 4431 } 4432} 4433 4434type SetConversationStatusLocalRes struct { 4435 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 4436 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 4437} 4438 4439func (o SetConversationStatusLocalRes) DeepCopy() SetConversationStatusLocalRes { 4440 return SetConversationStatusLocalRes{ 4441 RateLimits: (func(x []RateLimit) []RateLimit { 4442 if x == nil { 4443 return nil 4444 } 4445 ret := make([]RateLimit, len(x)) 4446 for i, v := range x { 4447 vCopy := v.DeepCopy() 4448 ret[i] = vCopy 4449 } 4450 return ret 4451 })(o.RateLimits), 4452 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 4453 if x == nil { 4454 return nil 4455 } 4456 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 4457 for i, v := range x { 4458 vCopy := v.DeepCopy() 4459 ret[i] = vCopy 4460 } 4461 return ret 4462 })(o.IdentifyFailures), 4463 } 4464} 4465 4466type NewConversationsLocalRes struct { 4467 Results []NewConversationsLocalResult `codec:"results" json:"results"` 4468 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 4469 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 4470} 4471 4472func (o NewConversationsLocalRes) DeepCopy() NewConversationsLocalRes { 4473 return NewConversationsLocalRes{ 4474 Results: (func(x []NewConversationsLocalResult) []NewConversationsLocalResult { 4475 if x == nil { 4476 return nil 4477 } 4478 ret := make([]NewConversationsLocalResult, len(x)) 4479 for i, v := range x { 4480 vCopy := v.DeepCopy() 4481 ret[i] = vCopy 4482 } 4483 return ret 4484 })(o.Results), 4485 RateLimits: (func(x []RateLimit) []RateLimit { 4486 if x == nil { 4487 return nil 4488 } 4489 ret := make([]RateLimit, len(x)) 4490 for i, v := range x { 4491 vCopy := v.DeepCopy() 4492 ret[i] = vCopy 4493 } 4494 return ret 4495 })(o.RateLimits), 4496 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 4497 if x == nil { 4498 return nil 4499 } 4500 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 4501 for i, v := range x { 4502 vCopy := v.DeepCopy() 4503 ret[i] = vCopy 4504 } 4505 return ret 4506 })(o.IdentifyFailures), 4507 } 4508} 4509 4510type NewConversationsLocalResult struct { 4511 Result *NewConversationLocalRes `codec:"result,omitempty" json:"result,omitempty"` 4512 Err *string `codec:"err,omitempty" json:"err,omitempty"` 4513} 4514 4515func (o NewConversationsLocalResult) DeepCopy() NewConversationsLocalResult { 4516 return NewConversationsLocalResult{ 4517 Result: (func(x *NewConversationLocalRes) *NewConversationLocalRes { 4518 if x == nil { 4519 return nil 4520 } 4521 tmp := (*x).DeepCopy() 4522 return &tmp 4523 })(o.Result), 4524 Err: (func(x *string) *string { 4525 if x == nil { 4526 return nil 4527 } 4528 tmp := (*x) 4529 return &tmp 4530 })(o.Err), 4531 } 4532} 4533 4534type NewConversationLocalArgument struct { 4535 TlfName string `codec:"tlfName" json:"tlfName"` 4536 TopicType TopicType `codec:"topicType" json:"topicType"` 4537 TlfVisibility keybase1.TLFVisibility `codec:"tlfVisibility" json:"tlfVisibility"` 4538 TopicName *string `codec:"topicName,omitempty" json:"topicName,omitempty"` 4539 MembersType ConversationMembersType `codec:"membersType" json:"membersType"` 4540} 4541 4542func (o NewConversationLocalArgument) DeepCopy() NewConversationLocalArgument { 4543 return NewConversationLocalArgument{ 4544 TlfName: o.TlfName, 4545 TopicType: o.TopicType.DeepCopy(), 4546 TlfVisibility: o.TlfVisibility.DeepCopy(), 4547 TopicName: (func(x *string) *string { 4548 if x == nil { 4549 return nil 4550 } 4551 tmp := (*x) 4552 return &tmp 4553 })(o.TopicName), 4554 MembersType: o.MembersType.DeepCopy(), 4555 } 4556} 4557 4558type NewConversationLocalRes struct { 4559 Conv ConversationLocal `codec:"conv" json:"conv"` 4560 UiConv InboxUIItem `codec:"uiConv" json:"uiConv"` 4561 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 4562 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 4563} 4564 4565func (o NewConversationLocalRes) DeepCopy() NewConversationLocalRes { 4566 return NewConversationLocalRes{ 4567 Conv: o.Conv.DeepCopy(), 4568 UiConv: o.UiConv.DeepCopy(), 4569 RateLimits: (func(x []RateLimit) []RateLimit { 4570 if x == nil { 4571 return nil 4572 } 4573 ret := make([]RateLimit, len(x)) 4574 for i, v := range x { 4575 vCopy := v.DeepCopy() 4576 ret[i] = vCopy 4577 } 4578 return ret 4579 })(o.RateLimits), 4580 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 4581 if x == nil { 4582 return nil 4583 } 4584 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 4585 for i, v := range x { 4586 vCopy := v.DeepCopy() 4587 ret[i] = vCopy 4588 } 4589 return ret 4590 })(o.IdentifyFailures), 4591 } 4592} 4593 4594type GetInboxSummaryForCLILocalQuery struct { 4595 TopicType TopicType `codec:"topicType" json:"topicType"` 4596 After string `codec:"after" json:"after"` 4597 Before string `codec:"before" json:"before"` 4598 Visibility keybase1.TLFVisibility `codec:"visibility" json:"visibility"` 4599 Status []ConversationStatus `codec:"status" json:"status"` 4600 ConvIDs []ConversationID `codec:"convIDs" json:"convIDs"` 4601 UnreadFirst bool `codec:"unreadFirst" json:"unreadFirst"` 4602 UnreadFirstLimit UnreadFirstNumLimit `codec:"unreadFirstLimit" json:"unreadFirstLimit"` 4603 ActivitySortedLimit int `codec:"activitySortedLimit" json:"activitySortedLimit"` 4604} 4605 4606func (o GetInboxSummaryForCLILocalQuery) DeepCopy() GetInboxSummaryForCLILocalQuery { 4607 return GetInboxSummaryForCLILocalQuery{ 4608 TopicType: o.TopicType.DeepCopy(), 4609 After: o.After, 4610 Before: o.Before, 4611 Visibility: o.Visibility.DeepCopy(), 4612 Status: (func(x []ConversationStatus) []ConversationStatus { 4613 if x == nil { 4614 return nil 4615 } 4616 ret := make([]ConversationStatus, len(x)) 4617 for i, v := range x { 4618 vCopy := v.DeepCopy() 4619 ret[i] = vCopy 4620 } 4621 return ret 4622 })(o.Status), 4623 ConvIDs: (func(x []ConversationID) []ConversationID { 4624 if x == nil { 4625 return nil 4626 } 4627 ret := make([]ConversationID, len(x)) 4628 for i, v := range x { 4629 vCopy := v.DeepCopy() 4630 ret[i] = vCopy 4631 } 4632 return ret 4633 })(o.ConvIDs), 4634 UnreadFirst: o.UnreadFirst, 4635 UnreadFirstLimit: o.UnreadFirstLimit.DeepCopy(), 4636 ActivitySortedLimit: o.ActivitySortedLimit, 4637 } 4638} 4639 4640type GetInboxSummaryForCLILocalRes struct { 4641 Conversations []ConversationLocal `codec:"conversations" json:"conversations"` 4642 Offline bool `codec:"offline" json:"offline"` 4643 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 4644} 4645 4646func (o GetInboxSummaryForCLILocalRes) DeepCopy() GetInboxSummaryForCLILocalRes { 4647 return GetInboxSummaryForCLILocalRes{ 4648 Conversations: (func(x []ConversationLocal) []ConversationLocal { 4649 if x == nil { 4650 return nil 4651 } 4652 ret := make([]ConversationLocal, len(x)) 4653 for i, v := range x { 4654 vCopy := v.DeepCopy() 4655 ret[i] = vCopy 4656 } 4657 return ret 4658 })(o.Conversations), 4659 Offline: o.Offline, 4660 RateLimits: (func(x []RateLimit) []RateLimit { 4661 if x == nil { 4662 return nil 4663 } 4664 ret := make([]RateLimit, len(x)) 4665 for i, v := range x { 4666 vCopy := v.DeepCopy() 4667 ret[i] = vCopy 4668 } 4669 return ret 4670 })(o.RateLimits), 4671 } 4672} 4673 4674type GetConversationForCLILocalQuery struct { 4675 MarkAsRead bool `codec:"markAsRead" json:"markAsRead"` 4676 MessageTypes []MessageType `codec:"MessageTypes" json:"MessageTypes"` 4677 Since *string `codec:"Since,omitempty" json:"Since,omitempty"` 4678 Limit UnreadFirstNumLimit `codec:"limit" json:"limit"` 4679 Conv ConversationLocal `codec:"conv" json:"conv"` 4680} 4681 4682func (o GetConversationForCLILocalQuery) DeepCopy() GetConversationForCLILocalQuery { 4683 return GetConversationForCLILocalQuery{ 4684 MarkAsRead: o.MarkAsRead, 4685 MessageTypes: (func(x []MessageType) []MessageType { 4686 if x == nil { 4687 return nil 4688 } 4689 ret := make([]MessageType, len(x)) 4690 for i, v := range x { 4691 vCopy := v.DeepCopy() 4692 ret[i] = vCopy 4693 } 4694 return ret 4695 })(o.MessageTypes), 4696 Since: (func(x *string) *string { 4697 if x == nil { 4698 return nil 4699 } 4700 tmp := (*x) 4701 return &tmp 4702 })(o.Since), 4703 Limit: o.Limit.DeepCopy(), 4704 Conv: o.Conv.DeepCopy(), 4705 } 4706} 4707 4708type GetConversationForCLILocalRes struct { 4709 Conversation ConversationLocal `codec:"conversation" json:"conversation"` 4710 Messages []MessageUnboxed `codec:"messages" json:"messages"` 4711 Offline bool `codec:"offline" json:"offline"` 4712 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 4713} 4714 4715func (o GetConversationForCLILocalRes) DeepCopy() GetConversationForCLILocalRes { 4716 return GetConversationForCLILocalRes{ 4717 Conversation: o.Conversation.DeepCopy(), 4718 Messages: (func(x []MessageUnboxed) []MessageUnboxed { 4719 if x == nil { 4720 return nil 4721 } 4722 ret := make([]MessageUnboxed, len(x)) 4723 for i, v := range x { 4724 vCopy := v.DeepCopy() 4725 ret[i] = vCopy 4726 } 4727 return ret 4728 })(o.Messages), 4729 Offline: o.Offline, 4730 RateLimits: (func(x []RateLimit) []RateLimit { 4731 if x == nil { 4732 return nil 4733 } 4734 ret := make([]RateLimit, len(x)) 4735 for i, v := range x { 4736 vCopy := v.DeepCopy() 4737 ret[i] = vCopy 4738 } 4739 return ret 4740 })(o.RateLimits), 4741 } 4742} 4743 4744type GetMessagesLocalRes struct { 4745 Messages []MessageUnboxed `codec:"messages" json:"messages"` 4746 Offline bool `codec:"offline" json:"offline"` 4747 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 4748 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 4749} 4750 4751func (o GetMessagesLocalRes) DeepCopy() GetMessagesLocalRes { 4752 return GetMessagesLocalRes{ 4753 Messages: (func(x []MessageUnboxed) []MessageUnboxed { 4754 if x == nil { 4755 return nil 4756 } 4757 ret := make([]MessageUnboxed, len(x)) 4758 for i, v := range x { 4759 vCopy := v.DeepCopy() 4760 ret[i] = vCopy 4761 } 4762 return ret 4763 })(o.Messages), 4764 Offline: o.Offline, 4765 RateLimits: (func(x []RateLimit) []RateLimit { 4766 if x == nil { 4767 return nil 4768 } 4769 ret := make([]RateLimit, len(x)) 4770 for i, v := range x { 4771 vCopy := v.DeepCopy() 4772 ret[i] = vCopy 4773 } 4774 return ret 4775 })(o.RateLimits), 4776 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 4777 if x == nil { 4778 return nil 4779 } 4780 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 4781 for i, v := range x { 4782 vCopy := v.DeepCopy() 4783 ret[i] = vCopy 4784 } 4785 return ret 4786 })(o.IdentifyFailures), 4787 } 4788} 4789 4790type PostFileAttachmentArg struct { 4791 ConversationID ConversationID `codec:"conversationID" json:"conversationID"` 4792 TlfName string `codec:"tlfName" json:"tlfName"` 4793 Visibility keybase1.TLFVisibility `codec:"visibility" json:"visibility"` 4794 Filename string `codec:"filename" json:"filename"` 4795 Title string `codec:"title" json:"title"` 4796 Metadata []byte `codec:"metadata" json:"metadata"` 4797 IdentifyBehavior keybase1.TLFIdentifyBehavior `codec:"identifyBehavior" json:"identifyBehavior"` 4798 CallerPreview *MakePreviewRes `codec:"callerPreview,omitempty" json:"callerPreview,omitempty"` 4799 OutboxID *OutboxID `codec:"outboxID,omitempty" json:"outboxID,omitempty"` 4800 EphemeralLifetime *gregor1.DurationSec `codec:"ephemeralLifetime,omitempty" json:"ephemeralLifetime,omitempty"` 4801} 4802 4803func (o PostFileAttachmentArg) DeepCopy() PostFileAttachmentArg { 4804 return PostFileAttachmentArg{ 4805 ConversationID: o.ConversationID.DeepCopy(), 4806 TlfName: o.TlfName, 4807 Visibility: o.Visibility.DeepCopy(), 4808 Filename: o.Filename, 4809 Title: o.Title, 4810 Metadata: (func(x []byte) []byte { 4811 if x == nil { 4812 return nil 4813 } 4814 return append([]byte{}, x...) 4815 })(o.Metadata), 4816 IdentifyBehavior: o.IdentifyBehavior.DeepCopy(), 4817 CallerPreview: (func(x *MakePreviewRes) *MakePreviewRes { 4818 if x == nil { 4819 return nil 4820 } 4821 tmp := (*x).DeepCopy() 4822 return &tmp 4823 })(o.CallerPreview), 4824 OutboxID: (func(x *OutboxID) *OutboxID { 4825 if x == nil { 4826 return nil 4827 } 4828 tmp := (*x).DeepCopy() 4829 return &tmp 4830 })(o.OutboxID), 4831 EphemeralLifetime: (func(x *gregor1.DurationSec) *gregor1.DurationSec { 4832 if x == nil { 4833 return nil 4834 } 4835 tmp := (*x).DeepCopy() 4836 return &tmp 4837 })(o.EphemeralLifetime), 4838 } 4839} 4840 4841type GetNextAttachmentMessageLocalRes struct { 4842 Message *UIMessage `codec:"message,omitempty" json:"message,omitempty"` 4843 Offline bool `codec:"offline" json:"offline"` 4844 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 4845 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 4846} 4847 4848func (o GetNextAttachmentMessageLocalRes) DeepCopy() GetNextAttachmentMessageLocalRes { 4849 return GetNextAttachmentMessageLocalRes{ 4850 Message: (func(x *UIMessage) *UIMessage { 4851 if x == nil { 4852 return nil 4853 } 4854 tmp := (*x).DeepCopy() 4855 return &tmp 4856 })(o.Message), 4857 Offline: o.Offline, 4858 RateLimits: (func(x []RateLimit) []RateLimit { 4859 if x == nil { 4860 return nil 4861 } 4862 ret := make([]RateLimit, len(x)) 4863 for i, v := range x { 4864 vCopy := v.DeepCopy() 4865 ret[i] = vCopy 4866 } 4867 return ret 4868 })(o.RateLimits), 4869 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 4870 if x == nil { 4871 return nil 4872 } 4873 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 4874 for i, v := range x { 4875 vCopy := v.DeepCopy() 4876 ret[i] = vCopy 4877 } 4878 return ret 4879 })(o.IdentifyFailures), 4880 } 4881} 4882 4883type DownloadAttachmentLocalRes struct { 4884 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 4885 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 4886} 4887 4888func (o DownloadAttachmentLocalRes) DeepCopy() DownloadAttachmentLocalRes { 4889 return DownloadAttachmentLocalRes{ 4890 RateLimits: (func(x []RateLimit) []RateLimit { 4891 if x == nil { 4892 return nil 4893 } 4894 ret := make([]RateLimit, len(x)) 4895 for i, v := range x { 4896 vCopy := v.DeepCopy() 4897 ret[i] = vCopy 4898 } 4899 return ret 4900 })(o.RateLimits), 4901 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 4902 if x == nil { 4903 return nil 4904 } 4905 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 4906 for i, v := range x { 4907 vCopy := v.DeepCopy() 4908 ret[i] = vCopy 4909 } 4910 return ret 4911 })(o.IdentifyFailures), 4912 } 4913} 4914 4915type DownloadFileAttachmentLocalRes struct { 4916 FilePath string `codec:"filePath" json:"filePath"` 4917 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 4918 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 4919} 4920 4921func (o DownloadFileAttachmentLocalRes) DeepCopy() DownloadFileAttachmentLocalRes { 4922 return DownloadFileAttachmentLocalRes{ 4923 FilePath: o.FilePath, 4924 RateLimits: (func(x []RateLimit) []RateLimit { 4925 if x == nil { 4926 return nil 4927 } 4928 ret := make([]RateLimit, len(x)) 4929 for i, v := range x { 4930 vCopy := v.DeepCopy() 4931 ret[i] = vCopy 4932 } 4933 return ret 4934 })(o.RateLimits), 4935 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 4936 if x == nil { 4937 return nil 4938 } 4939 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 4940 for i, v := range x { 4941 vCopy := v.DeepCopy() 4942 ret[i] = vCopy 4943 } 4944 return ret 4945 })(o.IdentifyFailures), 4946 } 4947} 4948 4949type PreviewLocationTyp int 4950 4951const ( 4952 PreviewLocationTyp_URL PreviewLocationTyp = 0 4953 PreviewLocationTyp_FILE PreviewLocationTyp = 1 4954 PreviewLocationTyp_BYTES PreviewLocationTyp = 2 4955) 4956 4957func (o PreviewLocationTyp) DeepCopy() PreviewLocationTyp { return o } 4958 4959var PreviewLocationTypMap = map[string]PreviewLocationTyp{ 4960 "URL": 0, 4961 "FILE": 1, 4962 "BYTES": 2, 4963} 4964 4965var PreviewLocationTypRevMap = map[PreviewLocationTyp]string{ 4966 0: "URL", 4967 1: "FILE", 4968 2: "BYTES", 4969} 4970 4971func (e PreviewLocationTyp) String() string { 4972 if v, ok := PreviewLocationTypRevMap[e]; ok { 4973 return v 4974 } 4975 return fmt.Sprintf("%v", int(e)) 4976} 4977 4978type PreviewLocation struct { 4979 Ltyp__ PreviewLocationTyp `codec:"ltyp" json:"ltyp"` 4980 Url__ *string `codec:"url,omitempty" json:"url,omitempty"` 4981 File__ *string `codec:"file,omitempty" json:"file,omitempty"` 4982 Bytes__ *[]byte `codec:"bytes,omitempty" json:"bytes,omitempty"` 4983} 4984 4985func (o *PreviewLocation) Ltyp() (ret PreviewLocationTyp, err error) { 4986 switch o.Ltyp__ { 4987 case PreviewLocationTyp_URL: 4988 if o.Url__ == nil { 4989 err = errors.New("unexpected nil value for Url__") 4990 return ret, err 4991 } 4992 case PreviewLocationTyp_FILE: 4993 if o.File__ == nil { 4994 err = errors.New("unexpected nil value for File__") 4995 return ret, err 4996 } 4997 case PreviewLocationTyp_BYTES: 4998 if o.Bytes__ == nil { 4999 err = errors.New("unexpected nil value for Bytes__") 5000 return ret, err 5001 } 5002 } 5003 return o.Ltyp__, nil 5004} 5005 5006func (o PreviewLocation) Url() (res string) { 5007 if o.Ltyp__ != PreviewLocationTyp_URL { 5008 panic("wrong case accessed") 5009 } 5010 if o.Url__ == nil { 5011 return 5012 } 5013 return *o.Url__ 5014} 5015 5016func (o PreviewLocation) File() (res string) { 5017 if o.Ltyp__ != PreviewLocationTyp_FILE { 5018 panic("wrong case accessed") 5019 } 5020 if o.File__ == nil { 5021 return 5022 } 5023 return *o.File__ 5024} 5025 5026func (o PreviewLocation) Bytes() (res []byte) { 5027 if o.Ltyp__ != PreviewLocationTyp_BYTES { 5028 panic("wrong case accessed") 5029 } 5030 if o.Bytes__ == nil { 5031 return 5032 } 5033 return *o.Bytes__ 5034} 5035 5036func NewPreviewLocationWithUrl(v string) PreviewLocation { 5037 return PreviewLocation{ 5038 Ltyp__: PreviewLocationTyp_URL, 5039 Url__: &v, 5040 } 5041} 5042 5043func NewPreviewLocationWithFile(v string) PreviewLocation { 5044 return PreviewLocation{ 5045 Ltyp__: PreviewLocationTyp_FILE, 5046 File__: &v, 5047 } 5048} 5049 5050func NewPreviewLocationWithBytes(v []byte) PreviewLocation { 5051 return PreviewLocation{ 5052 Ltyp__: PreviewLocationTyp_BYTES, 5053 Bytes__: &v, 5054 } 5055} 5056 5057func (o PreviewLocation) DeepCopy() PreviewLocation { 5058 return PreviewLocation{ 5059 Ltyp__: o.Ltyp__.DeepCopy(), 5060 Url__: (func(x *string) *string { 5061 if x == nil { 5062 return nil 5063 } 5064 tmp := (*x) 5065 return &tmp 5066 })(o.Url__), 5067 File__: (func(x *string) *string { 5068 if x == nil { 5069 return nil 5070 } 5071 tmp := (*x) 5072 return &tmp 5073 })(o.File__), 5074 Bytes__: (func(x *[]byte) *[]byte { 5075 if x == nil { 5076 return nil 5077 } 5078 tmp := (func(x []byte) []byte { 5079 if x == nil { 5080 return nil 5081 } 5082 return append([]byte{}, x...) 5083 })((*x)) 5084 return &tmp 5085 })(o.Bytes__), 5086 } 5087} 5088 5089type MakePreviewRes struct { 5090 MimeType string `codec:"mimeType" json:"mimeType"` 5091 PreviewMimeType *string `codec:"previewMimeType,omitempty" json:"previewMimeType,omitempty"` 5092 Location *PreviewLocation `codec:"location,omitempty" json:"location,omitempty"` 5093 Metadata *AssetMetadata `codec:"metadata,omitempty" json:"metadata,omitempty"` 5094 BaseMetadata *AssetMetadata `codec:"baseMetadata,omitempty" json:"baseMetadata,omitempty"` 5095} 5096 5097func (o MakePreviewRes) DeepCopy() MakePreviewRes { 5098 return MakePreviewRes{ 5099 MimeType: o.MimeType, 5100 PreviewMimeType: (func(x *string) *string { 5101 if x == nil { 5102 return nil 5103 } 5104 tmp := (*x) 5105 return &tmp 5106 })(o.PreviewMimeType), 5107 Location: (func(x *PreviewLocation) *PreviewLocation { 5108 if x == nil { 5109 return nil 5110 } 5111 tmp := (*x).DeepCopy() 5112 return &tmp 5113 })(o.Location), 5114 Metadata: (func(x *AssetMetadata) *AssetMetadata { 5115 if x == nil { 5116 return nil 5117 } 5118 tmp := (*x).DeepCopy() 5119 return &tmp 5120 })(o.Metadata), 5121 BaseMetadata: (func(x *AssetMetadata) *AssetMetadata { 5122 if x == nil { 5123 return nil 5124 } 5125 tmp := (*x).DeepCopy() 5126 return &tmp 5127 })(o.BaseMetadata), 5128 } 5129} 5130 5131type MarkAsReadLocalRes struct { 5132 Offline bool `codec:"offline" json:"offline"` 5133 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 5134} 5135 5136func (o MarkAsReadLocalRes) DeepCopy() MarkAsReadLocalRes { 5137 return MarkAsReadLocalRes{ 5138 Offline: o.Offline, 5139 RateLimits: (func(x []RateLimit) []RateLimit { 5140 if x == nil { 5141 return nil 5142 } 5143 ret := make([]RateLimit, len(x)) 5144 for i, v := range x { 5145 vCopy := v.DeepCopy() 5146 ret[i] = vCopy 5147 } 5148 return ret 5149 })(o.RateLimits), 5150 } 5151} 5152 5153type FindConversationsLocalRes struct { 5154 Conversations []ConversationLocal `codec:"conversations" json:"conversations"` 5155 UiConversations []InboxUIItem `codec:"uiConversations" json:"uiConversations"` 5156 Offline bool `codec:"offline" json:"offline"` 5157 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 5158 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 5159} 5160 5161func (o FindConversationsLocalRes) DeepCopy() FindConversationsLocalRes { 5162 return FindConversationsLocalRes{ 5163 Conversations: (func(x []ConversationLocal) []ConversationLocal { 5164 if x == nil { 5165 return nil 5166 } 5167 ret := make([]ConversationLocal, len(x)) 5168 for i, v := range x { 5169 vCopy := v.DeepCopy() 5170 ret[i] = vCopy 5171 } 5172 return ret 5173 })(o.Conversations), 5174 UiConversations: (func(x []InboxUIItem) []InboxUIItem { 5175 if x == nil { 5176 return nil 5177 } 5178 ret := make([]InboxUIItem, len(x)) 5179 for i, v := range x { 5180 vCopy := v.DeepCopy() 5181 ret[i] = vCopy 5182 } 5183 return ret 5184 })(o.UiConversations), 5185 Offline: o.Offline, 5186 RateLimits: (func(x []RateLimit) []RateLimit { 5187 if x == nil { 5188 return nil 5189 } 5190 ret := make([]RateLimit, len(x)) 5191 for i, v := range x { 5192 vCopy := v.DeepCopy() 5193 ret[i] = vCopy 5194 } 5195 return ret 5196 })(o.RateLimits), 5197 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 5198 if x == nil { 5199 return nil 5200 } 5201 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 5202 for i, v := range x { 5203 vCopy := v.DeepCopy() 5204 ret[i] = vCopy 5205 } 5206 return ret 5207 })(o.IdentifyFailures), 5208 } 5209} 5210 5211type JoinLeaveConversationLocalRes struct { 5212 Offline bool `codec:"offline" json:"offline"` 5213 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 5214} 5215 5216func (o JoinLeaveConversationLocalRes) DeepCopy() JoinLeaveConversationLocalRes { 5217 return JoinLeaveConversationLocalRes{ 5218 Offline: o.Offline, 5219 RateLimits: (func(x []RateLimit) []RateLimit { 5220 if x == nil { 5221 return nil 5222 } 5223 ret := make([]RateLimit, len(x)) 5224 for i, v := range x { 5225 vCopy := v.DeepCopy() 5226 ret[i] = vCopy 5227 } 5228 return ret 5229 })(o.RateLimits), 5230 } 5231} 5232 5233type PreviewConversationLocalRes struct { 5234 Conv InboxUIItem `codec:"conv" json:"conv"` 5235 Offline bool `codec:"offline" json:"offline"` 5236 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 5237} 5238 5239func (o PreviewConversationLocalRes) DeepCopy() PreviewConversationLocalRes { 5240 return PreviewConversationLocalRes{ 5241 Conv: o.Conv.DeepCopy(), 5242 Offline: o.Offline, 5243 RateLimits: (func(x []RateLimit) []RateLimit { 5244 if x == nil { 5245 return nil 5246 } 5247 ret := make([]RateLimit, len(x)) 5248 for i, v := range x { 5249 vCopy := v.DeepCopy() 5250 ret[i] = vCopy 5251 } 5252 return ret 5253 })(o.RateLimits), 5254 } 5255} 5256 5257type DeleteConversationLocalRes struct { 5258 Offline bool `codec:"offline" json:"offline"` 5259 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 5260} 5261 5262func (o DeleteConversationLocalRes) DeepCopy() DeleteConversationLocalRes { 5263 return DeleteConversationLocalRes{ 5264 Offline: o.Offline, 5265 RateLimits: (func(x []RateLimit) []RateLimit { 5266 if x == nil { 5267 return nil 5268 } 5269 ret := make([]RateLimit, len(x)) 5270 for i, v := range x { 5271 vCopy := v.DeepCopy() 5272 ret[i] = vCopy 5273 } 5274 return ret 5275 })(o.RateLimits), 5276 } 5277} 5278 5279type GetTLFConversationsLocalRes struct { 5280 Convs []InboxUIItem `codec:"convs" json:"convs"` 5281 Offline bool `codec:"offline" json:"offline"` 5282 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 5283} 5284 5285func (o GetTLFConversationsLocalRes) DeepCopy() GetTLFConversationsLocalRes { 5286 return GetTLFConversationsLocalRes{ 5287 Convs: (func(x []InboxUIItem) []InboxUIItem { 5288 if x == nil { 5289 return nil 5290 } 5291 ret := make([]InboxUIItem, len(x)) 5292 for i, v := range x { 5293 vCopy := v.DeepCopy() 5294 ret[i] = vCopy 5295 } 5296 return ret 5297 })(o.Convs), 5298 Offline: o.Offline, 5299 RateLimits: (func(x []RateLimit) []RateLimit { 5300 if x == nil { 5301 return nil 5302 } 5303 ret := make([]RateLimit, len(x)) 5304 for i, v := range x { 5305 vCopy := v.DeepCopy() 5306 ret[i] = vCopy 5307 } 5308 return ret 5309 })(o.RateLimits), 5310 } 5311} 5312 5313type GetChannelMembershipsLocalRes struct { 5314 Channels []ChannelNameMention `codec:"channels" json:"channels"` 5315 Offline bool `codec:"offline" json:"offline"` 5316 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 5317} 5318 5319func (o GetChannelMembershipsLocalRes) DeepCopy() GetChannelMembershipsLocalRes { 5320 return GetChannelMembershipsLocalRes{ 5321 Channels: (func(x []ChannelNameMention) []ChannelNameMention { 5322 if x == nil { 5323 return nil 5324 } 5325 ret := make([]ChannelNameMention, len(x)) 5326 for i, v := range x { 5327 vCopy := v.DeepCopy() 5328 ret[i] = vCopy 5329 } 5330 return ret 5331 })(o.Channels), 5332 Offline: o.Offline, 5333 RateLimits: (func(x []RateLimit) []RateLimit { 5334 if x == nil { 5335 return nil 5336 } 5337 ret := make([]RateLimit, len(x)) 5338 for i, v := range x { 5339 vCopy := v.DeepCopy() 5340 ret[i] = vCopy 5341 } 5342 return ret 5343 })(o.RateLimits), 5344 } 5345} 5346 5347type GetMutualTeamsLocalRes struct { 5348 TeamIDs []keybase1.TeamID `codec:"teamIDs" json:"teamIDs"` 5349 Offline bool `codec:"offline" json:"offline"` 5350 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 5351} 5352 5353func (o GetMutualTeamsLocalRes) DeepCopy() GetMutualTeamsLocalRes { 5354 return GetMutualTeamsLocalRes{ 5355 TeamIDs: (func(x []keybase1.TeamID) []keybase1.TeamID { 5356 if x == nil { 5357 return nil 5358 } 5359 ret := make([]keybase1.TeamID, len(x)) 5360 for i, v := range x { 5361 vCopy := v.DeepCopy() 5362 ret[i] = vCopy 5363 } 5364 return ret 5365 })(o.TeamIDs), 5366 Offline: o.Offline, 5367 RateLimits: (func(x []RateLimit) []RateLimit { 5368 if x == nil { 5369 return nil 5370 } 5371 ret := make([]RateLimit, len(x)) 5372 for i, v := range x { 5373 vCopy := v.DeepCopy() 5374 ret[i] = vCopy 5375 } 5376 return ret 5377 })(o.RateLimits), 5378 } 5379} 5380 5381type SetAppNotificationSettingsLocalRes struct { 5382 Offline bool `codec:"offline" json:"offline"` 5383 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 5384} 5385 5386func (o SetAppNotificationSettingsLocalRes) DeepCopy() SetAppNotificationSettingsLocalRes { 5387 return SetAppNotificationSettingsLocalRes{ 5388 Offline: o.Offline, 5389 RateLimits: (func(x []RateLimit) []RateLimit { 5390 if x == nil { 5391 return nil 5392 } 5393 ret := make([]RateLimit, len(x)) 5394 for i, v := range x { 5395 vCopy := v.DeepCopy() 5396 ret[i] = vCopy 5397 } 5398 return ret 5399 })(o.RateLimits), 5400 } 5401} 5402 5403type AppNotificationSettingLocal struct { 5404 DeviceType keybase1.DeviceType `codec:"deviceType" json:"deviceType"` 5405 Kind NotificationKind `codec:"kind" json:"kind"` 5406 Enabled bool `codec:"enabled" json:"enabled"` 5407} 5408 5409func (o AppNotificationSettingLocal) DeepCopy() AppNotificationSettingLocal { 5410 return AppNotificationSettingLocal{ 5411 DeviceType: o.DeviceType.DeepCopy(), 5412 Kind: o.Kind.DeepCopy(), 5413 Enabled: o.Enabled, 5414 } 5415} 5416 5417type ResetConvMember struct { 5418 Username string `codec:"username" json:"username"` 5419 Uid gregor1.UID `codec:"uid" json:"uid"` 5420 Conv ConversationID `codec:"conv" json:"conv"` 5421} 5422 5423func (o ResetConvMember) DeepCopy() ResetConvMember { 5424 return ResetConvMember{ 5425 Username: o.Username, 5426 Uid: o.Uid.DeepCopy(), 5427 Conv: o.Conv.DeepCopy(), 5428 } 5429} 5430 5431type GetAllResetConvMembersRes struct { 5432 Members []ResetConvMember `codec:"members" json:"members"` 5433 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 5434} 5435 5436func (o GetAllResetConvMembersRes) DeepCopy() GetAllResetConvMembersRes { 5437 return GetAllResetConvMembersRes{ 5438 Members: (func(x []ResetConvMember) []ResetConvMember { 5439 if x == nil { 5440 return nil 5441 } 5442 ret := make([]ResetConvMember, len(x)) 5443 for i, v := range x { 5444 vCopy := v.DeepCopy() 5445 ret[i] = vCopy 5446 } 5447 return ret 5448 })(o.Members), 5449 RateLimits: (func(x []RateLimit) []RateLimit { 5450 if x == nil { 5451 return nil 5452 } 5453 ret := make([]RateLimit, len(x)) 5454 for i, v := range x { 5455 vCopy := v.DeepCopy() 5456 ret[i] = vCopy 5457 } 5458 return ret 5459 })(o.RateLimits), 5460 } 5461} 5462 5463type SearchRegexpRes struct { 5464 Offline bool `codec:"offline" json:"offline"` 5465 Hits []ChatSearchHit `codec:"hits" json:"hits"` 5466 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 5467 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 5468} 5469 5470func (o SearchRegexpRes) DeepCopy() SearchRegexpRes { 5471 return SearchRegexpRes{ 5472 Offline: o.Offline, 5473 Hits: (func(x []ChatSearchHit) []ChatSearchHit { 5474 if x == nil { 5475 return nil 5476 } 5477 ret := make([]ChatSearchHit, len(x)) 5478 for i, v := range x { 5479 vCopy := v.DeepCopy() 5480 ret[i] = vCopy 5481 } 5482 return ret 5483 })(o.Hits), 5484 RateLimits: (func(x []RateLimit) []RateLimit { 5485 if x == nil { 5486 return nil 5487 } 5488 ret := make([]RateLimit, len(x)) 5489 for i, v := range x { 5490 vCopy := v.DeepCopy() 5491 ret[i] = vCopy 5492 } 5493 return ret 5494 })(o.RateLimits), 5495 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 5496 if x == nil { 5497 return nil 5498 } 5499 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 5500 for i, v := range x { 5501 vCopy := v.DeepCopy() 5502 ret[i] = vCopy 5503 } 5504 return ret 5505 })(o.IdentifyFailures), 5506 } 5507} 5508 5509type SearchInboxRes struct { 5510 Offline bool `codec:"offline" json:"offline"` 5511 Res *ChatSearchInboxResults `codec:"res,omitempty" json:"res,omitempty"` 5512 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 5513 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 5514} 5515 5516func (o SearchInboxRes) DeepCopy() SearchInboxRes { 5517 return SearchInboxRes{ 5518 Offline: o.Offline, 5519 Res: (func(x *ChatSearchInboxResults) *ChatSearchInboxResults { 5520 if x == nil { 5521 return nil 5522 } 5523 tmp := (*x).DeepCopy() 5524 return &tmp 5525 })(o.Res), 5526 RateLimits: (func(x []RateLimit) []RateLimit { 5527 if x == nil { 5528 return nil 5529 } 5530 ret := make([]RateLimit, len(x)) 5531 for i, v := range x { 5532 vCopy := v.DeepCopy() 5533 ret[i] = vCopy 5534 } 5535 return ret 5536 })(o.RateLimits), 5537 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 5538 if x == nil { 5539 return nil 5540 } 5541 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 5542 for i, v := range x { 5543 vCopy := v.DeepCopy() 5544 ret[i] = vCopy 5545 } 5546 return ret 5547 })(o.IdentifyFailures), 5548 } 5549} 5550 5551type SimpleSearchInboxConvNamesHit struct { 5552 Name string `codec:"name" json:"name"` 5553 ConvID ConversationID `codec:"convID" json:"convID"` 5554 IsTeam bool `codec:"isTeam" json:"isTeam"` 5555 Parts []string `codec:"parts" json:"parts"` 5556 TlfName string `codec:"tlfName" json:"tlfName"` 5557} 5558 5559func (o SimpleSearchInboxConvNamesHit) DeepCopy() SimpleSearchInboxConvNamesHit { 5560 return SimpleSearchInboxConvNamesHit{ 5561 Name: o.Name, 5562 ConvID: o.ConvID.DeepCopy(), 5563 IsTeam: o.IsTeam, 5564 Parts: (func(x []string) []string { 5565 if x == nil { 5566 return nil 5567 } 5568 ret := make([]string, len(x)) 5569 for i, v := range x { 5570 vCopy := v 5571 ret[i] = vCopy 5572 } 5573 return ret 5574 })(o.Parts), 5575 TlfName: o.TlfName, 5576 } 5577} 5578 5579type ProfileSearchConvStats struct { 5580 Err string `codec:"err" json:"err"` 5581 ConvName string `codec:"convName" json:"convName"` 5582 MinConvID MessageID `codec:"minConvID" json:"minConvID"` 5583 MaxConvID MessageID `codec:"maxConvID" json:"maxConvID"` 5584 NumMissing int `codec:"numMissing" json:"numMissing"` 5585 NumMessages int `codec:"numMessages" json:"numMessages"` 5586 IndexSizeDisk int `codec:"indexSizeDisk" json:"indexSizeDisk"` 5587 IndexSizeMem int64 `codec:"indexSizeMem" json:"indexSizeMem"` 5588 DurationMsec gregor1.DurationMsec `codec:"durationMsec" json:"durationMsec"` 5589 PercentIndexed int `codec:"percentIndexed" json:"percentIndexed"` 5590} 5591 5592func (o ProfileSearchConvStats) DeepCopy() ProfileSearchConvStats { 5593 return ProfileSearchConvStats{ 5594 Err: o.Err, 5595 ConvName: o.ConvName, 5596 MinConvID: o.MinConvID.DeepCopy(), 5597 MaxConvID: o.MaxConvID.DeepCopy(), 5598 NumMissing: o.NumMissing, 5599 NumMessages: o.NumMessages, 5600 IndexSizeDisk: o.IndexSizeDisk, 5601 IndexSizeMem: o.IndexSizeMem, 5602 DurationMsec: o.DurationMsec.DeepCopy(), 5603 PercentIndexed: o.PercentIndexed, 5604 } 5605} 5606 5607type BuiltinCommandGroup struct { 5608 Typ ConversationBuiltinCommandTyp `codec:"typ" json:"typ"` 5609 Commands []ConversationCommand `codec:"commands" json:"commands"` 5610} 5611 5612func (o BuiltinCommandGroup) DeepCopy() BuiltinCommandGroup { 5613 return BuiltinCommandGroup{ 5614 Typ: o.Typ.DeepCopy(), 5615 Commands: (func(x []ConversationCommand) []ConversationCommand { 5616 if x == nil { 5617 return nil 5618 } 5619 ret := make([]ConversationCommand, len(x)) 5620 for i, v := range x { 5621 vCopy := v.DeepCopy() 5622 ret[i] = vCopy 5623 } 5624 return ret 5625 })(o.Commands), 5626 } 5627} 5628 5629type StaticConfig struct { 5630 DeletableByDeleteHistory []MessageType `codec:"deletableByDeleteHistory" json:"deletableByDeleteHistory"` 5631 BuiltinCommands []BuiltinCommandGroup `codec:"builtinCommands" json:"builtinCommands"` 5632} 5633 5634func (o StaticConfig) DeepCopy() StaticConfig { 5635 return StaticConfig{ 5636 DeletableByDeleteHistory: (func(x []MessageType) []MessageType { 5637 if x == nil { 5638 return nil 5639 } 5640 ret := make([]MessageType, len(x)) 5641 for i, v := range x { 5642 vCopy := v.DeepCopy() 5643 ret[i] = vCopy 5644 } 5645 return ret 5646 })(o.DeletableByDeleteHistory), 5647 BuiltinCommands: (func(x []BuiltinCommandGroup) []BuiltinCommandGroup { 5648 if x == nil { 5649 return nil 5650 } 5651 ret := make([]BuiltinCommandGroup, len(x)) 5652 for i, v := range x { 5653 vCopy := v.DeepCopy() 5654 ret[i] = vCopy 5655 } 5656 return ret 5657 })(o.BuiltinCommands), 5658 } 5659} 5660 5661type UnfurlPromptAction int 5662 5663const ( 5664 UnfurlPromptAction_ALWAYS UnfurlPromptAction = 0 5665 UnfurlPromptAction_NEVER UnfurlPromptAction = 1 5666 UnfurlPromptAction_ACCEPT UnfurlPromptAction = 2 5667 UnfurlPromptAction_NOTNOW UnfurlPromptAction = 3 5668 UnfurlPromptAction_ONETIME UnfurlPromptAction = 4 5669) 5670 5671func (o UnfurlPromptAction) DeepCopy() UnfurlPromptAction { return o } 5672 5673var UnfurlPromptActionMap = map[string]UnfurlPromptAction{ 5674 "ALWAYS": 0, 5675 "NEVER": 1, 5676 "ACCEPT": 2, 5677 "NOTNOW": 3, 5678 "ONETIME": 4, 5679} 5680 5681var UnfurlPromptActionRevMap = map[UnfurlPromptAction]string{ 5682 0: "ALWAYS", 5683 1: "NEVER", 5684 2: "ACCEPT", 5685 3: "NOTNOW", 5686 4: "ONETIME", 5687} 5688 5689func (e UnfurlPromptAction) String() string { 5690 if v, ok := UnfurlPromptActionRevMap[e]; ok { 5691 return v 5692 } 5693 return fmt.Sprintf("%v", int(e)) 5694} 5695 5696type UnfurlPromptResult struct { 5697 ActionType__ UnfurlPromptAction `codec:"actionType" json:"actionType"` 5698 Accept__ *string `codec:"accept,omitempty" json:"accept,omitempty"` 5699 Onetime__ *string `codec:"onetime,omitempty" json:"onetime,omitempty"` 5700} 5701 5702func (o *UnfurlPromptResult) ActionType() (ret UnfurlPromptAction, err error) { 5703 switch o.ActionType__ { 5704 case UnfurlPromptAction_ACCEPT: 5705 if o.Accept__ == nil { 5706 err = errors.New("unexpected nil value for Accept__") 5707 return ret, err 5708 } 5709 case UnfurlPromptAction_ONETIME: 5710 if o.Onetime__ == nil { 5711 err = errors.New("unexpected nil value for Onetime__") 5712 return ret, err 5713 } 5714 } 5715 return o.ActionType__, nil 5716} 5717 5718func (o UnfurlPromptResult) Accept() (res string) { 5719 if o.ActionType__ != UnfurlPromptAction_ACCEPT { 5720 panic("wrong case accessed") 5721 } 5722 if o.Accept__ == nil { 5723 return 5724 } 5725 return *o.Accept__ 5726} 5727 5728func (o UnfurlPromptResult) Onetime() (res string) { 5729 if o.ActionType__ != UnfurlPromptAction_ONETIME { 5730 panic("wrong case accessed") 5731 } 5732 if o.Onetime__ == nil { 5733 return 5734 } 5735 return *o.Onetime__ 5736} 5737 5738func NewUnfurlPromptResultWithAlways() UnfurlPromptResult { 5739 return UnfurlPromptResult{ 5740 ActionType__: UnfurlPromptAction_ALWAYS, 5741 } 5742} 5743 5744func NewUnfurlPromptResultWithNever() UnfurlPromptResult { 5745 return UnfurlPromptResult{ 5746 ActionType__: UnfurlPromptAction_NEVER, 5747 } 5748} 5749 5750func NewUnfurlPromptResultWithNotnow() UnfurlPromptResult { 5751 return UnfurlPromptResult{ 5752 ActionType__: UnfurlPromptAction_NOTNOW, 5753 } 5754} 5755 5756func NewUnfurlPromptResultWithAccept(v string) UnfurlPromptResult { 5757 return UnfurlPromptResult{ 5758 ActionType__: UnfurlPromptAction_ACCEPT, 5759 Accept__: &v, 5760 } 5761} 5762 5763func NewUnfurlPromptResultWithOnetime(v string) UnfurlPromptResult { 5764 return UnfurlPromptResult{ 5765 ActionType__: UnfurlPromptAction_ONETIME, 5766 Onetime__: &v, 5767 } 5768} 5769 5770func (o UnfurlPromptResult) DeepCopy() UnfurlPromptResult { 5771 return UnfurlPromptResult{ 5772 ActionType__: o.ActionType__.DeepCopy(), 5773 Accept__: (func(x *string) *string { 5774 if x == nil { 5775 return nil 5776 } 5777 tmp := (*x) 5778 return &tmp 5779 })(o.Accept__), 5780 Onetime__: (func(x *string) *string { 5781 if x == nil { 5782 return nil 5783 } 5784 tmp := (*x) 5785 return &tmp 5786 })(o.Onetime__), 5787 } 5788} 5789 5790type GalleryItemTyp int 5791 5792const ( 5793 GalleryItemTyp_MEDIA GalleryItemTyp = 0 5794 GalleryItemTyp_LINK GalleryItemTyp = 1 5795 GalleryItemTyp_DOC GalleryItemTyp = 2 5796) 5797 5798func (o GalleryItemTyp) DeepCopy() GalleryItemTyp { return o } 5799 5800var GalleryItemTypMap = map[string]GalleryItemTyp{ 5801 "MEDIA": 0, 5802 "LINK": 1, 5803 "DOC": 2, 5804} 5805 5806var GalleryItemTypRevMap = map[GalleryItemTyp]string{ 5807 0: "MEDIA", 5808 1: "LINK", 5809 2: "DOC", 5810} 5811 5812func (e GalleryItemTyp) String() string { 5813 if v, ok := GalleryItemTypRevMap[e]; ok { 5814 return v 5815 } 5816 return fmt.Sprintf("%v", int(e)) 5817} 5818 5819type LoadGalleryRes struct { 5820 Messages []UIMessage `codec:"messages" json:"messages"` 5821 Last bool `codec:"last" json:"last"` 5822 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 5823 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 5824} 5825 5826func (o LoadGalleryRes) DeepCopy() LoadGalleryRes { 5827 return LoadGalleryRes{ 5828 Messages: (func(x []UIMessage) []UIMessage { 5829 if x == nil { 5830 return nil 5831 } 5832 ret := make([]UIMessage, len(x)) 5833 for i, v := range x { 5834 vCopy := v.DeepCopy() 5835 ret[i] = vCopy 5836 } 5837 return ret 5838 })(o.Messages), 5839 Last: o.Last, 5840 RateLimits: (func(x []RateLimit) []RateLimit { 5841 if x == nil { 5842 return nil 5843 } 5844 ret := make([]RateLimit, len(x)) 5845 for i, v := range x { 5846 vCopy := v.DeepCopy() 5847 ret[i] = vCopy 5848 } 5849 return ret 5850 })(o.RateLimits), 5851 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 5852 if x == nil { 5853 return nil 5854 } 5855 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 5856 for i, v := range x { 5857 vCopy := v.DeepCopy() 5858 ret[i] = vCopy 5859 } 5860 return ret 5861 })(o.IdentifyFailures), 5862 } 5863} 5864 5865type LoadFlipRes struct { 5866 Status UICoinFlipStatus `codec:"status" json:"status"` 5867 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 5868 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` 5869} 5870 5871func (o LoadFlipRes) DeepCopy() LoadFlipRes { 5872 return LoadFlipRes{ 5873 Status: o.Status.DeepCopy(), 5874 RateLimits: (func(x []RateLimit) []RateLimit { 5875 if x == nil { 5876 return nil 5877 } 5878 ret := make([]RateLimit, len(x)) 5879 for i, v := range x { 5880 vCopy := v.DeepCopy() 5881 ret[i] = vCopy 5882 } 5883 return ret 5884 })(o.RateLimits), 5885 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 5886 if x == nil { 5887 return nil 5888 } 5889 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 5890 for i, v := range x { 5891 vCopy := v.DeepCopy() 5892 ret[i] = vCopy 5893 } 5894 return ret 5895 })(o.IdentifyFailures), 5896 } 5897} 5898 5899type UserBotExtendedDescription struct { 5900 Title string `codec:"title" json:"title"` 5901 DesktopBody string `codec:"desktopBody" json:"desktop_body"` 5902 MobileBody string `codec:"mobileBody" json:"mobile_body"` 5903} 5904 5905func (o UserBotExtendedDescription) DeepCopy() UserBotExtendedDescription { 5906 return UserBotExtendedDescription{ 5907 Title: o.Title, 5908 DesktopBody: o.DesktopBody, 5909 MobileBody: o.MobileBody, 5910 } 5911} 5912 5913type UserBotCommandOutput struct { 5914 Name string `codec:"name" json:"name"` 5915 Description string `codec:"description" json:"description"` 5916 Usage string `codec:"usage" json:"usage"` 5917 ExtendedDescription *UserBotExtendedDescription `codec:"extendedDescription,omitempty" json:"extended_description,omitempty"` 5918 Username string `codec:"username" json:"username"` 5919} 5920 5921func (o UserBotCommandOutput) DeepCopy() UserBotCommandOutput { 5922 return UserBotCommandOutput{ 5923 Name: o.Name, 5924 Description: o.Description, 5925 Usage: o.Usage, 5926 ExtendedDescription: (func(x *UserBotExtendedDescription) *UserBotExtendedDescription { 5927 if x == nil { 5928 return nil 5929 } 5930 tmp := (*x).DeepCopy() 5931 return &tmp 5932 })(o.ExtendedDescription), 5933 Username: o.Username, 5934 } 5935} 5936 5937type UserBotCommandInput struct { 5938 Name string `codec:"name" json:"name"` 5939 Description string `codec:"description" json:"description"` 5940 Usage string `codec:"usage" json:"usage"` 5941 ExtendedDescription *UserBotExtendedDescription `codec:"extendedDescription,omitempty" json:"extended_description,omitempty"` 5942} 5943 5944func (o UserBotCommandInput) DeepCopy() UserBotCommandInput { 5945 return UserBotCommandInput{ 5946 Name: o.Name, 5947 Description: o.Description, 5948 Usage: o.Usage, 5949 ExtendedDescription: (func(x *UserBotExtendedDescription) *UserBotExtendedDescription { 5950 if x == nil { 5951 return nil 5952 } 5953 tmp := (*x).DeepCopy() 5954 return &tmp 5955 })(o.ExtendedDescription), 5956 } 5957} 5958 5959type AdvertiseCommandsParam struct { 5960 Typ BotCommandsAdvertisementTyp `codec:"typ" json:"typ"` 5961 Commands []UserBotCommandInput `codec:"commands" json:"commands"` 5962 TeamName *string `codec:"teamName,omitempty" json:"teamName,omitempty"` 5963 ConvID *ConversationID `codec:"convID,omitempty" json:"convID,omitempty"` 5964} 5965 5966func (o AdvertiseCommandsParam) DeepCopy() AdvertiseCommandsParam { 5967 return AdvertiseCommandsParam{ 5968 Typ: o.Typ.DeepCopy(), 5969 Commands: (func(x []UserBotCommandInput) []UserBotCommandInput { 5970 if x == nil { 5971 return nil 5972 } 5973 ret := make([]UserBotCommandInput, len(x)) 5974 for i, v := range x { 5975 vCopy := v.DeepCopy() 5976 ret[i] = vCopy 5977 } 5978 return ret 5979 })(o.Commands), 5980 TeamName: (func(x *string) *string { 5981 if x == nil { 5982 return nil 5983 } 5984 tmp := (*x) 5985 return &tmp 5986 })(o.TeamName), 5987 ConvID: (func(x *ConversationID) *ConversationID { 5988 if x == nil { 5989 return nil 5990 } 5991 tmp := (*x).DeepCopy() 5992 return &tmp 5993 })(o.ConvID), 5994 } 5995} 5996 5997type AdvertiseBotCommandsLocalRes struct { 5998 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 5999} 6000 6001func (o AdvertiseBotCommandsLocalRes) DeepCopy() AdvertiseBotCommandsLocalRes { 6002 return AdvertiseBotCommandsLocalRes{ 6003 RateLimits: (func(x []RateLimit) []RateLimit { 6004 if x == nil { 6005 return nil 6006 } 6007 ret := make([]RateLimit, len(x)) 6008 for i, v := range x { 6009 vCopy := v.DeepCopy() 6010 ret[i] = vCopy 6011 } 6012 return ret 6013 })(o.RateLimits), 6014 } 6015} 6016 6017type ListBotCommandsLocalRes struct { 6018 Commands []UserBotCommandOutput `codec:"commands" json:"commands"` 6019 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 6020} 6021 6022func (o ListBotCommandsLocalRes) DeepCopy() ListBotCommandsLocalRes { 6023 return ListBotCommandsLocalRes{ 6024 Commands: (func(x []UserBotCommandOutput) []UserBotCommandOutput { 6025 if x == nil { 6026 return nil 6027 } 6028 ret := make([]UserBotCommandOutput, len(x)) 6029 for i, v := range x { 6030 vCopy := v.DeepCopy() 6031 ret[i] = vCopy 6032 } 6033 return ret 6034 })(o.Commands), 6035 RateLimits: (func(x []RateLimit) []RateLimit { 6036 if x == nil { 6037 return nil 6038 } 6039 ret := make([]RateLimit, len(x)) 6040 for i, v := range x { 6041 vCopy := v.DeepCopy() 6042 ret[i] = vCopy 6043 } 6044 return ret 6045 })(o.RateLimits), 6046 } 6047} 6048 6049type ClearBotCommandsFilter struct { 6050 Typ BotCommandsAdvertisementTyp `codec:"typ" json:"typ"` 6051 TeamName *string `codec:"teamName,omitempty" json:"teamName,omitempty"` 6052 ConvID *ConversationID `codec:"convID,omitempty" json:"convID,omitempty"` 6053} 6054 6055func (o ClearBotCommandsFilter) DeepCopy() ClearBotCommandsFilter { 6056 return ClearBotCommandsFilter{ 6057 Typ: o.Typ.DeepCopy(), 6058 TeamName: (func(x *string) *string { 6059 if x == nil { 6060 return nil 6061 } 6062 tmp := (*x) 6063 return &tmp 6064 })(o.TeamName), 6065 ConvID: (func(x *ConversationID) *ConversationID { 6066 if x == nil { 6067 return nil 6068 } 6069 tmp := (*x).DeepCopy() 6070 return &tmp 6071 })(o.ConvID), 6072 } 6073} 6074 6075type ClearBotCommandsLocalRes struct { 6076 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 6077} 6078 6079func (o ClearBotCommandsLocalRes) DeepCopy() ClearBotCommandsLocalRes { 6080 return ClearBotCommandsLocalRes{ 6081 RateLimits: (func(x []RateLimit) []RateLimit { 6082 if x == nil { 6083 return nil 6084 } 6085 ret := make([]RateLimit, len(x)) 6086 for i, v := range x { 6087 vCopy := v.DeepCopy() 6088 ret[i] = vCopy 6089 } 6090 return ret 6091 })(o.RateLimits), 6092 } 6093} 6094 6095type PinMessageRes struct { 6096 RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` 6097} 6098 6099func (o PinMessageRes) DeepCopy() PinMessageRes { 6100 return PinMessageRes{ 6101 RateLimits: (func(x []RateLimit) []RateLimit { 6102 if x == nil { 6103 return nil 6104 } 6105 ret := make([]RateLimit, len(x)) 6106 for i, v := range x { 6107 vCopy := v.DeepCopy() 6108 ret[i] = vCopy 6109 } 6110 return ret 6111 })(o.RateLimits), 6112 } 6113} 6114 6115type AddBotConvSearchHit struct { 6116 Name string `codec:"name" json:"name"` 6117 ConvID ConversationID `codec:"convID" json:"convID"` 6118 IsTeam bool `codec:"isTeam" json:"isTeam"` 6119 Parts []string `codec:"parts" json:"parts"` 6120} 6121 6122func (o AddBotConvSearchHit) DeepCopy() AddBotConvSearchHit { 6123 return AddBotConvSearchHit{ 6124 Name: o.Name, 6125 ConvID: o.ConvID.DeepCopy(), 6126 IsTeam: o.IsTeam, 6127 Parts: (func(x []string) []string { 6128 if x == nil { 6129 return nil 6130 } 6131 ret := make([]string, len(x)) 6132 for i, v := range x { 6133 vCopy := v 6134 ret[i] = vCopy 6135 } 6136 return ret 6137 })(o.Parts), 6138 } 6139} 6140 6141type LocalMtimeUpdate struct { 6142 ConvID ConversationID `codec:"convID" json:"convID"` 6143 Mtime gregor1.Time `codec:"mtime" json:"mtime"` 6144} 6145 6146func (o LocalMtimeUpdate) DeepCopy() LocalMtimeUpdate { 6147 return LocalMtimeUpdate{ 6148 ConvID: o.ConvID.DeepCopy(), 6149 Mtime: o.Mtime.DeepCopy(), 6150 } 6151} 6152 6153type SnippetDecoration int 6154 6155const ( 6156 SnippetDecoration_NONE SnippetDecoration = 0 6157 SnippetDecoration_PENDING_MESSAGE SnippetDecoration = 1 6158 SnippetDecoration_FAILED_PENDING_MESSAGE SnippetDecoration = 2 6159 SnippetDecoration_EXPLODING_MESSAGE SnippetDecoration = 3 6160 SnippetDecoration_EXPLODED_MESSAGE SnippetDecoration = 4 6161 SnippetDecoration_AUDIO_ATTACHMENT SnippetDecoration = 5 6162 SnippetDecoration_VIDEO_ATTACHMENT SnippetDecoration = 6 6163 SnippetDecoration_PHOTO_ATTACHMENT SnippetDecoration = 7 6164 SnippetDecoration_FILE_ATTACHMENT SnippetDecoration = 8 6165 SnippetDecoration_STELLAR_RECEIVED SnippetDecoration = 9 6166 SnippetDecoration_STELLAR_SENT SnippetDecoration = 10 6167 SnippetDecoration_PINNED_MESSAGE SnippetDecoration = 11 6168) 6169 6170func (o SnippetDecoration) DeepCopy() SnippetDecoration { return o } 6171 6172var SnippetDecorationMap = map[string]SnippetDecoration{ 6173 "NONE": 0, 6174 "PENDING_MESSAGE": 1, 6175 "FAILED_PENDING_MESSAGE": 2, 6176 "EXPLODING_MESSAGE": 3, 6177 "EXPLODED_MESSAGE": 4, 6178 "AUDIO_ATTACHMENT": 5, 6179 "VIDEO_ATTACHMENT": 6, 6180 "PHOTO_ATTACHMENT": 7, 6181 "FILE_ATTACHMENT": 8, 6182 "STELLAR_RECEIVED": 9, 6183 "STELLAR_SENT": 10, 6184 "PINNED_MESSAGE": 11, 6185} 6186 6187var SnippetDecorationRevMap = map[SnippetDecoration]string{ 6188 0: "NONE", 6189 1: "PENDING_MESSAGE", 6190 2: "FAILED_PENDING_MESSAGE", 6191 3: "EXPLODING_MESSAGE", 6192 4: "EXPLODED_MESSAGE", 6193 5: "AUDIO_ATTACHMENT", 6194 6: "VIDEO_ATTACHMENT", 6195 7: "PHOTO_ATTACHMENT", 6196 8: "FILE_ATTACHMENT", 6197 9: "STELLAR_RECEIVED", 6198 10: "STELLAR_SENT", 6199 11: "PINNED_MESSAGE", 6200} 6201 6202func (e SnippetDecoration) String() string { 6203 if v, ok := SnippetDecorationRevMap[e]; ok { 6204 return v 6205 } 6206 return fmt.Sprintf("%v", int(e)) 6207} 6208 6209type WelcomeMessageDisplay struct { 6210 Set bool `codec:"set" json:"set"` 6211 Display string `codec:"display" json:"display"` 6212 Raw string `codec:"raw" json:"raw"` 6213} 6214 6215func (o WelcomeMessageDisplay) DeepCopy() WelcomeMessageDisplay { 6216 return WelcomeMessageDisplay{ 6217 Set: o.Set, 6218 Display: o.Display, 6219 Raw: o.Raw, 6220 } 6221} 6222 6223type WelcomeMessage struct { 6224 Set bool `codec:"set" json:"set"` 6225 Raw string `codec:"raw" json:"raw"` 6226} 6227 6228func (o WelcomeMessage) DeepCopy() WelcomeMessage { 6229 return WelcomeMessage{ 6230 Set: o.Set, 6231 Raw: o.Raw, 6232 } 6233} 6234 6235type GetDefaultTeamChannelsLocalRes struct { 6236 Convs []InboxUIItem `codec:"convs" json:"convs"` 6237 RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` 6238} 6239 6240func (o GetDefaultTeamChannelsLocalRes) DeepCopy() GetDefaultTeamChannelsLocalRes { 6241 return GetDefaultTeamChannelsLocalRes{ 6242 Convs: (func(x []InboxUIItem) []InboxUIItem { 6243 if x == nil { 6244 return nil 6245 } 6246 ret := make([]InboxUIItem, len(x)) 6247 for i, v := range x { 6248 vCopy := v.DeepCopy() 6249 ret[i] = vCopy 6250 } 6251 return ret 6252 })(o.Convs), 6253 RateLimit: (func(x *RateLimit) *RateLimit { 6254 if x == nil { 6255 return nil 6256 } 6257 tmp := (*x).DeepCopy() 6258 return &tmp 6259 })(o.RateLimit), 6260 } 6261} 6262 6263type SetDefaultTeamChannelsLocalRes struct { 6264 RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` 6265} 6266 6267func (o SetDefaultTeamChannelsLocalRes) DeepCopy() SetDefaultTeamChannelsLocalRes { 6268 return SetDefaultTeamChannelsLocalRes{ 6269 RateLimit: (func(x *RateLimit) *RateLimit { 6270 if x == nil { 6271 return nil 6272 } 6273 tmp := (*x).DeepCopy() 6274 return &tmp 6275 })(o.RateLimit), 6276 } 6277} 6278 6279type LastActiveTimeAll struct { 6280 Teams map[TLFIDStr]gregor1.Time `codec:"teams" json:"teams"` 6281 Channels map[ConvIDStr]gregor1.Time `codec:"channels" json:"channels"` 6282} 6283 6284func (o LastActiveTimeAll) DeepCopy() LastActiveTimeAll { 6285 return LastActiveTimeAll{ 6286 Teams: (func(x map[TLFIDStr]gregor1.Time) map[TLFIDStr]gregor1.Time { 6287 if x == nil { 6288 return nil 6289 } 6290 ret := make(map[TLFIDStr]gregor1.Time, len(x)) 6291 for k, v := range x { 6292 kCopy := k.DeepCopy() 6293 vCopy := v.DeepCopy() 6294 ret[kCopy] = vCopy 6295 } 6296 return ret 6297 })(o.Teams), 6298 Channels: (func(x map[ConvIDStr]gregor1.Time) map[ConvIDStr]gregor1.Time { 6299 if x == nil { 6300 return nil 6301 } 6302 ret := make(map[ConvIDStr]gregor1.Time, len(x)) 6303 for k, v := range x { 6304 kCopy := k.DeepCopy() 6305 vCopy := v.DeepCopy() 6306 ret[kCopy] = vCopy 6307 } 6308 return ret 6309 })(o.Channels), 6310 } 6311} 6312 6313type LastActiveStatusAll struct { 6314 Teams map[TLFIDStr]LastActiveStatus `codec:"teams" json:"teams"` 6315 Channels map[ConvIDStr]LastActiveStatus `codec:"channels" json:"channels"` 6316} 6317 6318func (o LastActiveStatusAll) DeepCopy() LastActiveStatusAll { 6319 return LastActiveStatusAll{ 6320 Teams: (func(x map[TLFIDStr]LastActiveStatus) map[TLFIDStr]LastActiveStatus { 6321 if x == nil { 6322 return nil 6323 } 6324 ret := make(map[TLFIDStr]LastActiveStatus, len(x)) 6325 for k, v := range x { 6326 kCopy := k.DeepCopy() 6327 vCopy := v.DeepCopy() 6328 ret[kCopy] = vCopy 6329 } 6330 return ret 6331 })(o.Teams), 6332 Channels: (func(x map[ConvIDStr]LastActiveStatus) map[ConvIDStr]LastActiveStatus { 6333 if x == nil { 6334 return nil 6335 } 6336 ret := make(map[ConvIDStr]LastActiveStatus, len(x)) 6337 for k, v := range x { 6338 kCopy := k.DeepCopy() 6339 vCopy := v.DeepCopy() 6340 ret[kCopy] = vCopy 6341 } 6342 return ret 6343 })(o.Channels), 6344 } 6345} 6346 6347type EmojiError struct { 6348 Clidisplay string `codec:"clidisplay" json:"clidisplay"` 6349 Uidisplay string `codec:"uidisplay" json:"uidisplay"` 6350} 6351 6352func (o EmojiError) DeepCopy() EmojiError { 6353 return EmojiError{ 6354 Clidisplay: o.Clidisplay, 6355 Uidisplay: o.Uidisplay, 6356 } 6357} 6358 6359type AddEmojiRes struct { 6360 RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` 6361 Error *EmojiError `codec:"error,omitempty" json:"error,omitempty"` 6362} 6363 6364func (o AddEmojiRes) DeepCopy() AddEmojiRes { 6365 return AddEmojiRes{ 6366 RateLimit: (func(x *RateLimit) *RateLimit { 6367 if x == nil { 6368 return nil 6369 } 6370 tmp := (*x).DeepCopy() 6371 return &tmp 6372 })(o.RateLimit), 6373 Error: (func(x *EmojiError) *EmojiError { 6374 if x == nil { 6375 return nil 6376 } 6377 tmp := (*x).DeepCopy() 6378 return &tmp 6379 })(o.Error), 6380 } 6381} 6382 6383type AddEmojisRes struct { 6384 RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` 6385 SuccessFilenames []string `codec:"successFilenames" json:"successFilenames"` 6386 FailedFilenames map[string]EmojiError `codec:"failedFilenames" json:"failedFilenames"` 6387} 6388 6389func (o AddEmojisRes) DeepCopy() AddEmojisRes { 6390 return AddEmojisRes{ 6391 RateLimit: (func(x *RateLimit) *RateLimit { 6392 if x == nil { 6393 return nil 6394 } 6395 tmp := (*x).DeepCopy() 6396 return &tmp 6397 })(o.RateLimit), 6398 SuccessFilenames: (func(x []string) []string { 6399 if x == nil { 6400 return nil 6401 } 6402 ret := make([]string, len(x)) 6403 for i, v := range x { 6404 vCopy := v 6405 ret[i] = vCopy 6406 } 6407 return ret 6408 })(o.SuccessFilenames), 6409 FailedFilenames: (func(x map[string]EmojiError) map[string]EmojiError { 6410 if x == nil { 6411 return nil 6412 } 6413 ret := make(map[string]EmojiError, len(x)) 6414 for k, v := range x { 6415 kCopy := k 6416 vCopy := v.DeepCopy() 6417 ret[kCopy] = vCopy 6418 } 6419 return ret 6420 })(o.FailedFilenames), 6421 } 6422} 6423 6424type AddEmojiAliasRes struct { 6425 RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` 6426 Error *EmojiError `codec:"error,omitempty" json:"error,omitempty"` 6427} 6428 6429func (o AddEmojiAliasRes) DeepCopy() AddEmojiAliasRes { 6430 return AddEmojiAliasRes{ 6431 RateLimit: (func(x *RateLimit) *RateLimit { 6432 if x == nil { 6433 return nil 6434 } 6435 tmp := (*x).DeepCopy() 6436 return &tmp 6437 })(o.RateLimit), 6438 Error: (func(x *EmojiError) *EmojiError { 6439 if x == nil { 6440 return nil 6441 } 6442 tmp := (*x).DeepCopy() 6443 return &tmp 6444 })(o.Error), 6445 } 6446} 6447 6448type RemoveEmojiRes struct { 6449 RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` 6450} 6451 6452func (o RemoveEmojiRes) DeepCopy() RemoveEmojiRes { 6453 return RemoveEmojiRes{ 6454 RateLimit: (func(x *RateLimit) *RateLimit { 6455 if x == nil { 6456 return nil 6457 } 6458 tmp := (*x).DeepCopy() 6459 return &tmp 6460 })(o.RateLimit), 6461 } 6462} 6463 6464type UserEmojiRes struct { 6465 Emojis UserEmojis `codec:"emojis" json:"emojis"` 6466 RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` 6467} 6468 6469func (o UserEmojiRes) DeepCopy() UserEmojiRes { 6470 return UserEmojiRes{ 6471 Emojis: o.Emojis.DeepCopy(), 6472 RateLimit: (func(x *RateLimit) *RateLimit { 6473 if x == nil { 6474 return nil 6475 } 6476 tmp := (*x).DeepCopy() 6477 return &tmp 6478 })(o.RateLimit), 6479 } 6480} 6481 6482type EmojiFetchOpts struct { 6483 GetCreationInfo bool `codec:"getCreationInfo" json:"getCreationInfo"` 6484 GetAliases bool `codec:"getAliases" json:"getAliases"` 6485 OnlyInTeam bool `codec:"onlyInTeam" json:"onlyInTeam"` 6486} 6487 6488func (o EmojiFetchOpts) DeepCopy() EmojiFetchOpts { 6489 return EmojiFetchOpts{ 6490 GetCreationInfo: o.GetCreationInfo, 6491 GetAliases: o.GetAliases, 6492 OnlyInTeam: o.OnlyInTeam, 6493 } 6494} 6495