// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: CIM.Def.proto
//
// For information on using the generated types, please see the documentation:
//   https://github.com/apple/swift-protobuf/

import Foundation
import SwiftProtobuf

// If the compiler emits an error on this type, it is because this file
// was generated by a version of the `protoc` Swift plug-in that is
// incompatible with the version of SwiftProtobuf to which you are linking.
// Please ensure that you are building against the same version of the API
// that was used to generate this file.
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
  struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
  typealias Version = _2
}

/// 外部消息：客户端 <-> 服务器消息定义
enum CIM_Def_CIMCmdID: SwiftProtobuf.Enum {
  typealias RawValue = Int
  case kCimCidUnknown // = 0

  /// 认证请求，Token方式
  case kCimCidLoginAuthTokenReq // = 257
  case kCimCidLoginAuthTokenRsp // = 258

  /// 登出
  case kCimCidLoginAuthLogoutReq // = 259
  case kCimCidLoginAuthLogoutRsp // = 260

  /// 心跳，1分钟超时
  case kCimCidLoginHeartbeat // = 261

  /// 认证请求，用户名+密码方式
  case kCimCidLoginAuthReq // = 263
  case kCimCidLoginAuthRsp // = 264

  /// 最近聊天会话列表请求
  case kCimCidListRecentContactSessionReq // = 513
  case kCimCidListRecentContactSessionRsp // = 514

  /// kCIM_CID_LIST_UNREAD_CNT_REQ = 0x0203; // 未读消息计数列表请求
  /// kCIM_CID_LIST_UNREAD_CNT_RSP = 0x0204;
  case kCimCidListMsgReq // = 517
  case kCimCidListMsgRsp // = 518

  /// 发送消息
  case kCimCidMsgData // = 769

  /// 消息收到回复
  case kCimCidMsgDataAck // = 770

  /// 消息已读回复（我方）
  case kCimCidMsgReadAck // = 771

  /// 已读消息通知（对方）
  case kCimCidMsgReadNotify // = 772

  /// 某个会话最新的消息ID请求
  case kCimCidMsgGetLatestMsgIDReq // = 773
  case kCimCidMsgGetLatestMsgIDRsp // = 774

  /// 批量查询消息详情请求(20条内)
  case kCimCidMsgGetByMsgIDReq // = 775
  case kCimCidMsgGetByMsgIDRsp // = 776

  /// 1.invite
  case kCimCidVoipInviteReq // = 1025

  /// 2.100 Tring/180 Ringing/200 OK
  case kCimCidVoipInviteReply // = 1026

  /// 3.200 Ok的Ack
  case kCimCidVoipInviteReplyAck // = 1027

  /// 4.heartbeat，30秒超时
  case kCimCidVoipHeartbeat // = 1028

  /// 5.Bye
  case kCimCidVoipByeReq // = 1029
  case kCimCidVoipByeRsp // = 1030

  /// 6.Bye notify
  case kCimCidVoipByeNotify // = 1031

  /// 创建默认群（类似微信的群）
  case kCimCidGroupCreateDefaultReq // = 1281
  case kCimCidGroupCreateDefaultRsp // = 1282

  /// 解散群
  case kCimCidGroupDisbingdingReq // = 1283
  case kCimCidGroupDisbingdingRsp // = 1284

  /// 退出群
  case kCimCidGroupExitReq // = 1285
  case kCimCidGroupExitRsp // = 1286

  /// 查询群列表
  case kCimCidGroupListReq // = 1287
  case kCimCidGroupListRsp // = 1288

  /// 查询群信息
  case kCimCidGroupInfoReq // = 1289
  case kCimCidGroupInfoRsp // = 1296

  /// 邀请人入群
  case kCimCidGroupInviteMemberReq // = 1297
  case kCimCidGroupInviteMemberRsp // = 1298

  /// 踢人
  case kCimCidGroupKickOutMemberReq // = 1299
  case kCimCidGroupKickOutMemberRsp // = 1300

  /// 群成员变更通知
  case kCimCidGroupMemberChangedNotify // = 1301

  /// 查询群成员列表
  case kCimCidGroupListMemberReq // = 1302
  case kCimCidGroupListMemberRsp // = 1303

  /// 查询用户列表（目前没有实现好友机制，所以便于测试，随机返回系统中注册的50个以内用户）
  case kCimCidFriendQueryUserListReq // = 1537
  case kCimCidFriendQueryUserListRsp // = 1538
  case UNRECOGNIZED(Int)

  init() {
    self = .kCimCidUnknown
  }

  init?(rawValue: Int) {
    switch rawValue {
    case 0: self = .kCimCidUnknown
    case 257: self = .kCimCidLoginAuthTokenReq
    case 258: self = .kCimCidLoginAuthTokenRsp
    case 259: self = .kCimCidLoginAuthLogoutReq
    case 260: self = .kCimCidLoginAuthLogoutRsp
    case 261: self = .kCimCidLoginHeartbeat
    case 263: self = .kCimCidLoginAuthReq
    case 264: self = .kCimCidLoginAuthRsp
    case 513: self = .kCimCidListRecentContactSessionReq
    case 514: self = .kCimCidListRecentContactSessionRsp
    case 517: self = .kCimCidListMsgReq
    case 518: self = .kCimCidListMsgRsp
    case 769: self = .kCimCidMsgData
    case 770: self = .kCimCidMsgDataAck
    case 771: self = .kCimCidMsgReadAck
    case 772: self = .kCimCidMsgReadNotify
    case 773: self = .kCimCidMsgGetLatestMsgIDReq
    case 774: self = .kCimCidMsgGetLatestMsgIDRsp
    case 775: self = .kCimCidMsgGetByMsgIDReq
    case 776: self = .kCimCidMsgGetByMsgIDRsp
    case 1025: self = .kCimCidVoipInviteReq
    case 1026: self = .kCimCidVoipInviteReply
    case 1027: self = .kCimCidVoipInviteReplyAck
    case 1028: self = .kCimCidVoipHeartbeat
    case 1029: self = .kCimCidVoipByeReq
    case 1030: self = .kCimCidVoipByeRsp
    case 1031: self = .kCimCidVoipByeNotify
    case 1281: self = .kCimCidGroupCreateDefaultReq
    case 1282: self = .kCimCidGroupCreateDefaultRsp
    case 1283: self = .kCimCidGroupDisbingdingReq
    case 1284: self = .kCimCidGroupDisbingdingRsp
    case 1285: self = .kCimCidGroupExitReq
    case 1286: self = .kCimCidGroupExitRsp
    case 1287: self = .kCimCidGroupListReq
    case 1288: self = .kCimCidGroupListRsp
    case 1289: self = .kCimCidGroupInfoReq
    case 1296: self = .kCimCidGroupInfoRsp
    case 1297: self = .kCimCidGroupInviteMemberReq
    case 1298: self = .kCimCidGroupInviteMemberRsp
    case 1299: self = .kCimCidGroupKickOutMemberReq
    case 1300: self = .kCimCidGroupKickOutMemberRsp
    case 1301: self = .kCimCidGroupMemberChangedNotify
    case 1302: self = .kCimCidGroupListMemberReq
    case 1303: self = .kCimCidGroupListMemberRsp
    case 1537: self = .kCimCidFriendQueryUserListReq
    case 1538: self = .kCimCidFriendQueryUserListRsp
    default: self = .UNRECOGNIZED(rawValue)
    }
  }

