You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Event.cs 64 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: tensorflow/core/util/event.proto
  4. // </auto-generated>
  5. #pragma warning disable 1591, 0612, 3021
  6. #region Designer generated code
  7. using pb = global::Google.Protobuf;
  8. using pbc = global::Google.Protobuf.Collections;
  9. using pbr = global::Google.Protobuf.Reflection;
  10. using scg = global::System.Collections.Generic;
  11. namespace Tensorflow {
  12. /// <summary>Holder for reflection information generated from tensorflow/core/util/event.proto</summary>
  13. public static partial class EventReflection {
  14. #region Descriptor
  15. /// <summary>File descriptor for tensorflow/core/util/event.proto</summary>
  16. public static pbr::FileDescriptor Descriptor {
  17. get { return descriptor; }
  18. }
  19. private static pbr::FileDescriptor descriptor;
  20. static EventReflection() {
  21. byte[] descriptorData = global::System.Convert.FromBase64String(
  22. string.Concat(
  23. "CiB0ZW5zb3JmbG93L2NvcmUvdXRpbC9ldmVudC5wcm90bxIKdGVuc29yZmxv",
  24. "dxondGVuc29yZmxvdy9jb3JlL2ZyYW1ld29yay9zdW1tYXJ5LnByb3RvIrsC",
  25. "CgVFdmVudBIRCgl3YWxsX3RpbWUYASABKAESDAoEc3RlcBgCIAEoAxIWCgxm",
  26. "aWxlX3ZlcnNpb24YAyABKAlIABITCglncmFwaF9kZWYYBCABKAxIABImCgdz",
  27. "dW1tYXJ5GAUgASgLMhMudGVuc29yZmxvdy5TdW1tYXJ5SAASLQoLbG9nX21l",
  28. "c3NhZ2UYBiABKAsyFi50ZW5zb3JmbG93LkxvZ01lc3NhZ2VIABItCgtzZXNz",
  29. "aW9uX2xvZxgHIAEoCzIWLnRlbnNvcmZsb3cuU2Vzc2lvbkxvZ0gAEjwKE3Rh",
  30. "Z2dlZF9ydW5fbWV0YWRhdGEYCCABKAsyHS50ZW5zb3JmbG93LlRhZ2dlZFJ1",
  31. "bk1ldGFkYXRhSAASGAoObWV0YV9ncmFwaF9kZWYYCSABKAxIAEIGCgR3aGF0",
  32. "IpkBCgpMb2dNZXNzYWdlEisKBWxldmVsGAEgASgOMhwudGVuc29yZmxvdy5M",
  33. "b2dNZXNzYWdlLkxldmVsEg8KB21lc3NhZ2UYAiABKAkiTQoFTGV2ZWwSCwoH",
  34. "VU5LTk9XThAAEg0KCURFQlVHR0lORxAKEggKBElORk8QFBIICgRXQVJOEB4S",
  35. "CQoFRVJST1IQKBIJCgVGQVRBTBAyIrYBCgpTZXNzaW9uTG9nEjQKBnN0YXR1",
  36. "cxgBIAEoDjIkLnRlbnNvcmZsb3cuU2Vzc2lvbkxvZy5TZXNzaW9uU3RhdHVz",
  37. "EhcKD2NoZWNrcG9pbnRfcGF0aBgCIAEoCRILCgNtc2cYAyABKAkiTAoNU2Vz",
  38. "c2lvblN0YXR1cxIWChJTVEFUVVNfVU5TUEVDSUZJRUQQABIJCgVTVEFSVBAB",
  39. "EggKBFNUT1AQAhIOCgpDSEVDS1BPSU5UEAMiNgoRVGFnZ2VkUnVuTWV0YWRh",
  40. "dGESCwoDdGFnGAEgASgJEhQKDHJ1bl9tZXRhZGF0YRgCIAEoDCIkCg5XYXRj",
  41. "aGRvZ0NvbmZpZxISCgp0aW1lb3V0X21zGAEgASgDIiYKEVJlcXVlc3RlZEV4",
  42. "aXRDb2RlEhEKCWV4aXRfY29kZRgBIAEoBSK2AQoWV29ya2VySGVhcnRiZWF0",
  43. "UmVxdWVzdBI1Cg1zaHV0ZG93bl9tb2RlGAEgASgOMh4udGVuc29yZmxvdy5X",
  44. "b3JrZXJTaHV0ZG93bk1vZGUSMwoPd2F0Y2hkb2dfY29uZmlnGAIgASgLMhou",
  45. "dGVuc29yZmxvdy5XYXRjaGRvZ0NvbmZpZxIwCglleGl0X2NvZGUYAyABKAsy",
  46. "HS50ZW5zb3JmbG93LlJlcXVlc3RlZEV4aXRDb2RlIoMBChdXb3JrZXJIZWFy",
  47. "dGJlYXRSZXNwb25zZRIvCg1oZWFsdGhfc3RhdHVzGAEgASgOMhgudGVuc29y",
  48. "Zmxvdy5Xb3JrZXJIZWFsdGgSJQoKd29ya2VyX2xvZxgCIAMoCzIRLnRlbnNv",
  49. "cmZsb3cuRXZlbnQSEAoIaG9zdG5hbWUYAyABKAkqWwoMV29ya2VySGVhbHRo",
  50. "EgYKAk9LEAASHAoYUkVDRUlWRURfU0hVVERPV05fU0lHTkFMEAESEgoOSU5U",
  51. "RVJOQUxfRVJST1IQAhIRCg1TSFVUVElOR19ET1dOEAMqawoSV29ya2VyU2h1",
  52. "dGRvd25Nb2RlEgsKB0RFRkFVTFQQABISCg5OT1RfQ09ORklHVVJFRBABEhgK",
  53. "FFdBSVRfRk9SX0NPT1JESU5BVE9SEAISGgoWU0hVVERPV05fQUZURVJfVElN",
  54. "RU9VVBADQicKE29yZy50ZW5zb3JmbG93LnV0aWxCC0V2ZW50UHJvdG9zUAH4",
  55. "AQFiBnByb3RvMw=="));
  56. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  57. new pbr::FileDescriptor[] { global::Tensorflow.SummaryReflection.Descriptor, },
  58. new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tensorflow.WorkerHealth), typeof(global::Tensorflow.WorkerShutdownMode), }, null, new pbr::GeneratedClrTypeInfo[] {
  59. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Event), global::Tensorflow.Event.Parser, new[]{ "WallTime", "Step", "FileVersion", "GraphDef", "Summary", "LogMessage", "SessionLog", "TaggedRunMetadata", "MetaGraphDef" }, new[]{ "What" }, null, null, null),
  60. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.LogMessage), global::Tensorflow.LogMessage.Parser, new[]{ "Level", "Message" }, null, new[]{ typeof(global::Tensorflow.LogMessage.Types.Level) }, null, null),
  61. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SessionLog), global::Tensorflow.SessionLog.Parser, new[]{ "Status", "CheckpointPath", "Msg" }, null, new[]{ typeof(global::Tensorflow.SessionLog.Types.SessionStatus) }, null, null),
  62. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TaggedRunMetadata), global::Tensorflow.TaggedRunMetadata.Parser, new[]{ "Tag", "RunMetadata" }, null, null, null, null),
  63. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.WatchdogConfig), global::Tensorflow.WatchdogConfig.Parser, new[]{ "TimeoutMs" }, null, null, null, null),
  64. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RequestedExitCode), global::Tensorflow.RequestedExitCode.Parser, new[]{ "ExitCode" }, null, null, null, null),
  65. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.WorkerHeartbeatRequest), global::Tensorflow.WorkerHeartbeatRequest.Parser, new[]{ "ShutdownMode", "WatchdogConfig", "ExitCode" }, null, null, null, null),
  66. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.WorkerHeartbeatResponse), global::Tensorflow.WorkerHeartbeatResponse.Parser, new[]{ "HealthStatus", "WorkerLog", "Hostname" }, null, null, null, null)
  67. }));
  68. }
  69. #endregion
  70. }
  71. #region Enums
  72. /// <summary>
  73. /// Current health status of a worker.
  74. /// </summary>
  75. public enum WorkerHealth {
  76. /// <summary>
  77. /// By default a worker is healthy.
  78. /// </summary>
  79. [pbr::OriginalName("OK")] Ok = 0,
  80. [pbr::OriginalName("RECEIVED_SHUTDOWN_SIGNAL")] ReceivedShutdownSignal = 1,
  81. [pbr::OriginalName("INTERNAL_ERROR")] InternalError = 2,
  82. /// <summary>
  83. /// Worker has been instructed to shutdown after a timeout.
  84. /// </summary>
  85. [pbr::OriginalName("SHUTTING_DOWN")] ShuttingDown = 3,
  86. }
  87. /// <summary>
  88. /// Indicates the behavior of the worker when an internal error or shutdown
  89. /// signal is received.
  90. /// </summary>
  91. public enum WorkerShutdownMode {
  92. [pbr::OriginalName("DEFAULT")] Default = 0,
  93. [pbr::OriginalName("NOT_CONFIGURED")] NotConfigured = 1,
  94. [pbr::OriginalName("WAIT_FOR_COORDINATOR")] WaitForCoordinator = 2,
  95. [pbr::OriginalName("SHUTDOWN_AFTER_TIMEOUT")] ShutdownAfterTimeout = 3,
  96. }
  97. #endregion
  98. #region Messages
  99. /// <summary>
  100. /// Protocol buffer representing an event that happened during
  101. /// the execution of a Brain model.
  102. /// </summary>
  103. public sealed partial class Event : pb::IMessage<Event> {
  104. private static readonly pb::MessageParser<Event> _parser = new pb::MessageParser<Event>(() => new Event());
  105. private pb::UnknownFieldSet _unknownFields;
  106. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  107. public static pb::MessageParser<Event> Parser { get { return _parser; } }
  108. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  109. public static pbr::MessageDescriptor Descriptor {
  110. get { return global::Tensorflow.EventReflection.Descriptor.MessageTypes[0]; }
  111. }
  112. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  113. pbr::MessageDescriptor pb::IMessage.Descriptor {
  114. get { return Descriptor; }
  115. }
  116. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  117. public Event() {
  118. OnConstruction();
  119. }
  120. partial void OnConstruction();
  121. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  122. public Event(Event other) : this() {
  123. wallTime_ = other.wallTime_;
  124. step_ = other.step_;
  125. switch (other.WhatCase) {
  126. case WhatOneofCase.FileVersion:
  127. FileVersion = other.FileVersion;
  128. break;
  129. case WhatOneofCase.GraphDef:
  130. GraphDef = other.GraphDef;
  131. break;
  132. case WhatOneofCase.Summary:
  133. Summary = other.Summary.Clone();
  134. break;
  135. case WhatOneofCase.LogMessage:
  136. LogMessage = other.LogMessage.Clone();
  137. break;
  138. case WhatOneofCase.SessionLog:
  139. SessionLog = other.SessionLog.Clone();
  140. break;
  141. case WhatOneofCase.TaggedRunMetadata:
  142. TaggedRunMetadata = other.TaggedRunMetadata.Clone();
  143. break;
  144. case WhatOneofCase.MetaGraphDef:
  145. MetaGraphDef = other.MetaGraphDef;
  146. break;
  147. }
  148. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  149. }
  150. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  151. public Event Clone() {
  152. return new Event(this);
  153. }
  154. /// <summary>Field number for the "wall_time" field.</summary>
  155. public const int WallTimeFieldNumber = 1;
  156. private double wallTime_;
  157. /// <summary>
  158. /// Timestamp of the event.
  159. /// </summary>
  160. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  161. public double WallTime {
  162. get { return wallTime_; }
  163. set {
  164. wallTime_ = value;
  165. }
  166. }
  167. /// <summary>Field number for the "step" field.</summary>
  168. public const int StepFieldNumber = 2;
  169. private long step_;
  170. /// <summary>
  171. /// Global step of the event.
  172. /// </summary>
  173. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  174. public long Step {
  175. get { return step_; }
  176. set {
  177. step_ = value;
  178. }
  179. }
  180. /// <summary>Field number for the "file_version" field.</summary>
  181. public const int FileVersionFieldNumber = 3;
  182. /// <summary>
  183. /// An event file was started, with the specified version.
  184. /// This is use to identify the contents of the record IO files
  185. /// easily. Current version is "brain.Event:2". All versions
  186. /// start with "brain.Event:".
  187. /// </summary>
  188. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  189. public string FileVersion {
  190. get { return whatCase_ == WhatOneofCase.FileVersion ? (string) what_ : ""; }
  191. set {
  192. what_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  193. whatCase_ = WhatOneofCase.FileVersion;
  194. }
  195. }
  196. /// <summary>Field number for the "graph_def" field.</summary>
  197. public const int GraphDefFieldNumber = 4;
  198. /// <summary>
  199. /// An encoded version of a GraphDef.
  200. /// </summary>
  201. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  202. public pb::ByteString GraphDef {
  203. get { return whatCase_ == WhatOneofCase.GraphDef ? (pb::ByteString) what_ : pb::ByteString.Empty; }
  204. set {
  205. what_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  206. whatCase_ = WhatOneofCase.GraphDef;
  207. }
  208. }
  209. /// <summary>Field number for the "summary" field.</summary>
  210. public const int SummaryFieldNumber = 5;
  211. /// <summary>
  212. /// A summary was generated.
  213. /// </summary>
  214. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  215. public global::Tensorflow.Summary Summary {
  216. get { return whatCase_ == WhatOneofCase.Summary ? (global::Tensorflow.Summary) what_ : null; }
  217. set {
  218. what_ = value;
  219. whatCase_ = value == null ? WhatOneofCase.None : WhatOneofCase.Summary;
  220. }
  221. }
  222. /// <summary>Field number for the "log_message" field.</summary>
  223. public const int LogMessageFieldNumber = 6;
  224. /// <summary>
  225. /// The user output a log message. Not all messages are logged, only ones
  226. /// generated via the Python tensorboard_logging module.
  227. /// </summary>
  228. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  229. public global::Tensorflow.LogMessage LogMessage {
  230. get { return whatCase_ == WhatOneofCase.LogMessage ? (global::Tensorflow.LogMessage) what_ : null; }
  231. set {
  232. what_ = value;
  233. whatCase_ = value == null ? WhatOneofCase.None : WhatOneofCase.LogMessage;
  234. }
  235. }
  236. /// <summary>Field number for the "session_log" field.</summary>
  237. public const int SessionLogFieldNumber = 7;
  238. /// <summary>
  239. /// The state of the session which can be used for restarting after crashes.
  240. /// </summary>
  241. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  242. public global::Tensorflow.SessionLog SessionLog {
  243. get { return whatCase_ == WhatOneofCase.SessionLog ? (global::Tensorflow.SessionLog) what_ : null; }
  244. set {
  245. what_ = value;
  246. whatCase_ = value == null ? WhatOneofCase.None : WhatOneofCase.SessionLog;
  247. }
  248. }
  249. /// <summary>Field number for the "tagged_run_metadata" field.</summary>
  250. public const int TaggedRunMetadataFieldNumber = 8;
  251. /// <summary>
  252. /// The metadata returned by running a session.run() call.
  253. /// </summary>
  254. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  255. public global::Tensorflow.TaggedRunMetadata TaggedRunMetadata {
  256. get { return whatCase_ == WhatOneofCase.TaggedRunMetadata ? (global::Tensorflow.TaggedRunMetadata) what_ : null; }
  257. set {
  258. what_ = value;
  259. whatCase_ = value == null ? WhatOneofCase.None : WhatOneofCase.TaggedRunMetadata;
  260. }
  261. }
  262. /// <summary>Field number for the "meta_graph_def" field.</summary>
  263. public const int MetaGraphDefFieldNumber = 9;
  264. /// <summary>
  265. /// An encoded version of a MetaGraphDef.
  266. /// </summary>
  267. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  268. public pb::ByteString MetaGraphDef {
  269. get { return whatCase_ == WhatOneofCase.MetaGraphDef ? (pb::ByteString) what_ : pb::ByteString.Empty; }
  270. set {
  271. what_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  272. whatCase_ = WhatOneofCase.MetaGraphDef;
  273. }
  274. }
  275. private object what_;
  276. /// <summary>Enum of possible cases for the "what" oneof.</summary>
  277. public enum WhatOneofCase {
  278. None = 0,
  279. FileVersion = 3,
  280. GraphDef = 4,
  281. Summary = 5,
  282. LogMessage = 6,
  283. SessionLog = 7,
  284. TaggedRunMetadata = 8,
  285. MetaGraphDef = 9,
  286. }
  287. private WhatOneofCase whatCase_ = WhatOneofCase.None;
  288. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  289. public WhatOneofCase WhatCase {
  290. get { return whatCase_; }
  291. }
  292. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  293. public void ClearWhat() {
  294. whatCase_ = WhatOneofCase.None;
  295. what_ = null;
  296. }
  297. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  298. public override bool Equals(object other) {
  299. return Equals(other as Event);
  300. }
  301. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  302. public bool Equals(Event other) {
  303. if (ReferenceEquals(other, null)) {
  304. return false;
  305. }
  306. if (ReferenceEquals(other, this)) {
  307. return true;
  308. }
  309. if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(WallTime, other.WallTime)) return false;
  310. if (Step != other.Step) return false;
  311. if (FileVersion != other.FileVersion) return false;
  312. if (GraphDef != other.GraphDef) return false;
  313. if (!object.Equals(Summary, other.Summary)) return false;
  314. if (!object.Equals(LogMessage, other.LogMessage)) return false;
  315. if (!object.Equals(SessionLog, other.SessionLog)) return false;
  316. if (!object.Equals(TaggedRunMetadata, other.TaggedRunMetadata)) return false;
  317. if (MetaGraphDef != other.MetaGraphDef) return false;
  318. if (WhatCase != other.WhatCase) return false;
  319. return Equals(_unknownFields, other._unknownFields);
  320. }
  321. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  322. public override int GetHashCode() {
  323. int hash = 1;
  324. if (WallTime != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(WallTime);
  325. if (Step != 0L) hash ^= Step.GetHashCode();
  326. if (whatCase_ == WhatOneofCase.FileVersion) hash ^= FileVersion.GetHashCode();
  327. if (whatCase_ == WhatOneofCase.GraphDef) hash ^= GraphDef.GetHashCode();
  328. if (whatCase_ == WhatOneofCase.Summary) hash ^= Summary.GetHashCode();
  329. if (whatCase_ == WhatOneofCase.LogMessage) hash ^= LogMessage.GetHashCode();
  330. if (whatCase_ == WhatOneofCase.SessionLog) hash ^= SessionLog.GetHashCode();
  331. if (whatCase_ == WhatOneofCase.TaggedRunMetadata) hash ^= TaggedRunMetadata.GetHashCode();
  332. if (whatCase_ == WhatOneofCase.MetaGraphDef) hash ^= MetaGraphDef.GetHashCode();
  333. hash ^= (int) whatCase_;
  334. if (_unknownFields != null) {
  335. hash ^= _unknownFields.GetHashCode();
  336. }
  337. return hash;
  338. }
  339. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  340. public override string ToString() {
  341. return pb::JsonFormatter.ToDiagnosticString(this);
  342. }
  343. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  344. public void WriteTo(pb::CodedOutputStream output) {
  345. if (WallTime != 0D) {
  346. output.WriteRawTag(9);
  347. output.WriteDouble(WallTime);
  348. }
  349. if (Step != 0L) {
  350. output.WriteRawTag(16);
  351. output.WriteInt64(Step);
  352. }
  353. if (whatCase_ == WhatOneofCase.FileVersion) {
  354. output.WriteRawTag(26);
  355. output.WriteString(FileVersion);
  356. }
  357. if (whatCase_ == WhatOneofCase.GraphDef) {
  358. output.WriteRawTag(34);
  359. output.WriteBytes(GraphDef);
  360. }
  361. if (whatCase_ == WhatOneofCase.Summary) {
  362. output.WriteRawTag(42);
  363. output.WriteMessage(Summary);
  364. }
  365. if (whatCase_ == WhatOneofCase.LogMessage) {
  366. output.WriteRawTag(50);
  367. output.WriteMessage(LogMessage);
  368. }
  369. if (whatCase_ == WhatOneofCase.SessionLog) {
  370. output.WriteRawTag(58);
  371. output.WriteMessage(SessionLog);
  372. }
  373. if (whatCase_ == WhatOneofCase.TaggedRunMetadata) {
  374. output.WriteRawTag(66);
  375. output.WriteMessage(TaggedRunMetadata);
  376. }
  377. if (whatCase_ == WhatOneofCase.MetaGraphDef) {
  378. output.WriteRawTag(74);
  379. output.WriteBytes(MetaGraphDef);
  380. }
  381. if (_unknownFields != null) {
  382. _unknownFields.WriteTo(output);
  383. }
  384. }
  385. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  386. public int CalculateSize() {
  387. int size = 0;
  388. if (WallTime != 0D) {
  389. size += 1 + 8;
  390. }
  391. if (Step != 0L) {
  392. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Step);
  393. }
  394. if (whatCase_ == WhatOneofCase.FileVersion) {
  395. size += 1 + pb::CodedOutputStream.ComputeStringSize(FileVersion);
  396. }
  397. if (whatCase_ == WhatOneofCase.GraphDef) {
  398. size += 1 + pb::CodedOutputStream.ComputeBytesSize(GraphDef);
  399. }
  400. if (whatCase_ == WhatOneofCase.Summary) {
  401. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Summary);
  402. }
  403. if (whatCase_ == WhatOneofCase.LogMessage) {
  404. size += 1 + pb::CodedOutputStream.ComputeMessageSize(LogMessage);
  405. }
  406. if (whatCase_ == WhatOneofCase.SessionLog) {
  407. size += 1 + pb::CodedOutputStream.ComputeMessageSize(SessionLog);
  408. }
  409. if (whatCase_ == WhatOneofCase.TaggedRunMetadata) {
  410. size += 1 + pb::CodedOutputStream.ComputeMessageSize(TaggedRunMetadata);
  411. }
  412. if (whatCase_ == WhatOneofCase.MetaGraphDef) {
  413. size += 1 + pb::CodedOutputStream.ComputeBytesSize(MetaGraphDef);
  414. }
  415. if (_unknownFields != null) {
  416. size += _unknownFields.CalculateSize();
  417. }
  418. return size;
  419. }
  420. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  421. public void MergeFrom(Event other) {
  422. if (other == null) {
  423. return;
  424. }
  425. if (other.WallTime != 0D) {
  426. WallTime = other.WallTime;
  427. }
  428. if (other.Step != 0L) {
  429. Step = other.Step;
  430. }
  431. switch (other.WhatCase) {
  432. case WhatOneofCase.FileVersion:
  433. FileVersion = other.FileVersion;
  434. break;
  435. case WhatOneofCase.GraphDef:
  436. GraphDef = other.GraphDef;
  437. break;
  438. case WhatOneofCase.Summary:
  439. if (Summary == null) {
  440. Summary = new global::Tensorflow.Summary();
  441. }
  442. Summary.MergeFrom(other.Summary);
  443. break;
  444. case WhatOneofCase.LogMessage:
  445. if (LogMessage == null) {
  446. LogMessage = new global::Tensorflow.LogMessage();
  447. }
  448. LogMessage.MergeFrom(other.LogMessage);
  449. break;
  450. case WhatOneofCase.SessionLog:
  451. if (SessionLog == null) {
  452. SessionLog = new global::Tensorflow.SessionLog();
  453. }
  454. SessionLog.MergeFrom(other.SessionLog);
  455. break;
  456. case WhatOneofCase.TaggedRunMetadata:
  457. if (TaggedRunMetadata == null) {
  458. TaggedRunMetadata = new global::Tensorflow.TaggedRunMetadata();
  459. }
  460. TaggedRunMetadata.MergeFrom(other.TaggedRunMetadata);
  461. break;
  462. case WhatOneofCase.MetaGraphDef:
  463. MetaGraphDef = other.MetaGraphDef;
  464. break;
  465. }
  466. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  467. }
  468. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  469. public void MergeFrom(pb::CodedInputStream input) {
  470. uint tag;
  471. while ((tag = input.ReadTag()) != 0) {
  472. switch(tag) {
  473. default:
  474. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  475. break;
  476. case 9: {
  477. WallTime = input.ReadDouble();
  478. break;
  479. }
  480. case 16: {
  481. Step = input.ReadInt64();
  482. break;
  483. }
  484. case 26: {
  485. FileVersion = input.ReadString();
  486. break;
  487. }
  488. case 34: {
  489. GraphDef = input.ReadBytes();
  490. break;
  491. }
  492. case 42: {
  493. global::Tensorflow.Summary subBuilder = new global::Tensorflow.Summary();
  494. if (whatCase_ == WhatOneofCase.Summary) {
  495. subBuilder.MergeFrom(Summary);
  496. }
  497. input.ReadMessage(subBuilder);
  498. Summary = subBuilder;
  499. break;
  500. }
  501. case 50: {
  502. global::Tensorflow.LogMessage subBuilder = new global::Tensorflow.LogMessage();
  503. if (whatCase_ == WhatOneofCase.LogMessage) {
  504. subBuilder.MergeFrom(LogMessage);
  505. }
  506. input.ReadMessage(subBuilder);
  507. LogMessage = subBuilder;
  508. break;
  509. }
  510. case 58: {
  511. global::Tensorflow.SessionLog subBuilder = new global::Tensorflow.SessionLog();
  512. if (whatCase_ == WhatOneofCase.SessionLog) {
  513. subBuilder.MergeFrom(SessionLog);
  514. }
  515. input.ReadMessage(subBuilder);
  516. SessionLog = subBuilder;
  517. break;
  518. }
  519. case 66: {
  520. global::Tensorflow.TaggedRunMetadata subBuilder = new global::Tensorflow.TaggedRunMetadata();
  521. if (whatCase_ == WhatOneofCase.TaggedRunMetadata) {
  522. subBuilder.MergeFrom(TaggedRunMetadata);
  523. }
  524. input.ReadMessage(subBuilder);
  525. TaggedRunMetadata = subBuilder;
  526. break;
  527. }
  528. case 74: {
  529. MetaGraphDef = input.ReadBytes();
  530. break;
  531. }
  532. }
  533. }
  534. }
  535. }
  536. /// <summary>
  537. /// Protocol buffer used for logging messages to the events file.
  538. /// </summary>
  539. public sealed partial class LogMessage : pb::IMessage<LogMessage> {
  540. private static readonly pb::MessageParser<LogMessage> _parser = new pb::MessageParser<LogMessage>(() => new LogMessage());
  541. private pb::UnknownFieldSet _unknownFields;
  542. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  543. public static pb::MessageParser<LogMessage> Parser { get { return _parser; } }
  544. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  545. public static pbr::MessageDescriptor Descriptor {
  546. get { return global::Tensorflow.EventReflection.Descriptor.MessageTypes[1]; }
  547. }
  548. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  549. pbr::MessageDescriptor pb::IMessage.Descriptor {
  550. get { return Descriptor; }
  551. }
  552. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  553. public LogMessage() {
  554. OnConstruction();
  555. }
  556. partial void OnConstruction();
  557. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  558. public LogMessage(LogMessage other) : this() {
  559. level_ = other.level_;
  560. message_ = other.message_;
  561. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  562. }
  563. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  564. public LogMessage Clone() {
  565. return new LogMessage(this);
  566. }
  567. /// <summary>Field number for the "level" field.</summary>
  568. public const int LevelFieldNumber = 1;
  569. private global::Tensorflow.LogMessage.Types.Level level_ = global::Tensorflow.LogMessage.Types.Level.Unknown;
  570. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  571. public global::Tensorflow.LogMessage.Types.Level Level {
  572. get { return level_; }
  573. set {
  574. level_ = value;
  575. }
  576. }
  577. /// <summary>Field number for the "message" field.</summary>
  578. public const int MessageFieldNumber = 2;
  579. private string message_ = "";
  580. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  581. public string Message {
  582. get { return message_; }
  583. set {
  584. message_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  585. }
  586. }
  587. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  588. public override bool Equals(object other) {
  589. return Equals(other as LogMessage);
  590. }
  591. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  592. public bool Equals(LogMessage other) {
  593. if (ReferenceEquals(other, null)) {
  594. return false;
  595. }
  596. if (ReferenceEquals(other, this)) {
  597. return true;
  598. }
  599. if (Level != other.Level) return false;
  600. if (Message != other.Message) return false;
  601. return Equals(_unknownFields, other._unknownFields);
  602. }
  603. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  604. public override int GetHashCode() {
  605. int hash = 1;
  606. if (Level != global::Tensorflow.LogMessage.Types.Level.Unknown) hash ^= Level.GetHashCode();
  607. if (Message.Length != 0) hash ^= Message.GetHashCode();
  608. if (_unknownFields != null) {
  609. hash ^= _unknownFields.GetHashCode();
  610. }
  611. return hash;
  612. }
  613. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  614. public override string ToString() {
  615. return pb::JsonFormatter.ToDiagnosticString(this);
  616. }
  617. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  618. public void WriteTo(pb::CodedOutputStream output) {
  619. if (Level != global::Tensorflow.LogMessage.Types.Level.Unknown) {
  620. output.WriteRawTag(8);
  621. output.WriteEnum((int) Level);
  622. }
  623. if (Message.Length != 0) {
  624. output.WriteRawTag(18);
  625. output.WriteString(Message);
  626. }
  627. if (_unknownFields != null) {
  628. _unknownFields.WriteTo(output);
  629. }
  630. }
  631. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  632. public int CalculateSize() {
  633. int size = 0;
  634. if (Level != global::Tensorflow.LogMessage.Types.Level.Unknown) {
  635. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Level);
  636. }
  637. if (Message.Length != 0) {
  638. size += 1 + pb::CodedOutputStream.ComputeStringSize(Message);
  639. }
  640. if (_unknownFields != null) {
  641. size += _unknownFields.CalculateSize();
  642. }
  643. return size;
  644. }
  645. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  646. public void MergeFrom(LogMessage other) {
  647. if (other == null) {
  648. return;
  649. }
  650. if (other.Level != global::Tensorflow.LogMessage.Types.Level.Unknown) {
  651. Level = other.Level;
  652. }
  653. if (other.Message.Length != 0) {
  654. Message = other.Message;
  655. }
  656. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  657. }
  658. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  659. public void MergeFrom(pb::CodedInputStream input) {
  660. uint tag;
  661. while ((tag = input.ReadTag()) != 0) {
  662. switch(tag) {
  663. default:
  664. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  665. break;
  666. case 8: {
  667. Level = (global::Tensorflow.LogMessage.Types.Level) input.ReadEnum();
  668. break;
  669. }
  670. case 18: {
  671. Message = input.ReadString();
  672. break;
  673. }
  674. }
  675. }
  676. }
  677. #region Nested types
  678. /// <summary>Container for nested types declared in the LogMessage message type.</summary>
  679. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  680. public static partial class Types {
  681. public enum Level {
  682. [pbr::OriginalName("UNKNOWN")] Unknown = 0,
  683. /// <summary>
  684. /// Note: The logging level 10 cannot be named DEBUG. Some software
  685. /// projects compile their C/C++ code with -DDEBUG in debug builds. So the
  686. /// C++ code generated from this file should not have an identifier named
  687. /// DEBUG.
  688. /// </summary>
  689. [pbr::OriginalName("DEBUGGING")] Debugging = 10,
  690. [pbr::OriginalName("INFO")] Info = 20,
  691. [pbr::OriginalName("WARN")] Warn = 30,
  692. [pbr::OriginalName("ERROR")] Error = 40,
  693. [pbr::OriginalName("FATAL")] Fatal = 50,
  694. }
  695. }
  696. #endregion
  697. }
  698. /// <summary>
  699. /// Protocol buffer used for logging session state.
  700. /// </summary>
  701. public sealed partial class SessionLog : pb::IMessage<SessionLog> {
  702. private static readonly pb::MessageParser<SessionLog> _parser = new pb::MessageParser<SessionLog>(() => new SessionLog());
  703. private pb::UnknownFieldSet _unknownFields;
  704. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  705. public static pb::MessageParser<SessionLog> Parser { get { return _parser; } }
  706. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  707. public static pbr::MessageDescriptor Descriptor {
  708. get { return global::Tensorflow.EventReflection.Descriptor.MessageTypes[2]; }
  709. }
  710. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  711. pbr::MessageDescriptor pb::IMessage.Descriptor {
  712. get { return Descriptor; }
  713. }
  714. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  715. public SessionLog() {
  716. OnConstruction();
  717. }
  718. partial void OnConstruction();
  719. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  720. public SessionLog(SessionLog other) : this() {
  721. status_ = other.status_;
  722. checkpointPath_ = other.checkpointPath_;
  723. msg_ = other.msg_;
  724. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  725. }
  726. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  727. public SessionLog Clone() {
  728. return new SessionLog(this);
  729. }
  730. /// <summary>Field number for the "status" field.</summary>
  731. public const int StatusFieldNumber = 1;
  732. private global::Tensorflow.SessionLog.Types.SessionStatus status_ = global::Tensorflow.SessionLog.Types.SessionStatus.StatusUnspecified;
  733. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  734. public global::Tensorflow.SessionLog.Types.SessionStatus Status {
  735. get { return status_; }
  736. set {
  737. status_ = value;
  738. }
  739. }
  740. /// <summary>Field number for the "checkpoint_path" field.</summary>
  741. public const int CheckpointPathFieldNumber = 2;
  742. private string checkpointPath_ = "";
  743. /// <summary>
  744. /// This checkpoint_path contains both the path and filename.
  745. /// </summary>
  746. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  747. public string CheckpointPath {
  748. get { return checkpointPath_; }
  749. set {
  750. checkpointPath_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  751. }
  752. }
  753. /// <summary>Field number for the "msg" field.</summary>
  754. public const int MsgFieldNumber = 3;
  755. private string msg_ = "";
  756. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  757. public string Msg {
  758. get { return msg_; }
  759. set {
  760. msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  761. }
  762. }
  763. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  764. public override bool Equals(object other) {
  765. return Equals(other as SessionLog);
  766. }
  767. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  768. public bool Equals(SessionLog other) {
  769. if (ReferenceEquals(other, null)) {
  770. return false;
  771. }
  772. if (ReferenceEquals(other, this)) {
  773. return true;
  774. }
  775. if (Status != other.Status) return false;
  776. if (CheckpointPath != other.CheckpointPath) return false;
  777. if (Msg != other.Msg) return false;
  778. return Equals(_unknownFields, other._unknownFields);
  779. }
  780. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  781. public override int GetHashCode() {
  782. int hash = 1;
  783. if (Status != global::Tensorflow.SessionLog.Types.SessionStatus.StatusUnspecified) hash ^= Status.GetHashCode();
  784. if (CheckpointPath.Length != 0) hash ^= CheckpointPath.GetHashCode();
  785. if (Msg.Length != 0) hash ^= Msg.GetHashCode();
  786. if (_unknownFields != null) {
  787. hash ^= _unknownFields.GetHashCode();
  788. }
  789. return hash;
  790. }
  791. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  792. public override string ToString() {
  793. return pb::JsonFormatter.ToDiagnosticString(this);
  794. }
  795. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  796. public void WriteTo(pb::CodedOutputStream output) {
  797. if (Status != global::Tensorflow.SessionLog.Types.SessionStatus.StatusUnspecified) {
  798. output.WriteRawTag(8);
  799. output.WriteEnum((int) Status);
  800. }
  801. if (CheckpointPath.Length != 0) {
  802. output.WriteRawTag(18);
  803. output.WriteString(CheckpointPath);
  804. }
  805. if (Msg.Length != 0) {
  806. output.WriteRawTag(26);
  807. output.WriteString(Msg);
  808. }
  809. if (_unknownFields != null) {
  810. _unknownFields.WriteTo(output);
  811. }
  812. }
  813. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  814. public int CalculateSize() {
  815. int size = 0;
  816. if (Status != global::Tensorflow.SessionLog.Types.SessionStatus.StatusUnspecified) {
  817. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status);
  818. }
  819. if (CheckpointPath.Length != 0) {
  820. size += 1 + pb::CodedOutputStream.ComputeStringSize(CheckpointPath);
  821. }
  822. if (Msg.Length != 0) {
  823. size += 1 + pb::CodedOutputStream.ComputeStringSize(Msg);
  824. }
  825. if (_unknownFields != null) {
  826. size += _unknownFields.CalculateSize();
  827. }
  828. return size;
  829. }
  830. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  831. public void MergeFrom(SessionLog other) {
  832. if (other == null) {
  833. return;
  834. }
  835. if (other.Status != global::Tensorflow.SessionLog.Types.SessionStatus.StatusUnspecified) {
  836. Status = other.Status;
  837. }
  838. if (other.CheckpointPath.Length != 0) {
  839. CheckpointPath = other.CheckpointPath;
  840. }
  841. if (other.Msg.Length != 0) {
  842. Msg = other.Msg;
  843. }
  844. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  845. }
  846. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  847. public void MergeFrom(pb::CodedInputStream input) {
  848. uint tag;
  849. while ((tag = input.ReadTag()) != 0) {
  850. switch(tag) {
  851. default:
  852. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  853. break;
  854. case 8: {
  855. Status = (global::Tensorflow.SessionLog.Types.SessionStatus) input.ReadEnum();
  856. break;
  857. }
  858. case 18: {
  859. CheckpointPath = input.ReadString();
  860. break;
  861. }
  862. case 26: {
  863. Msg = input.ReadString();
  864. break;
  865. }
  866. }
  867. }
  868. }
  869. #region Nested types
  870. /// <summary>Container for nested types declared in the SessionLog message type.</summary>
  871. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  872. public static partial class Types {
  873. public enum SessionStatus {
  874. [pbr::OriginalName("STATUS_UNSPECIFIED")] StatusUnspecified = 0,
  875. [pbr::OriginalName("START")] Start = 1,
  876. [pbr::OriginalName("STOP")] Stop = 2,
  877. [pbr::OriginalName("CHECKPOINT")] Checkpoint = 3,
  878. }
  879. }
  880. #endregion
  881. }
  882. /// <summary>
  883. /// For logging the metadata output for a single session.run() call.
  884. /// </summary>
  885. public sealed partial class TaggedRunMetadata : pb::IMessage<TaggedRunMetadata> {
  886. private static readonly pb::MessageParser<TaggedRunMetadata> _parser = new pb::MessageParser<TaggedRunMetadata>(() => new TaggedRunMetadata());
  887. private pb::UnknownFieldSet _unknownFields;
  888. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  889. public static pb::MessageParser<TaggedRunMetadata> Parser { get { return _parser; } }
  890. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  891. public static pbr::MessageDescriptor Descriptor {
  892. get { return global::Tensorflow.EventReflection.Descriptor.MessageTypes[3]; }
  893. }
  894. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  895. pbr::MessageDescriptor pb::IMessage.Descriptor {
  896. get { return Descriptor; }
  897. }
  898. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  899. public TaggedRunMetadata() {
  900. OnConstruction();
  901. }
  902. partial void OnConstruction();
  903. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  904. public TaggedRunMetadata(TaggedRunMetadata other) : this() {
  905. tag_ = other.tag_;
  906. runMetadata_ = other.runMetadata_;
  907. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  908. }
  909. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  910. public TaggedRunMetadata Clone() {
  911. return new TaggedRunMetadata(this);
  912. }
  913. /// <summary>Field number for the "tag" field.</summary>
  914. public const int TagFieldNumber = 1;
  915. private string tag_ = "";
  916. /// <summary>
  917. /// Tag name associated with this metadata.
  918. /// </summary>
  919. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  920. public string Tag {
  921. get { return tag_; }
  922. set {
  923. tag_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  924. }
  925. }
  926. /// <summary>Field number for the "run_metadata" field.</summary>
  927. public const int RunMetadataFieldNumber = 2;
  928. private pb::ByteString runMetadata_ = pb::ByteString.Empty;
  929. /// <summary>
  930. /// Byte-encoded version of the `RunMetadata` proto in order to allow lazy
  931. /// deserialization.
  932. /// </summary>
  933. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  934. public pb::ByteString RunMetadata {
  935. get { return runMetadata_; }
  936. set {
  937. runMetadata_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  938. }
  939. }
  940. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  941. public override bool Equals(object other) {
  942. return Equals(other as TaggedRunMetadata);
  943. }
  944. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  945. public bool Equals(TaggedRunMetadata other) {
  946. if (ReferenceEquals(other, null)) {
  947. return false;
  948. }
  949. if (ReferenceEquals(other, this)) {
  950. return true;
  951. }
  952. if (Tag != other.Tag) return false;
  953. if (RunMetadata != other.RunMetadata) return false;
  954. return Equals(_unknownFields, other._unknownFields);
  955. }
  956. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  957. public override int GetHashCode() {
  958. int hash = 1;
  959. if (Tag.Length != 0) hash ^= Tag.GetHashCode();
  960. if (RunMetadata.Length != 0) hash ^= RunMetadata.GetHashCode();
  961. if (_unknownFields != null) {
  962. hash ^= _unknownFields.GetHashCode();
  963. }
  964. return hash;
  965. }
  966. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  967. public override string ToString() {
  968. return pb::JsonFormatter.ToDiagnosticString(this);
  969. }
  970. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  971. public void WriteTo(pb::CodedOutputStream output) {
  972. if (Tag.Length != 0) {
  973. output.WriteRawTag(10);
  974. output.WriteString(Tag);
  975. }
  976. if (RunMetadata.Length != 0) {
  977. output.WriteRawTag(18);
  978. output.WriteBytes(RunMetadata);
  979. }
  980. if (_unknownFields != null) {
  981. _unknownFields.WriteTo(output);
  982. }
  983. }
  984. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  985. public int CalculateSize() {
  986. int size = 0;
  987. if (Tag.Length != 0) {
  988. size += 1 + pb::CodedOutputStream.ComputeStringSize(Tag);
  989. }
  990. if (RunMetadata.Length != 0) {
  991. size += 1 + pb::CodedOutputStream.ComputeBytesSize(RunMetadata);
  992. }
  993. if (_unknownFields != null) {
  994. size += _unknownFields.CalculateSize();
  995. }
  996. return size;
  997. }
  998. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  999. public void MergeFrom(TaggedRunMetadata other) {
  1000. if (other == null) {
  1001. return;
  1002. }
  1003. if (other.Tag.Length != 0) {
  1004. Tag = other.Tag;
  1005. }
  1006. if (other.RunMetadata.Length != 0) {
  1007. RunMetadata = other.RunMetadata;
  1008. }
  1009. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1010. }
  1011. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1012. public void MergeFrom(pb::CodedInputStream input) {
  1013. uint tag;
  1014. while ((tag = input.ReadTag()) != 0) {
  1015. switch(tag) {
  1016. default:
  1017. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1018. break;
  1019. case 10: {
  1020. Tag = input.ReadString();
  1021. break;
  1022. }
  1023. case 18: {
  1024. RunMetadata = input.ReadBytes();
  1025. break;
  1026. }
  1027. }
  1028. }
  1029. }
  1030. }
  1031. public sealed partial class WatchdogConfig : pb::IMessage<WatchdogConfig> {
  1032. private static readonly pb::MessageParser<WatchdogConfig> _parser = new pb::MessageParser<WatchdogConfig>(() => new WatchdogConfig());
  1033. private pb::UnknownFieldSet _unknownFields;
  1034. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1035. public static pb::MessageParser<WatchdogConfig> Parser { get { return _parser; } }
  1036. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1037. public static pbr::MessageDescriptor Descriptor {
  1038. get { return global::Tensorflow.EventReflection.Descriptor.MessageTypes[4]; }
  1039. }
  1040. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1041. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1042. get { return Descriptor; }
  1043. }
  1044. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1045. public WatchdogConfig() {
  1046. OnConstruction();
  1047. }
  1048. partial void OnConstruction();
  1049. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1050. public WatchdogConfig(WatchdogConfig other) : this() {
  1051. timeoutMs_ = other.timeoutMs_;
  1052. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1053. }
  1054. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1055. public WatchdogConfig Clone() {
  1056. return new WatchdogConfig(this);
  1057. }
  1058. /// <summary>Field number for the "timeout_ms" field.</summary>
  1059. public const int TimeoutMsFieldNumber = 1;
  1060. private long timeoutMs_;
  1061. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1062. public long TimeoutMs {
  1063. get { return timeoutMs_; }
  1064. set {
  1065. timeoutMs_ = value;
  1066. }
  1067. }
  1068. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1069. public override bool Equals(object other) {
  1070. return Equals(other as WatchdogConfig);
  1071. }
  1072. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1073. public bool Equals(WatchdogConfig other) {
  1074. if (ReferenceEquals(other, null)) {
  1075. return false;
  1076. }
  1077. if (ReferenceEquals(other, this)) {
  1078. return true;
  1079. }
  1080. if (TimeoutMs != other.TimeoutMs) return false;
  1081. return Equals(_unknownFields, other._unknownFields);
  1082. }
  1083. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1084. public override int GetHashCode() {
  1085. int hash = 1;
  1086. if (TimeoutMs != 0L) hash ^= TimeoutMs.GetHashCode();
  1087. if (_unknownFields != null) {
  1088. hash ^= _unknownFields.GetHashCode();
  1089. }
  1090. return hash;
  1091. }
  1092. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1093. public override string ToString() {
  1094. return pb::JsonFormatter.ToDiagnosticString(this);
  1095. }
  1096. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1097. public void WriteTo(pb::CodedOutputStream output) {
  1098. if (TimeoutMs != 0L) {
  1099. output.WriteRawTag(8);
  1100. output.WriteInt64(TimeoutMs);
  1101. }
  1102. if (_unknownFields != null) {
  1103. _unknownFields.WriteTo(output);
  1104. }
  1105. }
  1106. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1107. public int CalculateSize() {
  1108. int size = 0;
  1109. if (TimeoutMs != 0L) {
  1110. size += 1 + pb::CodedOutputStream.ComputeInt64Size(TimeoutMs);
  1111. }
  1112. if (_unknownFields != null) {
  1113. size += _unknownFields.CalculateSize();
  1114. }
  1115. return size;
  1116. }
  1117. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1118. public void MergeFrom(WatchdogConfig other) {
  1119. if (other == null) {
  1120. return;
  1121. }
  1122. if (other.TimeoutMs != 0L) {
  1123. TimeoutMs = other.TimeoutMs;
  1124. }
  1125. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1126. }
  1127. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1128. public void MergeFrom(pb::CodedInputStream input) {
  1129. uint tag;
  1130. while ((tag = input.ReadTag()) != 0) {
  1131. switch(tag) {
  1132. default:
  1133. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1134. break;
  1135. case 8: {
  1136. TimeoutMs = input.ReadInt64();
  1137. break;
  1138. }
  1139. }
  1140. }
  1141. }
  1142. }
  1143. public sealed partial class RequestedExitCode : pb::IMessage<RequestedExitCode> {
  1144. private static readonly pb::MessageParser<RequestedExitCode> _parser = new pb::MessageParser<RequestedExitCode>(() => new RequestedExitCode());
  1145. private pb::UnknownFieldSet _unknownFields;
  1146. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1147. public static pb::MessageParser<RequestedExitCode> Parser { get { return _parser; } }
  1148. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1149. public static pbr::MessageDescriptor Descriptor {
  1150. get { return global::Tensorflow.EventReflection.Descriptor.MessageTypes[5]; }
  1151. }
  1152. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1153. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1154. get { return Descriptor; }
  1155. }
  1156. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1157. public RequestedExitCode() {
  1158. OnConstruction();
  1159. }
  1160. partial void OnConstruction();
  1161. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1162. public RequestedExitCode(RequestedExitCode other) : this() {
  1163. exitCode_ = other.exitCode_;
  1164. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1165. }
  1166. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1167. public RequestedExitCode Clone() {
  1168. return new RequestedExitCode(this);
  1169. }
  1170. /// <summary>Field number for the "exit_code" field.</summary>
  1171. public const int ExitCodeFieldNumber = 1;
  1172. private int exitCode_;
  1173. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1174. public int ExitCode {
  1175. get { return exitCode_; }
  1176. set {
  1177. exitCode_ = value;
  1178. }
  1179. }
  1180. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1181. public override bool Equals(object other) {
  1182. return Equals(other as RequestedExitCode);
  1183. }
  1184. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1185. public bool Equals(RequestedExitCode other) {
  1186. if (ReferenceEquals(other, null)) {
  1187. return false;
  1188. }
  1189. if (ReferenceEquals(other, this)) {
  1190. return true;
  1191. }
  1192. if (ExitCode != other.ExitCode) return false;
  1193. return Equals(_unknownFields, other._unknownFields);
  1194. }
  1195. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1196. public override int GetHashCode() {
  1197. int hash = 1;
  1198. if (ExitCode != 0) hash ^= ExitCode.GetHashCode();
  1199. if (_unknownFields != null) {
  1200. hash ^= _unknownFields.GetHashCode();
  1201. }
  1202. return hash;
  1203. }
  1204. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1205. public override string ToString() {
  1206. return pb::JsonFormatter.ToDiagnosticString(this);
  1207. }
  1208. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1209. public void WriteTo(pb::CodedOutputStream output) {
  1210. if (ExitCode != 0) {
  1211. output.WriteRawTag(8);
  1212. output.WriteInt32(ExitCode);
  1213. }
  1214. if (_unknownFields != null) {
  1215. _unknownFields.WriteTo(output);
  1216. }
  1217. }
  1218. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1219. public int CalculateSize() {
  1220. int size = 0;
  1221. if (ExitCode != 0) {
  1222. size += 1 + pb::CodedOutputStream.ComputeInt32Size(ExitCode);
  1223. }
  1224. if (_unknownFields != null) {
  1225. size += _unknownFields.CalculateSize();
  1226. }
  1227. return size;
  1228. }
  1229. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1230. public void MergeFrom(RequestedExitCode other) {
  1231. if (other == null) {
  1232. return;
  1233. }
  1234. if (other.ExitCode != 0) {
  1235. ExitCode = other.ExitCode;
  1236. }
  1237. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1238. }
  1239. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1240. public void MergeFrom(pb::CodedInputStream input) {
  1241. uint tag;
  1242. while ((tag = input.ReadTag()) != 0) {
  1243. switch(tag) {
  1244. default:
  1245. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1246. break;
  1247. case 8: {
  1248. ExitCode = input.ReadInt32();
  1249. break;
  1250. }
  1251. }
  1252. }
  1253. }
  1254. }
  1255. public sealed partial class WorkerHeartbeatRequest : pb::IMessage<WorkerHeartbeatRequest> {
  1256. private static readonly pb::MessageParser<WorkerHeartbeatRequest> _parser = new pb::MessageParser<WorkerHeartbeatRequest>(() => new WorkerHeartbeatRequest());
  1257. private pb::UnknownFieldSet _unknownFields;
  1258. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1259. public static pb::MessageParser<WorkerHeartbeatRequest> Parser { get { return _parser; } }
  1260. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1261. public static pbr::MessageDescriptor Descriptor {
  1262. get { return global::Tensorflow.EventReflection.Descriptor.MessageTypes[6]; }
  1263. }
  1264. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1265. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1266. get { return Descriptor; }
  1267. }
  1268. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1269. public WorkerHeartbeatRequest() {
  1270. OnConstruction();
  1271. }
  1272. partial void OnConstruction();
  1273. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1274. public WorkerHeartbeatRequest(WorkerHeartbeatRequest other) : this() {
  1275. shutdownMode_ = other.shutdownMode_;
  1276. watchdogConfig_ = other.watchdogConfig_ != null ? other.watchdogConfig_.Clone() : null;
  1277. exitCode_ = other.exitCode_ != null ? other.exitCode_.Clone() : null;
  1278. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1279. }
  1280. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1281. public WorkerHeartbeatRequest Clone() {
  1282. return new WorkerHeartbeatRequest(this);
  1283. }
  1284. /// <summary>Field number for the "shutdown_mode" field.</summary>
  1285. public const int ShutdownModeFieldNumber = 1;
  1286. private global::Tensorflow.WorkerShutdownMode shutdownMode_ = global::Tensorflow.WorkerShutdownMode.Default;
  1287. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1288. public global::Tensorflow.WorkerShutdownMode ShutdownMode {
  1289. get { return shutdownMode_; }
  1290. set {
  1291. shutdownMode_ = value;
  1292. }
  1293. }
  1294. /// <summary>Field number for the "watchdog_config" field.</summary>
  1295. public const int WatchdogConfigFieldNumber = 2;
  1296. private global::Tensorflow.WatchdogConfig watchdogConfig_;
  1297. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1298. public global::Tensorflow.WatchdogConfig WatchdogConfig {
  1299. get { return watchdogConfig_; }
  1300. set {
  1301. watchdogConfig_ = value;
  1302. }
  1303. }
  1304. /// <summary>Field number for the "exit_code" field.</summary>
  1305. public const int ExitCodeFieldNumber = 3;
  1306. private global::Tensorflow.RequestedExitCode exitCode_;
  1307. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1308. public global::Tensorflow.RequestedExitCode ExitCode {
  1309. get { return exitCode_; }
  1310. set {
  1311. exitCode_ = value;
  1312. }
  1313. }
  1314. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1315. public override bool Equals(object other) {
  1316. return Equals(other as WorkerHeartbeatRequest);
  1317. }
  1318. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1319. public bool Equals(WorkerHeartbeatRequest other) {
  1320. if (ReferenceEquals(other, null)) {
  1321. return false;
  1322. }
  1323. if (ReferenceEquals(other, this)) {
  1324. return true;
  1325. }
  1326. if (ShutdownMode != other.ShutdownMode) return false;
  1327. if (!object.Equals(WatchdogConfig, other.WatchdogConfig)) return false;
  1328. if (!object.Equals(ExitCode, other.ExitCode)) return false;
  1329. return Equals(_unknownFields, other._unknownFields);
  1330. }
  1331. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1332. public override int GetHashCode() {
  1333. int hash = 1;
  1334. if (ShutdownMode != global::Tensorflow.WorkerShutdownMode.Default) hash ^= ShutdownMode.GetHashCode();
  1335. if (watchdogConfig_ != null) hash ^= WatchdogConfig.GetHashCode();
  1336. if (exitCode_ != null) hash ^= ExitCode.GetHashCode();
  1337. if (_unknownFields != null) {
  1338. hash ^= _unknownFields.GetHashCode();
  1339. }
  1340. return hash;
  1341. }
  1342. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1343. public override string ToString() {
  1344. return pb::JsonFormatter.ToDiagnosticString(this);
  1345. }
  1346. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1347. public void WriteTo(pb::CodedOutputStream output) {
  1348. if (ShutdownMode != global::Tensorflow.WorkerShutdownMode.Default) {
  1349. output.WriteRawTag(8);
  1350. output.WriteEnum((int) ShutdownMode);
  1351. }
  1352. if (watchdogConfig_ != null) {
  1353. output.WriteRawTag(18);
  1354. output.WriteMessage(WatchdogConfig);
  1355. }
  1356. if (exitCode_ != null) {
  1357. output.WriteRawTag(26);
  1358. output.WriteMessage(ExitCode);
  1359. }
  1360. if (_unknownFields != null) {
  1361. _unknownFields.WriteTo(output);
  1362. }
  1363. }
  1364. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1365. public int CalculateSize() {
  1366. int size = 0;
  1367. if (ShutdownMode != global::Tensorflow.WorkerShutdownMode.Default) {
  1368. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ShutdownMode);
  1369. }
  1370. if (watchdogConfig_ != null) {
  1371. size += 1 + pb::CodedOutputStream.ComputeMessageSize(WatchdogConfig);
  1372. }
  1373. if (exitCode_ != null) {
  1374. size += 1 + pb::CodedOutputStream.ComputeMessageSize(ExitCode);
  1375. }
  1376. if (_unknownFields != null) {
  1377. size += _unknownFields.CalculateSize();
  1378. }
  1379. return size;
  1380. }
  1381. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1382. public void MergeFrom(WorkerHeartbeatRequest other) {
  1383. if (other == null) {
  1384. return;
  1385. }
  1386. if (other.ShutdownMode != global::Tensorflow.WorkerShutdownMode.Default) {
  1387. ShutdownMode = other.ShutdownMode;
  1388. }
  1389. if (other.watchdogConfig_ != null) {
  1390. if (watchdogConfig_ == null) {
  1391. WatchdogConfig = new global::Tensorflow.WatchdogConfig();
  1392. }
  1393. WatchdogConfig.MergeFrom(other.WatchdogConfig);
  1394. }
  1395. if (other.exitCode_ != null) {
  1396. if (exitCode_ == null) {
  1397. ExitCode = new global::Tensorflow.RequestedExitCode();
  1398. }
  1399. ExitCode.MergeFrom(other.ExitCode);
  1400. }
  1401. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1402. }
  1403. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1404. public void MergeFrom(pb::CodedInputStream input) {
  1405. uint tag;
  1406. while ((tag = input.ReadTag()) != 0) {
  1407. switch(tag) {
  1408. default:
  1409. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1410. break;
  1411. case 8: {
  1412. ShutdownMode = (global::Tensorflow.WorkerShutdownMode) input.ReadEnum();
  1413. break;
  1414. }
  1415. case 18: {
  1416. if (watchdogConfig_ == null) {
  1417. WatchdogConfig = new global::Tensorflow.WatchdogConfig();
  1418. }
  1419. input.ReadMessage(WatchdogConfig);
  1420. break;
  1421. }
  1422. case 26: {
  1423. if (exitCode_ == null) {
  1424. ExitCode = new global::Tensorflow.RequestedExitCode();
  1425. }
  1426. input.ReadMessage(ExitCode);
  1427. break;
  1428. }
  1429. }
  1430. }
  1431. }
  1432. }
  1433. public sealed partial class WorkerHeartbeatResponse : pb::IMessage<WorkerHeartbeatResponse> {
  1434. private static readonly pb::MessageParser<WorkerHeartbeatResponse> _parser = new pb::MessageParser<WorkerHeartbeatResponse>(() => new WorkerHeartbeatResponse());
  1435. private pb::UnknownFieldSet _unknownFields;
  1436. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1437. public static pb::MessageParser<WorkerHeartbeatResponse> Parser { get { return _parser; } }
  1438. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1439. public static pbr::MessageDescriptor Descriptor {
  1440. get { return global::Tensorflow.EventReflection.Descriptor.MessageTypes[7]; }
  1441. }
  1442. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1443. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1444. get { return Descriptor; }
  1445. }
  1446. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1447. public WorkerHeartbeatResponse() {
  1448. OnConstruction();
  1449. }
  1450. partial void OnConstruction();
  1451. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1452. public WorkerHeartbeatResponse(WorkerHeartbeatResponse other) : this() {
  1453. healthStatus_ = other.healthStatus_;
  1454. workerLog_ = other.workerLog_.Clone();
  1455. hostname_ = other.hostname_;
  1456. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1457. }
  1458. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1459. public WorkerHeartbeatResponse Clone() {
  1460. return new WorkerHeartbeatResponse(this);
  1461. }
  1462. /// <summary>Field number for the "health_status" field.</summary>
  1463. public const int HealthStatusFieldNumber = 1;
  1464. private global::Tensorflow.WorkerHealth healthStatus_ = global::Tensorflow.WorkerHealth.Ok;
  1465. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1466. public global::Tensorflow.WorkerHealth HealthStatus {
  1467. get { return healthStatus_; }
  1468. set {
  1469. healthStatus_ = value;
  1470. }
  1471. }
  1472. /// <summary>Field number for the "worker_log" field.</summary>
  1473. public const int WorkerLogFieldNumber = 2;
  1474. private static readonly pb::FieldCodec<global::Tensorflow.Event> _repeated_workerLog_codec
  1475. = pb::FieldCodec.ForMessage(18, global::Tensorflow.Event.Parser);
  1476. private readonly pbc::RepeatedField<global::Tensorflow.Event> workerLog_ = new pbc::RepeatedField<global::Tensorflow.Event>();
  1477. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1478. public pbc::RepeatedField<global::Tensorflow.Event> WorkerLog {
  1479. get { return workerLog_; }
  1480. }
  1481. /// <summary>Field number for the "hostname" field.</summary>
  1482. public const int HostnameFieldNumber = 3;
  1483. private string hostname_ = "";
  1484. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1485. public string Hostname {
  1486. get { return hostname_; }
  1487. set {
  1488. hostname_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1489. }
  1490. }
  1491. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1492. public override bool Equals(object other) {
  1493. return Equals(other as WorkerHeartbeatResponse);
  1494. }
  1495. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1496. public bool Equals(WorkerHeartbeatResponse other) {
  1497. if (ReferenceEquals(other, null)) {
  1498. return false;
  1499. }
  1500. if (ReferenceEquals(other, this)) {
  1501. return true;
  1502. }
  1503. if (HealthStatus != other.HealthStatus) return false;
  1504. if(!workerLog_.Equals(other.workerLog_)) return false;
  1505. if (Hostname != other.Hostname) return false;
  1506. return Equals(_unknownFields, other._unknownFields);
  1507. }
  1508. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1509. public override int GetHashCode() {
  1510. int hash = 1;
  1511. if (HealthStatus != global::Tensorflow.WorkerHealth.Ok) hash ^= HealthStatus.GetHashCode();
  1512. hash ^= workerLog_.GetHashCode();
  1513. if (Hostname.Length != 0) hash ^= Hostname.GetHashCode();
  1514. if (_unknownFields != null) {
  1515. hash ^= _unknownFields.GetHashCode();
  1516. }
  1517. return hash;
  1518. }
  1519. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1520. public override string ToString() {
  1521. return pb::JsonFormatter.ToDiagnosticString(this);
  1522. }
  1523. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1524. public void WriteTo(pb::CodedOutputStream output) {
  1525. if (HealthStatus != global::Tensorflow.WorkerHealth.Ok) {
  1526. output.WriteRawTag(8);
  1527. output.WriteEnum((int) HealthStatus);
  1528. }
  1529. workerLog_.WriteTo(output, _repeated_workerLog_codec);
  1530. if (Hostname.Length != 0) {
  1531. output.WriteRawTag(26);
  1532. output.WriteString(Hostname);
  1533. }
  1534. if (_unknownFields != null) {
  1535. _unknownFields.WriteTo(output);
  1536. }
  1537. }
  1538. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1539. public int CalculateSize() {
  1540. int size = 0;
  1541. if (HealthStatus != global::Tensorflow.WorkerHealth.Ok) {
  1542. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) HealthStatus);
  1543. }
  1544. size += workerLog_.CalculateSize(_repeated_workerLog_codec);
  1545. if (Hostname.Length != 0) {
  1546. size += 1 + pb::CodedOutputStream.ComputeStringSize(Hostname);
  1547. }
  1548. if (_unknownFields != null) {
  1549. size += _unknownFields.CalculateSize();
  1550. }
  1551. return size;
  1552. }
  1553. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1554. public void MergeFrom(WorkerHeartbeatResponse other) {
  1555. if (other == null) {
  1556. return;
  1557. }
  1558. if (other.HealthStatus != global::Tensorflow.WorkerHealth.Ok) {
  1559. HealthStatus = other.HealthStatus;
  1560. }
  1561. workerLog_.Add(other.workerLog_);
  1562. if (other.Hostname.Length != 0) {
  1563. Hostname = other.Hostname;
  1564. }
  1565. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1566. }
  1567. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1568. public void MergeFrom(pb::CodedInputStream input) {
  1569. uint tag;
  1570. while ((tag = input.ReadTag()) != 0) {
  1571. switch(tag) {
  1572. default:
  1573. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1574. break;
  1575. case 8: {
  1576. HealthStatus = (global::Tensorflow.WorkerHealth) input.ReadEnum();
  1577. break;
  1578. }
  1579. case 18: {
  1580. workerLog_.AddEntriesFrom(input, _repeated_workerLog_codec);
  1581. break;
  1582. }
  1583. case 26: {
  1584. Hostname = input.ReadString();
  1585. break;
  1586. }
  1587. }
  1588. }
  1589. }
  1590. }
  1591. #endregion
  1592. }
  1593. #endregion Designer generated code