XYOracleNetwork/sdk-ble-flutter

View on GitHub
ios/Classes/protos/bound_witness.pb.swift

Summary

Maintainability
C
7 hrs
Test Coverage
// DO NOT EDIT.
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: protos/bound_witness.proto
//
// For information on using the generated types, please see the documenation:
//   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 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 DeviceBoundWitnessList {
  // 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 boundWitnesses: [DeviceBoundWitness] = []

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}
}

struct DeviceBoundWitness {
  // 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 bytes: String = String()

  var byteHash: String = String()

  var humanName: String = String()

  var huerestics: Dictionary<String,String> = [:]

  var parties: [String] = []

  var linked: Bool = false

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}
}

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

extension DeviceBoundWitnessList: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = "DeviceBoundWitnessList"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .standard(proto: "bound_witnesses"),
  ]

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

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

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

extension DeviceBoundWitness: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = "DeviceBoundWitness"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "bytes"),
    2: .standard(proto: "byte_hash"),
    3: .standard(proto: "human_name"),
    4: .same(proto: "huerestics"),
    5: .same(proto: "parties"),
    6: .same(proto: "linked"),
  ]

  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.bytes)
      case 2: try decoder.decodeSingularStringField(value: &self.byteHash)
      case 3: try decoder.decodeSingularStringField(value: &self.humanName)
      case 4: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: &self.huerestics)
      case 5: try decoder.decodeRepeatedStringField(value: &self.parties)
      case 6: try decoder.decodeSingularBoolField(value: &self.linked)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if !self.bytes.isEmpty {
      try visitor.visitSingularStringField(value: self.bytes, fieldNumber: 1)
    }
    if !self.byteHash.isEmpty {
      try visitor.visitSingularStringField(value: self.byteHash, fieldNumber: 2)
    }
    if !self.humanName.isEmpty {
      try visitor.visitSingularStringField(value: self.humanName, fieldNumber: 3)
    }
    if !self.huerestics.isEmpty {
      try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: self.huerestics, fieldNumber: 4)
    }
    if !self.parties.isEmpty {
      try visitor.visitRepeatedStringField(value: self.parties, fieldNumber: 5)
    }
    if self.linked != false {
      try visitor.visitSingularBoolField(value: self.linked, fieldNumber: 6)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: DeviceBoundWitness, rhs: DeviceBoundWitness) -> Bool {
    if lhs.bytes != rhs.bytes {return false}
    if lhs.byteHash != rhs.byteHash {return false}
    if lhs.humanName != rhs.humanName {return false}
    if lhs.huerestics != rhs.huerestics {return false}
    if lhs.parties != rhs.parties {return false}
    if lhs.linked != rhs.linked {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}