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.

ApiDef.cs 52 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: tensorflow/core/framework/api_def.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/framework/api_def.proto</summary>
  13. public static partial class ApiDefReflection {
  14. #region Descriptor
  15. /// <summary>File descriptor for tensorflow/core/framework/api_def.proto</summary>
  16. public static pbr::FileDescriptor Descriptor {
  17. get { return descriptor; }
  18. }
  19. private static pbr::FileDescriptor descriptor;
  20. static ApiDefReflection() {
  21. byte[] descriptorData = global::System.Convert.FromBase64String(
  22. string.Concat(
  23. "Cid0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL2FwaV9kZWYucHJvdG8SCnRl",
  24. "bnNvcmZsb3caKnRlbnNvcmZsb3cvY29yZS9mcmFtZXdvcmsvYXR0cl92YWx1",
  25. "ZS5wcm90byLhBQoGQXBpRGVmEhUKDWdyYXBoX29wX25hbWUYASABKAkSGwoT",
  26. "ZGVwcmVjYXRpb25fbWVzc2FnZRgMIAEoCRIbChNkZXByZWNhdGlvbl92ZXJz",
  27. "aW9uGA0gASgFEjEKCnZpc2liaWxpdHkYAiABKA4yHS50ZW5zb3JmbG93LkFw",
  28. "aURlZi5WaXNpYmlsaXR5Ei0KCGVuZHBvaW50GAMgAygLMhsudGVuc29yZmxv",
  29. "dy5BcGlEZWYuRW5kcG9pbnQSJgoGaW5fYXJnGAQgAygLMhYudGVuc29yZmxv",
  30. "dy5BcGlEZWYuQXJnEicKB291dF9hcmcYBSADKAsyFi50ZW5zb3JmbG93LkFw",
  31. "aURlZi5BcmcSEQoJYXJnX29yZGVyGAsgAygJEiUKBGF0dHIYBiADKAsyFy50",
  32. "ZW5zb3JmbG93LkFwaURlZi5BdHRyEg8KB3N1bW1hcnkYByABKAkSEwoLZGVz",
  33. "Y3JpcHRpb24YCCABKAkSGgoSZGVzY3JpcHRpb25fcHJlZml4GAkgASgJEhoK",
  34. "EmRlc2NyaXB0aW9uX3N1ZmZpeBgKIAEoCRpJCghFbmRwb2ludBIMCgRuYW1l",
  35. "GAEgASgJEhIKCmRlcHJlY2F0ZWQYAyABKAgSGwoTZGVwcmVjYXRpb25fdmVy",
  36. "c2lvbhgEIAEoBRo7CgNBcmcSDAoEbmFtZRgBIAEoCRIRCglyZW5hbWVfdG8Y",
  37. "AiABKAkSEwoLZGVzY3JpcHRpb24YAyABKAkaagoEQXR0chIMCgRuYW1lGAEg",
  38. "ASgJEhEKCXJlbmFtZV90bxgCIAEoCRIsCg1kZWZhdWx0X3ZhbHVlGAMgASgL",
  39. "MhUudGVuc29yZmxvdy5BdHRyVmFsdWUSEwoLZGVzY3JpcHRpb24YBCABKAki",
  40. "RwoKVmlzaWJpbGl0eRIWChJERUZBVUxUX1ZJU0lCSUxJVFkQABILCgdWSVNJ",
  41. "QkxFEAESCAoEU0tJUBACEgoKBkhJRERFThADIikKB0FwaURlZnMSHgoCb3AY",
  42. "ASADKAsyEi50ZW5zb3JmbG93LkFwaURlZkJ9ChhvcmcudGVuc29yZmxvdy5m",
  43. "cmFtZXdvcmtCDEFwaURlZlByb3Rvc1ABWk5naXRodWIuY29tL3RlbnNvcmZs",
  44. "b3cvdGVuc29yZmxvdy90ZW5zb3JmbG93L2dvL2NvcmUvZnJhbWV3b3JrL2Fw",
  45. "aV9kZWZfZ29fcHJvdG/4AQFiBnByb3RvMw=="));
  46. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  47. new pbr::FileDescriptor[] { global::Tensorflow.AttrValueReflection.Descriptor, },
  48. new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
  49. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ApiDef), global::Tensorflow.ApiDef.Parser, new[]{ "GraphOpName", "DeprecationMessage", "DeprecationVersion", "Visibility", "Endpoint", "InArg", "OutArg", "ArgOrder", "Attr", "Summary", "Description", "DescriptionPrefix", "DescriptionSuffix" }, null, new[]{ typeof(global::Tensorflow.ApiDef.Types.Visibility) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ApiDef.Types.Endpoint), global::Tensorflow.ApiDef.Types.Endpoint.Parser, new[]{ "Name", "Deprecated", "DeprecationVersion" }, null, null, null, null),
  50. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ApiDef.Types.Arg), global::Tensorflow.ApiDef.Types.Arg.Parser, new[]{ "Name", "RenameTo", "Description" }, null, null, null, null),
  51. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ApiDef.Types.Attr), global::Tensorflow.ApiDef.Types.Attr.Parser, new[]{ "Name", "RenameTo", "DefaultValue", "Description" }, null, null, null, null)}),
  52. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ApiDefs), global::Tensorflow.ApiDefs.Parser, new[]{ "Op" }, null, null, null, null)
  53. }));
  54. }
  55. #endregion
  56. }
  57. #region Messages
  58. /// <summary>
  59. /// Used to specify and override the default API &amp; behavior in the
  60. /// generated code for client languages, from what you would get from
  61. /// the OpDef alone. There will be a set of ApiDefs that are common
  62. /// to all client languages, and another set per client language.
  63. /// The per-client-language ApiDefs will inherit values from the
  64. /// common ApiDefs which it can either replace or modify.
  65. ///
  66. /// We separate the API definition from the OpDef so we can evolve the
  67. /// API while remaining backwards compatible when interpretting old
  68. /// graphs. Overrides go in an "api_def.pbtxt" file with a text-format
  69. /// ApiDefs message.
  70. ///
  71. /// WARNING: Be *very* careful changing the API for any existing op --
  72. /// you can change the semantics of existing code. These changes may
  73. /// need to wait until a major release of TensorFlow to avoid breaking
  74. /// our compatibility promises.
  75. /// </summary>
  76. public sealed partial class ApiDef : pb::IMessage<ApiDef> {
  77. private static readonly pb::MessageParser<ApiDef> _parser = new pb::MessageParser<ApiDef>(() => new ApiDef());
  78. private pb::UnknownFieldSet _unknownFields;
  79. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  80. public static pb::MessageParser<ApiDef> Parser { get { return _parser; } }
  81. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  82. public static pbr::MessageDescriptor Descriptor {
  83. get { return global::Tensorflow.ApiDefReflection.Descriptor.MessageTypes[0]; }
  84. }
  85. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  86. pbr::MessageDescriptor pb::IMessage.Descriptor {
  87. get { return Descriptor; }
  88. }
  89. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  90. public ApiDef() {
  91. OnConstruction();
  92. }
  93. partial void OnConstruction();
  94. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  95. public ApiDef(ApiDef other) : this() {
  96. graphOpName_ = other.graphOpName_;
  97. deprecationMessage_ = other.deprecationMessage_;
  98. deprecationVersion_ = other.deprecationVersion_;
  99. visibility_ = other.visibility_;
  100. endpoint_ = other.endpoint_.Clone();
  101. inArg_ = other.inArg_.Clone();
  102. outArg_ = other.outArg_.Clone();
  103. argOrder_ = other.argOrder_.Clone();
  104. attr_ = other.attr_.Clone();
  105. summary_ = other.summary_;
  106. description_ = other.description_;
  107. descriptionPrefix_ = other.descriptionPrefix_;
  108. descriptionSuffix_ = other.descriptionSuffix_;
  109. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  110. }
  111. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  112. public ApiDef Clone() {
  113. return new ApiDef(this);
  114. }
  115. /// <summary>Field number for the "graph_op_name" field.</summary>
  116. public const int GraphOpNameFieldNumber = 1;
  117. private string graphOpName_ = "";
  118. /// <summary>
  119. /// Name of the op (in the OpDef) to specify the API for.
  120. /// </summary>
  121. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  122. public string GraphOpName {
  123. get { return graphOpName_; }
  124. set {
  125. graphOpName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  126. }
  127. }
  128. /// <summary>Field number for the "deprecation_message" field.</summary>
  129. public const int DeprecationMessageFieldNumber = 12;
  130. private string deprecationMessage_ = "";
  131. /// <summary>
  132. /// If this op is deprecated, set deprecation message to the message
  133. /// that should be logged when this op is used.
  134. /// The message should indicate alternative op to use, if any.
  135. /// </summary>
  136. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  137. public string DeprecationMessage {
  138. get { return deprecationMessage_; }
  139. set {
  140. deprecationMessage_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  141. }
  142. }
  143. /// <summary>Field number for the "deprecation_version" field.</summary>
  144. public const int DeprecationVersionFieldNumber = 13;
  145. private int deprecationVersion_;
  146. /// <summary>
  147. /// Major version when the op will be deleted. For e.g. set this
  148. /// value to 2 if op API should be removed in TensorFlow 2.0 and
  149. /// deprecated in versions before that.
  150. /// </summary>
  151. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  152. public int DeprecationVersion {
  153. get { return deprecationVersion_; }
  154. set {
  155. deprecationVersion_ = value;
  156. }
  157. }
  158. /// <summary>Field number for the "visibility" field.</summary>
  159. public const int VisibilityFieldNumber = 2;
  160. private global::Tensorflow.ApiDef.Types.Visibility visibility_ = global::Tensorflow.ApiDef.Types.Visibility.DefaultVisibility;
  161. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  162. public global::Tensorflow.ApiDef.Types.Visibility Visibility {
  163. get { return visibility_; }
  164. set {
  165. visibility_ = value;
  166. }
  167. }
  168. /// <summary>Field number for the "endpoint" field.</summary>
  169. public const int EndpointFieldNumber = 3;
  170. private static readonly pb::FieldCodec<global::Tensorflow.ApiDef.Types.Endpoint> _repeated_endpoint_codec
  171. = pb::FieldCodec.ForMessage(26, global::Tensorflow.ApiDef.Types.Endpoint.Parser);
  172. private readonly pbc::RepeatedField<global::Tensorflow.ApiDef.Types.Endpoint> endpoint_ = new pbc::RepeatedField<global::Tensorflow.ApiDef.Types.Endpoint>();
  173. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  174. public pbc::RepeatedField<global::Tensorflow.ApiDef.Types.Endpoint> Endpoint {
  175. get { return endpoint_; }
  176. }
  177. /// <summary>Field number for the "in_arg" field.</summary>
  178. public const int InArgFieldNumber = 4;
  179. private static readonly pb::FieldCodec<global::Tensorflow.ApiDef.Types.Arg> _repeated_inArg_codec
  180. = pb::FieldCodec.ForMessage(34, global::Tensorflow.ApiDef.Types.Arg.Parser);
  181. private readonly pbc::RepeatedField<global::Tensorflow.ApiDef.Types.Arg> inArg_ = new pbc::RepeatedField<global::Tensorflow.ApiDef.Types.Arg>();
  182. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  183. public pbc::RepeatedField<global::Tensorflow.ApiDef.Types.Arg> InArg {
  184. get { return inArg_; }
  185. }
  186. /// <summary>Field number for the "out_arg" field.</summary>
  187. public const int OutArgFieldNumber = 5;
  188. private static readonly pb::FieldCodec<global::Tensorflow.ApiDef.Types.Arg> _repeated_outArg_codec
  189. = pb::FieldCodec.ForMessage(42, global::Tensorflow.ApiDef.Types.Arg.Parser);
  190. private readonly pbc::RepeatedField<global::Tensorflow.ApiDef.Types.Arg> outArg_ = new pbc::RepeatedField<global::Tensorflow.ApiDef.Types.Arg>();
  191. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  192. public pbc::RepeatedField<global::Tensorflow.ApiDef.Types.Arg> OutArg {
  193. get { return outArg_; }
  194. }
  195. /// <summary>Field number for the "arg_order" field.</summary>
  196. public const int ArgOrderFieldNumber = 11;
  197. private static readonly pb::FieldCodec<string> _repeated_argOrder_codec
  198. = pb::FieldCodec.ForString(90);
  199. private readonly pbc::RepeatedField<string> argOrder_ = new pbc::RepeatedField<string>();
  200. /// <summary>
  201. /// List of original in_arg names to specify new argument order.
  202. /// Length of arg_order should be either empty to keep current order
  203. /// or match size of in_arg.
  204. /// </summary>
  205. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  206. public pbc::RepeatedField<string> ArgOrder {
  207. get { return argOrder_; }
  208. }
  209. /// <summary>Field number for the "attr" field.</summary>
  210. public const int AttrFieldNumber = 6;
  211. private static readonly pb::FieldCodec<global::Tensorflow.ApiDef.Types.Attr> _repeated_attr_codec
  212. = pb::FieldCodec.ForMessage(50, global::Tensorflow.ApiDef.Types.Attr.Parser);
  213. private readonly pbc::RepeatedField<global::Tensorflow.ApiDef.Types.Attr> attr_ = new pbc::RepeatedField<global::Tensorflow.ApiDef.Types.Attr>();
  214. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  215. public pbc::RepeatedField<global::Tensorflow.ApiDef.Types.Attr> Attr {
  216. get { return attr_; }
  217. }
  218. /// <summary>Field number for the "summary" field.</summary>
  219. public const int SummaryFieldNumber = 7;
  220. private string summary_ = "";
  221. /// <summary>
  222. /// One-line human-readable description of what the Op does.
  223. /// </summary>
  224. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  225. public string Summary {
  226. get { return summary_; }
  227. set {
  228. summary_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  229. }
  230. }
  231. /// <summary>Field number for the "description" field.</summary>
  232. public const int DescriptionFieldNumber = 8;
  233. private string description_ = "";
  234. /// <summary>
  235. /// Additional, longer human-readable description of what the Op does.
  236. /// </summary>
  237. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  238. public string Description {
  239. get { return description_; }
  240. set {
  241. description_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  242. }
  243. }
  244. /// <summary>Field number for the "description_prefix" field.</summary>
  245. public const int DescriptionPrefixFieldNumber = 9;
  246. private string descriptionPrefix_ = "";
  247. /// <summary>
  248. /// Modify an existing/inherited description by adding text to the beginning
  249. /// or end.
  250. /// </summary>
  251. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  252. public string DescriptionPrefix {
  253. get { return descriptionPrefix_; }
  254. set {
  255. descriptionPrefix_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  256. }
  257. }
  258. /// <summary>Field number for the "description_suffix" field.</summary>
  259. public const int DescriptionSuffixFieldNumber = 10;
  260. private string descriptionSuffix_ = "";
  261. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  262. public string DescriptionSuffix {
  263. get { return descriptionSuffix_; }
  264. set {
  265. descriptionSuffix_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  266. }
  267. }
  268. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  269. public override bool Equals(object other) {
  270. return Equals(other as ApiDef);
  271. }
  272. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  273. public bool Equals(ApiDef other) {
  274. if (ReferenceEquals(other, null)) {
  275. return false;
  276. }
  277. if (ReferenceEquals(other, this)) {
  278. return true;
  279. }
  280. if (GraphOpName != other.GraphOpName) return false;
  281. if (DeprecationMessage != other.DeprecationMessage) return false;
  282. if (DeprecationVersion != other.DeprecationVersion) return false;
  283. if (Visibility != other.Visibility) return false;
  284. if(!endpoint_.Equals(other.endpoint_)) return false;
  285. if(!inArg_.Equals(other.inArg_)) return false;
  286. if(!outArg_.Equals(other.outArg_)) return false;
  287. if(!argOrder_.Equals(other.argOrder_)) return false;
  288. if(!attr_.Equals(other.attr_)) return false;
  289. if (Summary != other.Summary) return false;
  290. if (Description != other.Description) return false;
  291. if (DescriptionPrefix != other.DescriptionPrefix) return false;
  292. if (DescriptionSuffix != other.DescriptionSuffix) return false;
  293. return Equals(_unknownFields, other._unknownFields);
  294. }
  295. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  296. public override int GetHashCode() {
  297. int hash = 1;
  298. if (GraphOpName.Length != 0) hash ^= GraphOpName.GetHashCode();
  299. if (DeprecationMessage.Length != 0) hash ^= DeprecationMessage.GetHashCode();
  300. if (DeprecationVersion != 0) hash ^= DeprecationVersion.GetHashCode();
  301. if (Visibility != global::Tensorflow.ApiDef.Types.Visibility.DefaultVisibility) hash ^= Visibility.GetHashCode();
  302. hash ^= endpoint_.GetHashCode();
  303. hash ^= inArg_.GetHashCode();
  304. hash ^= outArg_.GetHashCode();
  305. hash ^= argOrder_.GetHashCode();
  306. hash ^= attr_.GetHashCode();
  307. if (Summary.Length != 0) hash ^= Summary.GetHashCode();
  308. if (Description.Length != 0) hash ^= Description.GetHashCode();
  309. if (DescriptionPrefix.Length != 0) hash ^= DescriptionPrefix.GetHashCode();
  310. if (DescriptionSuffix.Length != 0) hash ^= DescriptionSuffix.GetHashCode();
  311. if (_unknownFields != null) {
  312. hash ^= _unknownFields.GetHashCode();
  313. }
  314. return hash;
  315. }
  316. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  317. public override string ToString() {
  318. return pb::JsonFormatter.ToDiagnosticString(this);
  319. }
  320. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  321. public void WriteTo(pb::CodedOutputStream output) {
  322. if (GraphOpName.Length != 0) {
  323. output.WriteRawTag(10);
  324. output.WriteString(GraphOpName);
  325. }
  326. if (Visibility != global::Tensorflow.ApiDef.Types.Visibility.DefaultVisibility) {
  327. output.WriteRawTag(16);
  328. output.WriteEnum((int) Visibility);
  329. }
  330. endpoint_.WriteTo(output, _repeated_endpoint_codec);
  331. inArg_.WriteTo(output, _repeated_inArg_codec);
  332. outArg_.WriteTo(output, _repeated_outArg_codec);
  333. attr_.WriteTo(output, _repeated_attr_codec);
  334. if (Summary.Length != 0) {
  335. output.WriteRawTag(58);
  336. output.WriteString(Summary);
  337. }
  338. if (Description.Length != 0) {
  339. output.WriteRawTag(66);
  340. output.WriteString(Description);
  341. }
  342. if (DescriptionPrefix.Length != 0) {
  343. output.WriteRawTag(74);
  344. output.WriteString(DescriptionPrefix);
  345. }
  346. if (DescriptionSuffix.Length != 0) {
  347. output.WriteRawTag(82);
  348. output.WriteString(DescriptionSuffix);
  349. }
  350. argOrder_.WriteTo(output, _repeated_argOrder_codec);
  351. if (DeprecationMessage.Length != 0) {
  352. output.WriteRawTag(98);
  353. output.WriteString(DeprecationMessage);
  354. }
  355. if (DeprecationVersion != 0) {
  356. output.WriteRawTag(104);
  357. output.WriteInt32(DeprecationVersion);
  358. }
  359. if (_unknownFields != null) {
  360. _unknownFields.WriteTo(output);
  361. }
  362. }
  363. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  364. public int CalculateSize() {
  365. int size = 0;
  366. if (GraphOpName.Length != 0) {
  367. size += 1 + pb::CodedOutputStream.ComputeStringSize(GraphOpName);
  368. }
  369. if (DeprecationMessage.Length != 0) {
  370. size += 1 + pb::CodedOutputStream.ComputeStringSize(DeprecationMessage);
  371. }
  372. if (DeprecationVersion != 0) {
  373. size += 1 + pb::CodedOutputStream.ComputeInt32Size(DeprecationVersion);
  374. }
  375. if (Visibility != global::Tensorflow.ApiDef.Types.Visibility.DefaultVisibility) {
  376. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Visibility);
  377. }
  378. size += endpoint_.CalculateSize(_repeated_endpoint_codec);
  379. size += inArg_.CalculateSize(_repeated_inArg_codec);
  380. size += outArg_.CalculateSize(_repeated_outArg_codec);
  381. size += argOrder_.CalculateSize(_repeated_argOrder_codec);
  382. size += attr_.CalculateSize(_repeated_attr_codec);
  383. if (Summary.Length != 0) {
  384. size += 1 + pb::CodedOutputStream.ComputeStringSize(Summary);
  385. }
  386. if (Description.Length != 0) {
  387. size += 1 + pb::CodedOutputStream.ComputeStringSize(Description);
  388. }
  389. if (DescriptionPrefix.Length != 0) {
  390. size += 1 + pb::CodedOutputStream.ComputeStringSize(DescriptionPrefix);
  391. }
  392. if (DescriptionSuffix.Length != 0) {
  393. size += 1 + pb::CodedOutputStream.ComputeStringSize(DescriptionSuffix);
  394. }
  395. if (_unknownFields != null) {
  396. size += _unknownFields.CalculateSize();
  397. }
  398. return size;
  399. }
  400. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  401. public void MergeFrom(ApiDef other) {
  402. if (other == null) {
  403. return;
  404. }
  405. if (other.GraphOpName.Length != 0) {
  406. GraphOpName = other.GraphOpName;
  407. }
  408. if (other.DeprecationMessage.Length != 0) {
  409. DeprecationMessage = other.DeprecationMessage;
  410. }
  411. if (other.DeprecationVersion != 0) {
  412. DeprecationVersion = other.DeprecationVersion;
  413. }
  414. if (other.Visibility != global::Tensorflow.ApiDef.Types.Visibility.DefaultVisibility) {
  415. Visibility = other.Visibility;
  416. }
  417. endpoint_.Add(other.endpoint_);
  418. inArg_.Add(other.inArg_);
  419. outArg_.Add(other.outArg_);
  420. argOrder_.Add(other.argOrder_);
  421. attr_.Add(other.attr_);
  422. if (other.Summary.Length != 0) {
  423. Summary = other.Summary;
  424. }
  425. if (other.Description.Length != 0) {
  426. Description = other.Description;
  427. }
  428. if (other.DescriptionPrefix.Length != 0) {
  429. DescriptionPrefix = other.DescriptionPrefix;
  430. }
  431. if (other.DescriptionSuffix.Length != 0) {
  432. DescriptionSuffix = other.DescriptionSuffix;
  433. }
  434. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  435. }
  436. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  437. public void MergeFrom(pb::CodedInputStream input) {
  438. uint tag;
  439. while ((tag = input.ReadTag()) != 0) {
  440. switch(tag) {
  441. default:
  442. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  443. break;
  444. case 10: {
  445. GraphOpName = input.ReadString();
  446. break;
  447. }
  448. case 16: {
  449. Visibility = (global::Tensorflow.ApiDef.Types.Visibility) input.ReadEnum();
  450. break;
  451. }
  452. case 26: {
  453. endpoint_.AddEntriesFrom(input, _repeated_endpoint_codec);
  454. break;
  455. }
  456. case 34: {
  457. inArg_.AddEntriesFrom(input, _repeated_inArg_codec);
  458. break;
  459. }
  460. case 42: {
  461. outArg_.AddEntriesFrom(input, _repeated_outArg_codec);
  462. break;
  463. }
  464. case 50: {
  465. attr_.AddEntriesFrom(input, _repeated_attr_codec);
  466. break;
  467. }
  468. case 58: {
  469. Summary = input.ReadString();
  470. break;
  471. }
  472. case 66: {
  473. Description = input.ReadString();
  474. break;
  475. }
  476. case 74: {
  477. DescriptionPrefix = input.ReadString();
  478. break;
  479. }
  480. case 82: {
  481. DescriptionSuffix = input.ReadString();
  482. break;
  483. }
  484. case 90: {
  485. argOrder_.AddEntriesFrom(input, _repeated_argOrder_codec);
  486. break;
  487. }
  488. case 98: {
  489. DeprecationMessage = input.ReadString();
  490. break;
  491. }
  492. case 104: {
  493. DeprecationVersion = input.ReadInt32();
  494. break;
  495. }
  496. }
  497. }
  498. }
  499. #region Nested types
  500. /// <summary>Container for nested types declared in the ApiDef message type.</summary>
  501. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  502. public static partial class Types {
  503. public enum Visibility {
  504. /// <summary>
  505. /// Normally this is "VISIBLE" unless you are inheriting a
  506. /// different value from another ApiDef.
  507. /// </summary>
  508. [pbr::OriginalName("DEFAULT_VISIBILITY")] DefaultVisibility = 0,
  509. /// <summary>
  510. /// Publicly visible in the API.
  511. /// </summary>
  512. [pbr::OriginalName("VISIBLE")] Visible = 1,
  513. /// <summary>
  514. /// Do not include this op in the generated API. If visibility is
  515. /// set to 'SKIP', other fields are ignored for this op.
  516. /// </summary>
  517. [pbr::OriginalName("SKIP")] Skip = 2,
  518. /// <summary>
  519. /// Hide this op by putting it into an internal namespace (or whatever
  520. /// is appropriate in the target language).
  521. /// </summary>
  522. [pbr::OriginalName("HIDDEN")] Hidden = 3,
  523. }
  524. /// <summary>
  525. /// If you specify any endpoint, this will replace all of the
  526. /// inherited endpoints. The first endpoint should be the
  527. /// "canonical" endpoint, and should not be deprecated (unless all
  528. /// endpoints are deprecated).
  529. /// </summary>
  530. public sealed partial class Endpoint : pb::IMessage<Endpoint> {
  531. private static readonly pb::MessageParser<Endpoint> _parser = new pb::MessageParser<Endpoint>(() => new Endpoint());
  532. private pb::UnknownFieldSet _unknownFields;
  533. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  534. public static pb::MessageParser<Endpoint> Parser { get { return _parser; } }
  535. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  536. public static pbr::MessageDescriptor Descriptor {
  537. get { return global::Tensorflow.ApiDef.Descriptor.NestedTypes[0]; }
  538. }
  539. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  540. pbr::MessageDescriptor pb::IMessage.Descriptor {
  541. get { return Descriptor; }
  542. }
  543. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  544. public Endpoint() {
  545. OnConstruction();
  546. }
  547. partial void OnConstruction();
  548. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  549. public Endpoint(Endpoint other) : this() {
  550. name_ = other.name_;
  551. deprecated_ = other.deprecated_;
  552. deprecationVersion_ = other.deprecationVersion_;
  553. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  554. }
  555. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  556. public Endpoint Clone() {
  557. return new Endpoint(this);
  558. }
  559. /// <summary>Field number for the "name" field.</summary>
  560. public const int NameFieldNumber = 1;
  561. private string name_ = "";
  562. /// <summary>
  563. /// Name should be either like "CamelCaseName" or
  564. /// "Package.CamelCaseName". Client-language-specific ApiDefs may
  565. /// use a snake_case convention instead of CamelCase.
  566. /// </summary>
  567. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  568. public string Name {
  569. get { return name_; }
  570. set {
  571. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  572. }
  573. }
  574. /// <summary>Field number for the "deprecated" field.</summary>
  575. public const int DeprecatedFieldNumber = 3;
  576. private bool deprecated_;
  577. /// <summary>
  578. /// Set if this endpoint is deprecated. If set to true, a message suggesting
  579. /// to use a non-deprecated endpoint instead will be printed. If all
  580. /// endpoints are deprecated, set deprecation_message in ApiDef instead.
  581. /// </summary>
  582. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  583. public bool Deprecated {
  584. get { return deprecated_; }
  585. set {
  586. deprecated_ = value;
  587. }
  588. }
  589. /// <summary>Field number for the "deprecation_version" field.</summary>
  590. public const int DeprecationVersionFieldNumber = 4;
  591. private int deprecationVersion_;
  592. /// <summary>
  593. /// Major version when an endpoint will be deleted. For e.g. set this
  594. /// value to 2 if endpoint should be removed in TensorFlow 2.0 and
  595. /// deprecated in versions before that.
  596. /// </summary>
  597. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  598. public int DeprecationVersion {
  599. get { return deprecationVersion_; }
  600. set {
  601. deprecationVersion_ = value;
  602. }
  603. }
  604. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  605. public override bool Equals(object other) {
  606. return Equals(other as Endpoint);
  607. }
  608. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  609. public bool Equals(Endpoint other) {
  610. if (ReferenceEquals(other, null)) {
  611. return false;
  612. }
  613. if (ReferenceEquals(other, this)) {
  614. return true;
  615. }
  616. if (Name != other.Name) return false;
  617. if (Deprecated != other.Deprecated) return false;
  618. if (DeprecationVersion != other.DeprecationVersion) return false;
  619. return Equals(_unknownFields, other._unknownFields);
  620. }
  621. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  622. public override int GetHashCode() {
  623. int hash = 1;
  624. if (Name.Length != 0) hash ^= Name.GetHashCode();
  625. if (Deprecated != false) hash ^= Deprecated.GetHashCode();
  626. if (DeprecationVersion != 0) hash ^= DeprecationVersion.GetHashCode();
  627. if (_unknownFields != null) {
  628. hash ^= _unknownFields.GetHashCode();
  629. }
  630. return hash;
  631. }
  632. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  633. public override string ToString() {
  634. return pb::JsonFormatter.ToDiagnosticString(this);
  635. }
  636. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  637. public void WriteTo(pb::CodedOutputStream output) {
  638. if (Name.Length != 0) {
  639. output.WriteRawTag(10);
  640. output.WriteString(Name);
  641. }
  642. if (Deprecated != false) {
  643. output.WriteRawTag(24);
  644. output.WriteBool(Deprecated);
  645. }
  646. if (DeprecationVersion != 0) {
  647. output.WriteRawTag(32);
  648. output.WriteInt32(DeprecationVersion);
  649. }
  650. if (_unknownFields != null) {
  651. _unknownFields.WriteTo(output);
  652. }
  653. }
  654. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  655. public int CalculateSize() {
  656. int size = 0;
  657. if (Name.Length != 0) {
  658. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  659. }
  660. if (Deprecated != false) {
  661. size += 1 + 1;
  662. }
  663. if (DeprecationVersion != 0) {
  664. size += 1 + pb::CodedOutputStream.ComputeInt32Size(DeprecationVersion);
  665. }
  666. if (_unknownFields != null) {
  667. size += _unknownFields.CalculateSize();
  668. }
  669. return size;
  670. }
  671. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  672. public void MergeFrom(Endpoint other) {
  673. if (other == null) {
  674. return;
  675. }
  676. if (other.Name.Length != 0) {
  677. Name = other.Name;
  678. }
  679. if (other.Deprecated != false) {
  680. Deprecated = other.Deprecated;
  681. }
  682. if (other.DeprecationVersion != 0) {
  683. DeprecationVersion = other.DeprecationVersion;
  684. }
  685. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  686. }
  687. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  688. public void MergeFrom(pb::CodedInputStream input) {
  689. uint tag;
  690. while ((tag = input.ReadTag()) != 0) {
  691. switch(tag) {
  692. default:
  693. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  694. break;
  695. case 10: {
  696. Name = input.ReadString();
  697. break;
  698. }
  699. case 24: {
  700. Deprecated = input.ReadBool();
  701. break;
  702. }
  703. case 32: {
  704. DeprecationVersion = input.ReadInt32();
  705. break;
  706. }
  707. }
  708. }
  709. }
  710. }
  711. public sealed partial class Arg : pb::IMessage<Arg> {
  712. private static readonly pb::MessageParser<Arg> _parser = new pb::MessageParser<Arg>(() => new Arg());
  713. private pb::UnknownFieldSet _unknownFields;
  714. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  715. public static pb::MessageParser<Arg> Parser { get { return _parser; } }
  716. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  717. public static pbr::MessageDescriptor Descriptor {
  718. get { return global::Tensorflow.ApiDef.Descriptor.NestedTypes[1]; }
  719. }
  720. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  721. pbr::MessageDescriptor pb::IMessage.Descriptor {
  722. get { return Descriptor; }
  723. }
  724. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  725. public Arg() {
  726. OnConstruction();
  727. }
  728. partial void OnConstruction();
  729. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  730. public Arg(Arg other) : this() {
  731. name_ = other.name_;
  732. renameTo_ = other.renameTo_;
  733. description_ = other.description_;
  734. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  735. }
  736. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  737. public Arg Clone() {
  738. return new Arg(this);
  739. }
  740. /// <summary>Field number for the "name" field.</summary>
  741. public const int NameFieldNumber = 1;
  742. private string name_ = "";
  743. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  744. public string Name {
  745. get { return name_; }
  746. set {
  747. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  748. }
  749. }
  750. /// <summary>Field number for the "rename_to" field.</summary>
  751. public const int RenameToFieldNumber = 2;
  752. private string renameTo_ = "";
  753. /// <summary>
  754. /// Change the name used to access this arg in the API from what
  755. /// is used in the GraphDef. Note that these names in `backticks`
  756. /// will also be replaced in the summary &amp; description fields.
  757. /// </summary>
  758. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  759. public string RenameTo {
  760. get { return renameTo_; }
  761. set {
  762. renameTo_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  763. }
  764. }
  765. /// <summary>Field number for the "description" field.</summary>
  766. public const int DescriptionFieldNumber = 3;
  767. private string description_ = "";
  768. /// <summary>
  769. /// Note: this will replace any inherited arg doc. There is no
  770. /// current way of modifying arg descriptions (other than replacing
  771. /// them entirely) as can be done with op descriptions.
  772. /// </summary>
  773. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  774. public string Description {
  775. get { return description_; }
  776. set {
  777. description_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  778. }
  779. }
  780. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  781. public override bool Equals(object other) {
  782. return Equals(other as Arg);
  783. }
  784. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  785. public bool Equals(Arg other) {
  786. if (ReferenceEquals(other, null)) {
  787. return false;
  788. }
  789. if (ReferenceEquals(other, this)) {
  790. return true;
  791. }
  792. if (Name != other.Name) return false;
  793. if (RenameTo != other.RenameTo) return false;
  794. if (Description != other.Description) return false;
  795. return Equals(_unknownFields, other._unknownFields);
  796. }
  797. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  798. public override int GetHashCode() {
  799. int hash = 1;
  800. if (Name.Length != 0) hash ^= Name.GetHashCode();
  801. if (RenameTo.Length != 0) hash ^= RenameTo.GetHashCode();
  802. if (Description.Length != 0) hash ^= Description.GetHashCode();
  803. if (_unknownFields != null) {
  804. hash ^= _unknownFields.GetHashCode();
  805. }
  806. return hash;
  807. }
  808. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  809. public override string ToString() {
  810. return pb::JsonFormatter.ToDiagnosticString(this);
  811. }
  812. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  813. public void WriteTo(pb::CodedOutputStream output) {
  814. if (Name.Length != 0) {
  815. output.WriteRawTag(10);
  816. output.WriteString(Name);
  817. }
  818. if (RenameTo.Length != 0) {
  819. output.WriteRawTag(18);
  820. output.WriteString(RenameTo);
  821. }
  822. if (Description.Length != 0) {
  823. output.WriteRawTag(26);
  824. output.WriteString(Description);
  825. }
  826. if (_unknownFields != null) {
  827. _unknownFields.WriteTo(output);
  828. }
  829. }
  830. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  831. public int CalculateSize() {
  832. int size = 0;
  833. if (Name.Length != 0) {
  834. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  835. }
  836. if (RenameTo.Length != 0) {
  837. size += 1 + pb::CodedOutputStream.ComputeStringSize(RenameTo);
  838. }
  839. if (Description.Length != 0) {
  840. size += 1 + pb::CodedOutputStream.ComputeStringSize(Description);
  841. }
  842. if (_unknownFields != null) {
  843. size += _unknownFields.CalculateSize();
  844. }
  845. return size;
  846. }
  847. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  848. public void MergeFrom(Arg other) {
  849. if (other == null) {
  850. return;
  851. }
  852. if (other.Name.Length != 0) {
  853. Name = other.Name;
  854. }
  855. if (other.RenameTo.Length != 0) {
  856. RenameTo = other.RenameTo;
  857. }
  858. if (other.Description.Length != 0) {
  859. Description = other.Description;
  860. }
  861. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  862. }
  863. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  864. public void MergeFrom(pb::CodedInputStream input) {
  865. uint tag;
  866. while ((tag = input.ReadTag()) != 0) {
  867. switch(tag) {
  868. default:
  869. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  870. break;
  871. case 10: {
  872. Name = input.ReadString();
  873. break;
  874. }
  875. case 18: {
  876. RenameTo = input.ReadString();
  877. break;
  878. }
  879. case 26: {
  880. Description = input.ReadString();
  881. break;
  882. }
  883. }
  884. }
  885. }
  886. }
  887. /// <summary>
  888. /// Description of the graph-construction-time configuration of this
  889. /// Op. That is to say, this describes the attr fields that will
  890. /// be specified in the NodeDef.
  891. /// </summary>
  892. public sealed partial class Attr : pb::IMessage<Attr> {
  893. private static readonly pb::MessageParser<Attr> _parser = new pb::MessageParser<Attr>(() => new Attr());
  894. private pb::UnknownFieldSet _unknownFields;
  895. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  896. public static pb::MessageParser<Attr> Parser { get { return _parser; } }
  897. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  898. public static pbr::MessageDescriptor Descriptor {
  899. get { return global::Tensorflow.ApiDef.Descriptor.NestedTypes[2]; }
  900. }
  901. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  902. pbr::MessageDescriptor pb::IMessage.Descriptor {
  903. get { return Descriptor; }
  904. }
  905. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  906. public Attr() {
  907. OnConstruction();
  908. }
  909. partial void OnConstruction();
  910. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  911. public Attr(Attr other) : this() {
  912. name_ = other.name_;
  913. renameTo_ = other.renameTo_;
  914. defaultValue_ = other.defaultValue_ != null ? other.defaultValue_.Clone() : null;
  915. description_ = other.description_;
  916. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  917. }
  918. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  919. public Attr Clone() {
  920. return new Attr(this);
  921. }
  922. /// <summary>Field number for the "name" field.</summary>
  923. public const int NameFieldNumber = 1;
  924. private string name_ = "";
  925. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  926. public string Name {
  927. get { return name_; }
  928. set {
  929. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  930. }
  931. }
  932. /// <summary>Field number for the "rename_to" field.</summary>
  933. public const int RenameToFieldNumber = 2;
  934. private string renameTo_ = "";
  935. /// <summary>
  936. /// Change the name used to access this attr in the API from what
  937. /// is used in the GraphDef. Note that these names in `backticks`
  938. /// will also be replaced in the summary &amp; description fields.
  939. /// </summary>
  940. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  941. public string RenameTo {
  942. get { return renameTo_; }
  943. set {
  944. renameTo_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  945. }
  946. }
  947. /// <summary>Field number for the "default_value" field.</summary>
  948. public const int DefaultValueFieldNumber = 3;
  949. private global::Tensorflow.AttrValue defaultValue_;
  950. /// <summary>
  951. /// Specify a new default value to use for this attr. This default
  952. /// will be used when creating new graphs, as opposed to the
  953. /// default in the OpDef, which will be used when interpreting old
  954. /// GraphDefs.
  955. /// </summary>
  956. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  957. public global::Tensorflow.AttrValue DefaultValue {
  958. get { return defaultValue_; }
  959. set {
  960. defaultValue_ = value;
  961. }
  962. }
  963. /// <summary>Field number for the "description" field.</summary>
  964. public const int DescriptionFieldNumber = 4;
  965. private string description_ = "";
  966. /// <summary>
  967. /// Note: this will replace any inherited attr doc, there is no current
  968. /// way of modifying attr descriptions as can be done with op descriptions.
  969. /// </summary>
  970. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  971. public string Description {
  972. get { return description_; }
  973. set {
  974. description_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  975. }
  976. }
  977. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  978. public override bool Equals(object other) {
  979. return Equals(other as Attr);
  980. }
  981. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  982. public bool Equals(Attr other) {
  983. if (ReferenceEquals(other, null)) {
  984. return false;
  985. }
  986. if (ReferenceEquals(other, this)) {
  987. return true;
  988. }
  989. if (Name != other.Name) return false;
  990. if (RenameTo != other.RenameTo) return false;
  991. if (!object.Equals(DefaultValue, other.DefaultValue)) return false;
  992. if (Description != other.Description) return false;
  993. return Equals(_unknownFields, other._unknownFields);
  994. }
  995. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  996. public override int GetHashCode() {
  997. int hash = 1;
  998. if (Name.Length != 0) hash ^= Name.GetHashCode();
  999. if (RenameTo.Length != 0) hash ^= RenameTo.GetHashCode();
  1000. if (defaultValue_ != null) hash ^= DefaultValue.GetHashCode();
  1001. if (Description.Length != 0) hash ^= Description.GetHashCode();
  1002. if (_unknownFields != null) {
  1003. hash ^= _unknownFields.GetHashCode();
  1004. }
  1005. return hash;
  1006. }
  1007. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1008. public override string ToString() {
  1009. return pb::JsonFormatter.ToDiagnosticString(this);
  1010. }
  1011. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1012. public void WriteTo(pb::CodedOutputStream output) {
  1013. if (Name.Length != 0) {
  1014. output.WriteRawTag(10);
  1015. output.WriteString(Name);
  1016. }
  1017. if (RenameTo.Length != 0) {
  1018. output.WriteRawTag(18);
  1019. output.WriteString(RenameTo);
  1020. }
  1021. if (defaultValue_ != null) {
  1022. output.WriteRawTag(26);
  1023. output.WriteMessage(DefaultValue);
  1024. }
  1025. if (Description.Length != 0) {
  1026. output.WriteRawTag(34);
  1027. output.WriteString(Description);
  1028. }
  1029. if (_unknownFields != null) {
  1030. _unknownFields.WriteTo(output);
  1031. }
  1032. }
  1033. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1034. public int CalculateSize() {
  1035. int size = 0;
  1036. if (Name.Length != 0) {
  1037. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  1038. }
  1039. if (RenameTo.Length != 0) {
  1040. size += 1 + pb::CodedOutputStream.ComputeStringSize(RenameTo);
  1041. }
  1042. if (defaultValue_ != null) {
  1043. size += 1 + pb::CodedOutputStream.ComputeMessageSize(DefaultValue);
  1044. }
  1045. if (Description.Length != 0) {
  1046. size += 1 + pb::CodedOutputStream.ComputeStringSize(Description);
  1047. }
  1048. if (_unknownFields != null) {
  1049. size += _unknownFields.CalculateSize();
  1050. }
  1051. return size;
  1052. }
  1053. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1054. public void MergeFrom(Attr other) {
  1055. if (other == null) {
  1056. return;
  1057. }
  1058. if (other.Name.Length != 0) {
  1059. Name = other.Name;
  1060. }
  1061. if (other.RenameTo.Length != 0) {
  1062. RenameTo = other.RenameTo;
  1063. }
  1064. if (other.defaultValue_ != null) {
  1065. if (defaultValue_ == null) {
  1066. DefaultValue = new global::Tensorflow.AttrValue();
  1067. }
  1068. DefaultValue.MergeFrom(other.DefaultValue);
  1069. }
  1070. if (other.Description.Length != 0) {
  1071. Description = other.Description;
  1072. }
  1073. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1074. }
  1075. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1076. public void MergeFrom(pb::CodedInputStream input) {
  1077. uint tag;
  1078. while ((tag = input.ReadTag()) != 0) {
  1079. switch(tag) {
  1080. default:
  1081. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1082. break;
  1083. case 10: {
  1084. Name = input.ReadString();
  1085. break;
  1086. }
  1087. case 18: {
  1088. RenameTo = input.ReadString();
  1089. break;
  1090. }
  1091. case 26: {
  1092. if (defaultValue_ == null) {
  1093. DefaultValue = new global::Tensorflow.AttrValue();
  1094. }
  1095. input.ReadMessage(DefaultValue);
  1096. break;
  1097. }
  1098. case 34: {
  1099. Description = input.ReadString();
  1100. break;
  1101. }
  1102. }
  1103. }
  1104. }
  1105. }
  1106. }
  1107. #endregion
  1108. }
  1109. public sealed partial class ApiDefs : pb::IMessage<ApiDefs> {
  1110. private static readonly pb::MessageParser<ApiDefs> _parser = new pb::MessageParser<ApiDefs>(() => new ApiDefs());
  1111. private pb::UnknownFieldSet _unknownFields;
  1112. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1113. public static pb::MessageParser<ApiDefs> Parser { get { return _parser; } }
  1114. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1115. public static pbr::MessageDescriptor Descriptor {
  1116. get { return global::Tensorflow.ApiDefReflection.Descriptor.MessageTypes[1]; }
  1117. }
  1118. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1119. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1120. get { return Descriptor; }
  1121. }
  1122. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1123. public ApiDefs() {
  1124. OnConstruction();
  1125. }
  1126. partial void OnConstruction();
  1127. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1128. public ApiDefs(ApiDefs other) : this() {
  1129. op_ = other.op_.Clone();
  1130. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1131. }
  1132. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1133. public ApiDefs Clone() {
  1134. return new ApiDefs(this);
  1135. }
  1136. /// <summary>Field number for the "op" field.</summary>
  1137. public const int OpFieldNumber = 1;
  1138. private static readonly pb::FieldCodec<global::Tensorflow.ApiDef> _repeated_op_codec
  1139. = pb::FieldCodec.ForMessage(10, global::Tensorflow.ApiDef.Parser);
  1140. private readonly pbc::RepeatedField<global::Tensorflow.ApiDef> op_ = new pbc::RepeatedField<global::Tensorflow.ApiDef>();
  1141. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1142. public pbc::RepeatedField<global::Tensorflow.ApiDef> Op {
  1143. get { return op_; }
  1144. }
  1145. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1146. public override bool Equals(object other) {
  1147. return Equals(other as ApiDefs);
  1148. }
  1149. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1150. public bool Equals(ApiDefs other) {
  1151. if (ReferenceEquals(other, null)) {
  1152. return false;
  1153. }
  1154. if (ReferenceEquals(other, this)) {
  1155. return true;
  1156. }
  1157. if(!op_.Equals(other.op_)) return false;
  1158. return Equals(_unknownFields, other._unknownFields);
  1159. }
  1160. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1161. public override int GetHashCode() {
  1162. int hash = 1;
  1163. hash ^= op_.GetHashCode();
  1164. if (_unknownFields != null) {
  1165. hash ^= _unknownFields.GetHashCode();
  1166. }
  1167. return hash;
  1168. }
  1169. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1170. public override string ToString() {
  1171. return pb::JsonFormatter.ToDiagnosticString(this);
  1172. }
  1173. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1174. public void WriteTo(pb::CodedOutputStream output) {
  1175. op_.WriteTo(output, _repeated_op_codec);
  1176. if (_unknownFields != null) {
  1177. _unknownFields.WriteTo(output);
  1178. }
  1179. }
  1180. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1181. public int CalculateSize() {
  1182. int size = 0;
  1183. size += op_.CalculateSize(_repeated_op_codec);
  1184. if (_unknownFields != null) {
  1185. size += _unknownFields.CalculateSize();
  1186. }
  1187. return size;
  1188. }
  1189. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1190. public void MergeFrom(ApiDefs other) {
  1191. if (other == null) {
  1192. return;
  1193. }
  1194. op_.Add(other.op_);
  1195. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1196. }
  1197. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1198. public void MergeFrom(pb::CodedInputStream input) {
  1199. uint tag;
  1200. while ((tag = input.ReadTag()) != 0) {
  1201. switch(tag) {
  1202. default:
  1203. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1204. break;
  1205. case 10: {
  1206. op_.AddEntriesFrom(input, _repeated_op_codec);
  1207. break;
  1208. }
  1209. }
  1210. }
  1211. }
  1212. }
  1213. #endregion
  1214. }
  1215. #endregion Designer generated code