plugin.pb.swift 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594
  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: google/protobuf/compiler/plugin.proto
  7. //
  8. // For information on using the generated types, please see the documentation:
  9. // https://github.com/apple/swift-protobuf/
  10. // Protocol Buffers - Google's data interchange format
  11. // Copyright 2008 Google Inc. All rights reserved.
  12. //
  13. // Use of this source code is governed by a BSD-style
  14. // license that can be found in the LICENSE file or at
  15. // https://developers.google.com/open-source/licenses/bsd
  16. // Author: kenton@google.com (Kenton Varda)
  17. //
  18. // protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is
  19. // just a program that reads a CodeGeneratorRequest from stdin and writes a
  20. // CodeGeneratorResponse to stdout.
  21. //
  22. // Plugins written using C++ can use google/protobuf/compiler/plugin.h instead
  23. // of dealing with the raw protocol defined here.
  24. //
  25. // A plugin executable needs only to be placed somewhere in the path. The
  26. // plugin should be named "protoc-gen-$NAME", and will then be used when the
  27. // flag "--${NAME}_out" is passed to protoc.
  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: Sendable {
  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: Sendable {
  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: Sendable {
  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: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
  199. case none = 0
  200. case proto3Optional = 1
  201. case supportsEditions = 2
  202. public init() {
  203. self = .none
  204. }
  205. }
  206. /// Represents a single generated file.
  207. public struct File: Sendable {
  208. // SwiftProtobuf.Message conformance is added in an extension below. See the
  209. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  210. // methods supported on all messages.
  211. /// The file name, relative to the output directory. The name must not
  212. /// contain "." or ".." components and must be relative, not be absolute (so,
  213. /// the file cannot lie outside the output directory). "/" must be used as
  214. /// the path separator, not "\".
  215. ///
  216. /// If the name is omitted, the content will be appended to the previous
  217. /// file. This allows the generator to break large files into small chunks,
  218. /// and allows the generated text to be streamed back to protoc so that large
  219. /// files need not reside completely in memory at one time. Note that as of
  220. /// this writing protoc does not optimize for this -- it will read the entire
  221. /// CodeGeneratorResponse before writing files to disk.
  222. public var name: String {
  223. get {return _name ?? String()}
  224. set {_name = newValue}
  225. }
  226. /// Returns true if `name` has been explicitly set.
  227. public var hasName: Bool {return self._name != nil}
  228. /// Clears the value of `name`. Subsequent reads from it will return its default value.
  229. public mutating func clearName() {self._name = nil}
  230. /// If non-empty, indicates that the named file should already exist, and the
  231. /// content here is to be inserted into that file at a defined insertion
  232. /// point. This feature allows a code generator to extend the output
  233. /// produced by another code generator. The original generator may provide
  234. /// insertion points by placing special annotations in the file that look
  235. /// like:
  236. /// @@protoc_insertion_point(NAME)
  237. /// The annotation can have arbitrary text before and after it on the line,
  238. /// which allows it to be placed in a comment. NAME should be replaced with
  239. /// an identifier naming the point -- this is what other generators will use
  240. /// as the insertion_point. Code inserted at this point will be placed
  241. /// immediately above the line containing the insertion point (thus multiple
  242. /// insertions to the same point will come out in the order they were added).
  243. /// The double-@ is intended to make it unlikely that the generated code
  244. /// could contain things that look like insertion points by accident.
  245. ///
  246. /// For example, the C++ code generator places the following line in the
  247. /// .pb.h files that it generates:
  248. /// // @@protoc_insertion_point(namespace_scope)
  249. /// This line appears within the scope of the file's package namespace, but
  250. /// outside of any particular class. Another plugin can then specify the
  251. /// insertion_point "namespace_scope" to generate additional classes or
  252. /// other declarations that should be placed in this scope.
  253. ///
  254. /// Note that if the line containing the insertion point begins with
  255. /// whitespace, the same whitespace will be added to every line of the
  256. /// inserted text. This is useful for languages like Python, where
  257. /// indentation matters. In these languages, the insertion point comment
  258. /// should be indented the same amount as any inserted code will need to be
  259. /// in order to work correctly in that context.
  260. ///
  261. /// The code generator that generates the initial file and the one which
  262. /// inserts into it must both run as part of a single invocation of protoc.
  263. /// Code generators are executed in the order in which they appear on the
  264. /// command line.
  265. ///
  266. /// If |insertion_point| is present, |name| must also be present.
  267. public var insertionPoint: String {
  268. get {return _insertionPoint ?? String()}
  269. set {_insertionPoint = newValue}
  270. }
  271. /// Returns true if `insertionPoint` has been explicitly set.
  272. public var hasInsertionPoint: Bool {return self._insertionPoint != nil}
  273. /// Clears the value of `insertionPoint`. Subsequent reads from it will return its default value.
  274. public mutating func clearInsertionPoint() {self._insertionPoint = nil}
  275. /// The file contents.
  276. public var content: String {
  277. get {return _content ?? String()}
  278. set {_content = newValue}
  279. }
  280. /// Returns true if `content` has been explicitly set.
  281. public var hasContent: Bool {return self._content != nil}
  282. /// Clears the value of `content`. Subsequent reads from it will return its default value.
  283. public mutating func clearContent() {self._content = nil}
  284. /// Information describing the file content being inserted. If an insertion
  285. /// point is used, this information will be appropriately offset and inserted
  286. /// into the code generation metadata for the generated files.
  287. public var generatedCodeInfo: SwiftProtobuf.Google_Protobuf_GeneratedCodeInfo {
  288. get {return _generatedCodeInfo ?? SwiftProtobuf.Google_Protobuf_GeneratedCodeInfo()}
  289. set {_generatedCodeInfo = newValue}
  290. }
  291. /// Returns true if `generatedCodeInfo` has been explicitly set.
  292. public var hasGeneratedCodeInfo: Bool {return self._generatedCodeInfo != nil}
  293. /// Clears the value of `generatedCodeInfo`. Subsequent reads from it will return its default value.
  294. public mutating func clearGeneratedCodeInfo() {self._generatedCodeInfo = nil}
  295. public var unknownFields = SwiftProtobuf.UnknownStorage()
  296. public init() {}
  297. fileprivate var _name: String? = nil
  298. fileprivate var _insertionPoint: String? = nil
  299. fileprivate var _content: String? = nil
  300. fileprivate var _generatedCodeInfo: SwiftProtobuf.Google_Protobuf_GeneratedCodeInfo? = nil
  301. }
  302. public init() {}
  303. fileprivate var _error: String? = nil
  304. fileprivate var _supportedFeatures: UInt64? = nil
  305. fileprivate var _minimumEdition: Int32? = nil
  306. fileprivate var _maximumEdition: Int32? = nil
  307. }
  308. // MARK: - Code below here is support for the SwiftProtobuf runtime.
  309. fileprivate let _protobuf_package = "google.protobuf.compiler"
  310. extension Google_Protobuf_Compiler_Version: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  311. public static let protoMessageName: String = _protobuf_package + ".Version"
  312. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  313. 1: .same(proto: "major"),
  314. 2: .same(proto: "minor"),
  315. 3: .same(proto: "patch"),
  316. 4: .same(proto: "suffix"),
  317. ]
  318. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  319. while let fieldNumber = try decoder.nextFieldNumber() {
  320. // The use of inline closures is to circumvent an issue where the compiler
  321. // allocates stack space for every case branch when no optimizations are
  322. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  323. switch fieldNumber {
  324. case 1: try { try decoder.decodeSingularInt32Field(value: &self._major) }()
  325. case 2: try { try decoder.decodeSingularInt32Field(value: &self._minor) }()
  326. case 3: try { try decoder.decodeSingularInt32Field(value: &self._patch) }()
  327. case 4: try { try decoder.decodeSingularStringField(value: &self._suffix) }()
  328. default: break
  329. }
  330. }
  331. }
  332. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  333. // The use of inline closures is to circumvent an issue where the compiler
  334. // allocates stack space for every if/case branch local when no optimizations
  335. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  336. // https://github.com/apple/swift-protobuf/issues/1182
  337. try { if let v = self._major {
  338. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  339. } }()
  340. try { if let v = self._minor {
  341. try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
  342. } }()
  343. try { if let v = self._patch {
  344. try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
  345. } }()
  346. try { if let v = self._suffix {
  347. try visitor.visitSingularStringField(value: v, fieldNumber: 4)
  348. } }()
  349. try unknownFields.traverse(visitor: &visitor)
  350. }
  351. public static func ==(lhs: Google_Protobuf_Compiler_Version, rhs: Google_Protobuf_Compiler_Version) -> Bool {
  352. if lhs._major != rhs._major {return false}
  353. if lhs._minor != rhs._minor {return false}
  354. if lhs._patch != rhs._patch {return false}
  355. if lhs._suffix != rhs._suffix {return false}
  356. if lhs.unknownFields != rhs.unknownFields {return false}
  357. return true
  358. }
  359. }
  360. extension Google_Protobuf_Compiler_CodeGeneratorRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  361. public static let protoMessageName: String = _protobuf_package + ".CodeGeneratorRequest"
  362. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  363. 1: .standard(proto: "file_to_generate"),
  364. 2: .same(proto: "parameter"),
  365. 15: .standard(proto: "proto_file"),
  366. 17: .standard(proto: "source_file_descriptors"),
  367. 3: .standard(proto: "compiler_version"),
  368. ]
  369. public var isInitialized: Bool {
  370. if !SwiftProtobuf.Internal.areAllInitialized(self.protoFile) {return false}
  371. if !SwiftProtobuf.Internal.areAllInitialized(self.sourceFileDescriptors) {return false}
  372. return true
  373. }
  374. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  375. while let fieldNumber = try decoder.nextFieldNumber() {
  376. // The use of inline closures is to circumvent an issue where the compiler
  377. // allocates stack space for every case branch when no optimizations are
  378. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  379. switch fieldNumber {
  380. case 1: try { try decoder.decodeRepeatedStringField(value: &self.fileToGenerate) }()
  381. case 2: try { try decoder.decodeSingularStringField(value: &self._parameter) }()
  382. case 3: try { try decoder.decodeSingularMessageField(value: &self._compilerVersion) }()
  383. case 15: try { try decoder.decodeRepeatedMessageField(value: &self.protoFile) }()
  384. case 17: try { try decoder.decodeRepeatedMessageField(value: &self.sourceFileDescriptors) }()
  385. default: break
  386. }
  387. }
  388. }
  389. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  390. // The use of inline closures is to circumvent an issue where the compiler
  391. // allocates stack space for every if/case branch local when no optimizations
  392. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  393. // https://github.com/apple/swift-protobuf/issues/1182
  394. if !self.fileToGenerate.isEmpty {
  395. try visitor.visitRepeatedStringField(value: self.fileToGenerate, fieldNumber: 1)
  396. }
  397. try { if let v = self._parameter {
  398. try visitor.visitSingularStringField(value: v, fieldNumber: 2)
  399. } }()
  400. try { if let v = self._compilerVersion {
  401. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  402. } }()
  403. if !self.protoFile.isEmpty {
  404. try visitor.visitRepeatedMessageField(value: self.protoFile, fieldNumber: 15)
  405. }
  406. if !self.sourceFileDescriptors.isEmpty {
  407. try visitor.visitRepeatedMessageField(value: self.sourceFileDescriptors, fieldNumber: 17)
  408. }
  409. try unknownFields.traverse(visitor: &visitor)
  410. }
  411. public static func ==(lhs: Google_Protobuf_Compiler_CodeGeneratorRequest, rhs: Google_Protobuf_Compiler_CodeGeneratorRequest) -> Bool {
  412. if lhs.fileToGenerate != rhs.fileToGenerate {return false}
  413. if lhs._parameter != rhs._parameter {return false}
  414. if lhs.protoFile != rhs.protoFile {return false}
  415. if lhs.sourceFileDescriptors != rhs.sourceFileDescriptors {return false}
  416. if lhs._compilerVersion != rhs._compilerVersion {return false}
  417. if lhs.unknownFields != rhs.unknownFields {return false}
  418. return true
  419. }
  420. }
  421. extension Google_Protobuf_Compiler_CodeGeneratorResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  422. public static let protoMessageName: String = _protobuf_package + ".CodeGeneratorResponse"
  423. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  424. 1: .same(proto: "error"),
  425. 2: .standard(proto: "supported_features"),
  426. 3: .standard(proto: "minimum_edition"),
  427. 4: .standard(proto: "maximum_edition"),
  428. 15: .same(proto: "file"),
  429. ]
  430. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  431. while let fieldNumber = try decoder.nextFieldNumber() {
  432. // The use of inline closures is to circumvent an issue where the compiler
  433. // allocates stack space for every case branch when no optimizations are
  434. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  435. switch fieldNumber {
  436. case 1: try { try decoder.decodeSingularStringField(value: &self._error) }()
  437. case 2: try { try decoder.decodeSingularUInt64Field(value: &self._supportedFeatures) }()
  438. case 3: try { try decoder.decodeSingularInt32Field(value: &self._minimumEdition) }()
  439. case 4: try { try decoder.decodeSingularInt32Field(value: &self._maximumEdition) }()
  440. case 15: try { try decoder.decodeRepeatedMessageField(value: &self.file) }()
  441. default: break
  442. }
  443. }
  444. }
  445. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  446. // The use of inline closures is to circumvent an issue where the compiler
  447. // allocates stack space for every if/case branch local when no optimizations
  448. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  449. // https://github.com/apple/swift-protobuf/issues/1182
  450. try { if let v = self._error {
  451. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  452. } }()
  453. try { if let v = self._supportedFeatures {
  454. try visitor.visitSingularUInt64Field(value: v, fieldNumber: 2)
  455. } }()
  456. try { if let v = self._minimumEdition {
  457. try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
  458. } }()
  459. try { if let v = self._maximumEdition {
  460. try visitor.visitSingularInt32Field(value: v, fieldNumber: 4)
  461. } }()
  462. if !self.file.isEmpty {
  463. try visitor.visitRepeatedMessageField(value: self.file, fieldNumber: 15)
  464. }
  465. try unknownFields.traverse(visitor: &visitor)
  466. }
  467. public static func ==(lhs: Google_Protobuf_Compiler_CodeGeneratorResponse, rhs: Google_Protobuf_Compiler_CodeGeneratorResponse) -> Bool {
  468. if lhs._error != rhs._error {return false}
  469. if lhs._supportedFeatures != rhs._supportedFeatures {return false}
  470. if lhs._minimumEdition != rhs._minimumEdition {return false}
  471. if lhs._maximumEdition != rhs._maximumEdition {return false}
  472. if lhs.file != rhs.file {return false}
  473. if lhs.unknownFields != rhs.unknownFields {return false}
  474. return true
  475. }
  476. }
  477. extension Google_Protobuf_Compiler_CodeGeneratorResponse.Feature: SwiftProtobuf._ProtoNameProviding {
  478. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  479. 0: .same(proto: "FEATURE_NONE"),
  480. 1: .same(proto: "FEATURE_PROTO3_OPTIONAL"),
  481. 2: .same(proto: "FEATURE_SUPPORTS_EDITIONS"),
  482. ]
  483. }
  484. extension Google_Protobuf_Compiler_CodeGeneratorResponse.File: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  485. public static let protoMessageName: String = Google_Protobuf_Compiler_CodeGeneratorResponse.protoMessageName + ".File"
  486. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  487. 1: .same(proto: "name"),
  488. 2: .standard(proto: "insertion_point"),
  489. 15: .same(proto: "content"),
  490. 16: .standard(proto: "generated_code_info"),
  491. ]
  492. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  493. while let fieldNumber = try decoder.nextFieldNumber() {
  494. // The use of inline closures is to circumvent an issue where the compiler
  495. // allocates stack space for every case branch when no optimizations are
  496. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  497. switch fieldNumber {
  498. case 1: try { try decoder.decodeSingularStringField(value: &self._name) }()
  499. case 2: try { try decoder.decodeSingularStringField(value: &self._insertionPoint) }()
  500. case 15: try { try decoder.decodeSingularStringField(value: &self._content) }()
  501. case 16: try { try decoder.decodeSingularMessageField(value: &self._generatedCodeInfo) }()
  502. default: break
  503. }
  504. }
  505. }
  506. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  507. // The use of inline closures is to circumvent an issue where the compiler
  508. // allocates stack space for every if/case branch local when no optimizations
  509. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  510. // https://github.com/apple/swift-protobuf/issues/1182
  511. try { if let v = self._name {
  512. try visitor.visitSingularStringField(value: v, fieldNumber: 1)
  513. } }()
  514. try { if let v = self._insertionPoint {
  515. try visitor.visitSingularStringField(value: v, fieldNumber: 2)
  516. } }()
  517. try { if let v = self._content {
  518. try visitor.visitSingularStringField(value: v, fieldNumber: 15)
  519. } }()
  520. try { if let v = self._generatedCodeInfo {
  521. try visitor.visitSingularMessageField(value: v, fieldNumber: 16)
  522. } }()
  523. try unknownFields.traverse(visitor: &visitor)
  524. }
  525. public static func ==(lhs: Google_Protobuf_Compiler_CodeGeneratorResponse.File, rhs: Google_Protobuf_Compiler_CodeGeneratorResponse.File) -> Bool {
  526. if lhs._name != rhs._name {return false}
  527. if lhs._insertionPoint != rhs._insertionPoint {return false}
  528. if lhs._content != rhs._content {return false}
  529. if lhs._generatedCodeInfo != rhs._generatedCodeInfo {return false}
  530. if lhs.unknownFields != rhs.unknownFields {return false}
  531. return true
  532. }
  533. }