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

/// iOS - since we use a modern proto-compiler, we must specify the legacy proto format.

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
}

struct SessionProtos_Envelope {
  // 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.

  /// @required
  var type: SessionProtos_Envelope.TypeEnum {
    get {return _type ?? .sessionMessage}
    set {_type = newValue}
  }
  /// Returns true if `type` has been explicitly set.
  var hasType: Bool {return self._type != nil}
  /// Clears the value of `type`. Subsequent reads from it will return its default value.
  mutating func clearType() {self._type = nil}

  var source: String {
    get {return _source ?? String()}
    set {_source = newValue}
  }
  /// Returns true if `source` has been explicitly set.
  var hasSource: Bool {return self._source != nil}
  /// Clears the value of `source`. Subsequent reads from it will return its default value.
  mutating func clearSource() {self._source = nil}

  var sourceDevice: UInt32 {
    get {return _sourceDevice ?? 0}
    set {_sourceDevice = newValue}
  }
  /// Returns true if `sourceDevice` has been explicitly set.
  var hasSourceDevice: Bool {return self._sourceDevice != nil}
  /// Clears the value of `sourceDevice`. Subsequent reads from it will return its default value.
  mutating func clearSourceDevice() {self._sourceDevice = nil}

  /// @required
  var timestamp: UInt64 {
    get {return _timestamp ?? 0}
    set {_timestamp = newValue}
  }
  /// Returns true if `timestamp` has been explicitly set.
  var hasTimestamp: Bool {return self._timestamp != nil}
  /// Clears the value of `timestamp`. Subsequent reads from it will return its default value.
  mutating func clearTimestamp() {self._timestamp = nil}

  var content: Data {
    get {return _content ?? Data()}
    set {_content = newValue}
  }
  /// Returns true if `content` has been explicitly set.
  var hasContent: Bool {return self._content != nil}
  /// Clears the value of `content`. Subsequent reads from it will return its default value.
  mutating func clearContent() {self._content = nil}

  var serverTimestamp: UInt64 {
    get {return _serverTimestamp ?? 0}
    set {_serverTimestamp = newValue}
  }
  /// Returns true if `serverTimestamp` has been explicitly set.
  var hasServerTimestamp: Bool {return self._serverTimestamp != nil}
  /// Clears the value of `serverTimestamp`. Subsequent reads from it will return its default value.
  mutating func clearServerTimestamp() {self._serverTimestamp = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  enum TypeEnum: SwiftProtobuf.Enum {
    typealias RawValue = Int
    case sessionMessage // = 6
    case closedGroupMessage // = 7

    init() {
      self = .sessionMessage
    }

    init?(rawValue: Int) {
      switch rawValue {
      case 6: self = .sessionMessage
      case 7: self = .closedGroupMessage
      default: return nil
      }
    }

    var rawValue: Int {
      switch self {
      case .sessionMessage: return 6
      case .closedGroupMessage: return 7
      }
    }

  }

  init() {}

  fileprivate var _type: SessionProtos_Envelope.TypeEnum? = nil
  fileprivate var _source: String? = nil
  fileprivate var _sourceDevice: UInt32? = nil
  fileprivate var _timestamp: UInt64? = nil
  fileprivate var _content: Data? = nil
  fileprivate var _serverTimestamp: UInt64? = nil
}

#if swift(>=4.2)

extension SessionProtos_Envelope.TypeEnum: CaseIterable {
  // Support synthesized by the compiler.
}

#endif  // swift(>=4.2)

struct SessionProtos_TypingMessage {
  // 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.

  /// @required
  var timestamp: UInt64 {
    get {return _timestamp ?? 0}
    set {_timestamp = newValue}
  }
  /// Returns true if `timestamp` has been explicitly set.
  var hasTimestamp: Bool {return self._timestamp != nil}
  /// Clears the value of `timestamp`. Subsequent reads from it will return its default value.
  mutating func clearTimestamp() {self._timestamp = nil}

  /// @required
  var action: SessionProtos_TypingMessage.Action {
    get {return _action ?? .started}
    set {_action = newValue}
  }
  /// Returns true if `action` has been explicitly set.
  var hasAction: Bool {return self._action != nil}
  /// Clears the value of `action`. Subsequent reads from it will return its default value.
  mutating func clearAction() {self._action = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  enum Action: SwiftProtobuf.Enum {
    typealias RawValue = Int
    case started // = 0
    case stopped // = 1

    init() {
      self = .started
    }

    init?(rawValue: Int) {
      switch rawValue {
      case 0: self = .started
      case 1: self = .stopped
      default: return nil
      }
    }

    var rawValue: Int {
      switch self {
      case .started: return 0
      case .stopped: return 1
      }
    }

  }

  init() {}

  fileprivate var _timestamp: UInt64? = nil
  fileprivate var _action: SessionProtos_TypingMessage.Action? = nil
}

#if swift(>=4.2)

extension SessionProtos_TypingMessage.Action: CaseIterable {
  // Support synthesized by the compiler.
}

#endif  // swift(>=4.2)

struct SessionProtos_UnsendRequest {
  // 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.

  /// @required
  var timestamp: UInt64 {
    get {return _timestamp ?? 0}
    set {_timestamp = newValue}
  }
  /// Returns true if `timestamp` has been explicitly set.
  var hasTimestamp: Bool {return self._timestamp != nil}
  /// Clears the value of `timestamp`. Subsequent reads from it will return its default value.
  mutating func clearTimestamp() {self._timestamp = nil}

  /// @required
  var author: String {
    get {return _author ?? String()}
    set {_author = newValue}
  }
  /// Returns true if `author` has been explicitly set.
  var hasAuthor: Bool {return self._author != nil}
  /// Clears the value of `author`. Subsequent reads from it will return its default value.
  mutating func clearAuthor() {self._author = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}

  fileprivate var _timestamp: UInt64? = nil
  fileprivate var _author: String? = nil
}

struct SessionProtos_MessageRequestResponse {
  // 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.

  /// @required
  var isApproved: Bool {
    get {return _isApproved ?? false}
    set {_isApproved = newValue}
  }
  /// Returns true if `isApproved` has been explicitly set.
  var hasIsApproved: Bool {return self._isApproved != nil}
  /// Clears the value of `isApproved`. Subsequent reads from it will return its default value.
  mutating func clearIsApproved() {self._isApproved = nil}

  var profileKey: Data {
    get {return _profileKey ?? Data()}
    set {_profileKey = newValue}
  }
  /// Returns true if `profileKey` has been explicitly set.
  var hasProfileKey: Bool {return self._profileKey != nil}
  /// Clears the value of `profileKey`. Subsequent reads from it will return its default value.
  mutating func clearProfileKey() {self._profileKey = nil}

  var profile: SessionProtos_LokiProfile {
    get {return _profile ?? SessionProtos_LokiProfile()}
    set {_profile = newValue}
  }
  /// Returns true if `profile` has been explicitly set.
  var hasProfile: Bool {return self._profile != nil}
  /// Clears the value of `profile`. Subsequent reads from it will return its default value.
  mutating func clearProfile() {self._profile = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}

  fileprivate var _isApproved: Bool? = nil
  fileprivate var _profileKey: Data? = nil
  fileprivate var _profile: SessionProtos_LokiProfile? = nil
}

struct SessionProtos_Content {
  // 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 dataMessage: SessionProtos_DataMessage {
    get {return _storage._dataMessage ?? SessionProtos_DataMessage()}
    set {_uniqueStorage()._dataMessage = newValue}
  }
  /// Returns true if `dataMessage` has been explicitly set.
  var hasDataMessage: Bool {return _storage._dataMessage != nil}
  /// Clears the value of `dataMessage`. Subsequent reads from it will return its default value.
  mutating func clearDataMessage() {_uniqueStorage()._dataMessage = nil}

  var callMessage: SessionProtos_CallMessage {
    get {return _storage._callMessage ?? SessionProtos_CallMessage()}
    set {_uniqueStorage()._callMessage = newValue}
  }
  /// Returns true if `callMessage` has been explicitly set.
  var hasCallMessage: Bool {return _storage._callMessage != nil}
  /// Clears the value of `callMessage`. Subsequent reads from it will return its default value.
  mutating func clearCallMessage() {_uniqueStorage()._callMessage = nil}

  var receiptMessage: SessionProtos_ReceiptMessage {
    get {return _storage._receiptMessage ?? SessionProtos_ReceiptMessage()}
    set {_uniqueStorage()._receiptMessage = newValue}
  }
  /// Returns true if `receiptMessage` has been explicitly set.
  var hasReceiptMessage: Bool {return _storage._receiptMessage != nil}
  /// Clears the value of `receiptMessage`. Subsequent reads from it will return its default value.
  mutating func clearReceiptMessage() {_uniqueStorage()._receiptMessage = nil}

  var typingMessage: SessionProtos_TypingMessage {
    get {return _storage._typingMessage ?? SessionProtos_TypingMessage()}
    set {_uniqueStorage()._typingMessage = newValue}
  }
  /// Returns true if `typingMessage` has been explicitly set.
  var hasTypingMessage: Bool {return _storage._typingMessage != nil}
  /// Clears the value of `typingMessage`. Subsequent reads from it will return its default value.
  mutating func clearTypingMessage() {_uniqueStorage()._typingMessage = nil}

  var configurationMessage: SessionProtos_ConfigurationMessage {
    get {return _storage._configurationMessage ?? SessionProtos_ConfigurationMessage()}
    set {_uniqueStorage()._configurationMessage = newValue}
  }
  /// Returns true if `configurationMessage` has been explicitly set.
  var hasConfigurationMessage: Bool {return _storage._configurationMessage != nil}
  /// Clears the value of `configurationMessage`. Subsequent reads from it will return its default value.
  mutating func clearConfigurationMessage() {_uniqueStorage()._configurationMessage = nil}

  var dataExtractionNotification: SessionProtos_DataExtractionNotification {
    get {return _storage._dataExtractionNotification ?? SessionProtos_DataExtractionNotification()}
    set {_uniqueStorage()._dataExtractionNotification = newValue}
  }
  /// Returns true if `dataExtractionNotification` has been explicitly set.
  var hasDataExtractionNotification: Bool {return _storage._dataExtractionNotification != nil}
  /// Clears the value of `dataExtractionNotification`. Subsequent reads from it will return its default value.
  mutating func clearDataExtractionNotification() {_uniqueStorage()._dataExtractionNotification = nil}

  var unsendRequest: SessionProtos_UnsendRequest {
    get {return _storage._unsendRequest ?? SessionProtos_UnsendRequest()}
    set {_uniqueStorage()._unsendRequest = newValue}
  }
  /// Returns true if `unsendRequest` has been explicitly set.
  var hasUnsendRequest: Bool {return _storage._unsendRequest != nil}
  /// Clears the value of `unsendRequest`. Subsequent reads from it will return its default value.
  mutating func clearUnsendRequest() {_uniqueStorage()._unsendRequest = nil}

  var messageRequestResponse: SessionProtos_MessageRequestResponse {
    get {return _storage._messageRequestResponse ?? SessionProtos_MessageRequestResponse()}
    set {_uniqueStorage()._messageRequestResponse = newValue}
  }
  /// Returns true if `messageRequestResponse` has been explicitly set.
  var hasMessageRequestResponse: Bool {return _storage._messageRequestResponse != nil}
  /// Clears the value of `messageRequestResponse`. Subsequent reads from it will return its default value.
  mutating func clearMessageRequestResponse() {_uniqueStorage()._messageRequestResponse = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}

  fileprivate var _storage = _StorageClass.defaultInstance
}

struct SessionProtos_CallMessage {
  // 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.

  /// @required
  var type: SessionProtos_CallMessage.TypeEnum {
    get {return _type ?? .preOffer}
    set {_type = newValue}
  }
  /// Returns true if `type` has been explicitly set.
  var hasType: Bool {return self._type != nil}
  /// Clears the value of `type`. Subsequent reads from it will return its default value.
  mutating func clearType() {self._type = nil}

  var sdps: [String] = []

  var sdpMlineIndexes: [UInt32] = []

  var sdpMids: [String] = []

