error-service.pb.swift 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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: error-service.proto
  7. //
  8. // For information on using the generated types, please see the documentation:
  9. // https://github.com/apple/swift-protobuf/
  10. //
  11. // Copyright 2024, gRPC Authors All rights reserved.
  12. //
  13. // Licensed under the Apache License, Version 2.0 (the "License");
  14. // you may not use this file except in compliance with the License.
  15. // You may obtain a copy of the License at
  16. //
  17. // http://www.apache.org/licenses/LICENSE-2.0
  18. //
  19. // Unless required by applicable law or agreed to in writing, software
  20. // distributed under the License is distributed on an "AS IS" BASIS,
  21. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22. // See the License for the specific language governing permissions and
  23. // limitations under the License.
  24. internal 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 ThrowInput: 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. var kind: String = String()
  39. var unknownFields = SwiftProtobuf.UnknownStorage()
  40. init() {}
  41. }
  42. // MARK: - Code below here is support for the SwiftProtobuf runtime.
  43. extension ThrowInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  44. static let protoMessageName: String = "ThrowInput"
  45. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  46. 1: .same(proto: "kind"),
  47. ]
  48. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  49. while let fieldNumber = try decoder.nextFieldNumber() {
  50. // The use of inline closures is to circumvent an issue where the compiler
  51. // allocates stack space for every case branch when no optimizations are
  52. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  53. switch fieldNumber {
  54. case 1: try { try decoder.decodeSingularStringField(value: &self.kind) }()
  55. default: break
  56. }
  57. }
  58. }
  59. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  60. if !self.kind.isEmpty {
  61. try visitor.visitSingularStringField(value: self.kind, fieldNumber: 1)
  62. }
  63. try unknownFields.traverse(visitor: &visitor)
  64. }
  65. static func ==(lhs: ThrowInput, rhs: ThrowInput) -> Bool {
  66. if lhs.kind != rhs.kind {return false}
  67. if lhs.unknownFields != rhs.unknownFields {return false}
  68. return true
  69. }
  70. }