  var rawValue: Int {
    switch self {
    case .kCimCidUnknown: return 0
    case .kCimCidLoginAuthTokenReq: return 257
    case .kCimCidLoginAuthTokenRsp: return 258
    case .kCimCidLoginAuthLogoutReq: return 259
    case .kCimCidLoginAuthLogoutRsp: return 260
    case .kCimCidLoginHeartbeat: return 261
    case .kCimCidLoginAuthReq: return 263
    case .kCimCidLoginAuthRsp: return 264
    case .kCimCidListRecentContactSessionReq: return 513
    case .kCimCidListRecentContactSessionRsp: return 514
    case .kCimCidListMsgReq: return 517
    case .kCimCidListMsgRsp: return 518
    case .kCimCidMsgData: return 769
    case .kCimCidMsgDataAck: return 770
    case .kCimCidMsgReadAck: return 771
    case .kCimCidMsgReadNotify: return 772
    case .kCimCidMsgGetLatestMsgIDReq: return 773
    case .kCimCidMsgGetLatestMsgIDRsp: return 774
    case .kCimCidMsgGetByMsgIDReq: return 775
    case .kCimCidMsgGetByMsgIDRsp: return 776
    case .kCimCidVoipInviteReq: return 1025
    case .kCimCidVoipInviteReply: return 1026
    case .kCimCidVoipInviteReplyAck: return 1027
    case .kCimCidVoipHeartbeat: return 1028
    case .kCimCidVoipByeReq: return 1029
    case .kCimCidVoipByeRsp: return 1030
    case .kCimCidVoipByeNotify: return 1031
    case .kCimCidGroupCreateDefaultReq: return 1281
    case .kCimCidGroupCreateDefaultRsp: return 1282
    case .kCimCidGroupDisbingdingReq: return 1283
    case .kCimCidGroupDisbingdingRsp: return 1284
    case .kCimCidGroupExitReq: return 1285
    case .kCimCidGroupExitRsp: return 1286
    case .kCimCidGroupListReq: return 1287
    case .kCimCidGroupListRsp: return 1288
    case .kCimCidGroupInfoReq: return 1289
    case .kCimCidGroupInfoRsp: return 1296
    case .kCimCidGroupInviteMemberReq: return 1297
    case .kCimCidGroupInviteMemberRsp: return 1298
    case .kCimCidGroupKickOutMemberReq: return 1299
    case .kCimCidGroupKickOutMemberRsp: return 1300
    case .kCimCidGroupMemberChangedNotify: return 1301
    case .kCimCidGroupListMemberReq: return 1302
    case .kCimCidGroupListMemberRsp: return 1303
    case .kCimCidFriendQueryUserListReq: return 1537
    case .kCimCidFriendQueryUserListRsp: return 1538
    case .UNRECOGNIZED(let i): return i
    }
  }

}

#if swift(>=4.2)

extension CIM_Def_CIMCmdID: CaseIterable {
  // The compiler won't synthesize support with the UNRECOGNIZED case.
  static var allCases: [CIM_Def_CIMCmdID] = [
    .kCimCidUnknown,
    .kCimCidLoginAuthTokenReq,
    .kCimCidLoginAuthTokenRsp,
    .kCimCidLoginAuthLogoutReq,
    .kCimCidLoginAuthLogoutRsp,
    .kCimCidLoginHeartbeat,
    .kCimCidLoginAuthReq,
    .kCimCidLoginAuthRsp,
    .kCimCidListRecentContactSessionReq,
    .kCimCidListRecentContactSessionRsp,
    .kCimCidListMsgReq,
    .kCimCidListMsgRsp,
    .kCimCidMsgData,
    .kCimCidMsgDataAck,
    .kCimCidMsgReadAck,
    .kCimCidMsgReadNotify,
    .kCimCidMsgGetLatestMsgIDReq,
    .kCimCidMsgGetLatestMsgIDRsp,
    .kCimCidMsgGetByMsgIDReq,
    .kCimCidMsgGetByMsgIDRsp,
    .kCimCidVoipInviteReq,
    .kCimCidVoipInviteReply,
    .kCimCidVoipInviteReplyAck,
    .kCimCidVoipHeartbeat,
    .kCimCidVoipByeReq,
    .kCimCidVoipByeRsp,
    .kCimCidVoipByeNotify,
    .kCimCidGroupCreateDefaultReq,
    .kCimCidGroupCreateDefaultRsp,
    .kCimCidGroupDisbingdingReq,
    .kCimCidGroupDisbingdingRsp,
    .kCimCidGroupExitReq,
    .kCimCidGroupExitRsp,
    .kCimCidGroupListReq,
    .kCimCidGroupListRsp,
    .kCimCidGroupInfoReq,
    .kCimCidGroupInfoRsp,
    .kCimCidGroupInviteMemberReq,
    .kCimCidGroupInviteMemberRsp,
    .kCimCidGroupKickOutMemberReq,
    .kCimCidGroupKickOutMemberRsp,
    .kCimCidGroupMemberChangedNotify,
    .kCimCidGroupListMemberReq,
    .kCimCidGroupListMemberRsp,
    .kCimCidFriendQueryUserListReq,
    .kCimCidFriendQueryUserListRsp,
  ]
}

#endif  // swift(>=4.2)

/// 内部消息：服务器 <-> 服务器消息定义
enum CIM_Def_CIMIntenralCmdID: SwiftProtobuf.Enum {
  typealias RawValue = Int

  /// 验证口令请求
  case kCimSidUnknown // = 0

  /// 验证口令请求
  case kCimSidDbValidateReq // = 1793
  case kCimSidDbValidateRsp // = 1794
  case UNRECOGNIZED(Int)

  init() {
    self = .kCimSidUnknown
  }

  init?(rawValue: Int) {
    switch rawValue {
    case 0: self = .kCimSidUnknown
    case 1793: self = .kCimSidDbValidateReq
    case 1794: self = .kCimSidDbValidateRsp
    default: self = .UNRECOGNIZED(rawValue)
    }
  }

  var rawValue: Int {
    switch self {
    case .kCimSidUnknown: return 0
    case .kCimSidDbValidateReq: return 1793
    case .kCimSidDbValidateRsp: return 1794
    case .UNRECOGNIZED(let i): return i
    }
  }

}

#if swift(>=4.2)

extension CIM_Def_CIMIntenralCmdID: CaseIterable {
  // The compiler won't synthesize support with the UNRECOGNIZED case.
  static var allCases: [CIM_Def_CIMIntenralCmdID] = [
    .kCimSidUnknown,
    .kCimSidDbValidateReq,
    .kCimSidDbValidateRsp,
  ]
}

#endif  // swift(>=4.2)

enum CIM_Def_CIMErrorCode: SwiftProtobuf.Enum {
  typealias RawValue = Int

  /// 未知错误
  case kCimErrUnknown // = 0

  /// 通用错误码
  case kCimErrSuccsse // = 200

  /// 服务器内部错误
  case kCimErrInternalError // = 201

  /// 账号错误码
  case kCimErrLoginDbValidateFailed // = 2000

  /// 客户端版本太旧
  case kCimErrLoginVersionTooOld // = 2001

  /// 非法的口令
  case kCimErrLoginInvalidUserToken // = 2002

  /// 用户不存在或者密码错误
  case kCimErrLoginInvalidUserOrPwd // = 2003

  /// HTTP API 错码
  case kCimErrorUserAlreadyExist // = 9000

  /// 非法的用户信息
  case kCimErrorUserInvalidParameter // = 9001

  /// 用户不存在
  case kCimErrorUserNotExist // = 9002
  case UNRECOGNIZED(Int)

  init() {
    self = .kCimErrUnknown
  }

  init?(rawValue: Int) {
    switch rawValue {
    case 0: self = .kCimErrUnknown
    case 200: self = .kCimErrSuccsse
    case 201: self = .kCimErrInternalError
    case 2000: self = .kCimErrLoginDbValidateFailed
    case 2001: self = .kCimErrLoginVersionTooOld
    case 2002: self = .kCimErrLoginInvalidUserToken
    case 2003: self = .kCimErrLoginInvalidUserOrPwd
    case 9000: self = .kCimErrorUserAlreadyExist
    case 9001: self = .kCimErrorUserInvalidParameter
    case 9002: self = .kCimErrorUserNotExist
    default: self = .UNRECOGNIZED(rawValue)
    }
  }

  var rawValue: Int {
    switch self {
    case .kCimErrUnknown: return 0
    case .kCimErrSuccsse: return 200
    case .kCimErrInternalError: return 201
    case .kCimErrLoginDbValidateFailed: return 2000
    case .kCimErrLoginVersionTooOld: return 2001
    case .kCimErrLoginInvalidUserToken: return 2002
    case .kCimErrLoginInvalidUserOrPwd: return 2003
    case .kCimErrorUserAlreadyExist: return 9000
    case .kCimErrorUserInvalidParameter: return 9001
    case .kCimErrorUserNotExist: return 9002
    case .UNRECOGNIZED(let i): return i
    }
  }

}

#if swift(>=4.2)

extension CIM_Def_CIMErrorCode: CaseIterable {
  // The compiler won't synthesize support with the UNRECOGNIZED case.
  static var allCases: [CIM_Def_CIMErrorCode] = [
    .kCimErrUnknown,
    .kCimErrSuccsse,
    .kCimErrInternalError,
    .kCimErrLoginDbValidateFailed,
    .kCimErrLoginVersionTooOld,
    .kCimErrLoginInvalidUserToken,
    .kCimErrLoginInvalidUserOrPwd,
    .kCimErrorUserAlreadyExist,
    .kCimErrorUserInvalidParameter,
    .kCimErrorUserNotExist,
  ]
}

