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

import Foundation
import SwiftProtobuf

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

/// Packet with associated tunnel info (Windows pipe to mitmproxy)
struct MitmproxyIpc_PacketWithMeta: @unchecked Sendable {
  // 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 data: Data = Data()

  var tunnelInfo: MitmproxyIpc_TunnelInfo {
    get {return _tunnelInfo ?? MitmproxyIpc_TunnelInfo()}
    set {_tunnelInfo = newValue}
  }
  /// Returns true if `tunnelInfo` has been explicitly set.
  var hasTunnelInfo: Bool {return self._tunnelInfo != nil}
  /// Clears the value of `tunnelInfo`. Subsequent reads from it will return its default value.
  mutating func clearTunnelInfo() {self._tunnelInfo = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}

  fileprivate var _tunnelInfo: MitmproxyIpc_TunnelInfo? = nil
}

struct MitmproxyIpc_TunnelInfo: Sendable {
  // 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 pid: UInt32 = 0

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

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}

  fileprivate var _processName: String? = nil
}

/// Packet or intercept spec (Windows pipe to redirector)
struct MitmproxyIpc_FromProxy: Sendable {
  // 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 message: MitmproxyIpc_FromProxy.OneOf_Message? = nil

  var packet: MitmproxyIpc_Packet {
    get {
      if case .packet(let v)? = message {return v}
      return MitmproxyIpc_Packet()
    }
    set {message = .packet(newValue)}
  }

  var interceptConf: MitmproxyIpc_InterceptConf {
    get {
      if case .interceptConf(let v)? = message {return v}
      return MitmproxyIpc_InterceptConf()
    }
    set {message = .interceptConf(newValue)}
  }

  var unknownFields = SwiftProtobuf.UnknownStorage()

  enum OneOf_Message: Equatable, Sendable {
    case packet(MitmproxyIpc_Packet)
    case interceptConf(MitmproxyIpc_InterceptConf)

  }

  init() {}
}

/// Packet (macOS UDP Stream)
struct MitmproxyIpc_Packet: @unchecked Sendable {
  // 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 data: Data = Data()

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}
}

/// Intercept conf (macOS Control Stream)
struct MitmproxyIpc_InterceptConf: Sendable {
  // 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 `default`: Bool = false

  var actions: [String] = []

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}
}

/// New flow (macOS TCP/UDP Stream)
struct MitmproxyIpc_NewFlow: Sendable {
  // 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 message: MitmproxyIpc_NewFlow.OneOf_Message? = nil

  var tcp: MitmproxyIpc_TcpFlow {
    get {
      if case .tcp(let v)? = message {return v}
      return MitmproxyIpc_TcpFlow()
    }
    set {message = .tcp(newValue)}
  }

  var udp: MitmproxyIpc_UdpFlow {
    get {
      if case .udp(let v)? = message {return v}
      return MitmproxyIpc_UdpFlow()
    }
    set {message = .udp(newValue)}
  }

  var unknownFields = SwiftProtobuf.UnknownStorage()

  enum OneOf_Message: Equatable, Sendable {
    case tcp(MitmproxyIpc_TcpFlow)
    case udp(MitmproxyIpc_UdpFlow)

  }

  init() {}
}

struct MitmproxyIpc_TcpFlow: Sendable {
  // 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 remoteAddress: MitmproxyIpc_Address {
    get {return _remoteAddress ?? MitmproxyIpc_Address()}
    set {_remoteAddress = newValue}
  }
  /// Returns true if `remoteAddress` has been explicitly set.
  var hasRemoteAddress: Bool {return self._remoteAddress != nil}
  /// Clears the value of `remoteAddress`. Subsequent reads from it will return its default value.
  mutating func clearRemoteAddress() {self._remoteAddress = nil}

  var tunnelInfo: MitmproxyIpc_TunnelInfo {
    get {return _tunnelInfo ?? MitmproxyIpc_TunnelInfo()}
    set {_tunnelInfo = newValue}
  }
  /// Returns true if `tunnelInfo` has been explicitly set.
  var hasTunnelInfo: Bool {return self._tunnelInfo != nil}
  /// Clears the value of `tunnelInfo`. Subsequent reads from it will return its default value.
  mutating func clearTunnelInfo() {self._tunnelInfo = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}

  fileprivate var _remoteAddress: MitmproxyIpc_Address? = nil
  fileprivate var _tunnelInfo: MitmproxyIpc_TunnelInfo? = nil
}

