Files
George Barnett 2f58de3712 Generate nonisolated code (#2055)
Motivation:

When setting the default actor isolation to 'MainActor', generated
protobuf code will fail to compile.

Modifications:

- Add 'nonisolated' to generated declaration
- Add a compile test

Result:

- Resolves https://github.com/apple/swift-protobuf/issues/1797
2026-05-13 16:53:23 +01:00

569 lines
27 KiB
Swift

// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: google/protobuf/compiler/plugin.proto
//
// For information on using the generated types, please see the documentation:
// https://github.com/apple/swift-protobuf/
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
// Author: kenton@google.com (Kenton Varda)
//
// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is
// just a program that reads a CodeGeneratorRequest from stdin and writes a
// CodeGeneratorResponse to stdout.
//
// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead
// of dealing with the raw protocol defined here.
//
// A plugin executable needs only to be placed somewhere in the path. The
// plugin should be named "protoc-gen-$NAME", and will then be used when the
// flag "--${NAME}_out" is passed to protoc.
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 you are building against the same version of the API
// that was used to generate this file.
fileprivate nonisolated struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
typealias Version = _2
}
/// The version number of protocol compiler.
public nonisolated struct Google_Protobuf_Compiler_Version: Sendable {
// 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.
public var major: Int32 {
get {_major ?? 0}
set {_major = newValue}
}
/// Returns true if `major` has been explicitly set.
public var hasMajor: Bool {self._major != nil}
/// Clears the value of `major`. Subsequent reads from it will return its default value.
public mutating func clearMajor() {self._major = nil}
public var minor: Int32 {
get {_minor ?? 0}
set {_minor = newValue}
}
/// Returns true if `minor` has been explicitly set.
public var hasMinor: Bool {self._minor != nil}
/// Clears the value of `minor`. Subsequent reads from it will return its default value.
public mutating func clearMinor() {self._minor = nil}
public var patch: Int32 {
get {_patch ?? 0}
set {_patch = newValue}
}
/// Returns true if `patch` has been explicitly set.
public var hasPatch: Bool {self._patch != nil}
/// Clears the value of `patch`. Subsequent reads from it will return its default value.
public mutating func clearPatch() {self._patch = nil}
/// A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
/// be empty for mainline stable releases.
public var suffix: String {
get {_suffix ?? String()}
set {_suffix = newValue}
}
/// Returns true if `suffix` has been explicitly set.
public var hasSuffix: Bool {self._suffix != nil}
/// Clears the value of `suffix`. Subsequent reads from it will return its default value.
public mutating func clearSuffix() {self._suffix = nil}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
fileprivate var _major: Int32? = nil
fileprivate var _minor: Int32? = nil
fileprivate var _patch: Int32? = nil
fileprivate var _suffix: String? = nil
}
/// An encoded CodeGeneratorRequest is written to the plugin's stdin.
public nonisolated struct Google_Protobuf_Compiler_CodeGeneratorRequest: Sendable {
// 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.
/// The .proto files that were explicitly listed on the command-line. The
/// code generator should generate code only for these files. Each file's
/// descriptor will be included in proto_file, below.
public var fileToGenerate: [String] = []
/// The generator parameter passed on the command-line.
public var parameter: String {
get {_parameter ?? String()}
set {_parameter = newValue}
}
/// Returns true if `parameter` has been explicitly set.
public var hasParameter: Bool {self._parameter != nil}
/// Clears the value of `parameter`. Subsequent reads from it will return its default value.
public mutating func clearParameter() {self._parameter = nil}
/// FileDescriptorProtos for all files in files_to_generate and everything
/// they import. The files will appear in topological order, so each file
/// appears before any file that imports it.
///
/// Note: the files listed in files_to_generate will include runtime-retention
/// options only, but all other files will include source-retention options.
/// The source_file_descriptors field below is available in case you need
/// source-retention options for files_to_generate.
///
/// protoc guarantees that all proto_files will be written after
/// the fields above, even though this is not technically guaranteed by the
/// protobuf wire format. This theoretically could allow a plugin to stream
/// in the FileDescriptorProtos and handle them one by one rather than read
/// the entire set into memory at once. However, as of this writing, this
/// is not similarly optimized on protoc's end -- it will store all fields in
/// memory at once before sending them to the plugin.
///
/// Type names of fields and extensions in the FileDescriptorProto are always
/// fully qualified.
public var protoFile: [SwiftProtobuf.Google_Protobuf_FileDescriptorProto] = []
/// File descriptors with all options, including source-retention options.
/// These descriptors are only provided for the files listed in
/// files_to_generate.
public var sourceFileDescriptors: [SwiftProtobuf.Google_Protobuf_FileDescriptorProto] = []
/// The version number of protocol compiler.
public var compilerVersion: Google_Protobuf_Compiler_Version {
get {_compilerVersion ?? Google_Protobuf_Compiler_Version()}
set {_compilerVersion = newValue}
}
/// Returns true if `compilerVersion` has been explicitly set.
public var hasCompilerVersion: Bool {self._compilerVersion != nil}
/// Clears the value of `compilerVersion`. Subsequent reads from it will return its default value.
public mutating func clearCompilerVersion() {self._compilerVersion = nil}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
fileprivate var _parameter: String? = nil
fileprivate var _compilerVersion: Google_Protobuf_Compiler_Version? = nil
}
/// The plugin writes an encoded CodeGeneratorResponse to stdout.
public nonisolated struct Google_Protobuf_Compiler_CodeGeneratorResponse: Sendable {
// 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.
/// Error message. If non-empty, code generation failed. The plugin process
/// should exit with status code zero even if it reports an error in this way.
///
/// This should be used to indicate errors in .proto files which prevent the
/// code generator from generating correct code. Errors which indicate a
/// problem in protoc itself -- such as the input CodeGeneratorRequest being
/// unparseable -- should be reported by writing a message to stderr and
/// exiting with a non-zero status code.
public var error: String {
get {_error ?? String()}
set {_error = newValue}
}
/// Returns true if `error` has been explicitly set.
public var hasError: Bool {self._error != nil}
/// Clears the value of `error`. Subsequent reads from it will return its default value.
public mutating func clearError() {self._error = nil}
/// A bitmask of supported features that the code generator supports.
/// This is a bitwise "or" of values from the Feature enum.
public var supportedFeatures: UInt64 {
get {_supportedFeatures ?? 0}
set {_supportedFeatures = newValue}
}
/// Returns true if `supportedFeatures` has been explicitly set.
public var hasSupportedFeatures: Bool {self._supportedFeatures != nil}
/// Clears the value of `supportedFeatures`. Subsequent reads from it will return its default value.
public mutating func clearSupportedFeatures() {self._supportedFeatures = nil}
/// The minimum edition this plugin supports. This will be treated as an
/// Edition enum, but we want to allow unknown values. It should be specified
/// according the edition enum value, *not* the edition number. Only takes
/// effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
public var minimumEdition: Int32 {
get {_minimumEdition ?? 0}
set {_minimumEdition = newValue}
}
/// Returns true if `minimumEdition` has been explicitly set.
public var hasMinimumEdition: Bool {self._minimumEdition != nil}
/// Clears the value of `minimumEdition`. Subsequent reads from it will return its default value.
public mutating func clearMinimumEdition() {self._minimumEdition = nil}
/// The maximum edition this plugin supports. This will be treated as an
/// Edition enum, but we want to allow unknown values. It should be specified
/// according the edition enum value, *not* the edition number. Only takes
/// effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
public var maximumEdition: Int32 {
get {_maximumEdition ?? 0}
set {_maximumEdition = newValue}
}
/// Returns true if `maximumEdition` has been explicitly set.
public var hasMaximumEdition: Bool {self._maximumEdition != nil}
/// Clears the value of `maximumEdition`. Subsequent reads from it will return its default value.
public mutating func clearMaximumEdition() {self._maximumEdition = nil}
public var file: [Google_Protobuf_Compiler_CodeGeneratorResponse.File] = []
public var unknownFields = SwiftProtobuf.UnknownStorage()
/// Sync with code_generator.h.
public nonisolated enum Feature: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
case none = 0
case proto3Optional = 1
case supportsEditions = 2
public init() {
self = .none
}
}
/// Represents a single generated file.
public nonisolated struct File: Sendable {
// 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.
/// The file name, relative to the output directory. The name must not
/// contain "." or ".." components and must be relative, not be absolute (so,
/// the file cannot lie outside the output directory). "/" must be used as
/// the path separator, not "\".
///
/// If the name is omitted, the content will be appended to the previous
/// file. This allows the generator to break large files into small chunks,
/// and allows the generated text to be streamed back to protoc so that large
/// files need not reside completely in memory at one time. Note that as of
/// this writing protoc does not optimize for this -- it will read the entire
/// CodeGeneratorResponse before writing files to disk.
public var name: String {
get {_name ?? String()}
set {_name = newValue}
}
/// Returns true if `name` has been explicitly set.
public var hasName: Bool {self._name != nil}
/// Clears the value of `name`. Subsequent reads from it will return its default value.
public mutating func clearName() {self._name = nil}
/// If non-empty, indicates that the named file should already exist, and the
/// content here is to be inserted into that file at a defined insertion
/// point. This feature allows a code generator to extend the output
/// produced by another code generator. The original generator may provide
/// insertion points by placing special annotations in the file that look
/// like:
/// @@protoc_insertion_point(NAME)
/// The annotation can have arbitrary text before and after it on the line,
/// which allows it to be placed in a comment. NAME should be replaced with
/// an identifier naming the point -- this is what other generators will use
/// as the insertion_point. Code inserted at this point will be placed
/// immediately above the line containing the insertion point (thus multiple
/// insertions to the same point will come out in the order they were added).
/// The double-@ is intended to make it unlikely that the generated code
/// could contain things that look like insertion points by accident.
///
/// For example, the C++ code generator places the following line in the
/// .pb.h files that it generates:
/// // @@protoc_insertion_point(namespace_scope)
/// This line appears within the scope of the file's package namespace, but
/// outside of any particular class. Another plugin can then specify the
/// insertion_point "namespace_scope" to generate additional classes or
/// other declarations that should be placed in this scope.
///
/// Note that if the line containing the insertion point begins with
/// whitespace, the same whitespace will be added to every line of the
/// inserted text. This is useful for languages like Python, where
/// indentation matters. In these languages, the insertion point comment
/// should be indented the same amount as any inserted code will need to be
/// in order to work correctly in that context.
///
/// The code generator that generates the initial file and the one which
/// inserts into it must both run as part of a single invocation of protoc.
/// Code generators are executed in the order in which they appear on the
/// command line.
///
/// If |insertion_point| is present, |name| must also be present.
public var insertionPoint: String {
get {_insertionPoint ?? String()}
set {_insertionPoint = newValue}
}
/// Returns true if `insertionPoint` has been explicitly set.
public var hasInsertionPoint: Bool {self._insertionPoint != nil}
/// Clears the value of `insertionPoint`. Subsequent reads from it will return its default value.
public mutating func clearInsertionPoint() {self._insertionPoint = nil}
/// The file contents.
public var content: String {
get {_content ?? String()}
set {_content = newValue}
}
/// Returns true if `content` has been explicitly set.
public var hasContent: Bool {self._content != nil}
/// Clears the value of `content`. Subsequent reads from it will return its default value.
public mutating func clearContent() {self._content = nil}
/// Information describing the file content being inserted. If an insertion
/// point is used, this information will be appropriately offset and inserted
/// into the code generation metadata for the generated files.
public var generatedCodeInfo: SwiftProtobuf.Google_Protobuf_GeneratedCodeInfo {
get {_generatedCodeInfo ?? SwiftProtobuf.Google_Protobuf_GeneratedCodeInfo()}
set {_generatedCodeInfo = newValue}
}
/// Returns true if `generatedCodeInfo` has been explicitly set.
public var hasGeneratedCodeInfo: Bool {self._generatedCodeInfo != nil}
/// Clears the value of `generatedCodeInfo`. Subsequent reads from it will return its default value.
public mutating func clearGeneratedCodeInfo() {self._generatedCodeInfo = nil}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
fileprivate var _name: String? = nil
fileprivate var _insertionPoint: String? = nil
fileprivate var _content: String? = nil
fileprivate var _generatedCodeInfo: SwiftProtobuf.Google_Protobuf_GeneratedCodeInfo? = nil
}
public init() {}
fileprivate var _error: String? = nil
fileprivate var _supportedFeatures: UInt64? = nil
fileprivate var _minimumEdition: Int32? = nil
fileprivate var _maximumEdition: Int32? = nil
}
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate nonisolated let _protobuf_package = "google.protobuf.compiler"
nonisolated extension Google_Protobuf_Compiler_Version: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".Version"
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}major\0\u{1}minor\0\u{1}patch\0\u{1}suffix\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularInt32Field(value: &self._major) }()
case 2: try { try decoder.decodeSingularInt32Field(value: &self._minor) }()
case 3: try { try decoder.decodeSingularInt32Field(value: &self._patch) }()
case 4: try { try decoder.decodeSingularStringField(value: &self._suffix) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._major {
try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
} }()
try { if let v = self._minor {
try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
} }()
try { if let v = self._patch {
try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
} }()
try { if let v = self._suffix {
try visitor.visitSingularStringField(value: v, fieldNumber: 4)
} }()
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: Google_Protobuf_Compiler_Version, rhs: Google_Protobuf_Compiler_Version) -> Bool {
if lhs._major != rhs._major {return false}
if lhs._minor != rhs._minor {return false}
if lhs._patch != rhs._patch {return false}
if lhs._suffix != rhs._suffix {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
nonisolated extension Google_Protobuf_Compiler_CodeGeneratorRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".CodeGeneratorRequest"
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}file_to_generate\0\u{1}parameter\0\u{3}compiler_version\0\u{4}\u{c}proto_file\0\u{4}\u{2}source_file_descriptors\0")
public var isInitialized: Bool {
if !SwiftProtobuf.Internal.areAllInitialized(self.protoFile) {return false}
if !SwiftProtobuf.Internal.areAllInitialized(self.sourceFileDescriptors) {return false}
return true
}
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeRepeatedStringField(value: &self.fileToGenerate) }()
case 2: try { try decoder.decodeSingularStringField(value: &self._parameter) }()
case 3: try { try decoder.decodeSingularMessageField(value: &self._compilerVersion) }()
case 15: try { try decoder.decodeRepeatedMessageField(value: &self.protoFile) }()
case 17: try { try decoder.decodeRepeatedMessageField(value: &self.sourceFileDescriptors) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
if !self.fileToGenerate.isEmpty {
try visitor.visitRepeatedStringField(value: self.fileToGenerate, fieldNumber: 1)
}
try { if let v = self._parameter {
try visitor.visitSingularStringField(value: v, fieldNumber: 2)
} }()
try { if let v = self._compilerVersion {
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
} }()
if !self.protoFile.isEmpty {
try visitor.visitRepeatedMessageField(value: self.protoFile, fieldNumber: 15)
}
if !self.sourceFileDescriptors.isEmpty {
try visitor.visitRepeatedMessageField(value: self.sourceFileDescriptors, fieldNumber: 17)
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: Google_Protobuf_Compiler_CodeGeneratorRequest, rhs: Google_Protobuf_Compiler_CodeGeneratorRequest) -> Bool {
if lhs.fileToGenerate != rhs.fileToGenerate {return false}
if lhs._parameter != rhs._parameter {return false}
if lhs.protoFile != rhs.protoFile {return false}
if lhs.sourceFileDescriptors != rhs.sourceFileDescriptors {return false}
if lhs._compilerVersion != rhs._compilerVersion {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
nonisolated extension Google_Protobuf_Compiler_CodeGeneratorResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".CodeGeneratorResponse"
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}error\0\u{3}supported_features\0\u{3}minimum_edition\0\u{3}maximum_edition\0\u{2}\u{b}file\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularStringField(value: &self._error) }()
case 2: try { try decoder.decodeSingularUInt64Field(value: &self._supportedFeatures) }()
case 3: try { try decoder.decodeSingularInt32Field(value: &self._minimumEdition) }()
case 4: try { try decoder.decodeSingularInt32Field(value: &self._maximumEdition) }()
case 15: try { try decoder.decodeRepeatedMessageField(value: &self.file) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._error {
try visitor.visitSingularStringField(value: v, fieldNumber: 1)
} }()
try { if let v = self._supportedFeatures {
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 2)
} }()
try { if let v = self._minimumEdition {
try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
} }()
try { if let v = self._maximumEdition {
try visitor.visitSingularInt32Field(value: v, fieldNumber: 4)
} }()
if !self.file.isEmpty {
try visitor.visitRepeatedMessageField(value: self.file, fieldNumber: 15)
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: Google_Protobuf_Compiler_CodeGeneratorResponse, rhs: Google_Protobuf_Compiler_CodeGeneratorResponse) -> Bool {
if lhs._error != rhs._error {return false}
if lhs._supportedFeatures != rhs._supportedFeatures {return false}
if lhs._minimumEdition != rhs._minimumEdition {return false}
if lhs._maximumEdition != rhs._maximumEdition {return false}
if lhs.file != rhs.file {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
nonisolated extension Google_Protobuf_Compiler_CodeGeneratorResponse.Feature: SwiftProtobuf._ProtoNameProviding {
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0FEATURE_NONE\0\u{1}FEATURE_PROTO3_OPTIONAL\0\u{1}FEATURE_SUPPORTS_EDITIONS\0")
}
nonisolated extension Google_Protobuf_Compiler_CodeGeneratorResponse.File: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = Google_Protobuf_Compiler_CodeGeneratorResponse.protoMessageName + ".File"
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}name\0\u{3}insertion_point\0\u{2}\u{d}content\0\u{3}generated_code_info\0")
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularStringField(value: &self._name) }()
case 2: try { try decoder.decodeSingularStringField(value: &self._insertionPoint) }()
case 15: try { try decoder.decodeSingularStringField(value: &self._content) }()
case 16: try { try decoder.decodeSingularMessageField(value: &self._generatedCodeInfo) }()
default: break
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._name {
try visitor.visitSingularStringField(value: v, fieldNumber: 1)
} }()
try { if let v = self._insertionPoint {
try visitor.visitSingularStringField(value: v, fieldNumber: 2)
} }()
try { if let v = self._content {
try visitor.visitSingularStringField(value: v, fieldNumber: 15)
} }()
try { if let v = self._generatedCodeInfo {
try visitor.visitSingularMessageField(value: v, fieldNumber: 16)
} }()
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: Google_Protobuf_Compiler_CodeGeneratorResponse.File, rhs: Google_Protobuf_Compiler_CodeGeneratorResponse.File) -> Bool {
if lhs._name != rhs._name {return false}
if lhs._insertionPoint != rhs._insertionPoint {return false}
if lhs._content != rhs._content {return false}
if lhs._generatedCodeInfo != rhs._generatedCodeInfo {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}