#endif  // swift(>=4.2)

/// 客户端类型
enum CIM_Def_CIMClientType: SwiftProtobuf.Enum {
  typealias RawValue = Int

  /// unset
  case kCimClientTypeDefault // = 0

  /// 安卓
  case kCimClientTypeAndroid // = 1

  /// iOS
  case kCimClientTypeIos // = 2

  /// WebSocket
  case kCimClientTypeWeb // = 3

  /// RestAPI
  case kCimClientTypeRestApi // = 4

  /// PC Windows
  case kCimClientTypePcWindows // = 5

  /// MAC
  case kCimClientTypeMacOs // = 6
  case UNRECOGNIZED(Int)

  init() {
    self = .kCimClientTypeDefault
  }

  init?(rawValue: Int) {
    switch rawValue {
    case 0: self = .kCimClientTypeDefault
    case 1: self = .kCimClientTypeAndroid
    case 2: self = .kCimClientTypeIos
    case 3: self = .kCimClientTypeWeb
    case 4: self = .kCimClientTypeRestApi
    case 5: self = .kCimClientTypePcWindows
    case 6: self = .kCimClientTypeMacOs
    default: self = .UNRECOGNIZED(rawValue)
    }
  }

  var rawValue: Int {
    switch self {
    case .kCimClientTypeDefault: return 0
    case .kCimClientTypeAndroid: return 1
    case .kCimClientTypeIos: return 2
    case .kCimClientTypeWeb: return 3
    case .kCimClientTypeRestApi: return 4
    case .kCimClientTypePcWindows: return 5
    case .kCimClientTypeMacOs: return 6
    case .UNRECOGNIZED(let i): return i
    }
  }

}

#if swift(>=4.2)

extension CIM_Def_CIMClientType: CaseIterable {
  // The compiler won't synthesize support with the UNRECOGNIZED case.
  static var allCases: [CIM_Def_CIMClientType] = [
    .kCimClientTypeDefault,
    .kCimClientTypeAndroid,
    .kCimClientTypeIos,
    .kCimClientTypeWeb,
    .kCimClientTypeRestApi,
    .kCimClientTypePcWindows,
    .kCimClientTypeMacOs,
  ]
}

#endif  // swift(>=4.2)

/// 会话类型
enum CIM_Def_CIMSessionType: SwiftProtobuf.Enum {
  typealias RawValue = Int

  /// 无效会话
  case kCimSessionTypeInvalid // = 0

  /// 单聊
  case kCimSessionTypeSingle // = 1

  /// 群聊
  case kCimSessionTypeGroup // = 2
  case UNRECOGNIZED(Int)

  init() {
    self = .kCimSessionTypeInvalid
  }

  init?(rawValue: Int) {
    switch rawValue {
    case 0: self = .kCimSessionTypeInvalid
    case 1: self = .kCimSessionTypeSingle
    case 2: self = .kCimSessionTypeGroup
    default: self = .UNRECOGNIZED(rawValue)
    }
  }

  var rawValue: Int {
    switch self {
    case .kCimSessionTypeInvalid: return 0
    case .kCimSessionTypeSingle: return 1
    case .kCimSessionTypeGroup: return 2
    case .UNRECOGNIZED(let i): return i
    }
  }

}

#if swift(>=4.2)

extension CIM_Def_CIMSessionType: CaseIterable {
  // The compiler won't synthesize support with the UNRECOGNIZED case.
  static var allCases: [CIM_Def_CIMSessionType] = [
    .kCimSessionTypeInvalid,
    .kCimSessionTypeSingle,
    .kCimSessionTypeGroup,
  ]
}

#endif  // swift(>=4.2)

/// 消息类型
enum CIM_Def_CIMMsgType: SwiftProtobuf.Enum {
  typealias RawValue = Int

  /// 未知类型消息，本地使用，发送时请勿使用
  case kCimMsgTypeUnknown // = 0

  /// 文本
  case kCimMsgTypeText // = 1

  /// 文件
  case kCimMsgTypeFile // = 2

  /// 图片
  case kCimMsgTypeImage // = 3

  /// 声音
  case kCimMsgTypeAudio // = 4

  /// 视频
  case kCimMsgTypeVideo // = 5

  /// 位置
  case kCimMsgTypeLocation // = 6

  /// 图灵机器人消息
  case kCimMsgTypeRobot // = 7

  /// 提醒类型
  case kCimMsgTypeTips // = 8

  /// 系统通知（包括入群出群通知等）
  case kCimMsgTypeNotifacation // = 9

  /// 由音视频通话产生的消息
  case kCimMsgTypeAvchat // = 10
  case UNRECOGNIZED(Int)

  init() {
    self = .kCimMsgTypeUnknown
  }

  init?(rawValue: Int) {
    switch rawValue {
    case 0: self = .kCimMsgTypeUnknown
    case 1: self = .kCimMsgTypeText
    case 2: self = .kCimMsgTypeFile
    case 3: self = .kCimMsgTypeImage
    case 4: self = .kCimMsgTypeAudio
    case 5: self = .kCimMsgTypeVideo
    case 6: self = .kCimMsgTypeLocation
    case 7: self = .kCimMsgTypeRobot
    case 8: self = .kCimMsgTypeTips
    case 9: self = .kCimMsgTypeNotifacation
    case 10: self = .kCimMsgTypeAvchat
    default: self = .UNRECOGNIZED(rawValue)
    }
  }

  var rawValue: Int {
    switch self {
    case .kCimMsgTypeUnknown: return 0
    case .kCimMsgTypeText: return 1
    case .kCimMsgTypeFile: return 2
    case .kCimMsgTypeImage: return 3
    case .kCimMsgTypeAudio: return 4
    case .kCimMsgTypeVideo: return 5
    case .kCimMsgTypeLocation: return 6
    case .kCimMsgTypeRobot: return 7
    case .kCimMsgTypeTips: return 8
    case .kCimMsgTypeNotifacation: return 9
    case .kCimMsgTypeAvchat: return 10
    case .UNRECOGNIZED(let i): return i
    }
  }

}

#if swift(>=4.2)

extension CIM_Def_CIMMsgType: CaseIterable {
  // The compiler won't synthesize support with the UNRECOGNIZED case.
  static var allCases: [CIM_Def_CIMMsgType] = [
    .kCimMsgTypeUnknown,
    .kCimMsgTypeText,
    .kCimMsgTypeFile,
    .kCimMsgTypeImage,
    .kCimMsgTypeAudio,
    .kCimMsgTypeVideo,
    .kCimMsgTypeLocation,
    .kCimMsgTypeRobot,
    .kCimMsgTypeTips,
    .kCimMsgTypeNotifacation,
    .kCimMsgTypeAvchat,
  ]
}

#endif  // swift(>=4.2)

/// 消息状态
enum CIM_Def_CIMMsgStatus: SwiftProtobuf.Enum {
  typealias RawValue = Int

  /// 默认，不能当查询条件，意义太多
  case kCimMsgStatusNone // = 0

  /// 收到消息，未读
  case kCimMsgStatusUnread // = 1

  /// 收到消息，已读
  case kCimMsgStatusRead // = 2

  /// 已删
  case kCimMsgStatusDeleted // = 3

  /// 发送中
  case kCimMsgStatusSending // = 4

  /// 已发送
  case kCimMsgStatusSent // = 5

  /// 对方已读发送的内容
  case kCimMsgStatusReceipt // = 6

  /// 草稿
  case kCimMsgStatusDraft // = 7

  /// 发送取消
  case kCimMsgStatusSendCacel // = 8

  /// 被对方拒绝，比如被对方加入黑名单等等
  case kCimMsgStatusRefused // = 9

  /// 发送失败，客户端使用
  case kCimMsgStatusFailed // = 10
  case UNRECOGNIZED(Int)

  init() {
    self = .kCimMsgStatusNone
  }