  /// @required
  var uuid: String {
    get {return _uuid ?? String()}
    set {_uuid = newValue}
  }
  /// Returns true if `uuid` has been explicitly set.
  var hasUuid: Bool {return self._uuid != nil}
  /// Clears the value of `uuid`. Subsequent reads from it will return its default value.
  mutating func clearUuid() {self._uuid = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  enum TypeEnum: SwiftProtobuf.Enum {
    typealias RawValue = Int
    case preOffer // = 6
    case offer // = 1
    case answer // = 2
    case provisionalAnswer // = 3
    case iceCandidates // = 4
    case endCall // = 5

    init() {
      self = .preOffer
    }

    init?(rawValue: Int) {
      switch rawValue {
      case 1: self = .offer
      case 2: self = .answer
      case 3: self = .provisionalAnswer
      case 4: self = .iceCandidates
      case 5: self = .endCall
      case 6: self = .preOffer
      default: return nil
      }
    }

    var rawValue: Int {
      switch self {
      case .offer: return 1
      case .answer: return 2
      case .provisionalAnswer: return 3
      case .iceCandidates: return 4
      case .endCall: return 5
      case .preOffer: return 6
      }
    }

  }

  init() {}

  fileprivate var _type: SessionProtos_CallMessage.TypeEnum? = nil
  fileprivate var _uuid: String? = nil
}

#if swift(>=4.2)

extension SessionProtos_CallMessage.TypeEnum: CaseIterable {
  // Support synthesized by the compiler.
}

#endif  // swift(>=4.2)

struct SessionProtos_KeyPair {
  // 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.

  /// @required
  var publicKey: Data {
    get {return _publicKey ?? Data()}
    set {_publicKey = newValue}
  }
  /// Returns true if `publicKey` has been explicitly set.
  var hasPublicKey: Bool {return self._publicKey != nil}
  /// Clears the value of `publicKey`. Subsequent reads from it will return its default value.
  mutating func clearPublicKey() {self._publicKey = nil}

  /// @required
  var privateKey: Data {
    get {return _privateKey ?? Data()}
    set {_privateKey = newValue}
  }
  /// Returns true if `privateKey` has been explicitly set.
  var hasPrivateKey: Bool {return self._privateKey != nil}
  /// Clears the value of `privateKey`. Subsequent reads from it will return its default value.
  mutating func clearPrivateKey() {self._privateKey = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}

  fileprivate var _publicKey: Data? = nil
  fileprivate var _privateKey: Data? = nil
}

struct SessionProtos_DataExtractionNotification {
  // 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.

  /// @required
  var type: SessionProtos_DataExtractionNotification.TypeEnum {
    get {return _type ?? .screenshot}
    set {_type = newValue}
  }
  /// Returns true if `type` has been explicitly set.
  var hasType: Bool {return self._type != nil}
  /// Clears the value of `type`. Subsequent reads from it will return its default value.
  mutating func clearType() {self._type = nil}

  var timestamp: UInt64 {
    get {return _timestamp ?? 0}
    set {_timestamp = newValue}
  }
  /// Returns true if `timestamp` has been explicitly set.
  var hasTimestamp: Bool {return self._timestamp != nil}
  /// Clears the value of `timestamp`. Subsequent reads from it will return its default value.
  mutating func clearTimestamp() {self._timestamp = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  enum TypeEnum: SwiftProtobuf.Enum {
    typealias RawValue = Int
    case screenshot // = 1

    /// timestamp
    case mediaSaved // = 2

    init() {
      self = .screenshot
    }

    init?(rawValue: Int) {
      switch rawValue {
      case 1: self = .screenshot
      case 2: self = .mediaSaved
      default: return nil
      }
    }

    var rawValue: Int {
      switch self {
      case .screenshot: return 1
      case .mediaSaved: return 2
      }
    }

  }

  init() {}

  fileprivate var _type: SessionProtos_DataExtractionNotification.TypeEnum? = nil
  fileprivate var _timestamp: UInt64? = nil
}

#if swift(>=4.2)

extension SessionProtos_DataExtractionNotification.TypeEnum: CaseIterable {
  // Support synthesized by the compiler.
}

#endif  // swift(>=4.2)

struct SessionProtos_LokiProfile {
  // 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 displayName: String {
    get {return _displayName ?? String()}
    set {_displayName = newValue}
  }
  /// Returns true if `displayName` has been explicitly set.
  var hasDisplayName: Bool {return self._displayName != nil}
  /// Clears the value of `displayName`. Subsequent reads from it will return its default value.
  mutating func clearDisplayName() {self._displayName = nil}

  var profilePicture: String {
    get {return _profilePicture ?? String()}
    set {_profilePicture = newValue}
  }
  /// Returns true if `profilePicture` has been explicitly set.
  var hasProfilePicture: Bool {return self._profilePicture != nil}
  /// Clears the value of `profilePicture`. Subsequent reads from it will return its default value.
  mutating func clearProfilePicture() {self._profilePicture = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}

  fileprivate var _displayName: String? = nil
  fileprivate var _profilePicture: String? = nil
}

struct SessionProtos_DataMessage {
  // 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 body: String {
    get {return _storage._body ?? String()}
    set {_uniqueStorage()._body = newValue}
  }
  /// Returns true if `body` has been explicitly set.
  var hasBody: Bool {return _storage._body != nil}
  /// Clears the value of `body`. Subsequent reads from it will return its default value.
  mutating func clearBody() {_uniqueStorage()._body = nil}

  var attachments: [SessionProtos_AttachmentPointer] {
    get {return _storage._attachments}
    set {_uniqueStorage()._attachments = newValue}
  }

  var group: SessionProtos_GroupContext {
    get {return _storage._group ?? SessionProtos_GroupContext()}
    set {_uniqueStorage()._group = newValue}
  }
  /// Returns true if `group` has been explicitly set.
  var hasGroup: Bool {return _storage._group != nil}
  /// Clears the value of `group`. Subsequent reads from it will return its default value.
  mutating func clearGroup() {_uniqueStorage()._group = nil}

  var flags: UInt32 {
    get {return _storage._flags ?? 0}
    set {_uniqueStorage()._flags = newValue}
  }
  /// Returns true if `flags` has been explicitly set.
  var hasFlags: Bool {return _storage._flags != nil}
  /// Clears the value of `flags`. Subsequent reads from it will return its default value.
  mutating func clearFlags() {_uniqueStorage()._flags = nil}

  var expireTimer: UInt32 {
    get {return _storage._expireTimer ?? 0}
    set {_uniqueStorage()._expireTimer = newValue}
  }
  /// Returns true if `expireTimer` has been explicitly set.
  var hasExpireTimer: Bool {return _storage._expireTimer != nil}
  /// Clears the value of `expireTimer`. Subsequent reads from it will return its default value.
  mutating func clearExpireTimer() {_uniqueStorage()._expireTimer = nil}

  var profileKey: Data {
    get {return _storage._profileKey ?? Data()}
    set {_uniqueStorage()._profileKey = newValue}
  }
  /// Returns true if `profileKey` has been explicitly set.
  var hasProfileKey: Bool {return _storage._profileKey != nil}
  /// Clears the value of `profileKey`. Subsequent reads from it will return its default value.
  mutating func clearProfileKey() {_uniqueStorage()._profileKey = nil}

  var timestamp: UInt64 {
    get {return _storage._timestamp ?? 0}
    set {_uniqueStorage()._timestamp = newValue}
  }
  /// Returns true if `timestamp` has been explicitly set.
  var hasTimestamp: Bool {return _storage._timestamp != nil}
  /// Clears the value of `timestamp`. Subsequent reads from it will return its default value.
  mutating func clearTimestamp() {_uniqueStorage()._timestamp = nil}

  var quote: SessionProtos_DataMessage.Quote {
    get {return _storage._quote ?? SessionProtos_DataMessage.Quote()}
    set {_uniqueStorage()._quote = newValue}
  }
  /// Returns true if `quote` has been explicitly set.
  var hasQuote: Bool {return _storage._quote != nil}
  /// Clears the value of `quote`. Subsequent reads from it will return its default value.
  mutating func clearQuote() {_uniqueStorage()._quote = nil}

  var preview: [SessionProtos_DataMessage.Preview] {
    get {return _storage._preview}
    set {_uniqueStorage()._preview = newValue}
  }

  var reaction: SessionProtos_DataMessage.Reaction {
    get {return _storage._reaction ?? SessionProtos_DataMessage.Reaction()}
    set {_uniqueStorage()._reaction = newValue}
  }
  /// Returns true if `reaction` has been explicitly set.
  var hasReaction: Bool {return _storage._reaction != nil}
  /// Clears the value of `reaction`. Subsequent reads from it will return its default value.
  mutating func clearReaction() {_uniqueStorage()._reaction = nil}

  var profile: SessionProtos_LokiProfile {
    get {return _storage._profile ?? SessionProtos_LokiProfile()}
    set {_uniqueStorage()._profile = newValue}
  }
  /// Returns true if `profile` has been explicitly set.
  var hasProfile: Bool {return _storage._profile != nil}
  /// Clears the value of `profile`. Subsequent reads from it will return its default value.
  mutating func clearProfile() {_uniqueStorage()._profile = nil}

  var openGroupInvitation: SessionProtos_DataMessage.OpenGroupInvitation {
    get {return _storage._openGroupInvitation ?? SessionProtos_DataMessage.OpenGroupInvitation()}
    set {_uniqueStorage()._openGroupInvitation = newValue}
  }
  /// Returns true if `openGroupInvitation` has been explicitly set.
  var hasOpenGroupInvitation: Bool {return _storage._openGroupInvitation != nil}
  /// Clears the value of `openGroupInvitation`. Subsequent reads from it will return its default value.
  mutating func clearOpenGroupInvitation() {_uniqueStorage()._openGroupInvitation = nil}

  var closedGroupControlMessage: SessionProtos_DataMessage.ClosedGroupControlMessage {
    get {return _storage._closedGroupControlMessage ?? SessionProtos_DataMessage.ClosedGroupControlMessage()}
    set {_uniqueStorage()._closedGroupControlMessage = newValue}
  }
  /// Returns true if `closedGroupControlMessage` has been explicitly set.
  var hasClosedGroupControlMessage: Bool {return _storage._closedGroupControlMessage != nil}
  /// Clears the value of `closedGroupControlMessage`. Subsequent reads from it will return its default value.
  mutating func clearClosedGroupControlMessage() {_uniqueStorage()._closedGroupControlMessage = nil}

