Control.cs 76 KB

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