  init?(rawValue: Int) {
    switch rawValue {
    case 0: self = .kCimMsgStatusNone
    case 1: self = .kCimMsgStatusUnread
    case 2: self = .kCimMsgStatusRead
    case 3: self = .kCimMsgStatusDeleted
    case 4: self = .kCimMsgStatusSending
    case 5: self = .kCimMsgStatusSent
    case 6: self = .kCimMsgStatusReceipt
    case 7: self = .kCimMsgStatusDraft
    case 8: self = .kCimMsgStatusSendCacel
    case 9: self = .kCimMsgStatusRefused
    case 10: self = .kCimMsgStatusFailed
    default: self = .UNRECOGNIZED(rawValue)
    }
  }

  var rawValue: Int {
    switch self {
    case .kCimMsgStatusNone: return 0
    case .kCimMsgStatusUnread: return 1
    case .kCimMsgStatusRead: return 2
    case .kCimMsgStatusDeleted: return 3
    case .kCimMsgStatusSending: return 4
    case .kCimMsgStatusSent: return 5
    case .kCimMsgStatusReceipt: return 6
    case .kCimMsgStatusDraft: return 7
    case .kCimMsgStatusSendCacel: return 8
    case .kCimMsgStatusRefused: return 9
    case .kCimMsgStatusFailed: return 10
    case .UNRECOGNIZED(let i): return i
    }
  }

}

#if swift(>=4.2)

extension CIM_Def_CIMMsgStatus: CaseIterable {
  // The compiler won't synthesize support with the UNRECOGNIZED case.
  static var allCases: [CIM_Def_CIMMsgStatus] = [
    .kCimMsgStatusNone,
    .kCimMsgStatusUnread,
    .kCimMsgStatusRead,
    .kCimMsgStatusDeleted,
    .kCimMsgStatusSending,
    .kCimMsgStatusSent,
    .kCimMsgStatusReceipt,
    .kCimMsgStatusDraft,
    .kCimMsgStatusSendCacel,
    .kCimMsgStatusRefused,
    .kCimMsgStatusFailed,
  ]
}

#endif  // swift(>=4.2)

/// 通知类型
enum CIM_Def_CIMMsgNotificationType: SwiftProtobuf.Enum {
  typealias RawValue = Int

  /// 未知
  case kCimMsgNotificationUnknown // = 0

  /// 创建群
  /// {"groupId":"22","groupName":"测试群","owner":"1008","ownerNick":"1008",ids:["1001","1002"],nickNames:["1001","1002"]}
  case kCimMsgNotificationGroupCreate // = 1

  /// 群拉人（被拉）
  /// {"groupId":"22","userId":“1008”,"ids":["1001", "1002"],nickNames:["1001","1002"]}
  case kCimMsgNotificationGroupBeInvite // = 2

  /// 群踢人
  /// {"groupId":"22",“ownerUserId”:“1008”,"ids":["1001", "1002"],nickNames:["1001","1002"]}
  case kCimMsgNotificationGroupKick // = 3

  /// 退出群
  /// {"groupId":"22","ids":["1001", "1002"],nickNames:["1001","1002"]}
  case kCimMsgNotificationGroupLeave // = 4

  /// 群信息更新
  /// {"team_info":team_info}
  case kCimMsgNotificationGroupUpdate // = 5

  /// 群解散
  /// {"groupId":"22"}
  case kCimMsgNotificationGroupDismiss // = 6
  case UNRECOGNIZED(Int)

  init() {
    self = .kCimMsgNotificationUnknown
  }

  init?(rawValue: Int) {
    switch rawValue {
    case 0: self = .kCimMsgNotificationUnknown
    case 1: self = .kCimMsgNotificationGroupCreate
    case 2: self = .kCimMsgNotificationGroupBeInvite
    case 3: self = .kCimMsgNotificationGroupKick
    case 4: self = .kCimMsgNotificationGroupLeave
    case 5: self = .kCimMsgNotificationGroupUpdate
    case 6: self = .kCimMsgNotificationGroupDismiss
    default: self = .UNRECOGNIZED(rawValue)
    }
  }

  var rawValue: Int {
    switch self {
    case .kCimMsgNotificationUnknown: return 0
    case .kCimMsgNotificationGroupCreate: return 1
    case .kCimMsgNotificationGroupBeInvite: return 2
    case .kCimMsgNotificationGroupKick: return 3
    case .kCimMsgNotificationGroupLeave: return 4
    case .kCimMsgNotificationGroupUpdate: return 5
    case .kCimMsgNotificationGroupDismiss: return 6
    case .UNRECOGNIZED(let i): return i
    }
  }

}

#if swift(>=4.2)

extension CIM_Def_CIMMsgNotificationType: CaseIterable {
  // The compiler won't synthesize support with the UNRECOGNIZED case.
  static var allCases: [CIM_Def_CIMMsgNotificationType] = [
    .kCimMsgNotificationUnknown,
    .kCimMsgNotificationGroupCreate,
    .kCimMsgNotificationGroupBeInvite,
    .kCimMsgNotificationGroupKick,
    .kCimMsgNotificationGroupLeave,
    .kCimMsgNotificationGroupUpdate,
    .kCimMsgNotificationGroupDismiss,
  ]
}

#endif  // swift(>=4.2)

/// 会话状态
enum CIM_Def_CIMSessionStatusType: SwiftProtobuf.Enum {
  typealias RawValue = Int

  /// 未知
  case kCimSessionStatusUnknown // = 0
  case kCimSessionStatusOk // = 1
  case kCimSessionStatusDelete // = 2
  case UNRECOGNIZED(Int)

  init() {
    self = .kCimSessionStatusUnknown
  }

  init?(rawValue: Int) {
    switch rawValue {
    case 0: self = .kCimSessionStatusUnknown
    case 1: self = .kCimSessionStatusOk
    case 2: self = .kCimSessionStatusDelete
    default: self = .UNRECOGNIZED(rawValue)
    }
  }

  var rawValue: Int {
    switch self {
    case .kCimSessionStatusUnknown: return 0
    case .kCimSessionStatusOk: return 1
    case .kCimSessionStatusDelete: return 2
    case .UNRECOGNIZED(let i): return i
    }
  }

}

#if swift(>=4.2)

extension CIM_Def_CIMSessionStatusType: CaseIterable {
  // The compiler won't synthesize support with the UNRECOGNIZED case.
  static var allCases: [CIM_Def_CIMSessionStatusType] = [
    .kCimSessionStatusUnknown,
    .kCimSessionStatusOk,
    .kCimSessionStatusDelete,
  ]
}

#endif  // swift(>=4.2)

/// 消息属性
enum CIM_Def_CIMMsgFeature: SwiftProtobuf.Enum {
  typealias RawValue = Int

  /// 默认
  case kCimMsgFeatureDefault // = 0

  /// kCIM_MSG_FEATURE_LEAVE_MSG = 1;      // 离线消息(和漫游消息有何区别)
  case kCimMsgFeatureRoamMsg // = 2
  case UNRECOGNIZED(Int)

  init() {
    self = .kCimMsgFeatureDefault
  }

  init?(rawValue: Int) {
    switch rawValue {
    case 0: self = .kCimMsgFeatureDefault
    case 2: self = .kCimMsgFeatureRoamMsg
    default: self = .UNRECOGNIZED(rawValue)
    }
  }

  var rawValue: Int {
    switch self {
    case .kCimMsgFeatureDefault: return 0
    case .kCimMsgFeatureRoamMsg: return 2
    case .UNRECOGNIZED(let i): return i
    }
  }

}

#if swift(>=4.2)

extension CIM_Def_CIMMsgFeature: CaseIterable {
  // The compiler won't synthesize support with the UNRECOGNIZED case.
  static var allCases: [CIM_Def_CIMMsgFeature] = [
    .kCimMsgFeatureDefault,
    .kCimMsgFeatureRoamMsg,
  ]
}

#endif  // swift(>=4.2)

/// Voip邀请类型
enum CIM_Def_CIMVoipInviteType: SwiftProtobuf.Enum {
  typealias RawValue = Int

  /// default
  case kCimVoipInviteTypeUnknown // = 0

  /// 语音通话
  case kCimVoipInviteTypeVoiceCall // = 1

  /// 视频通话，包含语音但可以静音
  case kCimVoipInviteTypeVideoCall // = 2
  case UNRECOGNIZED(Int)

  init() {
    self = .kCimVoipInviteTypeUnknown
  }

  init?(rawValue: Int) {
    switch rawValue {
    case 0: self = .kCimVoipInviteTypeUnknown
    case 1: self = .kCimVoipInviteTypeVoiceCall
    case 2: self = .kCimVoipInviteTypeVideoCall
    default: self = .UNRECOGNIZED(rawValue)
    }
  }