  var syncTarget: String {
    get {return _storage._syncTarget ?? String()}
    set {_uniqueStorage()._syncTarget = newValue}
  }
  /// Returns true if `syncTarget` has been explicitly set.
  var hasSyncTarget: Bool {return _storage._syncTarget != nil}
  /// Clears the value of `syncTarget`. Subsequent reads from it will return its default value.
  mutating func clearSyncTarget() {_uniqueStorage()._syncTarget = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  enum Flags: SwiftProtobuf.Enum {
    typealias RawValue = Int
    case expirationTimerUpdate // = 2

    init() {
      self = .expirationTimerUpdate
    }

    init?(rawValue: Int) {
      switch rawValue {
      case 2: self = .expirationTimerUpdate
      default: return nil
      }
    }

    var rawValue: Int {
      switch self {
      case .expirationTimerUpdate: return 2
      }
    }

  }

  struct Quote {
    // 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.

    /// @required
    var id: UInt64 {
      get {return _id ?? 0}
      set {_id = newValue}
    }
    /// Returns true if `id` has been explicitly set.
    var hasID: Bool {return self._id != nil}
    /// Clears the value of `id`. Subsequent reads from it will return its default value.
    mutating func clearID() {self._id = nil}

    /// @required
    var author: String {
      get {return _author ?? String()}
      set {_author = newValue}
    }
    /// Returns true if `author` has been explicitly set.
    var hasAuthor: Bool {return self._author != nil}
    /// Clears the value of `author`. Subsequent reads from it will return its default value.
    mutating func clearAuthor() {self._author = nil}

    var text: String {
      get {return _text ?? String()}
      set {_text = newValue}
    }
    /// Returns true if `text` has been explicitly set.
    var hasText: Bool {return self._text != nil}
    /// Clears the value of `text`. Subsequent reads from it will return its default value.
    mutating func clearText() {self._text = nil}

    var attachments: [SessionProtos_DataMessage.Quote.QuotedAttachment] = []

    var unknownFields = SwiftProtobuf.UnknownStorage()

    struct QuotedAttachment {
      // 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 contentType: String {
        get {return _contentType ?? String()}
        set {_contentType = newValue}
      }
      /// Returns true if `contentType` has been explicitly set.
      var hasContentType: Bool {return self._contentType != nil}
      /// Clears the value of `contentType`. Subsequent reads from it will return its default value.
      mutating func clearContentType() {self._contentType = nil}

      var fileName: String {
        get {return _fileName ?? String()}
        set {_fileName = newValue}
      }
      /// Returns true if `fileName` has been explicitly set.
      var hasFileName: Bool {return self._fileName != nil}
      /// Clears the value of `fileName`. Subsequent reads from it will return its default value.
      mutating func clearFileName() {self._fileName = nil}

      var thumbnail: SessionProtos_AttachmentPointer {
        get {return _thumbnail ?? SessionProtos_AttachmentPointer()}
        set {_thumbnail = newValue}
      }
      /// Returns true if `thumbnail` has been explicitly set.
      var hasThumbnail: Bool {return self._thumbnail != nil}
      /// Clears the value of `thumbnail`. Subsequent reads from it will return its default value.
      mutating func clearThumbnail() {self._thumbnail = nil}

      var flags: UInt32 {
        get {return _flags ?? 0}
        set {_flags = newValue}
      }
      /// Returns true if `flags` has been explicitly set.
      var hasFlags: Bool {return self._flags != nil}
      /// Clears the value of `flags`. Subsequent reads from it will return its default value.
      mutating func clearFlags() {self._flags = nil}

      var unknownFields = SwiftProtobuf.UnknownStorage()

      enum Flags: SwiftProtobuf.Enum {
        typealias RawValue = Int
        case voiceMessage // = 1

        init() {
          self = .voiceMessage
        }

        init?(rawValue: Int) {
          switch rawValue {
          case 1: self = .voiceMessage
          default: return nil
          }
        }

        var rawValue: Int {
          switch self {
          case .voiceMessage: return 1
          }
        }

      }

      init() {}

      fileprivate var _contentType: String? = nil
      fileprivate var _fileName: String? = nil
      fileprivate var _thumbnail: SessionProtos_AttachmentPointer? = nil
      fileprivate var _flags: UInt32? = nil
    }

    init() {}

    fileprivate var _id: UInt64? = nil
    fileprivate var _author: String? = nil
    fileprivate var _text: String? = nil
  }

  struct Preview {
    // 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.

    /// @required
    var url: String {
      get {return _url ?? String()}
      set {_url = newValue}
    }
    /// Returns true if `url` has been explicitly set.
    var hasURL: Bool {return self._url != nil}
    /// Clears the value of `url`. Subsequent reads from it will return its default value.
    mutating func clearURL() {self._url = nil}

    var title: String {
      get {return _title ?? String()}
      set {_title = newValue}
    }
    /// Returns true if `title` has been explicitly set.
    var hasTitle: Bool {return self._title != nil}
    /// Clears the value of `title`. Subsequent reads from it will return its default value.
    mutating func clearTitle() {self._title = nil}

    var image: SessionProtos_AttachmentPointer {
      get {return _image ?? SessionProtos_AttachmentPointer()}
      set {_image = newValue}
    }
    /// Returns true if `image` has been explicitly set.
    var hasImage: Bool {return self._image != nil}
    /// Clears the value of `image`. Subsequent reads from it will return its default value.
    mutating func clearImage() {self._image = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _url: String? = nil
    fileprivate var _title: String? = nil
    fileprivate var _image: SessionProtos_AttachmentPointer? = nil
  }

  struct Reaction {
    // 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.

    /// @required
    var id: UInt64 {
      get {return _id ?? 0}
      set {_id = newValue}
    }
    /// Returns true if `id` has been explicitly set.
    var hasID: Bool {return self._id != nil}
    /// Clears the value of `id`. Subsequent reads from it will return its default value.
    mutating func clearID() {self._id = nil}

    /// @required
    var author: String {
      get {return _author ?? String()}
      set {_author = newValue}
    }
    /// Returns true if `author` has been explicitly set.
    var hasAuthor: Bool {return self._author != nil}
    /// Clears the value of `author`. Subsequent reads from it will return its default value.
    mutating func clearAuthor() {self._author = nil}

    var emoji: String {
      get {return _emoji ?? String()}
      set {_emoji = newValue}
    }
    /// Returns true if `emoji` has been explicitly set.
    var hasEmoji: Bool {return self._emoji != nil}
    /// Clears the value of `emoji`. Subsequent reads from it will return its default value.
    mutating func clearEmoji() {self._emoji = nil}

    /// @required
    var action: SessionProtos_DataMessage.Reaction.Action {
      get {return _action ?? .react}
      set {_action = newValue}
    }
    /// Returns true if `action` has been explicitly set.
    var hasAction: Bool {return self._action != nil}
    /// Clears the value of `action`. Subsequent reads from it will return its default value.
    mutating func clearAction() {self._action = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    enum Action: SwiftProtobuf.Enum {
      typealias RawValue = Int
      case react // = 0
      case remove // = 1

      init() {
        self = .react
      }

      init?(rawValue: Int) {
        switch rawValue {
        case 0: self = .react
        case 1: self = .remove
        default: return nil
        }
      }

      var rawValue: Int {
        switch self {
        case .react: return 0
        case .remove: return 1
        }
      }

    }

    init() {}

    fileprivate var _id: UInt64? = nil
    fileprivate var _author: String? = nil
    fileprivate var _emoji: String? = nil
    fileprivate var _action: SessionProtos_DataMessage.Reaction.Action? = nil
  }

  struct OpenGroupInvitation {
    // 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.

    /// @required
    var url: String {
      get {return _url ?? String()}
      set {_url = newValue}
    }
    /// Returns true if `url` has been explicitly set.
    var hasURL: Bool {return self._url != nil}
    /// Clears the value of `url`. Subsequent reads from it will return its default value.
    mutating func clearURL() {self._url = nil}

    /// @required
    var name: String {
      get {return _name ?? String()}
      set {_name = newValue}
    }
    /// Returns true if `name` has been explicitly set.
    var hasName: Bool {return self._name != nil}
    /// Clears the value of `name`. Subsequent reads from it will return its default value.
    mutating func clearName() {self._name = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _url: String? = nil
    fileprivate var _name: String? = nil
  }

  struct ClosedGroupControlMessage {
    // 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.

    /// @required
    var type: SessionProtos_DataMessage.ClosedGroupControlMessage.TypeEnum {
      get {return _type ?? .new}
      set {_type = newValue}
    }
    /// Returns true if `type` has been explicitly set.
    var hasType: Bool {return self._type != nil}
    /// Clears the value of `type`. Subsequent reads from it will return its default value.
    mutating func clearType() {self._type = nil}

    var publicKey: Data {
      get {return _publicKey ?? Data()}
      set {_publicKey = newValue}
    }
    /// Returns true if `publicKey` has been explicitly set.
    var hasPublicKey: Bool {return self._publicKey != nil}
    /// Clears the value of `publicKey`. Subsequent reads from it will return its default value.
    mutating func clearPublicKey() {self._publicKey = nil}

    var name: String {
      get {return _name ?? String()}
      set {_name = newValue}
    }
    /// Returns true if `name` has been explicitly set.
    var hasName: Bool {return self._name != nil}
    /// Clears the value of `name`. Subsequent reads from it will return its default value.
    mutating func clearName() {self._name = nil}

    var encryptionKeyPair: SessionProtos_KeyPair {
      get {return _encryptionKeyPair ?? SessionProtos_KeyPair()}
      set {_encryptionKeyPair = newValue}
    }
    /// Returns true if `encryptionKeyPair` has been explicitly set.
    var hasEncryptionKeyPair: Bool {return self._encryptionKeyPair != nil}
    /// Clears the value of `encryptionKeyPair`. Subsequent reads from it will return its default value.
    mutating func clearEncryptionKeyPair() {self._encryptionKeyPair = nil}

    var members: [Data] = []

    var admins: [Data] = []

    var wrappers: [SessionProtos_DataMessage.ClosedGroupControlMessage.KeyPairWrapper] = []

    var expirationTimer: UInt32 {
      get {return _expirationTimer ?? 0}
      set {_expirationTimer = newValue}
    }
    /// Returns true if `expirationTimer` has been explicitly set.
    var hasExpirationTimer: Bool {return self._expirationTimer != nil}
    /// Clears the value of `expirationTimer`. Subsequent reads from it will return its default value.
    mutating func clearExpirationTimer() {self._expirationTimer = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    enum TypeEnum: SwiftProtobuf.Enum {
      typealias RawValue = Int

      /// publicKey, name, encryptionKeyPair, members, admins, expirationTimer
      case new // = 1

      /// publicKey, wrappers
      case encryptionKeyPair // = 3

      /// name
      case nameChange // = 4

      /// members
      case membersAdded // = 5

      /// members
      case membersRemoved // = 6
      case memberLeft // = 7
      case encryptionKeyPairRequest // = 8

      init() {
        self = .new
      }

      init?(rawValue: Int) {
        switch rawValue {
        case 1: self = .new
        case 3: self = .encryptionKeyPair
        case 4: self = .nameChange
        case 5: self = .membersAdded
        case 6: self = .membersRemoved
        case 7: self = .memberLeft
        case 8: self = .encryptionKeyPairRequest
        default: return nil
        }
      }

      var rawValue: Int {
        switch self {
        case .new: return 1
        case .encryptionKeyPair: return 3
        case .nameChange: return 4
        case .membersAdded: return 5
        case .membersRemoved: return 6
        case .memberLeft: return 7
        case .encryptionKeyPairRequest: return 8
        }
      }

    }

    struct KeyPairWrapper {
      // 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.

      /// @required
      var publicKey: Data {
        get {return _publicKey ?? Data()}
        set {_publicKey = newValue}
      }
      /// Returns true if `publicKey` has been explicitly set.
      var hasPublicKey: Bool {return self._publicKey != nil}
      /// Clears the value of `publicKey`. Subsequent reads from it will return its default value.
      mutating func clearPublicKey() {self._publicKey = nil}

      /// @required
      var encryptedKeyPair: Data {
        get {return _encryptedKeyPair ?? Data()}
        set {_encryptedKeyPair = newValue}
      }
      /// Returns true if `encryptedKeyPair` has been explicitly set.
      var hasEncryptedKeyPair: Bool {return self._encryptedKeyPair != nil}
      /// Clears the value of `encryptedKeyPair`. Subsequent reads from it will return its default value.
      mutating func clearEncryptedKeyPair() {self._encryptedKeyPair = nil}

      var unknownFields = SwiftProtobuf.UnknownStorage()

      init() {}

      fileprivate var _publicKey: Data? = nil
      fileprivate var _encryptedKeyPair: Data? = nil
    }

    init() {}

    fileprivate var _type: SessionProtos_DataMessage.ClosedGroupControlMessage.TypeEnum? = nil
    fileprivate var _publicKey: Data? = nil
    fileprivate var _name: String? = nil
    fileprivate var _encryptionKeyPair: SessionProtos_KeyPair? = nil
    fileprivate var _expirationTimer: UInt32? = nil
  }

  init() {}

  fileprivate var _storage = _StorageClass.defaultInstance
}

#if swift(>=4.2)

extension SessionProtos_DataMessage.Flags: CaseIterable {
  // Support synthesized by the compiler.
}

extension SessionProtos_DataMessage.Quote.QuotedAttachment.Flags: CaseIterable {
  // Support synthesized by the compiler.
}

extension SessionProtos_DataMessage.Reaction.Action: CaseIterable {
  // Support synthesized by the compiler.
}

extension SessionProtos_DataMessage.ClosedGroupControlMessage.TypeEnum: CaseIterable {
  // Support synthesized by the compiler.
}

#endif  // swift(>=4.2)

struct SessionProtos_ConfigurationMessage {
  // 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 closedGroups: [SessionProtos_ConfigurationMessage.ClosedGroup] = []

  var openGroups: [String] = []

  var displayName: String {
    get {return _displayName ?? String()}
    set {_displayName = newValue}
  }
  /// Returns true if `displayName` has been explicitly set.
  var hasDisplayName: Bool {return self._displayName != nil}
  /// Clears the value of `displayName`. Subsequent reads from it will return its default value.
  mutating func clearDisplayName() {self._displayName = nil}

