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.

Struct.cs 122 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: tensorflow/core/protobuf/struct.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 {
  12. /// <summary>Holder for reflection information generated from tensorflow/core/protobuf/struct.proto</summary>
  13. public static partial class StructReflection {
  14. #region Descriptor
  15. /// <summary>File descriptor for tensorflow/core/protobuf/struct.proto</summary>
  16. public static pbr::FileDescriptor Descriptor {
  17. get { return descriptor; }
  18. }
  19. private static pbr::FileDescriptor descriptor;
  20. static StructReflection() {
  21. byte[] descriptorData = global::System.Convert.FromBase64String(
  22. string.Concat(
  23. "CiV0ZW5zb3JmbG93L2NvcmUvcHJvdG9idWYvc3RydWN0LnByb3RvEgp0ZW5z",
  24. "b3JmbG93GiZ0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL3RlbnNvci5wcm90",
  25. "bxosdGVuc29yZmxvdy9jb3JlL2ZyYW1ld29yay90ZW5zb3Jfc2hhcGUucHJv",
  26. "dG8aJXRlbnNvcmZsb3cvY29yZS9mcmFtZXdvcmsvdHlwZXMucHJvdG8ikAUK",
  27. "D1N0cnVjdHVyZWRWYWx1ZRIrCgpub25lX3ZhbHVlGAEgASgLMhUudGVuc29y",
  28. "Zmxvdy5Ob25lVmFsdWVIABIXCg1mbG9hdDY0X3ZhbHVlGAsgASgBSAASFQoL",
  29. "aW50NjRfdmFsdWUYDCABKBJIABIWCgxzdHJpbmdfdmFsdWUYDSABKAlIABIU",
  30. "Cgpib29sX3ZhbHVlGA4gASgISAASOgoSdGVuc29yX3NoYXBlX3ZhbHVlGB8g",
  31. "ASgLMhwudGVuc29yZmxvdy5UZW5zb3JTaGFwZVByb3RvSAASMgoSdGVuc29y",
  32. "X2R0eXBlX3ZhbHVlGCAgASgOMhQudGVuc29yZmxvdy5EYXRhVHlwZUgAEjgK",
  33. "EXRlbnNvcl9zcGVjX3ZhbHVlGCEgASgLMhsudGVuc29yZmxvdy5UZW5zb3JT",
  34. "cGVjUHJvdG9IABI0Cg90eXBlX3NwZWNfdmFsdWUYIiABKAsyGS50ZW5zb3Jm",
  35. "bG93LlR5cGVTcGVjUHJvdG9IABJHChlib3VuZGVkX3RlbnNvcl9zcGVjX3Zh",
  36. "bHVlGCMgASgLMiIudGVuc29yZmxvdy5Cb3VuZGVkVGVuc29yU3BlY1Byb3Rv",
  37. "SAASKwoKbGlzdF92YWx1ZRgzIAEoCzIVLnRlbnNvcmZsb3cuTGlzdFZhbHVl",
  38. "SAASLQoLdHVwbGVfdmFsdWUYNCABKAsyFi50ZW5zb3JmbG93LlR1cGxlVmFs",
  39. "dWVIABIrCgpkaWN0X3ZhbHVlGDUgASgLMhUudGVuc29yZmxvdy5EaWN0VmFs",
  40. "dWVIABI4ChFuYW1lZF90dXBsZV92YWx1ZRg2IAEoCzIbLnRlbnNvcmZsb3cu",
  41. "TmFtZWRUdXBsZVZhbHVlSABCBgoEa2luZCILCglOb25lVmFsdWUiOAoJTGlz",
  42. "dFZhbHVlEisKBnZhbHVlcxgBIAMoCzIbLnRlbnNvcmZsb3cuU3RydWN0dXJl",
  43. "ZFZhbHVlIjkKClR1cGxlVmFsdWUSKwoGdmFsdWVzGAEgAygLMhsudGVuc29y",
  44. "Zmxvdy5TdHJ1Y3R1cmVkVmFsdWUiigEKCURpY3RWYWx1ZRIxCgZmaWVsZHMY",
  45. "ASADKAsyIS50ZW5zb3JmbG93LkRpY3RWYWx1ZS5GaWVsZHNFbnRyeRpKCgtG",
  46. "aWVsZHNFbnRyeRILCgNrZXkYASABKAkSKgoFdmFsdWUYAiABKAsyGy50ZW5z",
  47. "b3JmbG93LlN0cnVjdHVyZWRWYWx1ZToCOAEiRAoJUGFpclZhbHVlEgsKA2tl",
  48. "eRgBIAEoCRIqCgV2YWx1ZRgCIAEoCzIbLnRlbnNvcmZsb3cuU3RydWN0dXJl",
  49. "ZFZhbHVlIkYKD05hbWVkVHVwbGVWYWx1ZRIMCgRuYW1lGAEgASgJEiUKBnZh",
  50. "bHVlcxgCIAMoCzIVLnRlbnNvcmZsb3cuUGFpclZhbHVlInEKD1RlbnNvclNw",
  51. "ZWNQcm90bxIMCgRuYW1lGAEgASgJEisKBXNoYXBlGAIgASgLMhwudGVuc29y",
  52. "Zmxvdy5UZW5zb3JTaGFwZVByb3RvEiMKBWR0eXBlGAMgASgOMhQudGVuc29y",
  53. "Zmxvdy5EYXRhVHlwZSLMAQoWQm91bmRlZFRlbnNvclNwZWNQcm90bxIMCgRu",
  54. "YW1lGAEgASgJEisKBXNoYXBlGAIgASgLMhwudGVuc29yZmxvdy5UZW5zb3JT",
  55. "aGFwZVByb3RvEiMKBWR0eXBlGAMgASgOMhQudGVuc29yZmxvdy5EYXRhVHlw",
  56. "ZRIoCgdtaW5pbXVtGAQgASgLMhcudGVuc29yZmxvdy5UZW5zb3JQcm90bxIo",
  57. "CgdtYXhpbXVtGAUgASgLMhcudGVuc29yZmxvdy5UZW5zb3JQcm90byL4AwoN",
  58. "VHlwZVNwZWNQcm90bxJACg90eXBlX3NwZWNfY2xhc3MYASABKA4yJy50ZW5z",
  59. "b3JmbG93LlR5cGVTcGVjUHJvdG8uVHlwZVNwZWNDbGFzcxIvCgp0eXBlX3N0",
  60. "YXRlGAIgASgLMhsudGVuc29yZmxvdy5TdHJ1Y3R1cmVkVmFsdWUSHAoUdHlw",
  61. "ZV9zcGVjX2NsYXNzX25hbWUYAyABKAkSGwoTbnVtX2ZsYXRfY29tcG9uZW50",
  62. "cxgEIAEoBSK4AgoNVHlwZVNwZWNDbGFzcxILCgdVTktOT1dOEAASFgoSU1BB",
  63. "UlNFX1RFTlNPUl9TUEVDEAESFwoTSU5ERVhFRF9TTElDRVNfU1BFQxACEhYK",
  64. "ElJBR0dFRF9URU5TT1JfU1BFQxADEhUKEVRFTlNPUl9BUlJBWV9TUEVDEAQS",
  65. "FQoRREFUQV9EQVRBU0VUX1NQRUMQBRIWChJEQVRBX0lURVJBVE9SX1NQRUMQ",
  66. "BhIRCg1PUFRJT05BTF9TUEVDEAcSFAoQUEVSX1JFUExJQ0FfU1BFQxAIEhEK",
  67. "DVZBUklBQkxFX1NQRUMQCRIWChJST1dfUEFSVElUSU9OX1NQRUMQChIYChRS",
  68. "RUdJU1RFUkVEX1RZUEVfU1BFQxAMEhcKE0VYVEVOU0lPTl9UWVBFX1NQRUMQ",
  69. "DSIECAsQC0JXWlVnaXRodWIuY29tL3RlbnNvcmZsb3cvdGVuc29yZmxvdy90",
  70. "ZW5zb3JmbG93L2dvL2NvcmUvcHJvdG9idWYvZm9yX2NvcmVfcHJvdG9zX2dv",
  71. "X3Byb3RvYgZwcm90bzM="));
  72. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  73. new pbr::FileDescriptor[] { global::Tensorflow.TensorReflection.Descriptor, global::Tensorflow.TensorShapeReflection.Descriptor, global::Tensorflow.TypesReflection.Descriptor, },
  74. new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
  75. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.StructuredValue), global::Tensorflow.StructuredValue.Parser, new[]{ "NoneValue", "Float64Value", "Int64Value", "StringValue", "BoolValue", "TensorShapeValue", "TensorDtypeValue", "TensorSpecValue", "TypeSpecValue", "BoundedTensorSpecValue", "ListValue", "TupleValue", "DictValue", "NamedTupleValue" }, new[]{ "Kind" }, null, null, null),
  76. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.NoneValue), global::Tensorflow.NoneValue.Parser, null, null, null, null, null),
  77. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ListValue), global::Tensorflow.ListValue.Parser, new[]{ "Values" }, null, null, null, null),
  78. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TupleValue), global::Tensorflow.TupleValue.Parser, new[]{ "Values" }, null, null, null, null),
  79. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.DictValue), global::Tensorflow.DictValue.Parser, new[]{ "Fields" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
  80. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.PairValue), global::Tensorflow.PairValue.Parser, new[]{ "Key", "Value" }, null, null, null, null),
  81. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.NamedTupleValue), global::Tensorflow.NamedTupleValue.Parser, new[]{ "Name", "Values" }, null, null, null, null),
  82. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorSpecProto), global::Tensorflow.TensorSpecProto.Parser, new[]{ "Name", "Shape", "Dtype" }, null, null, null, null),
  83. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.BoundedTensorSpecProto), global::Tensorflow.BoundedTensorSpecProto.Parser, new[]{ "Name", "Shape", "Dtype", "Minimum", "Maximum" }, null, null, null, null),
  84. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TypeSpecProto), global::Tensorflow.TypeSpecProto.Parser, new[]{ "TypeSpecClass", "TypeState", "TypeSpecClassName", "NumFlatComponents" }, null, new[]{ typeof(global::Tensorflow.TypeSpecProto.Types.TypeSpecClass) }, null, null)
  85. }));
  86. }
  87. #endregion
  88. }
  89. #region Messages
  90. /// <summary>
  91. /// `StructuredValue` represents a dynamically typed value representing various
  92. /// data structures that are inspired by Python data structures typically used in
  93. /// TensorFlow functions as inputs and outputs.
  94. ///
  95. /// For example when saving a Layer there may be a `training` argument. If the
  96. /// user passes a boolean True/False, that switches between two concrete
  97. /// TensorFlow functions. In order to switch between them in the same way after
  98. /// loading the SavedModel, we need to represent "True" and "False".
  99. ///
  100. /// A more advanced example might be a function which takes a list of
  101. /// dictionaries mapping from strings to Tensors. In order to map from
  102. /// user-specified arguments `[{"a": tf.constant(1.)}, {"q": tf.constant(3.)}]`
  103. /// after load to the right saved TensorFlow function, we need to represent the
  104. /// nested structure and the strings, recording that we have a trace for anything
  105. /// matching `[{"a": tf.TensorSpec(None, tf.float32)}, {"q": tf.TensorSpec([],
  106. /// tf.float64)}]` as an example.
  107. ///
  108. /// Likewise functions may return nested structures of Tensors, for example
  109. /// returning a dictionary mapping from strings to Tensors. In order for the
  110. /// loaded function to return the same structure we need to serialize it.
  111. ///
  112. /// This is an ergonomic aid for working with loaded SavedModels, not a promise
  113. /// to serialize all possible function signatures. For example we do not expect
  114. /// to pickle generic Python objects, and ideally we'd stay language-agnostic.
  115. /// </summary>
  116. public sealed partial class StructuredValue : pb::IMessage<StructuredValue>
  117. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  118. , pb::IBufferMessage
  119. #endif
  120. {
  121. private static readonly pb::MessageParser<StructuredValue> _parser = new pb::MessageParser<StructuredValue>(() => new StructuredValue());
  122. private pb::UnknownFieldSet _unknownFields;
  123. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  124. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  125. public static pb::MessageParser<StructuredValue> Parser { get { return _parser; } }
  126. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  127. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  128. public static pbr::MessageDescriptor Descriptor {
  129. get { return global::Tensorflow.StructReflection.Descriptor.MessageTypes[0]; }
  130. }
  131. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  132. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  133. pbr::MessageDescriptor pb::IMessage.Descriptor {
  134. get { return Descriptor; }
  135. }
  136. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  137. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  138. public StructuredValue() {
  139. OnConstruction();
  140. }
  141. partial void OnConstruction();
  142. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  143. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  144. public StructuredValue(StructuredValue other) : this() {
  145. switch (other.KindCase) {
  146. case KindOneofCase.NoneValue:
  147. NoneValue = other.NoneValue.Clone();
  148. break;
  149. case KindOneofCase.Float64Value:
  150. Float64Value = other.Float64Value;
  151. break;
  152. case KindOneofCase.Int64Value:
  153. Int64Value = other.Int64Value;
  154. break;
  155. case KindOneofCase.StringValue:
  156. StringValue = other.StringValue;
  157. break;
  158. case KindOneofCase.BoolValue:
  159. BoolValue = other.BoolValue;
  160. break;
  161. case KindOneofCase.TensorShapeValue:
  162. TensorShapeValue = other.TensorShapeValue.Clone();
  163. break;
  164. case KindOneofCase.TensorDtypeValue:
  165. TensorDtypeValue = other.TensorDtypeValue;
  166. break;
  167. case KindOneofCase.TensorSpecValue:
  168. TensorSpecValue = other.TensorSpecValue.Clone();
  169. break;
  170. case KindOneofCase.TypeSpecValue:
  171. TypeSpecValue = other.TypeSpecValue.Clone();
  172. break;
  173. case KindOneofCase.BoundedTensorSpecValue:
  174. BoundedTensorSpecValue = other.BoundedTensorSpecValue.Clone();
  175. break;
  176. case KindOneofCase.ListValue:
  177. ListValue = other.ListValue.Clone();
  178. break;
  179. case KindOneofCase.TupleValue:
  180. TupleValue = other.TupleValue.Clone();
  181. break;
  182. case KindOneofCase.DictValue:
  183. DictValue = other.DictValue.Clone();
  184. break;
  185. case KindOneofCase.NamedTupleValue:
  186. NamedTupleValue = other.NamedTupleValue.Clone();
  187. break;
  188. }
  189. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  190. }
  191. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  192. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  193. public StructuredValue Clone() {
  194. return new StructuredValue(this);
  195. }
  196. /// <summary>Field number for the "none_value" field.</summary>
  197. public const int NoneValueFieldNumber = 1;
  198. /// <summary>
  199. /// Represents None.
  200. /// </summary>
  201. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  202. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  203. public global::Tensorflow.NoneValue NoneValue {
  204. get { return kindCase_ == KindOneofCase.NoneValue ? (global::Tensorflow.NoneValue) kind_ : null; }
  205. set {
  206. kind_ = value;
  207. kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.NoneValue;
  208. }
  209. }
  210. /// <summary>Field number for the "float64_value" field.</summary>
  211. public const int Float64ValueFieldNumber = 11;
  212. /// <summary>
  213. /// Represents a double-precision floating-point value (a Python `float`).
  214. /// </summary>
  215. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  216. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  217. public double Float64Value {
  218. get { return kindCase_ == KindOneofCase.Float64Value ? (double) kind_ : 0D; }
  219. set {
  220. kind_ = value;
  221. kindCase_ = KindOneofCase.Float64Value;
  222. }
  223. }
  224. /// <summary>Field number for the "int64_value" field.</summary>
  225. public const int Int64ValueFieldNumber = 12;
  226. /// <summary>
  227. /// Represents a signed integer value, limited to 64 bits.
  228. /// Larger values from Python's arbitrary-precision integers are unsupported.
  229. /// </summary>
  230. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  231. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  232. public long Int64Value {
  233. get { return kindCase_ == KindOneofCase.Int64Value ? (long) kind_ : 0L; }
  234. set {
  235. kind_ = value;
  236. kindCase_ = KindOneofCase.Int64Value;
  237. }
  238. }
  239. /// <summary>Field number for the "string_value" field.</summary>
  240. public const int StringValueFieldNumber = 13;
  241. /// <summary>
  242. /// Represents a string of Unicode characters stored in a Python `str`.
  243. /// In Python 3, this is exactly what type `str` is.
  244. /// In Python 2, this is the UTF-8 encoding of the characters.
  245. /// For strings with ASCII characters only (as often used in TensorFlow code)
  246. /// there is effectively no difference between the language versions.
  247. /// The obsolescent `unicode` type of Python 2 is not supported here.
  248. /// </summary>
  249. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  250. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  251. public string StringValue {
  252. get { return kindCase_ == KindOneofCase.StringValue ? (string) kind_ : ""; }
  253. set {
  254. kind_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  255. kindCase_ = KindOneofCase.StringValue;
  256. }
  257. }
  258. /// <summary>Field number for the "bool_value" field.</summary>
  259. public const int BoolValueFieldNumber = 14;
  260. /// <summary>
  261. /// Represents a boolean value.
  262. /// </summary>
  263. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  264. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  265. public bool BoolValue {
  266. get { return kindCase_ == KindOneofCase.BoolValue ? (bool) kind_ : false; }
  267. set {
  268. kind_ = value;
  269. kindCase_ = KindOneofCase.BoolValue;
  270. }
  271. }
  272. /// <summary>Field number for the "tensor_shape_value" field.</summary>
  273. public const int TensorShapeValueFieldNumber = 31;
  274. /// <summary>
  275. /// Represents a TensorShape.
  276. /// </summary>
  277. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  278. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  279. public global::Tensorflow.TensorShapeProto TensorShapeValue {
  280. get { return kindCase_ == KindOneofCase.TensorShapeValue ? (global::Tensorflow.TensorShapeProto) kind_ : null; }
  281. set {
  282. kind_ = value;
  283. kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.TensorShapeValue;
  284. }
  285. }
  286. /// <summary>Field number for the "tensor_dtype_value" field.</summary>
  287. public const int TensorDtypeValueFieldNumber = 32;
  288. /// <summary>
  289. /// Represents an enum value for dtype.
  290. /// </summary>
  291. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  292. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  293. public global::Tensorflow.DataType TensorDtypeValue {
  294. get { return kindCase_ == KindOneofCase.TensorDtypeValue ? (global::Tensorflow.DataType) kind_ : global::Tensorflow.DataType.DtInvalid; }
  295. set {
  296. kind_ = value;
  297. kindCase_ = KindOneofCase.TensorDtypeValue;
  298. }
  299. }
  300. /// <summary>Field number for the "tensor_spec_value" field.</summary>
  301. public const int TensorSpecValueFieldNumber = 33;
  302. /// <summary>
  303. /// Represents a value for tf.TensorSpec.
  304. /// </summary>
  305. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  306. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  307. public global::Tensorflow.TensorSpecProto TensorSpecValue {
  308. get { return kindCase_ == KindOneofCase.TensorSpecValue ? (global::Tensorflow.TensorSpecProto) kind_ : null; }
  309. set {
  310. kind_ = value;
  311. kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.TensorSpecValue;
  312. }
  313. }
  314. /// <summary>Field number for the "type_spec_value" field.</summary>
  315. public const int TypeSpecValueFieldNumber = 34;
  316. /// <summary>
  317. /// Represents a value for tf.TypeSpec.
  318. /// </summary>
  319. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  320. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  321. public global::Tensorflow.TypeSpecProto TypeSpecValue {
  322. get { return kindCase_ == KindOneofCase.TypeSpecValue ? (global::Tensorflow.TypeSpecProto) kind_ : null; }
  323. set {
  324. kind_ = value;
  325. kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.TypeSpecValue;
  326. }
  327. }
  328. /// <summary>Field number for the "bounded_tensor_spec_value" field.</summary>
  329. public const int BoundedTensorSpecValueFieldNumber = 35;
  330. /// <summary>
  331. /// Represents a value for tf.BoundedTensorSpec.
  332. /// </summary>
  333. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  334. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  335. public global::Tensorflow.BoundedTensorSpecProto BoundedTensorSpecValue {
  336. get { return kindCase_ == KindOneofCase.BoundedTensorSpecValue ? (global::Tensorflow.BoundedTensorSpecProto) kind_ : null; }
  337. set {
  338. kind_ = value;
  339. kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.BoundedTensorSpecValue;
  340. }
  341. }
  342. /// <summary>Field number for the "list_value" field.</summary>
  343. public const int ListValueFieldNumber = 51;
  344. /// <summary>
  345. /// Represents a list of `Value`.
  346. /// </summary>
  347. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  348. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  349. public global::Tensorflow.ListValue ListValue {
  350. get { return kindCase_ == KindOneofCase.ListValue ? (global::Tensorflow.ListValue) kind_ : null; }
  351. set {
  352. kind_ = value;
  353. kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.ListValue;
  354. }
  355. }
  356. /// <summary>Field number for the "tuple_value" field.</summary>
  357. public const int TupleValueFieldNumber = 52;
  358. /// <summary>
  359. /// Represents a tuple of `Value`.
  360. /// </summary>
  361. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  362. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  363. public global::Tensorflow.TupleValue TupleValue {
  364. get { return kindCase_ == KindOneofCase.TupleValue ? (global::Tensorflow.TupleValue) kind_ : null; }
  365. set {
  366. kind_ = value;
  367. kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.TupleValue;
  368. }
  369. }
  370. /// <summary>Field number for the "dict_value" field.</summary>
  371. public const int DictValueFieldNumber = 53;
  372. /// <summary>
  373. /// Represents a dict `Value`.
  374. /// </summary>
  375. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  376. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  377. public global::Tensorflow.DictValue DictValue {
  378. get { return kindCase_ == KindOneofCase.DictValue ? (global::Tensorflow.DictValue) kind_ : null; }
  379. set {
  380. kind_ = value;
  381. kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.DictValue;
  382. }
  383. }
  384. /// <summary>Field number for the "named_tuple_value" field.</summary>
  385. public const int NamedTupleValueFieldNumber = 54;
  386. /// <summary>
  387. /// Represents Python's namedtuple.
  388. /// </summary>
  389. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  390. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  391. public global::Tensorflow.NamedTupleValue NamedTupleValue {
  392. get { return kindCase_ == KindOneofCase.NamedTupleValue ? (global::Tensorflow.NamedTupleValue) kind_ : null; }
  393. set {
  394. kind_ = value;
  395. kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.NamedTupleValue;
  396. }
  397. }
  398. private object kind_;
  399. /// <summary>Enum of possible cases for the "kind" oneof.</summary>
  400. public enum KindOneofCase {
  401. None = 0,
  402. NoneValue = 1,
  403. Float64Value = 11,
  404. Int64Value = 12,
  405. StringValue = 13,
  406. BoolValue = 14,
  407. TensorShapeValue = 31,
  408. TensorDtypeValue = 32,
  409. TensorSpecValue = 33,
  410. TypeSpecValue = 34,
  411. BoundedTensorSpecValue = 35,
  412. ListValue = 51,
  413. TupleValue = 52,
  414. DictValue = 53,
  415. NamedTupleValue = 54,
  416. }
  417. private KindOneofCase kindCase_ = KindOneofCase.None;
  418. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  419. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  420. public KindOneofCase KindCase {
  421. get { return kindCase_; }
  422. }
  423. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  424. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  425. public void ClearKind() {
  426. kindCase_ = KindOneofCase.None;
  427. kind_ = null;
  428. }
  429. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  430. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  431. public override bool Equals(object other) {
  432. return Equals(other as StructuredValue);
  433. }
  434. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  435. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  436. public bool Equals(StructuredValue other) {
  437. if (ReferenceEquals(other, null)) {
  438. return false;
  439. }
  440. if (ReferenceEquals(other, this)) {
  441. return true;
  442. }
  443. if (!object.Equals(NoneValue, other.NoneValue)) return false;
  444. if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(Float64Value, other.Float64Value)) return false;
  445. if (Int64Value != other.Int64Value) return false;
  446. if (StringValue != other.StringValue) return false;
  447. if (BoolValue != other.BoolValue) return false;
  448. if (!object.Equals(TensorShapeValue, other.TensorShapeValue)) return false;
  449. if (TensorDtypeValue != other.TensorDtypeValue) return false;
  450. if (!object.Equals(TensorSpecValue, other.TensorSpecValue)) return false;
  451. if (!object.Equals(TypeSpecValue, other.TypeSpecValue)) return false;
  452. if (!object.Equals(BoundedTensorSpecValue, other.BoundedTensorSpecValue)) return false;
  453. if (!object.Equals(ListValue, other.ListValue)) return false;
  454. if (!object.Equals(TupleValue, other.TupleValue)) return false;
  455. if (!object.Equals(DictValue, other.DictValue)) return false;
  456. if (!object.Equals(NamedTupleValue, other.NamedTupleValue)) return false;
  457. if (KindCase != other.KindCase) return false;
  458. return Equals(_unknownFields, other._unknownFields);
  459. }
  460. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  461. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  462. public override int GetHashCode() {
  463. int hash = 1;
  464. if (kindCase_ == KindOneofCase.NoneValue) hash ^= NoneValue.GetHashCode();
  465. if (kindCase_ == KindOneofCase.Float64Value) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Float64Value);
  466. if (kindCase_ == KindOneofCase.Int64Value) hash ^= Int64Value.GetHashCode();
  467. if (kindCase_ == KindOneofCase.StringValue) hash ^= StringValue.GetHashCode();
  468. if (kindCase_ == KindOneofCase.BoolValue) hash ^= BoolValue.GetHashCode();
  469. if (kindCase_ == KindOneofCase.TensorShapeValue) hash ^= TensorShapeValue.GetHashCode();
  470. if (kindCase_ == KindOneofCase.TensorDtypeValue) hash ^= TensorDtypeValue.GetHashCode();
  471. if (kindCase_ == KindOneofCase.TensorSpecValue) hash ^= TensorSpecValue.GetHashCode();
  472. if (kindCase_ == KindOneofCase.TypeSpecValue) hash ^= TypeSpecValue.GetHashCode();
  473. if (kindCase_ == KindOneofCase.BoundedTensorSpecValue) hash ^= BoundedTensorSpecValue.GetHashCode();
  474. if (kindCase_ == KindOneofCase.ListValue) hash ^= ListValue.GetHashCode();
  475. if (kindCase_ == KindOneofCase.TupleValue) hash ^= TupleValue.GetHashCode();
  476. if (kindCase_ == KindOneofCase.DictValue) hash ^= DictValue.GetHashCode();
  477. if (kindCase_ == KindOneofCase.NamedTupleValue) hash ^= NamedTupleValue.GetHashCode();
  478. hash ^= (int) kindCase_;
  479. if (_unknownFields != null) {
  480. hash ^= _unknownFields.GetHashCode();
  481. }
  482. return hash;
  483. }
  484. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  485. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  486. public override string ToString() {
  487. return pb::JsonFormatter.ToDiagnosticString(this);
  488. }
  489. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  490. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  491. public void WriteTo(pb::CodedOutputStream output) {
  492. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  493. output.WriteRawMessage(this);
  494. #else
  495. if (kindCase_ == KindOneofCase.NoneValue) {
  496. output.WriteRawTag(10);
  497. output.WriteMessage(NoneValue);
  498. }
  499. if (kindCase_ == KindOneofCase.Float64Value) {
  500. output.WriteRawTag(89);
  501. output.WriteDouble(Float64Value);
  502. }
  503. if (kindCase_ == KindOneofCase.Int64Value) {
  504. output.WriteRawTag(96);
  505. output.WriteSInt64(Int64Value);
  506. }
  507. if (kindCase_ == KindOneofCase.StringValue) {
  508. output.WriteRawTag(106);
  509. output.WriteString(StringValue);
  510. }
  511. if (kindCase_ == KindOneofCase.BoolValue) {
  512. output.WriteRawTag(112);
  513. output.WriteBool(BoolValue);
  514. }
  515. if (kindCase_ == KindOneofCase.TensorShapeValue) {
  516. output.WriteRawTag(250, 1);
  517. output.WriteMessage(TensorShapeValue);
  518. }
  519. if (kindCase_ == KindOneofCase.TensorDtypeValue) {
  520. output.WriteRawTag(128, 2);
  521. output.WriteEnum((int) TensorDtypeValue);
  522. }
  523. if (kindCase_ == KindOneofCase.TensorSpecValue) {
  524. output.WriteRawTag(138, 2);
  525. output.WriteMessage(TensorSpecValue);
  526. }
  527. if (kindCase_ == KindOneofCase.TypeSpecValue) {
  528. output.WriteRawTag(146, 2);
  529. output.WriteMessage(TypeSpecValue);
  530. }
  531. if (kindCase_ == KindOneofCase.BoundedTensorSpecValue) {
  532. output.WriteRawTag(154, 2);
  533. output.WriteMessage(BoundedTensorSpecValue);
  534. }
  535. if (kindCase_ == KindOneofCase.ListValue) {
  536. output.WriteRawTag(154, 3);
  537. output.WriteMessage(ListValue);
  538. }
  539. if (kindCase_ == KindOneofCase.TupleValue) {
  540. output.WriteRawTag(162, 3);
  541. output.WriteMessage(TupleValue);
  542. }
  543. if (kindCase_ == KindOneofCase.DictValue) {
  544. output.WriteRawTag(170, 3);
  545. output.WriteMessage(DictValue);
  546. }
  547. if (kindCase_ == KindOneofCase.NamedTupleValue) {
  548. output.WriteRawTag(178, 3);
  549. output.WriteMessage(NamedTupleValue);
  550. }
  551. if (_unknownFields != null) {
  552. _unknownFields.WriteTo(output);
  553. }
  554. #endif
  555. }
  556. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  557. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  558. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  559. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  560. if (kindCase_ == KindOneofCase.NoneValue) {
  561. output.WriteRawTag(10);
  562. output.WriteMessage(NoneValue);
  563. }
  564. if (kindCase_ == KindOneofCase.Float64Value) {
  565. output.WriteRawTag(89);
  566. output.WriteDouble(Float64Value);
  567. }
  568. if (kindCase_ == KindOneofCase.Int64Value) {
  569. output.WriteRawTag(96);
  570. output.WriteSInt64(Int64Value);
  571. }
  572. if (kindCase_ == KindOneofCase.StringValue) {
  573. output.WriteRawTag(106);
  574. output.WriteString(StringValue);
  575. }
  576. if (kindCase_ == KindOneofCase.BoolValue) {
  577. output.WriteRawTag(112);
  578. output.WriteBool(BoolValue);
  579. }
  580. if (kindCase_ == KindOneofCase.TensorShapeValue) {
  581. output.WriteRawTag(250, 1);
  582. output.WriteMessage(TensorShapeValue);
  583. }
  584. if (kindCase_ == KindOneofCase.TensorDtypeValue) {
  585. output.WriteRawTag(128, 2);
  586. output.WriteEnum((int) TensorDtypeValue);
  587. }
  588. if (kindCase_ == KindOneofCase.TensorSpecValue) {
  589. output.WriteRawTag(138, 2);
  590. output.WriteMessage(TensorSpecValue);
  591. }
  592. if (kindCase_ == KindOneofCase.TypeSpecValue) {
  593. output.WriteRawTag(146, 2);
  594. output.WriteMessage(TypeSpecValue);
  595. }
  596. if (kindCase_ == KindOneofCase.BoundedTensorSpecValue) {
  597. output.WriteRawTag(154, 2);
  598. output.WriteMessage(BoundedTensorSpecValue);
  599. }
  600. if (kindCase_ == KindOneofCase.ListValue) {
  601. output.WriteRawTag(154, 3);
  602. output.WriteMessage(ListValue);
  603. }
  604. if (kindCase_ == KindOneofCase.TupleValue) {
  605. output.WriteRawTag(162, 3);
  606. output.WriteMessage(TupleValue);
  607. }
  608. if (kindCase_ == KindOneofCase.DictValue) {
  609. output.WriteRawTag(170, 3);
  610. output.WriteMessage(DictValue);
  611. }
  612. if (kindCase_ == KindOneofCase.NamedTupleValue) {
  613. output.WriteRawTag(178, 3);
  614. output.WriteMessage(NamedTupleValue);
  615. }
  616. if (_unknownFields != null) {
  617. _unknownFields.WriteTo(ref output);
  618. }
  619. }
  620. #endif
  621. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  622. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  623. public int CalculateSize() {
  624. int size = 0;
  625. if (kindCase_ == KindOneofCase.NoneValue) {
  626. size += 1 + pb::CodedOutputStream.ComputeMessageSize(NoneValue);
  627. }
  628. if (kindCase_ == KindOneofCase.Float64Value) {
  629. size += 1 + 8;
  630. }
  631. if (kindCase_ == KindOneofCase.Int64Value) {
  632. size += 1 + pb::CodedOutputStream.ComputeSInt64Size(Int64Value);
  633. }
  634. if (kindCase_ == KindOneofCase.StringValue) {
  635. size += 1 + pb::CodedOutputStream.ComputeStringSize(StringValue);
  636. }
  637. if (kindCase_ == KindOneofCase.BoolValue) {
  638. size += 1 + 1;
  639. }
  640. if (kindCase_ == KindOneofCase.TensorShapeValue) {
  641. size += 2 + pb::CodedOutputStream.ComputeMessageSize(TensorShapeValue);
  642. }
  643. if (kindCase_ == KindOneofCase.TensorDtypeValue) {
  644. size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) TensorDtypeValue);
  645. }
  646. if (kindCase_ == KindOneofCase.TensorSpecValue) {
  647. size += 2 + pb::CodedOutputStream.ComputeMessageSize(TensorSpecValue);
  648. }
  649. if (kindCase_ == KindOneofCase.TypeSpecValue) {
  650. size += 2 + pb::CodedOutputStream.ComputeMessageSize(TypeSpecValue);
  651. }
  652. if (kindCase_ == KindOneofCase.BoundedTensorSpecValue) {
  653. size += 2 + pb::CodedOutputStream.ComputeMessageSize(BoundedTensorSpecValue);
  654. }
  655. if (kindCase_ == KindOneofCase.ListValue) {
  656. size += 2 + pb::CodedOutputStream.ComputeMessageSize(ListValue);
  657. }
  658. if (kindCase_ == KindOneofCase.TupleValue) {
  659. size += 2 + pb::CodedOutputStream.ComputeMessageSize(TupleValue);
  660. }
  661. if (kindCase_ == KindOneofCase.DictValue) {
  662. size += 2 + pb::CodedOutputStream.ComputeMessageSize(DictValue);
  663. }
  664. if (kindCase_ == KindOneofCase.NamedTupleValue) {
  665. size += 2 + pb::CodedOutputStream.ComputeMessageSize(NamedTupleValue);
  666. }
  667. if (_unknownFields != null) {
  668. size += _unknownFields.CalculateSize();
  669. }
  670. return size;
  671. }
  672. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  673. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  674. public void MergeFrom(StructuredValue other) {
  675. if (other == null) {
  676. return;
  677. }
  678. switch (other.KindCase) {
  679. case KindOneofCase.NoneValue:
  680. if (NoneValue == null) {
  681. NoneValue = new global::Tensorflow.NoneValue();
  682. }
  683. NoneValue.MergeFrom(other.NoneValue);
  684. break;
  685. case KindOneofCase.Float64Value:
  686. Float64Value = other.Float64Value;
  687. break;
  688. case KindOneofCase.Int64Value:
  689. Int64Value = other.Int64Value;
  690. break;
  691. case KindOneofCase.StringValue:
  692. StringValue = other.StringValue;
  693. break;
  694. case KindOneofCase.BoolValue:
  695. BoolValue = other.BoolValue;
  696. break;
  697. case KindOneofCase.TensorShapeValue:
  698. if (TensorShapeValue == null) {
  699. TensorShapeValue = new global::Tensorflow.TensorShapeProto();
  700. }
  701. TensorShapeValue.MergeFrom(other.TensorShapeValue);
  702. break;
  703. case KindOneofCase.TensorDtypeValue:
  704. TensorDtypeValue = other.TensorDtypeValue;
  705. break;
  706. case KindOneofCase.TensorSpecValue:
  707. if (TensorSpecValue == null) {
  708. TensorSpecValue = new global::Tensorflow.TensorSpecProto();
  709. }
  710. TensorSpecValue.MergeFrom(other.TensorSpecValue);
  711. break;
  712. case KindOneofCase.TypeSpecValue:
  713. if (TypeSpecValue == null) {
  714. TypeSpecValue = new global::Tensorflow.TypeSpecProto();
  715. }
  716. TypeSpecValue.MergeFrom(other.TypeSpecValue);
  717. break;
  718. case KindOneofCase.BoundedTensorSpecValue:
  719. if (BoundedTensorSpecValue == null) {
  720. BoundedTensorSpecValue = new global::Tensorflow.BoundedTensorSpecProto();
  721. }
  722. BoundedTensorSpecValue.MergeFrom(other.BoundedTensorSpecValue);
  723. break;
  724. case KindOneofCase.ListValue:
  725. if (ListValue == null) {
  726. ListValue = new global::Tensorflow.ListValue();
  727. }
  728. ListValue.MergeFrom(other.ListValue);
  729. break;
  730. case KindOneofCase.TupleValue:
  731. if (TupleValue == null) {
  732. TupleValue = new global::Tensorflow.TupleValue();
  733. }
  734. TupleValue.MergeFrom(other.TupleValue);
  735. break;
  736. case KindOneofCase.DictValue:
  737. if (DictValue == null) {
  738. DictValue = new global::Tensorflow.DictValue();
  739. }
  740. DictValue.MergeFrom(other.DictValue);
  741. break;
  742. case KindOneofCase.NamedTupleValue:
  743. if (NamedTupleValue == null) {
  744. NamedTupleValue = new global::Tensorflow.NamedTupleValue();
  745. }
  746. NamedTupleValue.MergeFrom(other.NamedTupleValue);
  747. break;
  748. }
  749. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  750. }
  751. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  752. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  753. public void MergeFrom(pb::CodedInputStream input) {
  754. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  755. input.ReadRawMessage(this);
  756. #else
  757. uint tag;
  758. while ((tag = input.ReadTag()) != 0) {
  759. switch(tag) {
  760. default:
  761. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  762. break;
  763. case 10: {
  764. global::Tensorflow.NoneValue subBuilder = new global::Tensorflow.NoneValue();
  765. if (kindCase_ == KindOneofCase.NoneValue) {
  766. subBuilder.MergeFrom(NoneValue);
  767. }
  768. input.ReadMessage(subBuilder);
  769. NoneValue = subBuilder;
  770. break;
  771. }
  772. case 89: {
  773. Float64Value = input.ReadDouble();
  774. break;
  775. }
  776. case 96: {
  777. Int64Value = input.ReadSInt64();
  778. break;
  779. }
  780. case 106: {
  781. StringValue = input.ReadString();
  782. break;
  783. }
  784. case 112: {
  785. BoolValue = input.ReadBool();
  786. break;
  787. }
  788. case 250: {
  789. global::Tensorflow.TensorShapeProto subBuilder = new global::Tensorflow.TensorShapeProto();
  790. if (kindCase_ == KindOneofCase.TensorShapeValue) {
  791. subBuilder.MergeFrom(TensorShapeValue);
  792. }
  793. input.ReadMessage(subBuilder);
  794. TensorShapeValue = subBuilder;
  795. break;
  796. }
  797. case 256: {
  798. kind_ = input.ReadEnum();
  799. kindCase_ = KindOneofCase.TensorDtypeValue;
  800. break;
  801. }
  802. case 266: {
  803. global::Tensorflow.TensorSpecProto subBuilder = new global::Tensorflow.TensorSpecProto();
  804. if (kindCase_ == KindOneofCase.TensorSpecValue) {
  805. subBuilder.MergeFrom(TensorSpecValue);
  806. }
  807. input.ReadMessage(subBuilder);
  808. TensorSpecValue = subBuilder;
  809. break;
  810. }
  811. case 274: {
  812. global::Tensorflow.TypeSpecProto subBuilder = new global::Tensorflow.TypeSpecProto();
  813. if (kindCase_ == KindOneofCase.TypeSpecValue) {
  814. subBuilder.MergeFrom(TypeSpecValue);
  815. }
  816. input.ReadMessage(subBuilder);
  817. TypeSpecValue = subBuilder;
  818. break;
  819. }
  820. case 282: {
  821. global::Tensorflow.BoundedTensorSpecProto subBuilder = new global::Tensorflow.BoundedTensorSpecProto();
  822. if (kindCase_ == KindOneofCase.BoundedTensorSpecValue) {
  823. subBuilder.MergeFrom(BoundedTensorSpecValue);
  824. }
  825. input.ReadMessage(subBuilder);
  826. BoundedTensorSpecValue = subBuilder;
  827. break;
  828. }
  829. case 410: {
  830. global::Tensorflow.ListValue subBuilder = new global::Tensorflow.ListValue();
  831. if (kindCase_ == KindOneofCase.ListValue) {
  832. subBuilder.MergeFrom(ListValue);
  833. }
  834. input.ReadMessage(subBuilder);
  835. ListValue = subBuilder;
  836. break;
  837. }
  838. case 418: {
  839. global::Tensorflow.TupleValue subBuilder = new global::Tensorflow.TupleValue();
  840. if (kindCase_ == KindOneofCase.TupleValue) {
  841. subBuilder.MergeFrom(TupleValue);
  842. }
  843. input.ReadMessage(subBuilder);
  844. TupleValue = subBuilder;
  845. break;
  846. }
  847. case 426: {
  848. global::Tensorflow.DictValue subBuilder = new global::Tensorflow.DictValue();
  849. if (kindCase_ == KindOneofCase.DictValue) {
  850. subBuilder.MergeFrom(DictValue);
  851. }
  852. input.ReadMessage(subBuilder);
  853. DictValue = subBuilder;
  854. break;
  855. }
  856. case 434: {
  857. global::Tensorflow.NamedTupleValue subBuilder = new global::Tensorflow.NamedTupleValue();
  858. if (kindCase_ == KindOneofCase.NamedTupleValue) {
  859. subBuilder.MergeFrom(NamedTupleValue);
  860. }
  861. input.ReadMessage(subBuilder);
  862. NamedTupleValue = subBuilder;
  863. break;
  864. }
  865. }
  866. }
  867. #endif
  868. }
  869. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  870. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  871. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  872. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  873. uint tag;
  874. while ((tag = input.ReadTag()) != 0) {
  875. switch(tag) {
  876. default:
  877. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  878. break;
  879. case 10: {
  880. global::Tensorflow.NoneValue subBuilder = new global::Tensorflow.NoneValue();
  881. if (kindCase_ == KindOneofCase.NoneValue) {
  882. subBuilder.MergeFrom(NoneValue);
  883. }
  884. input.ReadMessage(subBuilder);
  885. NoneValue = subBuilder;
  886. break;
  887. }
  888. case 89: {
  889. Float64Value = input.ReadDouble();
  890. break;
  891. }
  892. case 96: {
  893. Int64Value = input.ReadSInt64();
  894. break;
  895. }
  896. case 106: {
  897. StringValue = input.ReadString();
  898. break;
  899. }
  900. case 112: {
  901. BoolValue = input.ReadBool();
  902. break;
  903. }
  904. case 250: {
  905. global::Tensorflow.TensorShapeProto subBuilder = new global::Tensorflow.TensorShapeProto();
  906. if (kindCase_ == KindOneofCase.TensorShapeValue) {
  907. subBuilder.MergeFrom(TensorShapeValue);
  908. }
  909. input.ReadMessage(subBuilder);
  910. TensorShapeValue = subBuilder;
  911. break;
  912. }
  913. case 256: {
  914. kind_ = input.ReadEnum();
  915. kindCase_ = KindOneofCase.TensorDtypeValue;
  916. break;
  917. }
  918. case 266: {
  919. global::Tensorflow.TensorSpecProto subBuilder = new global::Tensorflow.TensorSpecProto();
  920. if (kindCase_ == KindOneofCase.TensorSpecValue) {
  921. subBuilder.MergeFrom(TensorSpecValue);
  922. }
  923. input.ReadMessage(subBuilder);
  924. TensorSpecValue = subBuilder;
  925. break;
  926. }
  927. case 274: {
  928. global::Tensorflow.TypeSpecProto subBuilder = new global::Tensorflow.TypeSpecProto();
  929. if (kindCase_ == KindOneofCase.TypeSpecValue) {
  930. subBuilder.MergeFrom(TypeSpecValue);
  931. }
  932. input.ReadMessage(subBuilder);
  933. TypeSpecValue = subBuilder;
  934. break;
  935. }
  936. case 282: {
  937. global::Tensorflow.BoundedTensorSpecProto subBuilder = new global::Tensorflow.BoundedTensorSpecProto();
  938. if (kindCase_ == KindOneofCase.BoundedTensorSpecValue) {
  939. subBuilder.MergeFrom(BoundedTensorSpecValue);
  940. }
  941. input.ReadMessage(subBuilder);
  942. BoundedTensorSpecValue = subBuilder;
  943. break;
  944. }
  945. case 410: {
  946. global::Tensorflow.ListValue subBuilder = new global::Tensorflow.ListValue();
  947. if (kindCase_ == KindOneofCase.ListValue) {
  948. subBuilder.MergeFrom(ListValue);
  949. }
  950. input.ReadMessage(subBuilder);
  951. ListValue = subBuilder;
  952. break;
  953. }
  954. case 418: {
  955. global::Tensorflow.TupleValue subBuilder = new global::Tensorflow.TupleValue();
  956. if (kindCase_ == KindOneofCase.TupleValue) {
  957. subBuilder.MergeFrom(TupleValue);
  958. }
  959. input.ReadMessage(subBuilder);
  960. TupleValue = subBuilder;
  961. break;
  962. }
  963. case 426: {
  964. global::Tensorflow.DictValue subBuilder = new global::Tensorflow.DictValue();
  965. if (kindCase_ == KindOneofCase.DictValue) {
  966. subBuilder.MergeFrom(DictValue);
  967. }
  968. input.ReadMessage(subBuilder);
  969. DictValue = subBuilder;
  970. break;
  971. }
  972. case 434: {
  973. global::Tensorflow.NamedTupleValue subBuilder = new global::Tensorflow.NamedTupleValue();
  974. if (kindCase_ == KindOneofCase.NamedTupleValue) {
  975. subBuilder.MergeFrom(NamedTupleValue);
  976. }
  977. input.ReadMessage(subBuilder);
  978. NamedTupleValue = subBuilder;
  979. break;
  980. }
  981. }
  982. }
  983. }
  984. #endif
  985. }
  986. /// <summary>
  987. /// Represents None.
  988. /// </summary>
  989. public sealed partial class NoneValue : pb::IMessage<NoneValue>
  990. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  991. , pb::IBufferMessage
  992. #endif
  993. {
  994. private static readonly pb::MessageParser<NoneValue> _parser = new pb::MessageParser<NoneValue>(() => new NoneValue());
  995. private pb::UnknownFieldSet _unknownFields;
  996. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  997. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  998. public static pb::MessageParser<NoneValue> Parser { get { return _parser; } }
  999. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1000. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1001. public static pbr::MessageDescriptor Descriptor {
  1002. get { return global::Tensorflow.StructReflection.Descriptor.MessageTypes[1]; }
  1003. }
  1004. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1005. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1006. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1007. get { return Descriptor; }
  1008. }
  1009. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1010. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1011. public NoneValue() {
  1012. OnConstruction();
  1013. }
  1014. partial void OnConstruction();
  1015. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1016. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1017. public NoneValue(NoneValue other) : this() {
  1018. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1019. }
  1020. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1021. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1022. public NoneValue Clone() {
  1023. return new NoneValue(this);
  1024. }
  1025. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1026. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1027. public override bool Equals(object other) {
  1028. return Equals(other as NoneValue);
  1029. }
  1030. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1031. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1032. public bool Equals(NoneValue other) {
  1033. if (ReferenceEquals(other, null)) {
  1034. return false;
  1035. }
  1036. if (ReferenceEquals(other, this)) {
  1037. return true;
  1038. }
  1039. return Equals(_unknownFields, other._unknownFields);
  1040. }
  1041. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1042. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1043. public override int GetHashCode() {
  1044. int hash = 1;
  1045. if (_unknownFields != null) {
  1046. hash ^= _unknownFields.GetHashCode();
  1047. }
  1048. return hash;
  1049. }
  1050. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1051. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1052. public override string ToString() {
  1053. return pb::JsonFormatter.ToDiagnosticString(this);
  1054. }
  1055. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1056. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1057. public void WriteTo(pb::CodedOutputStream output) {
  1058. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1059. output.WriteRawMessage(this);
  1060. #else
  1061. if (_unknownFields != null) {
  1062. _unknownFields.WriteTo(output);
  1063. }
  1064. #endif
  1065. }
  1066. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1067. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1068. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1069. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  1070. if (_unknownFields != null) {
  1071. _unknownFields.WriteTo(ref output);
  1072. }
  1073. }
  1074. #endif
  1075. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1076. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1077. public int CalculateSize() {
  1078. int size = 0;
  1079. if (_unknownFields != null) {
  1080. size += _unknownFields.CalculateSize();
  1081. }
  1082. return size;
  1083. }
  1084. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1085. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1086. public void MergeFrom(NoneValue other) {
  1087. if (other == null) {
  1088. return;
  1089. }
  1090. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1091. }
  1092. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1093. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1094. public void MergeFrom(pb::CodedInputStream input) {
  1095. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1096. input.ReadRawMessage(this);
  1097. #else
  1098. uint tag;
  1099. while ((tag = input.ReadTag()) != 0) {
  1100. switch(tag) {
  1101. default:
  1102. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1103. break;
  1104. }
  1105. }
  1106. #endif
  1107. }
  1108. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1109. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1110. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1111. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  1112. uint tag;
  1113. while ((tag = input.ReadTag()) != 0) {
  1114. switch(tag) {
  1115. default:
  1116. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  1117. break;
  1118. }
  1119. }
  1120. }
  1121. #endif
  1122. }
  1123. /// <summary>
  1124. /// Represents a Python list.
  1125. /// </summary>
  1126. public sealed partial class ListValue : pb::IMessage<ListValue>
  1127. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1128. , pb::IBufferMessage
  1129. #endif
  1130. {
  1131. private static readonly pb::MessageParser<ListValue> _parser = new pb::MessageParser<ListValue>(() => new ListValue());
  1132. private pb::UnknownFieldSet _unknownFields;
  1133. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1134. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1135. public static pb::MessageParser<ListValue> Parser { get { return _parser; } }
  1136. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1137. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1138. public static pbr::MessageDescriptor Descriptor {
  1139. get { return global::Tensorflow.StructReflection.Descriptor.MessageTypes[2]; }
  1140. }
  1141. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1142. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1143. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1144. get { return Descriptor; }
  1145. }
  1146. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1147. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1148. public ListValue() {
  1149. OnConstruction();
  1150. }
  1151. partial void OnConstruction();
  1152. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1153. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1154. public ListValue(ListValue other) : this() {
  1155. values_ = other.values_.Clone();
  1156. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1157. }
  1158. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1159. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1160. public ListValue Clone() {
  1161. return new ListValue(this);
  1162. }
  1163. /// <summary>Field number for the "values" field.</summary>
  1164. public const int ValuesFieldNumber = 1;
  1165. private static readonly pb::FieldCodec<global::Tensorflow.StructuredValue> _repeated_values_codec
  1166. = pb::FieldCodec.ForMessage(10, global::Tensorflow.StructuredValue.Parser);
  1167. private readonly pbc::RepeatedField<global::Tensorflow.StructuredValue> values_ = new pbc::RepeatedField<global::Tensorflow.StructuredValue>();
  1168. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1169. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1170. public pbc::RepeatedField<global::Tensorflow.StructuredValue> Values {
  1171. get { return values_; }
  1172. }
  1173. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1174. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1175. public override bool Equals(object other) {
  1176. return Equals(other as ListValue);
  1177. }
  1178. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1179. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1180. public bool Equals(ListValue other) {
  1181. if (ReferenceEquals(other, null)) {
  1182. return false;
  1183. }
  1184. if (ReferenceEquals(other, this)) {
  1185. return true;
  1186. }
  1187. if(!values_.Equals(other.values_)) return false;
  1188. return Equals(_unknownFields, other._unknownFields);
  1189. }
  1190. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1191. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1192. public override int GetHashCode() {
  1193. int hash = 1;
  1194. hash ^= values_.GetHashCode();
  1195. if (_unknownFields != null) {
  1196. hash ^= _unknownFields.GetHashCode();
  1197. }
  1198. return hash;
  1199. }
  1200. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1201. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1202. public override string ToString() {
  1203. return pb::JsonFormatter.ToDiagnosticString(this);
  1204. }
  1205. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1206. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1207. public void WriteTo(pb::CodedOutputStream output) {
  1208. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1209. output.WriteRawMessage(this);
  1210. #else
  1211. values_.WriteTo(output, _repeated_values_codec);
  1212. if (_unknownFields != null) {
  1213. _unknownFields.WriteTo(output);
  1214. }
  1215. #endif
  1216. }
  1217. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1218. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1219. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1220. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  1221. values_.WriteTo(ref output, _repeated_values_codec);
  1222. if (_unknownFields != null) {
  1223. _unknownFields.WriteTo(ref output);
  1224. }
  1225. }
  1226. #endif
  1227. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1228. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1229. public int CalculateSize() {
  1230. int size = 0;
  1231. size += values_.CalculateSize(_repeated_values_codec);
  1232. if (_unknownFields != null) {
  1233. size += _unknownFields.CalculateSize();
  1234. }
  1235. return size;
  1236. }
  1237. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1238. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1239. public void MergeFrom(ListValue other) {
  1240. if (other == null) {
  1241. return;
  1242. }
  1243. values_.Add(other.values_);
  1244. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1245. }
  1246. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1247. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1248. public void MergeFrom(pb::CodedInputStream input) {
  1249. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1250. input.ReadRawMessage(this);
  1251. #else
  1252. uint tag;
  1253. while ((tag = input.ReadTag()) != 0) {
  1254. switch(tag) {
  1255. default:
  1256. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1257. break;
  1258. case 10: {
  1259. values_.AddEntriesFrom(input, _repeated_values_codec);
  1260. break;
  1261. }
  1262. }
  1263. }
  1264. #endif
  1265. }
  1266. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1267. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1268. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1269. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  1270. uint tag;
  1271. while ((tag = input.ReadTag()) != 0) {
  1272. switch(tag) {
  1273. default:
  1274. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  1275. break;
  1276. case 10: {
  1277. values_.AddEntriesFrom(ref input, _repeated_values_codec);
  1278. break;
  1279. }
  1280. }
  1281. }
  1282. }
  1283. #endif
  1284. }
  1285. /// <summary>
  1286. /// Represents a Python tuple.
  1287. /// </summary>
  1288. public sealed partial class TupleValue : pb::IMessage<TupleValue>
  1289. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1290. , pb::IBufferMessage
  1291. #endif
  1292. {
  1293. private static readonly pb::MessageParser<TupleValue> _parser = new pb::MessageParser<TupleValue>(() => new TupleValue());
  1294. private pb::UnknownFieldSet _unknownFields;
  1295. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1296. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1297. public static pb::MessageParser<TupleValue> Parser { get { return _parser; } }
  1298. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1299. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1300. public static pbr::MessageDescriptor Descriptor {
  1301. get { return global::Tensorflow.StructReflection.Descriptor.MessageTypes[3]; }
  1302. }
  1303. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1304. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1305. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1306. get { return Descriptor; }
  1307. }
  1308. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1309. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1310. public TupleValue() {
  1311. OnConstruction();
  1312. }
  1313. partial void OnConstruction();
  1314. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1315. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1316. public TupleValue(TupleValue other) : this() {
  1317. values_ = other.values_.Clone();
  1318. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1319. }
  1320. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1321. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1322. public TupleValue Clone() {
  1323. return new TupleValue(this);
  1324. }
  1325. /// <summary>Field number for the "values" field.</summary>
  1326. public const int ValuesFieldNumber = 1;
  1327. private static readonly pb::FieldCodec<global::Tensorflow.StructuredValue> _repeated_values_codec
  1328. = pb::FieldCodec.ForMessage(10, global::Tensorflow.StructuredValue.Parser);
  1329. private readonly pbc::RepeatedField<global::Tensorflow.StructuredValue> values_ = new pbc::RepeatedField<global::Tensorflow.StructuredValue>();
  1330. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1331. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1332. public pbc::RepeatedField<global::Tensorflow.StructuredValue> Values {
  1333. get { return values_; }
  1334. }
  1335. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1336. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1337. public override bool Equals(object other) {
  1338. return Equals(other as TupleValue);
  1339. }
  1340. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1341. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1342. public bool Equals(TupleValue other) {
  1343. if (ReferenceEquals(other, null)) {
  1344. return false;
  1345. }
  1346. if (ReferenceEquals(other, this)) {
  1347. return true;
  1348. }
  1349. if(!values_.Equals(other.values_)) return false;
  1350. return Equals(_unknownFields, other._unknownFields);
  1351. }
  1352. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1353. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1354. public override int GetHashCode() {
  1355. int hash = 1;
  1356. hash ^= values_.GetHashCode();
  1357. if (_unknownFields != null) {
  1358. hash ^= _unknownFields.GetHashCode();
  1359. }
  1360. return hash;
  1361. }
  1362. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1363. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1364. public override string ToString() {
  1365. return pb::JsonFormatter.ToDiagnosticString(this);
  1366. }
  1367. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1368. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1369. public void WriteTo(pb::CodedOutputStream output) {
  1370. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1371. output.WriteRawMessage(this);
  1372. #else
  1373. values_.WriteTo(output, _repeated_values_codec);
  1374. if (_unknownFields != null) {
  1375. _unknownFields.WriteTo(output);
  1376. }
  1377. #endif
  1378. }
  1379. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1380. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1381. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1382. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  1383. values_.WriteTo(ref output, _repeated_values_codec);
  1384. if (_unknownFields != null) {
  1385. _unknownFields.WriteTo(ref output);
  1386. }
  1387. }
  1388. #endif
  1389. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1390. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1391. public int CalculateSize() {
  1392. int size = 0;
  1393. size += values_.CalculateSize(_repeated_values_codec);
  1394. if (_unknownFields != null) {
  1395. size += _unknownFields.CalculateSize();
  1396. }
  1397. return size;
  1398. }
  1399. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1400. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1401. public void MergeFrom(TupleValue other) {
  1402. if (other == null) {
  1403. return;
  1404. }
  1405. values_.Add(other.values_);
  1406. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1407. }
  1408. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1409. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1410. public void MergeFrom(pb::CodedInputStream input) {
  1411. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1412. input.ReadRawMessage(this);
  1413. #else
  1414. uint tag;
  1415. while ((tag = input.ReadTag()) != 0) {
  1416. switch(tag) {
  1417. default:
  1418. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1419. break;
  1420. case 10: {
  1421. values_.AddEntriesFrom(input, _repeated_values_codec);
  1422. break;
  1423. }
  1424. }
  1425. }
  1426. #endif
  1427. }
  1428. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1429. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1430. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1431. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  1432. uint tag;
  1433. while ((tag = input.ReadTag()) != 0) {
  1434. switch(tag) {
  1435. default:
  1436. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  1437. break;
  1438. case 10: {
  1439. values_.AddEntriesFrom(ref input, _repeated_values_codec);
  1440. break;
  1441. }
  1442. }
  1443. }
  1444. }
  1445. #endif
  1446. }
  1447. /// <summary>
  1448. /// Represents a Python dict keyed by `str`.
  1449. /// The comment on Unicode from Value.string_value applies analogously.
  1450. /// </summary>
  1451. public sealed partial class DictValue : pb::IMessage<DictValue>
  1452. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1453. , pb::IBufferMessage
  1454. #endif
  1455. {
  1456. private static readonly pb::MessageParser<DictValue> _parser = new pb::MessageParser<DictValue>(() => new DictValue());
  1457. private pb::UnknownFieldSet _unknownFields;
  1458. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1459. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1460. public static pb::MessageParser<DictValue> Parser { get { return _parser; } }
  1461. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1462. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1463. public static pbr::MessageDescriptor Descriptor {
  1464. get { return global::Tensorflow.StructReflection.Descriptor.MessageTypes[4]; }
  1465. }
  1466. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1467. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1468. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1469. get { return Descriptor; }
  1470. }
  1471. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1472. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1473. public DictValue() {
  1474. OnConstruction();
  1475. }
  1476. partial void OnConstruction();
  1477. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1478. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1479. public DictValue(DictValue other) : this() {
  1480. fields_ = other.fields_.Clone();
  1481. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1482. }
  1483. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1484. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1485. public DictValue Clone() {
  1486. return new DictValue(this);
  1487. }
  1488. /// <summary>Field number for the "fields" field.</summary>
  1489. public const int FieldsFieldNumber = 1;
  1490. private static readonly pbc::MapField<string, global::Tensorflow.StructuredValue>.Codec _map_fields_codec
  1491. = new pbc::MapField<string, global::Tensorflow.StructuredValue>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Tensorflow.StructuredValue.Parser), 10);
  1492. private readonly pbc::MapField<string, global::Tensorflow.StructuredValue> fields_ = new pbc::MapField<string, global::Tensorflow.StructuredValue>();
  1493. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1494. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1495. public pbc::MapField<string, global::Tensorflow.StructuredValue> Fields {
  1496. get { return fields_; }
  1497. }
  1498. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1499. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1500. public override bool Equals(object other) {
  1501. return Equals(other as DictValue);
  1502. }
  1503. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1504. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1505. public bool Equals(DictValue other) {
  1506. if (ReferenceEquals(other, null)) {
  1507. return false;
  1508. }
  1509. if (ReferenceEquals(other, this)) {
  1510. return true;
  1511. }
  1512. if (!Fields.Equals(other.Fields)) return false;
  1513. return Equals(_unknownFields, other._unknownFields);
  1514. }
  1515. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1516. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1517. public override int GetHashCode() {
  1518. int hash = 1;
  1519. hash ^= Fields.GetHashCode();
  1520. if (_unknownFields != null) {
  1521. hash ^= _unknownFields.GetHashCode();
  1522. }
  1523. return hash;
  1524. }
  1525. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1526. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1527. public override string ToString() {
  1528. return pb::JsonFormatter.ToDiagnosticString(this);
  1529. }
  1530. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1531. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1532. public void WriteTo(pb::CodedOutputStream output) {
  1533. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1534. output.WriteRawMessage(this);
  1535. #else
  1536. fields_.WriteTo(output, _map_fields_codec);
  1537. if (_unknownFields != null) {
  1538. _unknownFields.WriteTo(output);
  1539. }
  1540. #endif
  1541. }
  1542. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1543. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1544. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1545. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  1546. fields_.WriteTo(ref output, _map_fields_codec);
  1547. if (_unknownFields != null) {
  1548. _unknownFields.WriteTo(ref output);
  1549. }
  1550. }
  1551. #endif
  1552. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1553. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1554. public int CalculateSize() {
  1555. int size = 0;
  1556. size += fields_.CalculateSize(_map_fields_codec);
  1557. if (_unknownFields != null) {
  1558. size += _unknownFields.CalculateSize();
  1559. }
  1560. return size;
  1561. }
  1562. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1563. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1564. public void MergeFrom(DictValue other) {
  1565. if (other == null) {
  1566. return;
  1567. }
  1568. fields_.MergeFrom(other.fields_);
  1569. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1570. }
  1571. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1572. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1573. public void MergeFrom(pb::CodedInputStream input) {
  1574. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1575. input.ReadRawMessage(this);
  1576. #else
  1577. uint tag;
  1578. while ((tag = input.ReadTag()) != 0) {
  1579. switch(tag) {
  1580. default:
  1581. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1582. break;
  1583. case 10: {
  1584. fields_.AddEntriesFrom(input, _map_fields_codec);
  1585. break;
  1586. }
  1587. }
  1588. }
  1589. #endif
  1590. }
  1591. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1592. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1593. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1594. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  1595. uint tag;
  1596. while ((tag = input.ReadTag()) != 0) {
  1597. switch(tag) {
  1598. default:
  1599. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  1600. break;
  1601. case 10: {
  1602. fields_.AddEntriesFrom(ref input, _map_fields_codec);
  1603. break;
  1604. }
  1605. }
  1606. }
  1607. }
  1608. #endif
  1609. }
  1610. /// <summary>
  1611. /// Represents a (key, value) pair.
  1612. /// </summary>
  1613. public sealed partial class PairValue : pb::IMessage<PairValue>
  1614. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1615. , pb::IBufferMessage
  1616. #endif
  1617. {
  1618. private static readonly pb::MessageParser<PairValue> _parser = new pb::MessageParser<PairValue>(() => new PairValue());
  1619. private pb::UnknownFieldSet _unknownFields;
  1620. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1621. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1622. public static pb::MessageParser<PairValue> Parser { get { return _parser; } }
  1623. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1624. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1625. public static pbr::MessageDescriptor Descriptor {
  1626. get { return global::Tensorflow.StructReflection.Descriptor.MessageTypes[5]; }
  1627. }
  1628. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1629. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1630. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1631. get { return Descriptor; }
  1632. }
  1633. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1634. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1635. public PairValue() {
  1636. OnConstruction();
  1637. }
  1638. partial void OnConstruction();
  1639. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1640. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1641. public PairValue(PairValue other) : this() {
  1642. key_ = other.key_;
  1643. value_ = other.value_ != null ? other.value_.Clone() : null;
  1644. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1645. }
  1646. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1647. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1648. public PairValue Clone() {
  1649. return new PairValue(this);
  1650. }
  1651. /// <summary>Field number for the "key" field.</summary>
  1652. public const int KeyFieldNumber = 1;
  1653. private string key_ = "";
  1654. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1655. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1656. public string Key {
  1657. get { return key_; }
  1658. set {
  1659. key_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1660. }
  1661. }
  1662. /// <summary>Field number for the "value" field.</summary>
  1663. public const int ValueFieldNumber = 2;
  1664. private global::Tensorflow.StructuredValue value_;
  1665. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1666. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1667. public global::Tensorflow.StructuredValue Value {
  1668. get { return value_; }
  1669. set {
  1670. value_ = value;
  1671. }
  1672. }
  1673. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1674. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1675. public override bool Equals(object other) {
  1676. return Equals(other as PairValue);
  1677. }
  1678. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1679. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1680. public bool Equals(PairValue other) {
  1681. if (ReferenceEquals(other, null)) {
  1682. return false;
  1683. }
  1684. if (ReferenceEquals(other, this)) {
  1685. return true;
  1686. }
  1687. if (Key != other.Key) return false;
  1688. if (!object.Equals(Value, other.Value)) return false;
  1689. return Equals(_unknownFields, other._unknownFields);
  1690. }
  1691. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1692. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1693. public override int GetHashCode() {
  1694. int hash = 1;
  1695. if (Key.Length != 0) hash ^= Key.GetHashCode();
  1696. if (value_ != null) hash ^= Value.GetHashCode();
  1697. if (_unknownFields != null) {
  1698. hash ^= _unknownFields.GetHashCode();
  1699. }
  1700. return hash;
  1701. }
  1702. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1703. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1704. public override string ToString() {
  1705. return pb::JsonFormatter.ToDiagnosticString(this);
  1706. }
  1707. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1708. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1709. public void WriteTo(pb::CodedOutputStream output) {
  1710. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1711. output.WriteRawMessage(this);
  1712. #else
  1713. if (Key.Length != 0) {
  1714. output.WriteRawTag(10);
  1715. output.WriteString(Key);
  1716. }
  1717. if (value_ != null) {
  1718. output.WriteRawTag(18);
  1719. output.WriteMessage(Value);
  1720. }
  1721. if (_unknownFields != null) {
  1722. _unknownFields.WriteTo(output);
  1723. }
  1724. #endif
  1725. }
  1726. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1727. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1728. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1729. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  1730. if (Key.Length != 0) {
  1731. output.WriteRawTag(10);
  1732. output.WriteString(Key);
  1733. }
  1734. if (value_ != null) {
  1735. output.WriteRawTag(18);
  1736. output.WriteMessage(Value);
  1737. }
  1738. if (_unknownFields != null) {
  1739. _unknownFields.WriteTo(ref output);
  1740. }
  1741. }
  1742. #endif
  1743. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1744. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1745. public int CalculateSize() {
  1746. int size = 0;
  1747. if (Key.Length != 0) {
  1748. size += 1 + pb::CodedOutputStream.ComputeStringSize(Key);
  1749. }
  1750. if (value_ != null) {
  1751. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Value);
  1752. }
  1753. if (_unknownFields != null) {
  1754. size += _unknownFields.CalculateSize();
  1755. }
  1756. return size;
  1757. }
  1758. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1759. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1760. public void MergeFrom(PairValue other) {
  1761. if (other == null) {
  1762. return;
  1763. }
  1764. if (other.Key.Length != 0) {
  1765. Key = other.Key;
  1766. }
  1767. if (other.value_ != null) {
  1768. if (value_ == null) {
  1769. Value = new global::Tensorflow.StructuredValue();
  1770. }
  1771. Value.MergeFrom(other.Value);
  1772. }
  1773. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1774. }
  1775. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1776. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1777. public void MergeFrom(pb::CodedInputStream input) {
  1778. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1779. input.ReadRawMessage(this);
  1780. #else
  1781. uint tag;
  1782. while ((tag = input.ReadTag()) != 0) {
  1783. switch(tag) {
  1784. default:
  1785. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1786. break;
  1787. case 10: {
  1788. Key = input.ReadString();
  1789. break;
  1790. }
  1791. case 18: {
  1792. if (value_ == null) {
  1793. Value = new global::Tensorflow.StructuredValue();
  1794. }
  1795. input.ReadMessage(Value);
  1796. break;
  1797. }
  1798. }
  1799. }
  1800. #endif
  1801. }
  1802. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1803. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1804. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1805. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  1806. uint tag;
  1807. while ((tag = input.ReadTag()) != 0) {
  1808. switch(tag) {
  1809. default:
  1810. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  1811. break;
  1812. case 10: {
  1813. Key = input.ReadString();
  1814. break;
  1815. }
  1816. case 18: {
  1817. if (value_ == null) {
  1818. Value = new global::Tensorflow.StructuredValue();
  1819. }
  1820. input.ReadMessage(Value);
  1821. break;
  1822. }
  1823. }
  1824. }
  1825. }
  1826. #endif
  1827. }
  1828. /// <summary>
  1829. /// Represents Python's namedtuple.
  1830. /// </summary>
  1831. public sealed partial class NamedTupleValue : pb::IMessage<NamedTupleValue>
  1832. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1833. , pb::IBufferMessage
  1834. #endif
  1835. {
  1836. private static readonly pb::MessageParser<NamedTupleValue> _parser = new pb::MessageParser<NamedTupleValue>(() => new NamedTupleValue());
  1837. private pb::UnknownFieldSet _unknownFields;
  1838. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1839. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1840. public static pb::MessageParser<NamedTupleValue> Parser { get { return _parser; } }
  1841. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1842. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1843. public static pbr::MessageDescriptor Descriptor {
  1844. get { return global::Tensorflow.StructReflection.Descriptor.MessageTypes[6]; }
  1845. }
  1846. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1847. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1848. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1849. get { return Descriptor; }
  1850. }
  1851. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1852. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1853. public NamedTupleValue() {
  1854. OnConstruction();
  1855. }
  1856. partial void OnConstruction();
  1857. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1858. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1859. public NamedTupleValue(NamedTupleValue other) : this() {
  1860. name_ = other.name_;
  1861. values_ = other.values_.Clone();
  1862. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1863. }
  1864. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1865. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1866. public NamedTupleValue Clone() {
  1867. return new NamedTupleValue(this);
  1868. }
  1869. /// <summary>Field number for the "name" field.</summary>
  1870. public const int NameFieldNumber = 1;
  1871. private string name_ = "";
  1872. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1873. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1874. public string Name {
  1875. get { return name_; }
  1876. set {
  1877. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1878. }
  1879. }
  1880. /// <summary>Field number for the "values" field.</summary>
  1881. public const int ValuesFieldNumber = 2;
  1882. private static readonly pb::FieldCodec<global::Tensorflow.PairValue> _repeated_values_codec
  1883. = pb::FieldCodec.ForMessage(18, global::Tensorflow.PairValue.Parser);
  1884. private readonly pbc::RepeatedField<global::Tensorflow.PairValue> values_ = new pbc::RepeatedField<global::Tensorflow.PairValue>();
  1885. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1886. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1887. public pbc::RepeatedField<global::Tensorflow.PairValue> Values {
  1888. get { return values_; }
  1889. }
  1890. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1891. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1892. public override bool Equals(object other) {
  1893. return Equals(other as NamedTupleValue);
  1894. }
  1895. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1896. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1897. public bool Equals(NamedTupleValue other) {
  1898. if (ReferenceEquals(other, null)) {
  1899. return false;
  1900. }
  1901. if (ReferenceEquals(other, this)) {
  1902. return true;
  1903. }
  1904. if (Name != other.Name) return false;
  1905. if(!values_.Equals(other.values_)) return false;
  1906. return Equals(_unknownFields, other._unknownFields);
  1907. }
  1908. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1909. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1910. public override int GetHashCode() {
  1911. int hash = 1;
  1912. if (Name.Length != 0) hash ^= Name.GetHashCode();
  1913. hash ^= values_.GetHashCode();
  1914. if (_unknownFields != null) {
  1915. hash ^= _unknownFields.GetHashCode();
  1916. }
  1917. return hash;
  1918. }
  1919. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1920. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1921. public override string ToString() {
  1922. return pb::JsonFormatter.ToDiagnosticString(this);
  1923. }
  1924. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1925. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1926. public void WriteTo(pb::CodedOutputStream output) {
  1927. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1928. output.WriteRawMessage(this);
  1929. #else
  1930. if (Name.Length != 0) {
  1931. output.WriteRawTag(10);
  1932. output.WriteString(Name);
  1933. }
  1934. values_.WriteTo(output, _repeated_values_codec);
  1935. if (_unknownFields != null) {
  1936. _unknownFields.WriteTo(output);
  1937. }
  1938. #endif
  1939. }
  1940. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1941. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1942. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1943. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  1944. if (Name.Length != 0) {
  1945. output.WriteRawTag(10);
  1946. output.WriteString(Name);
  1947. }
  1948. values_.WriteTo(ref output, _repeated_values_codec);
  1949. if (_unknownFields != null) {
  1950. _unknownFields.WriteTo(ref output);
  1951. }
  1952. }
  1953. #endif
  1954. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1955. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1956. public int CalculateSize() {
  1957. int size = 0;
  1958. if (Name.Length != 0) {
  1959. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  1960. }
  1961. size += values_.CalculateSize(_repeated_values_codec);
  1962. if (_unknownFields != null) {
  1963. size += _unknownFields.CalculateSize();
  1964. }
  1965. return size;
  1966. }
  1967. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1968. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1969. public void MergeFrom(NamedTupleValue other) {
  1970. if (other == null) {
  1971. return;
  1972. }
  1973. if (other.Name.Length != 0) {
  1974. Name = other.Name;
  1975. }
  1976. values_.Add(other.values_);
  1977. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1978. }
  1979. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1980. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1981. public void MergeFrom(pb::CodedInputStream input) {
  1982. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1983. input.ReadRawMessage(this);
  1984. #else
  1985. uint tag;
  1986. while ((tag = input.ReadTag()) != 0) {
  1987. switch(tag) {
  1988. default:
  1989. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1990. break;
  1991. case 10: {
  1992. Name = input.ReadString();
  1993. break;
  1994. }
  1995. case 18: {
  1996. values_.AddEntriesFrom(input, _repeated_values_codec);
  1997. break;
  1998. }
  1999. }
  2000. }
  2001. #endif
  2002. }
  2003. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2004. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2005. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2006. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  2007. uint tag;
  2008. while ((tag = input.ReadTag()) != 0) {
  2009. switch(tag) {
  2010. default:
  2011. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  2012. break;
  2013. case 10: {
  2014. Name = input.ReadString();
  2015. break;
  2016. }
  2017. case 18: {
  2018. values_.AddEntriesFrom(ref input, _repeated_values_codec);
  2019. break;
  2020. }
  2021. }
  2022. }
  2023. }
  2024. #endif
  2025. }
  2026. /// <summary>
  2027. /// A protobuf to represent tf.TensorSpec.
  2028. /// </summary>
  2029. public sealed partial class TensorSpecProto : pb::IMessage<TensorSpecProto>
  2030. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2031. , pb::IBufferMessage
  2032. #endif
  2033. {
  2034. private static readonly pb::MessageParser<TensorSpecProto> _parser = new pb::MessageParser<TensorSpecProto>(() => new TensorSpecProto());
  2035. private pb::UnknownFieldSet _unknownFields;
  2036. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2037. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2038. public static pb::MessageParser<TensorSpecProto> Parser { get { return _parser; } }
  2039. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2040. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2041. public static pbr::MessageDescriptor Descriptor {
  2042. get { return global::Tensorflow.StructReflection.Descriptor.MessageTypes[7]; }
  2043. }
  2044. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2045. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2046. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2047. get { return Descriptor; }
  2048. }
  2049. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2050. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2051. public TensorSpecProto() {
  2052. OnConstruction();
  2053. }
  2054. partial void OnConstruction();
  2055. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2056. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2057. public TensorSpecProto(TensorSpecProto other) : this() {
  2058. name_ = other.name_;
  2059. shape_ = other.shape_ != null ? other.shape_.Clone() : null;
  2060. dtype_ = other.dtype_;
  2061. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  2062. }
  2063. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2064. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2065. public TensorSpecProto Clone() {
  2066. return new TensorSpecProto(this);
  2067. }
  2068. /// <summary>Field number for the "name" field.</summary>
  2069. public const int NameFieldNumber = 1;
  2070. private string name_ = "";
  2071. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2072. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2073. public string Name {
  2074. get { return name_; }
  2075. set {
  2076. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  2077. }
  2078. }
  2079. /// <summary>Field number for the "shape" field.</summary>
  2080. public const int ShapeFieldNumber = 2;
  2081. private global::Tensorflow.TensorShapeProto shape_;
  2082. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2083. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2084. public global::Tensorflow.TensorShapeProto Shape {
  2085. get { return shape_; }
  2086. set {
  2087. shape_ = value;
  2088. }
  2089. }
  2090. /// <summary>Field number for the "dtype" field.</summary>
  2091. public const int DtypeFieldNumber = 3;
  2092. private global::Tensorflow.DataType dtype_ = global::Tensorflow.DataType.DtInvalid;
  2093. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2094. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2095. public global::Tensorflow.DataType Dtype {
  2096. get { return dtype_; }
  2097. set {
  2098. dtype_ = value;
  2099. }
  2100. }
  2101. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2102. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2103. public override bool Equals(object other) {
  2104. return Equals(other as TensorSpecProto);
  2105. }
  2106. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2107. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2108. public bool Equals(TensorSpecProto other) {
  2109. if (ReferenceEquals(other, null)) {
  2110. return false;
  2111. }
  2112. if (ReferenceEquals(other, this)) {
  2113. return true;
  2114. }
  2115. if (Name != other.Name) return false;
  2116. if (!object.Equals(Shape, other.Shape)) return false;
  2117. if (Dtype != other.Dtype) return false;
  2118. return Equals(_unknownFields, other._unknownFields);
  2119. }
  2120. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2121. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2122. public override int GetHashCode() {
  2123. int hash = 1;
  2124. if (Name.Length != 0) hash ^= Name.GetHashCode();
  2125. if (shape_ != null) hash ^= Shape.GetHashCode();
  2126. if (Dtype != global::Tensorflow.DataType.DtInvalid) hash ^= Dtype.GetHashCode();
  2127. if (_unknownFields != null) {
  2128. hash ^= _unknownFields.GetHashCode();
  2129. }
  2130. return hash;
  2131. }
  2132. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2133. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2134. public override string ToString() {
  2135. return pb::JsonFormatter.ToDiagnosticString(this);
  2136. }
  2137. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2138. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2139. public void WriteTo(pb::CodedOutputStream output) {
  2140. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2141. output.WriteRawMessage(this);
  2142. #else
  2143. if (Name.Length != 0) {
  2144. output.WriteRawTag(10);
  2145. output.WriteString(Name);
  2146. }
  2147. if (shape_ != null) {
  2148. output.WriteRawTag(18);
  2149. output.WriteMessage(Shape);
  2150. }
  2151. if (Dtype != global::Tensorflow.DataType.DtInvalid) {
  2152. output.WriteRawTag(24);
  2153. output.WriteEnum((int) Dtype);
  2154. }
  2155. if (_unknownFields != null) {
  2156. _unknownFields.WriteTo(output);
  2157. }
  2158. #endif
  2159. }
  2160. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2161. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2162. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2163. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  2164. if (Name.Length != 0) {
  2165. output.WriteRawTag(10);
  2166. output.WriteString(Name);
  2167. }
  2168. if (shape_ != null) {
  2169. output.WriteRawTag(18);
  2170. output.WriteMessage(Shape);
  2171. }
  2172. if (Dtype != global::Tensorflow.DataType.DtInvalid) {
  2173. output.WriteRawTag(24);
  2174. output.WriteEnum((int) Dtype);
  2175. }
  2176. if (_unknownFields != null) {
  2177. _unknownFields.WriteTo(ref output);
  2178. }
  2179. }
  2180. #endif
  2181. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2182. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2183. public int CalculateSize() {
  2184. int size = 0;
  2185. if (Name.Length != 0) {
  2186. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  2187. }
  2188. if (shape_ != null) {
  2189. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Shape);
  2190. }
  2191. if (Dtype != global::Tensorflow.DataType.DtInvalid) {
  2192. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Dtype);
  2193. }
  2194. if (_unknownFields != null) {
  2195. size += _unknownFields.CalculateSize();
  2196. }
  2197. return size;
  2198. }
  2199. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2200. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2201. public void MergeFrom(TensorSpecProto other) {
  2202. if (other == null) {
  2203. return;
  2204. }
  2205. if (other.Name.Length != 0) {
  2206. Name = other.Name;
  2207. }
  2208. if (other.shape_ != null) {
  2209. if (shape_ == null) {
  2210. Shape = new global::Tensorflow.TensorShapeProto();
  2211. }
  2212. Shape.MergeFrom(other.Shape);
  2213. }
  2214. if (other.Dtype != global::Tensorflow.DataType.DtInvalid) {
  2215. Dtype = other.Dtype;
  2216. }
  2217. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  2218. }
  2219. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2220. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2221. public void MergeFrom(pb::CodedInputStream input) {
  2222. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2223. input.ReadRawMessage(this);
  2224. #else
  2225. uint tag;
  2226. while ((tag = input.ReadTag()) != 0) {
  2227. switch(tag) {
  2228. default:
  2229. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  2230. break;
  2231. case 10: {
  2232. Name = input.ReadString();
  2233. break;
  2234. }
  2235. case 18: {
  2236. if (shape_ == null) {
  2237. Shape = new global::Tensorflow.TensorShapeProto();
  2238. }
  2239. input.ReadMessage(Shape);
  2240. break;
  2241. }
  2242. case 24: {
  2243. Dtype = (global::Tensorflow.DataType) input.ReadEnum();
  2244. break;
  2245. }
  2246. }
  2247. }
  2248. #endif
  2249. }
  2250. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2251. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2252. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2253. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  2254. uint tag;
  2255. while ((tag = input.ReadTag()) != 0) {
  2256. switch(tag) {
  2257. default:
  2258. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  2259. break;
  2260. case 10: {
  2261. Name = input.ReadString();
  2262. break;
  2263. }
  2264. case 18: {
  2265. if (shape_ == null) {
  2266. Shape = new global::Tensorflow.TensorShapeProto();
  2267. }
  2268. input.ReadMessage(Shape);
  2269. break;
  2270. }
  2271. case 24: {
  2272. Dtype = (global::Tensorflow.DataType) input.ReadEnum();
  2273. break;
  2274. }
  2275. }
  2276. }
  2277. }
  2278. #endif
  2279. }
  2280. /// <summary>
  2281. /// A protobuf to represent tf.BoundedTensorSpec.
  2282. /// </summary>
  2283. public sealed partial class BoundedTensorSpecProto : pb::IMessage<BoundedTensorSpecProto>
  2284. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2285. , pb::IBufferMessage
  2286. #endif
  2287. {
  2288. private static readonly pb::MessageParser<BoundedTensorSpecProto> _parser = new pb::MessageParser<BoundedTensorSpecProto>(() => new BoundedTensorSpecProto());
  2289. private pb::UnknownFieldSet _unknownFields;
  2290. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2291. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2292. public static pb::MessageParser<BoundedTensorSpecProto> Parser { get { return _parser; } }
  2293. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2294. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2295. public static pbr::MessageDescriptor Descriptor {
  2296. get { return global::Tensorflow.StructReflection.Descriptor.MessageTypes[8]; }
  2297. }
  2298. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2299. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2300. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2301. get { return Descriptor; }
  2302. }
  2303. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2304. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2305. public BoundedTensorSpecProto() {
  2306. OnConstruction();
  2307. }
  2308. partial void OnConstruction();
  2309. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2310. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2311. public BoundedTensorSpecProto(BoundedTensorSpecProto other) : this() {
  2312. name_ = other.name_;
  2313. shape_ = other.shape_ != null ? other.shape_.Clone() : null;
  2314. dtype_ = other.dtype_;
  2315. minimum_ = other.minimum_ != null ? other.minimum_.Clone() : null;
  2316. maximum_ = other.maximum_ != null ? other.maximum_.Clone() : null;
  2317. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  2318. }
  2319. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2320. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2321. public BoundedTensorSpecProto Clone() {
  2322. return new BoundedTensorSpecProto(this);
  2323. }
  2324. /// <summary>Field number for the "name" field.</summary>
  2325. public const int NameFieldNumber = 1;
  2326. private string name_ = "";
  2327. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2328. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2329. public string Name {
  2330. get { return name_; }
  2331. set {
  2332. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  2333. }
  2334. }
  2335. /// <summary>Field number for the "shape" field.</summary>
  2336. public const int ShapeFieldNumber = 2;
  2337. private global::Tensorflow.TensorShapeProto shape_;
  2338. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2339. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2340. public global::Tensorflow.TensorShapeProto Shape {
  2341. get { return shape_; }
  2342. set {
  2343. shape_ = value;
  2344. }
  2345. }
  2346. /// <summary>Field number for the "dtype" field.</summary>
  2347. public const int DtypeFieldNumber = 3;
  2348. private global::Tensorflow.DataType dtype_ = global::Tensorflow.DataType.DtInvalid;
  2349. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2350. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2351. public global::Tensorflow.DataType Dtype {
  2352. get { return dtype_; }
  2353. set {
  2354. dtype_ = value;
  2355. }
  2356. }
  2357. /// <summary>Field number for the "minimum" field.</summary>
  2358. public const int MinimumFieldNumber = 4;
  2359. private global::Tensorflow.TensorProto minimum_;
  2360. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2361. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2362. public global::Tensorflow.TensorProto Minimum {
  2363. get { return minimum_; }
  2364. set {
  2365. minimum_ = value;
  2366. }
  2367. }
  2368. /// <summary>Field number for the "maximum" field.</summary>
  2369. public const int MaximumFieldNumber = 5;
  2370. private global::Tensorflow.TensorProto maximum_;
  2371. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2372. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2373. public global::Tensorflow.TensorProto Maximum {
  2374. get { return maximum_; }
  2375. set {
  2376. maximum_ = value;
  2377. }
  2378. }
  2379. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2380. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2381. public override bool Equals(object other) {
  2382. return Equals(other as BoundedTensorSpecProto);
  2383. }
  2384. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2385. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2386. public bool Equals(BoundedTensorSpecProto other) {
  2387. if (ReferenceEquals(other, null)) {
  2388. return false;
  2389. }
  2390. if (ReferenceEquals(other, this)) {
  2391. return true;
  2392. }
  2393. if (Name != other.Name) return false;
  2394. if (!object.Equals(Shape, other.Shape)) return false;
  2395. if (Dtype != other.Dtype) return false;
  2396. if (!object.Equals(Minimum, other.Minimum)) return false;
  2397. if (!object.Equals(Maximum, other.Maximum)) return false;
  2398. return Equals(_unknownFields, other._unknownFields);
  2399. }
  2400. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2401. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2402. public override int GetHashCode() {
  2403. int hash = 1;
  2404. if (Name.Length != 0) hash ^= Name.GetHashCode();
  2405. if (shape_ != null) hash ^= Shape.GetHashCode();
  2406. if (Dtype != global::Tensorflow.DataType.DtInvalid) hash ^= Dtype.GetHashCode();
  2407. if (minimum_ != null) hash ^= Minimum.GetHashCode();
  2408. if (maximum_ != null) hash ^= Maximum.GetHashCode();
  2409. if (_unknownFields != null) {
  2410. hash ^= _unknownFields.GetHashCode();
  2411. }
  2412. return hash;
  2413. }
  2414. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2415. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2416. public override string ToString() {
  2417. return pb::JsonFormatter.ToDiagnosticString(this);
  2418. }
  2419. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2420. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2421. public void WriteTo(pb::CodedOutputStream output) {
  2422. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2423. output.WriteRawMessage(this);
  2424. #else
  2425. if (Name.Length != 0) {
  2426. output.WriteRawTag(10);
  2427. output.WriteString(Name);
  2428. }
  2429. if (shape_ != null) {
  2430. output.WriteRawTag(18);
  2431. output.WriteMessage(Shape);
  2432. }
  2433. if (Dtype != global::Tensorflow.DataType.DtInvalid) {
  2434. output.WriteRawTag(24);
  2435. output.WriteEnum((int) Dtype);
  2436. }
  2437. if (minimum_ != null) {
  2438. output.WriteRawTag(34);
  2439. output.WriteMessage(Minimum);
  2440. }
  2441. if (maximum_ != null) {
  2442. output.WriteRawTag(42);
  2443. output.WriteMessage(Maximum);
  2444. }
  2445. if (_unknownFields != null) {
  2446. _unknownFields.WriteTo(output);
  2447. }
  2448. #endif
  2449. }
  2450. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2451. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2452. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2453. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  2454. if (Name.Length != 0) {
  2455. output.WriteRawTag(10);
  2456. output.WriteString(Name);
  2457. }
  2458. if (shape_ != null) {
  2459. output.WriteRawTag(18);
  2460. output.WriteMessage(Shape);
  2461. }
  2462. if (Dtype != global::Tensorflow.DataType.DtInvalid) {
  2463. output.WriteRawTag(24);
  2464. output.WriteEnum((int) Dtype);
  2465. }
  2466. if (minimum_ != null) {
  2467. output.WriteRawTag(34);
  2468. output.WriteMessage(Minimum);
  2469. }
  2470. if (maximum_ != null) {
  2471. output.WriteRawTag(42);
  2472. output.WriteMessage(Maximum);
  2473. }
  2474. if (_unknownFields != null) {
  2475. _unknownFields.WriteTo(ref output);
  2476. }
  2477. }
  2478. #endif
  2479. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2480. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2481. public int CalculateSize() {
  2482. int size = 0;
  2483. if (Name.Length != 0) {
  2484. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  2485. }
  2486. if (shape_ != null) {
  2487. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Shape);
  2488. }
  2489. if (Dtype != global::Tensorflow.DataType.DtInvalid) {
  2490. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Dtype);
  2491. }
  2492. if (minimum_ != null) {
  2493. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Minimum);
  2494. }
  2495. if (maximum_ != null) {
  2496. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Maximum);
  2497. }
  2498. if (_unknownFields != null) {
  2499. size += _unknownFields.CalculateSize();
  2500. }
  2501. return size;
  2502. }
  2503. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2504. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2505. public void MergeFrom(BoundedTensorSpecProto other) {
  2506. if (other == null) {
  2507. return;
  2508. }
  2509. if (other.Name.Length != 0) {
  2510. Name = other.Name;
  2511. }
  2512. if (other.shape_ != null) {
  2513. if (shape_ == null) {
  2514. Shape = new global::Tensorflow.TensorShapeProto();
  2515. }
  2516. Shape.MergeFrom(other.Shape);
  2517. }
  2518. if (other.Dtype != global::Tensorflow.DataType.DtInvalid) {
  2519. Dtype = other.Dtype;
  2520. }
  2521. if (other.minimum_ != null) {
  2522. if (minimum_ == null) {
  2523. Minimum = new global::Tensorflow.TensorProto();
  2524. }
  2525. Minimum.MergeFrom(other.Minimum);
  2526. }
  2527. if (other.maximum_ != null) {
  2528. if (maximum_ == null) {
  2529. Maximum = new global::Tensorflow.TensorProto();
  2530. }
  2531. Maximum.MergeFrom(other.Maximum);
  2532. }
  2533. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  2534. }
  2535. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2536. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2537. public void MergeFrom(pb::CodedInputStream input) {
  2538. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2539. input.ReadRawMessage(this);
  2540. #else
  2541. uint tag;
  2542. while ((tag = input.ReadTag()) != 0) {
  2543. switch(tag) {
  2544. default:
  2545. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  2546. break;
  2547. case 10: {
  2548. Name = input.ReadString();
  2549. break;
  2550. }
  2551. case 18: {
  2552. if (shape_ == null) {
  2553. Shape = new global::Tensorflow.TensorShapeProto();
  2554. }
  2555. input.ReadMessage(Shape);
  2556. break;
  2557. }
  2558. case 24: {
  2559. Dtype = (global::Tensorflow.DataType) input.ReadEnum();
  2560. break;
  2561. }
  2562. case 34: {
  2563. if (minimum_ == null) {
  2564. Minimum = new global::Tensorflow.TensorProto();
  2565. }
  2566. input.ReadMessage(Minimum);
  2567. break;
  2568. }
  2569. case 42: {
  2570. if (maximum_ == null) {
  2571. Maximum = new global::Tensorflow.TensorProto();
  2572. }
  2573. input.ReadMessage(Maximum);
  2574. break;
  2575. }
  2576. }
  2577. }
  2578. #endif
  2579. }
  2580. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2581. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2582. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2583. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  2584. uint tag;
  2585. while ((tag = input.ReadTag()) != 0) {
  2586. switch(tag) {
  2587. default:
  2588. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  2589. break;
  2590. case 10: {
  2591. Name = input.ReadString();
  2592. break;
  2593. }
  2594. case 18: {
  2595. if (shape_ == null) {
  2596. Shape = new global::Tensorflow.TensorShapeProto();
  2597. }
  2598. input.ReadMessage(Shape);
  2599. break;
  2600. }
  2601. case 24: {
  2602. Dtype = (global::Tensorflow.DataType) input.ReadEnum();
  2603. break;
  2604. }
  2605. case 34: {
  2606. if (minimum_ == null) {
  2607. Minimum = new global::Tensorflow.TensorProto();
  2608. }
  2609. input.ReadMessage(Minimum);
  2610. break;
  2611. }
  2612. case 42: {
  2613. if (maximum_ == null) {
  2614. Maximum = new global::Tensorflow.TensorProto();
  2615. }
  2616. input.ReadMessage(Maximum);
  2617. break;
  2618. }
  2619. }
  2620. }
  2621. }
  2622. #endif
  2623. }
  2624. /// <summary>
  2625. /// Represents a tf.TypeSpec
  2626. /// </summary>
  2627. public sealed partial class TypeSpecProto : pb::IMessage<TypeSpecProto>
  2628. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2629. , pb::IBufferMessage
  2630. #endif
  2631. {
  2632. private static readonly pb::MessageParser<TypeSpecProto> _parser = new pb::MessageParser<TypeSpecProto>(() => new TypeSpecProto());
  2633. private pb::UnknownFieldSet _unknownFields;
  2634. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2635. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2636. public static pb::MessageParser<TypeSpecProto> Parser { get { return _parser; } }
  2637. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2638. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2639. public static pbr::MessageDescriptor Descriptor {
  2640. get { return global::Tensorflow.StructReflection.Descriptor.MessageTypes[9]; }
  2641. }
  2642. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2643. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2644. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2645. get { return Descriptor; }
  2646. }
  2647. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2648. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2649. public TypeSpecProto() {
  2650. OnConstruction();
  2651. }
  2652. partial void OnConstruction();
  2653. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2654. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2655. public TypeSpecProto(TypeSpecProto other) : this() {
  2656. typeSpecClass_ = other.typeSpecClass_;
  2657. typeState_ = other.typeState_ != null ? other.typeState_.Clone() : null;
  2658. typeSpecClassName_ = other.typeSpecClassName_;
  2659. numFlatComponents_ = other.numFlatComponents_;
  2660. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  2661. }
  2662. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2663. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2664. public TypeSpecProto Clone() {
  2665. return new TypeSpecProto(this);
  2666. }
  2667. /// <summary>Field number for the "type_spec_class" field.</summary>
  2668. public const int TypeSpecClassFieldNumber = 1;
  2669. private global::Tensorflow.TypeSpecProto.Types.TypeSpecClass typeSpecClass_ = global::Tensorflow.TypeSpecProto.Types.TypeSpecClass.Unknown;
  2670. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2671. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2672. public global::Tensorflow.TypeSpecProto.Types.TypeSpecClass TypeSpecClass {
  2673. get { return typeSpecClass_; }
  2674. set {
  2675. typeSpecClass_ = value;
  2676. }
  2677. }
  2678. /// <summary>Field number for the "type_state" field.</summary>
  2679. public const int TypeStateFieldNumber = 2;
  2680. private global::Tensorflow.StructuredValue typeState_;
  2681. /// <summary>
  2682. /// The value returned by TypeSpec._serialize().
  2683. /// </summary>
  2684. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2685. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2686. public global::Tensorflow.StructuredValue TypeState {
  2687. get { return typeState_; }
  2688. set {
  2689. typeState_ = value;
  2690. }
  2691. }
  2692. /// <summary>Field number for the "type_spec_class_name" field.</summary>
  2693. public const int TypeSpecClassNameFieldNumber = 3;
  2694. private string typeSpecClassName_ = "";
  2695. /// <summary>
  2696. /// The name of the TypeSpec class.
  2697. /// * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is
  2698. /// the one registered under this name. For types registered outside
  2699. /// core TensorFlow by an add-on library, that library must be loaded
  2700. /// before this value can be deserialized by nested_structure_coder.
  2701. /// * If type_spec_class specifies a particular TypeSpec class, this field is
  2702. /// redundant with the type_spec_class enum, and is only used for error
  2703. /// reporting in older binaries that do not know the tupe_spec_class enum.
  2704. /// </summary>
  2705. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2706. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2707. public string TypeSpecClassName {
  2708. get { return typeSpecClassName_; }
  2709. set {
  2710. typeSpecClassName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  2711. }
  2712. }
  2713. /// <summary>Field number for the "num_flat_components" field.</summary>
  2714. public const int NumFlatComponentsFieldNumber = 4;
  2715. private int numFlatComponents_;
  2716. /// <summary>
  2717. /// The number of flat tensor components required by this TypeSpec.
  2718. /// </summary>
  2719. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2720. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2721. public int NumFlatComponents {
  2722. get { return numFlatComponents_; }
  2723. set {
  2724. numFlatComponents_ = value;
  2725. }
  2726. }
  2727. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2728. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2729. public override bool Equals(object other) {
  2730. return Equals(other as TypeSpecProto);
  2731. }
  2732. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2733. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2734. public bool Equals(TypeSpecProto other) {
  2735. if (ReferenceEquals(other, null)) {
  2736. return false;
  2737. }
  2738. if (ReferenceEquals(other, this)) {
  2739. return true;
  2740. }
  2741. if (TypeSpecClass != other.TypeSpecClass) return false;
  2742. if (!object.Equals(TypeState, other.TypeState)) return false;
  2743. if (TypeSpecClassName != other.TypeSpecClassName) return false;
  2744. if (NumFlatComponents != other.NumFlatComponents) return false;
  2745. return Equals(_unknownFields, other._unknownFields);
  2746. }
  2747. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2748. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2749. public override int GetHashCode() {
  2750. int hash = 1;
  2751. if (TypeSpecClass != global::Tensorflow.TypeSpecProto.Types.TypeSpecClass.Unknown) hash ^= TypeSpecClass.GetHashCode();
  2752. if (typeState_ != null) hash ^= TypeState.GetHashCode();
  2753. if (TypeSpecClassName.Length != 0) hash ^= TypeSpecClassName.GetHashCode();
  2754. if (NumFlatComponents != 0) hash ^= NumFlatComponents.GetHashCode();
  2755. if (_unknownFields != null) {
  2756. hash ^= _unknownFields.GetHashCode();
  2757. }
  2758. return hash;
  2759. }
  2760. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2761. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2762. public override string ToString() {
  2763. return pb::JsonFormatter.ToDiagnosticString(this);
  2764. }
  2765. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2766. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2767. public void WriteTo(pb::CodedOutputStream output) {
  2768. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2769. output.WriteRawMessage(this);
  2770. #else
  2771. if (TypeSpecClass != global::Tensorflow.TypeSpecProto.Types.TypeSpecClass.Unknown) {
  2772. output.WriteRawTag(8);
  2773. output.WriteEnum((int) TypeSpecClass);
  2774. }
  2775. if (typeState_ != null) {
  2776. output.WriteRawTag(18);
  2777. output.WriteMessage(TypeState);
  2778. }
  2779. if (TypeSpecClassName.Length != 0) {
  2780. output.WriteRawTag(26);
  2781. output.WriteString(TypeSpecClassName);
  2782. }
  2783. if (NumFlatComponents != 0) {
  2784. output.WriteRawTag(32);
  2785. output.WriteInt32(NumFlatComponents);
  2786. }
  2787. if (_unknownFields != null) {
  2788. _unknownFields.WriteTo(output);
  2789. }
  2790. #endif
  2791. }
  2792. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2793. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2794. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2795. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  2796. if (TypeSpecClass != global::Tensorflow.TypeSpecProto.Types.TypeSpecClass.Unknown) {
  2797. output.WriteRawTag(8);
  2798. output.WriteEnum((int) TypeSpecClass);
  2799. }
  2800. if (typeState_ != null) {
  2801. output.WriteRawTag(18);
  2802. output.WriteMessage(TypeState);
  2803. }
  2804. if (TypeSpecClassName.Length != 0) {
  2805. output.WriteRawTag(26);
  2806. output.WriteString(TypeSpecClassName);
  2807. }
  2808. if (NumFlatComponents != 0) {
  2809. output.WriteRawTag(32);
  2810. output.WriteInt32(NumFlatComponents);
  2811. }
  2812. if (_unknownFields != null) {
  2813. _unknownFields.WriteTo(ref output);
  2814. }
  2815. }
  2816. #endif
  2817. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2818. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2819. public int CalculateSize() {
  2820. int size = 0;
  2821. if (TypeSpecClass != global::Tensorflow.TypeSpecProto.Types.TypeSpecClass.Unknown) {
  2822. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TypeSpecClass);
  2823. }
  2824. if (typeState_ != null) {
  2825. size += 1 + pb::CodedOutputStream.ComputeMessageSize(TypeState);
  2826. }
  2827. if (TypeSpecClassName.Length != 0) {
  2828. size += 1 + pb::CodedOutputStream.ComputeStringSize(TypeSpecClassName);
  2829. }
  2830. if (NumFlatComponents != 0) {
  2831. size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumFlatComponents);
  2832. }
  2833. if (_unknownFields != null) {
  2834. size += _unknownFields.CalculateSize();
  2835. }
  2836. return size;
  2837. }
  2838. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2839. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2840. public void MergeFrom(TypeSpecProto other) {
  2841. if (other == null) {
  2842. return;
  2843. }
  2844. if (other.TypeSpecClass != global::Tensorflow.TypeSpecProto.Types.TypeSpecClass.Unknown) {
  2845. TypeSpecClass = other.TypeSpecClass;
  2846. }
  2847. if (other.typeState_ != null) {
  2848. if (typeState_ == null) {
  2849. TypeState = new global::Tensorflow.StructuredValue();
  2850. }
  2851. TypeState.MergeFrom(other.TypeState);
  2852. }
  2853. if (other.TypeSpecClassName.Length != 0) {
  2854. TypeSpecClassName = other.TypeSpecClassName;
  2855. }
  2856. if (other.NumFlatComponents != 0) {
  2857. NumFlatComponents = other.NumFlatComponents;
  2858. }
  2859. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  2860. }
  2861. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2862. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2863. public void MergeFrom(pb::CodedInputStream input) {
  2864. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2865. input.ReadRawMessage(this);
  2866. #else
  2867. uint tag;
  2868. while ((tag = input.ReadTag()) != 0) {
  2869. switch(tag) {
  2870. default:
  2871. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  2872. break;
  2873. case 8: {
  2874. TypeSpecClass = (global::Tensorflow.TypeSpecProto.Types.TypeSpecClass) input.ReadEnum();
  2875. break;
  2876. }
  2877. case 18: {
  2878. if (typeState_ == null) {
  2879. TypeState = new global::Tensorflow.StructuredValue();
  2880. }
  2881. input.ReadMessage(TypeState);
  2882. break;
  2883. }
  2884. case 26: {
  2885. TypeSpecClassName = input.ReadString();
  2886. break;
  2887. }
  2888. case 32: {
  2889. NumFlatComponents = input.ReadInt32();
  2890. break;
  2891. }
  2892. }
  2893. }
  2894. #endif
  2895. }
  2896. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2897. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2898. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2899. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  2900. uint tag;
  2901. while ((tag = input.ReadTag()) != 0) {
  2902. switch(tag) {
  2903. default:
  2904. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  2905. break;
  2906. case 8: {
  2907. TypeSpecClass = (global::Tensorflow.TypeSpecProto.Types.TypeSpecClass) input.ReadEnum();
  2908. break;
  2909. }
  2910. case 18: {
  2911. if (typeState_ == null) {
  2912. TypeState = new global::Tensorflow.StructuredValue();
  2913. }
  2914. input.ReadMessage(TypeState);
  2915. break;
  2916. }
  2917. case 26: {
  2918. TypeSpecClassName = input.ReadString();
  2919. break;
  2920. }
  2921. case 32: {
  2922. NumFlatComponents = input.ReadInt32();
  2923. break;
  2924. }
  2925. }
  2926. }
  2927. }
  2928. #endif
  2929. #region Nested types
  2930. /// <summary>Container for nested types declared in the TypeSpecProto message type.</summary>
  2931. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2932. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2933. public static partial class Types {
  2934. public enum TypeSpecClass {
  2935. [pbr::OriginalName("UNKNOWN")] Unknown = 0,
  2936. /// <summary>
  2937. /// tf.SparseTensorSpec
  2938. /// </summary>
  2939. [pbr::OriginalName("SPARSE_TENSOR_SPEC")] SparseTensorSpec = 1,
  2940. /// <summary>
  2941. /// tf.IndexedSlicesSpec
  2942. /// </summary>
  2943. [pbr::OriginalName("INDEXED_SLICES_SPEC")] IndexedSlicesSpec = 2,
  2944. /// <summary>
  2945. /// tf.RaggedTensorSpec
  2946. /// </summary>
  2947. [pbr::OriginalName("RAGGED_TENSOR_SPEC")] RaggedTensorSpec = 3,
  2948. /// <summary>
  2949. /// tf.TensorArraySpec
  2950. /// </summary>
  2951. [pbr::OriginalName("TENSOR_ARRAY_SPEC")] TensorArraySpec = 4,
  2952. /// <summary>
  2953. /// tf.data.DatasetSpec
  2954. /// </summary>
  2955. [pbr::OriginalName("DATA_DATASET_SPEC")] DataDatasetSpec = 5,
  2956. /// <summary>
  2957. /// IteratorSpec from data/ops/iterator_ops.py
  2958. /// </summary>
  2959. [pbr::OriginalName("DATA_ITERATOR_SPEC")] DataIteratorSpec = 6,
  2960. /// <summary>
  2961. /// tf.OptionalSpec
  2962. /// </summary>
  2963. [pbr::OriginalName("OPTIONAL_SPEC")] OptionalSpec = 7,
  2964. /// <summary>
  2965. /// PerReplicaSpec from distribute/values.py
  2966. /// </summary>
  2967. [pbr::OriginalName("PER_REPLICA_SPEC")] PerReplicaSpec = 8,
  2968. /// <summary>
  2969. /// tf.VariableSpec
  2970. /// </summary>
  2971. [pbr::OriginalName("VARIABLE_SPEC")] VariableSpec = 9,
  2972. /// <summary>
  2973. /// RowPartitionSpec from ragged/row_partition.py
  2974. /// </summary>
  2975. [pbr::OriginalName("ROW_PARTITION_SPEC")] RowPartitionSpec = 10,
  2976. /// <summary>
  2977. /// The type registered as type_spec_class_name.
  2978. /// </summary>
  2979. [pbr::OriginalName("REGISTERED_TYPE_SPEC")] RegisteredTypeSpec = 12,
  2980. /// <summary>
  2981. /// Subclasses of tf.ExtensionType
  2982. /// </summary>
  2983. [pbr::OriginalName("EXTENSION_TYPE_SPEC")] ExtensionTypeSpec = 13,
  2984. }
  2985. }
  2986. #endregion
  2987. }
  2988. #endregion
  2989. }
  2990. #endregion Designer generated code