  var rawValue: Int {
    switch self {
    case .kCimVoipInviteTypeUnknown: return 0
    case .kCimVoipInviteTypeVoiceCall: return 1
    case .kCimVoipInviteTypeVideoCall: return 2
    case .UNRECOGNIZED(let i): return i
    }
  }

}

#if swift(>=4.2)

extension CIM_Def_CIMVoipInviteType: CaseIterable {
  // The compiler won't synthesize support with the UNRECOGNIZED case.
  static var allCases: [CIM_Def_CIMVoipInviteType] = [
    .kCimVoipInviteTypeUnknown,
    .kCimVoipInviteTypeVoiceCall,
    .kCimVoipInviteTypeVideoCall,
  ]
}

#endif  // swift(>=4.2)

/// Voip邀请状态
enum CIM_Def_CIMInviteRspCode: SwiftProtobuf.Enum {
  typealias RawValue = Int

  /// 0 unknown
  case kCimVoipInviteCodeUnknown // = 0

  /// 100 tring
  case kCimVoipInviteCodeTrying // = 100

  /// 180 ringing
  case kCimVoipInviteCodeRinging // = 180

  /// 200 ok
  case kcimVoipInviteCodeOk // = 200
  case UNRECOGNIZED(Int)

  init() {
    self = .kCimVoipInviteCodeUnknown
  }

  init?(rawValue: Int) {
    switch rawValue {
    case 0: self = .kCimVoipInviteCodeUnknown
    case 100: self = .kCimVoipInviteCodeTrying
    case 180: self = .kCimVoipInviteCodeRinging
    case 200: self = .kcimVoipInviteCodeOk
    default: self = .UNRECOGNIZED(rawValue)
    }
  }

  var rawValue: Int {
    switch self {
    case .kCimVoipInviteCodeUnknown: return 0
    case .kCimVoipInviteCodeTrying: return 100
    case .kCimVoipInviteCodeRinging: return 180
    case .kcimVoipInviteCodeOk: return 200
    case .UNRECOGNIZED(let i): return i
    }
  }

}

#if swift(>=4.2)

extension CIM_Def_CIMInviteRspCode: CaseIterable {
  // The compiler won't synthesize support with the UNRECOGNIZED case.
  static var allCases: [CIM_Def_CIMInviteRspCode] = [
    .kCimVoipInviteCodeUnknown,
    .kCimVoipInviteCodeTrying,
    .kCimVoipInviteCodeRinging,
    .kcimVoipInviteCodeOk,
  ]
}

#endif  // swift(>=4.2)

/// Voip挂断原因
enum CIM_Def_CIMVoipByeReason: SwiftProtobuf.Enum {
  typealias RawValue = Int

  /// default
  case kCimVoipByeReasonUnknown // = 0

  /// 我方取消
  case kCimVoipByeReasonCancel // = 1

  /// 对方拒绝
  case kCimVoipByeReasonReject // = 2

  /// 通话结束
  case kCimVoipByeReasonEnd // = 3

  /// 对方正忙
  case kCimVoipByeReasonBusy // = 4

  /// 其他端拒绝通话
  case kCimVoipByeReasonOnlineClientReject // = 5
  case UNRECOGNIZED(Int)

  init() {
    self = .kCimVoipByeReasonUnknown
  }

  init?(rawValue: Int) {
    switch rawValue {
    case 0: self = .kCimVoipByeReasonUnknown
    case 1: self = .kCimVoipByeReasonCancel
    case 2: self = .kCimVoipByeReasonReject
    case 3: self = .kCimVoipByeReasonEnd
    case 4: self = .kCimVoipByeReasonBusy
    case 5: self = .kCimVoipByeReasonOnlineClientReject
    default: self = .UNRECOGNIZED(rawValue)
    }
  }

  var rawValue: Int {
    switch self {
    case .kCimVoipByeReasonUnknown: return 0
    case .kCimVoipByeReasonCancel: return 1
    case .kCimVoipByeReasonReject: return 2
    case .kCimVoipByeReasonEnd: return 3
    case .kCimVoipByeReasonBusy: return 4
    case .kCimVoipByeReasonOnlineClientReject: return 5
    case .UNRECOGNIZED(let i): return i
    }
  }

}

#if swift(>=4.2)

extension CIM_Def_CIMVoipByeReason: CaseIterable {
  // The compiler won't synthesize support with the UNRECOGNIZED case.
  static var allCases: [CIM_Def_CIMVoipByeReason] = [
    .kCimVoipByeReasonUnknown,
    .kCimVoipByeReasonCancel,
    .kCimVoipByeReasonReject,
    .kCimVoipByeReasonEnd,
    .kCimVoipByeReasonBusy,
    .kCimVoipByeReasonOnlineClientReject,
  ]
}

#endif  // swift(>=4.2)

/// 消息错误码
enum CIM_Def_CIMResCode: SwiftProtobuf.Enum {
  typealias RawValue = Int

  /// unknown
  case kCimResCodeUnknown // = 0

  /// 一切正常
  case kCimResCodeOk // = 1
  case UNRECOGNIZED(Int)

  init() {
    self = .kCimResCodeUnknown
  }

  init?(rawValue: Int) {
    switch rawValue {
    case 0: self = .kCimResCodeUnknown
    case 1: self = .kCimResCodeOk
    default: self = .UNRECOGNIZED(rawValue)
    }
  }

  var rawValue: Int {
    switch self {
    case .kCimResCodeUnknown: return 0
    case .kCimResCodeOk: return 1
    case .UNRECOGNIZED(let i): return i
    }
  }

}

#if swift(>=4.2)

extension CIM_Def_CIMResCode: CaseIterable {
  // The compiler won't synthesize support with the UNRECOGNIZED case.
  static var allCases: [CIM_Def_CIMResCode] = [
    .kCimResCodeUnknown,
    .kCimResCodeOk,
  ]
}

#endif  // swift(>=4.2)

/// 用户信息
struct CIM_Def_CIMUserInfo {
  // SwiftProtobuf.Message conformance is added in an extension below. See the
  // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  // methods supported on all messages.

  var userID: UInt64 = 0

  /// 用户昵称
  var nickName: String = String()

  /// 昵称拼音
  var nickNameSpell: String = String()

  ///optional
  var phone: String = String()

  /// 头像URL
  var avatarURL: String = String()

  /// 自定义字段
  var attachInfo: String = String()

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}
}

/// 会话信息
struct CIM_Def_CIMContactSessionInfo {
  // SwiftProtobuf.Message conformance is added in an extension below. See the
  // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  // methods supported on all messages.

  /// 会话id
  var sessionID: UInt64 = 0

  /// 会话类型
  var sessionType: CIM_Def_CIMSessionType = .kCimSessionTypeInvalid

  /// 会话修改命令，预留
  var sessionStatus: CIM_Def_CIMSessionStatusType = .kCimSessionStatusUnknown

  /// 该会话未读消息数量
  var unreadCnt: UInt32 = 0

  /// 更新时间
  var updatedTime: UInt32 = 0

  /// 最新一条消息的id（UUID）
  var msgID: String = String()

  /// 最新一条消息服务端的id（顺序递增）
  var serverMsgID: UInt64 = 0

  /// 最新一条消息时间戳（毫秒）
  var msgTimeStamp: UInt32 = 0

  /// 最新一条消息的内容
  var msgData: Data = Data()

  /// 最新一条消息的类型
  var msgType: CIM_Def_CIMMsgType = .kCimMsgTypeUnknown

  /// 最新一条消息的发送者
  var msgFromUserID: UInt64 = 0

  /// 最新一条消息的状态（预留）
  var msgStatus: CIM_Def_CIMMsgStatus = .kCimMsgStatusNone

  ///optional
  var msgAttach: String = String()

  ///optional
  var extendData: String = String()

  ///optional
  var isRobotSession: Bool = false

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}
}

/// 消息信息
struct CIM_Def_CIMMsgInfo {
  // SwiftProtobuf.Message conformance is added in an extension below. See the
  // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  // methods supported on all messages.

  /// 客户端消息ID（UUID）
  var clientMsgID: String = String()

  /// 服务端消息ID
  var serverMsgID: UInt64 = 0

  /// 消息错误码
  var msgResCode: CIM_Def_CIMResCode = .kCimResCodeUnknown

  /// 消息属性
  var msgFeature: CIM_Def_CIMMsgFeature = .kCimMsgFeatureDefault