  var profilePicture: String {
    get {return _profilePicture ?? String()}
    set {_profilePicture = newValue}
  }
  /// Returns true if `profilePicture` has been explicitly set.
  var hasProfilePicture: Bool {return self._profilePicture != nil}
  /// Clears the value of `profilePicture`. Subsequent reads from it will return its default value.
  mutating func clearProfilePicture() {self._profilePicture = nil}

  var profileKey: Data {
    get {return _profileKey ?? Data()}
    set {_profileKey = newValue}
  }
  /// Returns true if `profileKey` has been explicitly set.
  var hasProfileKey: Bool {return self._profileKey != nil}
  /// Clears the value of `profileKey`. Subsequent reads from it will return its default value.
  mutating func clearProfileKey() {self._profileKey = nil}

  var contacts: [SessionProtos_ConfigurationMessage.Contact] = []

  var unknownFields = SwiftProtobuf.UnknownStorage()

  struct ClosedGroup {
    // 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 publicKey: Data {
      get {return _publicKey ?? Data()}
      set {_publicKey = newValue}
    }
    /// Returns true if `publicKey` has been explicitly set.
    var hasPublicKey: Bool {return self._publicKey != nil}
    /// Clears the value of `publicKey`. Subsequent reads from it will return its default value.
    mutating func clearPublicKey() {self._publicKey = nil}

    var name: String {
      get {return _name ?? String()}
      set {_name = newValue}
    }
    /// Returns true if `name` has been explicitly set.
    var hasName: Bool {return self._name != nil}
    /// Clears the value of `name`. Subsequent reads from it will return its default value.
    mutating func clearName() {self._name = nil}

    var encryptionKeyPair: SessionProtos_KeyPair {
      get {return _encryptionKeyPair ?? SessionProtos_KeyPair()}
      set {_encryptionKeyPair = newValue}
    }
    /// Returns true if `encryptionKeyPair` has been explicitly set.
    var hasEncryptionKeyPair: Bool {return self._encryptionKeyPair != nil}
    /// Clears the value of `encryptionKeyPair`. Subsequent reads from it will return its default value.
    mutating func clearEncryptionKeyPair() {self._encryptionKeyPair = nil}

    var members: [Data] = []

    var admins: [Data] = []

    var expirationTimer: UInt32 {
      get {return _expirationTimer ?? 0}
      set {_expirationTimer = newValue}
    }
    /// Returns true if `expirationTimer` has been explicitly set.
    var hasExpirationTimer: Bool {return self._expirationTimer != nil}
    /// Clears the value of `expirationTimer`. Subsequent reads from it will return its default value.
    mutating func clearExpirationTimer() {self._expirationTimer = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _publicKey: Data? = nil
    fileprivate var _name: String? = nil
    fileprivate var _encryptionKeyPair: SessionProtos_KeyPair? = nil
    fileprivate var _expirationTimer: UInt32? = nil
  }

  struct Contact {
    // 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.

    /// @required
    var publicKey: Data {
      get {return _publicKey ?? Data()}
      set {_publicKey = newValue}
    }
    /// Returns true if `publicKey` has been explicitly set.
    var hasPublicKey: Bool {return self._publicKey != nil}
    /// Clears the value of `publicKey`. Subsequent reads from it will return its default value.
    mutating func clearPublicKey() {self._publicKey = nil}

    /// @required
    var name: String {
      get {return _name ?? String()}
      set {_name = newValue}
    }
    /// Returns true if `name` has been explicitly set.
    var hasName: Bool {return self._name != nil}
    /// Clears the value of `name`. Subsequent reads from it will return its default value.
    mutating func clearName() {self._name = nil}

    var profilePicture: String {
      get {return _profilePicture ?? String()}
      set {_profilePicture = newValue}
    }
    /// Returns true if `profilePicture` has been explicitly set.
    var hasProfilePicture: Bool {return self._profilePicture != nil}
    /// Clears the value of `profilePicture`. Subsequent reads from it will return its default value.
    mutating func clearProfilePicture() {self._profilePicture = nil}

    var profileKey: Data {
      get {return _profileKey ?? Data()}
      set {_profileKey = newValue}
    }
    /// Returns true if `profileKey` has been explicitly set.
    var hasProfileKey: Bool {return self._profileKey != nil}
    /// Clears the value of `profileKey`. Subsequent reads from it will return its default value.
    mutating func clearProfileKey() {self._profileKey = nil}

    /// added for msg requests
    var isApproved: Bool {
      get {return _isApproved ?? false}
      set {_isApproved = newValue}
    }
    /// Returns true if `isApproved` has been explicitly set.
    var hasIsApproved: Bool {return self._isApproved != nil}
    /// Clears the value of `isApproved`. Subsequent reads from it will return its default value.
    mutating func clearIsApproved() {self._isApproved = nil}

    /// added for msg requests
    var isBlocked: Bool {
      get {return _isBlocked ?? false}
      set {_isBlocked = newValue}
    }
    /// Returns true if `isBlocked` has been explicitly set.
    var hasIsBlocked: Bool {return self._isBlocked != nil}
    /// Clears the value of `isBlocked`. Subsequent reads from it will return its default value.
    mutating func clearIsBlocked() {self._isBlocked = nil}

    /// added for msg requests
    var didApproveMe: Bool {
      get {return _didApproveMe ?? false}
      set {_didApproveMe = newValue}
    }
    /// Returns true if `didApproveMe` has been explicitly set.
    var hasDidApproveMe: Bool {return self._didApproveMe != nil}
    /// Clears the value of `didApproveMe`. Subsequent reads from it will return its default value.
    mutating func clearDidApproveMe() {self._didApproveMe = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _publicKey: Data? = nil
    fileprivate var _name: String? = nil
    fileprivate var _profilePicture: String? = nil
    fileprivate var _profileKey: Data? = nil
    fileprivate var _isApproved: Bool? = nil
    fileprivate var _isBlocked: Bool? = nil
    fileprivate var _didApproveMe: Bool? = nil
  }

  init() {}

  fileprivate var _displayName: String? = nil
  fileprivate var _profilePicture: String? = nil
  fileprivate var _profileKey: Data? = nil
}

struct SessionProtos_ReceiptMessage {
  // 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.

  /// @required
  var type: SessionProtos_ReceiptMessage.TypeEnum {
    get {return _type ?? .delivery}
    set {_type = newValue}
  }
  /// Returns true if `type` has been explicitly set.
  var hasType: Bool {return self._type != nil}
  /// Clears the value of `type`. Subsequent reads from it will return its default value.
  mutating func clearType() {self._type = nil}

  var timestamp: [UInt64] = []

  var unknownFields = SwiftProtobuf.UnknownStorage()

  enum TypeEnum: SwiftProtobuf.Enum {
    typealias RawValue = Int
    case delivery // = 0
    case read // = 1

    init() {
      self = .delivery
    }

    init?(rawValue: Int) {
      switch rawValue {
      case 0: self = .delivery
      case 1: self = .read
      default: return nil
      }
    }

    var rawValue: Int {
      switch self {
      case .delivery: return 0
      case .read: return 1
      }
    }

  }

  init() {}

  fileprivate var _type: SessionProtos_ReceiptMessage.TypeEnum? = nil
}

#if swift(>=4.2)

extension SessionProtos_ReceiptMessage.TypeEnum: CaseIterable {
  // Support synthesized by the compiler.
}

#endif  // swift(>=4.2)

struct SessionProtos_AttachmentPointer {
  // 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.

  /// @required
  var id: UInt64 {
    get {return _id ?? 0}
    set {_id = newValue}
  }
  /// Returns true if `id` has been explicitly set.
  var hasID: Bool {return self._id != nil}
  /// Clears the value of `id`. Subsequent reads from it will return its default value.
  mutating func clearID() {self._id = nil}

  var contentType: String {
    get {return _contentType ?? String()}
    set {_contentType = newValue}
  }
  /// Returns true if `contentType` has been explicitly set.
  var hasContentType: Bool {return self._contentType != nil}
  /// Clears the value of `contentType`. Subsequent reads from it will return its default value.
  mutating func clearContentType() {self._contentType = nil}

  var key: Data {
    get {return _key ?? Data()}
    set {_key = newValue}
  }
  /// Returns true if `key` has been explicitly set.
  var hasKey: Bool {return self._key != nil}
  /// Clears the value of `key`. Subsequent reads from it will return its default value.
  mutating func clearKey() {self._key = nil}

  var size: UInt32 {
    get {return _size ?? 0}
    set {_size = newValue}
  }
  /// Returns true if `size` has been explicitly set.
  var hasSize: Bool {return self._size != nil}
  /// Clears the value of `size`. Subsequent reads from it will return its default value.
  mutating func clearSize() {self._size = nil}

  var thumbnail: Data {
    get {return _thumbnail ?? Data()}
    set {_thumbnail = newValue}
  }
  /// Returns true if `thumbnail` has been explicitly set.
  var hasThumbnail: Bool {return self._thumbnail != nil}
  /// Clears the value of `thumbnail`. Subsequent reads from it will return its default value.
  mutating func clearThumbnail() {self._thumbnail = nil}

  var digest: Data {
    get {return _digest ?? Data()}
    set {_digest = newValue}
  }
  /// Returns true if `digest` has been explicitly set.
  var hasDigest: Bool {return self._digest != nil}
  /// Clears the value of `digest`. Subsequent reads from it will return its default value.
  mutating func clearDigest() {self._digest = nil}

  var fileName: String {
    get {return _fileName ?? String()}
    set {_fileName = newValue}
  }
  /// Returns true if `fileName` has been explicitly set.
  var hasFileName: Bool {return self._fileName != nil}
  /// Clears the value of `fileName`. Subsequent reads from it will return its default value.
  mutating func clearFileName() {self._fileName = nil}

  var flags: UInt32 {
    get {return _flags ?? 0}
    set {_flags = newValue}
  }
  /// Returns true if `flags` has been explicitly set.
  var hasFlags: Bool {return self._flags != nil}
  /// Clears the value of `flags`. Subsequent reads from it will return its default value.
  mutating func clearFlags() {self._flags = nil}

  var width: UInt32 {
    get {return _width ?? 0}
    set {_width = newValue}
  }
  /// Returns true if `width` has been explicitly set.
  var hasWidth: Bool {return self._width != nil}
  /// Clears the value of `width`. Subsequent reads from it will return its default value.
  mutating func clearWidth() {self._width = nil}

  var height: UInt32 {
    get {return _height ?? 0}
    set {_height = newValue}
  }
  /// Returns true if `height` has been explicitly set.
  var hasHeight: Bool {return self._height != nil}
  /// Clears the value of `height`. Subsequent reads from it will return its default value.
  mutating func clearHeight() {self._height = nil}

  var caption: String {
    get {return _caption ?? String()}
    set {_caption = newValue}
  }
  /// Returns true if `caption` has been explicitly set.
  var hasCaption: Bool {return self._caption != nil}
  /// Clears the value of `caption`. Subsequent reads from it will return its default value.
  mutating func clearCaption() {self._caption = nil}

  var url: String {
    get {return _url ?? String()}
    set {_url = newValue}
  }
  /// Returns true if `url` has been explicitly set.
  var hasURL: Bool {return self._url != nil}
  /// Clears the value of `url`. Subsequent reads from it will return its default value.
  mutating func clearURL() {self._url = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  enum Flags: SwiftProtobuf.Enum {
    typealias RawValue = Int
    case voiceMessage // = 1

    init() {
      self = .voiceMessage
    }

    init?(rawValue: Int) {
      switch rawValue {
      case 1: self = .voiceMessage
      default: return nil
      }
    }

    var rawValue: Int {
      switch self {
      case .voiceMessage: return 1
      }
    }

  }

  init() {}

  fileprivate var _id: UInt64? = nil
  fileprivate var _contentType: String? = nil
  fileprivate var _key: Data? = nil
  fileprivate var _size: UInt32? = nil
  fileprivate var _thumbnail: Data? = nil
  fileprivate var _digest: Data? = nil
  fileprivate var _fileName: String? = nil
  fileprivate var _flags: UInt32? = nil
  fileprivate var _width: UInt32? = nil
  fileprivate var _height: UInt32? = nil
  fileprivate var _caption: String? = nil
  fileprivate var _url: String? = nil
}

#if swift(>=4.2)

extension SessionProtos_AttachmentPointer.Flags: CaseIterable {
  // Support synthesized by the compiler.
}

#endif  // swift(>=4.2)

struct SessionProtos_GroupContext {
  // 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.

