plugin.pb.swift 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  1. // DO NOT EDIT.
  2. // swift-format-ignore-file
  3. //
  4. // Generated by the Swift generator plugin for the protocol buffer compiler.
  5. // Source: google/protobuf/compiler/plugin.proto
  6. //
  7. // For information on using the generated types, please see the documentation:
  8. // https://github.com/apple/swift-protobuf/
  9. // Protocol Buffers - Google's data interchange format
  10. // Copyright 2008 Google Inc. All rights reserved.
  11. //
  12. // Use of this source code is governed by a BSD-style
  13. // license that can be found in the LICENSE file or at
  14. // https://developers.google.com/open-source/licenses/bsd
  15. // Author: kenton@google.com (Kenton Varda)
  16. //
  17. // protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is
  18. // just a program that reads a CodeGeneratorRequest from stdin and writes a
  19. // CodeGeneratorResponse to stdout.
  20. //
  21. // Plugins written using C++ can use google/protobuf/compiler/plugin.h instead
  22. // of dealing with the raw protocol defined here.
  23. //
  24. // A plugin executable needs only to be placed somewhere in the path. The
  25. // plugin should be named "protoc-gen-$NAME", and will then be used when the
  26. // flag "--${NAME}_out" is passed to protoc.
  27. import Foundation
  28. import SwiftProtobuf
  29. // If the compiler emits an error on this type, it is because this file
  30. // was generated by a version of the `protoc` Swift plug-in that is
  31. // incompatible with the version of SwiftProtobuf to which you are linking.
  32. // Please ensure that you are building against the same version of the API
  33. // that was used to generate this file.
  34. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
  35. struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
  36. typealias Version = _2
  37. }
  38. /// The version number of protocol compiler.
  39. public struct Google_Protobuf_Compiler_Version {
  40. // SwiftProtobuf.Message conformance is added in an extension below. See the
  41. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  42. // methods supported on all messages.
  43. public var major: Int32 {
  44. get {return _major ?? 0}
  45. set {_major = newValue}
  46. }
  47. /// Returns true if `major` has been explicitly set.
  48. public var hasMajor: Bool {return self._major != nil}
  49. /// Clears the value of `major`. Subsequent reads from it will return its default value.
  50. public mutating func clearMajor() {self._major = nil}
  51. public var minor: Int32 {
  52. get {return _minor ?? 0}
  53. set {_minor = newValue}
  54. }
  55. /// Returns true if `minor` has been explicitly set.
  56. public var hasMinor: Bool {return self._minor != nil}
  57. /// Clears the value of `minor`. Subsequent reads from it will return its default value.
  58. public mutating func clearMinor() {self._minor = nil}
  59. public var patch: Int32 {
  60. get {return _patch ?? 0}
  61. set {_patch = newValue}
  62. }
  63. /// Returns true if `patch` has been explicitly set.
  64. public var hasPatch: Bool {return self._patch != nil}
  65. /// Clears the value of `patch`. Subsequent reads from it will return its default value.
  66. public mutating func clearPatch() {self._patch = nil}
  67. /// A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
  68. /// be empty for mainline stable releases.
  69. public var suffix: String {
  70. get {return _suffix ?? String()}
  71. set {_suffix = newValue}
  72. }
  73. /// Returns true if `suffix` has been explicitly set.
  74. public var hasSuffix: Bool {return self._suffix != nil}
  75. /// Clears the value of `suffix`. Subsequent reads from it will return its default value.
  76. public mutating func clearSuffix() {self._suffix = nil}
  77. public var unknownFields = SwiftProtobuf.UnknownStorage()
  78. public init() {}
  79. fileprivate var _major: Int32? = nil
  80. fileprivate var _minor: Int32? = nil
  81. fileprivate var _patch: Int32? = nil
  82. fileprivate var _suffix: String? = nil
  83. }
  84. /// An encoded CodeGeneratorRequest is written to the plugin's stdin.
  85. public struct Google_Protobuf_Compiler_CodeGeneratorRequest {
  86. // SwiftProtobuf.Message conformance is added in an extension below. See the
  87. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  88. // methods supported on all messages.
  89. /// The .proto files that were explicitly listed on the command-line. The
  90. /// code generator should generate code only for these files. Each file's
  91. /// descriptor will be included in proto_file, below.
  92. public var fileToGenerate: [String] = []
  93. /// The generator parameter passed on the command-line.
  94. public var parameter: String {
  95. get {return _parameter ?? String()}
  96. set {_parameter = newValue}
  97. }
  98. /// Returns true if `parameter` has been explicitly set.
  99. public var hasParameter: Bool {return self._parameter != nil}
  100. /// Clears the value of `parameter`. Subsequent reads from it will return its default value.
  101. public mutating func clearParameter() {self._parameter = nil}
  102. /// FileDescriptorProtos for all files in files_to_generate and everything
  103. /// they import. The files will appear in topological order, so each file
  104. /// appears before any file that imports it.
  105. ///
  106. /// Note: the files listed in files_to_generate will include runtime-retention
  107. /// options only, but all other files will include source-retention options.
  108. /// The source_file_descriptors field below is available in case you need
  109. /// source-retention options for files_to_generate.
  110. ///
  111. /// protoc guarantees that all proto_files will be written after
  112. /// the fields above, even though this is not technically guaranteed by the
  113. /// protobuf wire format. This theoretically could allow a plugin to stream
  114. /// in the FileDescriptorProtos and handle them one by one rather than read
  115. /// the entire set into memory at once. However, as of this writing, this
  116. /// is not similarly optimized on protoc's end -- it will store all fields in
  117. /// memory at once before sending them to the plugin.
  118. ///
  119. /// Type names of fields and extensions in the FileDescriptorProto are always
  120. /// fully qualified.
  121. public var protoFile: [SwiftProtobuf.Google_Protobuf_FileDescriptorProto] = []
  122. /// File descriptors with all options, including source-retention options.
  123. /// These descriptors are only provided for the files listed in
  124. /// files_to_generate.
  125. public var sourceFileDescriptors: [SwiftProtobuf.Google_Protobuf_FileDescriptorProto] = []
  126. /// The version number of protocol compiler.
  127. public var compilerVersion: Google_Protobuf_Compiler_Version {
  128. get {return _compilerVersion ?? Google_Protobuf_Compiler_Version()}
  129. set {_compilerVersion = newValue}
  130. }
  131. /// Returns true if `compilerVersion` has been explicitly set.
  132. public var hasCompilerVersion: Bool {return self._compilerVersion != nil}
  133. /// Clears the value of `compilerVersion`. Subsequent reads from it will return its default value.
  134. public mutating func clearCompilerVersion() {self._compilerVersion = nil}
  135. public var unknownFields = SwiftProtobuf.UnknownStorage()
  136. public init() {}
  137. fileprivate var _parameter: String? = nil
  138. fileprivate var _compilerVersion: Google_Protobuf_Compiler_Version? = nil
  139. }
  140. /// The plugin writes an encoded CodeGeneratorResponse to stdout.
  141. public struct Google_Protobuf_Compiler_CodeGeneratorResponse {
  142. // SwiftProtobuf.Message conformance is added in an extension below. See the
  143. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  144. // methods supported on all messages.
  145. /// Error message. If non-empty, code generation failed. The plugin process
  146. /// should exit with status code zero even if it reports an error in this way.
  147. ///
  148. /// This should be used to indicate errors in .proto files which prevent the
  149. /// code generator from generating correct code. Errors which indicate a
  150. /// problem in protoc itself -- such as the input CodeGeneratorRequest being
  151. /// unparseable -- should be reported by writing a message to stderr and
  152. /// exiting with a non-zero status code.
  153. public var error: String {
  154. get {return _error ?? String()}
  155. set {_error = newValue}
  156. }
  157. /// Returns true if `error` has been explicitly set.
  158. public var hasError: Bool {return self._error != nil}
  159. /// Clears the value of `error`. Subsequent reads from it will return its default value.
  160. public mutating func clearError() {self._error = nil}
  161. /// A bitmask of supported features that the code generator supports.
  162. /// This is a bitwise "or" of values from the Feature enum.
  163. public var supportedFeatures: UInt64 {
  164. get {return _supportedFeatures ?? 0}
  165. set {_supportedFeatures = newValue}
  166. }
  167. /// Returns true if `supportedFeatures` has been explicitly set.
  168. public var hasSupportedFeatures: Bool {return self._supportedFeatures != nil}
  169. /// Clears the value of `supportedFeatures`. Subsequent reads from it will return its default value.
  170. public mutating func clearSupportedFeatures() {self._supportedFeatures = nil}
  171. /// The minimum edition this plugin supports. This will be treated as an
  172. /// Edition enum, but we want to allow unknown values. It should be specified
  173. /// according the edition enum value, *not* the edition number. Only takes
  174. /// effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
  175. public var minimumEdition: Int32 {
  176. get {return _minimumEdition ?? 0}
  177. set {_minimumEdition = newValue}
  178. }
  179. /// Returns true if `minimumEdition` has been explicitly set.
  180. public var hasMinimumEdition: Bool {return self._minimumEdition != nil}
  181. /// Clears the value of `minimumEdition`. Subsequent reads from it will return its default value.
  182. public mutating func clearMinimumEdition() {self._minimumEdition = nil}
  183. /// The maximum edition this plugin supports. This will be treated as an
  184. /// Edition enum, but we want to allow unknown values. It should be specified
  185. /// according the edition enum value, *not* the edition number. Only takes
  186. /// effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
  187. public var maximumEdition: Int32 {
  188. get {return _maximumEdition ?? 0}
  189. set {_maximumEdition = newValue}
  190. }
  191. /// Returns true if `maximumEdition` has been explicitly set.
  192. public var hasMaximumEdition: Bool {return self._maximumEdition != nil}
  193. /// Clears the value of `maximumEdition`. Subsequent reads from it will return its default value.
  194. public mutating func clearMaximumEdition() {self._maximumEdition = nil}
  195. public var file: [Google_Protobuf_Compiler_CodeGeneratorResponse.File] = []
  196. public var unknownFields = SwiftProtobuf.UnknownStorage()
  197. /// Sync with code_generator.h.
  198. public enum Feature: SwiftProtobuf.Enum {
  199. public typealias RawValue = Int
  200. case none // = 0
  201. case proto3Optional // = 1
  202. case supportsEditions // = 2
  203. public init() {
  204. self = .none
  205. }
  206. public init?(rawValue: Int) {
  207. switch rawValue {
  208. case 0: self = .none
  209. case 1: self = .proto3Optional
  210. case 2: self = .supportsEditions
  211. default: return nil
  212. }
  213. }
  214. public var rawValue: Int {
  215. switch self {
  216. case .none: return 0
  217. case .proto3Optional: return 1
  218. case .supportsEditions: return 2
  219. }
  220. }
  221. }
  222. /// Represents a single generated file.
  223. public struct File {
  224. // SwiftProtobuf.Message conformance is added in an extension below. See the
  225. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  226. // methods supported on all messages.
  227. /// The file name, relative to the output directory. The name must not
  228. /// contain "." or ".." components and must be relative, not be absolute (so,
  229. /// the file cannot lie outside the output directory). "/" must be used as
  230. /// the path separator, not "\".
  231. ///
  232. /// If the name is omitted, the content will be appended to the previous
  233. /// file. This allows the generator to break large files into small chunks,
  234. /// and allows the generated text to be streamed back to protoc so that large
  235. /// files need not reside completely in memory at one time. Note that as of
  236. /// this writing protoc does not optimize for this -- it will read the entire
  237. /// CodeGeneratorResponse before writing files to disk.
  238. public var name: String {
  239. get {return _name ?? String()}
  240. set {_name = newValue}
  241. }
  242. /// Returns true if `name` has been explicitly set.
  243. public var hasName: Bool {return self._name != nil}
  244. /// Clears the value of `name`. Subsequent reads from it will return its default value.
  245. public mutating func clearName() {self._name = nil}
  246. /// If non-empty, indicates that the named file should already exist, and the
  247. /// content here is to be inserted into that file at a defined insertion
  248. /// point. This feature allows a code generator to extend the output
  249. /// produced by another code generator. The original generator may provide
  250. /// insertion points by placing special annotations in the file that look
  251. /// like:
  252. /// @@protoc_insertion_point(NAME)
  253. /// The annotation can have arbitrary text before and after it on the line,
  254. /// which allows it to be placed in a comment. NAME should be replaced with
  255. /// an identifier naming the point -- this is what other generators will use
  256. /// as the insertion_point. Code inserted at this point will be placed
  257. /// immediately above the line containing the insertion point (thus multiple
  258. /// insertions to the same point will come out in the order they were added).
  259. /// The double-@ is intended to make it unlikely that the generated code
  260. /// could contain things that look like insertion points by accident.
  261. ///
  262. /// For example, the C++ code generator places the following line in the
  263. /// .pb.h files that it generates:
  264. /// // @@protoc_insertion_point(namespace_scope)
  265. /// This line appears within the scope of the file's package namespace, but
  266. /// outside of any particular class. Another plugin can then specify the
  267. /// insertion_point "namespace_scope" to generate additional classes or
  268. /// other declarations that should be placed in this scope.
  269. ///
  270. /// Note that if the line containing the insertion point begins with
  271. /// whitespace, the same whitespace will be added to every line of the
  272. /// inserted text. This is useful for languages like Python, where
  273. /// indentation matters. In these languages, the insertion point comment
  274. /// should be indented the same amount as any inserted code will need to be
  275. /// in order to work correctly in that context.
  276. ///
  277. /// The code generator that generates the initial file and the one which
  278. /// inserts into it must both run as part of a single invocation of protoc.
  279. /// Code generators are executed in the order in which they appear on the
  280. /// command line.
  281. ///
  282. /// If |insertion_point| is present, |name| must also be present.
  283. public var insertionPoint: String {
  284. get {return _insertionPoint ?? String()}
  285. set {_insertionPoint = newValue}
  286. }
  287. /// Returns true if `insertionPoint` has been explicitly set.
  288. public var hasInsertionPoint: Bool {return self._insertionPoint != nil}
  289. /// Clears the value of `insertionPoint`. Subsequent reads from it will return its default value.
  290. public mutating func clearInsertionPoint() {self._insertionPoint = nil}
  291. /// The file contents.
  292. public var content: String {
  293. get {return _content ?? String()}
  294. set {_content = newValue}
  295. }
  296. /// Returns true if `content` has been explicitly set.
  297. public var hasContent: Bool {return self._content != nil}
  298. /// Clears the value of `content`. Subsequent reads from it will return its default value.
  299. public mutating func clearContent() {self._content = nil}
  300. /// Information describing the file content being inserted. If an insertion
  301. /// point is used, this information will be appropriately offset and inserted
  302. /// into the code generation metadata for the generated files.
  303. public var generatedCodeInfo: SwiftProtobuf.Google_Protobuf_GeneratedCodeInfo {
  304. get {return _generatedCodeInfo ?? SwiftProtobuf.Google_Protobuf_GeneratedCodeInfo()}
  305. set {_generatedCodeInfo = newValue}
  306. }
  307. /// Returns true if `generatedCodeInfo` has been explicitly set.
  308. public var hasGeneratedCodeInfo: Bool {return self._generatedCodeInfo != nil}
  309. /// Clears the value of `generatedCodeInfo`. Subsequent reads from it will return its default value.
  310. public mutating func clearGeneratedCodeInfo() {self._generatedCodeInfo = nil}
  311. public var unknownFields = SwiftProtobuf.UnknownStorage()
  312. public init() {}
  313. fileprivate var _name: String? = nil
  314. fileprivate var _insertionPoint: String? = nil
  315. fileprivate var _content: String? = nil
  316. fileprivate var _generatedCodeInfo: SwiftProtobuf.Google_Protobuf_GeneratedCodeInfo? = nil
  317. }
  318. public init() {}
  319. fileprivate var _error: String? = nil
  320. fileprivate var _supportedFeatures: UInt64? = nil
  321. fileprivate var _minimumEdition: Int32? = nil
  322. fileprivate var _maximumEdition: Int32? = nil
  323. }
  324. #if swift(>=4.2)
  325. extension Google_Protobuf_Compiler_CodeGeneratorResponse.Feature: CaseIterable {
  326. // Support synthesized by the compiler.
  327. }
  328. #endif // swift(>=4.2)
  329. #if swift(>=5.5) && canImport(_Concurrency)
  330. extension Google_Protobuf_Compiler_Version: @unchecked Sendable {}
  331. extension Google_Protobuf_Compiler_CodeGeneratorRequest: @unchecked Sendable {}
  332. extension Google_Protobuf_Compiler_CodeGeneratorResponse: @unchecked Sendable {}
  333. extension Google_Protobuf_Compiler_CodeGeneratorResponse.Feature: @unchecked Sendable {}
  334. extension Google_Protobuf_Compiler_CodeGeneratorResponse.File: @unchecked Sendable {}
  335. #endif // swift(>=5.5) && canImport(_Concurrency)
  336. // MARK: - Code below here is support for the SwiftProtobuf runtime.
  337. fileprivate let _protobuf_package = "google.protobuf.compiler"
  338. extension Google_Protobuf_Compiler_Version: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  339. public static let protoMessageName: String = _protobuf_package + ".Version"
  340. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  341. 1: .same(proto: "major"),
  342. 2: .same(proto: "minor"),
  343. 3: .same(proto: "patch"),
  344. 4: .same(proto: "suffix"),
  345. ]
  346. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  347. while let fieldNumber = try decoder.nextFieldNumber() {
  348. // The use of inline closures is to circumvent an issue where the compiler
  349. // allocates stack space for every case branch when no optimizations are
  350. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  351. switch fieldNumber {
  352. case 1: try { try decoder.decodeSingularInt32Field(value: &self._major) }()
  353. case 2: try { try decoder.decodeSingularInt32Field(value: &self._minor) }()
  354. case 3: try { try decoder.decodeSingularInt32Field(value: &self._patch) }()
  355. case 4: try { try decoder.decodeSingularStringField(value: &self._suffix) }()
  356. default: break
  357. }
  358. }
  359. }
  360. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  361. // The use of inline closures is to circumvent an issue where the compiler
  362. // allocates stack space for every if/case branch local when no optimizations
  363. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  364. // https://github.com/apple/swift-protobuf/issues/1182
  365. try { if let v = self._major {
  366. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  367. } }()
  368. try { if let v = self._minor {
  369. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  370. } }()
  371. try { if let v = self._patch {
  372. try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
  373. } }()
  374. try { if let v = self._suffix {
  375. try visitor.visitSingularStringField(value: v, fieldNumber: 4)
  376. } }()
  377. try unknownFields.traverse(visitor: &visitor)
  378. }
  379. public static func ==(lhs: Google_Protobuf_Compiler_Version, rhs: Google_Protobuf_Compiler_Version) -> Bool {
  380. if lhs._major != rhs._major {return false}
  381. if lhs._minor != rhs._minor {return false}
  382. if lhs._patch != rhs._patch {return false}
  383. if lhs._suffix != rhs._suffix {return false}
  384. if lhs.unknownFields != rhs.unknownFields {return false}
  385. return true
  386. }
  387. }
  388. extension Google_Protobuf_Compiler_CodeGeneratorRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  389. public static let protoMessageName: String = _protobuf_package + ".CodeGeneratorRequest"
  390. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  391. 1: .standard(proto: "file_to_generate"),
  392. 2: .same(proto: "parameter"),
  393. 15: .standard(proto: "proto_file"),
  394. 17: .standard(proto: "source_file_descriptors"),
  395. 3: .standard(proto: "compiler_version"),
  396. ]
  397. public var isInitialized: Bool {
  398. if !SwiftProtobuf.Internal.areAllInitialized(self.protoFile) {return false}
  399. if !SwiftProtobuf.Internal.areAllInitialized(self.sourceFileDescriptors) {return false}
  400. return true
  401. }
  402. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  403. while let fieldNumber = try decoder.nextFieldNumber() {
  404. // The use of inline closures is to circumvent an issue where the compiler
  405. // allocates stack space for every case branch when no optimizations are
  406. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  407. switch fieldNumber {
  408. case 1: try { try decoder.decodeRepeatedStringField(value: &self.fileToGenerate) }()
  409. case 2: try { try decoder.decodeSingularStringField(value: &self._parameter) }()
  410. case 3: try { try decoder.decodeSingularMessageField(value: &self._compilerVersion) }()
  411. case 15: try { try decoder.decodeRepeatedMessageField(value: &self.protoFile) }()
  412. case 17: try { try decoder.decodeRepeatedMessageField(value: &self.sourceFileDescriptors) }()
  413. default: break
  414. }
  415. }
  416. }
  417. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  418. // The use of inline closures is to circumvent an issue where the compiler
  419. // allocates stack space for every if/case branch local when no optimizations
  420. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  421. // https://github.com/apple/swift-protobuf/issues/1182
  422. if !self.fileToGenerate.isEmpty {
  423. try visitor.visitRepeatedStringField(value: self.fileToGenerate, fieldNumber: 1)
  424. }
  425. try { if let v = self._parameter {
  426. try visitor.visitSingularStringField(value: v, fieldNumber: 2)
  427. } }()
  428. try { if let v = self._compilerVersion {
  429. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  430. } }()
  431. if !self.protoFile.isEmpty {
  432. try visitor.visitRepeatedMessageField(value: self.protoFile, fieldNumber: 15)
  433. }
  434. if !self.sourceFileDescriptors.isEmpty {
  435. try visitor.visitRepeatedMessageField(value: self.sourceFileDescriptors, fieldNumber: 17)
  436. }
  437. try unknownFields.traverse(visitor: &visitor)
  438. }
  439. public static func ==(lhs: Google_Protobuf_Compiler_CodeGeneratorRequest, rhs: Google_Protobuf_Compiler_CodeGeneratorRequest) -> Bool {
  440. if lhs.fileToGenerate != rhs.fileToGenerate {return false}
  441. if lhs._parameter != rhs._parameter {return false}
  442. if lhs.protoFile != rhs.protoFile {return false}
  443. if lhs.sourceFileDescriptors != rhs.sourceFileDescriptors {return false}
  444. if lhs._compilerVersion != rhs._compilerVersion {return false}
  445. if lhs.unknownFields != rhs.unknownFields {return false}
  446. return true
  447. }
  448. }
  449. extension Google_Protobuf_Compiler_CodeGeneratorResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  450. public static let protoMessageName: String = _protobuf_package + ".CodeGeneratorResponse"
  451. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  452. 1: .same(proto: "error"),
  453. 2: .standard(proto: "supported_features"),
  454. 3: .standard(proto: "minimum_edition"),
  455. 4: .standard(proto: "maximum_edition"),
  456. 15: .same(proto: "file"),
  457. ]
  458. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  459. while let fieldNumber = try decoder.nextFieldNumber() {
  460. // The use of inline closures is to circumvent an issue where the compiler
  461. // allocates stack space for every case branch when no optimizations are
  462. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  463. switch fieldNumber {
  464. case 1: try { try decoder.decodeSingularStringField(value: &self._error) }()
  465. case 2: try { try decoder.decodeSingularUInt64Field(value: &self._supportedFeatures) }()
  466. case 3: try { try decoder.decodeSingularInt32Field(value: &self._minimumEdition) }()
  467. case 4: try { try decoder.decodeSingularInt32Field(value: &self._maximumEdition) }()
  468. case 15: try { try decoder.decodeRepeatedMessageField(value: &self.file) }()
  469. default: break
  470. }
  471. }
  472. }
  473. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  474. // The use of inline closures is to circumvent an issue where the compiler
  475. // allocates stack space for every if/case branch local when no optimizations
  476. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  477. // https://github.com/apple/swift-protobuf/issues/1182
  478. try { if let v = self._error {
  479. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  480. } }()
  481. try { if let v = self._supportedFeatures {
  482. try visitor.visitSingularUInt64Field(value: v, fieldNumber: 2)
  483. } }()
  484. try { if let v = self._minimumEdition {
  485. try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
  486. } }()
  487. try { if let v = self._maximumEdition {
  488. try visitor.visitSingularInt32Field(value: v, fieldNumber: 4)
  489. } }()
  490. if !self.file.isEmpty {
  491. try visitor.visitRepeatedMessageField(value: self.file, fieldNumber: 15)
  492. }
  493. try unknownFields.traverse(visitor: &visitor)
  494. }
  495. public static func ==(lhs: Google_Protobuf_Compiler_CodeGeneratorResponse, rhs: Google_Protobuf_Compiler_CodeGeneratorResponse) -> Bool {
  496. if lhs._error != rhs._error {return false}
  497. if lhs._supportedFeatures != rhs._supportedFeatures {return false}
  498. if lhs._minimumEdition != rhs._minimumEdition {return false}
  499. if lhs._maximumEdition != rhs._maximumEdition {return false}
  500. if lhs.file != rhs.file {return false}
  501. if lhs.unknownFields != rhs.unknownFields {return false}
  502. return true
  503. }
  504. }
  505. extension Google_Protobuf_Compiler_CodeGeneratorResponse.Feature: SwiftProtobuf._ProtoNameProviding {
  506. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  507. 0: .same(proto: "FEATURE_NONE"),
  508. 1: .same(proto: "FEATURE_PROTO3_OPTIONAL"),
  509. 2: .same(proto: "FEATURE_SUPPORTS_EDITIONS"),
  510. ]
  511. }
  512. extension Google_Protobuf_Compiler_CodeGeneratorResponse.File: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  513. public static let protoMessageName: String = Google_Protobuf_Compiler_CodeGeneratorResponse.protoMessageName + ".File"
  514. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  515. 1: .same(proto: "name"),
  516. 2: .standard(proto: "insertion_point"),
  517. 15: .same(proto: "content"),
  518. 16: .standard(proto: "generated_code_info"),
  519. ]
  520. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  521. while let fieldNumber = try decoder.nextFieldNumber() {
  522. // The use of inline closures is to circumvent an issue where the compiler
  523. // allocates stack space for every case branch when no optimizations are
  524. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  525. switch fieldNumber {
  526. case 1: try { try decoder.decodeSingularStringField(value: &self._name) }()
  527. case 2: try { try decoder.decodeSingularStringField(value: &self._insertionPoint) }()
  528. case 15: try { try decoder.decodeSingularStringField(value: &self._content) }()
  529. case 16: try { try decoder.decodeSingularMessageField(value: &self._generatedCodeInfo) }()
  530. default: break
  531. }
  532. }
  533. }
  534. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  535. // The use of inline closures is to circumvent an issue where the compiler
  536. // allocates stack space for every if/case branch local when no optimizations
  537. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  538. // https://github.com/apple/swift-protobuf/issues/1182
  539. try { if let v = self._name {
  540. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  541. } }()
  542. try { if let v = self._insertionPoint {
  543. try visitor.visitSingularStringField(value: v, fieldNumber: 2)
  544. } }()
  545. try { if let v = self._content {
  546. try visitor.visitSingularStringField(value: v, fieldNumber: 15)
  547. } }()
  548. try { if let v = self._generatedCodeInfo {
  549. try visitor.visitSingularMessageField(value: v, fieldNumber: 16)
  550. } }()
  551. try unknownFields.traverse(visitor: &visitor)
  552. }
  553. public static func ==(lhs: Google_Protobuf_Compiler_CodeGeneratorResponse.File, rhs: Google_Protobuf_Compiler_CodeGeneratorResponse.File) -> Bool {
  554. if lhs._name != rhs._name {return false}
  555. if lhs._insertionPoint != rhs._insertionPoint {return false}
  556. if lhs._content != rhs._content {return false}
  557. if lhs._generatedCodeInfo != rhs._generatedCodeInfo {return false}
  558. if lhs.unknownFields != rhs.unknownFields {return false}
  559. return true
  560. }
  561. }