// DO NOT EDIT. // // Generated by the Swift generator plugin for the protocol buffer compiler. // Source: echo.proto // // For information on using the generated types, please see the documenation: // https://github.com/apple/swift-protobuf/ // Copyright (c) 2015, Google Inc. // // 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 your 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 Echo_EchoRequest: SwiftProtobuf.Message { static let protoMessageName: String = _protobuf_package + ".EchoRequest" /// The text of a message to be echoed. var text: String = String() var unknownFields = SwiftProtobuf.UnknownStorage() init() {} /// Used by the decoding initializers in the SwiftProtobuf library, not generally /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding /// initializers are defined in the SwiftProtobuf library. See the Message and /// Message+*Additions` files. mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: try decoder.decodeSingularStringField(value: &self.text) default: break } } } /// Used by the encoding methods of the SwiftProtobuf library, not generally /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and /// other serializer methods are defined in the SwiftProtobuf library. See the /// `Message` and `Message+*Additions` files. func traverse(visitor: inout V) throws { if !self.text.isEmpty { try visitor.visitSingularStringField(value: self.text, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } } struct Echo_EchoResponse: SwiftProtobuf.Message { static let protoMessageName: String = _protobuf_package + ".EchoResponse" /// The text of an echo response. var text: String = String() var unknownFields = SwiftProtobuf.UnknownStorage() init() {} /// Used by the decoding initializers in the SwiftProtobuf library, not generally /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding /// initializers are defined in the SwiftProtobuf library. See the Message and /// Message+*Additions` files. mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { switch fieldNumber { case 1: try decoder.decodeSingularStringField(value: &self.text) default: break } } } /// Used by the encoding methods of the SwiftProtobuf library, not generally /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and /// other serializer methods are defined in the SwiftProtobuf library. See the /// `Message` and `Message+*Additions` files. func traverse(visitor: inout V) throws { if !self.text.isEmpty { try visitor.visitSingularStringField(value: self.text, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } } // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "echo" extension Echo_EchoRequest: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "text"), ] func _protobuf_generated_isEqualTo(other: Echo_EchoRequest) -> Bool { if self.text != other.text {return false} if unknownFields != other.unknownFields {return false} return true } } extension Echo_EchoResponse: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "text"), ] func _protobuf_generated_isEqualTo(other: Echo_EchoResponse) -> Bool { if self.text != other.text {return false} if unknownFields != other.unknownFields {return false} return true } }