  /// @required
  var id: Data {
    get {return _storage._id ?? Data()}
    set {_uniqueStorage()._id = newValue}
  }
  /// Returns true if `id` has been explicitly set.
  var hasID: Bool {return _storage._id != nil}
  /// Clears the value of `id`. Subsequent reads from it will return its default value.
  mutating func clearID() {_uniqueStorage()._id = nil}

  /// @required
  var type: SessionProtos_GroupContext.TypeEnum {
    get {return _storage._type ?? .unknown}
    set {_uniqueStorage()._type = newValue}
  }
  /// Returns true if `type` has been explicitly set.
  var hasType: Bool {return _storage._type != nil}
  /// Clears the value of `type`. Subsequent reads from it will return its default value.
  mutating func clearType() {_uniqueStorage()._type = nil}

  var name: String {
    get {return _storage._name ?? String()}
    set {_uniqueStorage()._name = newValue}
  }
  /// Returns true if `name` has been explicitly set.
  var hasName: Bool {return _storage._name != nil}
  /// Clears the value of `name`. Subsequent reads from it will return its default value.
  mutating func clearName() {_uniqueStorage()._name = nil}

  var members: [String] {
    get {return _storage._members}
    set {_uniqueStorage()._members = newValue}
  }

  var avatar: SessionProtos_AttachmentPointer {
    get {return _storage._avatar ?? SessionProtos_AttachmentPointer()}
    set {_uniqueStorage()._avatar = newValue}
  }
  /// Returns true if `avatar` has been explicitly set.
  var hasAvatar: Bool {return _storage._avatar != nil}
  /// Clears the value of `avatar`. Subsequent reads from it will return its default value.
  mutating func clearAvatar() {_uniqueStorage()._avatar = nil}

  var admins: [String] {
    get {return _storage._admins}
    set {_uniqueStorage()._admins = newValue}
  }

  var unknownFields = SwiftProtobuf.UnknownStorage()

  enum TypeEnum: SwiftProtobuf.Enum {
    typealias RawValue = Int
    case unknown // = 0
    case update // = 1
    case deliver // = 2
    case quit // = 3
    case requestInfo // = 4

    init() {
      self = .unknown
    }

    init?(rawValue: Int) {
      switch rawValue {
      case 0: self = .unknown
      case 1: self = .update
      case 2: self = .deliver
      case 3: self = .quit
      case 4: self = .requestInfo
      default: return nil
      }
    }

    var rawValue: Int {
      switch self {
      case .unknown: return 0
      case .update: return 1
      case .deliver: return 2
      case .quit: return 3
      case .requestInfo: return 4
      }
    }

  }

  init() {}

  fileprivate var _storage = _StorageClass.defaultInstance
}

#if swift(>=4.2)

extension SessionProtos_GroupContext.TypeEnum: CaseIterable {
  // Support synthesized by the compiler.
}

#endif  // swift(>=4.2)

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

fileprivate let _protobuf_package = "SessionProtos"

extension SessionProtos_Envelope: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".Envelope"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "type"),
    2: .same(proto: "source"),
    7: .same(proto: "sourceDevice"),
    5: .same(proto: "timestamp"),
    8: .same(proto: "content"),
    10: .same(proto: "serverTimestamp"),
  ]

  public var isInitialized: Bool {
    if self._type == nil {return false}
    if self._timestamp == nil {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeSingularEnumField(value: &self._type) }()
      case 2: try { try decoder.decodeSingularStringField(value: &self._source) }()
      case 5: try { try decoder.decodeSingularUInt64Field(value: &self._timestamp) }()
      case 7: try { try decoder.decodeSingularUInt32Field(value: &self._sourceDevice) }()
      case 8: try { try decoder.decodeSingularBytesField(value: &self._content) }()
      case 10: try { try decoder.decodeSingularUInt64Field(value: &self._serverTimestamp) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    try { if let v = self._type {
      try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
    } }()
    try { if let v = self._source {
      try visitor.visitSingularStringField(value: v, fieldNumber: 2)
    } }()
    try { if let v = self._timestamp {
      try visitor.visitSingularUInt64Field(value: v, fieldNumber: 5)
    } }()
    try { if let v = self._sourceDevice {
      try visitor.visitSingularUInt32Field(value: v, fieldNumber: 7)
    } }()
    try { if let v = self._content {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 8)
    } }()
    try { if let v = self._serverTimestamp {
      try visitor.visitSingularUInt64Field(value: v, fieldNumber: 10)
    } }()
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_Envelope, rhs: SessionProtos_Envelope) -> Bool {
    if lhs._type != rhs._type {return false}
    if lhs._source != rhs._source {return false}
    if lhs._sourceDevice != rhs._sourceDevice {return false}
    if lhs._timestamp != rhs._timestamp {return false}
    if lhs._content != rhs._content {return false}
    if lhs._serverTimestamp != rhs._serverTimestamp {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_Envelope.TypeEnum: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    6: .same(proto: "SESSION_MESSAGE"),
    7: .same(proto: "CLOSED_GROUP_MESSAGE"),
  ]
}

extension SessionProtos_TypingMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".TypingMessage"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "timestamp"),
    2: .same(proto: "action"),
  ]

  public var isInitialized: Bool {
    if self._timestamp == nil {return false}
    if self._action == nil {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeSingularUInt64Field(value: &self._timestamp) }()
      case 2: try { try decoder.decodeSingularEnumField(value: &self._action) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    try { if let v = self._timestamp {
      try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
    } }()
    try { if let v = self._action {
      try visitor.visitSingularEnumField(value: v, fieldNumber: 2)
    } }()
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_TypingMessage, rhs: SessionProtos_TypingMessage) -> Bool {
    if lhs._timestamp != rhs._timestamp {return false}
    if lhs._action != rhs._action {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_TypingMessage.Action: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "STARTED"),
    1: .same(proto: "STOPPED"),
  ]
}

extension SessionProtos_UnsendRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".UnsendRequest"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "timestamp"),
    2: .same(proto: "author"),
  ]

  public var isInitialized: Bool {
    if self._timestamp == nil {return false}
    if self._author == nil {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeSingularUInt64Field(value: &self._timestamp) }()
      case 2: try { try decoder.decodeSingularStringField(value: &self._author) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    try { if let v = self._timestamp {
      try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
    } }()
    try { if let v = self._author {
      try visitor.visitSingularStringField(value: v, fieldNumber: 2)
    } }()
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_UnsendRequest, rhs: SessionProtos_UnsendRequest) -> Bool {
    if lhs._timestamp != rhs._timestamp {return false}
    if lhs._author != rhs._author {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_MessageRequestResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".MessageRequestResponse"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "isApproved"),
    2: .same(proto: "profileKey"),
    3: .same(proto: "profile"),
  ]

  public var isInitialized: Bool {
    if self._isApproved == nil {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeSingularBoolField(value: &self._isApproved) }()
      case 2: try { try decoder.decodeSingularBytesField(value: &self._profileKey) }()
      case 3: try { try decoder.decodeSingularMessageField(value: &self._profile) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    try { if let v = self._isApproved {
      try visitor.visitSingularBoolField(value: v, fieldNumber: 1)
    } }()
    try { if let v = self._profileKey {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 2)
    } }()
    try { if let v = self._profile {
      try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
    } }()
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_MessageRequestResponse, rhs: SessionProtos_MessageRequestResponse) -> Bool {
    if lhs._isApproved != rhs._isApproved {return false}
    if lhs._profileKey != rhs._profileKey {return false}
    if lhs._profile != rhs._profile {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_Content: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".Content"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "dataMessage"),
    3: .same(proto: "callMessage"),
    5: .same(proto: "receiptMessage"),
    6: .same(proto: "typingMessage"),
    7: .same(proto: "configurationMessage"),
    8: .same(proto: "dataExtractionNotification"),
    9: .same(proto: "unsendRequest"),
    10: .same(proto: "messageRequestResponse"),
  ]

  fileprivate class _StorageClass {
    var _dataMessage: SessionProtos_DataMessage? = nil
    var _callMessage: SessionProtos_CallMessage? = nil
    var _receiptMessage: SessionProtos_ReceiptMessage? = nil
    var _typingMessage: SessionProtos_TypingMessage? = nil
    var _configurationMessage: SessionProtos_ConfigurationMessage? = nil
    var _dataExtractionNotification: SessionProtos_DataExtractionNotification? = nil
    var _unsendRequest: SessionProtos_UnsendRequest? = nil
    var _messageRequestResponse: SessionProtos_MessageRequestResponse? = nil

    static let defaultInstance = _StorageClass()

    private init() {}

    init(copying source: _StorageClass) {
      _dataMessage = source._dataMessage
      _callMessage = source._callMessage
      _receiptMessage = source._receiptMessage
      _typingMessage = source._typingMessage
      _configurationMessage = source._configurationMessage
      _dataExtractionNotification = source._dataExtractionNotification
      _unsendRequest = source._unsendRequest
      _messageRequestResponse = source._messageRequestResponse
    }
  }

  fileprivate mutating func _uniqueStorage() -> _StorageClass {
    if !isKnownUniquelyReferenced(&_storage) {
      _storage = _StorageClass(copying: _storage)
    }
    return _storage
  }

  public var isInitialized: Bool {
    return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._dataMessage, !v.isInitialized {return false}
      if let v = _storage._callMessage, !v.isInitialized {return false}
      if let v = _storage._receiptMessage, !v.isInitialized {return false}
      if let v = _storage._typingMessage, !v.isInitialized {return false}
      if let v = _storage._configurationMessage, !v.isInitialized {return false}
      if let v = _storage._dataExtractionNotification, !v.isInitialized {return false}
      if let v = _storage._unsendRequest, !v.isInitialized {return false}
      if let v = _storage._messageRequestResponse, !v.isInitialized {return false}
      return true
    }
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        // The use of inline closures is to circumvent an issue where the compiler
        // allocates stack space for every case branch when no optimizations are
        // enabled. https://github.com/apple/swift-protobuf/issues/1034
        switch fieldNumber {
        case 1: try { try decoder.decodeSingularMessageField(value: &_storage._dataMessage) }()
        case 3: try { try decoder.decodeSingularMessageField(value: &_storage._callMessage) }()
        case 5: try { try decoder.decodeSingularMessageField(value: &_storage._receiptMessage) }()
        case 6: try { try decoder.decodeSingularMessageField(value: &_storage._typingMessage) }()
        case 7: try { try decoder.decodeSingularMessageField(value: &_storage._configurationMessage) }()
        case 8: try { try decoder.decodeSingularMessageField(value: &_storage._dataExtractionNotification) }()
        case 9: try { try decoder.decodeSingularMessageField(value: &_storage._unsendRequest) }()
        case 10: try { try decoder.decodeSingularMessageField(value: &_storage._messageRequestResponse) }()
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every if/case branch local when no optimizations
      // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
      // https://github.com/apple/swift-protobuf/issues/1182
      try { if let v = _storage._dataMessage {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
      } }()
      try { if let v = _storage._callMessage {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
      } }()
      try { if let v = _storage._receiptMessage {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
      } }()
      try { if let v = _storage._typingMessage {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
      } }()
      try { if let v = _storage._configurationMessage {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
      } }()
      try { if let v = _storage._dataExtractionNotification {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 8)
      } }()
      try { if let v = _storage._unsendRequest {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 9)
      } }()
      try { if let v = _storage._messageRequestResponse {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 10)
      } }()
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_Content, rhs: SessionProtos_Content) -> Bool {
    if lhs._storage !== rhs._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let rhs_storage = _args.1
        if _storage._dataMessage != rhs_storage._dataMessage {return false}
        if _storage._callMessage != rhs_storage._callMessage {return false}
        if _storage._receiptMessage != rhs_storage._receiptMessage {return false}
        if _storage._typingMessage != rhs_storage._typingMessage {return false}
        if _storage._configurationMessage != rhs_storage._configurationMessage {return false}
        if _storage._dataExtractionNotification != rhs_storage._dataExtractionNotification {return false}
        if _storage._unsendRequest != rhs_storage._unsendRequest {return false}
        if _storage._messageRequestResponse != rhs_storage._messageRequestResponse {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_CallMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".CallMessage"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "type"),
    2: .same(proto: "sdps"),
    3: .same(proto: "sdpMLineIndexes"),
    4: .same(proto: "sdpMids"),
    5: .same(proto: "uuid"),
  ]

  public var isInitialized: Bool {
    if self._type == nil {return false}
    if self._uuid == nil {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeSingularEnumField(value: &self._type) }()
      case 2: try { try decoder.decodeRepeatedStringField(value: &self.sdps) }()
      case 3: try { try decoder.decodeRepeatedUInt32Field(value: &self.sdpMlineIndexes) }()
      case 4: try { try decoder.decodeRepeatedStringField(value: &self.sdpMids) }()
      case 5: try { try decoder.decodeSingularStringField(value: &self._uuid) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    try { if let v = self._type {
      try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
    } }()
    if !self.sdps.isEmpty {
      try visitor.visitRepeatedStringField(value: self.sdps, fieldNumber: 2)
    }
    if !self.sdpMlineIndexes.isEmpty {
      try visitor.visitRepeatedUInt32Field(value: self.sdpMlineIndexes, fieldNumber: 3)
    }
    if !self.sdpMids.isEmpty {
      try visitor.visitRepeatedStringField(value: self.sdpMids, fieldNumber: 4)
    }
    try { if let v = self._uuid {
      try visitor.visitSingularStringField(value: v, fieldNumber: 5)
    } }()
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_CallMessage, rhs: SessionProtos_CallMessage) -> Bool {
    if lhs._type != rhs._type {return false}
    if lhs.sdps != rhs.sdps {return false}
    if lhs.sdpMlineIndexes != rhs.sdpMlineIndexes {return false}
    if lhs.sdpMids != rhs.sdpMids {return false}
    if lhs._uuid != rhs._uuid {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_CallMessage.TypeEnum: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "OFFER"),
    2: .same(proto: "ANSWER"),
    3: .same(proto: "PROVISIONAL_ANSWER"),
    4: .same(proto: "ICE_CANDIDATES"),
    5: .same(proto: "END_CALL"),
    6: .same(proto: "PRE_OFFER"),
  ]
}

