Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 2 | // source: src/proto/grpc/testing/payloads.proto |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 3 | #pragma warning disable 1591, 0612, 3021 |
| 4 | #region Designer generated code |
| 5 | |
| 6 | using pb = global::Google.Protobuf; |
| 7 | using pbc = global::Google.Protobuf.Collections; |
| 8 | using pbr = global::Google.Protobuf.Reflection; |
| 9 | using scg = global::System.Collections.Generic; |
| 10 | namespace Grpc.Testing { |
| 11 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 12 | /// <summary>Holder for reflection information generated from src/proto/grpc/testing/payloads.proto</summary> |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 13 | public static partial class PayloadsReflection { |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 14 | |
| 15 | #region Descriptor |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 16 | /// <summary>File descriptor for src/proto/grpc/testing/payloads.proto</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 17 | public static pbr::FileDescriptor Descriptor { |
| 18 | get { return descriptor; } |
| 19 | } |
| 20 | private static pbr::FileDescriptor descriptor; |
| 21 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 22 | static PayloadsReflection() { |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 23 | byte[] descriptorData = global::System.Convert.FromBase64String( |
| 24 | string.Concat( |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 25 | "CiVzcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL3BheWxvYWRzLnByb3RvEgxncnBj", |
| 26 | "LnRlc3RpbmciNwoQQnl0ZUJ1ZmZlclBhcmFtcxIQCghyZXFfc2l6ZRgBIAEo", |
| 27 | "BRIRCglyZXNwX3NpemUYAiABKAUiOAoRU2ltcGxlUHJvdG9QYXJhbXMSEAoI", |
| 28 | "cmVxX3NpemUYASABKAUSEQoJcmVzcF9zaXplGAIgASgFIhQKEkNvbXBsZXhQ", |
| 29 | "cm90b1BhcmFtcyLKAQoNUGF5bG9hZENvbmZpZxI4Cg5ieXRlYnVmX3BhcmFt", |
| 30 | "cxgBIAEoCzIeLmdycGMudGVzdGluZy5CeXRlQnVmZmVyUGFyYW1zSAASOAoN", |
| 31 | "c2ltcGxlX3BhcmFtcxgCIAEoCzIfLmdycGMudGVzdGluZy5TaW1wbGVQcm90", |
| 32 | "b1BhcmFtc0gAEjoKDmNvbXBsZXhfcGFyYW1zGAMgASgLMiAuZ3JwYy50ZXN0", |
| 33 | "aW5nLkNvbXBsZXhQcm90b1BhcmFtc0gAQgkKB3BheWxvYWRiBnByb3RvMw==")); |
| 34 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 35 | new pbr::FileDescriptor[] { }, |
Jan Tattermusch | c96fdde | 2016-05-16 17:08:41 -0700 | [diff] [blame] | 36 | new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { |
| 37 | new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ByteBufferParams), global::Grpc.Testing.ByteBufferParams.Parser, new[]{ "ReqSize", "RespSize" }, null, null, null), |
| 38 | new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.SimpleProtoParams), global::Grpc.Testing.SimpleProtoParams.Parser, new[]{ "ReqSize", "RespSize" }, null, null, null), |
| 39 | new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ComplexProtoParams), global::Grpc.Testing.ComplexProtoParams.Parser, null, null, null, null), |
| 40 | new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.PayloadConfig), global::Grpc.Testing.PayloadConfig.Parser, new[]{ "BytebufParams", "SimpleParams", "ComplexParams" }, new[]{ "Payload" }, null, null) |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 41 | })); |
| 42 | } |
| 43 | #endregion |
| 44 | |
| 45 | } |
| 46 | #region Messages |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 47 | public sealed partial class ByteBufferParams : pb::IMessage<ByteBufferParams> { |
| 48 | private static readonly pb::MessageParser<ByteBufferParams> _parser = new pb::MessageParser<ByteBufferParams>(() => new ByteBufferParams()); |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 49 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 50 | public static pb::MessageParser<ByteBufferParams> Parser { get { return _parser; } } |
| 51 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 52 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 53 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 54 | get { return global::Grpc.Testing.PayloadsReflection.Descriptor.MessageTypes[0]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 55 | } |
| 56 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 57 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 58 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 59 | get { return Descriptor; } |
| 60 | } |
| 61 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 62 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 63 | public ByteBufferParams() { |
| 64 | OnConstruction(); |
| 65 | } |
| 66 | |
| 67 | partial void OnConstruction(); |
| 68 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 69 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 70 | public ByteBufferParams(ByteBufferParams other) : this() { |
| 71 | reqSize_ = other.reqSize_; |
| 72 | respSize_ = other.respSize_; |
| 73 | } |
| 74 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 75 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 76 | public ByteBufferParams Clone() { |
| 77 | return new ByteBufferParams(this); |
| 78 | } |
| 79 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 80 | /// <summary>Field number for the "req_size" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 81 | public const int ReqSizeFieldNumber = 1; |
| 82 | private int reqSize_; |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 83 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 84 | public int ReqSize { |
| 85 | get { return reqSize_; } |
| 86 | set { |
| 87 | reqSize_ = value; |
| 88 | } |
| 89 | } |
| 90 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 91 | /// <summary>Field number for the "resp_size" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 92 | public const int RespSizeFieldNumber = 2; |
| 93 | private int respSize_; |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 94 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 95 | public int RespSize { |
| 96 | get { return respSize_; } |
| 97 | set { |
| 98 | respSize_ = value; |
| 99 | } |
| 100 | } |
| 101 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 102 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 103 | public override bool Equals(object other) { |
| 104 | return Equals(other as ByteBufferParams); |
| 105 | } |
| 106 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 107 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 108 | public bool Equals(ByteBufferParams other) { |
| 109 | if (ReferenceEquals(other, null)) { |
| 110 | return false; |
| 111 | } |
| 112 | if (ReferenceEquals(other, this)) { |
| 113 | return true; |
| 114 | } |
| 115 | if (ReqSize != other.ReqSize) return false; |
| 116 | if (RespSize != other.RespSize) return false; |
| 117 | return true; |
| 118 | } |
| 119 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 120 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 121 | public override int GetHashCode() { |
| 122 | int hash = 1; |
| 123 | if (ReqSize != 0) hash ^= ReqSize.GetHashCode(); |
| 124 | if (RespSize != 0) hash ^= RespSize.GetHashCode(); |
| 125 | return hash; |
| 126 | } |
| 127 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 128 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 129 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 130 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 131 | } |
| 132 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 133 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 134 | public void WriteTo(pb::CodedOutputStream output) { |
| 135 | if (ReqSize != 0) { |
| 136 | output.WriteRawTag(8); |
| 137 | output.WriteInt32(ReqSize); |
| 138 | } |
| 139 | if (RespSize != 0) { |
| 140 | output.WriteRawTag(16); |
| 141 | output.WriteInt32(RespSize); |
| 142 | } |
| 143 | } |
| 144 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 145 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 146 | public int CalculateSize() { |
| 147 | int size = 0; |
| 148 | if (ReqSize != 0) { |
| 149 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(ReqSize); |
| 150 | } |
| 151 | if (RespSize != 0) { |
| 152 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(RespSize); |
| 153 | } |
| 154 | return size; |
| 155 | } |
| 156 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 157 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 158 | public void MergeFrom(ByteBufferParams other) { |
| 159 | if (other == null) { |
| 160 | return; |
| 161 | } |
| 162 | if (other.ReqSize != 0) { |
| 163 | ReqSize = other.ReqSize; |
| 164 | } |
| 165 | if (other.RespSize != 0) { |
| 166 | RespSize = other.RespSize; |
| 167 | } |
| 168 | } |
| 169 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 170 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 171 | public void MergeFrom(pb::CodedInputStream input) { |
| 172 | uint tag; |
| 173 | while ((tag = input.ReadTag()) != 0) { |
| 174 | switch(tag) { |
| 175 | default: |
| 176 | input.SkipLastField(); |
| 177 | break; |
| 178 | case 8: { |
| 179 | ReqSize = input.ReadInt32(); |
| 180 | break; |
| 181 | } |
| 182 | case 16: { |
| 183 | RespSize = input.ReadInt32(); |
| 184 | break; |
| 185 | } |
| 186 | } |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | } |
| 191 | |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 192 | public sealed partial class SimpleProtoParams : pb::IMessage<SimpleProtoParams> { |
| 193 | private static readonly pb::MessageParser<SimpleProtoParams> _parser = new pb::MessageParser<SimpleProtoParams>(() => new SimpleProtoParams()); |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 194 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 195 | public static pb::MessageParser<SimpleProtoParams> Parser { get { return _parser; } } |
| 196 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 197 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 198 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 199 | get { return global::Grpc.Testing.PayloadsReflection.Descriptor.MessageTypes[1]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 200 | } |
| 201 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 202 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 203 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 204 | get { return Descriptor; } |
| 205 | } |
| 206 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 207 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 208 | public SimpleProtoParams() { |
| 209 | OnConstruction(); |
| 210 | } |
| 211 | |
| 212 | partial void OnConstruction(); |
| 213 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 214 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 215 | public SimpleProtoParams(SimpleProtoParams other) : this() { |
| 216 | reqSize_ = other.reqSize_; |
| 217 | respSize_ = other.respSize_; |
| 218 | } |
| 219 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 220 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 221 | public SimpleProtoParams Clone() { |
| 222 | return new SimpleProtoParams(this); |
| 223 | } |
| 224 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 225 | /// <summary>Field number for the "req_size" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 226 | public const int ReqSizeFieldNumber = 1; |
| 227 | private int reqSize_; |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 228 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 229 | public int ReqSize { |
| 230 | get { return reqSize_; } |
| 231 | set { |
| 232 | reqSize_ = value; |
| 233 | } |
| 234 | } |
| 235 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 236 | /// <summary>Field number for the "resp_size" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 237 | public const int RespSizeFieldNumber = 2; |
| 238 | private int respSize_; |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 239 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 240 | public int RespSize { |
| 241 | get { return respSize_; } |
| 242 | set { |
| 243 | respSize_ = value; |
| 244 | } |
| 245 | } |
| 246 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 247 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 248 | public override bool Equals(object other) { |
| 249 | return Equals(other as SimpleProtoParams); |
| 250 | } |
| 251 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 252 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 253 | public bool Equals(SimpleProtoParams other) { |
| 254 | if (ReferenceEquals(other, null)) { |
| 255 | return false; |
| 256 | } |
| 257 | if (ReferenceEquals(other, this)) { |
| 258 | return true; |
| 259 | } |
| 260 | if (ReqSize != other.ReqSize) return false; |
| 261 | if (RespSize != other.RespSize) return false; |
| 262 | return true; |
| 263 | } |
| 264 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 265 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 266 | public override int GetHashCode() { |
| 267 | int hash = 1; |
| 268 | if (ReqSize != 0) hash ^= ReqSize.GetHashCode(); |
| 269 | if (RespSize != 0) hash ^= RespSize.GetHashCode(); |
| 270 | return hash; |
| 271 | } |
| 272 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 273 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 274 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 275 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 276 | } |
| 277 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 278 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 279 | public void WriteTo(pb::CodedOutputStream output) { |
| 280 | if (ReqSize != 0) { |
| 281 | output.WriteRawTag(8); |
| 282 | output.WriteInt32(ReqSize); |
| 283 | } |
| 284 | if (RespSize != 0) { |
| 285 | output.WriteRawTag(16); |
| 286 | output.WriteInt32(RespSize); |
| 287 | } |
| 288 | } |
| 289 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 290 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 291 | public int CalculateSize() { |
| 292 | int size = 0; |
| 293 | if (ReqSize != 0) { |
| 294 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(ReqSize); |
| 295 | } |
| 296 | if (RespSize != 0) { |
| 297 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(RespSize); |
| 298 | } |
| 299 | return size; |
| 300 | } |
| 301 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 302 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 303 | public void MergeFrom(SimpleProtoParams other) { |
| 304 | if (other == null) { |
| 305 | return; |
| 306 | } |
| 307 | if (other.ReqSize != 0) { |
| 308 | ReqSize = other.ReqSize; |
| 309 | } |
| 310 | if (other.RespSize != 0) { |
| 311 | RespSize = other.RespSize; |
| 312 | } |
| 313 | } |
| 314 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 315 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 316 | public void MergeFrom(pb::CodedInputStream input) { |
| 317 | uint tag; |
| 318 | while ((tag = input.ReadTag()) != 0) { |
| 319 | switch(tag) { |
| 320 | default: |
| 321 | input.SkipLastField(); |
| 322 | break; |
| 323 | case 8: { |
| 324 | ReqSize = input.ReadInt32(); |
| 325 | break; |
| 326 | } |
| 327 | case 16: { |
| 328 | RespSize = input.ReadInt32(); |
| 329 | break; |
| 330 | } |
| 331 | } |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | } |
| 336 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 337 | /// <summary> |
Jan Tattermusch | d687e92 | 2017-02-22 09:12:00 +0100 | [diff] [blame] | 338 | /// TODO (vpai): Fill this in once the details of complex, representative |
| 339 | /// protos are decided |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 340 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 341 | public sealed partial class ComplexProtoParams : pb::IMessage<ComplexProtoParams> { |
| 342 | private static readonly pb::MessageParser<ComplexProtoParams> _parser = new pb::MessageParser<ComplexProtoParams>(() => new ComplexProtoParams()); |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 343 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 344 | public static pb::MessageParser<ComplexProtoParams> Parser { get { return _parser; } } |
| 345 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 346 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 347 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 348 | get { return global::Grpc.Testing.PayloadsReflection.Descriptor.MessageTypes[2]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 349 | } |
| 350 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 351 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 352 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 353 | get { return Descriptor; } |
| 354 | } |
| 355 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 356 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 357 | public ComplexProtoParams() { |
| 358 | OnConstruction(); |
| 359 | } |
| 360 | |
| 361 | partial void OnConstruction(); |
| 362 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 363 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 364 | public ComplexProtoParams(ComplexProtoParams other) : this() { |
| 365 | } |
| 366 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 367 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 368 | public ComplexProtoParams Clone() { |
| 369 | return new ComplexProtoParams(this); |
| 370 | } |
| 371 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 372 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 373 | public override bool Equals(object other) { |
| 374 | return Equals(other as ComplexProtoParams); |
| 375 | } |
| 376 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 377 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 378 | public bool Equals(ComplexProtoParams other) { |
| 379 | if (ReferenceEquals(other, null)) { |
| 380 | return false; |
| 381 | } |
| 382 | if (ReferenceEquals(other, this)) { |
| 383 | return true; |
| 384 | } |
| 385 | return true; |
| 386 | } |
| 387 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 388 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 389 | public override int GetHashCode() { |
| 390 | int hash = 1; |
| 391 | return hash; |
| 392 | } |
| 393 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 394 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 395 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 396 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 397 | } |
| 398 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 399 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 400 | public void WriteTo(pb::CodedOutputStream output) { |
| 401 | } |
| 402 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 403 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 404 | public int CalculateSize() { |
| 405 | int size = 0; |
| 406 | return size; |
| 407 | } |
| 408 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 409 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 410 | public void MergeFrom(ComplexProtoParams other) { |
| 411 | if (other == null) { |
| 412 | return; |
| 413 | } |
| 414 | } |
| 415 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 416 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 417 | public void MergeFrom(pb::CodedInputStream input) { |
| 418 | uint tag; |
| 419 | while ((tag = input.ReadTag()) != 0) { |
| 420 | switch(tag) { |
| 421 | default: |
| 422 | input.SkipLastField(); |
| 423 | break; |
| 424 | } |
| 425 | } |
| 426 | } |
| 427 | |
| 428 | } |
| 429 | |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 430 | public sealed partial class PayloadConfig : pb::IMessage<PayloadConfig> { |
| 431 | private static readonly pb::MessageParser<PayloadConfig> _parser = new pb::MessageParser<PayloadConfig>(() => new PayloadConfig()); |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 432 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 433 | public static pb::MessageParser<PayloadConfig> Parser { get { return _parser; } } |
| 434 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 435 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 436 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 437 | get { return global::Grpc.Testing.PayloadsReflection.Descriptor.MessageTypes[3]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 438 | } |
| 439 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 440 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 441 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 442 | get { return Descriptor; } |
| 443 | } |
| 444 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 445 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 446 | public PayloadConfig() { |
| 447 | OnConstruction(); |
| 448 | } |
| 449 | |
| 450 | partial void OnConstruction(); |
| 451 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 452 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 453 | public PayloadConfig(PayloadConfig other) : this() { |
| 454 | switch (other.PayloadCase) { |
| 455 | case PayloadOneofCase.BytebufParams: |
| 456 | BytebufParams = other.BytebufParams.Clone(); |
| 457 | break; |
| 458 | case PayloadOneofCase.SimpleParams: |
| 459 | SimpleParams = other.SimpleParams.Clone(); |
| 460 | break; |
| 461 | case PayloadOneofCase.ComplexParams: |
| 462 | ComplexParams = other.ComplexParams.Clone(); |
| 463 | break; |
| 464 | } |
| 465 | |
| 466 | } |
| 467 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 468 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 469 | public PayloadConfig Clone() { |
| 470 | return new PayloadConfig(this); |
| 471 | } |
| 472 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 473 | /// <summary>Field number for the "bytebuf_params" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 474 | public const int BytebufParamsFieldNumber = 1; |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 475 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 476 | public global::Grpc.Testing.ByteBufferParams BytebufParams { |
| 477 | get { return payloadCase_ == PayloadOneofCase.BytebufParams ? (global::Grpc.Testing.ByteBufferParams) payload_ : null; } |
| 478 | set { |
| 479 | payload_ = value; |
| 480 | payloadCase_ = value == null ? PayloadOneofCase.None : PayloadOneofCase.BytebufParams; |
| 481 | } |
| 482 | } |
| 483 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 484 | /// <summary>Field number for the "simple_params" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 485 | public const int SimpleParamsFieldNumber = 2; |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 486 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 487 | public global::Grpc.Testing.SimpleProtoParams SimpleParams { |
| 488 | get { return payloadCase_ == PayloadOneofCase.SimpleParams ? (global::Grpc.Testing.SimpleProtoParams) payload_ : null; } |
| 489 | set { |
| 490 | payload_ = value; |
| 491 | payloadCase_ = value == null ? PayloadOneofCase.None : PayloadOneofCase.SimpleParams; |
| 492 | } |
| 493 | } |
| 494 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 495 | /// <summary>Field number for the "complex_params" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 496 | public const int ComplexParamsFieldNumber = 3; |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 497 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 498 | public global::Grpc.Testing.ComplexProtoParams ComplexParams { |
| 499 | get { return payloadCase_ == PayloadOneofCase.ComplexParams ? (global::Grpc.Testing.ComplexProtoParams) payload_ : null; } |
| 500 | set { |
| 501 | payload_ = value; |
| 502 | payloadCase_ = value == null ? PayloadOneofCase.None : PayloadOneofCase.ComplexParams; |
| 503 | } |
| 504 | } |
| 505 | |
| 506 | private object payload_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 507 | /// <summary>Enum of possible cases for the "payload" oneof.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 508 | public enum PayloadOneofCase { |
| 509 | None = 0, |
| 510 | BytebufParams = 1, |
| 511 | SimpleParams = 2, |
| 512 | ComplexParams = 3, |
| 513 | } |
| 514 | private PayloadOneofCase payloadCase_ = PayloadOneofCase.None; |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 515 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 516 | public PayloadOneofCase PayloadCase { |
| 517 | get { return payloadCase_; } |
| 518 | } |
| 519 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 520 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 521 | public void ClearPayload() { |
| 522 | payloadCase_ = PayloadOneofCase.None; |
| 523 | payload_ = null; |
| 524 | } |
| 525 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 526 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 527 | public override bool Equals(object other) { |
| 528 | return Equals(other as PayloadConfig); |
| 529 | } |
| 530 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 531 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 532 | public bool Equals(PayloadConfig other) { |
| 533 | if (ReferenceEquals(other, null)) { |
| 534 | return false; |
| 535 | } |
| 536 | if (ReferenceEquals(other, this)) { |
| 537 | return true; |
| 538 | } |
| 539 | if (!object.Equals(BytebufParams, other.BytebufParams)) return false; |
| 540 | if (!object.Equals(SimpleParams, other.SimpleParams)) return false; |
| 541 | if (!object.Equals(ComplexParams, other.ComplexParams)) return false; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 542 | if (PayloadCase != other.PayloadCase) return false; |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 543 | return true; |
| 544 | } |
| 545 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 546 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 547 | public override int GetHashCode() { |
| 548 | int hash = 1; |
| 549 | if (payloadCase_ == PayloadOneofCase.BytebufParams) hash ^= BytebufParams.GetHashCode(); |
| 550 | if (payloadCase_ == PayloadOneofCase.SimpleParams) hash ^= SimpleParams.GetHashCode(); |
| 551 | if (payloadCase_ == PayloadOneofCase.ComplexParams) hash ^= ComplexParams.GetHashCode(); |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 552 | hash ^= (int) payloadCase_; |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 553 | return hash; |
| 554 | } |
| 555 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 556 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 557 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 558 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 559 | } |
| 560 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 561 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 562 | public void WriteTo(pb::CodedOutputStream output) { |
| 563 | if (payloadCase_ == PayloadOneofCase.BytebufParams) { |
| 564 | output.WriteRawTag(10); |
| 565 | output.WriteMessage(BytebufParams); |
| 566 | } |
| 567 | if (payloadCase_ == PayloadOneofCase.SimpleParams) { |
| 568 | output.WriteRawTag(18); |
| 569 | output.WriteMessage(SimpleParams); |
| 570 | } |
| 571 | if (payloadCase_ == PayloadOneofCase.ComplexParams) { |
| 572 | output.WriteRawTag(26); |
| 573 | output.WriteMessage(ComplexParams); |
| 574 | } |
| 575 | } |
| 576 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 577 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 578 | public int CalculateSize() { |
| 579 | int size = 0; |
| 580 | if (payloadCase_ == PayloadOneofCase.BytebufParams) { |
| 581 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(BytebufParams); |
| 582 | } |
| 583 | if (payloadCase_ == PayloadOneofCase.SimpleParams) { |
| 584 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(SimpleParams); |
| 585 | } |
| 586 | if (payloadCase_ == PayloadOneofCase.ComplexParams) { |
| 587 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(ComplexParams); |
| 588 | } |
| 589 | return size; |
| 590 | } |
| 591 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 592 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 593 | public void MergeFrom(PayloadConfig other) { |
| 594 | if (other == null) { |
| 595 | return; |
| 596 | } |
| 597 | switch (other.PayloadCase) { |
| 598 | case PayloadOneofCase.BytebufParams: |
| 599 | BytebufParams = other.BytebufParams; |
| 600 | break; |
| 601 | case PayloadOneofCase.SimpleParams: |
| 602 | SimpleParams = other.SimpleParams; |
| 603 | break; |
| 604 | case PayloadOneofCase.ComplexParams: |
| 605 | ComplexParams = other.ComplexParams; |
| 606 | break; |
| 607 | } |
| 608 | |
| 609 | } |
| 610 | |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 611 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 612 | public void MergeFrom(pb::CodedInputStream input) { |
| 613 | uint tag; |
| 614 | while ((tag = input.ReadTag()) != 0) { |
| 615 | switch(tag) { |
| 616 | default: |
| 617 | input.SkipLastField(); |
| 618 | break; |
| 619 | case 10: { |
| 620 | global::Grpc.Testing.ByteBufferParams subBuilder = new global::Grpc.Testing.ByteBufferParams(); |
| 621 | if (payloadCase_ == PayloadOneofCase.BytebufParams) { |
| 622 | subBuilder.MergeFrom(BytebufParams); |
| 623 | } |
| 624 | input.ReadMessage(subBuilder); |
| 625 | BytebufParams = subBuilder; |
| 626 | break; |
| 627 | } |
| 628 | case 18: { |
| 629 | global::Grpc.Testing.SimpleProtoParams subBuilder = new global::Grpc.Testing.SimpleProtoParams(); |
| 630 | if (payloadCase_ == PayloadOneofCase.SimpleParams) { |
| 631 | subBuilder.MergeFrom(SimpleParams); |
| 632 | } |
| 633 | input.ReadMessage(subBuilder); |
| 634 | SimpleParams = subBuilder; |
| 635 | break; |
| 636 | } |
| 637 | case 26: { |
| 638 | global::Grpc.Testing.ComplexProtoParams subBuilder = new global::Grpc.Testing.ComplexProtoParams(); |
| 639 | if (payloadCase_ == PayloadOneofCase.ComplexParams) { |
| 640 | subBuilder.MergeFrom(ComplexParams); |
| 641 | } |
| 642 | input.ReadMessage(subBuilder); |
| 643 | ComplexParams = subBuilder; |
| 644 | break; |
| 645 | } |
| 646 | } |
| 647 | } |
| 648 | } |
| 649 | |
| 650 | } |
| 651 | |
| 652 | #endregion |
| 653 | |
| 654 | } |
| 655 | |
| 656 | #endregion Designer generated code |