struct MitmproxyIpc_UdpFlow: Sendable {
  // 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 localAddress: MitmproxyIpc_Address {
    get {return _localAddress ?? MitmproxyIpc_Address()}
    set {_localAddress = newValue}
  }
  /// Returns true if `localAddress` has been explicitly set.
  var hasLocalAddress: Bool {return self._localAddress != nil}
  /// Clears the value of `localAddress`. Subsequent reads from it will return its default value.
  mutating func clearLocalAddress() {self._localAddress = nil}

  var tunnelInfo: MitmproxyIpc_TunnelInfo {
    get {return _tunnelInfo ?? MitmproxyIpc_TunnelInfo()}
    set {_tunnelInfo = newValue}
  }
  /// Returns true if `tunnelInfo` has been explicitly set.
  var hasTunnelInfo: Bool {return self._tunnelInfo != nil}
  /// Clears the value of `tunnelInfo`. Subsequent reads from it will return its default value.
  mutating func clearTunnelInfo() {self._tunnelInfo = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}

  fileprivate var _localAddress: MitmproxyIpc_Address? = nil
  fileprivate var _tunnelInfo: MitmproxyIpc_TunnelInfo? = nil
}

struct MitmproxyIpc_UdpPacket: @unchecked Sendable {
  // 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 data: Data = Data()

  var remoteAddress: MitmproxyIpc_Address {
    get {return _remoteAddress ?? MitmproxyIpc_Address()}
    set {_remoteAddress = newValue}
  }
  /// Returns true if `remoteAddress` has been explicitly set.
  var hasRemoteAddress: Bool {return self._remoteAddress != nil}
  /// Clears the value of `remoteAddress`. Subsequent reads from it will return its default value.
  mutating func clearRemoteAddress() {self._remoteAddress = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}

  fileprivate var _remoteAddress: MitmproxyIpc_Address? = nil
}

struct MitmproxyIpc_Address: Sendable {
  // 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 host: String = String()

  var port: UInt32 = 0

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}
}

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

fileprivate let _protobuf_package = "mitmproxy_ipc"

extension MitmproxyIpc_PacketWithMeta: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".PacketWithMeta"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "data"),
    2: .standard(proto: "tunnel_info"),
  ]

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

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

  static func ==(lhs: MitmproxyIpc_PacketWithMeta, rhs: MitmproxyIpc_PacketWithMeta) -> Bool {
    if lhs.data != rhs.data {return false}
    if lhs._tunnelInfo != rhs._tunnelInfo {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension MitmproxyIpc_TunnelInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".TunnelInfo"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "pid"),
    2: .standard(proto: "process_name"),
  ]

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

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

  static func ==(lhs: MitmproxyIpc_TunnelInfo, rhs: MitmproxyIpc_TunnelInfo) -> Bool {
    if lhs.pid != rhs.pid {return false}
    if lhs._processName != rhs._processName {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension MitmproxyIpc_FromProxy: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".FromProxy"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "packet"),
    2: .standard(proto: "intercept_conf"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try {
        var v: MitmproxyIpc_Packet?
        var hadOneofValue = false
        if let current = self.message {
          hadOneofValue = true
          if case .packet(let m) = current {v = m}
        }
        try decoder.decodeSingularMessageField(value: &v)
        if let v = v {
          if hadOneofValue {try decoder.handleConflictingOneOf()}
          self.message = .packet(v)
        }
      }()
      case 2: try {
        var v: MitmproxyIpc_InterceptConf?
        var hadOneofValue = false
        if let current = self.message {
          hadOneofValue = true
          if case .interceptConf(let m) = current {v = m}
        }
        try decoder.decodeSingularMessageField(value: &v)
        if let v = v {
          if hadOneofValue {try decoder.handleConflictingOneOf()}
          self.message = .interceptConf(v)
        }
      }()
      default: break
      }
    }
  }

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

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

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

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

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

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