extension SessionProtos_KeyPair: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".KeyPair"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "publicKey"),
    2: .same(proto: "privateKey"),
  ]

  public var isInitialized: Bool {
    if self._publicKey == nil {return false}
    if self._privateKey == nil {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeSingularBytesField(value: &self._publicKey) }()
      case 2: try { try decoder.decodeSingularBytesField(value: &self._privateKey) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    try { if let v = self._publicKey {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 1)
    } }()
    try { if let v = self._privateKey {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 2)
    } }()
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_KeyPair, rhs: SessionProtos_KeyPair) -> Bool {
    if lhs._publicKey != rhs._publicKey {return false}
    if lhs._privateKey != rhs._privateKey {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_DataExtractionNotification: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".DataExtractionNotification"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "type"),
    2: .same(proto: "timestamp"),
  ]

  public var isInitialized: Bool {
    if self._type == nil {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeSingularEnumField(value: &self._type) }()
      case 2: try { try decoder.decodeSingularUInt64Field(value: &self._timestamp) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    try { if let v = self._type {
      try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
    } }()
    try { if let v = self._timestamp {
      try visitor.visitSingularUInt64Field(value: v, fieldNumber: 2)
    } }()
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_DataExtractionNotification, rhs: SessionProtos_DataExtractionNotification) -> Bool {
    if lhs._type != rhs._type {return false}
    if lhs._timestamp != rhs._timestamp {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_DataExtractionNotification.TypeEnum: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "SCREENSHOT"),
    2: .same(proto: "MEDIA_SAVED"),
  ]
}

extension SessionProtos_LokiProfile: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".LokiProfile"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "displayName"),
    2: .same(proto: "profilePicture"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeSingularStringField(value: &self._displayName) }()
      case 2: try { try decoder.decodeSingularStringField(value: &self._profilePicture) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    try { if let v = self._displayName {
      try visitor.visitSingularStringField(value: v, fieldNumber: 1)
    } }()
    try { if let v = self._profilePicture {
      try visitor.visitSingularStringField(value: v, fieldNumber: 2)
    } }()
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_LokiProfile, rhs: SessionProtos_LokiProfile) -> Bool {
    if lhs._displayName != rhs._displayName {return false}
    if lhs._profilePicture != rhs._profilePicture {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_DataMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".DataMessage"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "body"),
    2: .same(proto: "attachments"),
    3: .same(proto: "group"),
    4: .same(proto: "flags"),
    5: .same(proto: "expireTimer"),
    6: .same(proto: "profileKey"),
    7: .same(proto: "timestamp"),
    8: .same(proto: "quote"),
    10: .same(proto: "preview"),
    11: .same(proto: "reaction"),
    101: .same(proto: "profile"),
    102: .same(proto: "openGroupInvitation"),
    104: .same(proto: "closedGroupControlMessage"),
    105: .same(proto: "syncTarget"),
  ]

  fileprivate class _StorageClass {
    var _body: String? = nil
    var _attachments: [SessionProtos_AttachmentPointer] = []
    var _group: SessionProtos_GroupContext? = nil
    var _flags: UInt32? = nil
    var _expireTimer: UInt32? = nil
    var _profileKey: Data? = nil
    var _timestamp: UInt64? = nil
    var _quote: SessionProtos_DataMessage.Quote? = nil
    var _preview: [SessionProtos_DataMessage.Preview] = []
    var _reaction: SessionProtos_DataMessage.Reaction? = nil
    var _profile: SessionProtos_LokiProfile? = nil
    var _openGroupInvitation: SessionProtos_DataMessage.OpenGroupInvitation? = nil
    var _closedGroupControlMessage: SessionProtos_DataMessage.ClosedGroupControlMessage? = nil
    var _syncTarget: String? = nil

    static let defaultInstance = _StorageClass()

    private init() {}

    init(copying source: _StorageClass) {
      _body = source._body
      _attachments = source._attachments
      _group = source._group
      _flags = source._flags
      _expireTimer = source._expireTimer
      _profileKey = source._profileKey
      _timestamp = source._timestamp
      _quote = source._quote
      _preview = source._preview
      _reaction = source._reaction
      _profile = source._profile
      _openGroupInvitation = source._openGroupInvitation
      _closedGroupControlMessage = source._closedGroupControlMessage
      _syncTarget = source._syncTarget
    }
  }

  fileprivate mutating func _uniqueStorage() -> _StorageClass {
    if !isKnownUniquelyReferenced(&_storage) {
      _storage = _StorageClass(copying: _storage)
    }
    return _storage
  }

  public var isInitialized: Bool {
    return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if !SwiftProtobuf.Internal.areAllInitialized(_storage._attachments) {return false}
      if let v = _storage._group, !v.isInitialized {return false}
      if let v = _storage._quote, !v.isInitialized {return false}
      if !SwiftProtobuf.Internal.areAllInitialized(_storage._preview) {return false}
      if let v = _storage._reaction, !v.isInitialized {return false}
      if let v = _storage._openGroupInvitation, !v.isInitialized {return false}
      if let v = _storage._closedGroupControlMessage, !v.isInitialized {return false}
      return true
    }
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        // The use of inline closures is to circumvent an issue where the compiler
        // allocates stack space for every case branch when no optimizations are
        // enabled. https://github.com/apple/swift-protobuf/issues/1034
        switch fieldNumber {
        case 1: try { try decoder.decodeSingularStringField(value: &_storage._body) }()
        case 2: try { try decoder.decodeRepeatedMessageField(value: &_storage._attachments) }()
        case 3: try { try decoder.decodeSingularMessageField(value: &_storage._group) }()
        case 4: try { try decoder.decodeSingularUInt32Field(value: &_storage._flags) }()
        case 5: try { try decoder.decodeSingularUInt32Field(value: &_storage._expireTimer) }()
        case 6: try { try decoder.decodeSingularBytesField(value: &_storage._profileKey) }()
        case 7: try { try decoder.decodeSingularUInt64Field(value: &_storage._timestamp) }()
        case 8: try { try decoder.decodeSingularMessageField(value: &_storage._quote) }()
        case 10: try { try decoder.decodeRepeatedMessageField(value: &_storage._preview) }()
        case 11: try { try decoder.decodeSingularMessageField(value: &_storage._reaction) }()
        case 101: try { try decoder.decodeSingularMessageField(value: &_storage._profile) }()
        case 102: try { try decoder.decodeSingularMessageField(value: &_storage._openGroupInvitation) }()
        case 104: try { try decoder.decodeSingularMessageField(value: &_storage._closedGroupControlMessage) }()
        case 105: try { try decoder.decodeSingularStringField(value: &_storage._syncTarget) }()
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every if/case branch local when no optimizations
      // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
      // https://github.com/apple/swift-protobuf/issues/1182
      try { if let v = _storage._body {
        try visitor.visitSingularStringField(value: v, fieldNumber: 1)
      } }()
      if !_storage._attachments.isEmpty {
        try visitor.visitRepeatedMessageField(value: _storage._attachments, fieldNumber: 2)
      }
      try { if let v = _storage._group {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
      } }()
      try { if let v = _storage._flags {
        try visitor.visitSingularUInt32Field(value: v, fieldNumber: 4)
      } }()
      try { if let v = _storage._expireTimer {
        try visitor.visitSingularUInt32Field(value: v, fieldNumber: 5)
      } }()
      try { if let v = _storage._profileKey {
        try visitor.visitSingularBytesField(value: v, fieldNumber: 6)
      } }()
      try { if let v = _storage._timestamp {
        try visitor.visitSingularUInt64Field(value: v, fieldNumber: 7)
      } }()
      try { if let v = _storage._quote {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 8)
      } }()
      if !_storage._preview.isEmpty {
        try visitor.visitRepeatedMessageField(value: _storage._preview, fieldNumber: 10)
      }
      try { if let v = _storage._reaction {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 11)
      } }()
      try { if let v = _storage._profile {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 101)
      } }()
      try { if let v = _storage._openGroupInvitation {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 102)
      } }()
      try { if let v = _storage._closedGroupControlMessage {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 104)
      } }()
      try { if let v = _storage._syncTarget {
        try visitor.visitSingularStringField(value: v, fieldNumber: 105)
      } }()
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_DataMessage, rhs: SessionProtos_DataMessage) -> Bool {
    if lhs._storage !== rhs._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let rhs_storage = _args.1
        if _storage._body != rhs_storage._body {return false}
        if _storage._attachments != rhs_storage._attachments {return false}
        if _storage._group != rhs_storage._group {return false}
        if _storage._flags != rhs_storage._flags {return false}
        if _storage._expireTimer != rhs_storage._expireTimer {return false}
        if _storage._profileKey != rhs_storage._profileKey {return false}
        if _storage._timestamp != rhs_storage._timestamp {return false}
        if _storage._quote != rhs_storage._quote {return false}
        if _storage._preview != rhs_storage._preview {return false}
        if _storage._reaction != rhs_storage._reaction {return false}
        if _storage._profile != rhs_storage._profile {return false}
        if _storage._openGroupInvitation != rhs_storage._openGroupInvitation {return false}
        if _storage._closedGroupControlMessage != rhs_storage._closedGroupControlMessage {return false}
        if _storage._syncTarget != rhs_storage._syncTarget {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_DataMessage.Flags: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    2: .same(proto: "EXPIRATION_TIMER_UPDATE"),
  ]
}

