// DO NOT EDIT. // swift-format-ignore-file // // Generated by the Swift generator plugin for the protocol buffer compiler. // Source: helloworld.proto // // For information on using the generated types, please see the documentation: // https://github.com/apple/swift-protobuf/ /// Copyright 2015 gRPC authors. /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// you may not use this file except in compliance with the License. /// You may obtain a copy of the License at /// /// http://www.apache.org/licenses/LICENSE-2.0 /// /// Unless required by applicable law or agreed to in writing, software /// distributed under the License is distributed on an "AS IS" BASIS, /// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. /// See the License for the specific language governing permissions and /// limitations under the License. import Foundation 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 } /// The request message containing the user's name. public struct Helloworld_HelloRequest { // 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 name: String = String() public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} } /// The response message containing the greetings public struct Helloworld_HelloReply { // 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 message: String = String() public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} } #if swift(>=5.5) && canImport(_Concurrency) extension Helloworld_HelloRequest: @unchecked Sendable {} extension Helloworld_HelloReply: @unchecked Sendable {} #endif // swift(>=5.5) && canImport(_Concurrency) // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "helloworld" extension Helloworld_HelloRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".HelloRequest" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "name"), ] public mutating func decodeMessage(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) }() default: break } } } public func traverse(visitor: inout V) throws { if !self.name.isEmpty { try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Helloworld_HelloRequest, rhs: Helloworld_HelloRequest) -> Bool { if lhs.name != rhs.name {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Helloworld_HelloReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".HelloReply" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "message"), ] public mutating func decodeMessage(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.message) }() default: break } } } public func traverse(visitor: inout V) throws { if !self.message.isEmpty { try visitor.visitSingularStringField(value: self.message, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Helloworld_HelloReply, rhs: Helloworld_HelloReply) -> Bool { if lhs.message != rhs.message {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } }