2
0

normalization.pb.swift 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // DO NOT EDIT.
  2. // swift-format-ignore-file
  3. // swiftlint:disable all
  4. //
  5. // Generated by the Swift generator plugin for the protocol buffer compiler.
  6. // Source: normalization.proto
  7. //
  8. // For information on using the generated types, please see the documentation:
  9. // https://github.com/apple/swift-protobuf/
  10. // Copyright 2021 gRPC authors.
  11. //
  12. // Licensed under the Apache License, Version 2.0 (the "License");
  13. // you may not use this file except in compliance with the License.
  14. // You may obtain a copy of the License at
  15. //
  16. // http://www.apache.org/licenses/LICENSE-2.0
  17. //
  18. // Unless required by applicable law or agreed to in writing, software
  19. // distributed under the License is distributed on an "AS IS" BASIS,
  20. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  21. // See the License for the specific language governing permissions and
  22. // limitations under the License.
  23. import Foundation
  24. import SwiftProtobuf
  25. // If the compiler emits an error on this type, it is because this file
  26. // was generated by a version of the `protoc` Swift plug-in that is
  27. // incompatible with the version of SwiftProtobuf to which you are linking.
  28. // Please ensure that you are building against the same version of the API
  29. // that was used to generate this file.
  30. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
  31. struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
  32. typealias Version = _2
  33. }
  34. struct Normalization_FunctionName: Sendable {
  35. // SwiftProtobuf.Message conformance is added in an extension below. See the
  36. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  37. // methods supported on all messages.
  38. /// The name of the invoked function.
  39. var functionName: String = String()
  40. var unknownFields = SwiftProtobuf.UnknownStorage()
  41. init() {}
  42. }
  43. // MARK: - Code below here is support for the SwiftProtobuf runtime.
  44. fileprivate let _protobuf_package = "normalization"
  45. extension Normalization_FunctionName: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  46. static let protoMessageName: String = _protobuf_package + ".FunctionName"
  47. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  48. 1: .same(proto: "functionName"),
  49. ]
  50. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  51. while let fieldNumber = try decoder.nextFieldNumber() {
  52. // The use of inline closures is to circumvent an issue where the compiler
  53. // allocates stack space for every case branch when no optimizations are
  54. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  55. switch fieldNumber {
  56. case 1: try { try decoder.decodeSingularStringField(value: &self.functionName) }()
  57. default: break
  58. }
  59. }
  60. }
  61. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  62. if !self.functionName.isEmpty {
  63. try visitor.visitSingularStringField(value: self.functionName, fieldNumber: 1)
  64. }
  65. try unknownFields.traverse(visitor: &visitor)
  66. }
  67. static func ==(lhs: Normalization_FunctionName, rhs: Normalization_FunctionName) -> Bool {
  68. if lhs.functionName != rhs.functionName {return false}
  69. if lhs.unknownFields != rhs.unknownFields {return false}
  70. return true
  71. }
  72. }