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/control.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/control.proto</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 13 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 14 | public static partial class ControlReflection { |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 15 | |
| 16 | #region Descriptor |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 17 | /// <summary>File descriptor for src/proto/grpc/testing/control.proto</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 18 | public static pbr::FileDescriptor Descriptor { |
| 19 | get { return descriptor; } |
| 20 | } |
| 21 | private static pbr::FileDescriptor descriptor; |
| 22 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 23 | static ControlReflection() { |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 24 | byte[] descriptorData = global::System.Convert.FromBase64String( |
| 25 | string.Concat( |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 26 | "CiRzcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL2NvbnRyb2wucHJvdG8SDGdycGMu", |
| 27 | "dGVzdGluZxolc3JjL3Byb3RvL2dycGMvdGVzdGluZy9wYXlsb2Fkcy5wcm90", |
| 28 | "bxoic3JjL3Byb3RvL2dycGMvdGVzdGluZy9zdGF0cy5wcm90byIlCg1Qb2lz", |
| 29 | "c29uUGFyYW1zEhQKDG9mZmVyZWRfbG9hZBgBIAEoASJBCg1Vbmlmb3JtUGFy", |
| 30 | "YW1zEhcKD2ludGVyYXJyaXZhbF9sbxgBIAEoARIXCg9pbnRlcmFycml2YWxf", |
| 31 | "aGkYAiABKAEiKwoTRGV0ZXJtaW5pc3RpY1BhcmFtcxIUCgxvZmZlcmVkX2xv", |
| 32 | "YWQYASABKAEiOAoMUGFyZXRvUGFyYW1zEhkKEWludGVyYXJyaXZhbF9iYXNl", |
| 33 | "GAEgASgBEg0KBWFscGhhGAIgASgBIhIKEENsb3NlZExvb3BQYXJhbXMijgIK", |
| 34 | "CkxvYWRQYXJhbXMSNQoLY2xvc2VkX2xvb3AYASABKAsyHi5ncnBjLnRlc3Rp", |
| 35 | "bmcuQ2xvc2VkTG9vcFBhcmFtc0gAEi4KB3BvaXNzb24YAiABKAsyGy5ncnBj", |
| 36 | "LnRlc3RpbmcuUG9pc3NvblBhcmFtc0gAEi4KB3VuaWZvcm0YAyABKAsyGy5n", |
| 37 | "cnBjLnRlc3RpbmcuVW5pZm9ybVBhcmFtc0gAEjMKBmRldGVybRgEIAEoCzIh", |
| 38 | "LmdycGMudGVzdGluZy5EZXRlcm1pbmlzdGljUGFyYW1zSAASLAoGcGFyZXRv", |
| 39 | "GAUgASgLMhouZ3JwYy50ZXN0aW5nLlBhcmV0b1BhcmFtc0gAQgYKBGxvYWQi", |
| 40 | "QwoOU2VjdXJpdHlQYXJhbXMSEwoLdXNlX3Rlc3RfY2EYASABKAgSHAoUc2Vy", |
| 41 | "dmVyX2hvc3Rfb3ZlcnJpZGUYAiABKAkirwMKDENsaWVudENvbmZpZxIWCg5z", |
| 42 | "ZXJ2ZXJfdGFyZ2V0cxgBIAMoCRItCgtjbGllbnRfdHlwZRgCIAEoDjIYLmdy", |
| 43 | "cGMudGVzdGluZy5DbGllbnRUeXBlEjUKD3NlY3VyaXR5X3BhcmFtcxgDIAEo", |
| 44 | "CzIcLmdycGMudGVzdGluZy5TZWN1cml0eVBhcmFtcxIkChxvdXRzdGFuZGlu", |
| 45 | "Z19ycGNzX3Blcl9jaGFubmVsGAQgASgFEhcKD2NsaWVudF9jaGFubmVscxgF", |
| 46 | "IAEoBRIcChRhc3luY19jbGllbnRfdGhyZWFkcxgHIAEoBRInCghycGNfdHlw", |
| 47 | "ZRgIIAEoDjIVLmdycGMudGVzdGluZy5ScGNUeXBlEi0KC2xvYWRfcGFyYW1z", |
| 48 | "GAogASgLMhguZ3JwYy50ZXN0aW5nLkxvYWRQYXJhbXMSMwoOcGF5bG9hZF9j", |
| 49 | "b25maWcYCyABKAsyGy5ncnBjLnRlc3RpbmcuUGF5bG9hZENvbmZpZxI3ChBo", |
| 50 | "aXN0b2dyYW1fcGFyYW1zGAwgASgLMh0uZ3JwYy50ZXN0aW5nLkhpc3RvZ3Jh", |
| 51 | "bVBhcmFtcyI4CgxDbGllbnRTdGF0dXMSKAoFc3RhdHMYASABKAsyGS5ncnBj", |
| 52 | "LnRlc3RpbmcuQ2xpZW50U3RhdHMiFQoETWFyaxINCgVyZXNldBgBIAEoCCJo", |
| 53 | "CgpDbGllbnRBcmdzEisKBXNldHVwGAEgASgLMhouZ3JwYy50ZXN0aW5nLkNs", |
| 54 | "aWVudENvbmZpZ0gAEiIKBG1hcmsYAiABKAsyEi5ncnBjLnRlc3RpbmcuTWFy", |
| 55 | "a0gAQgkKB2FyZ3R5cGUi9wEKDFNlcnZlckNvbmZpZxItCgtzZXJ2ZXJfdHlw", |
| 56 | "ZRgBIAEoDjIYLmdycGMudGVzdGluZy5TZXJ2ZXJUeXBlEjUKD3NlY3VyaXR5", |
| 57 | "X3BhcmFtcxgCIAEoCzIcLmdycGMudGVzdGluZy5TZWN1cml0eVBhcmFtcxIM", |
| 58 | "CgRob3N0GAMgASgJEgwKBHBvcnQYBCABKAUSHAoUYXN5bmNfc2VydmVyX3Ro", |
| 59 | "cmVhZHMYByABKAUSEgoKY29yZV9saW1pdBgIIAEoBRIzCg5wYXlsb2FkX2Nv", |
| 60 | "bmZpZxgJIAEoCzIbLmdycGMudGVzdGluZy5QYXlsb2FkQ29uZmlnImgKClNl", |
| 61 | "cnZlckFyZ3MSKwoFc2V0dXAYASABKAsyGi5ncnBjLnRlc3RpbmcuU2VydmVy", |
| 62 | "Q29uZmlnSAASIgoEbWFyaxgCIAEoCzISLmdycGMudGVzdGluZy5NYXJrSABC", |
| 63 | "CQoHYXJndHlwZSJVCgxTZXJ2ZXJTdGF0dXMSKAoFc3RhdHMYASABKAsyGS5n", |
| 64 | "cnBjLnRlc3RpbmcuU2VydmVyU3RhdHMSDAoEcG9ydBgCIAEoBRINCgVjb3Jl", |
| 65 | "cxgDIAEoBSovCgpDbGllbnRUeXBlEg8KC1NZTkNfQ0xJRU5UEAASEAoMQVNZ", |
| 66 | "TkNfQ0xJRU5UEAEqLwoKU2VydmVyVHlwZRIPCgtTWU5DX1NFUlZFUhAAEhAK", |
| 67 | "DEFTWU5DX1NFUlZFUhABKiMKB1JwY1R5cGUSCQoFVU5BUlkQABINCglTVFJF", |
| 68 | "QU1JTkcQAWIGcHJvdG8z")); |
| 69 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
| 70 | new pbr::FileDescriptor[] { global::Grpc.Testing.PayloadsReflection.Descriptor, global::Grpc.Testing.StatsReflection.Descriptor, }, |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 71 | new pbr::GeneratedCodeInfo(new[] {typeof(global::Grpc.Testing.ClientType), typeof(global::Grpc.Testing.ServerType), typeof(global::Grpc.Testing.RpcType), }, new pbr::GeneratedCodeInfo[] { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 72 | new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.PoissonParams), global::Grpc.Testing.PoissonParams.Parser, new[]{ "OfferedLoad" }, null, null, null), |
| 73 | new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.UniformParams), global::Grpc.Testing.UniformParams.Parser, new[]{ "InterarrivalLo", "InterarrivalHi" }, null, null, null), |
| 74 | new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.DeterministicParams), global::Grpc.Testing.DeterministicParams.Parser, new[]{ "OfferedLoad" }, null, null, null), |
| 75 | new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ParetoParams), global::Grpc.Testing.ParetoParams.Parser, new[]{ "InterarrivalBase", "Alpha" }, null, null, null), |
| 76 | new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClosedLoopParams), global::Grpc.Testing.ClosedLoopParams.Parser, null, null, null, null), |
| 77 | new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.LoadParams), global::Grpc.Testing.LoadParams.Parser, new[]{ "ClosedLoop", "Poisson", "Uniform", "Determ", "Pareto" }, new[]{ "Load" }, null, null), |
| 78 | new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.SecurityParams), global::Grpc.Testing.SecurityParams.Parser, new[]{ "UseTestCa", "ServerHostOverride" }, null, null, null), |
| 79 | new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClientConfig), global::Grpc.Testing.ClientConfig.Parser, new[]{ "ServerTargets", "ClientType", "SecurityParams", "OutstandingRpcsPerChannel", "ClientChannels", "AsyncClientThreads", "RpcType", "LoadParams", "PayloadConfig", "HistogramParams" }, null, null, null), |
| 80 | new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClientStatus), global::Grpc.Testing.ClientStatus.Parser, new[]{ "Stats" }, null, null, null), |
| 81 | new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.Mark), global::Grpc.Testing.Mark.Parser, new[]{ "Reset" }, null, null, null), |
| 82 | new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClientArgs), global::Grpc.Testing.ClientArgs.Parser, new[]{ "Setup", "Mark" }, new[]{ "Argtype" }, null, null), |
| 83 | new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ServerConfig), global::Grpc.Testing.ServerConfig.Parser, new[]{ "ServerType", "SecurityParams", "Host", "Port", "AsyncServerThreads", "CoreLimit", "PayloadConfig" }, null, null, null), |
| 84 | new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ServerArgs), global::Grpc.Testing.ServerArgs.Parser, new[]{ "Setup", "Mark" }, new[]{ "Argtype" }, null, null), |
| 85 | new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ServerStatus), global::Grpc.Testing.ServerStatus.Parser, new[]{ "Stats", "Port", "Cores" }, null, null, null) |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 86 | })); |
| 87 | } |
| 88 | #endregion |
| 89 | |
| 90 | } |
| 91 | #region Enums |
| 92 | public enum ClientType { |
| 93 | SYNC_CLIENT = 0, |
| 94 | ASYNC_CLIENT = 1, |
| 95 | } |
| 96 | |
| 97 | public enum ServerType { |
| 98 | SYNC_SERVER = 0, |
| 99 | ASYNC_SERVER = 1, |
| 100 | } |
| 101 | |
| 102 | public enum RpcType { |
| 103 | UNARY = 0, |
| 104 | STREAMING = 1, |
| 105 | } |
| 106 | |
| 107 | #endregion |
| 108 | |
| 109 | #region Messages |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 110 | /// <summary> |
| 111 | /// Parameters of poisson process distribution, which is a good representation |
| 112 | /// of activity coming in from independent identical stationary sources. |
| 113 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 114 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 115 | public sealed partial class PoissonParams : pb::IMessage<PoissonParams> { |
| 116 | private static readonly pb::MessageParser<PoissonParams> _parser = new pb::MessageParser<PoissonParams>(() => new PoissonParams()); |
| 117 | public static pb::MessageParser<PoissonParams> Parser { get { return _parser; } } |
| 118 | |
| 119 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 120 | get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[0]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 121 | } |
| 122 | |
| 123 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 124 | get { return Descriptor; } |
| 125 | } |
| 126 | |
| 127 | public PoissonParams() { |
| 128 | OnConstruction(); |
| 129 | } |
| 130 | |
| 131 | partial void OnConstruction(); |
| 132 | |
| 133 | public PoissonParams(PoissonParams other) : this() { |
| 134 | offeredLoad_ = other.offeredLoad_; |
| 135 | } |
| 136 | |
| 137 | public PoissonParams Clone() { |
| 138 | return new PoissonParams(this); |
| 139 | } |
| 140 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 141 | /// <summary>Field number for the "offered_load" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 142 | public const int OfferedLoadFieldNumber = 1; |
| 143 | private double offeredLoad_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 144 | /// <summary> |
| 145 | /// The rate of arrivals (a.k.a. lambda parameter of the exp distribution). |
| 146 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 147 | public double OfferedLoad { |
| 148 | get { return offeredLoad_; } |
| 149 | set { |
| 150 | offeredLoad_ = value; |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | public override bool Equals(object other) { |
| 155 | return Equals(other as PoissonParams); |
| 156 | } |
| 157 | |
| 158 | public bool Equals(PoissonParams other) { |
| 159 | if (ReferenceEquals(other, null)) { |
| 160 | return false; |
| 161 | } |
| 162 | if (ReferenceEquals(other, this)) { |
| 163 | return true; |
| 164 | } |
| 165 | if (OfferedLoad != other.OfferedLoad) return false; |
| 166 | return true; |
| 167 | } |
| 168 | |
| 169 | public override int GetHashCode() { |
| 170 | int hash = 1; |
| 171 | if (OfferedLoad != 0D) hash ^= OfferedLoad.GetHashCode(); |
| 172 | return hash; |
| 173 | } |
| 174 | |
| 175 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 176 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 177 | } |
| 178 | |
| 179 | public void WriteTo(pb::CodedOutputStream output) { |
| 180 | if (OfferedLoad != 0D) { |
| 181 | output.WriteRawTag(9); |
| 182 | output.WriteDouble(OfferedLoad); |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | public int CalculateSize() { |
| 187 | int size = 0; |
| 188 | if (OfferedLoad != 0D) { |
| 189 | size += 1 + 8; |
| 190 | } |
| 191 | return size; |
| 192 | } |
| 193 | |
| 194 | public void MergeFrom(PoissonParams other) { |
| 195 | if (other == null) { |
| 196 | return; |
| 197 | } |
| 198 | if (other.OfferedLoad != 0D) { |
| 199 | OfferedLoad = other.OfferedLoad; |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | public void MergeFrom(pb::CodedInputStream input) { |
| 204 | uint tag; |
| 205 | while ((tag = input.ReadTag()) != 0) { |
| 206 | switch(tag) { |
| 207 | default: |
| 208 | input.SkipLastField(); |
| 209 | break; |
| 210 | case 9: { |
| 211 | OfferedLoad = input.ReadDouble(); |
| 212 | break; |
| 213 | } |
| 214 | } |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | } |
| 219 | |
| 220 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 221 | public sealed partial class UniformParams : pb::IMessage<UniformParams> { |
| 222 | private static readonly pb::MessageParser<UniformParams> _parser = new pb::MessageParser<UniformParams>(() => new UniformParams()); |
| 223 | public static pb::MessageParser<UniformParams> Parser { get { return _parser; } } |
| 224 | |
| 225 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 226 | get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[1]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 227 | } |
| 228 | |
| 229 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 230 | get { return Descriptor; } |
| 231 | } |
| 232 | |
| 233 | public UniformParams() { |
| 234 | OnConstruction(); |
| 235 | } |
| 236 | |
| 237 | partial void OnConstruction(); |
| 238 | |
| 239 | public UniformParams(UniformParams other) : this() { |
| 240 | interarrivalLo_ = other.interarrivalLo_; |
| 241 | interarrivalHi_ = other.interarrivalHi_; |
| 242 | } |
| 243 | |
| 244 | public UniformParams Clone() { |
| 245 | return new UniformParams(this); |
| 246 | } |
| 247 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 248 | /// <summary>Field number for the "interarrival_lo" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 249 | public const int InterarrivalLoFieldNumber = 1; |
| 250 | private double interarrivalLo_; |
| 251 | public double InterarrivalLo { |
| 252 | get { return interarrivalLo_; } |
| 253 | set { |
| 254 | interarrivalLo_ = value; |
| 255 | } |
| 256 | } |
| 257 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 258 | /// <summary>Field number for the "interarrival_hi" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 259 | public const int InterarrivalHiFieldNumber = 2; |
| 260 | private double interarrivalHi_; |
| 261 | public double InterarrivalHi { |
| 262 | get { return interarrivalHi_; } |
| 263 | set { |
| 264 | interarrivalHi_ = value; |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | public override bool Equals(object other) { |
| 269 | return Equals(other as UniformParams); |
| 270 | } |
| 271 | |
| 272 | public bool Equals(UniformParams other) { |
| 273 | if (ReferenceEquals(other, null)) { |
| 274 | return false; |
| 275 | } |
| 276 | if (ReferenceEquals(other, this)) { |
| 277 | return true; |
| 278 | } |
| 279 | if (InterarrivalLo != other.InterarrivalLo) return false; |
| 280 | if (InterarrivalHi != other.InterarrivalHi) return false; |
| 281 | return true; |
| 282 | } |
| 283 | |
| 284 | public override int GetHashCode() { |
| 285 | int hash = 1; |
| 286 | if (InterarrivalLo != 0D) hash ^= InterarrivalLo.GetHashCode(); |
| 287 | if (InterarrivalHi != 0D) hash ^= InterarrivalHi.GetHashCode(); |
| 288 | return hash; |
| 289 | } |
| 290 | |
| 291 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 292 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 293 | } |
| 294 | |
| 295 | public void WriteTo(pb::CodedOutputStream output) { |
| 296 | if (InterarrivalLo != 0D) { |
| 297 | output.WriteRawTag(9); |
| 298 | output.WriteDouble(InterarrivalLo); |
| 299 | } |
| 300 | if (InterarrivalHi != 0D) { |
| 301 | output.WriteRawTag(17); |
| 302 | output.WriteDouble(InterarrivalHi); |
| 303 | } |
| 304 | } |
| 305 | |
| 306 | public int CalculateSize() { |
| 307 | int size = 0; |
| 308 | if (InterarrivalLo != 0D) { |
| 309 | size += 1 + 8; |
| 310 | } |
| 311 | if (InterarrivalHi != 0D) { |
| 312 | size += 1 + 8; |
| 313 | } |
| 314 | return size; |
| 315 | } |
| 316 | |
| 317 | public void MergeFrom(UniformParams other) { |
| 318 | if (other == null) { |
| 319 | return; |
| 320 | } |
| 321 | if (other.InterarrivalLo != 0D) { |
| 322 | InterarrivalLo = other.InterarrivalLo; |
| 323 | } |
| 324 | if (other.InterarrivalHi != 0D) { |
| 325 | InterarrivalHi = other.InterarrivalHi; |
| 326 | } |
| 327 | } |
| 328 | |
| 329 | public void MergeFrom(pb::CodedInputStream input) { |
| 330 | uint tag; |
| 331 | while ((tag = input.ReadTag()) != 0) { |
| 332 | switch(tag) { |
| 333 | default: |
| 334 | input.SkipLastField(); |
| 335 | break; |
| 336 | case 9: { |
| 337 | InterarrivalLo = input.ReadDouble(); |
| 338 | break; |
| 339 | } |
| 340 | case 17: { |
| 341 | InterarrivalHi = input.ReadDouble(); |
| 342 | break; |
| 343 | } |
| 344 | } |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | } |
| 349 | |
| 350 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 351 | public sealed partial class DeterministicParams : pb::IMessage<DeterministicParams> { |
| 352 | private static readonly pb::MessageParser<DeterministicParams> _parser = new pb::MessageParser<DeterministicParams>(() => new DeterministicParams()); |
| 353 | public static pb::MessageParser<DeterministicParams> Parser { get { return _parser; } } |
| 354 | |
| 355 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 356 | get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[2]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 357 | } |
| 358 | |
| 359 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 360 | get { return Descriptor; } |
| 361 | } |
| 362 | |
| 363 | public DeterministicParams() { |
| 364 | OnConstruction(); |
| 365 | } |
| 366 | |
| 367 | partial void OnConstruction(); |
| 368 | |
| 369 | public DeterministicParams(DeterministicParams other) : this() { |
| 370 | offeredLoad_ = other.offeredLoad_; |
| 371 | } |
| 372 | |
| 373 | public DeterministicParams Clone() { |
| 374 | return new DeterministicParams(this); |
| 375 | } |
| 376 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 377 | /// <summary>Field number for the "offered_load" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 378 | public const int OfferedLoadFieldNumber = 1; |
| 379 | private double offeredLoad_; |
| 380 | public double OfferedLoad { |
| 381 | get { return offeredLoad_; } |
| 382 | set { |
| 383 | offeredLoad_ = value; |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | public override bool Equals(object other) { |
| 388 | return Equals(other as DeterministicParams); |
| 389 | } |
| 390 | |
| 391 | public bool Equals(DeterministicParams other) { |
| 392 | if (ReferenceEquals(other, null)) { |
| 393 | return false; |
| 394 | } |
| 395 | if (ReferenceEquals(other, this)) { |
| 396 | return true; |
| 397 | } |
| 398 | if (OfferedLoad != other.OfferedLoad) return false; |
| 399 | return true; |
| 400 | } |
| 401 | |
| 402 | public override int GetHashCode() { |
| 403 | int hash = 1; |
| 404 | if (OfferedLoad != 0D) hash ^= OfferedLoad.GetHashCode(); |
| 405 | return hash; |
| 406 | } |
| 407 | |
| 408 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 409 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 410 | } |
| 411 | |
| 412 | public void WriteTo(pb::CodedOutputStream output) { |
| 413 | if (OfferedLoad != 0D) { |
| 414 | output.WriteRawTag(9); |
| 415 | output.WriteDouble(OfferedLoad); |
| 416 | } |
| 417 | } |
| 418 | |
| 419 | public int CalculateSize() { |
| 420 | int size = 0; |
| 421 | if (OfferedLoad != 0D) { |
| 422 | size += 1 + 8; |
| 423 | } |
| 424 | return size; |
| 425 | } |
| 426 | |
| 427 | public void MergeFrom(DeterministicParams other) { |
| 428 | if (other == null) { |
| 429 | return; |
| 430 | } |
| 431 | if (other.OfferedLoad != 0D) { |
| 432 | OfferedLoad = other.OfferedLoad; |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | public void MergeFrom(pb::CodedInputStream input) { |
| 437 | uint tag; |
| 438 | while ((tag = input.ReadTag()) != 0) { |
| 439 | switch(tag) { |
| 440 | default: |
| 441 | input.SkipLastField(); |
| 442 | break; |
| 443 | case 9: { |
| 444 | OfferedLoad = input.ReadDouble(); |
| 445 | break; |
| 446 | } |
| 447 | } |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | } |
| 452 | |
| 453 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 454 | public sealed partial class ParetoParams : pb::IMessage<ParetoParams> { |
| 455 | private static readonly pb::MessageParser<ParetoParams> _parser = new pb::MessageParser<ParetoParams>(() => new ParetoParams()); |
| 456 | public static pb::MessageParser<ParetoParams> Parser { get { return _parser; } } |
| 457 | |
| 458 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 459 | get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[3]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 460 | } |
| 461 | |
| 462 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 463 | get { return Descriptor; } |
| 464 | } |
| 465 | |
| 466 | public ParetoParams() { |
| 467 | OnConstruction(); |
| 468 | } |
| 469 | |
| 470 | partial void OnConstruction(); |
| 471 | |
| 472 | public ParetoParams(ParetoParams other) : this() { |
| 473 | interarrivalBase_ = other.interarrivalBase_; |
| 474 | alpha_ = other.alpha_; |
| 475 | } |
| 476 | |
| 477 | public ParetoParams Clone() { |
| 478 | return new ParetoParams(this); |
| 479 | } |
| 480 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 481 | /// <summary>Field number for the "interarrival_base" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 482 | public const int InterarrivalBaseFieldNumber = 1; |
| 483 | private double interarrivalBase_; |
| 484 | public double InterarrivalBase { |
| 485 | get { return interarrivalBase_; } |
| 486 | set { |
| 487 | interarrivalBase_ = value; |
| 488 | } |
| 489 | } |
| 490 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 491 | /// <summary>Field number for the "alpha" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 492 | public const int AlphaFieldNumber = 2; |
| 493 | private double alpha_; |
| 494 | public double Alpha { |
| 495 | get { return alpha_; } |
| 496 | set { |
| 497 | alpha_ = value; |
| 498 | } |
| 499 | } |
| 500 | |
| 501 | public override bool Equals(object other) { |
| 502 | return Equals(other as ParetoParams); |
| 503 | } |
| 504 | |
| 505 | public bool Equals(ParetoParams other) { |
| 506 | if (ReferenceEquals(other, null)) { |
| 507 | return false; |
| 508 | } |
| 509 | if (ReferenceEquals(other, this)) { |
| 510 | return true; |
| 511 | } |
| 512 | if (InterarrivalBase != other.InterarrivalBase) return false; |
| 513 | if (Alpha != other.Alpha) return false; |
| 514 | return true; |
| 515 | } |
| 516 | |
| 517 | public override int GetHashCode() { |
| 518 | int hash = 1; |
| 519 | if (InterarrivalBase != 0D) hash ^= InterarrivalBase.GetHashCode(); |
| 520 | if (Alpha != 0D) hash ^= Alpha.GetHashCode(); |
| 521 | return hash; |
| 522 | } |
| 523 | |
| 524 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 525 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 526 | } |
| 527 | |
| 528 | public void WriteTo(pb::CodedOutputStream output) { |
| 529 | if (InterarrivalBase != 0D) { |
| 530 | output.WriteRawTag(9); |
| 531 | output.WriteDouble(InterarrivalBase); |
| 532 | } |
| 533 | if (Alpha != 0D) { |
| 534 | output.WriteRawTag(17); |
| 535 | output.WriteDouble(Alpha); |
| 536 | } |
| 537 | } |
| 538 | |
| 539 | public int CalculateSize() { |
| 540 | int size = 0; |
| 541 | if (InterarrivalBase != 0D) { |
| 542 | size += 1 + 8; |
| 543 | } |
| 544 | if (Alpha != 0D) { |
| 545 | size += 1 + 8; |
| 546 | } |
| 547 | return size; |
| 548 | } |
| 549 | |
| 550 | public void MergeFrom(ParetoParams other) { |
| 551 | if (other == null) { |
| 552 | return; |
| 553 | } |
| 554 | if (other.InterarrivalBase != 0D) { |
| 555 | InterarrivalBase = other.InterarrivalBase; |
| 556 | } |
| 557 | if (other.Alpha != 0D) { |
| 558 | Alpha = other.Alpha; |
| 559 | } |
| 560 | } |
| 561 | |
| 562 | public void MergeFrom(pb::CodedInputStream input) { |
| 563 | uint tag; |
| 564 | while ((tag = input.ReadTag()) != 0) { |
| 565 | switch(tag) { |
| 566 | default: |
| 567 | input.SkipLastField(); |
| 568 | break; |
| 569 | case 9: { |
| 570 | InterarrivalBase = input.ReadDouble(); |
| 571 | break; |
| 572 | } |
| 573 | case 17: { |
| 574 | Alpha = input.ReadDouble(); |
| 575 | break; |
| 576 | } |
| 577 | } |
| 578 | } |
| 579 | } |
| 580 | |
| 581 | } |
| 582 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 583 | /// <summary> |
| 584 | /// Once an RPC finishes, immediately start a new one. |
| 585 | /// No configuration parameters needed. |
| 586 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 587 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 588 | public sealed partial class ClosedLoopParams : pb::IMessage<ClosedLoopParams> { |
| 589 | private static readonly pb::MessageParser<ClosedLoopParams> _parser = new pb::MessageParser<ClosedLoopParams>(() => new ClosedLoopParams()); |
| 590 | public static pb::MessageParser<ClosedLoopParams> Parser { get { return _parser; } } |
| 591 | |
| 592 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 593 | get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[4]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 594 | } |
| 595 | |
| 596 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 597 | get { return Descriptor; } |
| 598 | } |
| 599 | |
| 600 | public ClosedLoopParams() { |
| 601 | OnConstruction(); |
| 602 | } |
| 603 | |
| 604 | partial void OnConstruction(); |
| 605 | |
| 606 | public ClosedLoopParams(ClosedLoopParams other) : this() { |
| 607 | } |
| 608 | |
| 609 | public ClosedLoopParams Clone() { |
| 610 | return new ClosedLoopParams(this); |
| 611 | } |
| 612 | |
| 613 | public override bool Equals(object other) { |
| 614 | return Equals(other as ClosedLoopParams); |
| 615 | } |
| 616 | |
| 617 | public bool Equals(ClosedLoopParams other) { |
| 618 | if (ReferenceEquals(other, null)) { |
| 619 | return false; |
| 620 | } |
| 621 | if (ReferenceEquals(other, this)) { |
| 622 | return true; |
| 623 | } |
| 624 | return true; |
| 625 | } |
| 626 | |
| 627 | public override int GetHashCode() { |
| 628 | int hash = 1; |
| 629 | return hash; |
| 630 | } |
| 631 | |
| 632 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 633 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 634 | } |
| 635 | |
| 636 | public void WriteTo(pb::CodedOutputStream output) { |
| 637 | } |
| 638 | |
| 639 | public int CalculateSize() { |
| 640 | int size = 0; |
| 641 | return size; |
| 642 | } |
| 643 | |
| 644 | public void MergeFrom(ClosedLoopParams other) { |
| 645 | if (other == null) { |
| 646 | return; |
| 647 | } |
| 648 | } |
| 649 | |
| 650 | public void MergeFrom(pb::CodedInputStream input) { |
| 651 | uint tag; |
| 652 | while ((tag = input.ReadTag()) != 0) { |
| 653 | switch(tag) { |
| 654 | default: |
| 655 | input.SkipLastField(); |
| 656 | break; |
| 657 | } |
| 658 | } |
| 659 | } |
| 660 | |
| 661 | } |
| 662 | |
| 663 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 664 | public sealed partial class LoadParams : pb::IMessage<LoadParams> { |
| 665 | private static readonly pb::MessageParser<LoadParams> _parser = new pb::MessageParser<LoadParams>(() => new LoadParams()); |
| 666 | public static pb::MessageParser<LoadParams> Parser { get { return _parser; } } |
| 667 | |
| 668 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 669 | get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[5]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 670 | } |
| 671 | |
| 672 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 673 | get { return Descriptor; } |
| 674 | } |
| 675 | |
| 676 | public LoadParams() { |
| 677 | OnConstruction(); |
| 678 | } |
| 679 | |
| 680 | partial void OnConstruction(); |
| 681 | |
| 682 | public LoadParams(LoadParams other) : this() { |
| 683 | switch (other.LoadCase) { |
| 684 | case LoadOneofCase.ClosedLoop: |
| 685 | ClosedLoop = other.ClosedLoop.Clone(); |
| 686 | break; |
| 687 | case LoadOneofCase.Poisson: |
| 688 | Poisson = other.Poisson.Clone(); |
| 689 | break; |
| 690 | case LoadOneofCase.Uniform: |
| 691 | Uniform = other.Uniform.Clone(); |
| 692 | break; |
| 693 | case LoadOneofCase.Determ: |
| 694 | Determ = other.Determ.Clone(); |
| 695 | break; |
| 696 | case LoadOneofCase.Pareto: |
| 697 | Pareto = other.Pareto.Clone(); |
| 698 | break; |
| 699 | } |
| 700 | |
| 701 | } |
| 702 | |
| 703 | public LoadParams Clone() { |
| 704 | return new LoadParams(this); |
| 705 | } |
| 706 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 707 | /// <summary>Field number for the "closed_loop" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 708 | public const int ClosedLoopFieldNumber = 1; |
| 709 | public global::Grpc.Testing.ClosedLoopParams ClosedLoop { |
| 710 | get { return loadCase_ == LoadOneofCase.ClosedLoop ? (global::Grpc.Testing.ClosedLoopParams) load_ : null; } |
| 711 | set { |
| 712 | load_ = value; |
| 713 | loadCase_ = value == null ? LoadOneofCase.None : LoadOneofCase.ClosedLoop; |
| 714 | } |
| 715 | } |
| 716 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 717 | /// <summary>Field number for the "poisson" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 718 | public const int PoissonFieldNumber = 2; |
| 719 | public global::Grpc.Testing.PoissonParams Poisson { |
| 720 | get { return loadCase_ == LoadOneofCase.Poisson ? (global::Grpc.Testing.PoissonParams) load_ : null; } |
| 721 | set { |
| 722 | load_ = value; |
| 723 | loadCase_ = value == null ? LoadOneofCase.None : LoadOneofCase.Poisson; |
| 724 | } |
| 725 | } |
| 726 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 727 | /// <summary>Field number for the "uniform" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 728 | public const int UniformFieldNumber = 3; |
| 729 | public global::Grpc.Testing.UniformParams Uniform { |
| 730 | get { return loadCase_ == LoadOneofCase.Uniform ? (global::Grpc.Testing.UniformParams) load_ : null; } |
| 731 | set { |
| 732 | load_ = value; |
| 733 | loadCase_ = value == null ? LoadOneofCase.None : LoadOneofCase.Uniform; |
| 734 | } |
| 735 | } |
| 736 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 737 | /// <summary>Field number for the "determ" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 738 | public const int DetermFieldNumber = 4; |
| 739 | public global::Grpc.Testing.DeterministicParams Determ { |
| 740 | get { return loadCase_ == LoadOneofCase.Determ ? (global::Grpc.Testing.DeterministicParams) load_ : null; } |
| 741 | set { |
| 742 | load_ = value; |
| 743 | loadCase_ = value == null ? LoadOneofCase.None : LoadOneofCase.Determ; |
| 744 | } |
| 745 | } |
| 746 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 747 | /// <summary>Field number for the "pareto" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 748 | public const int ParetoFieldNumber = 5; |
| 749 | public global::Grpc.Testing.ParetoParams Pareto { |
| 750 | get { return loadCase_ == LoadOneofCase.Pareto ? (global::Grpc.Testing.ParetoParams) load_ : null; } |
| 751 | set { |
| 752 | load_ = value; |
| 753 | loadCase_ = value == null ? LoadOneofCase.None : LoadOneofCase.Pareto; |
| 754 | } |
| 755 | } |
| 756 | |
| 757 | private object load_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 758 | /// <summary>Enum of possible cases for the "load" oneof.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 759 | public enum LoadOneofCase { |
| 760 | None = 0, |
| 761 | ClosedLoop = 1, |
| 762 | Poisson = 2, |
| 763 | Uniform = 3, |
| 764 | Determ = 4, |
| 765 | Pareto = 5, |
| 766 | } |
| 767 | private LoadOneofCase loadCase_ = LoadOneofCase.None; |
| 768 | public LoadOneofCase LoadCase { |
| 769 | get { return loadCase_; } |
| 770 | } |
| 771 | |
| 772 | public void ClearLoad() { |
| 773 | loadCase_ = LoadOneofCase.None; |
| 774 | load_ = null; |
| 775 | } |
| 776 | |
| 777 | public override bool Equals(object other) { |
| 778 | return Equals(other as LoadParams); |
| 779 | } |
| 780 | |
| 781 | public bool Equals(LoadParams other) { |
| 782 | if (ReferenceEquals(other, null)) { |
| 783 | return false; |
| 784 | } |
| 785 | if (ReferenceEquals(other, this)) { |
| 786 | return true; |
| 787 | } |
| 788 | if (!object.Equals(ClosedLoop, other.ClosedLoop)) return false; |
| 789 | if (!object.Equals(Poisson, other.Poisson)) return false; |
| 790 | if (!object.Equals(Uniform, other.Uniform)) return false; |
| 791 | if (!object.Equals(Determ, other.Determ)) return false; |
| 792 | if (!object.Equals(Pareto, other.Pareto)) return false; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 793 | if (LoadCase != other.LoadCase) return false; |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 794 | return true; |
| 795 | } |
| 796 | |
| 797 | public override int GetHashCode() { |
| 798 | int hash = 1; |
| 799 | if (loadCase_ == LoadOneofCase.ClosedLoop) hash ^= ClosedLoop.GetHashCode(); |
| 800 | if (loadCase_ == LoadOneofCase.Poisson) hash ^= Poisson.GetHashCode(); |
| 801 | if (loadCase_ == LoadOneofCase.Uniform) hash ^= Uniform.GetHashCode(); |
| 802 | if (loadCase_ == LoadOneofCase.Determ) hash ^= Determ.GetHashCode(); |
| 803 | if (loadCase_ == LoadOneofCase.Pareto) hash ^= Pareto.GetHashCode(); |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 804 | hash ^= (int) loadCase_; |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 805 | return hash; |
| 806 | } |
| 807 | |
| 808 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 809 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 810 | } |
| 811 | |
| 812 | public void WriteTo(pb::CodedOutputStream output) { |
| 813 | if (loadCase_ == LoadOneofCase.ClosedLoop) { |
| 814 | output.WriteRawTag(10); |
| 815 | output.WriteMessage(ClosedLoop); |
| 816 | } |
| 817 | if (loadCase_ == LoadOneofCase.Poisson) { |
| 818 | output.WriteRawTag(18); |
| 819 | output.WriteMessage(Poisson); |
| 820 | } |
| 821 | if (loadCase_ == LoadOneofCase.Uniform) { |
| 822 | output.WriteRawTag(26); |
| 823 | output.WriteMessage(Uniform); |
| 824 | } |
| 825 | if (loadCase_ == LoadOneofCase.Determ) { |
| 826 | output.WriteRawTag(34); |
| 827 | output.WriteMessage(Determ); |
| 828 | } |
| 829 | if (loadCase_ == LoadOneofCase.Pareto) { |
| 830 | output.WriteRawTag(42); |
| 831 | output.WriteMessage(Pareto); |
| 832 | } |
| 833 | } |
| 834 | |
| 835 | public int CalculateSize() { |
| 836 | int size = 0; |
| 837 | if (loadCase_ == LoadOneofCase.ClosedLoop) { |
| 838 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(ClosedLoop); |
| 839 | } |
| 840 | if (loadCase_ == LoadOneofCase.Poisson) { |
| 841 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Poisson); |
| 842 | } |
| 843 | if (loadCase_ == LoadOneofCase.Uniform) { |
| 844 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Uniform); |
| 845 | } |
| 846 | if (loadCase_ == LoadOneofCase.Determ) { |
| 847 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Determ); |
| 848 | } |
| 849 | if (loadCase_ == LoadOneofCase.Pareto) { |
| 850 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Pareto); |
| 851 | } |
| 852 | return size; |
| 853 | } |
| 854 | |
| 855 | public void MergeFrom(LoadParams other) { |
| 856 | if (other == null) { |
| 857 | return; |
| 858 | } |
| 859 | switch (other.LoadCase) { |
| 860 | case LoadOneofCase.ClosedLoop: |
| 861 | ClosedLoop = other.ClosedLoop; |
| 862 | break; |
| 863 | case LoadOneofCase.Poisson: |
| 864 | Poisson = other.Poisson; |
| 865 | break; |
| 866 | case LoadOneofCase.Uniform: |
| 867 | Uniform = other.Uniform; |
| 868 | break; |
| 869 | case LoadOneofCase.Determ: |
| 870 | Determ = other.Determ; |
| 871 | break; |
| 872 | case LoadOneofCase.Pareto: |
| 873 | Pareto = other.Pareto; |
| 874 | break; |
| 875 | } |
| 876 | |
| 877 | } |
| 878 | |
| 879 | public void MergeFrom(pb::CodedInputStream input) { |
| 880 | uint tag; |
| 881 | while ((tag = input.ReadTag()) != 0) { |
| 882 | switch(tag) { |
| 883 | default: |
| 884 | input.SkipLastField(); |
| 885 | break; |
| 886 | case 10: { |
| 887 | global::Grpc.Testing.ClosedLoopParams subBuilder = new global::Grpc.Testing.ClosedLoopParams(); |
| 888 | if (loadCase_ == LoadOneofCase.ClosedLoop) { |
| 889 | subBuilder.MergeFrom(ClosedLoop); |
| 890 | } |
| 891 | input.ReadMessage(subBuilder); |
| 892 | ClosedLoop = subBuilder; |
| 893 | break; |
| 894 | } |
| 895 | case 18: { |
| 896 | global::Grpc.Testing.PoissonParams subBuilder = new global::Grpc.Testing.PoissonParams(); |
| 897 | if (loadCase_ == LoadOneofCase.Poisson) { |
| 898 | subBuilder.MergeFrom(Poisson); |
| 899 | } |
| 900 | input.ReadMessage(subBuilder); |
| 901 | Poisson = subBuilder; |
| 902 | break; |
| 903 | } |
| 904 | case 26: { |
| 905 | global::Grpc.Testing.UniformParams subBuilder = new global::Grpc.Testing.UniformParams(); |
| 906 | if (loadCase_ == LoadOneofCase.Uniform) { |
| 907 | subBuilder.MergeFrom(Uniform); |
| 908 | } |
| 909 | input.ReadMessage(subBuilder); |
| 910 | Uniform = subBuilder; |
| 911 | break; |
| 912 | } |
| 913 | case 34: { |
| 914 | global::Grpc.Testing.DeterministicParams subBuilder = new global::Grpc.Testing.DeterministicParams(); |
| 915 | if (loadCase_ == LoadOneofCase.Determ) { |
| 916 | subBuilder.MergeFrom(Determ); |
| 917 | } |
| 918 | input.ReadMessage(subBuilder); |
| 919 | Determ = subBuilder; |
| 920 | break; |
| 921 | } |
| 922 | case 42: { |
| 923 | global::Grpc.Testing.ParetoParams subBuilder = new global::Grpc.Testing.ParetoParams(); |
| 924 | if (loadCase_ == LoadOneofCase.Pareto) { |
| 925 | subBuilder.MergeFrom(Pareto); |
| 926 | } |
| 927 | input.ReadMessage(subBuilder); |
| 928 | Pareto = subBuilder; |
| 929 | break; |
| 930 | } |
| 931 | } |
| 932 | } |
| 933 | } |
| 934 | |
| 935 | } |
| 936 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 937 | /// <summary> |
| 938 | /// presence of SecurityParams implies use of TLS |
| 939 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 940 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 941 | public sealed partial class SecurityParams : pb::IMessage<SecurityParams> { |
| 942 | private static readonly pb::MessageParser<SecurityParams> _parser = new pb::MessageParser<SecurityParams>(() => new SecurityParams()); |
| 943 | public static pb::MessageParser<SecurityParams> Parser { get { return _parser; } } |
| 944 | |
| 945 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 946 | get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[6]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 947 | } |
| 948 | |
| 949 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 950 | get { return Descriptor; } |
| 951 | } |
| 952 | |
| 953 | public SecurityParams() { |
| 954 | OnConstruction(); |
| 955 | } |
| 956 | |
| 957 | partial void OnConstruction(); |
| 958 | |
| 959 | public SecurityParams(SecurityParams other) : this() { |
| 960 | useTestCa_ = other.useTestCa_; |
| 961 | serverHostOverride_ = other.serverHostOverride_; |
| 962 | } |
| 963 | |
| 964 | public SecurityParams Clone() { |
| 965 | return new SecurityParams(this); |
| 966 | } |
| 967 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 968 | /// <summary>Field number for the "use_test_ca" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 969 | public const int UseTestCaFieldNumber = 1; |
| 970 | private bool useTestCa_; |
| 971 | public bool UseTestCa { |
| 972 | get { return useTestCa_; } |
| 973 | set { |
| 974 | useTestCa_ = value; |
| 975 | } |
| 976 | } |
| 977 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 978 | /// <summary>Field number for the "server_host_override" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 979 | public const int ServerHostOverrideFieldNumber = 2; |
| 980 | private string serverHostOverride_ = ""; |
| 981 | public string ServerHostOverride { |
| 982 | get { return serverHostOverride_; } |
| 983 | set { |
| 984 | serverHostOverride_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 985 | } |
| 986 | } |
| 987 | |
| 988 | public override bool Equals(object other) { |
| 989 | return Equals(other as SecurityParams); |
| 990 | } |
| 991 | |
| 992 | public bool Equals(SecurityParams other) { |
| 993 | if (ReferenceEquals(other, null)) { |
| 994 | return false; |
| 995 | } |
| 996 | if (ReferenceEquals(other, this)) { |
| 997 | return true; |
| 998 | } |
| 999 | if (UseTestCa != other.UseTestCa) return false; |
| 1000 | if (ServerHostOverride != other.ServerHostOverride) return false; |
| 1001 | return true; |
| 1002 | } |
| 1003 | |
| 1004 | public override int GetHashCode() { |
| 1005 | int hash = 1; |
| 1006 | if (UseTestCa != false) hash ^= UseTestCa.GetHashCode(); |
| 1007 | if (ServerHostOverride.Length != 0) hash ^= ServerHostOverride.GetHashCode(); |
| 1008 | return hash; |
| 1009 | } |
| 1010 | |
| 1011 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1012 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1013 | } |
| 1014 | |
| 1015 | public void WriteTo(pb::CodedOutputStream output) { |
| 1016 | if (UseTestCa != false) { |
| 1017 | output.WriteRawTag(8); |
| 1018 | output.WriteBool(UseTestCa); |
| 1019 | } |
| 1020 | if (ServerHostOverride.Length != 0) { |
| 1021 | output.WriteRawTag(18); |
| 1022 | output.WriteString(ServerHostOverride); |
| 1023 | } |
| 1024 | } |
| 1025 | |
| 1026 | public int CalculateSize() { |
| 1027 | int size = 0; |
| 1028 | if (UseTestCa != false) { |
| 1029 | size += 1 + 1; |
| 1030 | } |
| 1031 | if (ServerHostOverride.Length != 0) { |
| 1032 | size += 1 + pb::CodedOutputStream.ComputeStringSize(ServerHostOverride); |
| 1033 | } |
| 1034 | return size; |
| 1035 | } |
| 1036 | |
| 1037 | public void MergeFrom(SecurityParams other) { |
| 1038 | if (other == null) { |
| 1039 | return; |
| 1040 | } |
| 1041 | if (other.UseTestCa != false) { |
| 1042 | UseTestCa = other.UseTestCa; |
| 1043 | } |
| 1044 | if (other.ServerHostOverride.Length != 0) { |
| 1045 | ServerHostOverride = other.ServerHostOverride; |
| 1046 | } |
| 1047 | } |
| 1048 | |
| 1049 | public void MergeFrom(pb::CodedInputStream input) { |
| 1050 | uint tag; |
| 1051 | while ((tag = input.ReadTag()) != 0) { |
| 1052 | switch(tag) { |
| 1053 | default: |
| 1054 | input.SkipLastField(); |
| 1055 | break; |
| 1056 | case 8: { |
| 1057 | UseTestCa = input.ReadBool(); |
| 1058 | break; |
| 1059 | } |
| 1060 | case 18: { |
| 1061 | ServerHostOverride = input.ReadString(); |
| 1062 | break; |
| 1063 | } |
| 1064 | } |
| 1065 | } |
| 1066 | } |
| 1067 | |
| 1068 | } |
| 1069 | |
| 1070 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1071 | public sealed partial class ClientConfig : pb::IMessage<ClientConfig> { |
| 1072 | private static readonly pb::MessageParser<ClientConfig> _parser = new pb::MessageParser<ClientConfig>(() => new ClientConfig()); |
| 1073 | public static pb::MessageParser<ClientConfig> Parser { get { return _parser; } } |
| 1074 | |
| 1075 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1076 | get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[7]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1077 | } |
| 1078 | |
| 1079 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1080 | get { return Descriptor; } |
| 1081 | } |
| 1082 | |
| 1083 | public ClientConfig() { |
| 1084 | OnConstruction(); |
| 1085 | } |
| 1086 | |
| 1087 | partial void OnConstruction(); |
| 1088 | |
| 1089 | public ClientConfig(ClientConfig other) : this() { |
| 1090 | serverTargets_ = other.serverTargets_.Clone(); |
| 1091 | clientType_ = other.clientType_; |
| 1092 | SecurityParams = other.securityParams_ != null ? other.SecurityParams.Clone() : null; |
| 1093 | outstandingRpcsPerChannel_ = other.outstandingRpcsPerChannel_; |
| 1094 | clientChannels_ = other.clientChannels_; |
| 1095 | asyncClientThreads_ = other.asyncClientThreads_; |
| 1096 | rpcType_ = other.rpcType_; |
| 1097 | LoadParams = other.loadParams_ != null ? other.LoadParams.Clone() : null; |
| 1098 | PayloadConfig = other.payloadConfig_ != null ? other.PayloadConfig.Clone() : null; |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 1099 | HistogramParams = other.histogramParams_ != null ? other.HistogramParams.Clone() : null; |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1100 | } |
| 1101 | |
| 1102 | public ClientConfig Clone() { |
| 1103 | return new ClientConfig(this); |
| 1104 | } |
| 1105 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1106 | /// <summary>Field number for the "server_targets" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1107 | public const int ServerTargetsFieldNumber = 1; |
| 1108 | private static readonly pb::FieldCodec<string> _repeated_serverTargets_codec |
| 1109 | = pb::FieldCodec.ForString(10); |
| 1110 | private readonly pbc::RepeatedField<string> serverTargets_ = new pbc::RepeatedField<string>(); |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1111 | /// <summary> |
| 1112 | /// List of targets to connect to. At least one target needs to be specified. |
| 1113 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1114 | public pbc::RepeatedField<string> ServerTargets { |
| 1115 | get { return serverTargets_; } |
| 1116 | } |
| 1117 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1118 | /// <summary>Field number for the "client_type" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1119 | public const int ClientTypeFieldNumber = 2; |
| 1120 | private global::Grpc.Testing.ClientType clientType_ = global::Grpc.Testing.ClientType.SYNC_CLIENT; |
| 1121 | public global::Grpc.Testing.ClientType ClientType { |
| 1122 | get { return clientType_; } |
| 1123 | set { |
| 1124 | clientType_ = value; |
| 1125 | } |
| 1126 | } |
| 1127 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1128 | /// <summary>Field number for the "security_params" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1129 | public const int SecurityParamsFieldNumber = 3; |
| 1130 | private global::Grpc.Testing.SecurityParams securityParams_; |
| 1131 | public global::Grpc.Testing.SecurityParams SecurityParams { |
| 1132 | get { return securityParams_; } |
| 1133 | set { |
| 1134 | securityParams_ = value; |
| 1135 | } |
| 1136 | } |
| 1137 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1138 | /// <summary>Field number for the "outstanding_rpcs_per_channel" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1139 | public const int OutstandingRpcsPerChannelFieldNumber = 4; |
| 1140 | private int outstandingRpcsPerChannel_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1141 | /// <summary> |
| 1142 | /// How many concurrent RPCs to start for each channel. |
| 1143 | /// For synchronous client, use a separate thread for each outstanding RPC. |
| 1144 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1145 | public int OutstandingRpcsPerChannel { |
| 1146 | get { return outstandingRpcsPerChannel_; } |
| 1147 | set { |
| 1148 | outstandingRpcsPerChannel_ = value; |
| 1149 | } |
| 1150 | } |
| 1151 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1152 | /// <summary>Field number for the "client_channels" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1153 | public const int ClientChannelsFieldNumber = 5; |
| 1154 | private int clientChannels_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1155 | /// <summary> |
| 1156 | /// Number of independent client channels to create. |
| 1157 | /// i-th channel will connect to server_target[i % server_targets.size()] |
| 1158 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1159 | public int ClientChannels { |
| 1160 | get { return clientChannels_; } |
| 1161 | set { |
| 1162 | clientChannels_ = value; |
| 1163 | } |
| 1164 | } |
| 1165 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1166 | /// <summary>Field number for the "async_client_threads" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1167 | public const int AsyncClientThreadsFieldNumber = 7; |
| 1168 | private int asyncClientThreads_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1169 | /// <summary> |
| 1170 | /// Only for async client. Number of threads to use to start/manage RPCs. |
| 1171 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1172 | public int AsyncClientThreads { |
| 1173 | get { return asyncClientThreads_; } |
| 1174 | set { |
| 1175 | asyncClientThreads_ = value; |
| 1176 | } |
| 1177 | } |
| 1178 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1179 | /// <summary>Field number for the "rpc_type" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1180 | public const int RpcTypeFieldNumber = 8; |
| 1181 | private global::Grpc.Testing.RpcType rpcType_ = global::Grpc.Testing.RpcType.UNARY; |
| 1182 | public global::Grpc.Testing.RpcType RpcType { |
| 1183 | get { return rpcType_; } |
| 1184 | set { |
| 1185 | rpcType_ = value; |
| 1186 | } |
| 1187 | } |
| 1188 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1189 | /// <summary>Field number for the "load_params" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1190 | public const int LoadParamsFieldNumber = 10; |
| 1191 | private global::Grpc.Testing.LoadParams loadParams_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1192 | /// <summary> |
| 1193 | /// The requested load for the entire client (aggregated over all the threads). |
| 1194 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1195 | public global::Grpc.Testing.LoadParams LoadParams { |
| 1196 | get { return loadParams_; } |
| 1197 | set { |
| 1198 | loadParams_ = value; |
| 1199 | } |
| 1200 | } |
| 1201 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1202 | /// <summary>Field number for the "payload_config" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1203 | public const int PayloadConfigFieldNumber = 11; |
| 1204 | private global::Grpc.Testing.PayloadConfig payloadConfig_; |
| 1205 | public global::Grpc.Testing.PayloadConfig PayloadConfig { |
| 1206 | get { return payloadConfig_; } |
| 1207 | set { |
| 1208 | payloadConfig_ = value; |
| 1209 | } |
| 1210 | } |
| 1211 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1212 | /// <summary>Field number for the "histogram_params" field.</summary> |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 1213 | public const int HistogramParamsFieldNumber = 12; |
| 1214 | private global::Grpc.Testing.HistogramParams histogramParams_; |
| 1215 | public global::Grpc.Testing.HistogramParams HistogramParams { |
| 1216 | get { return histogramParams_; } |
| 1217 | set { |
| 1218 | histogramParams_ = value; |
| 1219 | } |
| 1220 | } |
| 1221 | |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1222 | public override bool Equals(object other) { |
| 1223 | return Equals(other as ClientConfig); |
| 1224 | } |
| 1225 | |
| 1226 | public bool Equals(ClientConfig other) { |
| 1227 | if (ReferenceEquals(other, null)) { |
| 1228 | return false; |
| 1229 | } |
| 1230 | if (ReferenceEquals(other, this)) { |
| 1231 | return true; |
| 1232 | } |
| 1233 | if(!serverTargets_.Equals(other.serverTargets_)) return false; |
| 1234 | if (ClientType != other.ClientType) return false; |
| 1235 | if (!object.Equals(SecurityParams, other.SecurityParams)) return false; |
| 1236 | if (OutstandingRpcsPerChannel != other.OutstandingRpcsPerChannel) return false; |
| 1237 | if (ClientChannels != other.ClientChannels) return false; |
| 1238 | if (AsyncClientThreads != other.AsyncClientThreads) return false; |
| 1239 | if (RpcType != other.RpcType) return false; |
| 1240 | if (!object.Equals(LoadParams, other.LoadParams)) return false; |
| 1241 | if (!object.Equals(PayloadConfig, other.PayloadConfig)) return false; |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 1242 | if (!object.Equals(HistogramParams, other.HistogramParams)) return false; |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1243 | return true; |
| 1244 | } |
| 1245 | |
| 1246 | public override int GetHashCode() { |
| 1247 | int hash = 1; |
| 1248 | hash ^= serverTargets_.GetHashCode(); |
| 1249 | if (ClientType != global::Grpc.Testing.ClientType.SYNC_CLIENT) hash ^= ClientType.GetHashCode(); |
| 1250 | if (securityParams_ != null) hash ^= SecurityParams.GetHashCode(); |
| 1251 | if (OutstandingRpcsPerChannel != 0) hash ^= OutstandingRpcsPerChannel.GetHashCode(); |
| 1252 | if (ClientChannels != 0) hash ^= ClientChannels.GetHashCode(); |
| 1253 | if (AsyncClientThreads != 0) hash ^= AsyncClientThreads.GetHashCode(); |
| 1254 | if (RpcType != global::Grpc.Testing.RpcType.UNARY) hash ^= RpcType.GetHashCode(); |
| 1255 | if (loadParams_ != null) hash ^= LoadParams.GetHashCode(); |
| 1256 | if (payloadConfig_ != null) hash ^= PayloadConfig.GetHashCode(); |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 1257 | if (histogramParams_ != null) hash ^= HistogramParams.GetHashCode(); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1258 | return hash; |
| 1259 | } |
| 1260 | |
| 1261 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1262 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1263 | } |
| 1264 | |
| 1265 | public void WriteTo(pb::CodedOutputStream output) { |
| 1266 | serverTargets_.WriteTo(output, _repeated_serverTargets_codec); |
| 1267 | if (ClientType != global::Grpc.Testing.ClientType.SYNC_CLIENT) { |
| 1268 | output.WriteRawTag(16); |
| 1269 | output.WriteEnum((int) ClientType); |
| 1270 | } |
| 1271 | if (securityParams_ != null) { |
| 1272 | output.WriteRawTag(26); |
| 1273 | output.WriteMessage(SecurityParams); |
| 1274 | } |
| 1275 | if (OutstandingRpcsPerChannel != 0) { |
| 1276 | output.WriteRawTag(32); |
| 1277 | output.WriteInt32(OutstandingRpcsPerChannel); |
| 1278 | } |
| 1279 | if (ClientChannels != 0) { |
| 1280 | output.WriteRawTag(40); |
| 1281 | output.WriteInt32(ClientChannels); |
| 1282 | } |
| 1283 | if (AsyncClientThreads != 0) { |
| 1284 | output.WriteRawTag(56); |
| 1285 | output.WriteInt32(AsyncClientThreads); |
| 1286 | } |
| 1287 | if (RpcType != global::Grpc.Testing.RpcType.UNARY) { |
| 1288 | output.WriteRawTag(64); |
| 1289 | output.WriteEnum((int) RpcType); |
| 1290 | } |
| 1291 | if (loadParams_ != null) { |
| 1292 | output.WriteRawTag(82); |
| 1293 | output.WriteMessage(LoadParams); |
| 1294 | } |
| 1295 | if (payloadConfig_ != null) { |
| 1296 | output.WriteRawTag(90); |
| 1297 | output.WriteMessage(PayloadConfig); |
| 1298 | } |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 1299 | if (histogramParams_ != null) { |
| 1300 | output.WriteRawTag(98); |
| 1301 | output.WriteMessage(HistogramParams); |
| 1302 | } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1303 | } |
| 1304 | |
| 1305 | public int CalculateSize() { |
| 1306 | int size = 0; |
| 1307 | size += serverTargets_.CalculateSize(_repeated_serverTargets_codec); |
| 1308 | if (ClientType != global::Grpc.Testing.ClientType.SYNC_CLIENT) { |
| 1309 | size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ClientType); |
| 1310 | } |
| 1311 | if (securityParams_ != null) { |
| 1312 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(SecurityParams); |
| 1313 | } |
| 1314 | if (OutstandingRpcsPerChannel != 0) { |
| 1315 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(OutstandingRpcsPerChannel); |
| 1316 | } |
| 1317 | if (ClientChannels != 0) { |
| 1318 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(ClientChannels); |
| 1319 | } |
| 1320 | if (AsyncClientThreads != 0) { |
| 1321 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(AsyncClientThreads); |
| 1322 | } |
| 1323 | if (RpcType != global::Grpc.Testing.RpcType.UNARY) { |
| 1324 | size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RpcType); |
| 1325 | } |
| 1326 | if (loadParams_ != null) { |
| 1327 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(LoadParams); |
| 1328 | } |
| 1329 | if (payloadConfig_ != null) { |
| 1330 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(PayloadConfig); |
| 1331 | } |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 1332 | if (histogramParams_ != null) { |
| 1333 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(HistogramParams); |
| 1334 | } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1335 | return size; |
| 1336 | } |
| 1337 | |
| 1338 | public void MergeFrom(ClientConfig other) { |
| 1339 | if (other == null) { |
| 1340 | return; |
| 1341 | } |
| 1342 | serverTargets_.Add(other.serverTargets_); |
| 1343 | if (other.ClientType != global::Grpc.Testing.ClientType.SYNC_CLIENT) { |
| 1344 | ClientType = other.ClientType; |
| 1345 | } |
| 1346 | if (other.securityParams_ != null) { |
| 1347 | if (securityParams_ == null) { |
| 1348 | securityParams_ = new global::Grpc.Testing.SecurityParams(); |
| 1349 | } |
| 1350 | SecurityParams.MergeFrom(other.SecurityParams); |
| 1351 | } |
| 1352 | if (other.OutstandingRpcsPerChannel != 0) { |
| 1353 | OutstandingRpcsPerChannel = other.OutstandingRpcsPerChannel; |
| 1354 | } |
| 1355 | if (other.ClientChannels != 0) { |
| 1356 | ClientChannels = other.ClientChannels; |
| 1357 | } |
| 1358 | if (other.AsyncClientThreads != 0) { |
| 1359 | AsyncClientThreads = other.AsyncClientThreads; |
| 1360 | } |
| 1361 | if (other.RpcType != global::Grpc.Testing.RpcType.UNARY) { |
| 1362 | RpcType = other.RpcType; |
| 1363 | } |
| 1364 | if (other.loadParams_ != null) { |
| 1365 | if (loadParams_ == null) { |
| 1366 | loadParams_ = new global::Grpc.Testing.LoadParams(); |
| 1367 | } |
| 1368 | LoadParams.MergeFrom(other.LoadParams); |
| 1369 | } |
| 1370 | if (other.payloadConfig_ != null) { |
| 1371 | if (payloadConfig_ == null) { |
| 1372 | payloadConfig_ = new global::Grpc.Testing.PayloadConfig(); |
| 1373 | } |
| 1374 | PayloadConfig.MergeFrom(other.PayloadConfig); |
| 1375 | } |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 1376 | if (other.histogramParams_ != null) { |
| 1377 | if (histogramParams_ == null) { |
| 1378 | histogramParams_ = new global::Grpc.Testing.HistogramParams(); |
| 1379 | } |
| 1380 | HistogramParams.MergeFrom(other.HistogramParams); |
| 1381 | } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1382 | } |
| 1383 | |
| 1384 | public void MergeFrom(pb::CodedInputStream input) { |
| 1385 | uint tag; |
| 1386 | while ((tag = input.ReadTag()) != 0) { |
| 1387 | switch(tag) { |
| 1388 | default: |
| 1389 | input.SkipLastField(); |
| 1390 | break; |
| 1391 | case 10: { |
| 1392 | serverTargets_.AddEntriesFrom(input, _repeated_serverTargets_codec); |
| 1393 | break; |
| 1394 | } |
| 1395 | case 16: { |
| 1396 | clientType_ = (global::Grpc.Testing.ClientType) input.ReadEnum(); |
| 1397 | break; |
| 1398 | } |
| 1399 | case 26: { |
| 1400 | if (securityParams_ == null) { |
| 1401 | securityParams_ = new global::Grpc.Testing.SecurityParams(); |
| 1402 | } |
| 1403 | input.ReadMessage(securityParams_); |
| 1404 | break; |
| 1405 | } |
| 1406 | case 32: { |
| 1407 | OutstandingRpcsPerChannel = input.ReadInt32(); |
| 1408 | break; |
| 1409 | } |
| 1410 | case 40: { |
| 1411 | ClientChannels = input.ReadInt32(); |
| 1412 | break; |
| 1413 | } |
| 1414 | case 56: { |
| 1415 | AsyncClientThreads = input.ReadInt32(); |
| 1416 | break; |
| 1417 | } |
| 1418 | case 64: { |
| 1419 | rpcType_ = (global::Grpc.Testing.RpcType) input.ReadEnum(); |
| 1420 | break; |
| 1421 | } |
| 1422 | case 82: { |
| 1423 | if (loadParams_ == null) { |
| 1424 | loadParams_ = new global::Grpc.Testing.LoadParams(); |
| 1425 | } |
| 1426 | input.ReadMessage(loadParams_); |
| 1427 | break; |
| 1428 | } |
| 1429 | case 90: { |
| 1430 | if (payloadConfig_ == null) { |
| 1431 | payloadConfig_ = new global::Grpc.Testing.PayloadConfig(); |
| 1432 | } |
| 1433 | input.ReadMessage(payloadConfig_); |
| 1434 | break; |
| 1435 | } |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 1436 | case 98: { |
| 1437 | if (histogramParams_ == null) { |
| 1438 | histogramParams_ = new global::Grpc.Testing.HistogramParams(); |
| 1439 | } |
| 1440 | input.ReadMessage(histogramParams_); |
| 1441 | break; |
| 1442 | } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1443 | } |
| 1444 | } |
| 1445 | } |
| 1446 | |
| 1447 | } |
| 1448 | |
| 1449 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1450 | public sealed partial class ClientStatus : pb::IMessage<ClientStatus> { |
| 1451 | private static readonly pb::MessageParser<ClientStatus> _parser = new pb::MessageParser<ClientStatus>(() => new ClientStatus()); |
| 1452 | public static pb::MessageParser<ClientStatus> Parser { get { return _parser; } } |
| 1453 | |
| 1454 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1455 | get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[8]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1456 | } |
| 1457 | |
| 1458 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1459 | get { return Descriptor; } |
| 1460 | } |
| 1461 | |
| 1462 | public ClientStatus() { |
| 1463 | OnConstruction(); |
| 1464 | } |
| 1465 | |
| 1466 | partial void OnConstruction(); |
| 1467 | |
| 1468 | public ClientStatus(ClientStatus other) : this() { |
| 1469 | Stats = other.stats_ != null ? other.Stats.Clone() : null; |
| 1470 | } |
| 1471 | |
| 1472 | public ClientStatus Clone() { |
| 1473 | return new ClientStatus(this); |
| 1474 | } |
| 1475 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1476 | /// <summary>Field number for the "stats" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1477 | public const int StatsFieldNumber = 1; |
| 1478 | private global::Grpc.Testing.ClientStats stats_; |
| 1479 | public global::Grpc.Testing.ClientStats Stats { |
| 1480 | get { return stats_; } |
| 1481 | set { |
| 1482 | stats_ = value; |
| 1483 | } |
| 1484 | } |
| 1485 | |
| 1486 | public override bool Equals(object other) { |
| 1487 | return Equals(other as ClientStatus); |
| 1488 | } |
| 1489 | |
| 1490 | public bool Equals(ClientStatus other) { |
| 1491 | if (ReferenceEquals(other, null)) { |
| 1492 | return false; |
| 1493 | } |
| 1494 | if (ReferenceEquals(other, this)) { |
| 1495 | return true; |
| 1496 | } |
| 1497 | if (!object.Equals(Stats, other.Stats)) return false; |
| 1498 | return true; |
| 1499 | } |
| 1500 | |
| 1501 | public override int GetHashCode() { |
| 1502 | int hash = 1; |
| 1503 | if (stats_ != null) hash ^= Stats.GetHashCode(); |
| 1504 | return hash; |
| 1505 | } |
| 1506 | |
| 1507 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1508 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1509 | } |
| 1510 | |
| 1511 | public void WriteTo(pb::CodedOutputStream output) { |
| 1512 | if (stats_ != null) { |
| 1513 | output.WriteRawTag(10); |
| 1514 | output.WriteMessage(Stats); |
| 1515 | } |
| 1516 | } |
| 1517 | |
| 1518 | public int CalculateSize() { |
| 1519 | int size = 0; |
| 1520 | if (stats_ != null) { |
| 1521 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Stats); |
| 1522 | } |
| 1523 | return size; |
| 1524 | } |
| 1525 | |
| 1526 | public void MergeFrom(ClientStatus other) { |
| 1527 | if (other == null) { |
| 1528 | return; |
| 1529 | } |
| 1530 | if (other.stats_ != null) { |
| 1531 | if (stats_ == null) { |
| 1532 | stats_ = new global::Grpc.Testing.ClientStats(); |
| 1533 | } |
| 1534 | Stats.MergeFrom(other.Stats); |
| 1535 | } |
| 1536 | } |
| 1537 | |
| 1538 | public void MergeFrom(pb::CodedInputStream input) { |
| 1539 | uint tag; |
| 1540 | while ((tag = input.ReadTag()) != 0) { |
| 1541 | switch(tag) { |
| 1542 | default: |
| 1543 | input.SkipLastField(); |
| 1544 | break; |
| 1545 | case 10: { |
| 1546 | if (stats_ == null) { |
| 1547 | stats_ = new global::Grpc.Testing.ClientStats(); |
| 1548 | } |
| 1549 | input.ReadMessage(stats_); |
| 1550 | break; |
| 1551 | } |
| 1552 | } |
| 1553 | } |
| 1554 | } |
| 1555 | |
| 1556 | } |
| 1557 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1558 | /// <summary> |
| 1559 | /// Request current stats |
| 1560 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1561 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1562 | public sealed partial class Mark : pb::IMessage<Mark> { |
| 1563 | private static readonly pb::MessageParser<Mark> _parser = new pb::MessageParser<Mark>(() => new Mark()); |
| 1564 | public static pb::MessageParser<Mark> Parser { get { return _parser; } } |
| 1565 | |
| 1566 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1567 | get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[9]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1568 | } |
| 1569 | |
| 1570 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1571 | get { return Descriptor; } |
| 1572 | } |
| 1573 | |
| 1574 | public Mark() { |
| 1575 | OnConstruction(); |
| 1576 | } |
| 1577 | |
| 1578 | partial void OnConstruction(); |
| 1579 | |
| 1580 | public Mark(Mark other) : this() { |
| 1581 | reset_ = other.reset_; |
| 1582 | } |
| 1583 | |
| 1584 | public Mark Clone() { |
| 1585 | return new Mark(this); |
| 1586 | } |
| 1587 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1588 | /// <summary>Field number for the "reset" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1589 | public const int ResetFieldNumber = 1; |
| 1590 | private bool reset_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1591 | /// <summary> |
| 1592 | /// if true, the stats will be reset after taking their snapshot. |
| 1593 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1594 | public bool Reset { |
| 1595 | get { return reset_; } |
| 1596 | set { |
| 1597 | reset_ = value; |
| 1598 | } |
| 1599 | } |
| 1600 | |
| 1601 | public override bool Equals(object other) { |
| 1602 | return Equals(other as Mark); |
| 1603 | } |
| 1604 | |
| 1605 | public bool Equals(Mark other) { |
| 1606 | if (ReferenceEquals(other, null)) { |
| 1607 | return false; |
| 1608 | } |
| 1609 | if (ReferenceEquals(other, this)) { |
| 1610 | return true; |
| 1611 | } |
| 1612 | if (Reset != other.Reset) return false; |
| 1613 | return true; |
| 1614 | } |
| 1615 | |
| 1616 | public override int GetHashCode() { |
| 1617 | int hash = 1; |
| 1618 | if (Reset != false) hash ^= Reset.GetHashCode(); |
| 1619 | return hash; |
| 1620 | } |
| 1621 | |
| 1622 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1623 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1624 | } |
| 1625 | |
| 1626 | public void WriteTo(pb::CodedOutputStream output) { |
| 1627 | if (Reset != false) { |
| 1628 | output.WriteRawTag(8); |
| 1629 | output.WriteBool(Reset); |
| 1630 | } |
| 1631 | } |
| 1632 | |
| 1633 | public int CalculateSize() { |
| 1634 | int size = 0; |
| 1635 | if (Reset != false) { |
| 1636 | size += 1 + 1; |
| 1637 | } |
| 1638 | return size; |
| 1639 | } |
| 1640 | |
| 1641 | public void MergeFrom(Mark other) { |
| 1642 | if (other == null) { |
| 1643 | return; |
| 1644 | } |
| 1645 | if (other.Reset != false) { |
| 1646 | Reset = other.Reset; |
| 1647 | } |
| 1648 | } |
| 1649 | |
| 1650 | public void MergeFrom(pb::CodedInputStream input) { |
| 1651 | uint tag; |
| 1652 | while ((tag = input.ReadTag()) != 0) { |
| 1653 | switch(tag) { |
| 1654 | default: |
| 1655 | input.SkipLastField(); |
| 1656 | break; |
| 1657 | case 8: { |
| 1658 | Reset = input.ReadBool(); |
| 1659 | break; |
| 1660 | } |
| 1661 | } |
| 1662 | } |
| 1663 | } |
| 1664 | |
| 1665 | } |
| 1666 | |
| 1667 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1668 | public sealed partial class ClientArgs : pb::IMessage<ClientArgs> { |
| 1669 | private static readonly pb::MessageParser<ClientArgs> _parser = new pb::MessageParser<ClientArgs>(() => new ClientArgs()); |
| 1670 | public static pb::MessageParser<ClientArgs> Parser { get { return _parser; } } |
| 1671 | |
| 1672 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1673 | get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[10]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1674 | } |
| 1675 | |
| 1676 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1677 | get { return Descriptor; } |
| 1678 | } |
| 1679 | |
| 1680 | public ClientArgs() { |
| 1681 | OnConstruction(); |
| 1682 | } |
| 1683 | |
| 1684 | partial void OnConstruction(); |
| 1685 | |
| 1686 | public ClientArgs(ClientArgs other) : this() { |
| 1687 | switch (other.ArgtypeCase) { |
| 1688 | case ArgtypeOneofCase.Setup: |
| 1689 | Setup = other.Setup.Clone(); |
| 1690 | break; |
| 1691 | case ArgtypeOneofCase.Mark: |
| 1692 | Mark = other.Mark.Clone(); |
| 1693 | break; |
| 1694 | } |
| 1695 | |
| 1696 | } |
| 1697 | |
| 1698 | public ClientArgs Clone() { |
| 1699 | return new ClientArgs(this); |
| 1700 | } |
| 1701 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1702 | /// <summary>Field number for the "setup" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1703 | public const int SetupFieldNumber = 1; |
| 1704 | public global::Grpc.Testing.ClientConfig Setup { |
| 1705 | get { return argtypeCase_ == ArgtypeOneofCase.Setup ? (global::Grpc.Testing.ClientConfig) argtype_ : null; } |
| 1706 | set { |
| 1707 | argtype_ = value; |
| 1708 | argtypeCase_ = value == null ? ArgtypeOneofCase.None : ArgtypeOneofCase.Setup; |
| 1709 | } |
| 1710 | } |
| 1711 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1712 | /// <summary>Field number for the "mark" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1713 | public const int MarkFieldNumber = 2; |
| 1714 | public global::Grpc.Testing.Mark Mark { |
| 1715 | get { return argtypeCase_ == ArgtypeOneofCase.Mark ? (global::Grpc.Testing.Mark) argtype_ : null; } |
| 1716 | set { |
| 1717 | argtype_ = value; |
| 1718 | argtypeCase_ = value == null ? ArgtypeOneofCase.None : ArgtypeOneofCase.Mark; |
| 1719 | } |
| 1720 | } |
| 1721 | |
| 1722 | private object argtype_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1723 | /// <summary>Enum of possible cases for the "argtype" oneof.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1724 | public enum ArgtypeOneofCase { |
| 1725 | None = 0, |
| 1726 | Setup = 1, |
| 1727 | Mark = 2, |
| 1728 | } |
| 1729 | private ArgtypeOneofCase argtypeCase_ = ArgtypeOneofCase.None; |
| 1730 | public ArgtypeOneofCase ArgtypeCase { |
| 1731 | get { return argtypeCase_; } |
| 1732 | } |
| 1733 | |
| 1734 | public void ClearArgtype() { |
| 1735 | argtypeCase_ = ArgtypeOneofCase.None; |
| 1736 | argtype_ = null; |
| 1737 | } |
| 1738 | |
| 1739 | public override bool Equals(object other) { |
| 1740 | return Equals(other as ClientArgs); |
| 1741 | } |
| 1742 | |
| 1743 | public bool Equals(ClientArgs other) { |
| 1744 | if (ReferenceEquals(other, null)) { |
| 1745 | return false; |
| 1746 | } |
| 1747 | if (ReferenceEquals(other, this)) { |
| 1748 | return true; |
| 1749 | } |
| 1750 | if (!object.Equals(Setup, other.Setup)) return false; |
| 1751 | if (!object.Equals(Mark, other.Mark)) return false; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1752 | if (ArgtypeCase != other.ArgtypeCase) return false; |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1753 | return true; |
| 1754 | } |
| 1755 | |
| 1756 | public override int GetHashCode() { |
| 1757 | int hash = 1; |
| 1758 | if (argtypeCase_ == ArgtypeOneofCase.Setup) hash ^= Setup.GetHashCode(); |
| 1759 | if (argtypeCase_ == ArgtypeOneofCase.Mark) hash ^= Mark.GetHashCode(); |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1760 | hash ^= (int) argtypeCase_; |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1761 | return hash; |
| 1762 | } |
| 1763 | |
| 1764 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1765 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1766 | } |
| 1767 | |
| 1768 | public void WriteTo(pb::CodedOutputStream output) { |
| 1769 | if (argtypeCase_ == ArgtypeOneofCase.Setup) { |
| 1770 | output.WriteRawTag(10); |
| 1771 | output.WriteMessage(Setup); |
| 1772 | } |
| 1773 | if (argtypeCase_ == ArgtypeOneofCase.Mark) { |
| 1774 | output.WriteRawTag(18); |
| 1775 | output.WriteMessage(Mark); |
| 1776 | } |
| 1777 | } |
| 1778 | |
| 1779 | public int CalculateSize() { |
| 1780 | int size = 0; |
| 1781 | if (argtypeCase_ == ArgtypeOneofCase.Setup) { |
| 1782 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Setup); |
| 1783 | } |
| 1784 | if (argtypeCase_ == ArgtypeOneofCase.Mark) { |
| 1785 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Mark); |
| 1786 | } |
| 1787 | return size; |
| 1788 | } |
| 1789 | |
| 1790 | public void MergeFrom(ClientArgs other) { |
| 1791 | if (other == null) { |
| 1792 | return; |
| 1793 | } |
| 1794 | switch (other.ArgtypeCase) { |
| 1795 | case ArgtypeOneofCase.Setup: |
| 1796 | Setup = other.Setup; |
| 1797 | break; |
| 1798 | case ArgtypeOneofCase.Mark: |
| 1799 | Mark = other.Mark; |
| 1800 | break; |
| 1801 | } |
| 1802 | |
| 1803 | } |
| 1804 | |
| 1805 | public void MergeFrom(pb::CodedInputStream input) { |
| 1806 | uint tag; |
| 1807 | while ((tag = input.ReadTag()) != 0) { |
| 1808 | switch(tag) { |
| 1809 | default: |
| 1810 | input.SkipLastField(); |
| 1811 | break; |
| 1812 | case 10: { |
| 1813 | global::Grpc.Testing.ClientConfig subBuilder = new global::Grpc.Testing.ClientConfig(); |
| 1814 | if (argtypeCase_ == ArgtypeOneofCase.Setup) { |
| 1815 | subBuilder.MergeFrom(Setup); |
| 1816 | } |
| 1817 | input.ReadMessage(subBuilder); |
| 1818 | Setup = subBuilder; |
| 1819 | break; |
| 1820 | } |
| 1821 | case 18: { |
| 1822 | global::Grpc.Testing.Mark subBuilder = new global::Grpc.Testing.Mark(); |
| 1823 | if (argtypeCase_ == ArgtypeOneofCase.Mark) { |
| 1824 | subBuilder.MergeFrom(Mark); |
| 1825 | } |
| 1826 | input.ReadMessage(subBuilder); |
| 1827 | Mark = subBuilder; |
| 1828 | break; |
| 1829 | } |
| 1830 | } |
| 1831 | } |
| 1832 | } |
| 1833 | |
| 1834 | } |
| 1835 | |
| 1836 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1837 | public sealed partial class ServerConfig : pb::IMessage<ServerConfig> { |
| 1838 | private static readonly pb::MessageParser<ServerConfig> _parser = new pb::MessageParser<ServerConfig>(() => new ServerConfig()); |
| 1839 | public static pb::MessageParser<ServerConfig> Parser { get { return _parser; } } |
| 1840 | |
| 1841 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1842 | get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[11]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1843 | } |
| 1844 | |
| 1845 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1846 | get { return Descriptor; } |
| 1847 | } |
| 1848 | |
| 1849 | public ServerConfig() { |
| 1850 | OnConstruction(); |
| 1851 | } |
| 1852 | |
| 1853 | partial void OnConstruction(); |
| 1854 | |
| 1855 | public ServerConfig(ServerConfig other) : this() { |
| 1856 | serverType_ = other.serverType_; |
| 1857 | SecurityParams = other.securityParams_ != null ? other.SecurityParams.Clone() : null; |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 1858 | host_ = other.host_; |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1859 | port_ = other.port_; |
| 1860 | asyncServerThreads_ = other.asyncServerThreads_; |
| 1861 | coreLimit_ = other.coreLimit_; |
| 1862 | PayloadConfig = other.payloadConfig_ != null ? other.PayloadConfig.Clone() : null; |
| 1863 | } |
| 1864 | |
| 1865 | public ServerConfig Clone() { |
| 1866 | return new ServerConfig(this); |
| 1867 | } |
| 1868 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1869 | /// <summary>Field number for the "server_type" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1870 | public const int ServerTypeFieldNumber = 1; |
| 1871 | private global::Grpc.Testing.ServerType serverType_ = global::Grpc.Testing.ServerType.SYNC_SERVER; |
| 1872 | public global::Grpc.Testing.ServerType ServerType { |
| 1873 | get { return serverType_; } |
| 1874 | set { |
| 1875 | serverType_ = value; |
| 1876 | } |
| 1877 | } |
| 1878 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1879 | /// <summary>Field number for the "security_params" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1880 | public const int SecurityParamsFieldNumber = 2; |
| 1881 | private global::Grpc.Testing.SecurityParams securityParams_; |
| 1882 | public global::Grpc.Testing.SecurityParams SecurityParams { |
| 1883 | get { return securityParams_; } |
| 1884 | set { |
| 1885 | securityParams_ = value; |
| 1886 | } |
| 1887 | } |
| 1888 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1889 | /// <summary>Field number for the "host" field.</summary> |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 1890 | public const int HostFieldNumber = 3; |
| 1891 | private string host_ = ""; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1892 | /// <summary> |
| 1893 | /// Host on which to listen. |
| 1894 | /// </summary> |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 1895 | public string Host { |
| 1896 | get { return host_; } |
| 1897 | set { |
| 1898 | host_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 1899 | } |
| 1900 | } |
| 1901 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1902 | /// <summary>Field number for the "port" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1903 | public const int PortFieldNumber = 4; |
| 1904 | private int port_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1905 | /// <summary> |
| 1906 | /// Port on which to listen. Zero means pick unused port. |
| 1907 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1908 | public int Port { |
| 1909 | get { return port_; } |
| 1910 | set { |
| 1911 | port_ = value; |
| 1912 | } |
| 1913 | } |
| 1914 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1915 | /// <summary>Field number for the "async_server_threads" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1916 | public const int AsyncServerThreadsFieldNumber = 7; |
| 1917 | private int asyncServerThreads_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1918 | /// <summary> |
| 1919 | /// Only for async server. Number of threads used to serve the requests. |
| 1920 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1921 | public int AsyncServerThreads { |
| 1922 | get { return asyncServerThreads_; } |
| 1923 | set { |
| 1924 | asyncServerThreads_ = value; |
| 1925 | } |
| 1926 | } |
| 1927 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1928 | /// <summary>Field number for the "core_limit" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1929 | public const int CoreLimitFieldNumber = 8; |
| 1930 | private int coreLimit_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1931 | /// <summary> |
| 1932 | /// restrict core usage, currently unused |
| 1933 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1934 | public int CoreLimit { |
| 1935 | get { return coreLimit_; } |
| 1936 | set { |
| 1937 | coreLimit_ = value; |
| 1938 | } |
| 1939 | } |
| 1940 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1941 | /// <summary>Field number for the "payload_config" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1942 | public const int PayloadConfigFieldNumber = 9; |
| 1943 | private global::Grpc.Testing.PayloadConfig payloadConfig_; |
| 1944 | public global::Grpc.Testing.PayloadConfig PayloadConfig { |
| 1945 | get { return payloadConfig_; } |
| 1946 | set { |
| 1947 | payloadConfig_ = value; |
| 1948 | } |
| 1949 | } |
| 1950 | |
| 1951 | public override bool Equals(object other) { |
| 1952 | return Equals(other as ServerConfig); |
| 1953 | } |
| 1954 | |
| 1955 | public bool Equals(ServerConfig other) { |
| 1956 | if (ReferenceEquals(other, null)) { |
| 1957 | return false; |
| 1958 | } |
| 1959 | if (ReferenceEquals(other, this)) { |
| 1960 | return true; |
| 1961 | } |
| 1962 | if (ServerType != other.ServerType) return false; |
| 1963 | if (!object.Equals(SecurityParams, other.SecurityParams)) return false; |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 1964 | if (Host != other.Host) return false; |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1965 | if (Port != other.Port) return false; |
| 1966 | if (AsyncServerThreads != other.AsyncServerThreads) return false; |
| 1967 | if (CoreLimit != other.CoreLimit) return false; |
| 1968 | if (!object.Equals(PayloadConfig, other.PayloadConfig)) return false; |
| 1969 | return true; |
| 1970 | } |
| 1971 | |
| 1972 | public override int GetHashCode() { |
| 1973 | int hash = 1; |
| 1974 | if (ServerType != global::Grpc.Testing.ServerType.SYNC_SERVER) hash ^= ServerType.GetHashCode(); |
| 1975 | if (securityParams_ != null) hash ^= SecurityParams.GetHashCode(); |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 1976 | if (Host.Length != 0) hash ^= Host.GetHashCode(); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1977 | if (Port != 0) hash ^= Port.GetHashCode(); |
| 1978 | if (AsyncServerThreads != 0) hash ^= AsyncServerThreads.GetHashCode(); |
| 1979 | if (CoreLimit != 0) hash ^= CoreLimit.GetHashCode(); |
| 1980 | if (payloadConfig_ != null) hash ^= PayloadConfig.GetHashCode(); |
| 1981 | return hash; |
| 1982 | } |
| 1983 | |
| 1984 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 1985 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 1986 | } |
| 1987 | |
| 1988 | public void WriteTo(pb::CodedOutputStream output) { |
| 1989 | if (ServerType != global::Grpc.Testing.ServerType.SYNC_SERVER) { |
| 1990 | output.WriteRawTag(8); |
| 1991 | output.WriteEnum((int) ServerType); |
| 1992 | } |
| 1993 | if (securityParams_ != null) { |
| 1994 | output.WriteRawTag(18); |
| 1995 | output.WriteMessage(SecurityParams); |
| 1996 | } |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 1997 | if (Host.Length != 0) { |
| 1998 | output.WriteRawTag(26); |
| 1999 | output.WriteString(Host); |
| 2000 | } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 2001 | if (Port != 0) { |
| 2002 | output.WriteRawTag(32); |
| 2003 | output.WriteInt32(Port); |
| 2004 | } |
| 2005 | if (AsyncServerThreads != 0) { |
| 2006 | output.WriteRawTag(56); |
| 2007 | output.WriteInt32(AsyncServerThreads); |
| 2008 | } |
| 2009 | if (CoreLimit != 0) { |
| 2010 | output.WriteRawTag(64); |
| 2011 | output.WriteInt32(CoreLimit); |
| 2012 | } |
| 2013 | if (payloadConfig_ != null) { |
| 2014 | output.WriteRawTag(74); |
| 2015 | output.WriteMessage(PayloadConfig); |
| 2016 | } |
| 2017 | } |
| 2018 | |
| 2019 | public int CalculateSize() { |
| 2020 | int size = 0; |
| 2021 | if (ServerType != global::Grpc.Testing.ServerType.SYNC_SERVER) { |
| 2022 | size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ServerType); |
| 2023 | } |
| 2024 | if (securityParams_ != null) { |
| 2025 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(SecurityParams); |
| 2026 | } |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 2027 | if (Host.Length != 0) { |
| 2028 | size += 1 + pb::CodedOutputStream.ComputeStringSize(Host); |
| 2029 | } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 2030 | if (Port != 0) { |
| 2031 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(Port); |
| 2032 | } |
| 2033 | if (AsyncServerThreads != 0) { |
| 2034 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(AsyncServerThreads); |
| 2035 | } |
| 2036 | if (CoreLimit != 0) { |
| 2037 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(CoreLimit); |
| 2038 | } |
| 2039 | if (payloadConfig_ != null) { |
| 2040 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(PayloadConfig); |
| 2041 | } |
| 2042 | return size; |
| 2043 | } |
| 2044 | |
| 2045 | public void MergeFrom(ServerConfig other) { |
| 2046 | if (other == null) { |
| 2047 | return; |
| 2048 | } |
| 2049 | if (other.ServerType != global::Grpc.Testing.ServerType.SYNC_SERVER) { |
| 2050 | ServerType = other.ServerType; |
| 2051 | } |
| 2052 | if (other.securityParams_ != null) { |
| 2053 | if (securityParams_ == null) { |
| 2054 | securityParams_ = new global::Grpc.Testing.SecurityParams(); |
| 2055 | } |
| 2056 | SecurityParams.MergeFrom(other.SecurityParams); |
| 2057 | } |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 2058 | if (other.Host.Length != 0) { |
| 2059 | Host = other.Host; |
| 2060 | } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 2061 | if (other.Port != 0) { |
| 2062 | Port = other.Port; |
| 2063 | } |
| 2064 | if (other.AsyncServerThreads != 0) { |
| 2065 | AsyncServerThreads = other.AsyncServerThreads; |
| 2066 | } |
| 2067 | if (other.CoreLimit != 0) { |
| 2068 | CoreLimit = other.CoreLimit; |
| 2069 | } |
| 2070 | if (other.payloadConfig_ != null) { |
| 2071 | if (payloadConfig_ == null) { |
| 2072 | payloadConfig_ = new global::Grpc.Testing.PayloadConfig(); |
| 2073 | } |
| 2074 | PayloadConfig.MergeFrom(other.PayloadConfig); |
| 2075 | } |
| 2076 | } |
| 2077 | |
| 2078 | public void MergeFrom(pb::CodedInputStream input) { |
| 2079 | uint tag; |
| 2080 | while ((tag = input.ReadTag()) != 0) { |
| 2081 | switch(tag) { |
| 2082 | default: |
| 2083 | input.SkipLastField(); |
| 2084 | break; |
| 2085 | case 8: { |
| 2086 | serverType_ = (global::Grpc.Testing.ServerType) input.ReadEnum(); |
| 2087 | break; |
| 2088 | } |
| 2089 | case 18: { |
| 2090 | if (securityParams_ == null) { |
| 2091 | securityParams_ = new global::Grpc.Testing.SecurityParams(); |
| 2092 | } |
| 2093 | input.ReadMessage(securityParams_); |
| 2094 | break; |
| 2095 | } |
Jan Tattermusch | 4d7dbbf | 2015-11-18 15:32:26 -0800 | [diff] [blame] | 2096 | case 26: { |
| 2097 | Host = input.ReadString(); |
| 2098 | break; |
| 2099 | } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 2100 | case 32: { |
| 2101 | Port = input.ReadInt32(); |
| 2102 | break; |
| 2103 | } |
| 2104 | case 56: { |
| 2105 | AsyncServerThreads = input.ReadInt32(); |
| 2106 | break; |
| 2107 | } |
| 2108 | case 64: { |
| 2109 | CoreLimit = input.ReadInt32(); |
| 2110 | break; |
| 2111 | } |
| 2112 | case 74: { |
| 2113 | if (payloadConfig_ == null) { |
| 2114 | payloadConfig_ = new global::Grpc.Testing.PayloadConfig(); |
| 2115 | } |
| 2116 | input.ReadMessage(payloadConfig_); |
| 2117 | break; |
| 2118 | } |
| 2119 | } |
| 2120 | } |
| 2121 | } |
| 2122 | |
| 2123 | } |
| 2124 | |
| 2125 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 2126 | public sealed partial class ServerArgs : pb::IMessage<ServerArgs> { |
| 2127 | private static readonly pb::MessageParser<ServerArgs> _parser = new pb::MessageParser<ServerArgs>(() => new ServerArgs()); |
| 2128 | public static pb::MessageParser<ServerArgs> Parser { get { return _parser; } } |
| 2129 | |
| 2130 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 2131 | get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[12]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 2132 | } |
| 2133 | |
| 2134 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2135 | get { return Descriptor; } |
| 2136 | } |
| 2137 | |
| 2138 | public ServerArgs() { |
| 2139 | OnConstruction(); |
| 2140 | } |
| 2141 | |
| 2142 | partial void OnConstruction(); |
| 2143 | |
| 2144 | public ServerArgs(ServerArgs other) : this() { |
| 2145 | switch (other.ArgtypeCase) { |
| 2146 | case ArgtypeOneofCase.Setup: |
| 2147 | Setup = other.Setup.Clone(); |
| 2148 | break; |
| 2149 | case ArgtypeOneofCase.Mark: |
| 2150 | Mark = other.Mark.Clone(); |
| 2151 | break; |
| 2152 | } |
| 2153 | |
| 2154 | } |
| 2155 | |
| 2156 | public ServerArgs Clone() { |
| 2157 | return new ServerArgs(this); |
| 2158 | } |
| 2159 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 2160 | /// <summary>Field number for the "setup" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 2161 | public const int SetupFieldNumber = 1; |
| 2162 | public global::Grpc.Testing.ServerConfig Setup { |
| 2163 | get { return argtypeCase_ == ArgtypeOneofCase.Setup ? (global::Grpc.Testing.ServerConfig) argtype_ : null; } |
| 2164 | set { |
| 2165 | argtype_ = value; |
| 2166 | argtypeCase_ = value == null ? ArgtypeOneofCase.None : ArgtypeOneofCase.Setup; |
| 2167 | } |
| 2168 | } |
| 2169 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 2170 | /// <summary>Field number for the "mark" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 2171 | public const int MarkFieldNumber = 2; |
| 2172 | public global::Grpc.Testing.Mark Mark { |
| 2173 | get { return argtypeCase_ == ArgtypeOneofCase.Mark ? (global::Grpc.Testing.Mark) argtype_ : null; } |
| 2174 | set { |
| 2175 | argtype_ = value; |
| 2176 | argtypeCase_ = value == null ? ArgtypeOneofCase.None : ArgtypeOneofCase.Mark; |
| 2177 | } |
| 2178 | } |
| 2179 | |
| 2180 | private object argtype_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 2181 | /// <summary>Enum of possible cases for the "argtype" oneof.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 2182 | public enum ArgtypeOneofCase { |
| 2183 | None = 0, |
| 2184 | Setup = 1, |
| 2185 | Mark = 2, |
| 2186 | } |
| 2187 | private ArgtypeOneofCase argtypeCase_ = ArgtypeOneofCase.None; |
| 2188 | public ArgtypeOneofCase ArgtypeCase { |
| 2189 | get { return argtypeCase_; } |
| 2190 | } |
| 2191 | |
| 2192 | public void ClearArgtype() { |
| 2193 | argtypeCase_ = ArgtypeOneofCase.None; |
| 2194 | argtype_ = null; |
| 2195 | } |
| 2196 | |
| 2197 | public override bool Equals(object other) { |
| 2198 | return Equals(other as ServerArgs); |
| 2199 | } |
| 2200 | |
| 2201 | public bool Equals(ServerArgs other) { |
| 2202 | if (ReferenceEquals(other, null)) { |
| 2203 | return false; |
| 2204 | } |
| 2205 | if (ReferenceEquals(other, this)) { |
| 2206 | return true; |
| 2207 | } |
| 2208 | if (!object.Equals(Setup, other.Setup)) return false; |
| 2209 | if (!object.Equals(Mark, other.Mark)) return false; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 2210 | if (ArgtypeCase != other.ArgtypeCase) return false; |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 2211 | return true; |
| 2212 | } |
| 2213 | |
| 2214 | public override int GetHashCode() { |
| 2215 | int hash = 1; |
| 2216 | if (argtypeCase_ == ArgtypeOneofCase.Setup) hash ^= Setup.GetHashCode(); |
| 2217 | if (argtypeCase_ == ArgtypeOneofCase.Mark) hash ^= Mark.GetHashCode(); |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 2218 | hash ^= (int) argtypeCase_; |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 2219 | return hash; |
| 2220 | } |
| 2221 | |
| 2222 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 2223 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 2224 | } |
| 2225 | |
| 2226 | public void WriteTo(pb::CodedOutputStream output) { |
| 2227 | if (argtypeCase_ == ArgtypeOneofCase.Setup) { |
| 2228 | output.WriteRawTag(10); |
| 2229 | output.WriteMessage(Setup); |
| 2230 | } |
| 2231 | if (argtypeCase_ == ArgtypeOneofCase.Mark) { |
| 2232 | output.WriteRawTag(18); |
| 2233 | output.WriteMessage(Mark); |
| 2234 | } |
| 2235 | } |
| 2236 | |
| 2237 | public int CalculateSize() { |
| 2238 | int size = 0; |
| 2239 | if (argtypeCase_ == ArgtypeOneofCase.Setup) { |
| 2240 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Setup); |
| 2241 | } |
| 2242 | if (argtypeCase_ == ArgtypeOneofCase.Mark) { |
| 2243 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Mark); |
| 2244 | } |
| 2245 | return size; |
| 2246 | } |
| 2247 | |
| 2248 | public void MergeFrom(ServerArgs other) { |
| 2249 | if (other == null) { |
| 2250 | return; |
| 2251 | } |
| 2252 | switch (other.ArgtypeCase) { |
| 2253 | case ArgtypeOneofCase.Setup: |
| 2254 | Setup = other.Setup; |
| 2255 | break; |
| 2256 | case ArgtypeOneofCase.Mark: |
| 2257 | Mark = other.Mark; |
| 2258 | break; |
| 2259 | } |
| 2260 | |
| 2261 | } |
| 2262 | |
| 2263 | public void MergeFrom(pb::CodedInputStream input) { |
| 2264 | uint tag; |
| 2265 | while ((tag = input.ReadTag()) != 0) { |
| 2266 | switch(tag) { |
| 2267 | default: |
| 2268 | input.SkipLastField(); |
| 2269 | break; |
| 2270 | case 10: { |
| 2271 | global::Grpc.Testing.ServerConfig subBuilder = new global::Grpc.Testing.ServerConfig(); |
| 2272 | if (argtypeCase_ == ArgtypeOneofCase.Setup) { |
| 2273 | subBuilder.MergeFrom(Setup); |
| 2274 | } |
| 2275 | input.ReadMessage(subBuilder); |
| 2276 | Setup = subBuilder; |
| 2277 | break; |
| 2278 | } |
| 2279 | case 18: { |
| 2280 | global::Grpc.Testing.Mark subBuilder = new global::Grpc.Testing.Mark(); |
| 2281 | if (argtypeCase_ == ArgtypeOneofCase.Mark) { |
| 2282 | subBuilder.MergeFrom(Mark); |
| 2283 | } |
| 2284 | input.ReadMessage(subBuilder); |
| 2285 | Mark = subBuilder; |
| 2286 | break; |
| 2287 | } |
| 2288 | } |
| 2289 | } |
| 2290 | } |
| 2291 | |
| 2292 | } |
| 2293 | |
| 2294 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 2295 | public sealed partial class ServerStatus : pb::IMessage<ServerStatus> { |
| 2296 | private static readonly pb::MessageParser<ServerStatus> _parser = new pb::MessageParser<ServerStatus>(() => new ServerStatus()); |
| 2297 | public static pb::MessageParser<ServerStatus> Parser { get { return _parser; } } |
| 2298 | |
| 2299 | public static pbr::MessageDescriptor Descriptor { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 2300 | get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[13]; } |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 2301 | } |
| 2302 | |
| 2303 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2304 | get { return Descriptor; } |
| 2305 | } |
| 2306 | |
| 2307 | public ServerStatus() { |
| 2308 | OnConstruction(); |
| 2309 | } |
| 2310 | |
| 2311 | partial void OnConstruction(); |
| 2312 | |
| 2313 | public ServerStatus(ServerStatus other) : this() { |
| 2314 | Stats = other.stats_ != null ? other.Stats.Clone() : null; |
| 2315 | port_ = other.port_; |
| 2316 | cores_ = other.cores_; |
| 2317 | } |
| 2318 | |
| 2319 | public ServerStatus Clone() { |
| 2320 | return new ServerStatus(this); |
| 2321 | } |
| 2322 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 2323 | /// <summary>Field number for the "stats" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 2324 | public const int StatsFieldNumber = 1; |
| 2325 | private global::Grpc.Testing.ServerStats stats_; |
| 2326 | public global::Grpc.Testing.ServerStats Stats { |
| 2327 | get { return stats_; } |
| 2328 | set { |
| 2329 | stats_ = value; |
| 2330 | } |
| 2331 | } |
| 2332 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 2333 | /// <summary>Field number for the "port" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 2334 | public const int PortFieldNumber = 2; |
| 2335 | private int port_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 2336 | /// <summary> |
| 2337 | /// the port bound by the server |
| 2338 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 2339 | public int Port { |
| 2340 | get { return port_; } |
| 2341 | set { |
| 2342 | port_ = value; |
| 2343 | } |
| 2344 | } |
| 2345 | |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 2346 | /// <summary>Field number for the "cores" field.</summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 2347 | public const int CoresFieldNumber = 3; |
| 2348 | private int cores_; |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 2349 | /// <summary> |
| 2350 | /// Number of cores on the server. See gpr_cpu_num_cores. |
| 2351 | /// </summary> |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 2352 | public int Cores { |
| 2353 | get { return cores_; } |
| 2354 | set { |
| 2355 | cores_ = value; |
| 2356 | } |
| 2357 | } |
| 2358 | |
| 2359 | public override bool Equals(object other) { |
| 2360 | return Equals(other as ServerStatus); |
| 2361 | } |
| 2362 | |
| 2363 | public bool Equals(ServerStatus other) { |
| 2364 | if (ReferenceEquals(other, null)) { |
| 2365 | return false; |
| 2366 | } |
| 2367 | if (ReferenceEquals(other, this)) { |
| 2368 | return true; |
| 2369 | } |
| 2370 | if (!object.Equals(Stats, other.Stats)) return false; |
| 2371 | if (Port != other.Port) return false; |
| 2372 | if (Cores != other.Cores) return false; |
| 2373 | return true; |
| 2374 | } |
| 2375 | |
| 2376 | public override int GetHashCode() { |
| 2377 | int hash = 1; |
| 2378 | if (stats_ != null) hash ^= Stats.GetHashCode(); |
| 2379 | if (Port != 0) hash ^= Port.GetHashCode(); |
| 2380 | if (Cores != 0) hash ^= Cores.GetHashCode(); |
| 2381 | return hash; |
| 2382 | } |
| 2383 | |
| 2384 | public override string ToString() { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 2385 | return pb::JsonFormatter.ToDiagnosticString(this); |
Jan Tattermusch | d0c1bfa | 2015-10-22 19:14:57 -0700 | [diff] [blame] | 2386 | } |
| 2387 | |
| 2388 | public void WriteTo(pb::CodedOutputStream output) { |
| 2389 | if (stats_ != null) { |
| 2390 | output.WriteRawTag(10); |
| 2391 | output.WriteMessage(Stats); |
| 2392 | } |
| 2393 | if (Port != 0) { |
| 2394 | output.WriteRawTag(16); |
| 2395 | output.WriteInt32(Port); |
| 2396 | } |
| 2397 | if (Cores != 0) { |
| 2398 | output.WriteRawTag(24); |
| 2399 | output.WriteInt32(Cores); |
| 2400 | } |
| 2401 | } |
| 2402 | |
| 2403 | public int CalculateSize() { |
| 2404 | int size = 0; |
| 2405 | if (stats_ != null) { |
| 2406 | size += 1 + pb::CodedOutputStream.ComputeMessageSize(Stats); |
| 2407 | } |
| 2408 | if (Port != 0) { |
| 2409 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(Port); |
| 2410 | } |
| 2411 | if (Cores != 0) { |
| 2412 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(Cores); |
| 2413 | } |
| 2414 | return size; |
| 2415 | } |
| 2416 | |
| 2417 | public void MergeFrom(ServerStatus other) { |
| 2418 | if (other == null) { |
| 2419 | return; |
| 2420 | } |
| 2421 | if (other.stats_ != null) { |
| 2422 | if (stats_ == null) { |
| 2423 | stats_ = new global::Grpc.Testing.ServerStats(); |
| 2424 | } |
| 2425 | Stats.MergeFrom(other.Stats); |
| 2426 | } |
| 2427 | if (other.Port != 0) { |
| 2428 | Port = other.Port; |
| 2429 | } |
| 2430 | if (other.Cores != 0) { |
| 2431 | Cores = other.Cores; |
| 2432 | } |
| 2433 | } |
| 2434 | |
| 2435 | public void MergeFrom(pb::CodedInputStream input) { |
| 2436 | uint tag; |
| 2437 | while ((tag = input.ReadTag()) != 0) { |
| 2438 | switch(tag) { |
| 2439 | default: |
| 2440 | input.SkipLastField(); |
| 2441 | break; |
| 2442 | case 10: { |
| 2443 | if (stats_ == null) { |
| 2444 | stats_ = new global::Grpc.Testing.ServerStats(); |
| 2445 | } |
| 2446 | input.ReadMessage(stats_); |
| 2447 | break; |
| 2448 | } |
| 2449 | case 16: { |
| 2450 | Port = input.ReadInt32(); |
| 2451 | break; |
| 2452 | } |
| 2453 | case 24: { |
| 2454 | Cores = input.ReadInt32(); |
| 2455 | break; |
| 2456 | } |
| 2457 | } |
| 2458 | } |
| 2459 | } |
| 2460 | |
| 2461 | } |
| 2462 | |
| 2463 | #endregion |
| 2464 | |
| 2465 | } |
| 2466 | |
| 2467 | #endregion Designer generated code |