  /// 会话类型
  var sessionType: CIM_Def_CIMSessionType = .kCimSessionTypeInvalid

  /// 来源会话ID
  var fromUserID: UInt64 = 0

  /// 目标会话ID
  var toSessionID: UInt64 = 0

  /// 消息创建时间戳（毫秒）
  var createTime: UInt32 = 0

  /// 消息类型
  var msgType: CIM_Def_CIMMsgType = .kCimMsgTypeUnknown

  /// 消息状态（预留）
  var msgStatus: CIM_Def_CIMMsgStatus = .kCimMsgStatusNone

  /// 消息内容
  var msgData: Data = Data()

  ///optional
  var attach: String = String()

  /// 发送者客户端类型
  var senderClientType: CIM_Def_CIMClientType = .kCimClientTypeDefault

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}
}

/// VOIP频道信息
struct CIM_Def_CIMChannelInfo {
  // SwiftProtobuf.Message conformance is added in an extension below. See the
  // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  // methods supported on all messages.

  /// 频道名称
  var channelName: String = String()

  /// 频道授权令牌
  var channelToken: String = String()

  /// 频道创建者
  var creatorID: UInt64 = 0

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}
}

// MARK: - Code below here is support for the SwiftProtobuf runtime.

fileprivate let _protobuf_package = "CIM.Def"

extension CIM_Def_CIMCmdID: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "kCIM_CID_UNKNOWN"),
    257: .same(proto: "kCIM_CID_LOGIN_AUTH_TOKEN_REQ"),
    258: .same(proto: "kCIM_CID_LOGIN_AUTH_TOKEN_RSP"),
    259: .same(proto: "kCIM_CID_LOGIN_AUTH_LOGOUT_REQ"),
    260: .same(proto: "kCIM_CID_LOGIN_AUTH_LOGOUT_RSP"),
    261: .same(proto: "kCIM_CID_LOGIN_HEARTBEAT"),
    263: .same(proto: "kCIM_CID_LOGIN_AUTH_REQ"),
    264: .same(proto: "kCIM_CID_LOGIN_AUTH_RSP"),
    513: .same(proto: "kCIM_CID_LIST_RECENT_CONTACT_SESSION_REQ"),
    514: .same(proto: "kCIM_CID_LIST_RECENT_CONTACT_SESSION_RSP"),
    517: .same(proto: "kCIM_CID_LIST_MSG_REQ"),
    518: .same(proto: "kCIM_CID_LIST_MSG_RSP"),
    769: .same(proto: "kCIM_CID_MSG_DATA"),
    770: .same(proto: "kCIM_CID_MSG_DATA_ACK"),
    771: .same(proto: "kCIM_CID_MSG_READ_ACK"),
    772: .same(proto: "kCIM_CID_MSG_READ_NOTIFY"),
    773: .same(proto: "kCIM_CID_MSG_GET_LATEST_MSG_ID_REQ"),
    774: .same(proto: "kCIM_CID_MSG_GET_LATEST_MSG_ID_RSP"),
    775: .same(proto: "kCIM_CID_MSG_GET_BY_MSG_ID_REQ"),
    776: .same(proto: "kCIM_CID_MSG_GET_BY_MSG_ID_RSP"),
    1025: .same(proto: "kCIM_CID_VOIP_INVITE_REQ"),
    1026: .same(proto: "kCIM_CID_VOIP_INVITE_REPLY"),
    1027: .same(proto: "kCIM_CID_VOIP_INVITE_REPLY_ACK"),
    1028: .same(proto: "kCIM_CID_VOIP_HEARTBEAT"),
    1029: .same(proto: "kCIM_CID_VOIP_BYE_REQ"),
    1030: .same(proto: "kCIM_CID_VOIP_BYE_RSP"),
    1031: .same(proto: "kCIM_CID_VOIP_BYE_NOTIFY"),
    1281: .same(proto: "kCIM_CID_GROUP_CREATE_DEFAULT_REQ"),
    1282: .same(proto: "kCIM_CID_GROUP_CREATE_DEFAULT_RSP"),
    1283: .same(proto: "kCIM_CID_GROUP_DISBINGDING_REQ"),
    1284: .same(proto: "kCIM_CID_GROUP_DISBINGDING_RSP"),
    1285: .same(proto: "kCIM_CID_GROUP_EXIT_REQ"),
    1286: .same(proto: "kCIM_CID_GROUP_EXIT_RSP"),
    1287: .same(proto: "kCIM_CID_GROUP_LIST_REQ"),
    1288: .same(proto: "kCIM_CID_GROUP_LIST_RSP"),
    1289: .same(proto: "kCIM_CID_GROUP_INFO_REQ"),
    1296: .same(proto: "kCIM_CID_GROUP_INFO_RSP"),
    1297: .same(proto: "kCIM_CID_GROUP_INVITE_MEMBER_REQ"),
    1298: .same(proto: "kCIM_CID_GROUP_INVITE_MEMBER_RSP"),
    1299: .same(proto: "kCIM_CID_GROUP_KICK_OUT_MEMBER_REQ"),
    1300: .same(proto: "kCIM_CID_GROUP_KICK_OUT_MEMBER_RSP"),
    1301: .same(proto: "kCIM_CID_GROUP_MEMBER_CHANGED_NOTIFY"),
    1302: .same(proto: "kCIM_CID_GROUP_LIST_MEMBER_REQ"),
    1303: .same(proto: "kCIM_CID_GROUP_LIST_MEMBER_RSP"),
    1537: .same(proto: "kCIM_CID_FRIEND_QUERY_USER_LIST_REQ"),
    1538: .same(proto: "kCIM_CID_FRIEND_QUERY_USER_LIST_RSP"),
  ]
}

extension CIM_Def_CIMIntenralCmdID: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "kCIM_SID_UNKNOWN"),
    1793: .same(proto: "kCIM_SID_DB_VALIDATE_REQ"),
    1794: .same(proto: "kCIM_SID_DB_VALIDATE_RSP"),
  ]
}

extension CIM_Def_CIMErrorCode: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "kCIM_ERR_UNKNOWN"),
    200: .same(proto: "kCIM_ERR_SUCCSSE"),
    201: .same(proto: "kCIM_ERR_INTERNAL_ERROR"),
    2000: .same(proto: "kCIM_ERR_LOGIN_DB_VALIDATE_FAILED"),
    2001: .same(proto: "kCIM_ERR_LOGIN_VERSION_TOO_OLD"),
    2002: .same(proto: "kCIM_ERR_LOGIN_INVALID_USER_TOKEN"),
    2003: .same(proto: "kCIM_ERR_LOGIN_INVALID_USER_OR_PWD"),
    9000: .same(proto: "kCIM_ERROR_USER_ALREADY_EXIST"),
    9001: .same(proto: "kCIM_ERROR_USER_INVALID_PARAMETER"),
    9002: .same(proto: "kCIM_ERROR_USER_NOT_EXIST"),
  ]
}

extension CIM_Def_CIMClientType: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "kCIM_CLIENT_TYPE_DEFAULT"),
    1: .same(proto: "kCIM_CLIENT_TYPE_ANDROID"),
    2: .same(proto: "kCIM_CLIENT_TYPE_IOS"),
    3: .same(proto: "kCIM_CLIENT_TYPE_WEB"),
    4: .same(proto: "kCIM_CLIENT_TYPE_REST_API"),
    5: .same(proto: "kCIM_CLIENT_TYPE_PC_WINDOWS"),
    6: .same(proto: "kCIM_CLIENT_TYPE_MAC_OS"),
  ]
}

extension CIM_Def_CIMSessionType: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "kCIM_SESSION_TYPE_Invalid"),
    1: .same(proto: "kCIM_SESSION_TYPE_SINGLE"),
    2: .same(proto: "kCIM_SESSION_TYPE_GROUP"),
  ]
}

extension CIM_Def_CIMMsgType: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "kCIM_MSG_TYPE_UNKNOWN"),
    1: .same(proto: "kCIM_MSG_TYPE_TEXT"),
    2: .same(proto: "kCIM_MSG_TYPE_FILE"),
    3: .same(proto: "kCIM_MSG_TYPE_IMAGE"),
    4: .same(proto: "kCIM_MSG_TYPE_AUDIO"),
    5: .same(proto: "kCIM_MSG_TYPE_VIDEO"),
    6: .same(proto: "kCIM_MSG_TYPE_LOCATION"),
    7: .same(proto: "kCIM_MSG_TYPE_ROBOT"),
    8: .same(proto: "kCIM_MSG_TYPE_TIPS"),
    9: .same(proto: "kCIM_MSG_TYPE_NOTIFACATION"),
    10: .same(proto: "kCIM_MSG_TYPE_AVCHAT"),
  ]
}

