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.

ServiceConfig.cs 45 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: tensorflow/core/protobuf/service_config.proto
  4. // </auto-generated>
  5. #pragma warning disable 1591, 0612, 3021, 8981
  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.Data.Experimental {
  12. /// <summary>Holder for reflection information generated from tensorflow/core/protobuf/service_config.proto</summary>
  13. public static partial class ServiceConfigReflection {
  14. #region Descriptor
  15. /// <summary>File descriptor for tensorflow/core/protobuf/service_config.proto</summary>
  16. public static pbr::FileDescriptor Descriptor {
  17. get { return descriptor; }
  18. }
  19. private static pbr::FileDescriptor descriptor;
  20. static ServiceConfigReflection() {
  21. byte[] descriptorData = global::System.Convert.FromBase64String(
  22. string.Concat(
  23. "Ci10ZW5zb3JmbG93L2NvcmUvcHJvdG9idWYvc2VydmljZV9jb25maWcucHJv",
  24. "dG8SHHRlbnNvcmZsb3cuZGF0YS5leHBlcmltZW50YWwaK3RlbnNvcmZsb3cv",
  25. "Y29yZS9wcm90b2J1Zi9kYXRhX3NlcnZpY2UucHJvdG8ijQIKEERpc3BhdGNo",
  26. "ZXJDb25maWcSDAoEcG9ydBgBIAEoAxIQCghwcm90b2NvbBgCIAEoCRIQCgh3",
  27. "b3JrX2RpchgDIAEoCRIbChNmYXVsdF90b2xlcmFudF9tb2RlGAQgASgIEhgK",
  28. "EHdvcmtlcl9hZGRyZXNzZXMYByADKAkSOAoPZGVwbG95bWVudF9tb2RlGAkg",
  29. "ASgOMh8udGVuc29yZmxvdy5kYXRhLkRlcGxveW1lbnRNb2RlEiAKGGpvYl9n",
  30. "Y19jaGVja19pbnRlcnZhbF9tcxgFIAEoAxIZChFqb2JfZ2NfdGltZW91dF9t",
  31. "cxgGIAEoAxIZChFjbGllbnRfdGltZW91dF9tcxgIIAEoAyK+AgoMV29ya2Vy",
  32. "Q29uZmlnEgwKBHBvcnQYASABKAMSEAoIcHJvdG9jb2wYAiABKAkSGgoSZGlz",
  33. "cGF0Y2hlcl9hZGRyZXNzGAMgASgJEhYKDndvcmtlcl9hZGRyZXNzGAQgASgJ",
  34. "EhMKC3dvcmtlcl90YWdzGAogAygJEh0KFWhlYXJ0YmVhdF9pbnRlcnZhbF9t",
  35. "cxgFIAEoAxIdChVkaXNwYXRjaGVyX3RpbWVvdXRfbXMYBiABKAMSHgoWZGF0",
  36. "YV90cmFuc2Zlcl9wcm90b2NvbBgHIAEoCRIdChVkYXRhX3RyYW5zZmVyX2Fk",
  37. "ZHJlc3MYCCABKAkSJgoeY3Jvc3NfdHJhaW5lcl9jYWNoZV9zaXplX2J5dGVz",
  38. "GAsgASgDEiAKGHNodXRkb3duX3F1aWV0X3BlcmlvZF9tcxgJIAEoA0JXWlVn",
  39. "aXRodWIuY29tL3RlbnNvcmZsb3cvdGVuc29yZmxvdy90ZW5zb3JmbG93L2dv",
  40. "L2NvcmUvcHJvdG9idWYvZm9yX2NvcmVfcHJvdG9zX2dvX3Byb3RvYgZwcm90",
  41. "bzM="));
  42. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  43. new pbr::FileDescriptor[] { global::Tensorflow.Data.DataServiceReflection.Descriptor, },
  44. new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
  45. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Data.Experimental.DispatcherConfig), global::Tensorflow.Data.Experimental.DispatcherConfig.Parser, new[]{ "Port", "Protocol", "WorkDir", "FaultTolerantMode", "WorkerAddresses", "DeploymentMode", "JobGcCheckIntervalMs", "JobGcTimeoutMs", "ClientTimeoutMs" }, null, null, null, null),
  46. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Data.Experimental.WorkerConfig), global::Tensorflow.Data.Experimental.WorkerConfig.Parser, new[]{ "Port", "Protocol", "DispatcherAddress", "WorkerAddress", "WorkerTags", "HeartbeatIntervalMs", "DispatcherTimeoutMs", "DataTransferProtocol", "DataTransferAddress", "CrossTrainerCacheSizeBytes", "ShutdownQuietPeriodMs" }, null, null, null, null)
  47. }));
  48. }
  49. #endregion
  50. }
  51. #region Messages
  52. /// <summary>
  53. /// Configuration for a tf.data service DispatchServer.
  54. /// Next id: 10
  55. /// </summary>
  56. public sealed partial class DispatcherConfig : pb::IMessage<DispatcherConfig>
  57. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  58. , pb::IBufferMessage
  59. #endif
  60. {
  61. private static readonly pb::MessageParser<DispatcherConfig> _parser = new pb::MessageParser<DispatcherConfig>(() => new DispatcherConfig());
  62. private pb::UnknownFieldSet _unknownFields;
  63. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  64. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  65. public static pb::MessageParser<DispatcherConfig> Parser { get { return _parser; } }
  66. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  67. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  68. public static pbr::MessageDescriptor Descriptor {
  69. get { return global::Tensorflow.Data.Experimental.ServiceConfigReflection.Descriptor.MessageTypes[0]; }
  70. }
  71. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  72. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  73. pbr::MessageDescriptor pb::IMessage.Descriptor {
  74. get { return Descriptor; }
  75. }
  76. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  77. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  78. public DispatcherConfig() {
  79. OnConstruction();
  80. }
  81. partial void OnConstruction();
  82. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  83. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  84. public DispatcherConfig(DispatcherConfig other) : this() {
  85. port_ = other.port_;
  86. protocol_ = other.protocol_;
  87. workDir_ = other.workDir_;
  88. faultTolerantMode_ = other.faultTolerantMode_;
  89. workerAddresses_ = other.workerAddresses_.Clone();
  90. deploymentMode_ = other.deploymentMode_;
  91. jobGcCheckIntervalMs_ = other.jobGcCheckIntervalMs_;
  92. jobGcTimeoutMs_ = other.jobGcTimeoutMs_;
  93. clientTimeoutMs_ = other.clientTimeoutMs_;
  94. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  95. }
  96. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  97. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  98. public DispatcherConfig Clone() {
  99. return new DispatcherConfig(this);
  100. }
  101. /// <summary>Field number for the "port" field.</summary>
  102. public const int PortFieldNumber = 1;
  103. private long port_;
  104. /// <summary>
  105. /// The port for the dispatcher to bind to. A value of 0 indicates that the
  106. /// dispatcher may bind to any available port.
  107. /// </summary>
  108. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  109. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  110. public long Port {
  111. get { return port_; }
  112. set {
  113. port_ = value;
  114. }
  115. }
  116. /// <summary>Field number for the "protocol" field.</summary>
  117. public const int ProtocolFieldNumber = 2;
  118. private string protocol_ = "";
  119. /// <summary>
  120. /// The protocol for the dispatcher to use when connecting to workers.
  121. /// </summary>
  122. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  123. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  124. public string Protocol {
  125. get { return protocol_; }
  126. set {
  127. protocol_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  128. }
  129. }
  130. /// <summary>Field number for the "work_dir" field.</summary>
  131. public const int WorkDirFieldNumber = 3;
  132. private string workDir_ = "";
  133. /// <summary>
  134. /// A work directory to use for storing dispatcher state, and for recovering
  135. /// during restarts. The empty string indicates not to use any work directory.
  136. /// </summary>
  137. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  138. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  139. public string WorkDir {
  140. get { return workDir_; }
  141. set {
  142. workDir_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  143. }
  144. }
  145. /// <summary>Field number for the "fault_tolerant_mode" field.</summary>
  146. public const int FaultTolerantModeFieldNumber = 4;
  147. private bool faultTolerantMode_;
  148. /// <summary>
  149. /// Whether to run in fault tolerant mode, where dispatcher state is saved
  150. /// across restarts. Requires that `work_dir` is nonempty.
  151. /// </summary>
  152. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  153. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  154. public bool FaultTolerantMode {
  155. get { return faultTolerantMode_; }
  156. set {
  157. faultTolerantMode_ = value;
  158. }
  159. }
  160. /// <summary>Field number for the "worker_addresses" field.</summary>
  161. public const int WorkerAddressesFieldNumber = 7;
  162. private static readonly pb::FieldCodec<string> _repeated_workerAddresses_codec
  163. = pb::FieldCodec.ForString(58);
  164. private readonly pbc::RepeatedField<string> workerAddresses_ = new pbc::RepeatedField<string>();
  165. /// <summary>
  166. /// (Optional.) If the job uses auto-sharding, it needs to specify a fixed list
  167. /// of worker addresses that will register with the dispatcher. The worker
  168. /// addresses should be in the format "host" or "host:port", where "port" is an
  169. /// integer, named port, or %port% to match any port.
  170. /// </summary>
  171. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  172. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  173. public pbc::RepeatedField<string> WorkerAddresses {
  174. get { return workerAddresses_; }
  175. }
  176. /// <summary>Field number for the "deployment_mode" field.</summary>
  177. public const int DeploymentModeFieldNumber = 9;
  178. private global::Tensorflow.Data.DeploymentMode deploymentMode_ = global::Tensorflow.Data.DeploymentMode.Unspecified;
  179. /// <summary>
  180. /// (Optional.) tf.data service deployment mode. Supported values are "REMOTE",
  181. /// "COLOCATED", and "HYBRID". If unspecified, it is assumed to be "REMOTE".
  182. /// </summary>
  183. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  184. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  185. public global::Tensorflow.Data.DeploymentMode DeploymentMode {
  186. get { return deploymentMode_; }
  187. set {
  188. deploymentMode_ = value;
  189. }
  190. }
  191. /// <summary>Field number for the "job_gc_check_interval_ms" field.</summary>
  192. public const int JobGcCheckIntervalMsFieldNumber = 5;
  193. private long jobGcCheckIntervalMs_;
  194. /// <summary>
  195. /// How often the dispatcher should scan through to delete old and unused
  196. /// jobs. A value of 0 indicates that the decision should be left up to the
  197. /// runtime.
  198. /// </summary>
  199. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  200. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  201. public long JobGcCheckIntervalMs {
  202. get { return jobGcCheckIntervalMs_; }
  203. set {
  204. jobGcCheckIntervalMs_ = value;
  205. }
  206. }
  207. /// <summary>Field number for the "job_gc_timeout_ms" field.</summary>
  208. public const int JobGcTimeoutMsFieldNumber = 6;
  209. private long jobGcTimeoutMs_;
  210. /// <summary>
  211. /// How long a job needs to be unused before it becomes a candidate for garbage
  212. /// collection. A value of -1 indicates that jobs should never be garbage
  213. /// collected. A value of 0 indicates that the decision should be left up to
  214. /// the runtime.
  215. /// </summary>
  216. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  217. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  218. public long JobGcTimeoutMs {
  219. get { return jobGcTimeoutMs_; }
  220. set {
  221. jobGcTimeoutMs_ = value;
  222. }
  223. }
  224. /// <summary>Field number for the "client_timeout_ms" field.</summary>
  225. public const int ClientTimeoutMsFieldNumber = 8;
  226. private long clientTimeoutMs_;
  227. /// <summary>
  228. /// How long to wait before garbage-collecting a client that hasn't
  229. /// heartbeated to the dispatcher. A value of 0 indicates that the timeout
  230. /// should be left to the runtime.
  231. /// </summary>
  232. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  233. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  234. public long ClientTimeoutMs {
  235. get { return clientTimeoutMs_; }
  236. set {
  237. clientTimeoutMs_ = value;
  238. }
  239. }
  240. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  241. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  242. public override bool Equals(object other) {
  243. return Equals(other as DispatcherConfig);
  244. }
  245. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  246. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  247. public bool Equals(DispatcherConfig other) {
  248. if (ReferenceEquals(other, null)) {
  249. return false;
  250. }
  251. if (ReferenceEquals(other, this)) {
  252. return true;
  253. }
  254. if (Port != other.Port) return false;
  255. if (Protocol != other.Protocol) return false;
  256. if (WorkDir != other.WorkDir) return false;
  257. if (FaultTolerantMode != other.FaultTolerantMode) return false;
  258. if(!workerAddresses_.Equals(other.workerAddresses_)) return false;
  259. if (DeploymentMode != other.DeploymentMode) return false;
  260. if (JobGcCheckIntervalMs != other.JobGcCheckIntervalMs) return false;
  261. if (JobGcTimeoutMs != other.JobGcTimeoutMs) return false;
  262. if (ClientTimeoutMs != other.ClientTimeoutMs) return false;
  263. return Equals(_unknownFields, other._unknownFields);
  264. }
  265. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  266. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  267. public override int GetHashCode() {
  268. int hash = 1;
  269. if (Port != 0L) hash ^= Port.GetHashCode();
  270. if (Protocol.Length != 0) hash ^= Protocol.GetHashCode();
  271. if (WorkDir.Length != 0) hash ^= WorkDir.GetHashCode();
  272. if (FaultTolerantMode != false) hash ^= FaultTolerantMode.GetHashCode();
  273. hash ^= workerAddresses_.GetHashCode();
  274. if (DeploymentMode != global::Tensorflow.Data.DeploymentMode.Unspecified) hash ^= DeploymentMode.GetHashCode();
  275. if (JobGcCheckIntervalMs != 0L) hash ^= JobGcCheckIntervalMs.GetHashCode();
  276. if (JobGcTimeoutMs != 0L) hash ^= JobGcTimeoutMs.GetHashCode();
  277. if (ClientTimeoutMs != 0L) hash ^= ClientTimeoutMs.GetHashCode();
  278. if (_unknownFields != null) {
  279. hash ^= _unknownFields.GetHashCode();
  280. }
  281. return hash;
  282. }
  283. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  284. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  285. public override string ToString() {
  286. return pb::JsonFormatter.ToDiagnosticString(this);
  287. }
  288. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  289. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  290. public void WriteTo(pb::CodedOutputStream output) {
  291. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  292. output.WriteRawMessage(this);
  293. #else
  294. if (Port != 0L) {
  295. output.WriteRawTag(8);
  296. output.WriteInt64(Port);
  297. }
  298. if (Protocol.Length != 0) {
  299. output.WriteRawTag(18);
  300. output.WriteString(Protocol);
  301. }
  302. if (WorkDir.Length != 0) {
  303. output.WriteRawTag(26);
  304. output.WriteString(WorkDir);
  305. }
  306. if (FaultTolerantMode != false) {
  307. output.WriteRawTag(32);
  308. output.WriteBool(FaultTolerantMode);
  309. }
  310. if (JobGcCheckIntervalMs != 0L) {
  311. output.WriteRawTag(40);
  312. output.WriteInt64(JobGcCheckIntervalMs);
  313. }
  314. if (JobGcTimeoutMs != 0L) {
  315. output.WriteRawTag(48);
  316. output.WriteInt64(JobGcTimeoutMs);
  317. }
  318. workerAddresses_.WriteTo(output, _repeated_workerAddresses_codec);
  319. if (ClientTimeoutMs != 0L) {
  320. output.WriteRawTag(64);
  321. output.WriteInt64(ClientTimeoutMs);
  322. }
  323. if (DeploymentMode != global::Tensorflow.Data.DeploymentMode.Unspecified) {
  324. output.WriteRawTag(72);
  325. output.WriteEnum((int) DeploymentMode);
  326. }
  327. if (_unknownFields != null) {
  328. _unknownFields.WriteTo(output);
  329. }
  330. #endif
  331. }
  332. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  333. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  334. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  335. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  336. if (Port != 0L) {
  337. output.WriteRawTag(8);
  338. output.WriteInt64(Port);
  339. }
  340. if (Protocol.Length != 0) {
  341. output.WriteRawTag(18);
  342. output.WriteString(Protocol);
  343. }
  344. if (WorkDir.Length != 0) {
  345. output.WriteRawTag(26);
  346. output.WriteString(WorkDir);
  347. }
  348. if (FaultTolerantMode != false) {
  349. output.WriteRawTag(32);
  350. output.WriteBool(FaultTolerantMode);
  351. }
  352. if (JobGcCheckIntervalMs != 0L) {
  353. output.WriteRawTag(40);
  354. output.WriteInt64(JobGcCheckIntervalMs);
  355. }
  356. if (JobGcTimeoutMs != 0L) {
  357. output.WriteRawTag(48);
  358. output.WriteInt64(JobGcTimeoutMs);
  359. }
  360. workerAddresses_.WriteTo(ref output, _repeated_workerAddresses_codec);
  361. if (ClientTimeoutMs != 0L) {
  362. output.WriteRawTag(64);
  363. output.WriteInt64(ClientTimeoutMs);
  364. }
  365. if (DeploymentMode != global::Tensorflow.Data.DeploymentMode.Unspecified) {
  366. output.WriteRawTag(72);
  367. output.WriteEnum((int) DeploymentMode);
  368. }
  369. if (_unknownFields != null) {
  370. _unknownFields.WriteTo(ref output);
  371. }
  372. }
  373. #endif
  374. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  375. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  376. public int CalculateSize() {
  377. int size = 0;
  378. if (Port != 0L) {
  379. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Port);
  380. }
  381. if (Protocol.Length != 0) {
  382. size += 1 + pb::CodedOutputStream.ComputeStringSize(Protocol);
  383. }
  384. if (WorkDir.Length != 0) {
  385. size += 1 + pb::CodedOutputStream.ComputeStringSize(WorkDir);
  386. }
  387. if (FaultTolerantMode != false) {
  388. size += 1 + 1;
  389. }
  390. size += workerAddresses_.CalculateSize(_repeated_workerAddresses_codec);
  391. if (DeploymentMode != global::Tensorflow.Data.DeploymentMode.Unspecified) {
  392. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DeploymentMode);
  393. }
  394. if (JobGcCheckIntervalMs != 0L) {
  395. size += 1 + pb::CodedOutputStream.ComputeInt64Size(JobGcCheckIntervalMs);
  396. }
  397. if (JobGcTimeoutMs != 0L) {
  398. size += 1 + pb::CodedOutputStream.ComputeInt64Size(JobGcTimeoutMs);
  399. }
  400. if (ClientTimeoutMs != 0L) {
  401. size += 1 + pb::CodedOutputStream.ComputeInt64Size(ClientTimeoutMs);
  402. }
  403. if (_unknownFields != null) {
  404. size += _unknownFields.CalculateSize();
  405. }
  406. return size;
  407. }
  408. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  409. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  410. public void MergeFrom(DispatcherConfig other) {
  411. if (other == null) {
  412. return;
  413. }
  414. if (other.Port != 0L) {
  415. Port = other.Port;
  416. }
  417. if (other.Protocol.Length != 0) {
  418. Protocol = other.Protocol;
  419. }
  420. if (other.WorkDir.Length != 0) {
  421. WorkDir = other.WorkDir;
  422. }
  423. if (other.FaultTolerantMode != false) {
  424. FaultTolerantMode = other.FaultTolerantMode;
  425. }
  426. workerAddresses_.Add(other.workerAddresses_);
  427. if (other.DeploymentMode != global::Tensorflow.Data.DeploymentMode.Unspecified) {
  428. DeploymentMode = other.DeploymentMode;
  429. }
  430. if (other.JobGcCheckIntervalMs != 0L) {
  431. JobGcCheckIntervalMs = other.JobGcCheckIntervalMs;
  432. }
  433. if (other.JobGcTimeoutMs != 0L) {
  434. JobGcTimeoutMs = other.JobGcTimeoutMs;
  435. }
  436. if (other.ClientTimeoutMs != 0L) {
  437. ClientTimeoutMs = other.ClientTimeoutMs;
  438. }
  439. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  440. }
  441. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  442. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  443. public void MergeFrom(pb::CodedInputStream input) {
  444. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  445. input.ReadRawMessage(this);
  446. #else
  447. uint tag;
  448. while ((tag = input.ReadTag()) != 0) {
  449. switch(tag) {
  450. default:
  451. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  452. break;
  453. case 8: {
  454. Port = input.ReadInt64();
  455. break;
  456. }
  457. case 18: {
  458. Protocol = input.ReadString();
  459. break;
  460. }
  461. case 26: {
  462. WorkDir = input.ReadString();
  463. break;
  464. }
  465. case 32: {
  466. FaultTolerantMode = input.ReadBool();
  467. break;
  468. }
  469. case 40: {
  470. JobGcCheckIntervalMs = input.ReadInt64();
  471. break;
  472. }
  473. case 48: {
  474. JobGcTimeoutMs = input.ReadInt64();
  475. break;
  476. }
  477. case 58: {
  478. workerAddresses_.AddEntriesFrom(input, _repeated_workerAddresses_codec);
  479. break;
  480. }
  481. case 64: {
  482. ClientTimeoutMs = input.ReadInt64();
  483. break;
  484. }
  485. case 72: {
  486. DeploymentMode = (global::Tensorflow.Data.DeploymentMode) input.ReadEnum();
  487. break;
  488. }
  489. }
  490. }
  491. #endif
  492. }
  493. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  494. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  495. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  496. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  497. uint tag;
  498. while ((tag = input.ReadTag()) != 0) {
  499. switch(tag) {
  500. default:
  501. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  502. break;
  503. case 8: {
  504. Port = input.ReadInt64();
  505. break;
  506. }
  507. case 18: {
  508. Protocol = input.ReadString();
  509. break;
  510. }
  511. case 26: {
  512. WorkDir = input.ReadString();
  513. break;
  514. }
  515. case 32: {
  516. FaultTolerantMode = input.ReadBool();
  517. break;
  518. }
  519. case 40: {
  520. JobGcCheckIntervalMs = input.ReadInt64();
  521. break;
  522. }
  523. case 48: {
  524. JobGcTimeoutMs = input.ReadInt64();
  525. break;
  526. }
  527. case 58: {
  528. workerAddresses_.AddEntriesFrom(ref input, _repeated_workerAddresses_codec);
  529. break;
  530. }
  531. case 64: {
  532. ClientTimeoutMs = input.ReadInt64();
  533. break;
  534. }
  535. case 72: {
  536. DeploymentMode = (global::Tensorflow.Data.DeploymentMode) input.ReadEnum();
  537. break;
  538. }
  539. }
  540. }
  541. }
  542. #endif
  543. }
  544. /// <summary>
  545. /// Configuration for a tf.data service WorkerServer.
  546. /// Next id: 12
  547. /// </summary>
  548. public sealed partial class WorkerConfig : pb::IMessage<WorkerConfig>
  549. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  550. , pb::IBufferMessage
  551. #endif
  552. {
  553. private static readonly pb::MessageParser<WorkerConfig> _parser = new pb::MessageParser<WorkerConfig>(() => new WorkerConfig());
  554. private pb::UnknownFieldSet _unknownFields;
  555. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  556. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  557. public static pb::MessageParser<WorkerConfig> Parser { get { return _parser; } }
  558. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  559. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  560. public static pbr::MessageDescriptor Descriptor {
  561. get { return global::Tensorflow.Data.Experimental.ServiceConfigReflection.Descriptor.MessageTypes[1]; }
  562. }
  563. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  564. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  565. pbr::MessageDescriptor pb::IMessage.Descriptor {
  566. get { return Descriptor; }
  567. }
  568. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  569. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  570. public WorkerConfig() {
  571. OnConstruction();
  572. }
  573. partial void OnConstruction();
  574. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  575. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  576. public WorkerConfig(WorkerConfig other) : this() {
  577. port_ = other.port_;
  578. protocol_ = other.protocol_;
  579. dispatcherAddress_ = other.dispatcherAddress_;
  580. workerAddress_ = other.workerAddress_;
  581. workerTags_ = other.workerTags_.Clone();
  582. heartbeatIntervalMs_ = other.heartbeatIntervalMs_;
  583. dispatcherTimeoutMs_ = other.dispatcherTimeoutMs_;
  584. dataTransferProtocol_ = other.dataTransferProtocol_;
  585. dataTransferAddress_ = other.dataTransferAddress_;
  586. crossTrainerCacheSizeBytes_ = other.crossTrainerCacheSizeBytes_;
  587. shutdownQuietPeriodMs_ = other.shutdownQuietPeriodMs_;
  588. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  589. }
  590. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  591. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  592. public WorkerConfig Clone() {
  593. return new WorkerConfig(this);
  594. }
  595. /// <summary>Field number for the "port" field.</summary>
  596. public const int PortFieldNumber = 1;
  597. private long port_;
  598. /// <summary>
  599. /// The port for the worker to bind to. A value of 0 indicates that the
  600. /// worker may bind to any available port.
  601. /// </summary>
  602. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  603. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  604. public long Port {
  605. get { return port_; }
  606. set {
  607. port_ = value;
  608. }
  609. }
  610. /// <summary>Field number for the "protocol" field.</summary>
  611. public const int ProtocolFieldNumber = 2;
  612. private string protocol_ = "";
  613. /// <summary>
  614. /// The protocol for the worker to use when connecting to the dispatcher.
  615. /// </summary>
  616. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  617. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  618. public string Protocol {
  619. get { return protocol_; }
  620. set {
  621. protocol_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  622. }
  623. }
  624. /// <summary>Field number for the "dispatcher_address" field.</summary>
  625. public const int DispatcherAddressFieldNumber = 3;
  626. private string dispatcherAddress_ = "";
  627. /// <summary>
  628. /// The address of the dispatcher to register with.
  629. /// </summary>
  630. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  631. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  632. public string DispatcherAddress {
  633. get { return dispatcherAddress_; }
  634. set {
  635. dispatcherAddress_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  636. }
  637. }
  638. /// <summary>Field number for the "worker_address" field.</summary>
  639. public const int WorkerAddressFieldNumber = 4;
  640. private string workerAddress_ = "";
  641. /// <summary>
  642. /// The address of the worker server. The substring "%port%", if specified,
  643. /// will be replaced with the worker's bound port. This is useful when the port
  644. /// is set to `0`.
  645. /// </summary>
  646. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  647. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  648. public string WorkerAddress {
  649. get { return workerAddress_; }
  650. set {
  651. workerAddress_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  652. }
  653. }
  654. /// <summary>Field number for the "worker_tags" field.</summary>
  655. public const int WorkerTagsFieldNumber = 10;
  656. private static readonly pb::FieldCodec<string> _repeated_workerTags_codec
  657. = pb::FieldCodec.ForString(82);
  658. private readonly pbc::RepeatedField<string> workerTags_ = new pbc::RepeatedField<string>();
  659. /// <summary>
  660. /// Tags attached to the worker. This allows reading from selected workers.
  661. /// For example, by applying a "COLOCATED" tag, tf.data service is able to read
  662. /// from the local tf.data worker if one exists, then from off-TF-host workers,
  663. /// to avoid cross-TF-host reads.
  664. /// </summary>
  665. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  666. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  667. public pbc::RepeatedField<string> WorkerTags {
  668. get { return workerTags_; }
  669. }
  670. /// <summary>Field number for the "heartbeat_interval_ms" field.</summary>
  671. public const int HeartbeatIntervalMsFieldNumber = 5;
  672. private long heartbeatIntervalMs_;
  673. /// <summary>
  674. /// How often the worker should heartbeat to the master. A value of 0 indicates
  675. /// that the decision should be left up to the runtime.
  676. /// </summary>
  677. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  678. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  679. public long HeartbeatIntervalMs {
  680. get { return heartbeatIntervalMs_; }
  681. set {
  682. heartbeatIntervalMs_ = value;
  683. }
  684. }
  685. /// <summary>Field number for the "dispatcher_timeout_ms" field.</summary>
  686. public const int DispatcherTimeoutMsFieldNumber = 6;
  687. private long dispatcherTimeoutMs_;
  688. /// <summary>
  689. /// How long to retry requests to the dispatcher before giving up and reporting
  690. /// an error. A value of 0 indicates that the decision should be left up to the
  691. /// runtime.
  692. /// </summary>
  693. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  694. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  695. public long DispatcherTimeoutMs {
  696. get { return dispatcherTimeoutMs_; }
  697. set {
  698. dispatcherTimeoutMs_ = value;
  699. }
  700. }
  701. /// <summary>Field number for the "data_transfer_protocol" field.</summary>
  702. public const int DataTransferProtocolFieldNumber = 7;
  703. private string dataTransferProtocol_ = "";
  704. /// <summary>
  705. /// The protocol for the worker to use when transferring data to clients.
  706. /// </summary>
  707. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  708. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  709. public string DataTransferProtocol {
  710. get { return dataTransferProtocol_; }
  711. set {
  712. dataTransferProtocol_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  713. }
  714. }
  715. /// <summary>Field number for the "data_transfer_address" field.</summary>
  716. public const int DataTransferAddressFieldNumber = 8;
  717. private string dataTransferAddress_ = "";
  718. /// <summary>
  719. /// The data transfer address of the worker server. The substring "%port%", if
  720. /// specified, will be replaced with the worker's bound port. This is useful
  721. /// when the port is set to `0`.
  722. /// </summary>
  723. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  724. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  725. public string DataTransferAddress {
  726. get { return dataTransferAddress_; }
  727. set {
  728. dataTransferAddress_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  729. }
  730. }
  731. /// <summary>Field number for the "cross_trainer_cache_size_bytes" field.</summary>
  732. public const int CrossTrainerCacheSizeBytesFieldNumber = 11;
  733. private long crossTrainerCacheSizeBytes_;
  734. /// <summary>
  735. /// Maximum size of the cross-trainer cache in bytes. If enabled, make sure
  736. /// your training job provides sufficient memory resources.
  737. /// </summary>
  738. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  739. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  740. public long CrossTrainerCacheSizeBytes {
  741. get { return crossTrainerCacheSizeBytes_; }
  742. set {
  743. crossTrainerCacheSizeBytes_ = value;
  744. }
  745. }
  746. /// <summary>Field number for the "shutdown_quiet_period_ms" field.</summary>
  747. public const int ShutdownQuietPeriodMsFieldNumber = 9;
  748. private long shutdownQuietPeriodMs_;
  749. /// <summary>
  750. /// When shutting down a worker, how long to wait for the gRPC server to
  751. /// process the final requests. This is used to achieve clean shutdown in unit
  752. /// tests.
  753. /// </summary>
  754. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  755. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  756. public long ShutdownQuietPeriodMs {
  757. get { return shutdownQuietPeriodMs_; }
  758. set {
  759. shutdownQuietPeriodMs_ = value;
  760. }
  761. }
  762. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  763. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  764. public override bool Equals(object other) {
  765. return Equals(other as WorkerConfig);
  766. }
  767. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  768. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  769. public bool Equals(WorkerConfig other) {
  770. if (ReferenceEquals(other, null)) {
  771. return false;
  772. }
  773. if (ReferenceEquals(other, this)) {
  774. return true;
  775. }
  776. if (Port != other.Port) return false;
  777. if (Protocol != other.Protocol) return false;
  778. if (DispatcherAddress != other.DispatcherAddress) return false;
  779. if (WorkerAddress != other.WorkerAddress) return false;
  780. if(!workerTags_.Equals(other.workerTags_)) return false;
  781. if (HeartbeatIntervalMs != other.HeartbeatIntervalMs) return false;
  782. if (DispatcherTimeoutMs != other.DispatcherTimeoutMs) return false;
  783. if (DataTransferProtocol != other.DataTransferProtocol) return false;
  784. if (DataTransferAddress != other.DataTransferAddress) return false;
  785. if (CrossTrainerCacheSizeBytes != other.CrossTrainerCacheSizeBytes) return false;
  786. if (ShutdownQuietPeriodMs != other.ShutdownQuietPeriodMs) return false;
  787. return Equals(_unknownFields, other._unknownFields);
  788. }
  789. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  790. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  791. public override int GetHashCode() {
  792. int hash = 1;
  793. if (Port != 0L) hash ^= Port.GetHashCode();
  794. if (Protocol.Length != 0) hash ^= Protocol.GetHashCode();
  795. if (DispatcherAddress.Length != 0) hash ^= DispatcherAddress.GetHashCode();
  796. if (WorkerAddress.Length != 0) hash ^= WorkerAddress.GetHashCode();
  797. hash ^= workerTags_.GetHashCode();
  798. if (HeartbeatIntervalMs != 0L) hash ^= HeartbeatIntervalMs.GetHashCode();
  799. if (DispatcherTimeoutMs != 0L) hash ^= DispatcherTimeoutMs.GetHashCode();
  800. if (DataTransferProtocol.Length != 0) hash ^= DataTransferProtocol.GetHashCode();
  801. if (DataTransferAddress.Length != 0) hash ^= DataTransferAddress.GetHashCode();
  802. if (CrossTrainerCacheSizeBytes != 0L) hash ^= CrossTrainerCacheSizeBytes.GetHashCode();
  803. if (ShutdownQuietPeriodMs != 0L) hash ^= ShutdownQuietPeriodMs.GetHashCode();
  804. if (_unknownFields != null) {
  805. hash ^= _unknownFields.GetHashCode();
  806. }
  807. return hash;
  808. }
  809. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  810. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  811. public override string ToString() {
  812. return pb::JsonFormatter.ToDiagnosticString(this);
  813. }
  814. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  815. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  816. public void WriteTo(pb::CodedOutputStream output) {
  817. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  818. output.WriteRawMessage(this);
  819. #else
  820. if (Port != 0L) {
  821. output.WriteRawTag(8);
  822. output.WriteInt64(Port);
  823. }
  824. if (Protocol.Length != 0) {
  825. output.WriteRawTag(18);
  826. output.WriteString(Protocol);
  827. }
  828. if (DispatcherAddress.Length != 0) {
  829. output.WriteRawTag(26);
  830. output.WriteString(DispatcherAddress);
  831. }
  832. if (WorkerAddress.Length != 0) {
  833. output.WriteRawTag(34);
  834. output.WriteString(WorkerAddress);
  835. }
  836. if (HeartbeatIntervalMs != 0L) {
  837. output.WriteRawTag(40);
  838. output.WriteInt64(HeartbeatIntervalMs);
  839. }
  840. if (DispatcherTimeoutMs != 0L) {
  841. output.WriteRawTag(48);
  842. output.WriteInt64(DispatcherTimeoutMs);
  843. }
  844. if (DataTransferProtocol.Length != 0) {
  845. output.WriteRawTag(58);
  846. output.WriteString(DataTransferProtocol);
  847. }
  848. if (DataTransferAddress.Length != 0) {
  849. output.WriteRawTag(66);
  850. output.WriteString(DataTransferAddress);
  851. }
  852. if (ShutdownQuietPeriodMs != 0L) {
  853. output.WriteRawTag(72);
  854. output.WriteInt64(ShutdownQuietPeriodMs);
  855. }
  856. workerTags_.WriteTo(output, _repeated_workerTags_codec);
  857. if (CrossTrainerCacheSizeBytes != 0L) {
  858. output.WriteRawTag(88);
  859. output.WriteInt64(CrossTrainerCacheSizeBytes);
  860. }
  861. if (_unknownFields != null) {
  862. _unknownFields.WriteTo(output);
  863. }
  864. #endif
  865. }
  866. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  867. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  868. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  869. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  870. if (Port != 0L) {
  871. output.WriteRawTag(8);
  872. output.WriteInt64(Port);
  873. }
  874. if (Protocol.Length != 0) {
  875. output.WriteRawTag(18);
  876. output.WriteString(Protocol);
  877. }
  878. if (DispatcherAddress.Length != 0) {
  879. output.WriteRawTag(26);
  880. output.WriteString(DispatcherAddress);
  881. }
  882. if (WorkerAddress.Length != 0) {
  883. output.WriteRawTag(34);
  884. output.WriteString(WorkerAddress);
  885. }
  886. if (HeartbeatIntervalMs != 0L) {
  887. output.WriteRawTag(40);
  888. output.WriteInt64(HeartbeatIntervalMs);
  889. }
  890. if (DispatcherTimeoutMs != 0L) {
  891. output.WriteRawTag(48);
  892. output.WriteInt64(DispatcherTimeoutMs);
  893. }
  894. if (DataTransferProtocol.Length != 0) {
  895. output.WriteRawTag(58);
  896. output.WriteString(DataTransferProtocol);
  897. }
  898. if (DataTransferAddress.Length != 0) {
  899. output.WriteRawTag(66);
  900. output.WriteString(DataTransferAddress);
  901. }
  902. if (ShutdownQuietPeriodMs != 0L) {
  903. output.WriteRawTag(72);
  904. output.WriteInt64(ShutdownQuietPeriodMs);
  905. }
  906. workerTags_.WriteTo(ref output, _repeated_workerTags_codec);
  907. if (CrossTrainerCacheSizeBytes != 0L) {
  908. output.WriteRawTag(88);
  909. output.WriteInt64(CrossTrainerCacheSizeBytes);
  910. }
  911. if (_unknownFields != null) {
  912. _unknownFields.WriteTo(ref output);
  913. }
  914. }
  915. #endif
  916. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  917. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  918. public int CalculateSize() {
  919. int size = 0;
  920. if (Port != 0L) {
  921. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Port);
  922. }
  923. if (Protocol.Length != 0) {
  924. size += 1 + pb::CodedOutputStream.ComputeStringSize(Protocol);
  925. }
  926. if (DispatcherAddress.Length != 0) {
  927. size += 1 + pb::CodedOutputStream.ComputeStringSize(DispatcherAddress);
  928. }
  929. if (WorkerAddress.Length != 0) {
  930. size += 1 + pb::CodedOutputStream.ComputeStringSize(WorkerAddress);
  931. }
  932. size += workerTags_.CalculateSize(_repeated_workerTags_codec);
  933. if (HeartbeatIntervalMs != 0L) {
  934. size += 1 + pb::CodedOutputStream.ComputeInt64Size(HeartbeatIntervalMs);
  935. }
  936. if (DispatcherTimeoutMs != 0L) {
  937. size += 1 + pb::CodedOutputStream.ComputeInt64Size(DispatcherTimeoutMs);
  938. }
  939. if (DataTransferProtocol.Length != 0) {
  940. size += 1 + pb::CodedOutputStream.ComputeStringSize(DataTransferProtocol);
  941. }
  942. if (DataTransferAddress.Length != 0) {
  943. size += 1 + pb::CodedOutputStream.ComputeStringSize(DataTransferAddress);
  944. }
  945. if (CrossTrainerCacheSizeBytes != 0L) {
  946. size += 1 + pb::CodedOutputStream.ComputeInt64Size(CrossTrainerCacheSizeBytes);
  947. }
  948. if (ShutdownQuietPeriodMs != 0L) {
  949. size += 1 + pb::CodedOutputStream.ComputeInt64Size(ShutdownQuietPeriodMs);
  950. }
  951. if (_unknownFields != null) {
  952. size += _unknownFields.CalculateSize();
  953. }
  954. return size;
  955. }
  956. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  957. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  958. public void MergeFrom(WorkerConfig other) {
  959. if (other == null) {
  960. return;
  961. }
  962. if (other.Port != 0L) {
  963. Port = other.Port;
  964. }
  965. if (other.Protocol.Length != 0) {
  966. Protocol = other.Protocol;
  967. }
  968. if (other.DispatcherAddress.Length != 0) {
  969. DispatcherAddress = other.DispatcherAddress;
  970. }
  971. if (other.WorkerAddress.Length != 0) {
  972. WorkerAddress = other.WorkerAddress;
  973. }
  974. workerTags_.Add(other.workerTags_);
  975. if (other.HeartbeatIntervalMs != 0L) {
  976. HeartbeatIntervalMs = other.HeartbeatIntervalMs;
  977. }
  978. if (other.DispatcherTimeoutMs != 0L) {
  979. DispatcherTimeoutMs = other.DispatcherTimeoutMs;
  980. }
  981. if (other.DataTransferProtocol.Length != 0) {
  982. DataTransferProtocol = other.DataTransferProtocol;
  983. }
  984. if (other.DataTransferAddress.Length != 0) {
  985. DataTransferAddress = other.DataTransferAddress;
  986. }
  987. if (other.CrossTrainerCacheSizeBytes != 0L) {
  988. CrossTrainerCacheSizeBytes = other.CrossTrainerCacheSizeBytes;
  989. }
  990. if (other.ShutdownQuietPeriodMs != 0L) {
  991. ShutdownQuietPeriodMs = other.ShutdownQuietPeriodMs;
  992. }
  993. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  994. }
  995. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  996. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  997. public void MergeFrom(pb::CodedInputStream input) {
  998. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  999. input.ReadRawMessage(this);
  1000. #else
  1001. uint tag;
  1002. while ((tag = input.ReadTag()) != 0) {
  1003. switch(tag) {
  1004. default:
  1005. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1006. break;
  1007. case 8: {
  1008. Port = input.ReadInt64();
  1009. break;
  1010. }
  1011. case 18: {
  1012. Protocol = input.ReadString();
  1013. break;
  1014. }
  1015. case 26: {
  1016. DispatcherAddress = input.ReadString();
  1017. break;
  1018. }
  1019. case 34: {
  1020. WorkerAddress = input.ReadString();
  1021. break;
  1022. }
  1023. case 40: {
  1024. HeartbeatIntervalMs = input.ReadInt64();
  1025. break;
  1026. }
  1027. case 48: {
  1028. DispatcherTimeoutMs = input.ReadInt64();
  1029. break;
  1030. }
  1031. case 58: {
  1032. DataTransferProtocol = input.ReadString();
  1033. break;
  1034. }
  1035. case 66: {
  1036. DataTransferAddress = input.ReadString();
  1037. break;
  1038. }
  1039. case 72: {
  1040. ShutdownQuietPeriodMs = input.ReadInt64();
  1041. break;
  1042. }
  1043. case 82: {
  1044. workerTags_.AddEntriesFrom(input, _repeated_workerTags_codec);
  1045. break;
  1046. }
  1047. case 88: {
  1048. CrossTrainerCacheSizeBytes = input.ReadInt64();
  1049. break;
  1050. }
  1051. }
  1052. }
  1053. #endif
  1054. }
  1055. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1056. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1057. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1058. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  1059. uint tag;
  1060. while ((tag = input.ReadTag()) != 0) {
  1061. switch(tag) {
  1062. default:
  1063. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  1064. break;
  1065. case 8: {
  1066. Port = input.ReadInt64();
  1067. break;
  1068. }
  1069. case 18: {
  1070. Protocol = input.ReadString();
  1071. break;
  1072. }
  1073. case 26: {
  1074. DispatcherAddress = input.ReadString();
  1075. break;
  1076. }
  1077. case 34: {
  1078. WorkerAddress = input.ReadString();
  1079. break;
  1080. }
  1081. case 40: {
  1082. HeartbeatIntervalMs = input.ReadInt64();
  1083. break;
  1084. }
  1085. case 48: {
  1086. DispatcherTimeoutMs = input.ReadInt64();
  1087. break;
  1088. }
  1089. case 58: {
  1090. DataTransferProtocol = input.ReadString();
  1091. break;
  1092. }
  1093. case 66: {
  1094. DataTransferAddress = input.ReadString();
  1095. break;
  1096. }
  1097. case 72: {
  1098. ShutdownQuietPeriodMs = input.ReadInt64();
  1099. break;
  1100. }
  1101. case 82: {
  1102. workerTags_.AddEntriesFrom(ref input, _repeated_workerTags_codec);
  1103. break;
  1104. }
  1105. case 88: {
  1106. CrossTrainerCacheSizeBytes = input.ReadInt64();
  1107. break;
  1108. }
  1109. }
  1110. }
  1111. }
  1112. #endif
  1113. }
  1114. #endregion
  1115. }
  1116. #endregion Designer generated code