test.pb.js 100 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090
  1. // Copyright 2008 The Closure Library Authors. All Rights Reserved.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS-IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. // All other code copyright its respective owners(s).
  15. /**
  16. * @fileoverview Generated Protocol Buffer code for file
  17. * closure/goog/proto2/test.proto.
  18. */
  19. goog.provide('proto2.TestAllTypes');
  20. goog.provide('proto2.TestAllTypes.NestedEnum');
  21. goog.provide('proto2.TestAllTypes.NestedMessage');
  22. goog.provide('proto2.TestAllTypes.OptionalGroup');
  23. goog.provide('proto2.TestAllTypes.RepeatedGroup');
  24. goog.provide('proto2.TestDefaultChild');
  25. goog.provide('proto2.TestDefaultParent');
  26. goog.setTestOnly('proto2.TestAllTypes');
  27. goog.require('goog.proto2.Message');
  28. /**
  29. * Message TestAllTypes.
  30. * @constructor
  31. * @extends {goog.proto2.Message}
  32. * @final
  33. */
  34. proto2.TestAllTypes = function() {
  35. goog.proto2.Message.call(this);
  36. };
  37. goog.inherits(proto2.TestAllTypes, goog.proto2.Message);
  38. /**
  39. * Descriptor for this message, deserialized lazily in getDescriptor().
  40. * @private {?goog.proto2.Descriptor}
  41. */
  42. proto2.TestAllTypes.descriptor_ = null;
  43. /**
  44. * Overrides {@link goog.proto2.Message#clone} to specify its exact return type.
  45. * @return {!proto2.TestAllTypes} The cloned message.
  46. * @override
  47. */
  48. proto2.TestAllTypes.prototype.clone;
  49. /**
  50. * Gets the value of the optional_int32 field.
  51. * @return {?number} The value.
  52. */
  53. proto2.TestAllTypes.prototype.getOptionalInt32 = function() {
  54. return /** @type {?number} */ (this.get$Value(1));
  55. };
  56. /**
  57. * Gets the value of the optional_int32 field or the default value if not set.
  58. * @return {number} The value.
  59. */
  60. proto2.TestAllTypes.prototype.getOptionalInt32OrDefault = function() {
  61. return /** @type {number} */ (this.get$ValueOrDefault(1));
  62. };
  63. /**
  64. * Sets the value of the optional_int32 field.
  65. * @param {number} value The value.
  66. */
  67. proto2.TestAllTypes.prototype.setOptionalInt32 = function(value) {
  68. this.set$Value(1, value);
  69. };
  70. /**
  71. * @return {boolean} Whether the optional_int32 field has a value.
  72. */
  73. proto2.TestAllTypes.prototype.hasOptionalInt32 = function() {
  74. return this.has$Value(1);
  75. };
  76. /**
  77. * @return {number} The number of values in the optional_int32 field.
  78. */
  79. proto2.TestAllTypes.prototype.optionalInt32Count = function() {
  80. return this.count$Values(1);
  81. };
  82. /**
  83. * Clears the values in the optional_int32 field.
  84. */
  85. proto2.TestAllTypes.prototype.clearOptionalInt32 = function() {
  86. this.clear$Field(1);
  87. };
  88. /**
  89. * Gets the value of the optional_int64 field.
  90. * @return {?string} The value.
  91. */
  92. proto2.TestAllTypes.prototype.getOptionalInt64 = function() {
  93. return /** @type {?string} */ (this.get$Value(2));
  94. };
  95. /**
  96. * Gets the value of the optional_int64 field or the default value if not set.
  97. * @return {string} The value.
  98. */
  99. proto2.TestAllTypes.prototype.getOptionalInt64OrDefault = function() {
  100. return /** @type {string} */ (this.get$ValueOrDefault(2));
  101. };
  102. /**
  103. * Sets the value of the optional_int64 field.
  104. * @param {string} value The value.
  105. */
  106. proto2.TestAllTypes.prototype.setOptionalInt64 = function(value) {
  107. this.set$Value(2, value);
  108. };
  109. /**
  110. * @return {boolean} Whether the optional_int64 field has a value.
  111. */
  112. proto2.TestAllTypes.prototype.hasOptionalInt64 = function() {
  113. return this.has$Value(2);
  114. };
  115. /**
  116. * @return {number} The number of values in the optional_int64 field.
  117. */
  118. proto2.TestAllTypes.prototype.optionalInt64Count = function() {
  119. return this.count$Values(2);
  120. };
  121. /**
  122. * Clears the values in the optional_int64 field.
  123. */
  124. proto2.TestAllTypes.prototype.clearOptionalInt64 = function() {
  125. this.clear$Field(2);
  126. };
  127. /**
  128. * Gets the value of the optional_uint32 field.
  129. * @return {?number} The value.
  130. */
  131. proto2.TestAllTypes.prototype.getOptionalUint32 = function() {
  132. return /** @type {?number} */ (this.get$Value(3));
  133. };
  134. /**
  135. * Gets the value of the optional_uint32 field or the default value if not set.
  136. * @return {number} The value.
  137. */
  138. proto2.TestAllTypes.prototype.getOptionalUint32OrDefault = function() {
  139. return /** @type {number} */ (this.get$ValueOrDefault(3));
  140. };
  141. /**
  142. * Sets the value of the optional_uint32 field.
  143. * @param {number} value The value.
  144. */
  145. proto2.TestAllTypes.prototype.setOptionalUint32 = function(value) {
  146. this.set$Value(3, value);
  147. };
  148. /**
  149. * @return {boolean} Whether the optional_uint32 field has a value.
  150. */
  151. proto2.TestAllTypes.prototype.hasOptionalUint32 = function() {
  152. return this.has$Value(3);
  153. };
  154. /**
  155. * @return {number} The number of values in the optional_uint32 field.
  156. */
  157. proto2.TestAllTypes.prototype.optionalUint32Count = function() {
  158. return this.count$Values(3);
  159. };
  160. /**
  161. * Clears the values in the optional_uint32 field.
  162. */
  163. proto2.TestAllTypes.prototype.clearOptionalUint32 = function() {
  164. this.clear$Field(3);
  165. };
  166. /**
  167. * Gets the value of the optional_uint64 field.
  168. * @return {?string} The value.
  169. */
  170. proto2.TestAllTypes.prototype.getOptionalUint64 = function() {
  171. return /** @type {?string} */ (this.get$Value(4));
  172. };
  173. /**
  174. * Gets the value of the optional_uint64 field or the default value if not set.
  175. * @return {string} The value.
  176. */
  177. proto2.TestAllTypes.prototype.getOptionalUint64OrDefault = function() {
  178. return /** @type {string} */ (this.get$ValueOrDefault(4));
  179. };
  180. /**
  181. * Sets the value of the optional_uint64 field.
  182. * @param {string} value The value.
  183. */
  184. proto2.TestAllTypes.prototype.setOptionalUint64 = function(value) {
  185. this.set$Value(4, value);
  186. };
  187. /**
  188. * @return {boolean} Whether the optional_uint64 field has a value.
  189. */
  190. proto2.TestAllTypes.prototype.hasOptionalUint64 = function() {
  191. return this.has$Value(4);
  192. };
  193. /**
  194. * @return {number} The number of values in the optional_uint64 field.
  195. */
  196. proto2.TestAllTypes.prototype.optionalUint64Count = function() {
  197. return this.count$Values(4);
  198. };
  199. /**
  200. * Clears the values in the optional_uint64 field.
  201. */
  202. proto2.TestAllTypes.prototype.clearOptionalUint64 = function() {
  203. this.clear$Field(4);
  204. };
  205. /**
  206. * Gets the value of the optional_sint32 field.
  207. * @return {?number} The value.
  208. */
  209. proto2.TestAllTypes.prototype.getOptionalSint32 = function() {
  210. return /** @type {?number} */ (this.get$Value(5));
  211. };
  212. /**
  213. * Gets the value of the optional_sint32 field or the default value if not set.
  214. * @return {number} The value.
  215. */
  216. proto2.TestAllTypes.prototype.getOptionalSint32OrDefault = function() {
  217. return /** @type {number} */ (this.get$ValueOrDefault(5));
  218. };
  219. /**
  220. * Sets the value of the optional_sint32 field.
  221. * @param {number} value The value.
  222. */
  223. proto2.TestAllTypes.prototype.setOptionalSint32 = function(value) {
  224. this.set$Value(5, value);
  225. };
  226. /**
  227. * @return {boolean} Whether the optional_sint32 field has a value.
  228. */
  229. proto2.TestAllTypes.prototype.hasOptionalSint32 = function() {
  230. return this.has$Value(5);
  231. };
  232. /**
  233. * @return {number} The number of values in the optional_sint32 field.
  234. */
  235. proto2.TestAllTypes.prototype.optionalSint32Count = function() {
  236. return this.count$Values(5);
  237. };
  238. /**
  239. * Clears the values in the optional_sint32 field.
  240. */
  241. proto2.TestAllTypes.prototype.clearOptionalSint32 = function() {
  242. this.clear$Field(5);
  243. };
  244. /**
  245. * Gets the value of the optional_sint64 field.
  246. * @return {?string} The value.
  247. */
  248. proto2.TestAllTypes.prototype.getOptionalSint64 = function() {
  249. return /** @type {?string} */ (this.get$Value(6));
  250. };
  251. /**
  252. * Gets the value of the optional_sint64 field or the default value if not set.
  253. * @return {string} The value.
  254. */
  255. proto2.TestAllTypes.prototype.getOptionalSint64OrDefault = function() {
  256. return /** @type {string} */ (this.get$ValueOrDefault(6));
  257. };
  258. /**
  259. * Sets the value of the optional_sint64 field.
  260. * @param {string} value The value.
  261. */
  262. proto2.TestAllTypes.prototype.setOptionalSint64 = function(value) {
  263. this.set$Value(6, value);
  264. };
  265. /**
  266. * @return {boolean} Whether the optional_sint64 field has a value.
  267. */
  268. proto2.TestAllTypes.prototype.hasOptionalSint64 = function() {
  269. return this.has$Value(6);
  270. };
  271. /**
  272. * @return {number} The number of values in the optional_sint64 field.
  273. */
  274. proto2.TestAllTypes.prototype.optionalSint64Count = function() {
  275. return this.count$Values(6);
  276. };
  277. /**
  278. * Clears the values in the optional_sint64 field.
  279. */
  280. proto2.TestAllTypes.prototype.clearOptionalSint64 = function() {
  281. this.clear$Field(6);
  282. };
  283. /**
  284. * Gets the value of the optional_fixed32 field.
  285. * @return {?number} The value.
  286. */
  287. proto2.TestAllTypes.prototype.getOptionalFixed32 = function() {
  288. return /** @type {?number} */ (this.get$Value(7));
  289. };
  290. /**
  291. * Gets the value of the optional_fixed32 field or the default value if not set.
  292. * @return {number} The value.
  293. */
  294. proto2.TestAllTypes.prototype.getOptionalFixed32OrDefault = function() {
  295. return /** @type {number} */ (this.get$ValueOrDefault(7));
  296. };
  297. /**
  298. * Sets the value of the optional_fixed32 field.
  299. * @param {number} value The value.
  300. */
  301. proto2.TestAllTypes.prototype.setOptionalFixed32 = function(value) {
  302. this.set$Value(7, value);
  303. };
  304. /**
  305. * @return {boolean} Whether the optional_fixed32 field has a value.
  306. */
  307. proto2.TestAllTypes.prototype.hasOptionalFixed32 = function() {
  308. return this.has$Value(7);
  309. };
  310. /**
  311. * @return {number} The number of values in the optional_fixed32 field.
  312. */
  313. proto2.TestAllTypes.prototype.optionalFixed32Count = function() {
  314. return this.count$Values(7);
  315. };
  316. /**
  317. * Clears the values in the optional_fixed32 field.
  318. */
  319. proto2.TestAllTypes.prototype.clearOptionalFixed32 = function() {
  320. this.clear$Field(7);
  321. };
  322. /**
  323. * Gets the value of the optional_fixed64 field.
  324. * @return {?string} The value.
  325. */
  326. proto2.TestAllTypes.prototype.getOptionalFixed64 = function() {
  327. return /** @type {?string} */ (this.get$Value(8));
  328. };
  329. /**
  330. * Gets the value of the optional_fixed64 field or the default value if not set.
  331. * @return {string} The value.
  332. */
  333. proto2.TestAllTypes.prototype.getOptionalFixed64OrDefault = function() {
  334. return /** @type {string} */ (this.get$ValueOrDefault(8));
  335. };
  336. /**
  337. * Sets the value of the optional_fixed64 field.
  338. * @param {string} value The value.
  339. */
  340. proto2.TestAllTypes.prototype.setOptionalFixed64 = function(value) {
  341. this.set$Value(8, value);
  342. };
  343. /**
  344. * @return {boolean} Whether the optional_fixed64 field has a value.
  345. */
  346. proto2.TestAllTypes.prototype.hasOptionalFixed64 = function() {
  347. return this.has$Value(8);
  348. };
  349. /**
  350. * @return {number} The number of values in the optional_fixed64 field.
  351. */
  352. proto2.TestAllTypes.prototype.optionalFixed64Count = function() {
  353. return this.count$Values(8);
  354. };
  355. /**
  356. * Clears the values in the optional_fixed64 field.
  357. */
  358. proto2.TestAllTypes.prototype.clearOptionalFixed64 = function() {
  359. this.clear$Field(8);
  360. };
  361. /**
  362. * Gets the value of the optional_sfixed32 field.
  363. * @return {?number} The value.
  364. */
  365. proto2.TestAllTypes.prototype.getOptionalSfixed32 = function() {
  366. return /** @type {?number} */ (this.get$Value(9));
  367. };
  368. /**
  369. * Gets the value of the optional_sfixed32 field or the default value if not set.
  370. * @return {number} The value.
  371. */
  372. proto2.TestAllTypes.prototype.getOptionalSfixed32OrDefault = function() {
  373. return /** @type {number} */ (this.get$ValueOrDefault(9));
  374. };
  375. /**
  376. * Sets the value of the optional_sfixed32 field.
  377. * @param {number} value The value.
  378. */
  379. proto2.TestAllTypes.prototype.setOptionalSfixed32 = function(value) {
  380. this.set$Value(9, value);
  381. };
  382. /**
  383. * @return {boolean} Whether the optional_sfixed32 field has a value.
  384. */
  385. proto2.TestAllTypes.prototype.hasOptionalSfixed32 = function() {
  386. return this.has$Value(9);
  387. };
  388. /**
  389. * @return {number} The number of values in the optional_sfixed32 field.
  390. */
  391. proto2.TestAllTypes.prototype.optionalSfixed32Count = function() {
  392. return this.count$Values(9);
  393. };
  394. /**
  395. * Clears the values in the optional_sfixed32 field.
  396. */
  397. proto2.TestAllTypes.prototype.clearOptionalSfixed32 = function() {
  398. this.clear$Field(9);
  399. };
  400. /**
  401. * Gets the value of the optional_sfixed64 field.
  402. * @return {?string} The value.
  403. */
  404. proto2.TestAllTypes.prototype.getOptionalSfixed64 = function() {
  405. return /** @type {?string} */ (this.get$Value(10));
  406. };
  407. /**
  408. * Gets the value of the optional_sfixed64 field or the default value if not set.
  409. * @return {string} The value.
  410. */
  411. proto2.TestAllTypes.prototype.getOptionalSfixed64OrDefault = function() {
  412. return /** @type {string} */ (this.get$ValueOrDefault(10));
  413. };
  414. /**
  415. * Sets the value of the optional_sfixed64 field.
  416. * @param {string} value The value.
  417. */
  418. proto2.TestAllTypes.prototype.setOptionalSfixed64 = function(value) {
  419. this.set$Value(10, value);
  420. };
  421. /**
  422. * @return {boolean} Whether the optional_sfixed64 field has a value.
  423. */
  424. proto2.TestAllTypes.prototype.hasOptionalSfixed64 = function() {
  425. return this.has$Value(10);
  426. };
  427. /**
  428. * @return {number} The number of values in the optional_sfixed64 field.
  429. */
  430. proto2.TestAllTypes.prototype.optionalSfixed64Count = function() {
  431. return this.count$Values(10);
  432. };
  433. /**
  434. * Clears the values in the optional_sfixed64 field.
  435. */
  436. proto2.TestAllTypes.prototype.clearOptionalSfixed64 = function() {
  437. this.clear$Field(10);
  438. };
  439. /**
  440. * Gets the value of the optional_float field.
  441. * @return {?number} The value.
  442. */
  443. proto2.TestAllTypes.prototype.getOptionalFloat = function() {
  444. return /** @type {?number} */ (this.get$Value(11));
  445. };
  446. /**
  447. * Gets the value of the optional_float field or the default value if not set.
  448. * @return {number} The value.
  449. */
  450. proto2.TestAllTypes.prototype.getOptionalFloatOrDefault = function() {
  451. return /** @type {number} */ (this.get$ValueOrDefault(11));
  452. };
  453. /**
  454. * Sets the value of the optional_float field.
  455. * @param {number} value The value.
  456. */
  457. proto2.TestAllTypes.prototype.setOptionalFloat = function(value) {
  458. this.set$Value(11, value);
  459. };
  460. /**
  461. * @return {boolean} Whether the optional_float field has a value.
  462. */
  463. proto2.TestAllTypes.prototype.hasOptionalFloat = function() {
  464. return this.has$Value(11);
  465. };
  466. /**
  467. * @return {number} The number of values in the optional_float field.
  468. */
  469. proto2.TestAllTypes.prototype.optionalFloatCount = function() {
  470. return this.count$Values(11);
  471. };
  472. /**
  473. * Clears the values in the optional_float field.
  474. */
  475. proto2.TestAllTypes.prototype.clearOptionalFloat = function() {
  476. this.clear$Field(11);
  477. };
  478. /**
  479. * Gets the value of the optional_double field.
  480. * @return {?number} The value.
  481. */
  482. proto2.TestAllTypes.prototype.getOptionalDouble = function() {
  483. return /** @type {?number} */ (this.get$Value(12));
  484. };
  485. /**
  486. * Gets the value of the optional_double field or the default value if not set.
  487. * @return {number} The value.
  488. */
  489. proto2.TestAllTypes.prototype.getOptionalDoubleOrDefault = function() {
  490. return /** @type {number} */ (this.get$ValueOrDefault(12));
  491. };
  492. /**
  493. * Sets the value of the optional_double field.
  494. * @param {number} value The value.
  495. */
  496. proto2.TestAllTypes.prototype.setOptionalDouble = function(value) {
  497. this.set$Value(12, value);
  498. };
  499. /**
  500. * @return {boolean} Whether the optional_double field has a value.
  501. */
  502. proto2.TestAllTypes.prototype.hasOptionalDouble = function() {
  503. return this.has$Value(12);
  504. };
  505. /**
  506. * @return {number} The number of values in the optional_double field.
  507. */
  508. proto2.TestAllTypes.prototype.optionalDoubleCount = function() {
  509. return this.count$Values(12);
  510. };
  511. /**
  512. * Clears the values in the optional_double field.
  513. */
  514. proto2.TestAllTypes.prototype.clearOptionalDouble = function() {
  515. this.clear$Field(12);
  516. };
  517. /**
  518. * Gets the value of the optional_bool field.
  519. * @return {?boolean} The value.
  520. */
  521. proto2.TestAllTypes.prototype.getOptionalBool = function() {
  522. return /** @type {?boolean} */ (this.get$Value(13));
  523. };
  524. /**
  525. * Gets the value of the optional_bool field or the default value if not set.
  526. * @return {boolean} The value.
  527. */
  528. proto2.TestAllTypes.prototype.getOptionalBoolOrDefault = function() {
  529. return /** @type {boolean} */ (this.get$ValueOrDefault(13));
  530. };
  531. /**
  532. * Sets the value of the optional_bool field.
  533. * @param {boolean} value The value.
  534. */
  535. proto2.TestAllTypes.prototype.setOptionalBool = function(value) {
  536. this.set$Value(13, value);
  537. };
  538. /**
  539. * @return {boolean} Whether the optional_bool field has a value.
  540. */
  541. proto2.TestAllTypes.prototype.hasOptionalBool = function() {
  542. return this.has$Value(13);
  543. };
  544. /**
  545. * @return {number} The number of values in the optional_bool field.
  546. */
  547. proto2.TestAllTypes.prototype.optionalBoolCount = function() {
  548. return this.count$Values(13);
  549. };
  550. /**
  551. * Clears the values in the optional_bool field.
  552. */
  553. proto2.TestAllTypes.prototype.clearOptionalBool = function() {
  554. this.clear$Field(13);
  555. };
  556. /**
  557. * Gets the value of the optional_string field.
  558. * @return {?string} The value.
  559. */
  560. proto2.TestAllTypes.prototype.getOptionalString = function() {
  561. return /** @type {?string} */ (this.get$Value(14));
  562. };
  563. /**
  564. * Gets the value of the optional_string field or the default value if not set.
  565. * @return {string} The value.
  566. */
  567. proto2.TestAllTypes.prototype.getOptionalStringOrDefault = function() {
  568. return /** @type {string} */ (this.get$ValueOrDefault(14));
  569. };
  570. /**
  571. * Sets the value of the optional_string field.
  572. * @param {string} value The value.
  573. */
  574. proto2.TestAllTypes.prototype.setOptionalString = function(value) {
  575. this.set$Value(14, value);
  576. };
  577. /**
  578. * @return {boolean} Whether the optional_string field has a value.
  579. */
  580. proto2.TestAllTypes.prototype.hasOptionalString = function() {
  581. return this.has$Value(14);
  582. };
  583. /**
  584. * @return {number} The number of values in the optional_string field.
  585. */
  586. proto2.TestAllTypes.prototype.optionalStringCount = function() {
  587. return this.count$Values(14);
  588. };
  589. /**
  590. * Clears the values in the optional_string field.
  591. */
  592. proto2.TestAllTypes.prototype.clearOptionalString = function() {
  593. this.clear$Field(14);
  594. };
  595. /**
  596. * Gets the value of the optional_bytes field.
  597. * @return {?string} The value.
  598. */
  599. proto2.TestAllTypes.prototype.getOptionalBytes = function() {
  600. return /** @type {?string} */ (this.get$Value(15));
  601. };
  602. /**
  603. * Gets the value of the optional_bytes field or the default value if not set.
  604. * @return {string} The value.
  605. */
  606. proto2.TestAllTypes.prototype.getOptionalBytesOrDefault = function() {
  607. return /** @type {string} */ (this.get$ValueOrDefault(15));
  608. };
  609. /**
  610. * Sets the value of the optional_bytes field.
  611. * @param {string} value The value.
  612. */
  613. proto2.TestAllTypes.prototype.setOptionalBytes = function(value) {
  614. this.set$Value(15, value);
  615. };
  616. /**
  617. * @return {boolean} Whether the optional_bytes field has a value.
  618. */
  619. proto2.TestAllTypes.prototype.hasOptionalBytes = function() {
  620. return this.has$Value(15);
  621. };
  622. /**
  623. * @return {number} The number of values in the optional_bytes field.
  624. */
  625. proto2.TestAllTypes.prototype.optionalBytesCount = function() {
  626. return this.count$Values(15);
  627. };
  628. /**
  629. * Clears the values in the optional_bytes field.
  630. */
  631. proto2.TestAllTypes.prototype.clearOptionalBytes = function() {
  632. this.clear$Field(15);
  633. };
  634. /**
  635. * Gets the value of the optionalgroup field.
  636. * @return {?proto2.TestAllTypes.OptionalGroup} The value.
  637. */
  638. proto2.TestAllTypes.prototype.getOptionalgroup = function() {
  639. return /** @type {?proto2.TestAllTypes.OptionalGroup} */ (this.get$Value(16));
  640. };
  641. /**
  642. * Gets the value of the optionalgroup field or the default value if not set.
  643. * @return {!proto2.TestAllTypes.OptionalGroup} The value.
  644. */
  645. proto2.TestAllTypes.prototype.getOptionalgroupOrDefault = function() {
  646. return /** @type {!proto2.TestAllTypes.OptionalGroup} */ (this.get$ValueOrDefault(16));
  647. };
  648. /**
  649. * Sets the value of the optionalgroup field.
  650. * @param {!proto2.TestAllTypes.OptionalGroup} value The value.
  651. */
  652. proto2.TestAllTypes.prototype.setOptionalgroup = function(value) {
  653. this.set$Value(16, value);
  654. };
  655. /**
  656. * @return {boolean} Whether the optionalgroup field has a value.
  657. */
  658. proto2.TestAllTypes.prototype.hasOptionalgroup = function() {
  659. return this.has$Value(16);
  660. };
  661. /**
  662. * @return {number} The number of values in the optionalgroup field.
  663. */
  664. proto2.TestAllTypes.prototype.optionalgroupCount = function() {
  665. return this.count$Values(16);
  666. };
  667. /**
  668. * Clears the values in the optionalgroup field.
  669. */
  670. proto2.TestAllTypes.prototype.clearOptionalgroup = function() {
  671. this.clear$Field(16);
  672. };
  673. /**
  674. * Gets the value of the optional_nested_message field.
  675. * @return {?proto2.TestAllTypes.NestedMessage} The value.
  676. */
  677. proto2.TestAllTypes.prototype.getOptionalNestedMessage = function() {
  678. return /** @type {?proto2.TestAllTypes.NestedMessage} */ (this.get$Value(18));
  679. };
  680. /**
  681. * Gets the value of the optional_nested_message field or the default value if not set.
  682. * @return {!proto2.TestAllTypes.NestedMessage} The value.
  683. */
  684. proto2.TestAllTypes.prototype.getOptionalNestedMessageOrDefault = function() {
  685. return /** @type {!proto2.TestAllTypes.NestedMessage} */ (this.get$ValueOrDefault(18));
  686. };
  687. /**
  688. * Sets the value of the optional_nested_message field.
  689. * @param {!proto2.TestAllTypes.NestedMessage} value The value.
  690. */
  691. proto2.TestAllTypes.prototype.setOptionalNestedMessage = function(value) {
  692. this.set$Value(18, value);
  693. };
  694. /**
  695. * @return {boolean} Whether the optional_nested_message field has a value.
  696. */
  697. proto2.TestAllTypes.prototype.hasOptionalNestedMessage = function() {
  698. return this.has$Value(18);
  699. };
  700. /**
  701. * @return {number} The number of values in the optional_nested_message field.
  702. */
  703. proto2.TestAllTypes.prototype.optionalNestedMessageCount = function() {
  704. return this.count$Values(18);
  705. };
  706. /**
  707. * Clears the values in the optional_nested_message field.
  708. */
  709. proto2.TestAllTypes.prototype.clearOptionalNestedMessage = function() {
  710. this.clear$Field(18);
  711. };
  712. /**
  713. * Gets the value of the optional_nested_enum field.
  714. * @return {?proto2.TestAllTypes.NestedEnum} The value.
  715. */
  716. proto2.TestAllTypes.prototype.getOptionalNestedEnum = function() {
  717. return /** @type {?proto2.TestAllTypes.NestedEnum} */ (this.get$Value(21));
  718. };
  719. /**
  720. * Gets the value of the optional_nested_enum field or the default value if not set.
  721. * @return {!proto2.TestAllTypes.NestedEnum} The value.
  722. */
  723. proto2.TestAllTypes.prototype.getOptionalNestedEnumOrDefault = function() {
  724. return /** @type {!proto2.TestAllTypes.NestedEnum} */ (this.get$ValueOrDefault(21));
  725. };
  726. /**
  727. * Sets the value of the optional_nested_enum field.
  728. * @param {!proto2.TestAllTypes.NestedEnum} value The value.
  729. */
  730. proto2.TestAllTypes.prototype.setOptionalNestedEnum = function(value) {
  731. this.set$Value(21, value);
  732. };
  733. /**
  734. * @return {boolean} Whether the optional_nested_enum field has a value.
  735. */
  736. proto2.TestAllTypes.prototype.hasOptionalNestedEnum = function() {
  737. return this.has$Value(21);
  738. };
  739. /**
  740. * @return {number} The number of values in the optional_nested_enum field.
  741. */
  742. proto2.TestAllTypes.prototype.optionalNestedEnumCount = function() {
  743. return this.count$Values(21);
  744. };
  745. /**
  746. * Clears the values in the optional_nested_enum field.
  747. */
  748. proto2.TestAllTypes.prototype.clearOptionalNestedEnum = function() {
  749. this.clear$Field(21);
  750. };
  751. /**
  752. * Gets the value of the optional_int64_number field.
  753. * @return {?number} The value.
  754. */
  755. proto2.TestAllTypes.prototype.getOptionalInt64Number = function() {
  756. return /** @type {?number} */ (this.get$Value(50));
  757. };
  758. /**
  759. * Gets the value of the optional_int64_number field or the default value if not set.
  760. * @return {number} The value.
  761. */
  762. proto2.TestAllTypes.prototype.getOptionalInt64NumberOrDefault = function() {
  763. return /** @type {number} */ (this.get$ValueOrDefault(50));
  764. };
  765. /**
  766. * Sets the value of the optional_int64_number field.
  767. * @param {number} value The value.
  768. */
  769. proto2.TestAllTypes.prototype.setOptionalInt64Number = function(value) {
  770. this.set$Value(50, value);
  771. };
  772. /**
  773. * @return {boolean} Whether the optional_int64_number field has a value.
  774. */
  775. proto2.TestAllTypes.prototype.hasOptionalInt64Number = function() {
  776. return this.has$Value(50);
  777. };
  778. /**
  779. * @return {number} The number of values in the optional_int64_number field.
  780. */
  781. proto2.TestAllTypes.prototype.optionalInt64NumberCount = function() {
  782. return this.count$Values(50);
  783. };
  784. /**
  785. * Clears the values in the optional_int64_number field.
  786. */
  787. proto2.TestAllTypes.prototype.clearOptionalInt64Number = function() {
  788. this.clear$Field(50);
  789. };
  790. /**
  791. * Gets the value of the optional_int64_string field.
  792. * @return {?string} The value.
  793. */
  794. proto2.TestAllTypes.prototype.getOptionalInt64String = function() {
  795. return /** @type {?string} */ (this.get$Value(51));
  796. };
  797. /**
  798. * Gets the value of the optional_int64_string field or the default value if not set.
  799. * @return {string} The value.
  800. */
  801. proto2.TestAllTypes.prototype.getOptionalInt64StringOrDefault = function() {
  802. return /** @type {string} */ (this.get$ValueOrDefault(51));
  803. };
  804. /**
  805. * Sets the value of the optional_int64_string field.
  806. * @param {string} value The value.
  807. */
  808. proto2.TestAllTypes.prototype.setOptionalInt64String = function(value) {
  809. this.set$Value(51, value);
  810. };
  811. /**
  812. * @return {boolean} Whether the optional_int64_string field has a value.
  813. */
  814. proto2.TestAllTypes.prototype.hasOptionalInt64String = function() {
  815. return this.has$Value(51);
  816. };
  817. /**
  818. * @return {number} The number of values in the optional_int64_string field.
  819. */
  820. proto2.TestAllTypes.prototype.optionalInt64StringCount = function() {
  821. return this.count$Values(51);
  822. };
  823. /**
  824. * Clears the values in the optional_int64_string field.
  825. */
  826. proto2.TestAllTypes.prototype.clearOptionalInt64String = function() {
  827. this.clear$Field(51);
  828. };
  829. /**
  830. * Gets the value of the repeated_int32 field at the index given.
  831. * @param {number} index The index to lookup.
  832. * @return {?number} The value.
  833. */
  834. proto2.TestAllTypes.prototype.getRepeatedInt32 = function(index) {
  835. return /** @type {?number} */ (this.get$Value(31, index));
  836. };
  837. /**
  838. * Gets the value of the repeated_int32 field at the index given or the default value if not set.
  839. * @param {number} index The index to lookup.
  840. * @return {number} The value.
  841. */
  842. proto2.TestAllTypes.prototype.getRepeatedInt32OrDefault = function(index) {
  843. return /** @type {number} */ (this.get$ValueOrDefault(31, index));
  844. };
  845. /**
  846. * Adds a value to the repeated_int32 field.
  847. * @param {number} value The value to add.
  848. */
  849. proto2.TestAllTypes.prototype.addRepeatedInt32 = function(value) {
  850. this.add$Value(31, value);
  851. };
  852. /**
  853. * Returns the array of values in the repeated_int32 field.
  854. * @return {!Array<number>} The values in the field.
  855. */
  856. proto2.TestAllTypes.prototype.repeatedInt32Array = function() {
  857. return /** @type {!Array<number>} */ (this.array$Values(31));
  858. };
  859. /**
  860. * @return {boolean} Whether the repeated_int32 field has a value.
  861. */
  862. proto2.TestAllTypes.prototype.hasRepeatedInt32 = function() {
  863. return this.has$Value(31);
  864. };
  865. /**
  866. * @return {number} The number of values in the repeated_int32 field.
  867. */
  868. proto2.TestAllTypes.prototype.repeatedInt32Count = function() {
  869. return this.count$Values(31);
  870. };
  871. /**
  872. * Clears the values in the repeated_int32 field.
  873. */
  874. proto2.TestAllTypes.prototype.clearRepeatedInt32 = function() {
  875. this.clear$Field(31);
  876. };
  877. /**
  878. * Gets the value of the repeated_int64 field at the index given.
  879. * @param {number} index The index to lookup.
  880. * @return {?string} The value.
  881. */
  882. proto2.TestAllTypes.prototype.getRepeatedInt64 = function(index) {
  883. return /** @type {?string} */ (this.get$Value(32, index));
  884. };
  885. /**
  886. * Gets the value of the repeated_int64 field at the index given or the default value if not set.
  887. * @param {number} index The index to lookup.
  888. * @return {string} The value.
  889. */
  890. proto2.TestAllTypes.prototype.getRepeatedInt64OrDefault = function(index) {
  891. return /** @type {string} */ (this.get$ValueOrDefault(32, index));
  892. };
  893. /**
  894. * Adds a value to the repeated_int64 field.
  895. * @param {string} value The value to add.
  896. */
  897. proto2.TestAllTypes.prototype.addRepeatedInt64 = function(value) {
  898. this.add$Value(32, value);
  899. };
  900. /**
  901. * Returns the array of values in the repeated_int64 field.
  902. * @return {!Array<string>} The values in the field.
  903. */
  904. proto2.TestAllTypes.prototype.repeatedInt64Array = function() {
  905. return /** @type {!Array<string>} */ (this.array$Values(32));
  906. };
  907. /**
  908. * @return {boolean} Whether the repeated_int64 field has a value.
  909. */
  910. proto2.TestAllTypes.prototype.hasRepeatedInt64 = function() {
  911. return this.has$Value(32);
  912. };
  913. /**
  914. * @return {number} The number of values in the repeated_int64 field.
  915. */
  916. proto2.TestAllTypes.prototype.repeatedInt64Count = function() {
  917. return this.count$Values(32);
  918. };
  919. /**
  920. * Clears the values in the repeated_int64 field.
  921. */
  922. proto2.TestAllTypes.prototype.clearRepeatedInt64 = function() {
  923. this.clear$Field(32);
  924. };
  925. /**
  926. * Gets the value of the repeated_uint32 field at the index given.
  927. * @param {number} index The index to lookup.
  928. * @return {?number} The value.
  929. */
  930. proto2.TestAllTypes.prototype.getRepeatedUint32 = function(index) {
  931. return /** @type {?number} */ (this.get$Value(33, index));
  932. };
  933. /**
  934. * Gets the value of the repeated_uint32 field at the index given or the default value if not set.
  935. * @param {number} index The index to lookup.
  936. * @return {number} The value.
  937. */
  938. proto2.TestAllTypes.prototype.getRepeatedUint32OrDefault = function(index) {
  939. return /** @type {number} */ (this.get$ValueOrDefault(33, index));
  940. };
  941. /**
  942. * Adds a value to the repeated_uint32 field.
  943. * @param {number} value The value to add.
  944. */
  945. proto2.TestAllTypes.prototype.addRepeatedUint32 = function(value) {
  946. this.add$Value(33, value);
  947. };
  948. /**
  949. * Returns the array of values in the repeated_uint32 field.
  950. * @return {!Array<number>} The values in the field.
  951. */
  952. proto2.TestAllTypes.prototype.repeatedUint32Array = function() {
  953. return /** @type {!Array<number>} */ (this.array$Values(33));
  954. };
  955. /**
  956. * @return {boolean} Whether the repeated_uint32 field has a value.
  957. */
  958. proto2.TestAllTypes.prototype.hasRepeatedUint32 = function() {
  959. return this.has$Value(33);
  960. };
  961. /**
  962. * @return {number} The number of values in the repeated_uint32 field.
  963. */
  964. proto2.TestAllTypes.prototype.repeatedUint32Count = function() {
  965. return this.count$Values(33);
  966. };
  967. /**
  968. * Clears the values in the repeated_uint32 field.
  969. */
  970. proto2.TestAllTypes.prototype.clearRepeatedUint32 = function() {
  971. this.clear$Field(33);
  972. };
  973. /**
  974. * Gets the value of the repeated_uint64 field at the index given.
  975. * @param {number} index The index to lookup.
  976. * @return {?string} The value.
  977. */
  978. proto2.TestAllTypes.prototype.getRepeatedUint64 = function(index) {
  979. return /** @type {?string} */ (this.get$Value(34, index));
  980. };
  981. /**
  982. * Gets the value of the repeated_uint64 field at the index given or the default value if not set.
  983. * @param {number} index The index to lookup.
  984. * @return {string} The value.
  985. */
  986. proto2.TestAllTypes.prototype.getRepeatedUint64OrDefault = function(index) {
  987. return /** @type {string} */ (this.get$ValueOrDefault(34, index));
  988. };
  989. /**
  990. * Adds a value to the repeated_uint64 field.
  991. * @param {string} value The value to add.
  992. */
  993. proto2.TestAllTypes.prototype.addRepeatedUint64 = function(value) {
  994. this.add$Value(34, value);
  995. };
  996. /**
  997. * Returns the array of values in the repeated_uint64 field.
  998. * @return {!Array<string>} The values in the field.
  999. */
  1000. proto2.TestAllTypes.prototype.repeatedUint64Array = function() {
  1001. return /** @type {!Array<string>} */ (this.array$Values(34));
  1002. };
  1003. /**
  1004. * @return {boolean} Whether the repeated_uint64 field has a value.
  1005. */
  1006. proto2.TestAllTypes.prototype.hasRepeatedUint64 = function() {
  1007. return this.has$Value(34);
  1008. };
  1009. /**
  1010. * @return {number} The number of values in the repeated_uint64 field.
  1011. */
  1012. proto2.TestAllTypes.prototype.repeatedUint64Count = function() {
  1013. return this.count$Values(34);
  1014. };
  1015. /**
  1016. * Clears the values in the repeated_uint64 field.
  1017. */
  1018. proto2.TestAllTypes.prototype.clearRepeatedUint64 = function() {
  1019. this.clear$Field(34);
  1020. };
  1021. /**
  1022. * Gets the value of the repeated_sint32 field at the index given.
  1023. * @param {number} index The index to lookup.
  1024. * @return {?number} The value.
  1025. */
  1026. proto2.TestAllTypes.prototype.getRepeatedSint32 = function(index) {
  1027. return /** @type {?number} */ (this.get$Value(35, index));
  1028. };
  1029. /**
  1030. * Gets the value of the repeated_sint32 field at the index given or the default value if not set.
  1031. * @param {number} index The index to lookup.
  1032. * @return {number} The value.
  1033. */
  1034. proto2.TestAllTypes.prototype.getRepeatedSint32OrDefault = function(index) {
  1035. return /** @type {number} */ (this.get$ValueOrDefault(35, index));
  1036. };
  1037. /**
  1038. * Adds a value to the repeated_sint32 field.
  1039. * @param {number} value The value to add.
  1040. */
  1041. proto2.TestAllTypes.prototype.addRepeatedSint32 = function(value) {
  1042. this.add$Value(35, value);
  1043. };
  1044. /**
  1045. * Returns the array of values in the repeated_sint32 field.
  1046. * @return {!Array<number>} The values in the field.
  1047. */
  1048. proto2.TestAllTypes.prototype.repeatedSint32Array = function() {
  1049. return /** @type {!Array<number>} */ (this.array$Values(35));
  1050. };
  1051. /**
  1052. * @return {boolean} Whether the repeated_sint32 field has a value.
  1053. */
  1054. proto2.TestAllTypes.prototype.hasRepeatedSint32 = function() {
  1055. return this.has$Value(35);
  1056. };
  1057. /**
  1058. * @return {number} The number of values in the repeated_sint32 field.
  1059. */
  1060. proto2.TestAllTypes.prototype.repeatedSint32Count = function() {
  1061. return this.count$Values(35);
  1062. };
  1063. /**
  1064. * Clears the values in the repeated_sint32 field.
  1065. */
  1066. proto2.TestAllTypes.prototype.clearRepeatedSint32 = function() {
  1067. this.clear$Field(35);
  1068. };
  1069. /**
  1070. * Gets the value of the repeated_sint64 field at the index given.
  1071. * @param {number} index The index to lookup.
  1072. * @return {?string} The value.
  1073. */
  1074. proto2.TestAllTypes.prototype.getRepeatedSint64 = function(index) {
  1075. return /** @type {?string} */ (this.get$Value(36, index));
  1076. };
  1077. /**
  1078. * Gets the value of the repeated_sint64 field at the index given or the default value if not set.
  1079. * @param {number} index The index to lookup.
  1080. * @return {string} The value.
  1081. */
  1082. proto2.TestAllTypes.prototype.getRepeatedSint64OrDefault = function(index) {
  1083. return /** @type {string} */ (this.get$ValueOrDefault(36, index));
  1084. };
  1085. /**
  1086. * Adds a value to the repeated_sint64 field.
  1087. * @param {string} value The value to add.
  1088. */
  1089. proto2.TestAllTypes.prototype.addRepeatedSint64 = function(value) {
  1090. this.add$Value(36, value);
  1091. };
  1092. /**
  1093. * Returns the array of values in the repeated_sint64 field.
  1094. * @return {!Array<string>} The values in the field.
  1095. */
  1096. proto2.TestAllTypes.prototype.repeatedSint64Array = function() {
  1097. return /** @type {!Array<string>} */ (this.array$Values(36));
  1098. };
  1099. /**
  1100. * @return {boolean} Whether the repeated_sint64 field has a value.
  1101. */
  1102. proto2.TestAllTypes.prototype.hasRepeatedSint64 = function() {
  1103. return this.has$Value(36);
  1104. };
  1105. /**
  1106. * @return {number} The number of values in the repeated_sint64 field.
  1107. */
  1108. proto2.TestAllTypes.prototype.repeatedSint64Count = function() {
  1109. return this.count$Values(36);
  1110. };
  1111. /**
  1112. * Clears the values in the repeated_sint64 field.
  1113. */
  1114. proto2.TestAllTypes.prototype.clearRepeatedSint64 = function() {
  1115. this.clear$Field(36);
  1116. };
  1117. /**
  1118. * Gets the value of the repeated_fixed32 field at the index given.
  1119. * @param {number} index The index to lookup.
  1120. * @return {?number} The value.
  1121. */
  1122. proto2.TestAllTypes.prototype.getRepeatedFixed32 = function(index) {
  1123. return /** @type {?number} */ (this.get$Value(37, index));
  1124. };
  1125. /**
  1126. * Gets the value of the repeated_fixed32 field at the index given or the default value if not set.
  1127. * @param {number} index The index to lookup.
  1128. * @return {number} The value.
  1129. */
  1130. proto2.TestAllTypes.prototype.getRepeatedFixed32OrDefault = function(index) {
  1131. return /** @type {number} */ (this.get$ValueOrDefault(37, index));
  1132. };
  1133. /**
  1134. * Adds a value to the repeated_fixed32 field.
  1135. * @param {number} value The value to add.
  1136. */
  1137. proto2.TestAllTypes.prototype.addRepeatedFixed32 = function(value) {
  1138. this.add$Value(37, value);
  1139. };
  1140. /**
  1141. * Returns the array of values in the repeated_fixed32 field.
  1142. * @return {!Array<number>} The values in the field.
  1143. */
  1144. proto2.TestAllTypes.prototype.repeatedFixed32Array = function() {
  1145. return /** @type {!Array<number>} */ (this.array$Values(37));
  1146. };
  1147. /**
  1148. * @return {boolean} Whether the repeated_fixed32 field has a value.
  1149. */
  1150. proto2.TestAllTypes.prototype.hasRepeatedFixed32 = function() {
  1151. return this.has$Value(37);
  1152. };
  1153. /**
  1154. * @return {number} The number of values in the repeated_fixed32 field.
  1155. */
  1156. proto2.TestAllTypes.prototype.repeatedFixed32Count = function() {
  1157. return this.count$Values(37);
  1158. };
  1159. /**
  1160. * Clears the values in the repeated_fixed32 field.
  1161. */
  1162. proto2.TestAllTypes.prototype.clearRepeatedFixed32 = function() {
  1163. this.clear$Field(37);
  1164. };
  1165. /**
  1166. * Gets the value of the repeated_fixed64 field at the index given.
  1167. * @param {number} index The index to lookup.
  1168. * @return {?string} The value.
  1169. */
  1170. proto2.TestAllTypes.prototype.getRepeatedFixed64 = function(index) {
  1171. return /** @type {?string} */ (this.get$Value(38, index));
  1172. };
  1173. /**
  1174. * Gets the value of the repeated_fixed64 field at the index given or the default value if not set.
  1175. * @param {number} index The index to lookup.
  1176. * @return {string} The value.
  1177. */
  1178. proto2.TestAllTypes.prototype.getRepeatedFixed64OrDefault = function(index) {
  1179. return /** @type {string} */ (this.get$ValueOrDefault(38, index));
  1180. };
  1181. /**
  1182. * Adds a value to the repeated_fixed64 field.
  1183. * @param {string} value The value to add.
  1184. */
  1185. proto2.TestAllTypes.prototype.addRepeatedFixed64 = function(value) {
  1186. this.add$Value(38, value);
  1187. };
  1188. /**
  1189. * Returns the array of values in the repeated_fixed64 field.
  1190. * @return {!Array<string>} The values in the field.
  1191. */
  1192. proto2.TestAllTypes.prototype.repeatedFixed64Array = function() {
  1193. return /** @type {!Array<string>} */ (this.array$Values(38));
  1194. };
  1195. /**
  1196. * @return {boolean} Whether the repeated_fixed64 field has a value.
  1197. */
  1198. proto2.TestAllTypes.prototype.hasRepeatedFixed64 = function() {
  1199. return this.has$Value(38);
  1200. };
  1201. /**
  1202. * @return {number} The number of values in the repeated_fixed64 field.
  1203. */
  1204. proto2.TestAllTypes.prototype.repeatedFixed64Count = function() {
  1205. return this.count$Values(38);
  1206. };
  1207. /**
  1208. * Clears the values in the repeated_fixed64 field.
  1209. */
  1210. proto2.TestAllTypes.prototype.clearRepeatedFixed64 = function() {
  1211. this.clear$Field(38);
  1212. };
  1213. /**
  1214. * Gets the value of the repeated_sfixed32 field at the index given.
  1215. * @param {number} index The index to lookup.
  1216. * @return {?number} The value.
  1217. */
  1218. proto2.TestAllTypes.prototype.getRepeatedSfixed32 = function(index) {
  1219. return /** @type {?number} */ (this.get$Value(39, index));
  1220. };
  1221. /**
  1222. * Gets the value of the repeated_sfixed32 field at the index given or the default value if not set.
  1223. * @param {number} index The index to lookup.
  1224. * @return {number} The value.
  1225. */
  1226. proto2.TestAllTypes.prototype.getRepeatedSfixed32OrDefault = function(index) {
  1227. return /** @type {number} */ (this.get$ValueOrDefault(39, index));
  1228. };
  1229. /**
  1230. * Adds a value to the repeated_sfixed32 field.
  1231. * @param {number} value The value to add.
  1232. */
  1233. proto2.TestAllTypes.prototype.addRepeatedSfixed32 = function(value) {
  1234. this.add$Value(39, value);
  1235. };
  1236. /**
  1237. * Returns the array of values in the repeated_sfixed32 field.
  1238. * @return {!Array<number>} The values in the field.
  1239. */
  1240. proto2.TestAllTypes.prototype.repeatedSfixed32Array = function() {
  1241. return /** @type {!Array<number>} */ (this.array$Values(39));
  1242. };
  1243. /**
  1244. * @return {boolean} Whether the repeated_sfixed32 field has a value.
  1245. */
  1246. proto2.TestAllTypes.prototype.hasRepeatedSfixed32 = function() {
  1247. return this.has$Value(39);
  1248. };
  1249. /**
  1250. * @return {number} The number of values in the repeated_sfixed32 field.
  1251. */
  1252. proto2.TestAllTypes.prototype.repeatedSfixed32Count = function() {
  1253. return this.count$Values(39);
  1254. };
  1255. /**
  1256. * Clears the values in the repeated_sfixed32 field.
  1257. */
  1258. proto2.TestAllTypes.prototype.clearRepeatedSfixed32 = function() {
  1259. this.clear$Field(39);
  1260. };
  1261. /**
  1262. * Gets the value of the repeated_sfixed64 field at the index given.
  1263. * @param {number} index The index to lookup.
  1264. * @return {?string} The value.
  1265. */
  1266. proto2.TestAllTypes.prototype.getRepeatedSfixed64 = function(index) {
  1267. return /** @type {?string} */ (this.get$Value(40, index));
  1268. };
  1269. /**
  1270. * Gets the value of the repeated_sfixed64 field at the index given or the default value if not set.
  1271. * @param {number} index The index to lookup.
  1272. * @return {string} The value.
  1273. */
  1274. proto2.TestAllTypes.prototype.getRepeatedSfixed64OrDefault = function(index) {
  1275. return /** @type {string} */ (this.get$ValueOrDefault(40, index));
  1276. };
  1277. /**
  1278. * Adds a value to the repeated_sfixed64 field.
  1279. * @param {string} value The value to add.
  1280. */
  1281. proto2.TestAllTypes.prototype.addRepeatedSfixed64 = function(value) {
  1282. this.add$Value(40, value);
  1283. };
  1284. /**
  1285. * Returns the array of values in the repeated_sfixed64 field.
  1286. * @return {!Array<string>} The values in the field.
  1287. */
  1288. proto2.TestAllTypes.prototype.repeatedSfixed64Array = function() {
  1289. return /** @type {!Array<string>} */ (this.array$Values(40));
  1290. };
  1291. /**
  1292. * @return {boolean} Whether the repeated_sfixed64 field has a value.
  1293. */
  1294. proto2.TestAllTypes.prototype.hasRepeatedSfixed64 = function() {
  1295. return this.has$Value(40);
  1296. };
  1297. /**
  1298. * @return {number} The number of values in the repeated_sfixed64 field.
  1299. */
  1300. proto2.TestAllTypes.prototype.repeatedSfixed64Count = function() {
  1301. return this.count$Values(40);
  1302. };
  1303. /**
  1304. * Clears the values in the repeated_sfixed64 field.
  1305. */
  1306. proto2.TestAllTypes.prototype.clearRepeatedSfixed64 = function() {
  1307. this.clear$Field(40);
  1308. };
  1309. /**
  1310. * Gets the value of the repeated_float field at the index given.
  1311. * @param {number} index The index to lookup.
  1312. * @return {?number} The value.
  1313. */
  1314. proto2.TestAllTypes.prototype.getRepeatedFloat = function(index) {
  1315. return /** @type {?number} */ (this.get$Value(41, index));
  1316. };
  1317. /**
  1318. * Gets the value of the repeated_float field at the index given or the default value if not set.
  1319. * @param {number} index The index to lookup.
  1320. * @return {number} The value.
  1321. */
  1322. proto2.TestAllTypes.prototype.getRepeatedFloatOrDefault = function(index) {
  1323. return /** @type {number} */ (this.get$ValueOrDefault(41, index));
  1324. };
  1325. /**
  1326. * Adds a value to the repeated_float field.
  1327. * @param {number} value The value to add.
  1328. */
  1329. proto2.TestAllTypes.prototype.addRepeatedFloat = function(value) {
  1330. this.add$Value(41, value);
  1331. };
  1332. /**
  1333. * Returns the array of values in the repeated_float field.
  1334. * @return {!Array<number>} The values in the field.
  1335. */
  1336. proto2.TestAllTypes.prototype.repeatedFloatArray = function() {
  1337. return /** @type {!Array<number>} */ (this.array$Values(41));
  1338. };
  1339. /**
  1340. * @return {boolean} Whether the repeated_float field has a value.
  1341. */
  1342. proto2.TestAllTypes.prototype.hasRepeatedFloat = function() {
  1343. return this.has$Value(41);
  1344. };
  1345. /**
  1346. * @return {number} The number of values in the repeated_float field.
  1347. */
  1348. proto2.TestAllTypes.prototype.repeatedFloatCount = function() {
  1349. return this.count$Values(41);
  1350. };
  1351. /**
  1352. * Clears the values in the repeated_float field.
  1353. */
  1354. proto2.TestAllTypes.prototype.clearRepeatedFloat = function() {
  1355. this.clear$Field(41);
  1356. };
  1357. /**
  1358. * Gets the value of the repeated_double field at the index given.
  1359. * @param {number} index The index to lookup.
  1360. * @return {?number} The value.
  1361. */
  1362. proto2.TestAllTypes.prototype.getRepeatedDouble = function(index) {
  1363. return /** @type {?number} */ (this.get$Value(42, index));
  1364. };
  1365. /**
  1366. * Gets the value of the repeated_double field at the index given or the default value if not set.
  1367. * @param {number} index The index to lookup.
  1368. * @return {number} The value.
  1369. */
  1370. proto2.TestAllTypes.prototype.getRepeatedDoubleOrDefault = function(index) {
  1371. return /** @type {number} */ (this.get$ValueOrDefault(42, index));
  1372. };
  1373. /**
  1374. * Adds a value to the repeated_double field.
  1375. * @param {number} value The value to add.
  1376. */
  1377. proto2.TestAllTypes.prototype.addRepeatedDouble = function(value) {
  1378. this.add$Value(42, value);
  1379. };
  1380. /**
  1381. * Returns the array of values in the repeated_double field.
  1382. * @return {!Array<number>} The values in the field.
  1383. */
  1384. proto2.TestAllTypes.prototype.repeatedDoubleArray = function() {
  1385. return /** @type {!Array<number>} */ (this.array$Values(42));
  1386. };
  1387. /**
  1388. * @return {boolean} Whether the repeated_double field has a value.
  1389. */
  1390. proto2.TestAllTypes.prototype.hasRepeatedDouble = function() {
  1391. return this.has$Value(42);
  1392. };
  1393. /**
  1394. * @return {number} The number of values in the repeated_double field.
  1395. */
  1396. proto2.TestAllTypes.prototype.repeatedDoubleCount = function() {
  1397. return this.count$Values(42);
  1398. };
  1399. /**
  1400. * Clears the values in the repeated_double field.
  1401. */
  1402. proto2.TestAllTypes.prototype.clearRepeatedDouble = function() {
  1403. this.clear$Field(42);
  1404. };
  1405. /**
  1406. * Gets the value of the repeated_bool field at the index given.
  1407. * @param {number} index The index to lookup.
  1408. * @return {?boolean} The value.
  1409. */
  1410. proto2.TestAllTypes.prototype.getRepeatedBool = function(index) {
  1411. return /** @type {?boolean} */ (this.get$Value(43, index));
  1412. };
  1413. /**
  1414. * Gets the value of the repeated_bool field at the index given or the default value if not set.
  1415. * @param {number} index The index to lookup.
  1416. * @return {boolean} The value.
  1417. */
  1418. proto2.TestAllTypes.prototype.getRepeatedBoolOrDefault = function(index) {
  1419. return /** @type {boolean} */ (this.get$ValueOrDefault(43, index));
  1420. };
  1421. /**
  1422. * Adds a value to the repeated_bool field.
  1423. * @param {boolean} value The value to add.
  1424. */
  1425. proto2.TestAllTypes.prototype.addRepeatedBool = function(value) {
  1426. this.add$Value(43, value);
  1427. };
  1428. /**
  1429. * Returns the array of values in the repeated_bool field.
  1430. * @return {!Array<boolean>} The values in the field.
  1431. */
  1432. proto2.TestAllTypes.prototype.repeatedBoolArray = function() {
  1433. return /** @type {!Array<boolean>} */ (this.array$Values(43));
  1434. };
  1435. /**
  1436. * @return {boolean} Whether the repeated_bool field has a value.
  1437. */
  1438. proto2.TestAllTypes.prototype.hasRepeatedBool = function() {
  1439. return this.has$Value(43);
  1440. };
  1441. /**
  1442. * @return {number} The number of values in the repeated_bool field.
  1443. */
  1444. proto2.TestAllTypes.prototype.repeatedBoolCount = function() {
  1445. return this.count$Values(43);
  1446. };
  1447. /**
  1448. * Clears the values in the repeated_bool field.
  1449. */
  1450. proto2.TestAllTypes.prototype.clearRepeatedBool = function() {
  1451. this.clear$Field(43);
  1452. };
  1453. /**
  1454. * Gets the value of the repeated_string field at the index given.
  1455. * @param {number} index The index to lookup.
  1456. * @return {?string} The value.
  1457. */
  1458. proto2.TestAllTypes.prototype.getRepeatedString = function(index) {
  1459. return /** @type {?string} */ (this.get$Value(44, index));
  1460. };
  1461. /**
  1462. * Gets the value of the repeated_string field at the index given or the default value if not set.
  1463. * @param {number} index The index to lookup.
  1464. * @return {string} The value.
  1465. */
  1466. proto2.TestAllTypes.prototype.getRepeatedStringOrDefault = function(index) {
  1467. return /** @type {string} */ (this.get$ValueOrDefault(44, index));
  1468. };
  1469. /**
  1470. * Adds a value to the repeated_string field.
  1471. * @param {string} value The value to add.
  1472. */
  1473. proto2.TestAllTypes.prototype.addRepeatedString = function(value) {
  1474. this.add$Value(44, value);
  1475. };
  1476. /**
  1477. * Returns the array of values in the repeated_string field.
  1478. * @return {!Array<string>} The values in the field.
  1479. */
  1480. proto2.TestAllTypes.prototype.repeatedStringArray = function() {
  1481. return /** @type {!Array<string>} */ (this.array$Values(44));
  1482. };
  1483. /**
  1484. * @return {boolean} Whether the repeated_string field has a value.
  1485. */
  1486. proto2.TestAllTypes.prototype.hasRepeatedString = function() {
  1487. return this.has$Value(44);
  1488. };
  1489. /**
  1490. * @return {number} The number of values in the repeated_string field.
  1491. */
  1492. proto2.TestAllTypes.prototype.repeatedStringCount = function() {
  1493. return this.count$Values(44);
  1494. };
  1495. /**
  1496. * Clears the values in the repeated_string field.
  1497. */
  1498. proto2.TestAllTypes.prototype.clearRepeatedString = function() {
  1499. this.clear$Field(44);
  1500. };
  1501. /**
  1502. * Gets the value of the repeated_bytes field at the index given.
  1503. * @param {number} index The index to lookup.
  1504. * @return {?string} The value.
  1505. */
  1506. proto2.TestAllTypes.prototype.getRepeatedBytes = function(index) {
  1507. return /** @type {?string} */ (this.get$Value(45, index));
  1508. };
  1509. /**
  1510. * Gets the value of the repeated_bytes field at the index given or the default value if not set.
  1511. * @param {number} index The index to lookup.
  1512. * @return {string} The value.
  1513. */
  1514. proto2.TestAllTypes.prototype.getRepeatedBytesOrDefault = function(index) {
  1515. return /** @type {string} */ (this.get$ValueOrDefault(45, index));
  1516. };
  1517. /**
  1518. * Adds a value to the repeated_bytes field.
  1519. * @param {string} value The value to add.
  1520. */
  1521. proto2.TestAllTypes.prototype.addRepeatedBytes = function(value) {
  1522. this.add$Value(45, value);
  1523. };
  1524. /**
  1525. * Returns the array of values in the repeated_bytes field.
  1526. * @return {!Array<string>} The values in the field.
  1527. */
  1528. proto2.TestAllTypes.prototype.repeatedBytesArray = function() {
  1529. return /** @type {!Array<string>} */ (this.array$Values(45));
  1530. };
  1531. /**
  1532. * @return {boolean} Whether the repeated_bytes field has a value.
  1533. */
  1534. proto2.TestAllTypes.prototype.hasRepeatedBytes = function() {
  1535. return this.has$Value(45);
  1536. };
  1537. /**
  1538. * @return {number} The number of values in the repeated_bytes field.
  1539. */
  1540. proto2.TestAllTypes.prototype.repeatedBytesCount = function() {
  1541. return this.count$Values(45);
  1542. };
  1543. /**
  1544. * Clears the values in the repeated_bytes field.
  1545. */
  1546. proto2.TestAllTypes.prototype.clearRepeatedBytes = function() {
  1547. this.clear$Field(45);
  1548. };
  1549. /**
  1550. * Gets the value of the repeatedgroup field at the index given.
  1551. * @param {number} index The index to lookup.
  1552. * @return {?proto2.TestAllTypes.RepeatedGroup} The value.
  1553. */
  1554. proto2.TestAllTypes.prototype.getRepeatedgroup = function(index) {
  1555. return /** @type {?proto2.TestAllTypes.RepeatedGroup} */ (this.get$Value(46, index));
  1556. };
  1557. /**
  1558. * Gets the value of the repeatedgroup field at the index given or the default value if not set.
  1559. * @param {number} index The index to lookup.
  1560. * @return {!proto2.TestAllTypes.RepeatedGroup} The value.
  1561. */
  1562. proto2.TestAllTypes.prototype.getRepeatedgroupOrDefault = function(index) {
  1563. return /** @type {!proto2.TestAllTypes.RepeatedGroup} */ (this.get$ValueOrDefault(46, index));
  1564. };
  1565. /**
  1566. * Adds a value to the repeatedgroup field.
  1567. * @param {!proto2.TestAllTypes.RepeatedGroup} value The value to add.
  1568. */
  1569. proto2.TestAllTypes.prototype.addRepeatedgroup = function(value) {
  1570. this.add$Value(46, value);
  1571. };
  1572. /**
  1573. * Returns the array of values in the repeatedgroup field.
  1574. * @return {!Array<!proto2.TestAllTypes.RepeatedGroup>} The values in the field.
  1575. */
  1576. proto2.TestAllTypes.prototype.repeatedgroupArray = function() {
  1577. return /** @type {!Array<!proto2.TestAllTypes.RepeatedGroup>} */ (this.array$Values(46));
  1578. };
  1579. /**
  1580. * @return {boolean} Whether the repeatedgroup field has a value.
  1581. */
  1582. proto2.TestAllTypes.prototype.hasRepeatedgroup = function() {
  1583. return this.has$Value(46);
  1584. };
  1585. /**
  1586. * @return {number} The number of values in the repeatedgroup field.
  1587. */
  1588. proto2.TestAllTypes.prototype.repeatedgroupCount = function() {
  1589. return this.count$Values(46);
  1590. };
  1591. /**
  1592. * Clears the values in the repeatedgroup field.
  1593. */
  1594. proto2.TestAllTypes.prototype.clearRepeatedgroup = function() {
  1595. this.clear$Field(46);
  1596. };
  1597. /**
  1598. * Gets the value of the repeated_nested_message field at the index given.
  1599. * @param {number} index The index to lookup.
  1600. * @return {?proto2.TestAllTypes.NestedMessage} The value.
  1601. */
  1602. proto2.TestAllTypes.prototype.getRepeatedNestedMessage = function(index) {
  1603. return /** @type {?proto2.TestAllTypes.NestedMessage} */ (this.get$Value(48, index));
  1604. };
  1605. /**
  1606. * Gets the value of the repeated_nested_message field at the index given or the default value if not set.
  1607. * @param {number} index The index to lookup.
  1608. * @return {!proto2.TestAllTypes.NestedMessage} The value.
  1609. */
  1610. proto2.TestAllTypes.prototype.getRepeatedNestedMessageOrDefault = function(index) {
  1611. return /** @type {!proto2.TestAllTypes.NestedMessage} */ (this.get$ValueOrDefault(48, index));
  1612. };
  1613. /**
  1614. * Adds a value to the repeated_nested_message field.
  1615. * @param {!proto2.TestAllTypes.NestedMessage} value The value to add.
  1616. */
  1617. proto2.TestAllTypes.prototype.addRepeatedNestedMessage = function(value) {
  1618. this.add$Value(48, value);
  1619. };
  1620. /**
  1621. * Returns the array of values in the repeated_nested_message field.
  1622. * @return {!Array<!proto2.TestAllTypes.NestedMessage>} The values in the field.
  1623. */
  1624. proto2.TestAllTypes.prototype.repeatedNestedMessageArray = function() {
  1625. return /** @type {!Array<!proto2.TestAllTypes.NestedMessage>} */ (this.array$Values(48));
  1626. };
  1627. /**
  1628. * @return {boolean} Whether the repeated_nested_message field has a value.
  1629. */
  1630. proto2.TestAllTypes.prototype.hasRepeatedNestedMessage = function() {
  1631. return this.has$Value(48);
  1632. };
  1633. /**
  1634. * @return {number} The number of values in the repeated_nested_message field.
  1635. */
  1636. proto2.TestAllTypes.prototype.repeatedNestedMessageCount = function() {
  1637. return this.count$Values(48);
  1638. };
  1639. /**
  1640. * Clears the values in the repeated_nested_message field.
  1641. */
  1642. proto2.TestAllTypes.prototype.clearRepeatedNestedMessage = function() {
  1643. this.clear$Field(48);
  1644. };
  1645. /**
  1646. * Gets the value of the repeated_nested_enum field at the index given.
  1647. * @param {number} index The index to lookup.
  1648. * @return {?proto2.TestAllTypes.NestedEnum} The value.
  1649. */
  1650. proto2.TestAllTypes.prototype.getRepeatedNestedEnum = function(index) {
  1651. return /** @type {?proto2.TestAllTypes.NestedEnum} */ (this.get$Value(49, index));
  1652. };
  1653. /**
  1654. * Gets the value of the repeated_nested_enum field at the index given or the default value if not set.
  1655. * @param {number} index The index to lookup.
  1656. * @return {!proto2.TestAllTypes.NestedEnum} The value.
  1657. */
  1658. proto2.TestAllTypes.prototype.getRepeatedNestedEnumOrDefault = function(index) {
  1659. return /** @type {!proto2.TestAllTypes.NestedEnum} */ (this.get$ValueOrDefault(49, index));
  1660. };
  1661. /**
  1662. * Adds a value to the repeated_nested_enum field.
  1663. * @param {!proto2.TestAllTypes.NestedEnum} value The value to add.
  1664. */
  1665. proto2.TestAllTypes.prototype.addRepeatedNestedEnum = function(value) {
  1666. this.add$Value(49, value);
  1667. };
  1668. /**
  1669. * Returns the array of values in the repeated_nested_enum field.
  1670. * @return {!Array<!proto2.TestAllTypes.NestedEnum>} The values in the field.
  1671. */
  1672. proto2.TestAllTypes.prototype.repeatedNestedEnumArray = function() {
  1673. return /** @type {!Array<!proto2.TestAllTypes.NestedEnum>} */ (this.array$Values(49));
  1674. };
  1675. /**
  1676. * @return {boolean} Whether the repeated_nested_enum field has a value.
  1677. */
  1678. proto2.TestAllTypes.prototype.hasRepeatedNestedEnum = function() {
  1679. return this.has$Value(49);
  1680. };
  1681. /**
  1682. * @return {number} The number of values in the repeated_nested_enum field.
  1683. */
  1684. proto2.TestAllTypes.prototype.repeatedNestedEnumCount = function() {
  1685. return this.count$Values(49);
  1686. };
  1687. /**
  1688. * Clears the values in the repeated_nested_enum field.
  1689. */
  1690. proto2.TestAllTypes.prototype.clearRepeatedNestedEnum = function() {
  1691. this.clear$Field(49);
  1692. };
  1693. /**
  1694. * Gets the value of the repeated_int64_number field at the index given.
  1695. * @param {number} index The index to lookup.
  1696. * @return {?number} The value.
  1697. */
  1698. proto2.TestAllTypes.prototype.getRepeatedInt64Number = function(index) {
  1699. return /** @type {?number} */ (this.get$Value(52, index));
  1700. };
  1701. /**
  1702. * Gets the value of the repeated_int64_number field at the index given or the default value if not set.
  1703. * @param {number} index The index to lookup.
  1704. * @return {number} The value.
  1705. */
  1706. proto2.TestAllTypes.prototype.getRepeatedInt64NumberOrDefault = function(index) {
  1707. return /** @type {number} */ (this.get$ValueOrDefault(52, index));
  1708. };
  1709. /**
  1710. * Adds a value to the repeated_int64_number field.
  1711. * @param {number} value The value to add.
  1712. */
  1713. proto2.TestAllTypes.prototype.addRepeatedInt64Number = function(value) {
  1714. this.add$Value(52, value);
  1715. };
  1716. /**
  1717. * Returns the array of values in the repeated_int64_number field.
  1718. * @return {!Array<number>} The values in the field.
  1719. */
  1720. proto2.TestAllTypes.prototype.repeatedInt64NumberArray = function() {
  1721. return /** @type {!Array<number>} */ (this.array$Values(52));
  1722. };
  1723. /**
  1724. * @return {boolean} Whether the repeated_int64_number field has a value.
  1725. */
  1726. proto2.TestAllTypes.prototype.hasRepeatedInt64Number = function() {
  1727. return this.has$Value(52);
  1728. };
  1729. /**
  1730. * @return {number} The number of values in the repeated_int64_number field.
  1731. */
  1732. proto2.TestAllTypes.prototype.repeatedInt64NumberCount = function() {
  1733. return this.count$Values(52);
  1734. };
  1735. /**
  1736. * Clears the values in the repeated_int64_number field.
  1737. */
  1738. proto2.TestAllTypes.prototype.clearRepeatedInt64Number = function() {
  1739. this.clear$Field(52);
  1740. };
  1741. /**
  1742. * Gets the value of the repeated_int64_string field at the index given.
  1743. * @param {number} index The index to lookup.
  1744. * @return {?string} The value.
  1745. */
  1746. proto2.TestAllTypes.prototype.getRepeatedInt64String = function(index) {
  1747. return /** @type {?string} */ (this.get$Value(53, index));
  1748. };
  1749. /**
  1750. * Gets the value of the repeated_int64_string field at the index given or the default value if not set.
  1751. * @param {number} index The index to lookup.
  1752. * @return {string} The value.
  1753. */
  1754. proto2.TestAllTypes.prototype.getRepeatedInt64StringOrDefault = function(index) {
  1755. return /** @type {string} */ (this.get$ValueOrDefault(53, index));
  1756. };
  1757. /**
  1758. * Adds a value to the repeated_int64_string field.
  1759. * @param {string} value The value to add.
  1760. */
  1761. proto2.TestAllTypes.prototype.addRepeatedInt64String = function(value) {
  1762. this.add$Value(53, value);
  1763. };
  1764. /**
  1765. * Returns the array of values in the repeated_int64_string field.
  1766. * @return {!Array<string>} The values in the field.
  1767. */
  1768. proto2.TestAllTypes.prototype.repeatedInt64StringArray = function() {
  1769. return /** @type {!Array<string>} */ (this.array$Values(53));
  1770. };
  1771. /**
  1772. * @return {boolean} Whether the repeated_int64_string field has a value.
  1773. */
  1774. proto2.TestAllTypes.prototype.hasRepeatedInt64String = function() {
  1775. return this.has$Value(53);
  1776. };
  1777. /**
  1778. * @return {number} The number of values in the repeated_int64_string field.
  1779. */
  1780. proto2.TestAllTypes.prototype.repeatedInt64StringCount = function() {
  1781. return this.count$Values(53);
  1782. };
  1783. /**
  1784. * Clears the values in the repeated_int64_string field.
  1785. */
  1786. proto2.TestAllTypes.prototype.clearRepeatedInt64String = function() {
  1787. this.clear$Field(53);
  1788. };
  1789. /**
  1790. * Gets the value of the packed_int32 field at the index given.
  1791. * @param {number} index The index to lookup.
  1792. * @return {?number} The value.
  1793. */
  1794. proto2.TestAllTypes.prototype.getPackedInt32 = function(index) {
  1795. return /** @type {?number} */ (this.get$Value(54, index));
  1796. };
  1797. /**
  1798. * Gets the value of the packed_int32 field at the index given or the default value if not set.
  1799. * @param {number} index The index to lookup.
  1800. * @return {number} The value.
  1801. */
  1802. proto2.TestAllTypes.prototype.getPackedInt32OrDefault = function(index) {
  1803. return /** @type {number} */ (this.get$ValueOrDefault(54, index));
  1804. };
  1805. /**
  1806. * Adds a value to the packed_int32 field.
  1807. * @param {number} value The value to add.
  1808. */
  1809. proto2.TestAllTypes.prototype.addPackedInt32 = function(value) {
  1810. this.add$Value(54, value);
  1811. };
  1812. /**
  1813. * Returns the array of values in the packed_int32 field.
  1814. * @return {!Array<number>} The values in the field.
  1815. */
  1816. proto2.TestAllTypes.prototype.packedInt32Array = function() {
  1817. return /** @type {!Array<number>} */ (this.array$Values(54));
  1818. };
  1819. /**
  1820. * @return {boolean} Whether the packed_int32 field has a value.
  1821. */
  1822. proto2.TestAllTypes.prototype.hasPackedInt32 = function() {
  1823. return this.has$Value(54);
  1824. };
  1825. /**
  1826. * @return {number} The number of values in the packed_int32 field.
  1827. */
  1828. proto2.TestAllTypes.prototype.packedInt32Count = function() {
  1829. return this.count$Values(54);
  1830. };
  1831. /**
  1832. * Clears the values in the packed_int32 field.
  1833. */
  1834. proto2.TestAllTypes.prototype.clearPackedInt32 = function() {
  1835. this.clear$Field(54);
  1836. };
  1837. /**
  1838. * Gets the value of the packed_int64 field at the index given.
  1839. * @param {number} index The index to lookup.
  1840. * @return {?number} The value.
  1841. */
  1842. proto2.TestAllTypes.prototype.getPackedInt64 = function(index) {
  1843. return /** @type {?number} */ (this.get$Value(55, index));
  1844. };
  1845. /**
  1846. * Gets the value of the packed_int64 field at the index given or the default value if not set.
  1847. * @param {number} index The index to lookup.
  1848. * @return {number} The value.
  1849. */
  1850. proto2.TestAllTypes.prototype.getPackedInt64OrDefault = function(index) {
  1851. return /** @type {number} */ (this.get$ValueOrDefault(55, index));
  1852. };
  1853. /**
  1854. * Adds a value to the packed_int64 field.
  1855. * @param {number} value The value to add.
  1856. */
  1857. proto2.TestAllTypes.prototype.addPackedInt64 = function(value) {
  1858. this.add$Value(55, value);
  1859. };
  1860. /**
  1861. * Returns the array of values in the packed_int64 field.
  1862. * @return {!Array<number>} The values in the field.
  1863. */
  1864. proto2.TestAllTypes.prototype.packedInt64Array = function() {
  1865. return /** @type {!Array<number>} */ (this.array$Values(55));
  1866. };
  1867. /**
  1868. * @return {boolean} Whether the packed_int64 field has a value.
  1869. */
  1870. proto2.TestAllTypes.prototype.hasPackedInt64 = function() {
  1871. return this.has$Value(55);
  1872. };
  1873. /**
  1874. * @return {number} The number of values in the packed_int64 field.
  1875. */
  1876. proto2.TestAllTypes.prototype.packedInt64Count = function() {
  1877. return this.count$Values(55);
  1878. };
  1879. /**
  1880. * Clears the values in the packed_int64 field.
  1881. */
  1882. proto2.TestAllTypes.prototype.clearPackedInt64 = function() {
  1883. this.clear$Field(55);
  1884. };
  1885. /**
  1886. * Gets the value of the packed_uint32 field at the index given.
  1887. * @param {number} index The index to lookup.
  1888. * @return {?number} The value.
  1889. */
  1890. proto2.TestAllTypes.prototype.getPackedUint32 = function(index) {
  1891. return /** @type {?number} */ (this.get$Value(56, index));
  1892. };
  1893. /**
  1894. * Gets the value of the packed_uint32 field at the index given or the default value if not set.
  1895. * @param {number} index The index to lookup.
  1896. * @return {number} The value.
  1897. */
  1898. proto2.TestAllTypes.prototype.getPackedUint32OrDefault = function(index) {
  1899. return /** @type {number} */ (this.get$ValueOrDefault(56, index));
  1900. };
  1901. /**
  1902. * Adds a value to the packed_uint32 field.
  1903. * @param {number} value The value to add.
  1904. */
  1905. proto2.TestAllTypes.prototype.addPackedUint32 = function(value) {
  1906. this.add$Value(56, value);
  1907. };
  1908. /**
  1909. * Returns the array of values in the packed_uint32 field.
  1910. * @return {!Array<number>} The values in the field.
  1911. */
  1912. proto2.TestAllTypes.prototype.packedUint32Array = function() {
  1913. return /** @type {!Array<number>} */ (this.array$Values(56));
  1914. };
  1915. /**
  1916. * @return {boolean} Whether the packed_uint32 field has a value.
  1917. */
  1918. proto2.TestAllTypes.prototype.hasPackedUint32 = function() {
  1919. return this.has$Value(56);
  1920. };
  1921. /**
  1922. * @return {number} The number of values in the packed_uint32 field.
  1923. */
  1924. proto2.TestAllTypes.prototype.packedUint32Count = function() {
  1925. return this.count$Values(56);
  1926. };
  1927. /**
  1928. * Clears the values in the packed_uint32 field.
  1929. */
  1930. proto2.TestAllTypes.prototype.clearPackedUint32 = function() {
  1931. this.clear$Field(56);
  1932. };
  1933. /**
  1934. * Gets the value of the packed_uint64 field at the index given.
  1935. * @param {number} index The index to lookup.
  1936. * @return {?number} The value.
  1937. */
  1938. proto2.TestAllTypes.prototype.getPackedUint64 = function(index) {
  1939. return /** @type {?number} */ (this.get$Value(57, index));
  1940. };
  1941. /**
  1942. * Gets the value of the packed_uint64 field at the index given or the default value if not set.
  1943. * @param {number} index The index to lookup.
  1944. * @return {number} The value.
  1945. */
  1946. proto2.TestAllTypes.prototype.getPackedUint64OrDefault = function(index) {
  1947. return /** @type {number} */ (this.get$ValueOrDefault(57, index));
  1948. };
  1949. /**
  1950. * Adds a value to the packed_uint64 field.
  1951. * @param {number} value The value to add.
  1952. */
  1953. proto2.TestAllTypes.prototype.addPackedUint64 = function(value) {
  1954. this.add$Value(57, value);
  1955. };
  1956. /**
  1957. * Returns the array of values in the packed_uint64 field.
  1958. * @return {!Array<number>} The values in the field.
  1959. */
  1960. proto2.TestAllTypes.prototype.packedUint64Array = function() {
  1961. return /** @type {!Array<number>} */ (this.array$Values(57));
  1962. };
  1963. /**
  1964. * @return {boolean} Whether the packed_uint64 field has a value.
  1965. */
  1966. proto2.TestAllTypes.prototype.hasPackedUint64 = function() {
  1967. return this.has$Value(57);
  1968. };
  1969. /**
  1970. * @return {number} The number of values in the packed_uint64 field.
  1971. */
  1972. proto2.TestAllTypes.prototype.packedUint64Count = function() {
  1973. return this.count$Values(57);
  1974. };
  1975. /**
  1976. * Clears the values in the packed_uint64 field.
  1977. */
  1978. proto2.TestAllTypes.prototype.clearPackedUint64 = function() {
  1979. this.clear$Field(57);
  1980. };
  1981. /**
  1982. * Gets the value of the packed_sint32 field at the index given.
  1983. * @param {number} index The index to lookup.
  1984. * @return {?number} The value.
  1985. */
  1986. proto2.TestAllTypes.prototype.getPackedSint32 = function(index) {
  1987. return /** @type {?number} */ (this.get$Value(58, index));
  1988. };
  1989. /**
  1990. * Gets the value of the packed_sint32 field at the index given or the default value if not set.
  1991. * @param {number} index The index to lookup.
  1992. * @return {number} The value.
  1993. */
  1994. proto2.TestAllTypes.prototype.getPackedSint32OrDefault = function(index) {
  1995. return /** @type {number} */ (this.get$ValueOrDefault(58, index));
  1996. };
  1997. /**
  1998. * Adds a value to the packed_sint32 field.
  1999. * @param {number} value The value to add.
  2000. */
  2001. proto2.TestAllTypes.prototype.addPackedSint32 = function(value) {
  2002. this.add$Value(58, value);
  2003. };
  2004. /**
  2005. * Returns the array of values in the packed_sint32 field.
  2006. * @return {!Array<number>} The values in the field.
  2007. */
  2008. proto2.TestAllTypes.prototype.packedSint32Array = function() {
  2009. return /** @type {!Array<number>} */ (this.array$Values(58));
  2010. };
  2011. /**
  2012. * @return {boolean} Whether the packed_sint32 field has a value.
  2013. */
  2014. proto2.TestAllTypes.prototype.hasPackedSint32 = function() {
  2015. return this.has$Value(58);
  2016. };
  2017. /**
  2018. * @return {number} The number of values in the packed_sint32 field.
  2019. */
  2020. proto2.TestAllTypes.prototype.packedSint32Count = function() {
  2021. return this.count$Values(58);
  2022. };
  2023. /**
  2024. * Clears the values in the packed_sint32 field.
  2025. */
  2026. proto2.TestAllTypes.prototype.clearPackedSint32 = function() {
  2027. this.clear$Field(58);
  2028. };
  2029. /**
  2030. * Gets the value of the packed_sint64 field at the index given.
  2031. * @param {number} index The index to lookup.
  2032. * @return {?number} The value.
  2033. */
  2034. proto2.TestAllTypes.prototype.getPackedSint64 = function(index) {
  2035. return /** @type {?number} */ (this.get$Value(59, index));
  2036. };
  2037. /**
  2038. * Gets the value of the packed_sint64 field at the index given or the default value if not set.
  2039. * @param {number} index The index to lookup.
  2040. * @return {number} The value.
  2041. */
  2042. proto2.TestAllTypes.prototype.getPackedSint64OrDefault = function(index) {
  2043. return /** @type {number} */ (this.get$ValueOrDefault(59, index));
  2044. };
  2045. /**
  2046. * Adds a value to the packed_sint64 field.
  2047. * @param {number} value The value to add.
  2048. */
  2049. proto2.TestAllTypes.prototype.addPackedSint64 = function(value) {
  2050. this.add$Value(59, value);
  2051. };
  2052. /**
  2053. * Returns the array of values in the packed_sint64 field.
  2054. * @return {!Array<number>} The values in the field.
  2055. */
  2056. proto2.TestAllTypes.prototype.packedSint64Array = function() {
  2057. return /** @type {!Array<number>} */ (this.array$Values(59));
  2058. };
  2059. /**
  2060. * @return {boolean} Whether the packed_sint64 field has a value.
  2061. */
  2062. proto2.TestAllTypes.prototype.hasPackedSint64 = function() {
  2063. return this.has$Value(59);
  2064. };
  2065. /**
  2066. * @return {number} The number of values in the packed_sint64 field.
  2067. */
  2068. proto2.TestAllTypes.prototype.packedSint64Count = function() {
  2069. return this.count$Values(59);
  2070. };
  2071. /**
  2072. * Clears the values in the packed_sint64 field.
  2073. */
  2074. proto2.TestAllTypes.prototype.clearPackedSint64 = function() {
  2075. this.clear$Field(59);
  2076. };
  2077. /**
  2078. * Gets the value of the packed_fixed32 field at the index given.
  2079. * @param {number} index The index to lookup.
  2080. * @return {?number} The value.
  2081. */
  2082. proto2.TestAllTypes.prototype.getPackedFixed32 = function(index) {
  2083. return /** @type {?number} */ (this.get$Value(60, index));
  2084. };
  2085. /**
  2086. * Gets the value of the packed_fixed32 field at the index given or the default value if not set.
  2087. * @param {number} index The index to lookup.
  2088. * @return {number} The value.
  2089. */
  2090. proto2.TestAllTypes.prototype.getPackedFixed32OrDefault = function(index) {
  2091. return /** @type {number} */ (this.get$ValueOrDefault(60, index));
  2092. };
  2093. /**
  2094. * Adds a value to the packed_fixed32 field.
  2095. * @param {number} value The value to add.
  2096. */
  2097. proto2.TestAllTypes.prototype.addPackedFixed32 = function(value) {
  2098. this.add$Value(60, value);
  2099. };
  2100. /**
  2101. * Returns the array of values in the packed_fixed32 field.
  2102. * @return {!Array<number>} The values in the field.
  2103. */
  2104. proto2.TestAllTypes.prototype.packedFixed32Array = function() {
  2105. return /** @type {!Array<number>} */ (this.array$Values(60));
  2106. };
  2107. /**
  2108. * @return {boolean} Whether the packed_fixed32 field has a value.
  2109. */
  2110. proto2.TestAllTypes.prototype.hasPackedFixed32 = function() {
  2111. return this.has$Value(60);
  2112. };
  2113. /**
  2114. * @return {number} The number of values in the packed_fixed32 field.
  2115. */
  2116. proto2.TestAllTypes.prototype.packedFixed32Count = function() {
  2117. return this.count$Values(60);
  2118. };
  2119. /**
  2120. * Clears the values in the packed_fixed32 field.
  2121. */
  2122. proto2.TestAllTypes.prototype.clearPackedFixed32 = function() {
  2123. this.clear$Field(60);
  2124. };
  2125. /**
  2126. * Gets the value of the packed_fixed64 field at the index given.
  2127. * @param {number} index The index to lookup.
  2128. * @return {?number} The value.
  2129. */
  2130. proto2.TestAllTypes.prototype.getPackedFixed64 = function(index) {
  2131. return /** @type {?number} */ (this.get$Value(61, index));
  2132. };
  2133. /**
  2134. * Gets the value of the packed_fixed64 field at the index given or the default value if not set.
  2135. * @param {number} index The index to lookup.
  2136. * @return {number} The value.
  2137. */
  2138. proto2.TestAllTypes.prototype.getPackedFixed64OrDefault = function(index) {
  2139. return /** @type {number} */ (this.get$ValueOrDefault(61, index));
  2140. };
  2141. /**
  2142. * Adds a value to the packed_fixed64 field.
  2143. * @param {number} value The value to add.
  2144. */
  2145. proto2.TestAllTypes.prototype.addPackedFixed64 = function(value) {
  2146. this.add$Value(61, value);
  2147. };
  2148. /**
  2149. * Returns the array of values in the packed_fixed64 field.
  2150. * @return {!Array<number>} The values in the field.
  2151. */
  2152. proto2.TestAllTypes.prototype.packedFixed64Array = function() {
  2153. return /** @type {!Array<number>} */ (this.array$Values(61));
  2154. };
  2155. /**
  2156. * @return {boolean} Whether the packed_fixed64 field has a value.
  2157. */
  2158. proto2.TestAllTypes.prototype.hasPackedFixed64 = function() {
  2159. return this.has$Value(61);
  2160. };
  2161. /**
  2162. * @return {number} The number of values in the packed_fixed64 field.
  2163. */
  2164. proto2.TestAllTypes.prototype.packedFixed64Count = function() {
  2165. return this.count$Values(61);
  2166. };
  2167. /**
  2168. * Clears the values in the packed_fixed64 field.
  2169. */
  2170. proto2.TestAllTypes.prototype.clearPackedFixed64 = function() {
  2171. this.clear$Field(61);
  2172. };
  2173. /**
  2174. * Gets the value of the packed_sfixed32 field at the index given.
  2175. * @param {number} index The index to lookup.
  2176. * @return {?number} The value.
  2177. */
  2178. proto2.TestAllTypes.prototype.getPackedSfixed32 = function(index) {
  2179. return /** @type {?number} */ (this.get$Value(62, index));
  2180. };
  2181. /**
  2182. * Gets the value of the packed_sfixed32 field at the index given or the default value if not set.
  2183. * @param {number} index The index to lookup.
  2184. * @return {number} The value.
  2185. */
  2186. proto2.TestAllTypes.prototype.getPackedSfixed32OrDefault = function(index) {
  2187. return /** @type {number} */ (this.get$ValueOrDefault(62, index));
  2188. };
  2189. /**
  2190. * Adds a value to the packed_sfixed32 field.
  2191. * @param {number} value The value to add.
  2192. */
  2193. proto2.TestAllTypes.prototype.addPackedSfixed32 = function(value) {
  2194. this.add$Value(62, value);
  2195. };
  2196. /**
  2197. * Returns the array of values in the packed_sfixed32 field.
  2198. * @return {!Array<number>} The values in the field.
  2199. */
  2200. proto2.TestAllTypes.prototype.packedSfixed32Array = function() {
  2201. return /** @type {!Array<number>} */ (this.array$Values(62));
  2202. };
  2203. /**
  2204. * @return {boolean} Whether the packed_sfixed32 field has a value.
  2205. */
  2206. proto2.TestAllTypes.prototype.hasPackedSfixed32 = function() {
  2207. return this.has$Value(62);
  2208. };
  2209. /**
  2210. * @return {number} The number of values in the packed_sfixed32 field.
  2211. */
  2212. proto2.TestAllTypes.prototype.packedSfixed32Count = function() {
  2213. return this.count$Values(62);
  2214. };
  2215. /**
  2216. * Clears the values in the packed_sfixed32 field.
  2217. */
  2218. proto2.TestAllTypes.prototype.clearPackedSfixed32 = function() {
  2219. this.clear$Field(62);
  2220. };
  2221. /**
  2222. * Gets the value of the packed_sfixed64 field at the index given.
  2223. * @param {number} index The index to lookup.
  2224. * @return {?number} The value.
  2225. */
  2226. proto2.TestAllTypes.prototype.getPackedSfixed64 = function(index) {
  2227. return /** @type {?number} */ (this.get$Value(63, index));
  2228. };
  2229. /**
  2230. * Gets the value of the packed_sfixed64 field at the index given or the default value if not set.
  2231. * @param {number} index The index to lookup.
  2232. * @return {number} The value.
  2233. */
  2234. proto2.TestAllTypes.prototype.getPackedSfixed64OrDefault = function(index) {
  2235. return /** @type {number} */ (this.get$ValueOrDefault(63, index));
  2236. };
  2237. /**
  2238. * Adds a value to the packed_sfixed64 field.
  2239. * @param {number} value The value to add.
  2240. */
  2241. proto2.TestAllTypes.prototype.addPackedSfixed64 = function(value) {
  2242. this.add$Value(63, value);
  2243. };
  2244. /**
  2245. * Returns the array of values in the packed_sfixed64 field.
  2246. * @return {!Array<number>} The values in the field.
  2247. */
  2248. proto2.TestAllTypes.prototype.packedSfixed64Array = function() {
  2249. return /** @type {!Array<number>} */ (this.array$Values(63));
  2250. };
  2251. /**
  2252. * @return {boolean} Whether the packed_sfixed64 field has a value.
  2253. */
  2254. proto2.TestAllTypes.prototype.hasPackedSfixed64 = function() {
  2255. return this.has$Value(63);
  2256. };
  2257. /**
  2258. * @return {number} The number of values in the packed_sfixed64 field.
  2259. */
  2260. proto2.TestAllTypes.prototype.packedSfixed64Count = function() {
  2261. return this.count$Values(63);
  2262. };
  2263. /**
  2264. * Clears the values in the packed_sfixed64 field.
  2265. */
  2266. proto2.TestAllTypes.prototype.clearPackedSfixed64 = function() {
  2267. this.clear$Field(63);
  2268. };
  2269. /**
  2270. * Gets the value of the packed_float field at the index given.
  2271. * @param {number} index The index to lookup.
  2272. * @return {?number} The value.
  2273. */
  2274. proto2.TestAllTypes.prototype.getPackedFloat = function(index) {
  2275. return /** @type {?number} */ (this.get$Value(64, index));
  2276. };
  2277. /**
  2278. * Gets the value of the packed_float field at the index given or the default value if not set.
  2279. * @param {number} index The index to lookup.
  2280. * @return {number} The value.
  2281. */
  2282. proto2.TestAllTypes.prototype.getPackedFloatOrDefault = function(index) {
  2283. return /** @type {number} */ (this.get$ValueOrDefault(64, index));
  2284. };
  2285. /**
  2286. * Adds a value to the packed_float field.
  2287. * @param {number} value The value to add.
  2288. */
  2289. proto2.TestAllTypes.prototype.addPackedFloat = function(value) {
  2290. this.add$Value(64, value);
  2291. };
  2292. /**
  2293. * Returns the array of values in the packed_float field.
  2294. * @return {!Array<number>} The values in the field.
  2295. */
  2296. proto2.TestAllTypes.prototype.packedFloatArray = function() {
  2297. return /** @type {!Array<number>} */ (this.array$Values(64));
  2298. };
  2299. /**
  2300. * @return {boolean} Whether the packed_float field has a value.
  2301. */
  2302. proto2.TestAllTypes.prototype.hasPackedFloat = function() {
  2303. return this.has$Value(64);
  2304. };
  2305. /**
  2306. * @return {number} The number of values in the packed_float field.
  2307. */
  2308. proto2.TestAllTypes.prototype.packedFloatCount = function() {
  2309. return this.count$Values(64);
  2310. };
  2311. /**
  2312. * Clears the values in the packed_float field.
  2313. */
  2314. proto2.TestAllTypes.prototype.clearPackedFloat = function() {
  2315. this.clear$Field(64);
  2316. };
  2317. /**
  2318. * Gets the value of the packed_double field at the index given.
  2319. * @param {number} index The index to lookup.
  2320. * @return {?number} The value.
  2321. */
  2322. proto2.TestAllTypes.prototype.getPackedDouble = function(index) {
  2323. return /** @type {?number} */ (this.get$Value(65, index));
  2324. };
  2325. /**
  2326. * Gets the value of the packed_double field at the index given or the default value if not set.
  2327. * @param {number} index The index to lookup.
  2328. * @return {number} The value.
  2329. */
  2330. proto2.TestAllTypes.prototype.getPackedDoubleOrDefault = function(index) {
  2331. return /** @type {number} */ (this.get$ValueOrDefault(65, index));
  2332. };
  2333. /**
  2334. * Adds a value to the packed_double field.
  2335. * @param {number} value The value to add.
  2336. */
  2337. proto2.TestAllTypes.prototype.addPackedDouble = function(value) {
  2338. this.add$Value(65, value);
  2339. };
  2340. /**
  2341. * Returns the array of values in the packed_double field.
  2342. * @return {!Array<number>} The values in the field.
  2343. */
  2344. proto2.TestAllTypes.prototype.packedDoubleArray = function() {
  2345. return /** @type {!Array<number>} */ (this.array$Values(65));
  2346. };
  2347. /**
  2348. * @return {boolean} Whether the packed_double field has a value.
  2349. */
  2350. proto2.TestAllTypes.prototype.hasPackedDouble = function() {
  2351. return this.has$Value(65);
  2352. };
  2353. /**
  2354. * @return {number} The number of values in the packed_double field.
  2355. */
  2356. proto2.TestAllTypes.prototype.packedDoubleCount = function() {
  2357. return this.count$Values(65);
  2358. };
  2359. /**
  2360. * Clears the values in the packed_double field.
  2361. */
  2362. proto2.TestAllTypes.prototype.clearPackedDouble = function() {
  2363. this.clear$Field(65);
  2364. };
  2365. /**
  2366. * Gets the value of the packed_bool field at the index given.
  2367. * @param {number} index The index to lookup.
  2368. * @return {?boolean} The value.
  2369. */
  2370. proto2.TestAllTypes.prototype.getPackedBool = function(index) {
  2371. return /** @type {?boolean} */ (this.get$Value(66, index));
  2372. };
  2373. /**
  2374. * Gets the value of the packed_bool field at the index given or the default value if not set.
  2375. * @param {number} index The index to lookup.
  2376. * @return {boolean} The value.
  2377. */
  2378. proto2.TestAllTypes.prototype.getPackedBoolOrDefault = function(index) {
  2379. return /** @type {boolean} */ (this.get$ValueOrDefault(66, index));
  2380. };
  2381. /**
  2382. * Adds a value to the packed_bool field.
  2383. * @param {boolean} value The value to add.
  2384. */
  2385. proto2.TestAllTypes.prototype.addPackedBool = function(value) {
  2386. this.add$Value(66, value);
  2387. };
  2388. /**
  2389. * Returns the array of values in the packed_bool field.
  2390. * @return {!Array<boolean>} The values in the field.
  2391. */
  2392. proto2.TestAllTypes.prototype.packedBoolArray = function() {
  2393. return /** @type {!Array<boolean>} */ (this.array$Values(66));
  2394. };
  2395. /**
  2396. * @return {boolean} Whether the packed_bool field has a value.
  2397. */
  2398. proto2.TestAllTypes.prototype.hasPackedBool = function() {
  2399. return this.has$Value(66);
  2400. };
  2401. /**
  2402. * @return {number} The number of values in the packed_bool field.
  2403. */
  2404. proto2.TestAllTypes.prototype.packedBoolCount = function() {
  2405. return this.count$Values(66);
  2406. };
  2407. /**
  2408. * Clears the values in the packed_bool field.
  2409. */
  2410. proto2.TestAllTypes.prototype.clearPackedBool = function() {
  2411. this.clear$Field(66);
  2412. };
  2413. /**
  2414. * Enumeration NestedEnum.
  2415. * @enum {number}
  2416. */
  2417. proto2.TestAllTypes.NestedEnum = {
  2418. FOO: 0,
  2419. OOF: 1,
  2420. BAR: 2,
  2421. BAZ: 3
  2422. };
  2423. /**
  2424. * Message NestedMessage.
  2425. * @constructor
  2426. * @extends {goog.proto2.Message}
  2427. * @final
  2428. */
  2429. proto2.TestAllTypes.NestedMessage = function() {
  2430. goog.proto2.Message.call(this);
  2431. };
  2432. goog.inherits(proto2.TestAllTypes.NestedMessage, goog.proto2.Message);
  2433. /**
  2434. * Descriptor for this message, deserialized lazily in getDescriptor().
  2435. * @private {?goog.proto2.Descriptor}
  2436. */
  2437. proto2.TestAllTypes.NestedMessage.descriptor_ = null;
  2438. /**
  2439. * Overrides {@link goog.proto2.Message#clone} to specify its exact return type.
  2440. * @return {!proto2.TestAllTypes.NestedMessage} The cloned message.
  2441. * @override
  2442. */
  2443. proto2.TestAllTypes.NestedMessage.prototype.clone;
  2444. /**
  2445. * Gets the value of the b field.
  2446. * @return {?number} The value.
  2447. */
  2448. proto2.TestAllTypes.NestedMessage.prototype.getB = function() {
  2449. return /** @type {?number} */ (this.get$Value(1));
  2450. };
  2451. /**
  2452. * Gets the value of the b field or the default value if not set.
  2453. * @return {number} The value.
  2454. */
  2455. proto2.TestAllTypes.NestedMessage.prototype.getBOrDefault = function() {
  2456. return /** @type {number} */ (this.get$ValueOrDefault(1));
  2457. };
  2458. /**
  2459. * Sets the value of the b field.
  2460. * @param {number} value The value.
  2461. */
  2462. proto2.TestAllTypes.NestedMessage.prototype.setB = function(value) {
  2463. this.set$Value(1, value);
  2464. };
  2465. /**
  2466. * @return {boolean} Whether the b field has a value.
  2467. */
  2468. proto2.TestAllTypes.NestedMessage.prototype.hasB = function() {
  2469. return this.has$Value(1);
  2470. };
  2471. /**
  2472. * @return {number} The number of values in the b field.
  2473. */
  2474. proto2.TestAllTypes.NestedMessage.prototype.bCount = function() {
  2475. return this.count$Values(1);
  2476. };
  2477. /**
  2478. * Clears the values in the b field.
  2479. */
  2480. proto2.TestAllTypes.NestedMessage.prototype.clearB = function() {
  2481. this.clear$Field(1);
  2482. };
  2483. /**
  2484. * Gets the value of the c field.
  2485. * @return {?number} The value.
  2486. */
  2487. proto2.TestAllTypes.NestedMessage.prototype.getC = function() {
  2488. return /** @type {?number} */ (this.get$Value(2));
  2489. };
  2490. /**
  2491. * Gets the value of the c field or the default value if not set.
  2492. * @return {number} The value.
  2493. */
  2494. proto2.TestAllTypes.NestedMessage.prototype.getCOrDefault = function() {
  2495. return /** @type {number} */ (this.get$ValueOrDefault(2));
  2496. };
  2497. /**
  2498. * Sets the value of the c field.
  2499. * @param {number} value The value.
  2500. */
  2501. proto2.TestAllTypes.NestedMessage.prototype.setC = function(value) {
  2502. this.set$Value(2, value);
  2503. };
  2504. /**
  2505. * @return {boolean} Whether the c field has a value.
  2506. */
  2507. proto2.TestAllTypes.NestedMessage.prototype.hasC = function() {
  2508. return this.has$Value(2);
  2509. };
  2510. /**
  2511. * @return {number} The number of values in the c field.
  2512. */
  2513. proto2.TestAllTypes.NestedMessage.prototype.cCount = function() {
  2514. return this.count$Values(2);
  2515. };
  2516. /**
  2517. * Clears the values in the c field.
  2518. */
  2519. proto2.TestAllTypes.NestedMessage.prototype.clearC = function() {
  2520. this.clear$Field(2);
  2521. };
  2522. /**
  2523. * Message OptionalGroup.
  2524. * @constructor
  2525. * @extends {goog.proto2.Message}
  2526. * @final
  2527. */
  2528. proto2.TestAllTypes.OptionalGroup = function() {
  2529. goog.proto2.Message.call(this);
  2530. };
  2531. goog.inherits(proto2.TestAllTypes.OptionalGroup, goog.proto2.Message);
  2532. /**
  2533. * Descriptor for this message, deserialized lazily in getDescriptor().
  2534. * @private {?goog.proto2.Descriptor}
  2535. */
  2536. proto2.TestAllTypes.OptionalGroup.descriptor_ = null;
  2537. /**
  2538. * Overrides {@link goog.proto2.Message#clone} to specify its exact return type.
  2539. * @return {!proto2.TestAllTypes.OptionalGroup} The cloned message.
  2540. * @override
  2541. */
  2542. proto2.TestAllTypes.OptionalGroup.prototype.clone;
  2543. /**
  2544. * Gets the value of the a field.
  2545. * @return {?number} The value.
  2546. */
  2547. proto2.TestAllTypes.OptionalGroup.prototype.getA = function() {
  2548. return /** @type {?number} */ (this.get$Value(17));
  2549. };
  2550. /**
  2551. * Gets the value of the a field or the default value if not set.
  2552. * @return {number} The value.
  2553. */
  2554. proto2.TestAllTypes.OptionalGroup.prototype.getAOrDefault = function() {
  2555. return /** @type {number} */ (this.get$ValueOrDefault(17));
  2556. };
  2557. /**
  2558. * Sets the value of the a field.
  2559. * @param {number} value The value.
  2560. */
  2561. proto2.TestAllTypes.OptionalGroup.prototype.setA = function(value) {
  2562. this.set$Value(17, value);
  2563. };
  2564. /**
  2565. * @return {boolean} Whether the a field has a value.
  2566. */
  2567. proto2.TestAllTypes.OptionalGroup.prototype.hasA = function() {
  2568. return this.has$Value(17);
  2569. };
  2570. /**
  2571. * @return {number} The number of values in the a field.
  2572. */
  2573. proto2.TestAllTypes.OptionalGroup.prototype.aCount = function() {
  2574. return this.count$Values(17);
  2575. };
  2576. /**
  2577. * Clears the values in the a field.
  2578. */
  2579. proto2.TestAllTypes.OptionalGroup.prototype.clearA = function() {
  2580. this.clear$Field(17);
  2581. };
  2582. /**
  2583. * Message RepeatedGroup.
  2584. * @constructor
  2585. * @extends {goog.proto2.Message}
  2586. * @final
  2587. */
  2588. proto2.TestAllTypes.RepeatedGroup = function() {
  2589. goog.proto2.Message.call(this);
  2590. };
  2591. goog.inherits(proto2.TestAllTypes.RepeatedGroup, goog.proto2.Message);
  2592. /**
  2593. * Descriptor for this message, deserialized lazily in getDescriptor().
  2594. * @private {?goog.proto2.Descriptor}
  2595. */
  2596. proto2.TestAllTypes.RepeatedGroup.descriptor_ = null;
  2597. /**
  2598. * Overrides {@link goog.proto2.Message#clone} to specify its exact return type.
  2599. * @return {!proto2.TestAllTypes.RepeatedGroup} The cloned message.
  2600. * @override
  2601. */
  2602. proto2.TestAllTypes.RepeatedGroup.prototype.clone;
  2603. /**
  2604. * Gets the value of the a field at the index given.
  2605. * @param {number} index The index to lookup.
  2606. * @return {?number} The value.
  2607. */
  2608. proto2.TestAllTypes.RepeatedGroup.prototype.getA = function(index) {
  2609. return /** @type {?number} */ (this.get$Value(47, index));
  2610. };
  2611. /**
  2612. * Gets the value of the a field at the index given or the default value if not set.
  2613. * @param {number} index The index to lookup.
  2614. * @return {number} The value.
  2615. */
  2616. proto2.TestAllTypes.RepeatedGroup.prototype.getAOrDefault = function(index) {
  2617. return /** @type {number} */ (this.get$ValueOrDefault(47, index));
  2618. };
  2619. /**
  2620. * Adds a value to the a field.
  2621. * @param {number} value The value to add.
  2622. */
  2623. proto2.TestAllTypes.RepeatedGroup.prototype.addA = function(value) {
  2624. this.add$Value(47, value);
  2625. };
  2626. /**
  2627. * Returns the array of values in the a field.
  2628. * @return {!Array<number>} The values in the field.
  2629. */
  2630. proto2.TestAllTypes.RepeatedGroup.prototype.aArray = function() {
  2631. return /** @type {!Array<number>} */ (this.array$Values(47));
  2632. };
  2633. /**
  2634. * @return {boolean} Whether the a field has a value.
  2635. */
  2636. proto2.TestAllTypes.RepeatedGroup.prototype.hasA = function() {
  2637. return this.has$Value(47);
  2638. };
  2639. /**
  2640. * @return {number} The number of values in the a field.
  2641. */
  2642. proto2.TestAllTypes.RepeatedGroup.prototype.aCount = function() {
  2643. return this.count$Values(47);
  2644. };
  2645. /**
  2646. * Clears the values in the a field.
  2647. */
  2648. proto2.TestAllTypes.RepeatedGroup.prototype.clearA = function() {
  2649. this.clear$Field(47);
  2650. };
  2651. /**
  2652. * Message TestDefaultParent.
  2653. * @constructor
  2654. * @extends {goog.proto2.Message}
  2655. * @final
  2656. */
  2657. proto2.TestDefaultParent = function() {
  2658. goog.proto2.Message.call(this);
  2659. };
  2660. goog.inherits(proto2.TestDefaultParent, goog.proto2.Message);
  2661. /**
  2662. * Descriptor for this message, deserialized lazily in getDescriptor().
  2663. * @private {?goog.proto2.Descriptor}
  2664. */
  2665. proto2.TestDefaultParent.descriptor_ = null;
  2666. /**
  2667. * Overrides {@link goog.proto2.Message#clone} to specify its exact return type.
  2668. * @return {!proto2.TestDefaultParent} The cloned message.
  2669. * @override
  2670. */
  2671. proto2.TestDefaultParent.prototype.clone;
  2672. /**
  2673. * Gets the value of the child field.
  2674. * @return {?proto2.TestDefaultChild} The value.
  2675. */
  2676. proto2.TestDefaultParent.prototype.getChild = function() {
  2677. return /** @type {?proto2.TestDefaultChild} */ (this.get$Value(1));
  2678. };
  2679. /**
  2680. * Gets the value of the child field or the default value if not set.
  2681. * @return {!proto2.TestDefaultChild} The value.
  2682. */
  2683. proto2.TestDefaultParent.prototype.getChildOrDefault = function() {
  2684. return /** @type {!proto2.TestDefaultChild} */ (this.get$ValueOrDefault(1));
  2685. };
  2686. /**
  2687. * Sets the value of the child field.
  2688. * @param {!proto2.TestDefaultChild} value The value.
  2689. */
  2690. proto2.TestDefaultParent.prototype.setChild = function(value) {
  2691. this.set$Value(1, value);
  2692. };
  2693. /**
  2694. * @return {boolean} Whether the child field has a value.
  2695. */
  2696. proto2.TestDefaultParent.prototype.hasChild = function() {
  2697. return this.has$Value(1);
  2698. };
  2699. /**
  2700. * @return {number} The number of values in the child field.
  2701. */
  2702. proto2.TestDefaultParent.prototype.childCount = function() {
  2703. return this.count$Values(1);
  2704. };
  2705. /**
  2706. * Clears the values in the child field.
  2707. */
  2708. proto2.TestDefaultParent.prototype.clearChild = function() {
  2709. this.clear$Field(1);
  2710. };
  2711. /**
  2712. * Message TestDefaultChild.
  2713. * @constructor
  2714. * @extends {goog.proto2.Message}
  2715. * @final
  2716. */
  2717. proto2.TestDefaultChild = function() {
  2718. goog.proto2.Message.call(this);
  2719. };
  2720. goog.inherits(proto2.TestDefaultChild, goog.proto2.Message);
  2721. /**
  2722. * Descriptor for this message, deserialized lazily in getDescriptor().
  2723. * @private {?goog.proto2.Descriptor}
  2724. */
  2725. proto2.TestDefaultChild.descriptor_ = null;
  2726. /**
  2727. * Overrides {@link goog.proto2.Message#clone} to specify its exact return type.
  2728. * @return {!proto2.TestDefaultChild} The cloned message.
  2729. * @override
  2730. */
  2731. proto2.TestDefaultChild.prototype.clone;
  2732. /**
  2733. * Gets the value of the foo field.
  2734. * @return {?boolean} The value.
  2735. */
  2736. proto2.TestDefaultChild.prototype.getFoo = function() {
  2737. return /** @type {?boolean} */ (this.get$Value(1));
  2738. };
  2739. /**
  2740. * Gets the value of the foo field or the default value if not set.
  2741. * @return {boolean} The value.
  2742. */
  2743. proto2.TestDefaultChild.prototype.getFooOrDefault = function() {
  2744. return /** @type {boolean} */ (this.get$ValueOrDefault(1));
  2745. };
  2746. /**
  2747. * Sets the value of the foo field.
  2748. * @param {boolean} value The value.
  2749. */
  2750. proto2.TestDefaultChild.prototype.setFoo = function(value) {
  2751. this.set$Value(1, value);
  2752. };
  2753. /**
  2754. * @return {boolean} Whether the foo field has a value.
  2755. */
  2756. proto2.TestDefaultChild.prototype.hasFoo = function() {
  2757. return this.has$Value(1);
  2758. };
  2759. /**
  2760. * @return {number} The number of values in the foo field.
  2761. */
  2762. proto2.TestDefaultChild.prototype.fooCount = function() {
  2763. return this.count$Values(1);
  2764. };
  2765. /**
  2766. * Clears the values in the foo field.
  2767. */
  2768. proto2.TestDefaultChild.prototype.clearFoo = function() {
  2769. this.clear$Field(1);
  2770. };
  2771. /** @override */
  2772. proto2.TestAllTypes.prototype.getDescriptor = function() {
  2773. var descriptor = proto2.TestAllTypes.descriptor_;
  2774. if (!descriptor) {
  2775. // The descriptor is created lazily when we instantiate a new instance.
  2776. var descriptorObj = {
  2777. 0: {
  2778. name: 'TestAllTypes',
  2779. fullName: 'TestAllTypes'
  2780. },
  2781. 1: {
  2782. name: 'optional_int32',
  2783. fieldType: goog.proto2.Message.FieldType.INT32,
  2784. type: Number
  2785. },
  2786. 2: {
  2787. name: 'optional_int64',
  2788. fieldType: goog.proto2.Message.FieldType.INT64,
  2789. defaultValue: '1',
  2790. type: String
  2791. },
  2792. 3: {
  2793. name: 'optional_uint32',
  2794. fieldType: goog.proto2.Message.FieldType.UINT32,
  2795. type: Number
  2796. },
  2797. 4: {
  2798. name: 'optional_uint64',
  2799. fieldType: goog.proto2.Message.FieldType.UINT64,
  2800. type: String
  2801. },
  2802. 5: {
  2803. name: 'optional_sint32',
  2804. fieldType: goog.proto2.Message.FieldType.SINT32,
  2805. type: Number
  2806. },
  2807. 6: {
  2808. name: 'optional_sint64',
  2809. fieldType: goog.proto2.Message.FieldType.SINT64,
  2810. type: String
  2811. },
  2812. 7: {
  2813. name: 'optional_fixed32',
  2814. fieldType: goog.proto2.Message.FieldType.FIXED32,
  2815. type: Number
  2816. },
  2817. 8: {
  2818. name: 'optional_fixed64',
  2819. fieldType: goog.proto2.Message.FieldType.FIXED64,
  2820. type: String
  2821. },
  2822. 9: {
  2823. name: 'optional_sfixed32',
  2824. fieldType: goog.proto2.Message.FieldType.SFIXED32,
  2825. type: Number
  2826. },
  2827. 10: {
  2828. name: 'optional_sfixed64',
  2829. fieldType: goog.proto2.Message.FieldType.SFIXED64,
  2830. type: String
  2831. },
  2832. 11: {
  2833. name: 'optional_float',
  2834. fieldType: goog.proto2.Message.FieldType.FLOAT,
  2835. defaultValue: 1.5,
  2836. type: Number
  2837. },
  2838. 12: {
  2839. name: 'optional_double',
  2840. fieldType: goog.proto2.Message.FieldType.DOUBLE,
  2841. type: Number
  2842. },
  2843. 13: {
  2844. name: 'optional_bool',
  2845. fieldType: goog.proto2.Message.FieldType.BOOL,
  2846. type: Boolean
  2847. },
  2848. 14: {
  2849. name: 'optional_string',
  2850. fieldType: goog.proto2.Message.FieldType.STRING,
  2851. type: String
  2852. },
  2853. 15: {
  2854. name: 'optional_bytes',
  2855. fieldType: goog.proto2.Message.FieldType.BYTES,
  2856. defaultValue: 'moo',
  2857. type: String
  2858. },
  2859. 16: {
  2860. name: 'optionalgroup',
  2861. fieldType: goog.proto2.Message.FieldType.GROUP,
  2862. type: proto2.TestAllTypes.OptionalGroup
  2863. },
  2864. 18: {
  2865. name: 'optional_nested_message',
  2866. fieldType: goog.proto2.Message.FieldType.MESSAGE,
  2867. type: proto2.TestAllTypes.NestedMessage
  2868. },
  2869. 21: {
  2870. name: 'optional_nested_enum',
  2871. fieldType: goog.proto2.Message.FieldType.ENUM,
  2872. defaultValue: proto2.TestAllTypes.NestedEnum.FOO,
  2873. type: proto2.TestAllTypes.NestedEnum
  2874. },
  2875. 50: {
  2876. name: 'optional_int64_number',
  2877. fieldType: goog.proto2.Message.FieldType.INT64,
  2878. defaultValue: 1000000000000000001,
  2879. type: Number
  2880. },
  2881. 51: {
  2882. name: 'optional_int64_string',
  2883. fieldType: goog.proto2.Message.FieldType.INT64,
  2884. defaultValue: '1000000000000000001',
  2885. type: String
  2886. },
  2887. 31: {
  2888. name: 'repeated_int32',
  2889. repeated: true,
  2890. fieldType: goog.proto2.Message.FieldType.INT32,
  2891. type: Number
  2892. },
  2893. 32: {
  2894. name: 'repeated_int64',
  2895. repeated: true,
  2896. fieldType: goog.proto2.Message.FieldType.INT64,
  2897. type: String
  2898. },
  2899. 33: {
  2900. name: 'repeated_uint32',
  2901. repeated: true,
  2902. fieldType: goog.proto2.Message.FieldType.UINT32,
  2903. type: Number
  2904. },
  2905. 34: {
  2906. name: 'repeated_uint64',
  2907. repeated: true,
  2908. fieldType: goog.proto2.Message.FieldType.UINT64,
  2909. type: String
  2910. },
  2911. 35: {
  2912. name: 'repeated_sint32',
  2913. repeated: true,
  2914. fieldType: goog.proto2.Message.FieldType.SINT32,
  2915. type: Number
  2916. },
  2917. 36: {
  2918. name: 'repeated_sint64',
  2919. repeated: true,
  2920. fieldType: goog.proto2.Message.FieldType.SINT64,
  2921. type: String
  2922. },
  2923. 37: {
  2924. name: 'repeated_fixed32',
  2925. repeated: true,
  2926. fieldType: goog.proto2.Message.FieldType.FIXED32,
  2927. type: Number
  2928. },
  2929. 38: {
  2930. name: 'repeated_fixed64',
  2931. repeated: true,
  2932. fieldType: goog.proto2.Message.FieldType.FIXED64,
  2933. type: String
  2934. },
  2935. 39: {
  2936. name: 'repeated_sfixed32',
  2937. repeated: true,
  2938. fieldType: goog.proto2.Message.FieldType.SFIXED32,
  2939. type: Number
  2940. },
  2941. 40: {
  2942. name: 'repeated_sfixed64',
  2943. repeated: true,
  2944. fieldType: goog.proto2.Message.FieldType.SFIXED64,
  2945. type: String
  2946. },
  2947. 41: {
  2948. name: 'repeated_float',
  2949. repeated: true,
  2950. fieldType: goog.proto2.Message.FieldType.FLOAT,
  2951. type: Number
  2952. },
  2953. 42: {
  2954. name: 'repeated_double',
  2955. repeated: true,
  2956. fieldType: goog.proto2.Message.FieldType.DOUBLE,
  2957. type: Number
  2958. },
  2959. 43: {
  2960. name: 'repeated_bool',
  2961. repeated: true,
  2962. fieldType: goog.proto2.Message.FieldType.BOOL,
  2963. type: Boolean
  2964. },
  2965. 44: {
  2966. name: 'repeated_string',
  2967. repeated: true,
  2968. fieldType: goog.proto2.Message.FieldType.STRING,
  2969. type: String
  2970. },
  2971. 45: {
  2972. name: 'repeated_bytes',
  2973. repeated: true,
  2974. fieldType: goog.proto2.Message.FieldType.BYTES,
  2975. type: String
  2976. },
  2977. 46: {
  2978. name: 'repeatedgroup',
  2979. repeated: true,
  2980. fieldType: goog.proto2.Message.FieldType.GROUP,
  2981. type: proto2.TestAllTypes.RepeatedGroup
  2982. },
  2983. 48: {
  2984. name: 'repeated_nested_message',
  2985. repeated: true,
  2986. fieldType: goog.proto2.Message.FieldType.MESSAGE,
  2987. type: proto2.TestAllTypes.NestedMessage
  2988. },
  2989. 49: {
  2990. name: 'repeated_nested_enum',
  2991. repeated: true,
  2992. fieldType: goog.proto2.Message.FieldType.ENUM,
  2993. defaultValue: proto2.TestAllTypes.NestedEnum.FOO,
  2994. type: proto2.TestAllTypes.NestedEnum
  2995. },
  2996. 52: {
  2997. name: 'repeated_int64_number',
  2998. repeated: true,
  2999. fieldType: goog.proto2.Message.FieldType.INT64,
  3000. type: Number
  3001. },
  3002. 53: {
  3003. name: 'repeated_int64_string',
  3004. repeated: true,
  3005. fieldType: goog.proto2.Message.FieldType.INT64,
  3006. type: String
  3007. },
  3008. 54: {
  3009. name: 'packed_int32',
  3010. repeated: true,
  3011. packed: true,
  3012. fieldType: goog.proto2.Message.FieldType.INT32,
  3013. type: Number
  3014. },
  3015. 55: {
  3016. name: 'packed_int64',
  3017. repeated: true,
  3018. packed: true,
  3019. fieldType: goog.proto2.Message.FieldType.INT64,
  3020. type: Number
  3021. },
  3022. 56: {
  3023. name: 'packed_uint32',
  3024. repeated: true,
  3025. packed: true,
  3026. fieldType: goog.proto2.Message.FieldType.UINT32,
  3027. type: Number
  3028. },
  3029. 57: {
  3030. name: 'packed_uint64',
  3031. repeated: true,
  3032. packed: true,
  3033. fieldType: goog.proto2.Message.FieldType.UINT64,
  3034. type: Number
  3035. },
  3036. 58: {
  3037. name: 'packed_sint32',
  3038. repeated: true,
  3039. packed: true,
  3040. fieldType: goog.proto2.Message.FieldType.SINT32,
  3041. type: Number
  3042. },
  3043. 59: {
  3044. name: 'packed_sint64',
  3045. repeated: true,
  3046. packed: true,
  3047. fieldType: goog.proto2.Message.FieldType.SINT64,
  3048. type: Number
  3049. },
  3050. 60: {
  3051. name: 'packed_fixed32',
  3052. repeated: true,
  3053. packed: true,
  3054. fieldType: goog.proto2.Message.FieldType.FIXED32,
  3055. type: Number
  3056. },
  3057. 61: {
  3058. name: 'packed_fixed64',
  3059. repeated: true,
  3060. packed: true,
  3061. fieldType: goog.proto2.Message.FieldType.FIXED64,
  3062. type: Number
  3063. },
  3064. 62: {
  3065. name: 'packed_sfixed32',
  3066. repeated: true,
  3067. packed: true,
  3068. fieldType: goog.proto2.Message.FieldType.SFIXED32,
  3069. type: Number
  3070. },
  3071. 63: {
  3072. name: 'packed_sfixed64',
  3073. repeated: true,
  3074. packed: true,
  3075. fieldType: goog.proto2.Message.FieldType.SFIXED64,
  3076. type: Number
  3077. },
  3078. 64: {
  3079. name: 'packed_float',
  3080. repeated: true,
  3081. packed: true,
  3082. fieldType: goog.proto2.Message.FieldType.FLOAT,
  3083. type: Number
  3084. },
  3085. 65: {
  3086. name: 'packed_double',
  3087. repeated: true,
  3088. packed: true,
  3089. fieldType: goog.proto2.Message.FieldType.DOUBLE,
  3090. type: Number
  3091. },
  3092. 66: {
  3093. name: 'packed_bool',
  3094. repeated: true,
  3095. packed: true,
  3096. fieldType: goog.proto2.Message.FieldType.BOOL,
  3097. type: Boolean
  3098. }
  3099. };
  3100. proto2.TestAllTypes.descriptor_ = descriptor =
  3101. goog.proto2.Message.createDescriptor(
  3102. proto2.TestAllTypes, descriptorObj);
  3103. }
  3104. return descriptor;
  3105. };
  3106. /** @nocollapse */
  3107. proto2.TestAllTypes.getDescriptor =
  3108. proto2.TestAllTypes.prototype.getDescriptor;
  3109. /** @override */
  3110. proto2.TestAllTypes.NestedMessage.prototype.getDescriptor = function() {
  3111. var descriptor = proto2.TestAllTypes.NestedMessage.descriptor_;
  3112. if (!descriptor) {
  3113. // The descriptor is created lazily when we instantiate a new instance.
  3114. var descriptorObj = {
  3115. 0: {
  3116. name: 'NestedMessage',
  3117. containingType: proto2.TestAllTypes,
  3118. fullName: 'TestAllTypes.NestedMessage'
  3119. },
  3120. 1: {
  3121. name: 'b',
  3122. fieldType: goog.proto2.Message.FieldType.INT32,
  3123. type: Number
  3124. },
  3125. 2: {
  3126. name: 'c',
  3127. fieldType: goog.proto2.Message.FieldType.INT32,
  3128. type: Number
  3129. }
  3130. };
  3131. proto2.TestAllTypes.NestedMessage.descriptor_ = descriptor =
  3132. goog.proto2.Message.createDescriptor(
  3133. proto2.TestAllTypes.NestedMessage, descriptorObj);
  3134. }
  3135. return descriptor;
  3136. };
  3137. /** @nocollapse */
  3138. proto2.TestAllTypes.NestedMessage.getDescriptor =
  3139. proto2.TestAllTypes.NestedMessage.prototype.getDescriptor;
  3140. /** @override */
  3141. proto2.TestAllTypes.OptionalGroup.prototype.getDescriptor = function() {
  3142. var descriptor = proto2.TestAllTypes.OptionalGroup.descriptor_;
  3143. if (!descriptor) {
  3144. // The descriptor is created lazily when we instantiate a new instance.
  3145. var descriptorObj = {
  3146. 0: {
  3147. name: 'OptionalGroup',
  3148. containingType: proto2.TestAllTypes,
  3149. fullName: 'TestAllTypes.OptionalGroup'
  3150. },
  3151. 17: {
  3152. name: 'a',
  3153. fieldType: goog.proto2.Message.FieldType.INT32,
  3154. type: Number
  3155. }
  3156. };
  3157. proto2.TestAllTypes.OptionalGroup.descriptor_ = descriptor =
  3158. goog.proto2.Message.createDescriptor(
  3159. proto2.TestAllTypes.OptionalGroup, descriptorObj);
  3160. }
  3161. return descriptor;
  3162. };
  3163. /** @nocollapse */
  3164. proto2.TestAllTypes.OptionalGroup.getDescriptor =
  3165. proto2.TestAllTypes.OptionalGroup.prototype.getDescriptor;
  3166. /** @override */
  3167. proto2.TestAllTypes.RepeatedGroup.prototype.getDescriptor = function() {
  3168. var descriptor = proto2.TestAllTypes.RepeatedGroup.descriptor_;
  3169. if (!descriptor) {
  3170. // The descriptor is created lazily when we instantiate a new instance.
  3171. var descriptorObj = {
  3172. 0: {
  3173. name: 'RepeatedGroup',
  3174. containingType: proto2.TestAllTypes,
  3175. fullName: 'TestAllTypes.RepeatedGroup'
  3176. },
  3177. 47: {
  3178. name: 'a',
  3179. repeated: true,
  3180. fieldType: goog.proto2.Message.FieldType.INT32,
  3181. type: Number
  3182. }
  3183. };
  3184. proto2.TestAllTypes.RepeatedGroup.descriptor_ = descriptor =
  3185. goog.proto2.Message.createDescriptor(
  3186. proto2.TestAllTypes.RepeatedGroup, descriptorObj);
  3187. }
  3188. return descriptor;
  3189. };
  3190. /** @nocollapse */
  3191. proto2.TestAllTypes.RepeatedGroup.getDescriptor =
  3192. proto2.TestAllTypes.RepeatedGroup.prototype.getDescriptor;
  3193. /** @override */
  3194. proto2.TestDefaultParent.prototype.getDescriptor = function() {
  3195. var descriptor = proto2.TestDefaultParent.descriptor_;
  3196. if (!descriptor) {
  3197. // The descriptor is created lazily when we instantiate a new instance.
  3198. var descriptorObj = {
  3199. 0: {
  3200. name: 'TestDefaultParent',
  3201. fullName: 'TestDefaultParent'
  3202. },
  3203. 1: {
  3204. name: 'child',
  3205. fieldType: goog.proto2.Message.FieldType.MESSAGE,
  3206. type: proto2.TestDefaultChild
  3207. }
  3208. };
  3209. proto2.TestDefaultParent.descriptor_ = descriptor =
  3210. goog.proto2.Message.createDescriptor(
  3211. proto2.TestDefaultParent, descriptorObj);
  3212. }
  3213. return descriptor;
  3214. };
  3215. /** @nocollapse */
  3216. proto2.TestDefaultParent.getDescriptor =
  3217. proto2.TestDefaultParent.prototype.getDescriptor;
  3218. /** @override */
  3219. proto2.TestDefaultChild.prototype.getDescriptor = function() {
  3220. var descriptor = proto2.TestDefaultChild.descriptor_;
  3221. if (!descriptor) {
  3222. // The descriptor is created lazily when we instantiate a new instance.
  3223. var descriptorObj = {
  3224. 0: {
  3225. name: 'TestDefaultChild',
  3226. fullName: 'TestDefaultChild'
  3227. },
  3228. 1: {
  3229. name: 'foo',
  3230. fieldType: goog.proto2.Message.FieldType.BOOL,
  3231. defaultValue: true,
  3232. type: Boolean
  3233. }
  3234. };
  3235. proto2.TestDefaultChild.descriptor_ = descriptor =
  3236. goog.proto2.Message.createDescriptor(
  3237. proto2.TestDefaultChild, descriptorObj);
  3238. }
  3239. return descriptor;
  3240. };
  3241. /** @nocollapse */
  3242. proto2.TestDefaultChild.getDescriptor =
  3243. proto2.TestDefaultChild.prototype.getDescriptor;