extension CIM_Def_CIMMsgStatus: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "kCIM_MSG_STATUS_NONE"),
    1: .same(proto: "kCIM_MSG_STATUS_UNREAD"),
    2: .same(proto: "kCIM_MSG_STATUS_READ"),
    3: .same(proto: "kCIM_MSG_STATUS_DELETED"),
    4: .same(proto: "kCIM_MSG_STATUS_SENDING"),
    5: .same(proto: "kCIM_MSG_STATUS_SENT"),
    6: .same(proto: "kCIM_MSG_STATUS_RECEIPT"),
    7: .same(proto: "kCIM_MSG_STATUS_DRAFT"),
    8: .same(proto: "kCIM_MSG_STATUS_SendCacel"),
    9: .same(proto: "kCIM_MSG_STATUS_REFUSED"),
    10: .same(proto: "kCIM_MSG_STATUS_FAILED"),
  ]
}

extension CIM_Def_CIMMsgNotificationType: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "kCIM_MSG_NOTIFICATION_UNKNOWN"),
    1: .same(proto: "kCIM_MSG_NOTIFICATION_GROUP_CREATE"),
    2: .same(proto: "kCIM_MSG_NOTIFICATION_GROUP_BE_INVITE"),
    3: .same(proto: "kCIM_MSG_NOTIFICATION_GROUP_KICK"),
    4: .same(proto: "kCIM_MSG_NOTIFICATION_GROUP_LEAVE"),
    5: .same(proto: "kCIM_MSG_NOTIFICATION_GROUP_UPDATE"),
    6: .same(proto: "kCIM_MSG_NOTIFICATION_GROUP_DISMISS"),
  ]
}

extension CIM_Def_CIMSessionStatusType: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "kCIM_SESSION_STATUS_UNKNOWN"),
    1: .same(proto: "kCIM_SESSION_STATUS_OK"),
    2: .same(proto: "kCIM_SESSION_STATUS_DELETE"),
  ]
}

extension CIM_Def_CIMMsgFeature: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "kCIM_MSG_FEATURE_DEFAULT"),
    2: .same(proto: "kCIM_MSG_FEATURE_ROAM_MSG"),
  ]
}

extension CIM_Def_CIMVoipInviteType: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "kCIM_VOIP_INVITE_TYPE_UNKNOWN"),
    1: .same(proto: "kCIM_VOIP_INVITE_TYPE_VOICE_CALL"),
    2: .same(proto: "kCIM_VOIP_INVITE_TYPE_VIDEO_CALL"),
  ]
}

extension CIM_Def_CIMInviteRspCode: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "kCIM_VOIP_INVITE_CODE_UNKNOWN"),
    100: .same(proto: "kCIM_VOIP_INVITE_CODE_TRYING"),
    180: .same(proto: "kCIM_VOIP_INVITE_CODE_RINGING"),
    200: .same(proto: "KCIM_VOIP_INVITE_CODE_OK"),
  ]
}

extension CIM_Def_CIMVoipByeReason: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "kCIM_VOIP_BYE_REASON_UNKNOWN"),
    1: .same(proto: "kCIM_VOIP_BYE_REASON_CANCEL"),
    2: .same(proto: "kCIM_VOIP_BYE_REASON_REJECT"),
    3: .same(proto: "kCIM_VOIP_BYE_REASON_END"),
    4: .same(proto: "kCIM_VOIP_BYE_REASON_BUSY"),
    5: .same(proto: "kCIM_VOIP_BYE_REASON_ONLINE_CLIENT_REJECT"),
  ]
}

extension CIM_Def_CIMResCode: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "kCIM_RES_CODE_UNKNOWN"),
    1: .same(proto: "kCIM_RES_CODE_OK"),
  ]
}