extension MitmproxyIpc_InterceptConf: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".InterceptConf"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "default"),
    2: .same(proto: "actions"),
  ]

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

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if self.`default` != false {
      try visitor.visitSingularBoolField(value: self.`default`, fieldNumber: 1)
    }
    if !self.actions.isEmpty {
      try visitor.visitRepeatedStringField(value: self.actions, fieldNumber: 2)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: MitmproxyIpc_InterceptConf, rhs: MitmproxyIpc_InterceptConf) -> Bool {
    if lhs.`default` != rhs.`default` {return false}
    if lhs.actions != rhs.actions {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension MitmproxyIpc_NewFlow: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".NewFlow"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "tcp"),
    2: .same(proto: "udp"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      // The use of inline closures is to circumvent an issue where the compiler
      // allocates stack space for every case branch when no optimizations are
      // enabled. https://github.com/apple/swift-protobuf/issues/1034
      switch fieldNumber {
      case 1: try {
        var v: MitmproxyIpc_TcpFlow?
        var hadOneofValue = false
        if let current = self.message {
          hadOneofValue = true
          if case .tcp(let m) = current {v = m}
        }
        try decoder.decodeSingularMessageField(value: &v)
        if let v = v {
          if hadOneofValue {try decoder.handleConflictingOneOf()}
          self.message = .tcp(v)
        }
      }()
      case 2: try {
        var v: MitmproxyIpc_UdpFlow?
        var hadOneofValue = false
        if let current = self.message {
          hadOneofValue = true
          if case .udp(let m) = current {v = m}
        }
        try decoder.decodeSingularMessageField(value: &v)
        if let v = v {
          if hadOneofValue {try decoder.handleConflictingOneOf()}
          self.message = .udp(v)
        }
      }()
      default: break
      }
    }
  }

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

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

extension MitmproxyIpc_TcpFlow: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".TcpFlow"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .standard(proto: "remote_address"),
    2: .standard(proto: "tunnel_info"),
  ]

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

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

  static func ==(lhs: MitmproxyIpc_TcpFlow, rhs: MitmproxyIpc_TcpFlow) -> Bool {
    if lhs._remoteAddress != rhs._remoteAddress {return false}
    if lhs._tunnelInfo != rhs._tunnelInfo {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension MitmproxyIpc_UdpFlow: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".UdpFlow"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .standard(proto: "local_address"),
    3: .standard(proto: "tunnel_info"),
  ]

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

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

  static func ==(lhs: MitmproxyIpc_UdpFlow, rhs: MitmproxyIpc_UdpFlow) -> Bool {
    if lhs._localAddress != rhs._localAddress {return false}
    if lhs._tunnelInfo != rhs._tunnelInfo {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension MitmproxyIpc_UdpPacket: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".UdpPacket"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "data"),
    2: .standard(proto: "remote_address"),
  ]

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

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

  static func ==(lhs: MitmproxyIpc_UdpPacket, rhs: MitmproxyIpc_UdpPacket) -> Bool {
    if lhs.data != rhs.data {return false}
    if lhs._remoteAddress != rhs._remoteAddress {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension MitmproxyIpc_Address: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".Address"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "host"),
    2: .same(proto: "port"),
  ]

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

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if !self.host.isEmpty {
      try visitor.visitSingularStringField(value: self.host, fieldNumber: 1)
    }
    if self.port != 0 {
      try visitor.visitSingularUInt32Field(value: self.port, fieldNumber: 2)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: MitmproxyIpc_Address, rhs: MitmproxyIpc_Address) -> Bool {
    if lhs.host != rhs.host {return false}
    if lhs.port != rhs.port {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}
