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

//*
// Copyright (C) 2014-2016 Open Whisper Systems
//
// Licensed according to the LICENSE file in this repository.

/// 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 your 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 SignalServiceProtos_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: SignalServiceProtos_Envelope.TypeEnum {
    get {return _type ?? .unknown}
    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}

  /// @required
  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}

  /// @required
  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}

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

  /// Contains an encrypted DataMessage
  var legacyMessage: Data {
    get {return _legacyMessage ?? SwiftProtobuf.Internal.emptyData}
    set {_legacyMessage = newValue}
  }
  /// Returns true if `legacyMessage` has been explicitly set.
  var hasLegacyMessage: Bool {return self._legacyMessage != nil}
  /// Clears the value of `legacyMessage`. Subsequent reads from it will return its default value.
  mutating func clearLegacyMessage() {self._legacyMessage = nil}

  /// Contains an encrypted Content
  var content: Data {
    get {return _content ?? SwiftProtobuf.Internal.emptyData}
    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 unknownFields = SwiftProtobuf.UnknownStorage()

  enum TypeEnum: SwiftProtobuf.Enum {
    typealias RawValue = Int
    case unknown // = 0
    case ciphertext // = 1
    case keyExchange // = 2
    case prekeyBundle // = 3
    case receipt // = 5

    init() {
      self = .unknown
    }

    init?(rawValue: Int) {
      switch rawValue {
      case 0: self = .unknown
      case 1: self = .ciphertext
      case 2: self = .keyExchange
      case 3: self = .prekeyBundle
      case 5: self = .receipt
      default: return nil
      }
    }

    var rawValue: Int {
      switch self {
      case .unknown: return 0
      case .ciphertext: return 1
      case .keyExchange: return 2
      case .prekeyBundle: return 3
      case .receipt: return 5
      }
    }

  }

  init() {}

  fileprivate var _type: SignalServiceProtos_Envelope.TypeEnum? = nil
  fileprivate var _source: String? = nil
  fileprivate var _sourceDevice: UInt32? = nil
  fileprivate var _relay: String? = nil
  fileprivate var _timestamp: UInt64? = nil
  fileprivate var _legacyMessage: Data? = nil
  fileprivate var _content: Data? = nil
}

#if swift(>=4.2)

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

#endif  // swift(>=4.2)