extension SessionProtos_DataMessage.Quote: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SessionProtos_DataMessage.protoMessageName + ".Quote"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "id"),
    2: .same(proto: "author"),
    3: .same(proto: "text"),
    4: .same(proto: "attachments"),
  ]

  public var isInitialized: Bool {
    if self._id == nil {return false}
    if self._author == nil {return false}
    if !SwiftProtobuf.Internal.areAllInitialized(self.attachments) {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeSingularUInt64Field(value: &self._id) }()
      case 2: try { try decoder.decodeSingularStringField(value: &self._author) }()
      case 3: try { try decoder.decodeSingularStringField(value: &self._text) }()
      case 4: try { try decoder.decodeRepeatedMessageField(value: &self.attachments) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    try { if let v = self._id {
      try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
    } }()
    try { if let v = self._author {
      try visitor.visitSingularStringField(value: v, fieldNumber: 2)
    } }()
    try { if let v = self._text {
      try visitor.visitSingularStringField(value: v, fieldNumber: 3)
    } }()
    if !self.attachments.isEmpty {
      try visitor.visitRepeatedMessageField(value: self.attachments, fieldNumber: 4)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_DataMessage.Quote, rhs: SessionProtos_DataMessage.Quote) -> Bool {
    if lhs._id != rhs._id {return false}
    if lhs._author != rhs._author {return false}
    if lhs._text != rhs._text {return false}
    if lhs.attachments != rhs.attachments {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_DataMessage.Quote.QuotedAttachment: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SessionProtos_DataMessage.Quote.protoMessageName + ".QuotedAttachment"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "contentType"),
    2: .same(proto: "fileName"),
    3: .same(proto: "thumbnail"),
    4: .same(proto: "flags"),
  ]

  public var isInitialized: Bool {
    if let v = self._thumbnail, !v.isInitialized {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeSingularStringField(value: &self._contentType) }()
      case 2: try { try decoder.decodeSingularStringField(value: &self._fileName) }()
      case 3: try { try decoder.decodeSingularMessageField(value: &self._thumbnail) }()
      case 4: try { try decoder.decodeSingularUInt32Field(value: &self._flags) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    try { if let v = self._contentType {
      try visitor.visitSingularStringField(value: v, fieldNumber: 1)
    } }()
    try { if let v = self._fileName {
      try visitor.visitSingularStringField(value: v, fieldNumber: 2)
    } }()
    try { if let v = self._thumbnail {
      try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
    } }()
    try { if let v = self._flags {
      try visitor.visitSingularUInt32Field(value: v, fieldNumber: 4)
    } }()
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_DataMessage.Quote.QuotedAttachment, rhs: SessionProtos_DataMessage.Quote.QuotedAttachment) -> Bool {
    if lhs._contentType != rhs._contentType {return false}
    if lhs._fileName != rhs._fileName {return false}
    if lhs._thumbnail != rhs._thumbnail {return false}
    if lhs._flags != rhs._flags {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_DataMessage.Quote.QuotedAttachment.Flags: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "VOICE_MESSAGE"),
  ]
}

extension SessionProtos_DataMessage.Preview: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SessionProtos_DataMessage.protoMessageName + ".Preview"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "url"),
    2: .same(proto: "title"),
    3: .same(proto: "image"),
  ]

  public var isInitialized: Bool {
    if self._url == nil {return false}
    if let v = self._image, !v.isInitialized {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeSingularStringField(value: &self._url) }()
      case 2: try { try decoder.decodeSingularStringField(value: &self._title) }()
      case 3: try { try decoder.decodeSingularMessageField(value: &self._image) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    try { if let v = self._url {
      try visitor.visitSingularStringField(value: v, fieldNumber: 1)
    } }()
    try { if let v = self._title {
      try visitor.visitSingularStringField(value: v, fieldNumber: 2)
    } }()
    try { if let v = self._image {
      try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
    } }()
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_DataMessage.Preview, rhs: SessionProtos_DataMessage.Preview) -> Bool {
    if lhs._url != rhs._url {return false}
    if lhs._title != rhs._title {return false}
    if lhs._image != rhs._image {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_DataMessage.Reaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SessionProtos_DataMessage.protoMessageName + ".Reaction"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "id"),
    2: .same(proto: "author"),
    3: .same(proto: "emoji"),
    4: .same(proto: "action"),
  ]

  public var isInitialized: Bool {
    if self._id == nil {return false}
    if self._author == nil {return false}
    if self._action == nil {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeSingularUInt64Field(value: &self._id) }()
      case 2: try { try decoder.decodeSingularStringField(value: &self._author) }()
      case 3: try { try decoder.decodeSingularStringField(value: &self._emoji) }()
      case 4: try { try decoder.decodeSingularEnumField(value: &self._action) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    try { if let v = self._id {
      try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
    } }()
    try { if let v = self._author {
      try visitor.visitSingularStringField(value: v, fieldNumber: 2)
    } }()
    try { if let v = self._emoji {
      try visitor.visitSingularStringField(value: v, fieldNumber: 3)
    } }()
    try { if let v = self._action {
      try visitor.visitSingularEnumField(value: v, fieldNumber: 4)
    } }()
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_DataMessage.Reaction, rhs: SessionProtos_DataMessage.Reaction) -> Bool {
    if lhs._id != rhs._id {return false}
    if lhs._author != rhs._author {return false}
    if lhs._emoji != rhs._emoji {return false}
    if lhs._action != rhs._action {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_DataMessage.Reaction.Action: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "REACT"),
    1: .same(proto: "REMOVE"),
  ]
}

extension SessionProtos_DataMessage.OpenGroupInvitation: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SessionProtos_DataMessage.protoMessageName + ".OpenGroupInvitation"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "url"),
    3: .same(proto: "name"),
  ]

  public var isInitialized: Bool {
    if self._url == nil {return false}
    if self._name == nil {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeSingularStringField(value: &self._url) }()
      case 3: try { try decoder.decodeSingularStringField(value: &self._name) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    try { if let v = self._url {
      try visitor.visitSingularStringField(value: v, fieldNumber: 1)
    } }()
    try { if let v = self._name {
      try visitor.visitSingularStringField(value: v, fieldNumber: 3)
    } }()
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_DataMessage.OpenGroupInvitation, rhs: SessionProtos_DataMessage.OpenGroupInvitation) -> Bool {
    if lhs._url != rhs._url {return false}
    if lhs._name != rhs._name {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_DataMessage.ClosedGroupControlMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SessionProtos_DataMessage.protoMessageName + ".ClosedGroupControlMessage"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "type"),
    2: .same(proto: "publicKey"),
    3: .same(proto: "name"),
    4: .same(proto: "encryptionKeyPair"),
    5: .same(proto: "members"),
    6: .same(proto: "admins"),
    7: .same(proto: "wrappers"),
    8: .same(proto: "expirationTimer"),
  ]

  public var isInitialized: Bool {
    if self._type == nil {return false}
    if let v = self._encryptionKeyPair, !v.isInitialized {return false}
    if !SwiftProtobuf.Internal.areAllInitialized(self.wrappers) {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeSingularEnumField(value: &self._type) }()
      case 2: try { try decoder.decodeSingularBytesField(value: &self._publicKey) }()
      case 3: try { try decoder.decodeSingularStringField(value: &self._name) }()
      case 4: try { try decoder.decodeSingularMessageField(value: &self._encryptionKeyPair) }()
      case 5: try { try decoder.decodeRepeatedBytesField(value: &self.members) }()
      case 6: try { try decoder.decodeRepeatedBytesField(value: &self.admins) }()
      case 7: try { try decoder.decodeRepeatedMessageField(value: &self.wrappers) }()
      case 8: try { try decoder.decodeSingularUInt32Field(value: &self._expirationTimer) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    try { if let v = self._type {
      try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
    } }()
    try { if let v = self._publicKey {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 2)
    } }()
    try { if let v = self._name {
      try visitor.visitSingularStringField(value: v, fieldNumber: 3)
    } }()
    try { if let v = self._encryptionKeyPair {
      try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
    } }()
    if !self.members.isEmpty {
      try visitor.visitRepeatedBytesField(value: self.members, fieldNumber: 5)
    }
    if !self.admins.isEmpty {
      try visitor.visitRepeatedBytesField(value: self.admins, fieldNumber: 6)
    }
    if !self.wrappers.isEmpty {
      try visitor.visitRepeatedMessageField(value: self.wrappers, fieldNumber: 7)
    }
    try { if let v = self._expirationTimer {
      try visitor.visitSingularUInt32Field(value: v, fieldNumber: 8)
    } }()
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_DataMessage.ClosedGroupControlMessage, rhs: SessionProtos_DataMessage.ClosedGroupControlMessage) -> Bool {
    if lhs._type != rhs._type {return false}
    if lhs._publicKey != rhs._publicKey {return false}
    if lhs._name != rhs._name {return false}
    if lhs._encryptionKeyPair != rhs._encryptionKeyPair {return false}
    if lhs.members != rhs.members {return false}
    if lhs.admins != rhs.admins {return false}
    if lhs.wrappers != rhs.wrappers {return false}
    if lhs._expirationTimer != rhs._expirationTimer {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_DataMessage.ClosedGroupControlMessage.TypeEnum: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "NEW"),
    3: .same(proto: "ENCRYPTION_KEY_PAIR"),
    4: .same(proto: "NAME_CHANGE"),
    5: .same(proto: "MEMBERS_ADDED"),
    6: .same(proto: "MEMBERS_REMOVED"),
    7: .same(proto: "MEMBER_LEFT"),
    8: .same(proto: "ENCRYPTION_KEY_PAIR_REQUEST"),
  ]
}