extension CIM_Def_CIMUserInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".CIMUserInfo"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .standard(proto: "user_id"),
    2: .standard(proto: "nick_name"),
    3: .standard(proto: "nick_name_spell"),
    9: .same(proto: "phone"),
    10: .standard(proto: "avatar_url"),
    11: .standard(proto: "attach_info"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularUInt64Field(value: &self.userID)
      case 2: try decoder.decodeSingularStringField(value: &self.nickName)
      case 3: try decoder.decodeSingularStringField(value: &self.nickNameSpell)
      case 9: try decoder.decodeSingularStringField(value: &self.phone)
      case 10: try decoder.decodeSingularStringField(value: &self.avatarURL)
      case 11: try decoder.decodeSingularStringField(value: &self.attachInfo)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if self.userID != 0 {
      try visitor.visitSingularUInt64Field(value: self.userID, fieldNumber: 1)
    }
    if !self.nickName.isEmpty {
      try visitor.visitSingularStringField(value: self.nickName, fieldNumber: 2)
    }
    if !self.nickNameSpell.isEmpty {
      try visitor.visitSingularStringField(value: self.nickNameSpell, fieldNumber: 3)
    }
    if !self.phone.isEmpty {
      try visitor.visitSingularStringField(value: self.phone, fieldNumber: 9)
    }
    if !self.avatarURL.isEmpty {
      try visitor.visitSingularStringField(value: self.avatarURL, fieldNumber: 10)
    }
    if !self.attachInfo.isEmpty {
      try visitor.visitSingularStringField(value: self.attachInfo, fieldNumber: 11)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: CIM_Def_CIMUserInfo, rhs: CIM_Def_CIMUserInfo) -> Bool {
    if lhs.userID != rhs.userID {return false}
    if lhs.nickName != rhs.nickName {return false}
    if lhs.nickNameSpell != rhs.nickNameSpell {return false}
    if lhs.phone != rhs.phone {return false}
    if lhs.avatarURL != rhs.avatarURL {return false}
    if lhs.attachInfo != rhs.attachInfo {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension CIM_Def_CIMContactSessionInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".CIMContactSessionInfo"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .standard(proto: "session_id"),
    2: .standard(proto: "session_type"),
    3: .standard(proto: "session_status"),
    4: .standard(proto: "unread_cnt"),
    5: .standard(proto: "updated_time"),
    6: .standard(proto: "msg_id"),
    7: .standard(proto: "server_msg_id"),
    8: .standard(proto: "msg_time_stamp"),
    9: .standard(proto: "msg_data"),
    10: .standard(proto: "msg_type"),
    11: .standard(proto: "msg_from_user_id"),
    12: .standard(proto: "msg_status"),
    13: .standard(proto: "msg_attach"),
    14: .standard(proto: "extend_data"),
    15: .standard(proto: "is_robot_session"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularUInt64Field(value: &self.sessionID)
      case 2: try decoder.decodeSingularEnumField(value: &self.sessionType)
      case 3: try decoder.decodeSingularEnumField(value: &self.sessionStatus)
      case 4: try decoder.decodeSingularUInt32Field(value: &self.unreadCnt)
      case 5: try decoder.decodeSingularUInt32Field(value: &self.updatedTime)
      case 6: try decoder.decodeSingularStringField(value: &self.msgID)
      case 7: try decoder.decodeSingularUInt64Field(value: &self.serverMsgID)
      case 8: try decoder.decodeSingularUInt32Field(value: &self.msgTimeStamp)
      case 9: try decoder.decodeSingularBytesField(value: &self.msgData)
      case 10: try decoder.decodeSingularEnumField(value: &self.msgType)
      case 11: try decoder.decodeSingularUInt64Field(value: &self.msgFromUserID)
      case 12: try decoder.decodeSingularEnumField(value: &self.msgStatus)
      case 13: try decoder.decodeSingularStringField(value: &self.msgAttach)
      case 14: try decoder.decodeSingularStringField(value: &self.extendData)
      case 15: try decoder.decodeSingularBoolField(value: &self.isRobotSession)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if self.sessionID != 0 {
      try visitor.visitSingularUInt64Field(value: self.sessionID, fieldNumber: 1)
    }
    if self.sessionType != .kCimSessionTypeInvalid {
      try visitor.visitSingularEnumField(value: self.sessionType, fieldNumber: 2)
    }
    if self.sessionStatus != .kCimSessionStatusUnknown {
      try visitor.visitSingularEnumField(value: self.sessionStatus, fieldNumber: 3)
    }
    if self.unreadCnt != 0 {
      try visitor.visitSingularUInt32Field(value: self.unreadCnt, fieldNumber: 4)
    }
    if self.updatedTime != 0 {
      try visitor.visitSingularUInt32Field(value: self.updatedTime, fieldNumber: 5)
    }
    if !self.msgID.isEmpty {
      try visitor.visitSingularStringField(value: self.msgID, fieldNumber: 6)
    }
    if self.serverMsgID != 0 {
      try visitor.visitSingularUInt64Field(value: self.serverMsgID, fieldNumber: 7)
    }
    if self.msgTimeStamp != 0 {
      try visitor.visitSingularUInt32Field(value: self.msgTimeStamp, fieldNumber: 8)
    }
    if !self.msgData.isEmpty {
      try visitor.visitSingularBytesField(value: self.msgData, fieldNumber: 9)
    }
    if self.msgType != .kCimMsgTypeUnknown {
      try visitor.visitSingularEnumField(value: self.msgType, fieldNumber: 10)
    }
    if self.msgFromUserID != 0 {
      try visitor.visitSingularUInt64Field(value: self.msgFromUserID, fieldNumber: 11)
    }
    if self.msgStatus != .kCimMsgStatusNone {
      try visitor.visitSingularEnumField(value: self.msgStatus, fieldNumber: 12)
    }
    if !self.msgAttach.isEmpty {
      try visitor.visitSingularStringField(value: self.msgAttach, fieldNumber: 13)
    }
    if !self.extendData.isEmpty {
      try visitor.visitSingularStringField(value: self.extendData, fieldNumber: 14)
    }
    if self.isRobotSession != false {
      try visitor.visitSingularBoolField(value: self.isRobotSession, fieldNumber: 15)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: CIM_Def_CIMContactSessionInfo, rhs: CIM_Def_CIMContactSessionInfo) -> Bool {
    if lhs.sessionID != rhs.sessionID {return false}
    if lhs.sessionType != rhs.sessionType {return false}
    if lhs.sessionStatus != rhs.sessionStatus {return false}
    if lhs.unreadCnt != rhs.unreadCnt {return false}
    if lhs.updatedTime != rhs.updatedTime {return false}
    if lhs.msgID != rhs.msgID {return false}
    if lhs.serverMsgID != rhs.serverMsgID {return false}
    if lhs.msgTimeStamp != rhs.msgTimeStamp {return false}
    if lhs.msgData != rhs.msgData {return false}
    if lhs.msgType != rhs.msgType {return false}
    if lhs.msgFromUserID != rhs.msgFromUserID {return false}
    if lhs.msgStatus != rhs.msgStatus {return false}
    if lhs.msgAttach != rhs.msgAttach {return false}
    if lhs.extendData != rhs.extendData {return false}
    if lhs.isRobotSession != rhs.isRobotSession {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension CIM_Def_CIMMsgInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".CIMMsgInfo"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .standard(proto: "client_msg_id"),
    2: .standard(proto: "server_msg_id"),
    3: .standard(proto: "msg_res_code"),
    4: .standard(proto: "msg_feature"),
    5: .standard(proto: "session_type"),
    6: .standard(proto: "from_user_id"),
    7: .standard(proto: "to_session_id"),
    8: .standard(proto: "create_time"),
    9: .standard(proto: "msg_type"),
    10: .standard(proto: "msg_status"),
    11: .standard(proto: "msg_data"),
    12: .same(proto: "attach"),
    13: .standard(proto: "sender_client_type"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularStringField(value: &self.clientMsgID)
      case 2: try decoder.decodeSingularUInt64Field(value: &self.serverMsgID)
      case 3: try decoder.decodeSingularEnumField(value: &self.msgResCode)
      case 4: try decoder.decodeSingularEnumField(value: &self.msgFeature)
      case 5: try decoder.decodeSingularEnumField(value: &self.sessionType)
      case 6: try decoder.decodeSingularUInt64Field(value: &self.fromUserID)
      case 7: try decoder.decodeSingularUInt64Field(value: &self.toSessionID)
      case 8: try decoder.decodeSingularUInt32Field(value: &self.createTime)
      case 9: try decoder.decodeSingularEnumField(value: &self.msgType)
      case 10: try decoder.decodeSingularEnumField(value: &self.msgStatus)
      case 11: try decoder.decodeSingularBytesField(value: &self.msgData)
      case 12: try decoder.decodeSingularStringField(value: &self.attach)
      case 13: try decoder.decodeSingularEnumField(value: &self.senderClientType)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if !self.clientMsgID.isEmpty {
      try visitor.visitSingularStringField(value: self.clientMsgID, fieldNumber: 1)
    }
    if self.serverMsgID != 0 {
      try visitor.visitSingularUInt64Field(value: self.serverMsgID, fieldNumber: 2)
    }
    if self.msgResCode != .kCimResCodeUnknown {
      try visitor.visitSingularEnumField(value: self.msgResCode, fieldNumber: 3)
    }
    if self.msgFeature != .kCimMsgFeatureDefault {
      try visitor.visitSingularEnumField(value: self.msgFeature, fieldNumber: 4)
    }
    if self.sessionType != .kCimSessionTypeInvalid {
      try visitor.visitSingularEnumField(value: self.sessionType, fieldNumber: 5)
    }
    if self.fromUserID != 0 {
      try visitor.visitSingularUInt64Field(value: self.fromUserID, fieldNumber: 6)
    }
    if self.toSessionID != 0 {
      try visitor.visitSingularUInt64Field(value: self.toSessionID, fieldNumber: 7)
    }
    if self.createTime != 0 {
      try visitor.visitSingularUInt32Field(value: self.createTime, fieldNumber: 8)
    }
    if self.msgType != .kCimMsgTypeUnknown {
      try visitor.visitSingularEnumField(value: self.msgType, fieldNumber: 9)
    }
    if self.msgStatus != .kCimMsgStatusNone {
      try visitor.visitSingularEnumField(value: self.msgStatus, fieldNumber: 10)
    }
    if !self.msgData.isEmpty {
      try visitor.visitSingularBytesField(value: self.msgData, fieldNumber: 11)
    }
    if !self.attach.isEmpty {
      try visitor.visitSingularStringField(value: self.attach, fieldNumber: 12)
    }
    if self.senderClientType != .kCimClientTypeDefault {
      try visitor.visitSingularEnumField(value: self.senderClientType, fieldNumber: 13)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: CIM_Def_CIMMsgInfo, rhs: CIM_Def_CIMMsgInfo) -> Bool {
    if lhs.clientMsgID != rhs.clientMsgID {return false}
    if lhs.serverMsgID != rhs.serverMsgID {return false}
    if lhs.msgResCode != rhs.msgResCode {return false}
    if lhs.msgFeature != rhs.msgFeature {return false}
    if lhs.sessionType != rhs.sessionType {return false}
    if lhs.fromUserID != rhs.fromUserID {return false}
    if lhs.toSessionID != rhs.toSessionID {return false}
    if lhs.createTime != rhs.createTime {return false}
    if lhs.msgType != rhs.msgType {return false}
    if lhs.msgStatus != rhs.msgStatus {return false}
    if lhs.msgData != rhs.msgData {return false}
    if lhs.attach != rhs.attach {return false}
    if lhs.senderClientType != rhs.senderClientType {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension CIM_Def_CIMChannelInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".CIMChannelInfo"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .standard(proto: "channel_name"),
    2: .standard(proto: "channel_token"),
    3: .standard(proto: "creator_id"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularStringField(value: &self.channelName)
      case 2: try decoder.decodeSingularStringField(value: &self.channelToken)
      case 3: try decoder.decodeSingularUInt64Field(value: &self.creatorID)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if !self.channelName.isEmpty {
      try visitor.visitSingularStringField(value: self.channelName, fieldNumber: 1)
    }
    if !self.channelToken.isEmpty {
      try visitor.visitSingularStringField(value: self.channelToken, fieldNumber: 2)
    }
    if self.creatorID != 0 {
      try visitor.visitSingularUInt64Field(value: self.creatorID, fieldNumber: 3)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: CIM_Def_CIMChannelInfo, rhs: CIM_Def_CIMChannelInfo) -> Bool {
    if lhs.channelName != rhs.channelName {return false}
    if lhs.channelToken != rhs.channelToken {return false}
    if lhs.creatorID != rhs.creatorID {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}
