| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- /*
- * DO NOT EDIT.
- *
- * Generated by the protocol buffer compiler.
- * Source: echo.proto
- *
- */
- // 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
- public struct Echo_EchoRequest: ProtobufGeneratedMessage {
- public var swiftClassName: String {return "Echo_EchoRequest"}
- public var protoMessageName: String {return "EchoRequest"}
- public var protoPackageName: String {return "echo"}
- public var jsonFieldNames: [String: Int] {return [
- "text": 1,
- ]}
- public var protoFieldNames: [String: Int] {return [
- "text": 1,
- ]}
- public var text: String = ""
- public init() {}
- public init(text: String? = nil)
- {
- if let v = text {
- self.text = v
- }
- }
- public mutating func _protoc_generated_decodeField(setter: inout ProtobufFieldDecoder, protoFieldNumber: Int) throws -> Bool {
- let handled: Bool
- switch protoFieldNumber {
- case 1: handled = try setter.decodeSingularField(fieldType: ProtobufString.self, value: &text)
- default:
- handled = false
- }
- return handled
- }
- public func _protoc_generated_traverse(visitor: inout ProtobufVisitor) throws {
- if text != "" {
- try visitor.visitSingularField(fieldType: ProtobufString.self, value: text, protoFieldNumber: 1, protoFieldName: "text", jsonFieldName: "text", swiftFieldName: "text")
- }
- }
- public func _protoc_generated_isEqualTo(other: Echo_EchoRequest) -> Bool {
- if text != other.text {return false}
- return true
- }
- }
- public struct Echo_EchoResponse: ProtobufGeneratedMessage {
- public var swiftClassName: String {return "Echo_EchoResponse"}
- public var protoMessageName: String {return "EchoResponse"}
- public var protoPackageName: String {return "echo"}
- public var jsonFieldNames: [String: Int] {return [
- "text": 1,
- ]}
- public var protoFieldNames: [String: Int] {return [
- "text": 1,
- ]}
- public var text: String = ""
- public init() {}
- public init(text: String? = nil)
- {
- if let v = text {
- self.text = v
- }
- }
- public mutating func _protoc_generated_decodeField(setter: inout ProtobufFieldDecoder, protoFieldNumber: Int) throws -> Bool {
- let handled: Bool
- switch protoFieldNumber {
- case 1: handled = try setter.decodeSingularField(fieldType: ProtobufString.self, value: &text)
- default:
- handled = false
- }
- return handled
- }
- public func _protoc_generated_traverse(visitor: inout ProtobufVisitor) throws {
- if text != "" {
- try visitor.visitSingularField(fieldType: ProtobufString.self, value: text, protoFieldNumber: 1, protoFieldName: "text", jsonFieldName: "text", swiftFieldName: "text")
- }
- }
- public func _protoc_generated_isEqualTo(other: Echo_EchoResponse) -> Bool {
- if text != other.text {return false}
- return true
- }
- }
|