extension SessionProtos_DataMessage.ClosedGroupControlMessage.KeyPairWrapper: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SessionProtos_DataMessage.ClosedGroupControlMessage.protoMessageName + ".KeyPairWrapper"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "publicKey"),
    2: .same(proto: "encryptedKeyPair"),
  ]

  public var isInitialized: Bool {
    if self._publicKey == nil {return false}
    if self._encryptedKeyPair == nil {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeSingularBytesField(value: &self._publicKey) }()
      case 2: try { try decoder.decodeSingularBytesField(value: &self._encryptedKeyPair) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    try { if let v = self._publicKey {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 1)
    } }()
    try { if let v = self._encryptedKeyPair {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 2)
    } }()
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_DataMessage.ClosedGroupControlMessage.KeyPairWrapper, rhs: SessionProtos_DataMessage.ClosedGroupControlMessage.KeyPairWrapper) -> Bool {
    if lhs._publicKey != rhs._publicKey {return false}
    if lhs._encryptedKeyPair != rhs._encryptedKeyPair {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_ConfigurationMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".ConfigurationMessage"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "closedGroups"),
    2: .same(proto: "openGroups"),
    3: .same(proto: "displayName"),
    4: .same(proto: "profilePicture"),
    5: .same(proto: "profileKey"),
    6: .same(proto: "contacts"),
  ]

  public var isInitialized: Bool {
    if !SwiftProtobuf.Internal.areAllInitialized(self.closedGroups) {return false}
    if !SwiftProtobuf.Internal.areAllInitialized(self.contacts) {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeRepeatedMessageField(value: &self.closedGroups) }()
      case 2: try { try decoder.decodeRepeatedStringField(value: &self.openGroups) }()
      case 3: try { try decoder.decodeSingularStringField(value: &self._displayName) }()
      case 4: try { try decoder.decodeSingularStringField(value: &self._profilePicture) }()
      case 5: try { try decoder.decodeSingularBytesField(value: &self._profileKey) }()
      case 6: try { try decoder.decodeRepeatedMessageField(value: &self.contacts) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    if !self.closedGroups.isEmpty {
      try visitor.visitRepeatedMessageField(value: self.closedGroups, fieldNumber: 1)
    }
    if !self.openGroups.isEmpty {
      try visitor.visitRepeatedStringField(value: self.openGroups, fieldNumber: 2)
    }
    try { if let v = self._displayName {
      try visitor.visitSingularStringField(value: v, fieldNumber: 3)
    } }()
    try { if let v = self._profilePicture {
      try visitor.visitSingularStringField(value: v, fieldNumber: 4)
    } }()
    try { if let v = self._profileKey {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 5)
    } }()
    if !self.contacts.isEmpty {
      try visitor.visitRepeatedMessageField(value: self.contacts, fieldNumber: 6)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_ConfigurationMessage, rhs: SessionProtos_ConfigurationMessage) -> Bool {
    if lhs.closedGroups != rhs.closedGroups {return false}
    if lhs.openGroups != rhs.openGroups {return false}
    if lhs._displayName != rhs._displayName {return false}
    if lhs._profilePicture != rhs._profilePicture {return false}
    if lhs._profileKey != rhs._profileKey {return false}
    if lhs.contacts != rhs.contacts {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_ConfigurationMessage.ClosedGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SessionProtos_ConfigurationMessage.protoMessageName + ".ClosedGroup"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "publicKey"),
    2: .same(proto: "name"),
    3: .same(proto: "encryptionKeyPair"),
    4: .same(proto: "members"),
    5: .same(proto: "admins"),
    6: .same(proto: "expirationTimer"),
  ]

  public var isInitialized: Bool {
    if let v = self._encryptionKeyPair, !v.isInitialized {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeSingularBytesField(value: &self._publicKey) }()
      case 2: try { try decoder.decodeSingularStringField(value: &self._name) }()
      case 3: try { try decoder.decodeSingularMessageField(value: &self._encryptionKeyPair) }()
      case 4: try { try decoder.decodeRepeatedBytesField(value: &self.members) }()
      case 5: try { try decoder.decodeRepeatedBytesField(value: &self.admins) }()
      case 6: try { try decoder.decodeSingularUInt32Field(value: &self._expirationTimer) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    try { if let v = self._publicKey {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 1)
    } }()
    try { if let v = self._name {
      try visitor.visitSingularStringField(value: v, fieldNumber: 2)
    } }()
    try { if let v = self._encryptionKeyPair {
      try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
    } }()
    if !self.members.isEmpty {
      try visitor.visitRepeatedBytesField(value: self.members, fieldNumber: 4)
    }
    if !self.admins.isEmpty {
      try visitor.visitRepeatedBytesField(value: self.admins, fieldNumber: 5)
    }
    try { if let v = self._expirationTimer {
      try visitor.visitSingularUInt32Field(value: v, fieldNumber: 6)
    } }()
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_ConfigurationMessage.ClosedGroup, rhs: SessionProtos_ConfigurationMessage.ClosedGroup) -> Bool {
    if lhs._publicKey != rhs._publicKey {return false}
    if lhs._name != rhs._name {return false}
    if lhs._encryptionKeyPair != rhs._encryptionKeyPair {return false}
    if lhs.members != rhs.members {return false}
    if lhs.admins != rhs.admins {return false}
    if lhs._expirationTimer != rhs._expirationTimer {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_ConfigurationMessage.Contact: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SessionProtos_ConfigurationMessage.protoMessageName + ".Contact"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "publicKey"),
    2: .same(proto: "name"),
    3: .same(proto: "profilePicture"),
    4: .same(proto: "profileKey"),
    5: .same(proto: "isApproved"),
    6: .same(proto: "isBlocked"),
    7: .same(proto: "didApproveMe"),
  ]

  public var isInitialized: Bool {
    if self._publicKey == nil {return false}
    if self._name == nil {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeSingularBytesField(value: &self._publicKey) }()
      case 2: try { try decoder.decodeSingularStringField(value: &self._name) }()
      case 3: try { try decoder.decodeSingularStringField(value: &self._profilePicture) }()
      case 4: try { try decoder.decodeSingularBytesField(value: &self._profileKey) }()
      case 5: try { try decoder.decodeSingularBoolField(value: &self._isApproved) }()
      case 6: try { try decoder.decodeSingularBoolField(value: &self._isBlocked) }()
      case 7: try { try decoder.decodeSingularBoolField(value: &self._didApproveMe) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    try { if let v = self._publicKey {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 1)
    } }()
    try { if let v = self._name {
      try visitor.visitSingularStringField(value: v, fieldNumber: 2)
    } }()
    try { if let v = self._profilePicture {
      try visitor.visitSingularStringField(value: v, fieldNumber: 3)
    } }()
    try { if let v = self._profileKey {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 4)
    } }()
    try { if let v = self._isApproved {
      try visitor.visitSingularBoolField(value: v, fieldNumber: 5)
    } }()
    try { if let v = self._isBlocked {
      try visitor.visitSingularBoolField(value: v, fieldNumber: 6)
    } }()
    try { if let v = self._didApproveMe {
      try visitor.visitSingularBoolField(value: v, fieldNumber: 7)
    } }()
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_ConfigurationMessage.Contact, rhs: SessionProtos_ConfigurationMessage.Contact) -> Bool {
    if lhs._publicKey != rhs._publicKey {return false}
    if lhs._name != rhs._name {return false}
    if lhs._profilePicture != rhs._profilePicture {return false}
    if lhs._profileKey != rhs._profileKey {return false}
    if lhs._isApproved != rhs._isApproved {return false}
    if lhs._isBlocked != rhs._isBlocked {return false}
    if lhs._didApproveMe != rhs._didApproveMe {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_ReceiptMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".ReceiptMessage"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "type"),
    2: .same(proto: "timestamp"),
  ]

  public var isInitialized: Bool {
    if self._type == nil {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeSingularEnumField(value: &self._type) }()
      case 2: try { try decoder.decodeRepeatedUInt64Field(value: &self.timestamp) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    try { if let v = self._type {
      try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
    } }()
    if !self.timestamp.isEmpty {
      try visitor.visitRepeatedUInt64Field(value: self.timestamp, fieldNumber: 2)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_ReceiptMessage, rhs: SessionProtos_ReceiptMessage) -> Bool {
    if lhs._type != rhs._type {return false}
    if lhs.timestamp != rhs.timestamp {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_ReceiptMessage.TypeEnum: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "DELIVERY"),
    1: .same(proto: "READ"),
  ]
}

extension SessionProtos_AttachmentPointer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".AttachmentPointer"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "id"),
    2: .same(proto: "contentType"),
    3: .same(proto: "key"),
    4: .same(proto: "size"),
    5: .same(proto: "thumbnail"),
    6: .same(proto: "digest"),
    7: .same(proto: "fileName"),
    8: .same(proto: "flags"),
    9: .same(proto: "width"),
    10: .same(proto: "height"),
    11: .same(proto: "caption"),
    101: .same(proto: "url"),
  ]

  public var isInitialized: Bool {
    if self._id == nil {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try { try decoder.decodeSingularFixed64Field(value: &self._id) }()
      case 2: try { try decoder.decodeSingularStringField(value: &self._contentType) }()
      case 3: try { try decoder.decodeSingularBytesField(value: &self._key) }()
      case 4: try { try decoder.decodeSingularUInt32Field(value: &self._size) }()
      case 5: try { try decoder.decodeSingularBytesField(value: &self._thumbnail) }()
      case 6: try { try decoder.decodeSingularBytesField(value: &self._digest) }()
      case 7: try { try decoder.decodeSingularStringField(value: &self._fileName) }()
      case 8: try { try decoder.decodeSingularUInt32Field(value: &self._flags) }()
      case 9: try { try decoder.decodeSingularUInt32Field(value: &self._width) }()
      case 10: try { try decoder.decodeSingularUInt32Field(value: &self._height) }()
      case 11: try { try decoder.decodeSingularStringField(value: &self._caption) }()
      case 101: try { try decoder.decodeSingularStringField(value: &self._url) }()
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    // The use of inline closures is to circumvent an issue where the compiler
    // allocates stack space for every if/case branch local when no optimizations
    // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
    // https://github.com/apple/swift-protobuf/issues/1182
    try { if let v = self._id {
      try visitor.visitSingularFixed64Field(value: v, fieldNumber: 1)
    } }()
    try { if let v = self._contentType {
      try visitor.visitSingularStringField(value: v, fieldNumber: 2)
    } }()
    try { if let v = self._key {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 3)
    } }()
    try { if let v = self._size {
      try visitor.visitSingularUInt32Field(value: v, fieldNumber: 4)
    } }()
    try { if let v = self._thumbnail {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 5)
    } }()
    try { if let v = self._digest {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 6)
    } }()
    try { if let v = self._fileName {
      try visitor.visitSingularStringField(value: v, fieldNumber: 7)
    } }()
    try { if let v = self._flags {
      try visitor.visitSingularUInt32Field(value: v, fieldNumber: 8)
    } }()
    try { if let v = self._width {
      try visitor.visitSingularUInt32Field(value: v, fieldNumber: 9)
    } }()
    try { if let v = self._height {
      try visitor.visitSingularUInt32Field(value: v, fieldNumber: 10)
    } }()
    try { if let v = self._caption {
      try visitor.visitSingularStringField(value: v, fieldNumber: 11)
    } }()
    try { if let v = self._url {
      try visitor.visitSingularStringField(value: v, fieldNumber: 101)
    } }()
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_AttachmentPointer, rhs: SessionProtos_AttachmentPointer) -> Bool {
    if lhs._id != rhs._id {return false}
    if lhs._contentType != rhs._contentType {return false}
    if lhs._key != rhs._key {return false}
    if lhs._size != rhs._size {return false}
    if lhs._thumbnail != rhs._thumbnail {return false}
    if lhs._digest != rhs._digest {return false}
    if lhs._fileName != rhs._fileName {return false}
    if lhs._flags != rhs._flags {return false}
    if lhs._width != rhs._width {return false}
    if lhs._height != rhs._height {return false}
    if lhs._caption != rhs._caption {return false}
    if lhs._url != rhs._url {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_AttachmentPointer.Flags: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "VOICE_MESSAGE"),
  ]
}

extension SessionProtos_GroupContext: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".GroupContext"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "id"),
    2: .same(proto: "type"),
    3: .same(proto: "name"),
    4: .same(proto: "members"),
    5: .same(proto: "avatar"),
    6: .same(proto: "admins"),
  ]

  fileprivate class _StorageClass {
    var _id: Data? = nil
    var _type: SessionProtos_GroupContext.TypeEnum? = nil
    var _name: String? = nil
    var _members: [String] = []
    var _avatar: SessionProtos_AttachmentPointer? = nil
    var _admins: [String] = []

    static let defaultInstance = _StorageClass()

    private init() {}

    init(copying source: _StorageClass) {
      _id = source._id
      _type = source._type
      _name = source._name
      _members = source._members
      _avatar = source._avatar
      _admins = source._admins
    }
  }

  fileprivate mutating func _uniqueStorage() -> _StorageClass {
    if !isKnownUniquelyReferenced(&_storage) {
      _storage = _StorageClass(copying: _storage)
    }
    return _storage
  }

  public var isInitialized: Bool {
    return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._avatar, !v.isInitialized {return false}
      return true
    }
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        // The use of inline closures is to circumvent an issue where the compiler
        // allocates stack space for every case branch when no optimizations are
        // enabled. https://github.com/apple/swift-protobuf/issues/1034
        switch fieldNumber {
        case 1: try { try decoder.decodeSingularBytesField(value: &_storage._id) }()
        case 2: try { try decoder.decodeSingularEnumField(value: &_storage._type) }()
        case 3: try { try decoder.decodeSingularStringField(value: &_storage._name) }()
        case 4: try { try decoder.decodeRepeatedStringField(value: &_storage._members) }()
        case 5: try { try decoder.decodeSingularMessageField(value: &_storage._avatar) }()
        case 6: try { try decoder.decodeRepeatedStringField(value: &_storage._admins) }()
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every if/case branch local when no optimizations
      // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
      // https://github.com/apple/swift-protobuf/issues/1182
      try { if let v = _storage._id {
        try visitor.visitSingularBytesField(value: v, fieldNumber: 1)
      } }()
      try { if let v = _storage._type {
        try visitor.visitSingularEnumField(value: v, fieldNumber: 2)
      } }()
      try { if let v = _storage._name {
        try visitor.visitSingularStringField(value: v, fieldNumber: 3)
      } }()
      if !_storage._members.isEmpty {
        try visitor.visitRepeatedStringField(value: _storage._members, fieldNumber: 4)
      }
      try { if let v = _storage._avatar {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
      } }()
      if !_storage._admins.isEmpty {
        try visitor.visitRepeatedStringField(value: _storage._admins, fieldNumber: 6)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: SessionProtos_GroupContext, rhs: SessionProtos_GroupContext) -> Bool {
    if lhs._storage !== rhs._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let rhs_storage = _args.1
        if _storage._id != rhs_storage._id {return false}
        if _storage._type != rhs_storage._type {return false}
        if _storage._name != rhs_storage._name {return false}
        if _storage._members != rhs_storage._members {return false}
        if _storage._avatar != rhs_storage._avatar {return false}
        if _storage._admins != rhs_storage._admins {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension SessionProtos_GroupContext.TypeEnum: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "UNKNOWN"),
    1: .same(proto: "UPDATE"),
    2: .same(proto: "DELIVER"),
    3: .same(proto: "QUIT"),
    4: .same(proto: "REQUEST_INFO"),
  ]
}
