| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184 |
- // DO NOT EDIT.
- // swift-format-ignore-file
- // swiftlint:disable all
- //
- // Generated by the Swift generator plugin for the protocol buffer compiler.
- // Source: google/protobuf/java_mutable_features.proto
- //
- // For information on using the generated types, please see the documentation:
- // https://github.com/apple/swift-protobuf/
- 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 struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
- struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
- typealias Version = _2
- }
- struct Pb_JavaMutableFeatures: 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.
- /// Whether to nest the generated class in the generated file class for
- /// Java Proto2 Mutable API. This is only available at the file level.
- var nestInFileClass: Pb_JavaMutableFeatures.NestInFileClassFeature.NestInFileClass {
- get {_nestInFileClass ?? .unknown}
- set {_nestInFileClass = newValue}
- }
- /// Returns true if `nestInFileClass` has been explicitly set.
- var hasNestInFileClass: Bool {self._nestInFileClass != nil}
- /// Clears the value of `nestInFileClass`. Subsequent reads from it will return its default value.
- mutating func clearNestInFileClass() {self._nestInFileClass = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- struct NestInFileClassFeature: 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.
- var unknownFields = SwiftProtobuf.UnknownStorage()
- enum NestInFileClass: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
- /// Invalid default, which should never be used.
- case unknown = 0
- /// Do not nest the generated class in the file class.
- case no = 1
- /// Nest the generated class in the file class.
- case yes = 2
- /// Fall back to the `java_multiple_files` and
- /// `java_multiple_files_mutable_package` options. Users won't be able to
- /// set this option.
- case legacy = 3
- init() {
- self = .unknown
- }
- }
- init() {}
- }
- init() {}
- fileprivate var _nestInFileClass: Pb_JavaMutableFeatures.NestInFileClassFeature.NestInFileClass? = nil
- }
- // MARK: - Extension support defined in java_mutable_features.proto.
- // MARK: - Extension Properties
- // Swift Extensions on the extended Messages to add easy access to the declared
- // extension fields. The names are based on the extension field name from the proto
- // declaration. To avoid naming collisions, the names are prefixed with the name of
- // the scope where the extend directive occurs.
- extension SwiftProtobuf.Google_Protobuf_FeatureSet {
- var Pb_javaMutable: Pb_JavaMutableFeatures {
- get {return getExtensionValue(ext: Pb_Extensions_java_mutable) ?? Pb_JavaMutableFeatures()}
- set {setExtensionValue(ext: Pb_Extensions_java_mutable, value: newValue)}
- }
- /// Returns true if extension `Pb_Extensions_java_mutable`
- /// has been explicitly set.
- var hasPb_javaMutable: Bool {
- return hasExtensionValue(ext: Pb_Extensions_java_mutable)
- }
- /// Clears the value of extension `Pb_Extensions_java_mutable`.
- /// Subsequent reads from it will return its default value.
- mutating func clearPb_javaMutable() {
- clearExtensionValue(ext: Pb_Extensions_java_mutable)
- }
- }
- // MARK: - File's ExtensionMap: Pb_JavaMutableFeatures_Extensions
- /// A `SwiftProtobuf.SimpleExtensionMap` that includes all of the extensions defined by
- /// this .proto file. It can be used any place an `SwiftProtobuf.ExtensionMap` is needed
- /// in parsing, or it can be combined with other `SwiftProtobuf.SimpleExtensionMap`s to create
- /// a larger `SwiftProtobuf.SimpleExtensionMap`.
- let Pb_JavaMutableFeatures_Extensions: SwiftProtobuf.SimpleExtensionMap = [
- Pb_Extensions_java_mutable
- ]
- // Extension Objects - The only reason these might be needed is when manually
- // constructing a `SimpleExtensionMap`, otherwise, use the above _Extension Properties_
- // accessors for the extension fields on the messages directly.
- let Pb_Extensions_java_mutable = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<Pb_JavaMutableFeatures>, SwiftProtobuf.Google_Protobuf_FeatureSet>(
- _protobuf_fieldNumber: 9989,
- fieldName: "pb.java_mutable"
- )
- // MARK: - Code below here is support for the SwiftProtobuf runtime.
- fileprivate let _protobuf_package = "pb"
- extension Pb_JavaMutableFeatures: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".JavaMutableFeatures"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{4}\u{6}nest_in_file_class\0")
- 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 6: try { try decoder.decodeSingularEnumField(value: &self._nestInFileClass) }()
- default: break
- }
- }
- }
- 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._nestInFileClass {
- try visitor.visitSingularEnumField(value: v, fieldNumber: 6)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Pb_JavaMutableFeatures, rhs: Pb_JavaMutableFeatures) -> Bool {
- if lhs._nestInFileClass != rhs._nestInFileClass {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Pb_JavaMutableFeatures.NestInFileClassFeature: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = Pb_JavaMutableFeatures.protoMessageName + ".NestInFileClassFeature"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{c}\u{1}\u{7f}\u{7f}\u{7f}\u{7f}\u{1f}")
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- // Load everything into unknown fields
- while try decoder.nextFieldNumber() != nil {}
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Pb_JavaMutableFeatures.NestInFileClassFeature, rhs: Pb_JavaMutableFeatures.NestInFileClassFeature) -> Bool {
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Pb_JavaMutableFeatures.NestInFileClassFeature.NestInFileClass: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0NEST_IN_FILE_CLASS_UNKNOWN\0\u{1}NO\0\u{1}YES\0\u{1}LEGACY\0")
- }
|