/closure/closure-library/closure/goog/proto2/package_test.pb.js

https://code.google.com/p/plovr/ · JavaScript · 165 lines · 61 code · 34 blank · 70 comment · 0 complexity · be25de5bed93da10867bcb42d0b46c14 MD5 · raw file

  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/package_test.proto.
  18. */
  19. goog.provide('someprotopackage.TestPackageTypes');
  20. goog.require('goog.proto2.Message');
  21. goog.require('proto2.TestAllTypes');
  22. goog.setTestOnly('package_test.pb');
  23. /**
  24. * Message TestPackageTypes.
  25. * @constructor
  26. * @extends {goog.proto2.Message}
  27. */
  28. someprotopackage.TestPackageTypes = function() {
  29. goog.proto2.Message.apply(this);
  30. };
  31. goog.inherits(someprotopackage.TestPackageTypes, goog.proto2.Message);
  32. /**
  33. * Overrides {@link goog.proto2.Message#clone} to specify its exact return type.
  34. * @return {!someprotopackage.TestPackageTypes} The cloned message.
  35. * @override
  36. */
  37. someprotopackage.TestPackageTypes.prototype.clone;
  38. /**
  39. * Gets the value of the optional_int32 field.
  40. * @return {?number} The value.
  41. */
  42. someprotopackage.TestPackageTypes.prototype.getOptionalInt32 = function() {
  43. return /** @type {?number} */ (this.get$Value(1));
  44. };
  45. /**
  46. * Gets the value of the optional_int32 field or the default value if not set.
  47. * @return {number} The value.
  48. */
  49. someprotopackage.TestPackageTypes.prototype.getOptionalInt32OrDefault = function() {
  50. return /** @type {number} */ (this.get$ValueOrDefault(1));
  51. };
  52. /**
  53. * Sets the value of the optional_int32 field.
  54. * @param {number} value The value.
  55. */
  56. someprotopackage.TestPackageTypes.prototype.setOptionalInt32 = function(value) {
  57. this.set$Value(1, value);
  58. };
  59. /**
  60. * @return {boolean} Whether the optional_int32 field has a value.
  61. */
  62. someprotopackage.TestPackageTypes.prototype.hasOptionalInt32 = function() {
  63. return this.has$Value(1);
  64. };
  65. /**
  66. * @return {number} The number of values in the optional_int32 field.
  67. */
  68. someprotopackage.TestPackageTypes.prototype.optionalInt32Count = function() {
  69. return this.count$Values(1);
  70. };
  71. /**
  72. * Clears the values in the optional_int32 field.
  73. */
  74. someprotopackage.TestPackageTypes.prototype.clearOptionalInt32 = function() {
  75. this.clear$Field(1);
  76. };
  77. /**
  78. * Gets the value of the other_all field.
  79. * @return {proto2.TestAllTypes} The value.
  80. */
  81. someprotopackage.TestPackageTypes.prototype.getOtherAll = function() {
  82. return /** @type {proto2.TestAllTypes} */ (this.get$Value(2));
  83. };
  84. /**
  85. * Gets the value of the other_all field or the default value if not set.
  86. * @return {!proto2.TestAllTypes} The value.
  87. */
  88. someprotopackage.TestPackageTypes.prototype.getOtherAllOrDefault = function() {
  89. return /** @type {!proto2.TestAllTypes} */ (this.get$ValueOrDefault(2));
  90. };
  91. /**
  92. * Sets the value of the other_all field.
  93. * @param {!proto2.TestAllTypes} value The value.
  94. */
  95. someprotopackage.TestPackageTypes.prototype.setOtherAll = function(value) {
  96. this.set$Value(2, value);
  97. };
  98. /**
  99. * @return {boolean} Whether the other_all field has a value.
  100. */
  101. someprotopackage.TestPackageTypes.prototype.hasOtherAll = function() {
  102. return this.has$Value(2);
  103. };
  104. /**
  105. * @return {number} The number of values in the other_all field.
  106. */
  107. someprotopackage.TestPackageTypes.prototype.otherAllCount = function() {
  108. return this.count$Values(2);
  109. };
  110. /**
  111. * Clears the values in the other_all field.
  112. */
  113. someprotopackage.TestPackageTypes.prototype.clearOtherAll = function() {
  114. this.clear$Field(2);
  115. };
  116. goog.proto2.Message.set$Metadata(someprotopackage.TestPackageTypes, {
  117. 0: {
  118. name: 'TestPackageTypes',
  119. fullName: 'someprotopackage.TestPackageTypes'
  120. },
  121. 1: {
  122. name: 'optional_int32',
  123. fieldType: goog.proto2.Message.FieldType.INT32,
  124. type: Number
  125. },
  126. 2: {
  127. name: 'other_all',
  128. fieldType: goog.proto2.Message.FieldType.MESSAGE,
  129. type: proto2.TestAllTypes
  130. }
  131. });