struct SignalServiceProtos_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: SignalServiceProtos_DataMessage {
    get {return _storage._dataMessage ?? SignalServiceProtos_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() {_storage._dataMessage = nil}

  var syncMessage: SignalServiceProtos_SyncMessage {
    get {return _storage._syncMessage ?? SignalServiceProtos_SyncMessage()}
    set {_uniqueStorage()._syncMessage = newValue}
  }
  /// Returns true if `syncMessage` has been explicitly set.
  var hasSyncMessage: Bool {return _storage._syncMessage != nil}
  /// Clears the value of `syncMessage`. Subsequent reads from it will return its default value.
  mutating func clearSyncMessage() {_storage._syncMessage = nil}

  var callMessage: SignalServiceProtos_CallMessage {
    get {return _storage._callMessage ?? SignalServiceProtos_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() {_storage._callMessage = nil}

  var nullMessage: SignalServiceProtos_NullMessage {
    get {return _storage._nullMessage ?? SignalServiceProtos_NullMessage()}
    set {_uniqueStorage()._nullMessage = newValue}
  }
  /// Returns true if `nullMessage` has been explicitly set.
  var hasNullMessage: Bool {return _storage._nullMessage != nil}
  /// Clears the value of `nullMessage`. Subsequent reads from it will return its default value.
  mutating func clearNullMessage() {_storage._nullMessage = nil}

  var receiptMessage: SignalServiceProtos_ReceiptMessage {
    get {return _storage._receiptMessage ?? SignalServiceProtos_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() {_storage._receiptMessage = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}

  fileprivate var _storage = _StorageClass.defaultInstance
}

struct SignalServiceProtos_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.

  var offer: SignalServiceProtos_CallMessage.Offer {
    get {return _storage._offer ?? SignalServiceProtos_CallMessage.Offer()}
    set {_uniqueStorage()._offer = newValue}
  }
  /// Returns true if `offer` has been explicitly set.
  var hasOffer: Bool {return _storage._offer != nil}
  /// Clears the value of `offer`. Subsequent reads from it will return its default value.
  mutating func clearOffer() {_storage._offer = nil}

  var answer: SignalServiceProtos_CallMessage.Answer {
    get {return _storage._answer ?? SignalServiceProtos_CallMessage.Answer()}
    set {_uniqueStorage()._answer = newValue}
  }
  /// Returns true if `answer` has been explicitly set.
  var hasAnswer: Bool {return _storage._answer != nil}
  /// Clears the value of `answer`. Subsequent reads from it will return its default value.
  mutating func clearAnswer() {_storage._answer = nil}

  var iceUpdate: [SignalServiceProtos_CallMessage.IceUpdate] {
    get {return _storage._iceUpdate}
    set {_uniqueStorage()._iceUpdate = newValue}
  }

  var hangup: SignalServiceProtos_CallMessage.Hangup {
    get {return _storage._hangup ?? SignalServiceProtos_CallMessage.Hangup()}
    set {_uniqueStorage()._hangup = newValue}
  }
  /// Returns true if `hangup` has been explicitly set.
  var hasHangup: Bool {return _storage._hangup != nil}
  /// Clears the value of `hangup`. Subsequent reads from it will return its default value.
  mutating func clearHangup() {_storage._hangup = nil}

  var busy: SignalServiceProtos_CallMessage.Busy {
    get {return _storage._busy ?? SignalServiceProtos_CallMessage.Busy()}
    set {_uniqueStorage()._busy = newValue}
  }
  /// Returns true if `busy` has been explicitly set.
  var hasBusy: Bool {return _storage._busy != nil}
  /// Clears the value of `busy`. Subsequent reads from it will return its default value.
  mutating func clearBusy() {_storage._busy = nil}

  /// Signal-iOS sends profile key with call messages
  /// for earlier discovery
  var profileKey: Data {
    get {return _storage._profileKey ?? SwiftProtobuf.Internal.emptyData}
    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() {_storage._profileKey = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  struct Offer {
    // 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}

    /// Signal-iOS renamed the description field to avoid
    /// conflicts with [NSObject description].
    /// @required
    var sessionDescription: String {
      get {return _sessionDescription ?? String()}
      set {_sessionDescription = newValue}
    }
    /// Returns true if `sessionDescription` has been explicitly set.
    var hasSessionDescription: Bool {return self._sessionDescription != nil}
    /// Clears the value of `sessionDescription`. Subsequent reads from it will return its default value.
    mutating func clearSessionDescription() {self._sessionDescription = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _id: UInt64? = nil
    fileprivate var _sessionDescription: String? = nil
  }

  struct Answer {
    // 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}

    /// Signal-iOS renamed the description field to avoid
    /// conflicts with [NSObject description].
    /// @required
    var sessionDescription: String {
      get {return _sessionDescription ?? String()}
      set {_sessionDescription = newValue}
    }
    /// Returns true if `sessionDescription` has been explicitly set.
    var hasSessionDescription: Bool {return self._sessionDescription != nil}
    /// Clears the value of `sessionDescription`. Subsequent reads from it will return its default value.
    mutating func clearSessionDescription() {self._sessionDescription = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _id: UInt64? = nil
    fileprivate var _sessionDescription: String? = nil
  }

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

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

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

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _id: UInt64? = nil
    fileprivate var _sdpMid: String? = nil
    fileprivate var _sdpMlineIndex: UInt32? = nil
    fileprivate var _sdp: String? = nil
  }

  struct Busy {
    // 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 unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _id: UInt64? = nil
  }

  struct Hangup {
    // 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 unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _id: UInt64? = nil
  }

  init() {}

  fileprivate var _storage = _StorageClass.defaultInstance
}

struct SignalServiceProtos_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() {_storage._body = nil}

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

  var group: SignalServiceProtos_GroupContext {
    get {return _storage._group ?? SignalServiceProtos_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() {_storage._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() {_storage._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() {_storage._expireTimer = nil}

  var profileKey: Data {
    get {return _storage._profileKey ?? SwiftProtobuf.Internal.emptyData}
    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() {_storage._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() {_storage._timestamp = nil}

  var quote: SignalServiceProtos_DataMessage.Quote {
    get {return _storage._quote ?? SignalServiceProtos_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() {_storage._quote = nil}

  var contact: [SignalServiceProtos_DataMessage.Contact] {
    get {return _storage._contact}
    set {_uniqueStorage()._contact = newValue}
  }

  var unknownFields = SwiftProtobuf.UnknownStorage()

  enum Flags: SwiftProtobuf.Enum {
    typealias RawValue = Int
    case endSession // = 1
    case expirationTimerUpdate // = 2
    case profileKeyUpdate // = 4

    init() {
      self = .endSession
    }

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

    var rawValue: Int {
      switch self {
      case .endSession: return 1
      case .expirationTimerUpdate: return 2
      case .profileKeyUpdate: return 4
      }
    }

  }

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

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

      var thumbnail: SignalServiceProtos_AttachmentPointer {
        get {return _storage._thumbnail ?? SignalServiceProtos_AttachmentPointer()}
        set {_uniqueStorage()._thumbnail = newValue}
      }
      /// Returns true if `thumbnail` has been explicitly set.
      var hasThumbnail: Bool {return _storage._thumbnail != nil}
      /// Clears the value of `thumbnail`. Subsequent reads from it will return its default value.
      mutating func clearThumbnail() {_storage._thumbnail = 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() {_storage._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 _storage = _StorageClass.defaultInstance
    }

    init() {}

    fileprivate var _id: UInt64? = nil
    fileprivate var _author: String? = nil
    fileprivate var _text: String? = 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.

    var name: SignalServiceProtos_DataMessage.Contact.Name {
      get {return _storage._name ?? SignalServiceProtos_DataMessage.Contact.Name()}
      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() {_storage._name = nil}

    var number: [SignalServiceProtos_DataMessage.Contact.Phone] {
      get {return _storage._number}
      set {_uniqueStorage()._number = newValue}
    }

    var email: [SignalServiceProtos_DataMessage.Contact.Email] {
      get {return _storage._email}
      set {_uniqueStorage()._email = newValue}
    }

    var address: [SignalServiceProtos_DataMessage.Contact.PostalAddress] {
      get {return _storage._address}
      set {_uniqueStorage()._address = newValue}
    }

    var avatar: SignalServiceProtos_DataMessage.Contact.Avatar {
      get {return _storage._avatar ?? SignalServiceProtos_DataMessage.Contact.Avatar()}
      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() {_storage._avatar = nil}

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

    var unknownFields = SwiftProtobuf.UnknownStorage()

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

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

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

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

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

      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 unknownFields = SwiftProtobuf.UnknownStorage()

      init() {}

      fileprivate var _givenName: String? = nil
      fileprivate var _familyName: String? = nil
      fileprivate var _prefix: String? = nil
      fileprivate var _suffix: String? = nil
      fileprivate var _middleName: String? = nil
      fileprivate var _displayName: String? = nil
    }

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

      var type: SignalServiceProtos_DataMessage.Contact.Phone.TypeEnum {
        get {return _type ?? .home}
        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 label: String {
        get {return _label ?? String()}
        set {_label = newValue}
      }
      /// Returns true if `label` has been explicitly set.
      var hasLabel: Bool {return self._label != nil}
      /// Clears the value of `label`. Subsequent reads from it will return its default value.
      mutating func clearLabel() {self._label = nil}

      var unknownFields = SwiftProtobuf.UnknownStorage()

      enum TypeEnum: SwiftProtobuf.Enum {
        typealias RawValue = Int
        case home // = 1
        case mobile // = 2
        case work // = 3
        case custom // = 4

        init() {
          self = .home
        }

        init?(rawValue: Int) {
          switch rawValue {
          case 1: self = .home
          case 2: self = .mobile
          case 3: self = .work
          case 4: self = .custom
          default: return nil
          }
        }

        var rawValue: Int {
          switch self {
          case .home: return 1
          case .mobile: return 2
          case .work: return 3
          case .custom: return 4
          }
        }

      }

      init() {}

      fileprivate var _value: String? = nil
      fileprivate var _type: SignalServiceProtos_DataMessage.Contact.Phone.TypeEnum? = nil
      fileprivate var _label: String? = nil
    }

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

      var type: SignalServiceProtos_DataMessage.Contact.Email.TypeEnum {
        get {return _type ?? .home}
        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 label: String {
        get {return _label ?? String()}
        set {_label = newValue}
      }
      /// Returns true if `label` has been explicitly set.
      var hasLabel: Bool {return self._label != nil}
      /// Clears the value of `label`. Subsequent reads from it will return its default value.
      mutating func clearLabel() {self._label = nil}

      var unknownFields = SwiftProtobuf.UnknownStorage()

      enum TypeEnum: SwiftProtobuf.Enum {
        typealias RawValue = Int
        case home // = 1
        case mobile // = 2
        case work // = 3
        case custom // = 4

        init() {
          self = .home
        }

        init?(rawValue: Int) {
          switch rawValue {
          case 1: self = .home
          case 2: self = .mobile
          case 3: self = .work
          case 4: self = .custom
          default: return nil
          }
        }

        var rawValue: Int {
          switch self {
          case .home: return 1
          case .mobile: return 2
          case .work: return 3
          case .custom: return 4
          }
        }

      }

      init() {}

      fileprivate var _value: String? = nil
      fileprivate var _type: SignalServiceProtos_DataMessage.Contact.Email.TypeEnum? = nil
      fileprivate var _label: String? = nil
    }

    struct PostalAddress {
      // 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 type: SignalServiceProtos_DataMessage.Contact.PostalAddress.TypeEnum {
        get {return _type ?? .home}
        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 label: String {
        get {return _label ?? String()}
        set {_label = newValue}
      }
      /// Returns true if `label` has been explicitly set.
      var hasLabel: Bool {return self._label != nil}
      /// Clears the value of `label`. Subsequent reads from it will return its default value.
      mutating func clearLabel() {self._label = nil}

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

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

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

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

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

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

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

      var unknownFields = SwiftProtobuf.UnknownStorage()

      enum TypeEnum: SwiftProtobuf.Enum {
        typealias RawValue = Int
        case home // = 1
        case work // = 2
        case custom // = 3

        init() {
          self = .home
        }

        init?(rawValue: Int) {
          switch rawValue {
          case 1: self = .home
          case 2: self = .work
          case 3: self = .custom
          default: return nil
          }
        }

        var rawValue: Int {
          switch self {
          case .home: return 1
          case .work: return 2
          case .custom: return 3
          }
        }

      }

      init() {}

      fileprivate var _type: SignalServiceProtos_DataMessage.Contact.PostalAddress.TypeEnum? = nil
      fileprivate var _label: String? = nil
      fileprivate var _street: String? = nil
      fileprivate var _pobox: String? = nil
      fileprivate var _neighborhood: String? = nil
      fileprivate var _city: String? = nil
      fileprivate var _region: String? = nil
      fileprivate var _postcode: String? = nil
      fileprivate var _country: String? = nil
    }

    struct Avatar {
      // 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 avatar: SignalServiceProtos_AttachmentPointer {
        get {return _storage._avatar ?? SignalServiceProtos_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() {_storage._avatar = nil}

      var isProfile: Bool {
        get {return _storage._isProfile ?? false}
        set {_uniqueStorage()._isProfile = newValue}
      }
      /// Returns true if `isProfile` has been explicitly set.
      var hasIsProfile: Bool {return _storage._isProfile != nil}
      /// Clears the value of `isProfile`. Subsequent reads from it will return its default value.
      mutating func clearIsProfile() {_storage._isProfile = nil}

      var unknownFields = SwiftProtobuf.UnknownStorage()

      init() {}

      fileprivate var _storage = _StorageClass.defaultInstance
    }

    init() {}

    fileprivate var _storage = _StorageClass.defaultInstance
  }

  init() {}

  fileprivate var _storage = _StorageClass.defaultInstance
}

#if swift(>=4.2)

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

#endif  // swift(>=4.2)

struct SignalServiceProtos_NullMessage {
  // 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 padding: Data {
    get {return _padding ?? SwiftProtobuf.Internal.emptyData}
    set {_padding = newValue}
  }
  /// Returns true if `padding` has been explicitly set.
  var hasPadding: Bool {return self._padding != nil}
  /// Clears the value of `padding`. Subsequent reads from it will return its default value.
  mutating func clearPadding() {self._padding = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}

  fileprivate var _padding: Data? = nil
}

struct SignalServiceProtos_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: SignalServiceProtos_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: SignalServiceProtos_ReceiptMessage.TypeEnum? = nil
}

#if swift(>=4.2)

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

#endif  // swift(>=4.2)

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

  var identityKey: Data {
    get {return _identityKey ?? SwiftProtobuf.Internal.emptyData}
    set {_identityKey = newValue}
  }
  /// Returns true if `identityKey` has been explicitly set.
  var hasIdentityKey: Bool {return self._identityKey != nil}
  /// Clears the value of `identityKey`. Subsequent reads from it will return its default value.
  mutating func clearIdentityKey() {self._identityKey = nil}

  var state: SignalServiceProtos_Verified.State {
    get {return _state ?? .default}
    set {_state = newValue}
  }
  /// Returns true if `state` has been explicitly set.
  var hasState: Bool {return self._state != nil}
  /// Clears the value of `state`. Subsequent reads from it will return its default value.
  mutating func clearState() {self._state = nil}

  var nullMessage: Data {
    get {return _nullMessage ?? SwiftProtobuf.Internal.emptyData}
    set {_nullMessage = newValue}
  }
  /// Returns true if `nullMessage` has been explicitly set.
  var hasNullMessage: Bool {return self._nullMessage != nil}
  /// Clears the value of `nullMessage`. Subsequent reads from it will return its default value.
  mutating func clearNullMessage() {self._nullMessage = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  enum State: SwiftProtobuf.Enum {
    typealias RawValue = Int
    case `default` // = 0
    case verified // = 1
    case unverified // = 2

    init() {
      self = .default
    }

    init?(rawValue: Int) {
      switch rawValue {
      case 0: self = .default
      case 1: self = .verified
      case 2: self = .unverified
      default: return nil
      }
    }

    var rawValue: Int {
      switch self {
      case .default: return 0
      case .verified: return 1
      case .unverified: return 2
      }
    }

  }

  init() {}

  fileprivate var _destination: String? = nil
  fileprivate var _identityKey: Data? = nil
  fileprivate var _state: SignalServiceProtos_Verified.State? = nil
  fileprivate var _nullMessage: Data? = nil
}

#if swift(>=4.2)

extension SignalServiceProtos_Verified.State: CaseIterable {
  // Support synthesized by the compiler.
}

#endif  // swift(>=4.2)

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

  var contacts: SignalServiceProtos_SyncMessage.Contacts {
    get {return _storage._contacts ?? SignalServiceProtos_SyncMessage.Contacts()}
    set {_uniqueStorage()._contacts = newValue}
  }
  /// Returns true if `contacts` has been explicitly set.
  var hasContacts: Bool {return _storage._contacts != nil}
  /// Clears the value of `contacts`. Subsequent reads from it will return its default value.
  mutating func clearContacts() {_storage._contacts = nil}

  var groups: SignalServiceProtos_SyncMessage.Groups {
    get {return _storage._groups ?? SignalServiceProtos_SyncMessage.Groups()}
    set {_uniqueStorage()._groups = newValue}
  }
  /// Returns true if `groups` has been explicitly set.
  var hasGroups: Bool {return _storage._groups != nil}
  /// Clears the value of `groups`. Subsequent reads from it will return its default value.
  mutating func clearGroups() {_storage._groups = nil}

  var request: SignalServiceProtos_SyncMessage.Request {
    get {return _storage._request ?? SignalServiceProtos_SyncMessage.Request()}
    set {_uniqueStorage()._request = newValue}
  }
  /// Returns true if `request` has been explicitly set.
  var hasRequest: Bool {return _storage._request != nil}
  /// Clears the value of `request`. Subsequent reads from it will return its default value.
  mutating func clearRequest() {_storage._request = nil}

  var read: [SignalServiceProtos_SyncMessage.Read] {
    get {return _storage._read}
    set {_uniqueStorage()._read = newValue}
  }

  var blocked: SignalServiceProtos_SyncMessage.Blocked {
    get {return _storage._blocked ?? SignalServiceProtos_SyncMessage.Blocked()}
    set {_uniqueStorage()._blocked = newValue}
  }
  /// Returns true if `blocked` has been explicitly set.
  var hasBlocked: Bool {return _storage._blocked != nil}
  /// Clears the value of `blocked`. Subsequent reads from it will return its default value.
  mutating func clearBlocked() {_storage._blocked = nil}

  var verified: SignalServiceProtos_Verified {
    get {return _storage._verified ?? SignalServiceProtos_Verified()}
    set {_uniqueStorage()._verified = newValue}
  }
  /// Returns true if `verified` has been explicitly set.
  var hasVerified: Bool {return _storage._verified != nil}
  /// Clears the value of `verified`. Subsequent reads from it will return its default value.
  mutating func clearVerified() {_storage._verified = nil}

  var configuration: SignalServiceProtos_SyncMessage.Configuration {
    get {return _storage._configuration ?? SignalServiceProtos_SyncMessage.Configuration()}
    set {_uniqueStorage()._configuration = newValue}
  }
  /// Returns true if `configuration` has been explicitly set.
  var hasConfiguration: Bool {return _storage._configuration != nil}
  /// Clears the value of `configuration`. Subsequent reads from it will return its default value.
  mutating func clearConfiguration() {_storage._configuration = nil}

  var padding: Data {
    get {return _storage._padding ?? SwiftProtobuf.Internal.emptyData}
    set {_uniqueStorage()._padding = newValue}
  }
  /// Returns true if `padding` has been explicitly set.
  var hasPadding: Bool {return _storage._padding != nil}
  /// Clears the value of `padding`. Subsequent reads from it will return its default value.
  mutating func clearPadding() {_storage._padding = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

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

    var message: SignalServiceProtos_DataMessage {
      get {return _storage._message ?? SignalServiceProtos_DataMessage()}
      set {_uniqueStorage()._message = newValue}
    }
    /// Returns true if `message` has been explicitly set.
    var hasMessage: Bool {return _storage._message != nil}
    /// Clears the value of `message`. Subsequent reads from it will return its default value.
    mutating func clearMessage() {_storage._message = nil}

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

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _storage = _StorageClass.defaultInstance
  }

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

    /// Signal-iOS renamed this property.
    var isComplete: Bool {
      get {return _storage._isComplete ?? false}
      set {_uniqueStorage()._isComplete = newValue}
    }
    /// Returns true if `isComplete` has been explicitly set.
    var hasIsComplete: Bool {return _storage._isComplete != nil}
    /// Clears the value of `isComplete`. Subsequent reads from it will return its default value.
    mutating func clearIsComplete() {_storage._isComplete = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _storage = _StorageClass.defaultInstance
  }

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

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _storage = _StorageClass.defaultInstance
  }

  struct Blocked {
    // 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 numbers: [String] = []

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}
  }

  struct Request {
    // 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: SignalServiceProtos_SyncMessage.Request.TypeEnum {
      get {return _type ?? .unknown}
      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 unknownFields = SwiftProtobuf.UnknownStorage()

    enum TypeEnum: SwiftProtobuf.Enum {
      typealias RawValue = Int
      case unknown // = 0
      case contacts // = 1
      case groups // = 2
      case blocked // = 3
      case configuration // = 4

      init() {
        self = .unknown
      }

      init?(rawValue: Int) {
        switch rawValue {
        case 0: self = .unknown
        case 1: self = .contacts
        case 2: self = .groups
        case 3: self = .blocked
        case 4: self = .configuration
        default: return nil
        }
      }

      var rawValue: Int {
        switch self {
        case .unknown: return 0
        case .contacts: return 1
        case .groups: return 2
        case .blocked: return 3
        case .configuration: return 4
        }
      }

    }

    init() {}

    fileprivate var _type: SignalServiceProtos_SyncMessage.Request.TypeEnum? = nil
  }

  struct Read {
    // 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 sender: String {
      get {return _sender ?? String()}
      set {_sender = newValue}
    }
    /// Returns true if `sender` has been explicitly set.
    var hasSender: Bool {return self._sender != nil}
    /// Clears the value of `sender`. Subsequent reads from it will return its default value.
    mutating func clearSender() {self._sender = 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 unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

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

  struct Configuration {
    // 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 readReceipts: Bool {
      get {return _readReceipts ?? false}
      set {_readReceipts = newValue}
    }
    /// Returns true if `readReceipts` has been explicitly set.
    var hasReadReceipts: Bool {return self._readReceipts != nil}
    /// Clears the value of `readReceipts`. Subsequent reads from it will return its default value.
    mutating func clearReadReceipts() {self._readReceipts = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _readReceipts: Bool? = nil
  }

  init() {}

  fileprivate var _storage = _StorageClass.defaultInstance
}

struct SignalServiceProtos_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 ?? SwiftProtobuf.Internal.emptyData}
    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 ?? SwiftProtobuf.Internal.emptyData}
    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 ?? SwiftProtobuf.Internal.emptyData}
    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 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
}

#if swift(>=4.2)

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

#endif  // swift(>=4.2)

struct SignalServiceProtos_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 ?? SwiftProtobuf.Internal.emptyData}
    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() {_storage._id = nil}

  /// @required
  var type: SignalServiceProtos_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() {_storage._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() {_storage._name = nil}

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

  var avatar: SignalServiceProtos_AttachmentPointer {
    get {return _storage._avatar ?? SignalServiceProtos_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() {_storage._avatar = nil}

  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 SignalServiceProtos_GroupContext.TypeEnum: CaseIterable {
  // Support synthesized by the compiler.
}

#endif  // swift(>=4.2)

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

  var avatar: SignalServiceProtos_ContactDetails.Avatar {
    get {return _storage._avatar ?? SignalServiceProtos_ContactDetails.Avatar()}
    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() {_storage._avatar = nil}

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

  var verified: SignalServiceProtos_Verified {
    get {return _storage._verified ?? SignalServiceProtos_Verified()}
    set {_uniqueStorage()._verified = newValue}
  }
  /// Returns true if `verified` has been explicitly set.
  var hasVerified: Bool {return _storage._verified != nil}
  /// Clears the value of `verified`. Subsequent reads from it will return its default value.
  mutating func clearVerified() {_storage._verified = nil}

  var profileKey: Data {
    get {return _storage._profileKey ?? SwiftProtobuf.Internal.emptyData}
    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() {_storage._profileKey = nil}

  var blocked: Bool {
    get {return _storage._blocked ?? false}
    set {_uniqueStorage()._blocked = newValue}
  }
  /// Returns true if `blocked` has been explicitly set.
  var hasBlocked: Bool {return _storage._blocked != nil}
  /// Clears the value of `blocked`. Subsequent reads from it will return its default value.
  mutating func clearBlocked() {_storage._blocked = 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() {_storage._expireTimer = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  struct Avatar {
    // 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 length: UInt32 {
      get {return _length ?? 0}
      set {_length = newValue}
    }
    /// Returns true if `length` has been explicitly set.
    var hasLength: Bool {return self._length != nil}
    /// Clears the value of `length`. Subsequent reads from it will return its default value.
    mutating func clearLength() {self._length = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _contentType: String? = nil
    fileprivate var _length: UInt32? = nil
  }

  init() {}

  fileprivate var _storage = _StorageClass.defaultInstance
}

struct SignalServiceProtos_GroupDetails {
  // 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 ?? SwiftProtobuf.Internal.emptyData}
    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() {_storage._id = 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() {_storage._name = nil}

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

  var avatar: SignalServiceProtos_GroupDetails.Avatar {
    get {return _storage._avatar ?? SignalServiceProtos_GroupDetails.Avatar()}
    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() {_storage._avatar = nil}

  var active: Bool {
    get {return _storage._active ?? true}
    set {_uniqueStorage()._active = newValue}
  }
  /// Returns true if `active` has been explicitly set.
  var hasActive: Bool {return _storage._active != nil}
  /// Clears the value of `active`. Subsequent reads from it will return its default value.
  mutating func clearActive() {_storage._active = 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() {_storage._expireTimer = nil}

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

  var unknownFields = SwiftProtobuf.UnknownStorage()

  struct Avatar {
    // 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 length: UInt32 {
      get {return _length ?? 0}
      set {_length = newValue}
    }
    /// Returns true if `length` has been explicitly set.
    var hasLength: Bool {return self._length != nil}
    /// Clears the value of `length`. Subsequent reads from it will return its default value.
    mutating func clearLength() {self._length = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _contentType: String? = nil
    fileprivate var _length: UInt32? = nil
  }

  init() {}

  fileprivate var _storage = _StorageClass.defaultInstance
}

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

fileprivate let _protobuf_package = "SignalServiceProtos"

extension SignalServiceProtos_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"),
    3: .same(proto: "relay"),
    5: .same(proto: "timestamp"),
    6: .same(proto: "legacyMessage"),
    8: .same(proto: "content"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularEnumField(value: &self._type)
      case 2: try decoder.decodeSingularStringField(value: &self._source)
      case 3: try decoder.decodeSingularStringField(value: &self._relay)
      case 5: try decoder.decodeSingularUInt64Field(value: &self._timestamp)
      case 6: try decoder.decodeSingularBytesField(value: &self._legacyMessage)
      case 7: try decoder.decodeSingularUInt32Field(value: &self._sourceDevice)
      case 8: try decoder.decodeSingularBytesField(value: &self._content)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._type {
      try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
    }
    if let v = self._source {
      try visitor.visitSingularStringField(value: v, fieldNumber: 2)
    }
    if let v = self._relay {
      try visitor.visitSingularStringField(value: v, fieldNumber: 3)
    }
    if let v = self._timestamp {
      try visitor.visitSingularUInt64Field(value: v, fieldNumber: 5)
    }
    if let v = self._legacyMessage {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 6)
    }
    if let v = self._sourceDevice {
      try visitor.visitSingularUInt32Field(value: v, fieldNumber: 7)
    }
    if let v = self._content {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 8)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_Envelope) -> Bool {
    if self._type != other._type {return false}
    if self._source != other._source {return false}
    if self._sourceDevice != other._sourceDevice {return false}
    if self._relay != other._relay {return false}
    if self._timestamp != other._timestamp {return false}
    if self._legacyMessage != other._legacyMessage {return false}
    if self._content != other._content {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_Envelope.TypeEnum: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "UNKNOWN"),
    1: .same(proto: "CIPHERTEXT"),
    2: .same(proto: "KEY_EXCHANGE"),
    3: .same(proto: "PREKEY_BUNDLE"),
    5: .same(proto: "RECEIPT"),
  ]
}

extension SignalServiceProtos_Content: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".Content"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "dataMessage"),
    2: .same(proto: "syncMessage"),
    3: .same(proto: "callMessage"),
    4: .same(proto: "nullMessage"),
    5: .same(proto: "receiptMessage"),
  ]

  fileprivate class _StorageClass {
    var _dataMessage: SignalServiceProtos_DataMessage? = nil
    var _syncMessage: SignalServiceProtos_SyncMessage? = nil
    var _callMessage: SignalServiceProtos_CallMessage? = nil
    var _nullMessage: SignalServiceProtos_NullMessage? = nil
    var _receiptMessage: SignalServiceProtos_ReceiptMessage? = nil

    static let defaultInstance = _StorageClass()

    private init() {}

    init(copying source: _StorageClass) {
      _dataMessage = source._dataMessage
      _syncMessage = source._syncMessage
      _callMessage = source._callMessage
      _nullMessage = source._nullMessage
      _receiptMessage = source._receiptMessage
    }
  }

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

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        switch fieldNumber {
        case 1: try decoder.decodeSingularMessageField(value: &_storage._dataMessage)
        case 2: try decoder.decodeSingularMessageField(value: &_storage._syncMessage)
        case 3: try decoder.decodeSingularMessageField(value: &_storage._callMessage)
        case 4: try decoder.decodeSingularMessageField(value: &_storage._nullMessage)
        case 5: try decoder.decodeSingularMessageField(value: &_storage._receiptMessage)
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._dataMessage {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
      }
      if let v = _storage._syncMessage {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
      }
      if let v = _storage._callMessage {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
      }
      if let v = _storage._nullMessage {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
      }
      if let v = _storage._receiptMessage {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_Content) -> Bool {
    if _storage !== other._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let other_storage = _args.1
        if _storage._dataMessage != other_storage._dataMessage {return false}
        if _storage._syncMessage != other_storage._syncMessage {return false}
        if _storage._callMessage != other_storage._callMessage {return false}
        if _storage._nullMessage != other_storage._nullMessage {return false}
        if _storage._receiptMessage != other_storage._receiptMessage {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_CallMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".CallMessage"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "offer"),
    2: .same(proto: "answer"),
    3: .same(proto: "iceUpdate"),
    4: .same(proto: "hangup"),
    5: .same(proto: "busy"),
    6: .same(proto: "profileKey"),
  ]

  fileprivate class _StorageClass {
    var _offer: SignalServiceProtos_CallMessage.Offer? = nil
    var _answer: SignalServiceProtos_CallMessage.Answer? = nil
    var _iceUpdate: [SignalServiceProtos_CallMessage.IceUpdate] = []
    var _hangup: SignalServiceProtos_CallMessage.Hangup? = nil
    var _busy: SignalServiceProtos_CallMessage.Busy? = nil
    var _profileKey: Data? = nil

    static let defaultInstance = _StorageClass()

    private init() {}

    init(copying source: _StorageClass) {
      _offer = source._offer
      _answer = source._answer
      _iceUpdate = source._iceUpdate
      _hangup = source._hangup
      _busy = source._busy
      _profileKey = source._profileKey
    }
  }

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

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        switch fieldNumber {
        case 1: try decoder.decodeSingularMessageField(value: &_storage._offer)
        case 2: try decoder.decodeSingularMessageField(value: &_storage._answer)
        case 3: try decoder.decodeRepeatedMessageField(value: &_storage._iceUpdate)
        case 4: try decoder.decodeSingularMessageField(value: &_storage._hangup)
        case 5: try decoder.decodeSingularMessageField(value: &_storage._busy)
        case 6: try decoder.decodeSingularBytesField(value: &_storage._profileKey)
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._offer {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
      }
      if let v = _storage._answer {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
      }
      if !_storage._iceUpdate.isEmpty {
        try visitor.visitRepeatedMessageField(value: _storage._iceUpdate, fieldNumber: 3)
      }
      if let v = _storage._hangup {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
      }
      if let v = _storage._busy {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
      }
      if let v = _storage._profileKey {
        try visitor.visitSingularBytesField(value: v, fieldNumber: 6)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_CallMessage) -> Bool {
    if _storage !== other._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let other_storage = _args.1
        if _storage._offer != other_storage._offer {return false}
        if _storage._answer != other_storage._answer {return false}
        if _storage._iceUpdate != other_storage._iceUpdate {return false}
        if _storage._hangup != other_storage._hangup {return false}
        if _storage._busy != other_storage._busy {return false}
        if _storage._profileKey != other_storage._profileKey {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_CallMessage.Offer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_CallMessage.protoMessageName + ".Offer"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "id"),
    2: .same(proto: "sessionDescription"),
  ]

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

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._id {
      try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
    }
    if let v = self._sessionDescription {
      try visitor.visitSingularStringField(value: v, fieldNumber: 2)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_CallMessage.Offer) -> Bool {
    if self._id != other._id {return false}
    if self._sessionDescription != other._sessionDescription {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_CallMessage.Answer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_CallMessage.protoMessageName + ".Answer"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "id"),
    2: .same(proto: "sessionDescription"),
  ]

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

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._id {
      try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
    }
    if let v = self._sessionDescription {
      try visitor.visitSingularStringField(value: v, fieldNumber: 2)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_CallMessage.Answer) -> Bool {
    if self._id != other._id {return false}
    if self._sessionDescription != other._sessionDescription {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_CallMessage.IceUpdate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_CallMessage.protoMessageName + ".IceUpdate"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "id"),
    2: .same(proto: "sdpMid"),
    3: .same(proto: "sdpMLineIndex"),
    4: .same(proto: "sdp"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularUInt64Field(value: &self._id)
      case 2: try decoder.decodeSingularStringField(value: &self._sdpMid)
      case 3: try decoder.decodeSingularUInt32Field(value: &self._sdpMlineIndex)
      case 4: try decoder.decodeSingularStringField(value: &self._sdp)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._id {
      try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
    }
    if let v = self._sdpMid {
      try visitor.visitSingularStringField(value: v, fieldNumber: 2)
    }
    if let v = self._sdpMlineIndex {
      try visitor.visitSingularUInt32Field(value: v, fieldNumber: 3)
    }
    if let v = self._sdp {
      try visitor.visitSingularStringField(value: v, fieldNumber: 4)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_CallMessage.IceUpdate) -> Bool {
    if self._id != other._id {return false}
    if self._sdpMid != other._sdpMid {return false}
    if self._sdpMlineIndex != other._sdpMlineIndex {return false}
    if self._sdp != other._sdp {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_CallMessage.Busy: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_CallMessage.protoMessageName + ".Busy"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "id"),
  ]

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

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._id {
      try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_CallMessage.Busy) -> Bool {
    if self._id != other._id {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_CallMessage.Hangup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_CallMessage.protoMessageName + ".Hangup"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "id"),
  ]

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

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._id {
      try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_CallMessage.Hangup) -> Bool {
    if self._id != other._id {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_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"),
    9: .same(proto: "contact"),
  ]

  fileprivate class _StorageClass {
    var _body: String? = nil
    var _attachments: [SignalServiceProtos_AttachmentPointer] = []
    var _group: SignalServiceProtos_GroupContext? = nil
    var _flags: UInt32? = nil
    var _expireTimer: UInt32? = nil
    var _profileKey: Data? = nil
    var _timestamp: UInt64? = nil
    var _quote: SignalServiceProtos_DataMessage.Quote? = nil
    var _contact: [SignalServiceProtos_DataMessage.Contact] = []

    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
      _contact = source._contact
    }
  }

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

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        switch fieldNumber {
        case 1: try decoder.decodeSingularStringField(value: &_storage._body)
        case 2: try decoder.decodeRepeatedMessageField(value: &_storage._attachments)
        case 3: try decoder.decodeSingularMessageField(value: &_storage._group)
        case 4: try decoder.decodeSingularUInt32Field(value: &_storage._flags)
        case 5: try decoder.decodeSingularUInt32Field(value: &_storage._expireTimer)
        case 6: try decoder.decodeSingularBytesField(value: &_storage._profileKey)
        case 7: try decoder.decodeSingularUInt64Field(value: &_storage._timestamp)
        case 8: try decoder.decodeSingularMessageField(value: &_storage._quote)
        case 9: try decoder.decodeRepeatedMessageField(value: &_storage._contact)
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._body {
        try visitor.visitSingularStringField(value: v, fieldNumber: 1)
      }
      if !_storage._attachments.isEmpty {
        try visitor.visitRepeatedMessageField(value: _storage._attachments, fieldNumber: 2)
      }
      if let v = _storage._group {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
      }
      if let v = _storage._flags {
        try visitor.visitSingularUInt32Field(value: v, fieldNumber: 4)
      }
      if let v = _storage._expireTimer {
        try visitor.visitSingularUInt32Field(value: v, fieldNumber: 5)
      }
      if let v = _storage._profileKey {
        try visitor.visitSingularBytesField(value: v, fieldNumber: 6)
      }
      if let v = _storage._timestamp {
        try visitor.visitSingularUInt64Field(value: v, fieldNumber: 7)
      }
      if let v = _storage._quote {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 8)
      }
      if !_storage._contact.isEmpty {
        try visitor.visitRepeatedMessageField(value: _storage._contact, fieldNumber: 9)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_DataMessage) -> Bool {
    if _storage !== other._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let other_storage = _args.1
        if _storage._body != other_storage._body {return false}
        if _storage._attachments != other_storage._attachments {return false}
        if _storage._group != other_storage._group {return false}
        if _storage._flags != other_storage._flags {return false}
        if _storage._expireTimer != other_storage._expireTimer {return false}
        if _storage._profileKey != other_storage._profileKey {return false}
        if _storage._timestamp != other_storage._timestamp {return false}
        if _storage._quote != other_storage._quote {return false}
        if _storage._contact != other_storage._contact {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_DataMessage.Flags: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "END_SESSION"),
    2: .same(proto: "EXPIRATION_TIMER_UPDATE"),
    4: .same(proto: "PROFILE_KEY_UPDATE"),
  ]
}

extension SignalServiceProtos_DataMessage.Quote: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_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"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularUInt64Field(value: &self._id)
      case 2: try decoder.decodeSingularStringField(value: &self._author)
      case 3: try decoder.decodeSingularStringField(value: &self._text)
      case 4: try decoder.decodeRepeatedMessageField(value: &self.attachments)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._id {
      try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
    }
    if let v = self._author {
      try visitor.visitSingularStringField(value: v, fieldNumber: 2)
    }
    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)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_DataMessage.Quote) -> Bool {
    if self._id != other._id {return false}
    if self._author != other._author {return false}
    if self._text != other._text {return false}
    if self.attachments != other.attachments {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_DataMessage.Quote.QuotedAttachment: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_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"),
  ]

  fileprivate class _StorageClass {
    var _contentType: String? = nil
    var _fileName: String? = nil
    var _thumbnail: SignalServiceProtos_AttachmentPointer? = nil
    var _flags: UInt32? = nil

    static let defaultInstance = _StorageClass()

    private init() {}

    init(copying source: _StorageClass) {
      _contentType = source._contentType
      _fileName = source._fileName
      _thumbnail = source._thumbnail
      _flags = source._flags
    }
  }

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

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        switch fieldNumber {
        case 1: try decoder.decodeSingularStringField(value: &_storage._contentType)
        case 2: try decoder.decodeSingularStringField(value: &_storage._fileName)
        case 3: try decoder.decodeSingularMessageField(value: &_storage._thumbnail)
        case 4: try decoder.decodeSingularUInt32Field(value: &_storage._flags)
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._contentType {
        try visitor.visitSingularStringField(value: v, fieldNumber: 1)
      }
      if let v = _storage._fileName {
        try visitor.visitSingularStringField(value: v, fieldNumber: 2)
      }
      if let v = _storage._thumbnail {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
      }
      if let v = _storage._flags {
        try visitor.visitSingularUInt32Field(value: v, fieldNumber: 4)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_DataMessage.Quote.QuotedAttachment) -> Bool {
    if _storage !== other._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let other_storage = _args.1
        if _storage._contentType != other_storage._contentType {return false}
        if _storage._fileName != other_storage._fileName {return false}
        if _storage._thumbnail != other_storage._thumbnail {return false}
        if _storage._flags != other_storage._flags {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

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

extension SignalServiceProtos_DataMessage.Contact: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_DataMessage.protoMessageName + ".Contact"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "name"),
    3: .same(proto: "number"),
    4: .same(proto: "email"),
    5: .same(proto: "address"),
    6: .same(proto: "avatar"),
    7: .same(proto: "organization"),
  ]

  fileprivate class _StorageClass {
    var _name: SignalServiceProtos_DataMessage.Contact.Name? = nil
    var _number: [SignalServiceProtos_DataMessage.Contact.Phone] = []
    var _email: [SignalServiceProtos_DataMessage.Contact.Email] = []
    var _address: [SignalServiceProtos_DataMessage.Contact.PostalAddress] = []
    var _avatar: SignalServiceProtos_DataMessage.Contact.Avatar? = nil
    var _organization: String? = nil

    static let defaultInstance = _StorageClass()

    private init() {}

    init(copying source: _StorageClass) {
      _name = source._name
      _number = source._number
      _email = source._email
      _address = source._address
      _avatar = source._avatar
      _organization = source._organization
    }
  }

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

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        switch fieldNumber {
        case 1: try decoder.decodeSingularMessageField(value: &_storage._name)
        case 3: try decoder.decodeRepeatedMessageField(value: &_storage._number)
        case 4: try decoder.decodeRepeatedMessageField(value: &_storage._email)
        case 5: try decoder.decodeRepeatedMessageField(value: &_storage._address)
        case 6: try decoder.decodeSingularMessageField(value: &_storage._avatar)
        case 7: try decoder.decodeSingularStringField(value: &_storage._organization)
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._name {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
      }
      if !_storage._number.isEmpty {
        try visitor.visitRepeatedMessageField(value: _storage._number, fieldNumber: 3)
      }
      if !_storage._email.isEmpty {
        try visitor.visitRepeatedMessageField(value: _storage._email, fieldNumber: 4)
      }
      if !_storage._address.isEmpty {
        try visitor.visitRepeatedMessageField(value: _storage._address, fieldNumber: 5)
      }
      if let v = _storage._avatar {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
      }
      if let v = _storage._organization {
        try visitor.visitSingularStringField(value: v, fieldNumber: 7)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_DataMessage.Contact) -> Bool {
    if _storage !== other._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let other_storage = _args.1
        if _storage._name != other_storage._name {return false}
        if _storage._number != other_storage._number {return false}
        if _storage._email != other_storage._email {return false}
        if _storage._address != other_storage._address {return false}
        if _storage._avatar != other_storage._avatar {return false}
        if _storage._organization != other_storage._organization {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_DataMessage.Contact.Name: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_DataMessage.Contact.protoMessageName + ".Name"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "givenName"),
    2: .same(proto: "familyName"),
    3: .same(proto: "prefix"),
    4: .same(proto: "suffix"),
    5: .same(proto: "middleName"),
    6: .same(proto: "displayName"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularStringField(value: &self._givenName)
      case 2: try decoder.decodeSingularStringField(value: &self._familyName)
      case 3: try decoder.decodeSingularStringField(value: &self._prefix)
      case 4: try decoder.decodeSingularStringField(value: &self._suffix)
      case 5: try decoder.decodeSingularStringField(value: &self._middleName)
      case 6: try decoder.decodeSingularStringField(value: &self._displayName)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._givenName {
      try visitor.visitSingularStringField(value: v, fieldNumber: 1)
    }
    if let v = self._familyName {
      try visitor.visitSingularStringField(value: v, fieldNumber: 2)
    }
    if let v = self._prefix {
      try visitor.visitSingularStringField(value: v, fieldNumber: 3)
    }
    if let v = self._suffix {
      try visitor.visitSingularStringField(value: v, fieldNumber: 4)
    }
    if let v = self._middleName {
      try visitor.visitSingularStringField(value: v, fieldNumber: 5)
    }
    if let v = self._displayName {
      try visitor.visitSingularStringField(value: v, fieldNumber: 6)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_DataMessage.Contact.Name) -> Bool {
    if self._givenName != other._givenName {return false}
    if self._familyName != other._familyName {return false}
    if self._prefix != other._prefix {return false}
    if self._suffix != other._suffix {return false}
    if self._middleName != other._middleName {return false}
    if self._displayName != other._displayName {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_DataMessage.Contact.Phone: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_DataMessage.Contact.protoMessageName + ".Phone"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "value"),
    2: .same(proto: "type"),
    3: .same(proto: "label"),
  ]

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

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._value {
      try visitor.visitSingularStringField(value: v, fieldNumber: 1)
    }
    if let v = self._type {
      try visitor.visitSingularEnumField(value: v, fieldNumber: 2)
    }
    if let v = self._label {
      try visitor.visitSingularStringField(value: v, fieldNumber: 3)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_DataMessage.Contact.Phone) -> Bool {
    if self._value != other._value {return false}
    if self._type != other._type {return false}
    if self._label != other._label {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_DataMessage.Contact.Phone.TypeEnum: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "HOME"),
    2: .same(proto: "MOBILE"),
    3: .same(proto: "WORK"),
    4: .same(proto: "CUSTOM"),
  ]
}

extension SignalServiceProtos_DataMessage.Contact.Email: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_DataMessage.Contact.protoMessageName + ".Email"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "value"),
    2: .same(proto: "type"),
    3: .same(proto: "label"),
  ]

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

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._value {
      try visitor.visitSingularStringField(value: v, fieldNumber: 1)
    }
    if let v = self._type {
      try visitor.visitSingularEnumField(value: v, fieldNumber: 2)
    }
    if let v = self._label {
      try visitor.visitSingularStringField(value: v, fieldNumber: 3)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_DataMessage.Contact.Email) -> Bool {
    if self._value != other._value {return false}
    if self._type != other._type {return false}
    if self._label != other._label {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_DataMessage.Contact.Email.TypeEnum: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "HOME"),
    2: .same(proto: "MOBILE"),
    3: .same(proto: "WORK"),
    4: .same(proto: "CUSTOM"),
  ]
}

extension SignalServiceProtos_DataMessage.Contact.PostalAddress: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_DataMessage.Contact.protoMessageName + ".PostalAddress"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "type"),
    2: .same(proto: "label"),
    3: .same(proto: "street"),
    4: .same(proto: "pobox"),
    5: .same(proto: "neighborhood"),
    6: .same(proto: "city"),
    7: .same(proto: "region"),
    8: .same(proto: "postcode"),
    9: .same(proto: "country"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularEnumField(value: &self._type)
      case 2: try decoder.decodeSingularStringField(value: &self._label)
      case 3: try decoder.decodeSingularStringField(value: &self._street)
      case 4: try decoder.decodeSingularStringField(value: &self._pobox)
      case 5: try decoder.decodeSingularStringField(value: &self._neighborhood)
      case 6: try decoder.decodeSingularStringField(value: &self._city)
      case 7: try decoder.decodeSingularStringField(value: &self._region)
      case 8: try decoder.decodeSingularStringField(value: &self._postcode)
      case 9: try decoder.decodeSingularStringField(value: &self._country)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._type {
      try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
    }
    if let v = self._label {
      try visitor.visitSingularStringField(value: v, fieldNumber: 2)
    }
    if let v = self._street {
      try visitor.visitSingularStringField(value: v, fieldNumber: 3)
    }
    if let v = self._pobox {
      try visitor.visitSingularStringField(value: v, fieldNumber: 4)
    }
    if let v = self._neighborhood {
      try visitor.visitSingularStringField(value: v, fieldNumber: 5)
    }
    if let v = self._city {
      try visitor.visitSingularStringField(value: v, fieldNumber: 6)
    }
    if let v = self._region {
      try visitor.visitSingularStringField(value: v, fieldNumber: 7)
    }
    if let v = self._postcode {
      try visitor.visitSingularStringField(value: v, fieldNumber: 8)
    }
    if let v = self._country {
      try visitor.visitSingularStringField(value: v, fieldNumber: 9)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_DataMessage.Contact.PostalAddress) -> Bool {
    if self._type != other._type {return false}
    if self._label != other._label {return false}
    if self._street != other._street {return false}
    if self._pobox != other._pobox {return false}
    if self._neighborhood != other._neighborhood {return false}
    if self._city != other._city {return false}
    if self._region != other._region {return false}
    if self._postcode != other._postcode {return false}
    if self._country != other._country {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_DataMessage.Contact.PostalAddress.TypeEnum: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "HOME"),
    2: .same(proto: "WORK"),
    3: .same(proto: "CUSTOM"),
  ]
}

extension SignalServiceProtos_DataMessage.Contact.Avatar: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_DataMessage.Contact.protoMessageName + ".Avatar"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "avatar"),
    2: .same(proto: "isProfile"),
  ]

  fileprivate class _StorageClass {
    var _avatar: SignalServiceProtos_AttachmentPointer? = nil
    var _isProfile: Bool? = nil

    static let defaultInstance = _StorageClass()

    private init() {}

    init(copying source: _StorageClass) {
      _avatar = source._avatar
      _isProfile = source._isProfile
    }
  }

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

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        switch fieldNumber {
        case 1: try decoder.decodeSingularMessageField(value: &_storage._avatar)
        case 2: try decoder.decodeSingularBoolField(value: &_storage._isProfile)
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._avatar {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
      }
      if let v = _storage._isProfile {
        try visitor.visitSingularBoolField(value: v, fieldNumber: 2)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_DataMessage.Contact.Avatar) -> Bool {
    if _storage !== other._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let other_storage = _args.1
        if _storage._avatar != other_storage._avatar {return false}
        if _storage._isProfile != other_storage._isProfile {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_NullMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".NullMessage"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "padding"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularBytesField(value: &self._padding)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._padding {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 1)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_NullMessage) -> Bool {
    if self._padding != other._padding {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_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"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularEnumField(value: &self._type)
      case 2: try decoder.decodeRepeatedUInt64Field(value: &self.timestamp)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    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)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_ReceiptMessage) -> Bool {
    if self._type != other._type {return false}
    if self.timestamp != other.timestamp {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

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

extension SignalServiceProtos_Verified: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".Verified"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "destination"),
    2: .same(proto: "identityKey"),
    3: .same(proto: "state"),
    4: .same(proto: "nullMessage"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularStringField(value: &self._destination)
      case 2: try decoder.decodeSingularBytesField(value: &self._identityKey)
      case 3: try decoder.decodeSingularEnumField(value: &self._state)
      case 4: try decoder.decodeSingularBytesField(value: &self._nullMessage)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._destination {
      try visitor.visitSingularStringField(value: v, fieldNumber: 1)
    }
    if let v = self._identityKey {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 2)
    }
    if let v = self._state {
      try visitor.visitSingularEnumField(value: v, fieldNumber: 3)
    }
    if let v = self._nullMessage {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 4)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_Verified) -> Bool {
    if self._destination != other._destination {return false}
    if self._identityKey != other._identityKey {return false}
    if self._state != other._state {return false}
    if self._nullMessage != other._nullMessage {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_Verified.State: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "DEFAULT"),
    1: .same(proto: "VERIFIED"),
    2: .same(proto: "UNVERIFIED"),
  ]
}

extension SignalServiceProtos_SyncMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".SyncMessage"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "sent"),
    2: .same(proto: "contacts"),
    3: .same(proto: "groups"),
    4: .same(proto: "request"),
    5: .same(proto: "read"),
    6: .same(proto: "blocked"),
    7: .same(proto: "verified"),
    9: .same(proto: "configuration"),
    8: .same(proto: "padding"),
  ]

  fileprivate class _StorageClass {
    var _sent: SignalServiceProtos_SyncMessage.Sent? = nil
    var _contacts: SignalServiceProtos_SyncMessage.Contacts? = nil
    var _groups: SignalServiceProtos_SyncMessage.Groups? = nil
    var _request: SignalServiceProtos_SyncMessage.Request? = nil
    var _read: [SignalServiceProtos_SyncMessage.Read] = []
    var _blocked: SignalServiceProtos_SyncMessage.Blocked? = nil
    var _verified: SignalServiceProtos_Verified? = nil
    var _configuration: SignalServiceProtos_SyncMessage.Configuration? = nil
    var _padding: Data? = nil

    static let defaultInstance = _StorageClass()

    private init() {}

    init(copying source: _StorageClass) {
      _sent = source._sent
      _contacts = source._contacts
      _groups = source._groups
      _request = source._request
      _read = source._read
      _blocked = source._blocked
      _verified = source._verified
      _configuration = source._configuration
      _padding = source._padding
    }
  }

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

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        switch fieldNumber {
        case 1: try decoder.decodeSingularMessageField(value: &_storage._sent)
        case 2: try decoder.decodeSingularMessageField(value: &_storage._contacts)
        case 3: try decoder.decodeSingularMessageField(value: &_storage._groups)
        case 4: try decoder.decodeSingularMessageField(value: &_storage._request)
        case 5: try decoder.decodeRepeatedMessageField(value: &_storage._read)
        case 6: try decoder.decodeSingularMessageField(value: &_storage._blocked)
        case 7: try decoder.decodeSingularMessageField(value: &_storage._verified)
        case 8: try decoder.decodeSingularBytesField(value: &_storage._padding)
        case 9: try decoder.decodeSingularMessageField(value: &_storage._configuration)
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._sent {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
      }
      if let v = _storage._contacts {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
      }
      if let v = _storage._groups {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
      }
      if let v = _storage._request {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
      }
      if !_storage._read.isEmpty {
        try visitor.visitRepeatedMessageField(value: _storage._read, fieldNumber: 5)
      }
      if let v = _storage._blocked {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
      }
      if let v = _storage._verified {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
      }
      if let v = _storage._padding {
        try visitor.visitSingularBytesField(value: v, fieldNumber: 8)
      }
      if let v = _storage._configuration {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 9)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_SyncMessage) -> Bool {
    if _storage !== other._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let other_storage = _args.1
        if _storage._sent != other_storage._sent {return false}
        if _storage._contacts != other_storage._contacts {return false}
        if _storage._groups != other_storage._groups {return false}
        if _storage._request != other_storage._request {return false}
        if _storage._read != other_storage._read {return false}
        if _storage._blocked != other_storage._blocked {return false}
        if _storage._verified != other_storage._verified {return false}
        if _storage._configuration != other_storage._configuration {return false}
        if _storage._padding != other_storage._padding {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_SyncMessage.Sent: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_SyncMessage.protoMessageName + ".Sent"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "destination"),
    2: .same(proto: "timestamp"),
    3: .same(proto: "message"),
    4: .same(proto: "expirationStartTimestamp"),
  ]

  fileprivate class _StorageClass {
    var _destination: String? = nil
    var _timestamp: UInt64? = nil
    var _message: SignalServiceProtos_DataMessage? = nil
    var _expirationStartTimestamp: UInt64? = nil

    static let defaultInstance = _StorageClass()

    private init() {}

    init(copying source: _StorageClass) {
      _destination = source._destination
      _timestamp = source._timestamp
      _message = source._message
      _expirationStartTimestamp = source._expirationStartTimestamp
    }
  }

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

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        switch fieldNumber {
        case 1: try decoder.decodeSingularStringField(value: &_storage._destination)
        case 2: try decoder.decodeSingularUInt64Field(value: &_storage._timestamp)
        case 3: try decoder.decodeSingularMessageField(value: &_storage._message)
        case 4: try decoder.decodeSingularUInt64Field(value: &_storage._expirationStartTimestamp)
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._destination {
        try visitor.visitSingularStringField(value: v, fieldNumber: 1)
      }
      if let v = _storage._timestamp {
        try visitor.visitSingularUInt64Field(value: v, fieldNumber: 2)
      }
      if let v = _storage._message {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
      }
      if let v = _storage._expirationStartTimestamp {
        try visitor.visitSingularUInt64Field(value: v, fieldNumber: 4)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_SyncMessage.Sent) -> Bool {
    if _storage !== other._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let other_storage = _args.1
        if _storage._destination != other_storage._destination {return false}
        if _storage._timestamp != other_storage._timestamp {return false}
        if _storage._message != other_storage._message {return false}
        if _storage._expirationStartTimestamp != other_storage._expirationStartTimestamp {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_SyncMessage.Contacts: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_SyncMessage.protoMessageName + ".Contacts"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "blob"),
    2: .same(proto: "isComplete"),
  ]

  fileprivate class _StorageClass {
    var _blob: SignalServiceProtos_AttachmentPointer? = nil
    var _isComplete: Bool? = nil

    static let defaultInstance = _StorageClass()

    private init() {}

    init(copying source: _StorageClass) {
      _blob = source._blob
      _isComplete = source._isComplete
    }
  }

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

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        switch fieldNumber {
        case 1: try decoder.decodeSingularMessageField(value: &_storage._blob)
        case 2: try decoder.decodeSingularBoolField(value: &_storage._isComplete)
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._blob {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
      }
      if let v = _storage._isComplete {
        try visitor.visitSingularBoolField(value: v, fieldNumber: 2)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_SyncMessage.Contacts) -> Bool {
    if _storage !== other._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let other_storage = _args.1
        if _storage._blob != other_storage._blob {return false}
        if _storage._isComplete != other_storage._isComplete {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_SyncMessage.Groups: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_SyncMessage.protoMessageName + ".Groups"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "blob"),
  ]

  fileprivate class _StorageClass {
    var _blob: SignalServiceProtos_AttachmentPointer? = nil

    static let defaultInstance = _StorageClass()

    private init() {}

    init(copying source: _StorageClass) {
      _blob = source._blob
    }
  }

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

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        switch fieldNumber {
        case 1: try decoder.decodeSingularMessageField(value: &_storage._blob)
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._blob {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_SyncMessage.Groups) -> Bool {
    if _storage !== other._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let other_storage = _args.1
        if _storage._blob != other_storage._blob {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_SyncMessage.Blocked: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_SyncMessage.protoMessageName + ".Blocked"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "numbers"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeRepeatedStringField(value: &self.numbers)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if !self.numbers.isEmpty {
      try visitor.visitRepeatedStringField(value: self.numbers, fieldNumber: 1)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_SyncMessage.Blocked) -> Bool {
    if self.numbers != other.numbers {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_SyncMessage.Request: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_SyncMessage.protoMessageName + ".Request"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "type"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularEnumField(value: &self._type)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._type {
      try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_SyncMessage.Request) -> Bool {
    if self._type != other._type {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_SyncMessage.Request.TypeEnum: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "UNKNOWN"),
    1: .same(proto: "CONTACTS"),
    2: .same(proto: "GROUPS"),
    3: .same(proto: "BLOCKED"),
    4: .same(proto: "CONFIGURATION"),
  ]
}

extension SignalServiceProtos_SyncMessage.Read: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_SyncMessage.protoMessageName + ".Read"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "sender"),
    2: .same(proto: "timestamp"),
  ]

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

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._sender {
      try visitor.visitSingularStringField(value: v, fieldNumber: 1)
    }
    if let v = self._timestamp {
      try visitor.visitSingularUInt64Field(value: v, fieldNumber: 2)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_SyncMessage.Read) -> Bool {
    if self._sender != other._sender {return false}
    if self._timestamp != other._timestamp {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_SyncMessage.Configuration: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_SyncMessage.protoMessageName + ".Configuration"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "readReceipts"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularBoolField(value: &self._readReceipts)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._readReceipts {
      try visitor.visitSingularBoolField(value: v, fieldNumber: 1)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_SyncMessage.Configuration) -> Bool {
    if self._readReceipts != other._readReceipts {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_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"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularFixed64Field(value: &self._id)
      case 2: try decoder.decodeSingularStringField(value: &self._contentType)
      case 3: try decoder.decodeSingularBytesField(value: &self._key)
      case 4: try decoder.decodeSingularUInt32Field(value: &self._size)
      case 5: try decoder.decodeSingularBytesField(value: &self._thumbnail)
      case 6: try decoder.decodeSingularBytesField(value: &self._digest)
      case 7: try decoder.decodeSingularStringField(value: &self._fileName)
      case 8: try decoder.decodeSingularUInt32Field(value: &self._flags)
      case 9: try decoder.decodeSingularUInt32Field(value: &self._width)
      case 10: try decoder.decodeSingularUInt32Field(value: &self._height)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._id {
      try visitor.visitSingularFixed64Field(value: v, fieldNumber: 1)
    }
    if let v = self._contentType {
      try visitor.visitSingularStringField(value: v, fieldNumber: 2)
    }
    if let v = self._key {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 3)
    }
    if let v = self._size {
      try visitor.visitSingularUInt32Field(value: v, fieldNumber: 4)
    }
    if let v = self._thumbnail {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 5)
    }
    if let v = self._digest {
      try visitor.visitSingularBytesField(value: v, fieldNumber: 6)
    }
    if let v = self._fileName {
      try visitor.visitSingularStringField(value: v, fieldNumber: 7)
    }
    if let v = self._flags {
      try visitor.visitSingularUInt32Field(value: v, fieldNumber: 8)
    }
    if let v = self._width {
      try visitor.visitSingularUInt32Field(value: v, fieldNumber: 9)
    }
    if let v = self._height {
      try visitor.visitSingularUInt32Field(value: v, fieldNumber: 10)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_AttachmentPointer) -> Bool {
    if self._id != other._id {return false}
    if self._contentType != other._contentType {return false}
    if self._key != other._key {return false}
    if self._size != other._size {return false}
    if self._thumbnail != other._thumbnail {return false}
    if self._digest != other._digest {return false}
    if self._fileName != other._fileName {return false}
    if self._flags != other._flags {return false}
    if self._width != other._width {return false}
    if self._height != other._height {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

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

extension SignalServiceProtos_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"),
  ]

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

    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
    }
  }

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

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        switch fieldNumber {
        case 1: try decoder.decodeSingularBytesField(value: &_storage._id)
        case 2: try decoder.decodeSingularEnumField(value: &_storage._type)
        case 3: try decoder.decodeSingularStringField(value: &_storage._name)
        case 4: try decoder.decodeRepeatedStringField(value: &_storage._members)
        case 5: try decoder.decodeSingularMessageField(value: &_storage._avatar)
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._id {
        try visitor.visitSingularBytesField(value: v, fieldNumber: 1)
      }
      if let v = _storage._type {
        try visitor.visitSingularEnumField(value: v, fieldNumber: 2)
      }
      if let v = _storage._name {
        try visitor.visitSingularStringField(value: v, fieldNumber: 3)
      }
      if !_storage._members.isEmpty {
        try visitor.visitRepeatedStringField(value: _storage._members, fieldNumber: 4)
      }
      if let v = _storage._avatar {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_GroupContext) -> Bool {
    if _storage !== other._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let other_storage = _args.1
        if _storage._id != other_storage._id {return false}
        if _storage._type != other_storage._type {return false}
        if _storage._name != other_storage._name {return false}
        if _storage._members != other_storage._members {return false}
        if _storage._avatar != other_storage._avatar {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_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"),
  ]
}

extension SignalServiceProtos_ContactDetails: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".ContactDetails"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "number"),
    2: .same(proto: "name"),
    3: .same(proto: "avatar"),
    4: .same(proto: "color"),
    5: .same(proto: "verified"),
    6: .same(proto: "profileKey"),
    7: .same(proto: "blocked"),
    8: .same(proto: "expireTimer"),
  ]

  fileprivate class _StorageClass {
    var _number: String? = nil
    var _name: String? = nil
    var _avatar: SignalServiceProtos_ContactDetails.Avatar? = nil
    var _color: String? = nil
    var _verified: SignalServiceProtos_Verified? = nil
    var _profileKey: Data? = nil
    var _blocked: Bool? = nil
    var _expireTimer: UInt32? = nil

    static let defaultInstance = _StorageClass()

    private init() {}

    init(copying source: _StorageClass) {
      _number = source._number
      _name = source._name
      _avatar = source._avatar
      _color = source._color
      _verified = source._verified
      _profileKey = source._profileKey
      _blocked = source._blocked
      _expireTimer = source._expireTimer
    }
  }

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

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        switch fieldNumber {
        case 1: try decoder.decodeSingularStringField(value: &_storage._number)
        case 2: try decoder.decodeSingularStringField(value: &_storage._name)
        case 3: try decoder.decodeSingularMessageField(value: &_storage._avatar)
        case 4: try decoder.decodeSingularStringField(value: &_storage._color)
        case 5: try decoder.decodeSingularMessageField(value: &_storage._verified)
        case 6: try decoder.decodeSingularBytesField(value: &_storage._profileKey)
        case 7: try decoder.decodeSingularBoolField(value: &_storage._blocked)
        case 8: try decoder.decodeSingularUInt32Field(value: &_storage._expireTimer)
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._number {
        try visitor.visitSingularStringField(value: v, fieldNumber: 1)
      }
      if let v = _storage._name {
        try visitor.visitSingularStringField(value: v, fieldNumber: 2)
      }
      if let v = _storage._avatar {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
      }
      if let v = _storage._color {
        try visitor.visitSingularStringField(value: v, fieldNumber: 4)
      }
      if let v = _storage._verified {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
      }
      if let v = _storage._profileKey {
        try visitor.visitSingularBytesField(value: v, fieldNumber: 6)
      }
      if let v = _storage._blocked {
        try visitor.visitSingularBoolField(value: v, fieldNumber: 7)
      }
      if let v = _storage._expireTimer {
        try visitor.visitSingularUInt32Field(value: v, fieldNumber: 8)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_ContactDetails) -> Bool {
    if _storage !== other._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let other_storage = _args.1
        if _storage._number != other_storage._number {return false}
        if _storage._name != other_storage._name {return false}
        if _storage._avatar != other_storage._avatar {return false}
        if _storage._color != other_storage._color {return false}
        if _storage._verified != other_storage._verified {return false}
        if _storage._profileKey != other_storage._profileKey {return false}
        if _storage._blocked != other_storage._blocked {return false}
        if _storage._expireTimer != other_storage._expireTimer {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_ContactDetails.Avatar: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_ContactDetails.protoMessageName + ".Avatar"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "contentType"),
    2: .same(proto: "length"),
  ]

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

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._contentType {
      try visitor.visitSingularStringField(value: v, fieldNumber: 1)
    }
    if let v = self._length {
      try visitor.visitSingularUInt32Field(value: v, fieldNumber: 2)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_ContactDetails.Avatar) -> Bool {
    if self._contentType != other._contentType {return false}
    if self._length != other._length {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_GroupDetails: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".GroupDetails"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "id"),
    2: .same(proto: "name"),
    3: .same(proto: "members"),
    4: .same(proto: "avatar"),
    5: .same(proto: "active"),
    6: .same(proto: "expireTimer"),
    7: .same(proto: "color"),
  ]

  fileprivate class _StorageClass {
    var _id: Data? = nil
    var _name: String? = nil
    var _members: [String] = []
    var _avatar: SignalServiceProtos_GroupDetails.Avatar? = nil
    var _active: Bool? = nil
    var _expireTimer: UInt32? = nil
    var _color: String? = nil

    static let defaultInstance = _StorageClass()

    private init() {}

    init(copying source: _StorageClass) {
      _id = source._id
      _name = source._name
      _members = source._members
      _avatar = source._avatar
      _active = source._active
      _expireTimer = source._expireTimer
      _color = source._color
    }
  }

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

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        switch fieldNumber {
        case 1: try decoder.decodeSingularBytesField(value: &_storage._id)
        case 2: try decoder.decodeSingularStringField(value: &_storage._name)
        case 3: try decoder.decodeRepeatedStringField(value: &_storage._members)
        case 4: try decoder.decodeSingularMessageField(value: &_storage._avatar)
        case 5: try decoder.decodeSingularBoolField(value: &_storage._active)
        case 6: try decoder.decodeSingularUInt32Field(value: &_storage._expireTimer)
        case 7: try decoder.decodeSingularStringField(value: &_storage._color)
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._id {
        try visitor.visitSingularBytesField(value: v, fieldNumber: 1)
      }
      if let v = _storage._name {
        try visitor.visitSingularStringField(value: v, fieldNumber: 2)
      }
      if !_storage._members.isEmpty {
        try visitor.visitRepeatedStringField(value: _storage._members, fieldNumber: 3)
      }
      if let v = _storage._avatar {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
      }
      if let v = _storage._active {
        try visitor.visitSingularBoolField(value: v, fieldNumber: 5)
      }
      if let v = _storage._expireTimer {
        try visitor.visitSingularUInt32Field(value: v, fieldNumber: 6)
      }
      if let v = _storage._color {
        try visitor.visitSingularStringField(value: v, fieldNumber: 7)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_GroupDetails) -> Bool {
    if _storage !== other._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let other_storage = _args.1
        if _storage._id != other_storage._id {return false}
        if _storage._name != other_storage._name {return false}
        if _storage._members != other_storage._members {return false}
        if _storage._avatar != other_storage._avatar {return false}
        if _storage._active != other_storage._active {return false}
        if _storage._expireTimer != other_storage._expireTimer {return false}
        if _storage._color != other_storage._color {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension SignalServiceProtos_GroupDetails.Avatar: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = SignalServiceProtos_GroupDetails.protoMessageName + ".Avatar"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "contentType"),
    2: .same(proto: "length"),
  ]

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

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._contentType {
      try visitor.visitSingularStringField(value: v, fieldNumber: 1)
    }
    if let v = self._length {
      try visitor.visitSingularUInt32Field(value: v, fieldNumber: 2)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: SignalServiceProtos_GroupDetails.Avatar) -> Bool {
    if self._contentType != other._contentType {return false}
    if self._length != other._length {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}
