@kenji71089/evaluation 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/.release-please-manifest.json +3 -0
  2. package/README.md +9 -0
  3. package/eslint.config.mjs +27 -0
  4. package/lib/clauseEvaluator.d.ts +22 -0
  5. package/lib/clauseEvaluator.js +299 -0
  6. package/lib/clauseEvaluator.mjs +214 -0
  7. package/lib/dependencyEvaluator.d.ts +6 -0
  8. package/lib/dependencyEvaluator.js +46 -0
  9. package/lib/dependencyEvaluator.mjs +19 -0
  10. package/lib/errors.d.ts +9 -0
  11. package/lib/errors.js +15 -0
  12. package/lib/errors.mjs +12 -0
  13. package/lib/evaluation.d.ts +25 -0
  14. package/lib/evaluation.js +503 -0
  15. package/lib/evaluation.mjs +328 -0
  16. package/lib/google/api/annotations_pb.d.ts +8 -0
  17. package/lib/google/api/annotations_pb.js +40 -0
  18. package/lib/google/api/annotations_pb.mjs +54 -0
  19. package/lib/google/api/annotations_pb_service.d.ts +3 -0
  20. package/lib/google/api/annotations_pb_service.js +3 -0
  21. package/lib/google/api/annotations_pb_service.mjs +3 -0
  22. package/lib/google/api/http_pb.d.ts +132 -0
  23. package/lib/google/api/http_pb.js +860 -0
  24. package/lib/google/api/http_pb.mjs +982 -0
  25. package/lib/google/api/http_pb_service.d.ts +3 -0
  26. package/lib/google/api/http_pb_service.js +3 -0
  27. package/lib/google/api/http_pb_service.mjs +3 -0
  28. package/lib/google/rpc/code_pb.d.ts +26 -0
  29. package/lib/google/rpc/code_pb.js +44 -0
  30. package/lib/google/rpc/code_pb.mjs +48 -0
  31. package/lib/google/rpc/code_pb_service.d.ts +3 -0
  32. package/lib/google/rpc/code_pb_service.js +3 -0
  33. package/lib/google/rpc/code_pb_service.mjs +3 -0
  34. package/lib/google/rpc/error_details_pb.d.ts +322 -0
  35. package/lib/google/rpc/error_details_pb.js +2220 -0
  36. package/lib/google/rpc/error_details_pb.mjs +2499 -0
  37. package/lib/google/rpc/error_details_pb_service.d.ts +3 -0
  38. package/lib/google/rpc/error_details_pb_service.js +3 -0
  39. package/lib/google/rpc/error_details_pb_service.mjs +3 -0
  40. package/lib/google/rpc/status_pb.d.ts +36 -0
  41. package/lib/google/rpc/status_pb.js +235 -0
  42. package/lib/google/rpc/status_pb.mjs +268 -0
  43. package/lib/google/rpc/status_pb_service.d.ts +3 -0
  44. package/lib/google/rpc/status_pb_service.js +3 -0
  45. package/lib/google/rpc/status_pb_service.mjs +3 -0
  46. package/lib/index.d.ts +20 -0
  47. package/lib/index.js +199 -0
  48. package/lib/index.mjs +46 -0
  49. package/lib/modelFactory.d.ts +64 -0
  50. package/lib/modelFactory.js +206 -0
  51. package/lib/modelFactory.mjs +176 -0
  52. package/lib/proto/event/client/event_pb.d.ts +761 -0
  53. package/lib/proto/event/client/event_pb.js +5195 -0
  54. package/lib/proto/event/client/event_pb.mjs +5865 -0
  55. package/lib/proto/event/client/event_pb_service.d.ts +3 -0
  56. package/lib/proto/event/client/event_pb_service.js +3 -0
  57. package/lib/proto/event/client/event_pb_service.mjs +3 -0
  58. package/lib/proto/event/domain/event_pb.d.ts +4518 -0
  59. package/lib/proto/event/domain/event_pb.js +10834 -0
  60. package/lib/proto/event/domain/event_pb.mjs +33315 -0
  61. package/lib/proto/event/domain/event_pb_service.d.ts +3 -0
  62. package/lib/proto/event/domain/event_pb_service.js +3 -0
  63. package/lib/proto/event/domain/event_pb_service.mjs +3 -0
  64. package/lib/proto/event/domain/localized_message_pb.d.ts +29 -0
  65. package/lib/proto/event/domain/localized_message_pb.js +183 -0
  66. package/lib/proto/event/domain/localized_message_pb.mjs +206 -0
  67. package/lib/proto/event/domain/localized_message_pb_service.d.ts +3 -0
  68. package/lib/proto/event/domain/localized_message_pb_service.js +3 -0
  69. package/lib/proto/event/domain/localized_message_pb_service.mjs +3 -0
  70. package/lib/proto/event/service/feature_pb.d.ts +44 -0
  71. package/lib/proto/event/service/feature_pb.js +277 -0
  72. package/lib/proto/event/service/feature_pb.mjs +319 -0
  73. package/lib/proto/event/service/feature_pb_service.d.ts +3 -0
  74. package/lib/proto/event/service/feature_pb_service.js +3 -0
  75. package/lib/proto/event/service/feature_pb_service.mjs +3 -0
  76. package/lib/proto/event/service/segment_pb.d.ts +51 -0
  77. package/lib/proto/event/service/segment_pb.js +324 -0
  78. package/lib/proto/event/service/segment_pb.mjs +375 -0
  79. package/lib/proto/event/service/segment_pb_service.d.ts +3 -0
  80. package/lib/proto/event/service/segment_pb_service.js +3 -0
  81. package/lib/proto/event/service/segment_pb_service.mjs +3 -0
  82. package/lib/proto/event/service/user_pb.d.ts +49 -0
  83. package/lib/proto/event/service/user_pb.js +315 -0
  84. package/lib/proto/event/service/user_pb.mjs +362 -0
  85. package/lib/proto/event/service/user_pb_service.d.ts +3 -0
  86. package/lib/proto/event/service/user_pb_service.js +3 -0
  87. package/lib/proto/event/service/user_pb_service.mjs +3 -0
  88. package/lib/proto/feature/clause_pb.d.ts +57 -0
  89. package/lib/proto/feature/clause_pb.js +277 -0
  90. package/lib/proto/feature/clause_pb.mjs +312 -0
  91. package/lib/proto/feature/clause_pb_service.d.ts +3 -0
  92. package/lib/proto/feature/clause_pb_service.js +3 -0
  93. package/lib/proto/feature/clause_pb_service.mjs +3 -0
  94. package/lib/proto/feature/command_pb.d.ts +1213 -0
  95. package/lib/proto/feature/command_pb.js +8260 -0
  96. package/lib/proto/feature/command_pb.mjs +9275 -0
  97. package/lib/proto/feature/command_pb_service.d.ts +3 -0
  98. package/lib/proto/feature/command_pb_service.js +3 -0
  99. package/lib/proto/feature/command_pb_service.mjs +3 -0
  100. package/lib/proto/feature/evaluation_pb.d.ts +111 -0
  101. package/lib/proto/feature/evaluation_pb.js +685 -0
  102. package/lib/proto/feature/evaluation_pb.mjs +793 -0
  103. package/lib/proto/feature/evaluation_pb_service.d.ts +3 -0
  104. package/lib/proto/feature/evaluation_pb_service.js +3 -0
  105. package/lib/proto/feature/evaluation_pb_service.mjs +3 -0
  106. package/lib/proto/feature/feature_last_used_info_pb.d.ts +45 -0
  107. package/lib/proto/feature/feature_last_used_info_pb.js +283 -0
  108. package/lib/proto/feature/feature_last_used_info_pb.mjs +326 -0
  109. package/lib/proto/feature/feature_last_used_info_pb_service.d.ts +3 -0
  110. package/lib/proto/feature/feature_last_used_info_pb_service.js +3 -0
  111. package/lib/proto/feature/feature_last_used_info_pb_service.mjs +3 -0
  112. package/lib/proto/feature/feature_pb.d.ts +192 -0
  113. package/lib/proto/feature/feature_pb.js +1210 -0
  114. package/lib/proto/feature/feature_pb.mjs +1413 -0
  115. package/lib/proto/feature/feature_pb_service.d.ts +3 -0
  116. package/lib/proto/feature/feature_pb_service.js +3 -0
  117. package/lib/proto/feature/feature_pb_service.mjs +3 -0
  118. package/lib/proto/feature/flag_trigger_pb.d.ts +84 -0
  119. package/lib/proto/feature/flag_trigger_pb.js +452 -0
  120. package/lib/proto/feature/flag_trigger_pb.mjs +525 -0
  121. package/lib/proto/feature/flag_trigger_pb_service.d.ts +3 -0
  122. package/lib/proto/feature/flag_trigger_pb_service.js +3 -0
  123. package/lib/proto/feature/flag_trigger_pb_service.mjs +3 -0
  124. package/lib/proto/feature/prerequisite_pb.d.ts +29 -0
  125. package/lib/proto/feature/prerequisite_pb.js +183 -0
  126. package/lib/proto/feature/prerequisite_pb.mjs +206 -0
  127. package/lib/proto/feature/prerequisite_pb_service.d.ts +3 -0
  128. package/lib/proto/feature/prerequisite_pb_service.js +3 -0
  129. package/lib/proto/feature/prerequisite_pb_service.mjs +3 -0
  130. package/lib/proto/feature/reason_pb.d.ts +40 -0
  131. package/lib/proto/feature/reason_pb.js +196 -0
  132. package/lib/proto/feature/reason_pb.mjs +219 -0
  133. package/lib/proto/feature/reason_pb_service.d.ts +3 -0
  134. package/lib/proto/feature/reason_pb_service.js +3 -0
  135. package/lib/proto/feature/reason_pb_service.mjs +3 -0
  136. package/lib/proto/feature/rule_pb.d.ts +39 -0
  137. package/lib/proto/feature/rule_pb.js +254 -0
  138. package/lib/proto/feature/rule_pb.mjs +291 -0
  139. package/lib/proto/feature/rule_pb_service.d.ts +3 -0
  140. package/lib/proto/feature/rule_pb_service.js +3 -0
  141. package/lib/proto/feature/rule_pb_service.mjs +3 -0
  142. package/lib/proto/feature/segment_pb.d.ts +161 -0
  143. package/lib/proto/feature/segment_pb.js +974 -0
  144. package/lib/proto/feature/segment_pb.mjs +1127 -0
  145. package/lib/proto/feature/segment_pb_service.d.ts +3 -0
  146. package/lib/proto/feature/segment_pb_service.js +3 -0
  147. package/lib/proto/feature/segment_pb_service.mjs +3 -0
  148. package/lib/proto/feature/service_pb.d.ts +2158 -0
  149. package/lib/proto/feature/service_pb.js +5363 -0
  150. package/lib/proto/feature/service_pb.mjs +16348 -0
  151. package/lib/proto/feature/service_pb_service.d.ts +747 -0
  152. package/lib/proto/feature/service_pb_service.js +1424 -0
  153. package/lib/proto/feature/service_pb_service.mjs +1501 -0
  154. package/lib/proto/feature/strategy_pb.d.ts +110 -0
  155. package/lib/proto/feature/strategy_pb.js +712 -0
  156. package/lib/proto/feature/strategy_pb.mjs +803 -0
  157. package/lib/proto/feature/strategy_pb_service.d.ts +3 -0
  158. package/lib/proto/feature/strategy_pb_service.js +3 -0
  159. package/lib/proto/feature/strategy_pb_service.mjs +3 -0
  160. package/lib/proto/feature/target_pb.d.ts +31 -0
  161. package/lib/proto/feature/target_pb.js +207 -0
  162. package/lib/proto/feature/target_pb.mjs +232 -0
  163. package/lib/proto/feature/target_pb_service.d.ts +3 -0
  164. package/lib/proto/feature/target_pb_service.js +3 -0
  165. package/lib/proto/feature/target_pb_service.mjs +3 -0
  166. package/lib/proto/feature/variation_pb.d.ts +37 -0
  167. package/lib/proto/feature/variation_pb.js +233 -0
  168. package/lib/proto/feature/variation_pb.mjs +266 -0
  169. package/lib/proto/feature/variation_pb_service.d.ts +3 -0
  170. package/lib/proto/feature/variation_pb_service.js +3 -0
  171. package/lib/proto/feature/variation_pb_service.mjs +3 -0
  172. package/lib/proto/gateway/service_pb.d.ts +772 -0
  173. package/lib/proto/gateway/service_pb.js +5249 -0
  174. package/lib/proto/gateway/service_pb.mjs +6001 -0
  175. package/lib/proto/gateway/service_pb_service.d.ts +253 -0
  176. package/lib/proto/gateway/service_pb_service.js +436 -0
  177. package/lib/proto/gateway/service_pb_service.mjs +461 -0
  178. package/lib/proto/user/user_pb.d.ts +58 -0
  179. package/lib/proto/user/user_pb.js +410 -0
  180. package/lib/proto/user/user_pb.mjs +460 -0
  181. package/lib/proto/user/user_pb_service.d.ts +3 -0
  182. package/lib/proto/user/user_pb_service.js +3 -0
  183. package/lib/proto/user/user_pb_service.mjs +3 -0
  184. package/lib/protoc-gen-openapiv2/options/annotations_pb.d.ts +16 -0
  185. package/lib/protoc-gen-openapiv2/options/annotations_pb.js +100 -0
  186. package/lib/protoc-gen-openapiv2/options/annotations_pb.mjs +158 -0
  187. package/lib/protoc-gen-openapiv2/options/annotations_pb_service.d.ts +3 -0
  188. package/lib/protoc-gen-openapiv2/options/annotations_pb_service.js +3 -0
  189. package/lib/protoc-gen-openapiv2/options/annotations_pb_service.mjs +3 -0
  190. package/lib/protoc-gen-openapiv2/options/openapiv2_pb.d.ts +834 -0
  191. package/lib/protoc-gen-openapiv2/options/openapiv2_pb.js +5456 -0
  192. package/lib/protoc-gen-openapiv2/options/openapiv2_pb.mjs +6256 -0
  193. package/lib/protoc-gen-openapiv2/options/openapiv2_pb_service.d.ts +3 -0
  194. package/lib/protoc-gen-openapiv2/options/openapiv2_pb_service.js +3 -0
  195. package/lib/protoc-gen-openapiv2/options/openapiv2_pb_service.mjs +3 -0
  196. package/lib/ruleEvaluator.d.ts +13 -0
  197. package/lib/ruleEvaluator.js +80 -0
  198. package/lib/ruleEvaluator.mjs +41 -0
  199. package/lib/segmentEvaluator.d.ts +7 -0
  200. package/lib/segmentEvaluator.js +74 -0
  201. package/lib/segmentEvaluator.mjs +34 -0
  202. package/lib/strategyEvaluator.d.ts +10 -0
  203. package/lib/strategyEvaluator.js +135 -0
  204. package/lib/strategyEvaluator.mjs +83 -0
  205. package/lib/userEvaluation.d.ts +8 -0
  206. package/lib/userEvaluation.js +70 -0
  207. package/lib/userEvaluation.mjs +60 -0
  208. package/package.json +46 -0
  209. package/release-please-config.json +22 -0
@@ -0,0 +1,2220 @@
1
+ "use strict";
2
+
3
+ // source: google/rpc/error_details.proto
4
+ /**
5
+ * @fileoverview
6
+ * @enhanceable
7
+ * @suppress {missingRequire} reports error on implicit type usages.
8
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
9
+ * field starts with 'MSG_' and isn't a translatable message.
10
+ * @public
11
+ */
12
+ // GENERATED CODE -- DO NOT EDIT!
13
+
14
+ // @ts-nocheck
15
+
16
+ var jspb = require('google-protobuf');
17
+ var goog = jspb;
18
+ var global = typeof globalThis !== 'undefined' && globalThis || typeof window !== 'undefined' && window || typeof global !== 'undefined' && global || typeof self !== 'undefined' && self || function () {
19
+ return this;
20
+ }.call(null) || Function('return this')();
21
+ var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js');
22
+ goog.object.extend(proto, google_protobuf_duration_pb);
23
+ goog.exportSymbol('proto.google.rpc.BadRequest', null, global);
24
+ goog.exportSymbol('proto.google.rpc.BadRequest.FieldViolation', null, global);
25
+ goog.exportSymbol('proto.google.rpc.DebugInfo', null, global);
26
+ goog.exportSymbol('proto.google.rpc.Help', null, global);
27
+ goog.exportSymbol('proto.google.rpc.Help.Link', null, global);
28
+ goog.exportSymbol('proto.google.rpc.LocalizedMessage', null, global);
29
+ goog.exportSymbol('proto.google.rpc.PreconditionFailure', null, global);
30
+ goog.exportSymbol('proto.google.rpc.PreconditionFailure.Violation', null, global);
31
+ goog.exportSymbol('proto.google.rpc.QuotaFailure', null, global);
32
+ goog.exportSymbol('proto.google.rpc.QuotaFailure.Violation', null, global);
33
+ goog.exportSymbol('proto.google.rpc.RequestInfo', null, global);
34
+ goog.exportSymbol('proto.google.rpc.ResourceInfo', null, global);
35
+ goog.exportSymbol('proto.google.rpc.RetryInfo', null, global);
36
+ /**
37
+ * Generated by JsPbCodeGenerator.
38
+ * @param {Array=} opt_data Optional initial data array, typically from a
39
+ * server response, or constructed directly in Javascript. The array is used
40
+ * in place and becomes part of the constructed object. It is not cloned.
41
+ * If no data is provided, the constructed object will be empty, but still
42
+ * valid.
43
+ * @extends {jspb.Message}
44
+ * @constructor
45
+ */
46
+ proto.google.rpc.RetryInfo = function (opt_data) {
47
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
48
+ };
49
+ goog.inherits(proto.google.rpc.RetryInfo, jspb.Message);
50
+ if (goog.DEBUG && !COMPILED) {
51
+ /**
52
+ * @public
53
+ * @override
54
+ */
55
+ proto.google.rpc.RetryInfo.displayName = 'proto.google.rpc.RetryInfo';
56
+ }
57
+ /**
58
+ * Generated by JsPbCodeGenerator.
59
+ * @param {Array=} opt_data Optional initial data array, typically from a
60
+ * server response, or constructed directly in Javascript. The array is used
61
+ * in place and becomes part of the constructed object. It is not cloned.
62
+ * If no data is provided, the constructed object will be empty, but still
63
+ * valid.
64
+ * @extends {jspb.Message}
65
+ * @constructor
66
+ */
67
+ proto.google.rpc.DebugInfo = function (opt_data) {
68
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.DebugInfo.repeatedFields_, null);
69
+ };
70
+ goog.inherits(proto.google.rpc.DebugInfo, jspb.Message);
71
+ if (goog.DEBUG && !COMPILED) {
72
+ /**
73
+ * @public
74
+ * @override
75
+ */
76
+ proto.google.rpc.DebugInfo.displayName = 'proto.google.rpc.DebugInfo';
77
+ }
78
+ /**
79
+ * Generated by JsPbCodeGenerator.
80
+ * @param {Array=} opt_data Optional initial data array, typically from a
81
+ * server response, or constructed directly in Javascript. The array is used
82
+ * in place and becomes part of the constructed object. It is not cloned.
83
+ * If no data is provided, the constructed object will be empty, but still
84
+ * valid.
85
+ * @extends {jspb.Message}
86
+ * @constructor
87
+ */
88
+ proto.google.rpc.QuotaFailure = function (opt_data) {
89
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.QuotaFailure.repeatedFields_, null);
90
+ };
91
+ goog.inherits(proto.google.rpc.QuotaFailure, jspb.Message);
92
+ if (goog.DEBUG && !COMPILED) {
93
+ /**
94
+ * @public
95
+ * @override
96
+ */
97
+ proto.google.rpc.QuotaFailure.displayName = 'proto.google.rpc.QuotaFailure';
98
+ }
99
+ /**
100
+ * Generated by JsPbCodeGenerator.
101
+ * @param {Array=} opt_data Optional initial data array, typically from a
102
+ * server response, or constructed directly in Javascript. The array is used
103
+ * in place and becomes part of the constructed object. It is not cloned.
104
+ * If no data is provided, the constructed object will be empty, but still
105
+ * valid.
106
+ * @extends {jspb.Message}
107
+ * @constructor
108
+ */
109
+ proto.google.rpc.QuotaFailure.Violation = function (opt_data) {
110
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
111
+ };
112
+ goog.inherits(proto.google.rpc.QuotaFailure.Violation, jspb.Message);
113
+ if (goog.DEBUG && !COMPILED) {
114
+ /**
115
+ * @public
116
+ * @override
117
+ */
118
+ proto.google.rpc.QuotaFailure.Violation.displayName = 'proto.google.rpc.QuotaFailure.Violation';
119
+ }
120
+ /**
121
+ * Generated by JsPbCodeGenerator.
122
+ * @param {Array=} opt_data Optional initial data array, typically from a
123
+ * server response, or constructed directly in Javascript. The array is used
124
+ * in place and becomes part of the constructed object. It is not cloned.
125
+ * If no data is provided, the constructed object will be empty, but still
126
+ * valid.
127
+ * @extends {jspb.Message}
128
+ * @constructor
129
+ */
130
+ proto.google.rpc.PreconditionFailure = function (opt_data) {
131
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.PreconditionFailure.repeatedFields_, null);
132
+ };
133
+ goog.inherits(proto.google.rpc.PreconditionFailure, jspb.Message);
134
+ if (goog.DEBUG && !COMPILED) {
135
+ /**
136
+ * @public
137
+ * @override
138
+ */
139
+ proto.google.rpc.PreconditionFailure.displayName = 'proto.google.rpc.PreconditionFailure';
140
+ }
141
+ /**
142
+ * Generated by JsPbCodeGenerator.
143
+ * @param {Array=} opt_data Optional initial data array, typically from a
144
+ * server response, or constructed directly in Javascript. The array is used
145
+ * in place and becomes part of the constructed object. It is not cloned.
146
+ * If no data is provided, the constructed object will be empty, but still
147
+ * valid.
148
+ * @extends {jspb.Message}
149
+ * @constructor
150
+ */
151
+ proto.google.rpc.PreconditionFailure.Violation = function (opt_data) {
152
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
153
+ };
154
+ goog.inherits(proto.google.rpc.PreconditionFailure.Violation, jspb.Message);
155
+ if (goog.DEBUG && !COMPILED) {
156
+ /**
157
+ * @public
158
+ * @override
159
+ */
160
+ proto.google.rpc.PreconditionFailure.Violation.displayName = 'proto.google.rpc.PreconditionFailure.Violation';
161
+ }
162
+ /**
163
+ * Generated by JsPbCodeGenerator.
164
+ * @param {Array=} opt_data Optional initial data array, typically from a
165
+ * server response, or constructed directly in Javascript. The array is used
166
+ * in place and becomes part of the constructed object. It is not cloned.
167
+ * If no data is provided, the constructed object will be empty, but still
168
+ * valid.
169
+ * @extends {jspb.Message}
170
+ * @constructor
171
+ */
172
+ proto.google.rpc.BadRequest = function (opt_data) {
173
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.BadRequest.repeatedFields_, null);
174
+ };
175
+ goog.inherits(proto.google.rpc.BadRequest, jspb.Message);
176
+ if (goog.DEBUG && !COMPILED) {
177
+ /**
178
+ * @public
179
+ * @override
180
+ */
181
+ proto.google.rpc.BadRequest.displayName = 'proto.google.rpc.BadRequest';
182
+ }
183
+ /**
184
+ * Generated by JsPbCodeGenerator.
185
+ * @param {Array=} opt_data Optional initial data array, typically from a
186
+ * server response, or constructed directly in Javascript. The array is used
187
+ * in place and becomes part of the constructed object. It is not cloned.
188
+ * If no data is provided, the constructed object will be empty, but still
189
+ * valid.
190
+ * @extends {jspb.Message}
191
+ * @constructor
192
+ */
193
+ proto.google.rpc.BadRequest.FieldViolation = function (opt_data) {
194
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
195
+ };
196
+ goog.inherits(proto.google.rpc.BadRequest.FieldViolation, jspb.Message);
197
+ if (goog.DEBUG && !COMPILED) {
198
+ /**
199
+ * @public
200
+ * @override
201
+ */
202
+ proto.google.rpc.BadRequest.FieldViolation.displayName = 'proto.google.rpc.BadRequest.FieldViolation';
203
+ }
204
+ /**
205
+ * Generated by JsPbCodeGenerator.
206
+ * @param {Array=} opt_data Optional initial data array, typically from a
207
+ * server response, or constructed directly in Javascript. The array is used
208
+ * in place and becomes part of the constructed object. It is not cloned.
209
+ * If no data is provided, the constructed object will be empty, but still
210
+ * valid.
211
+ * @extends {jspb.Message}
212
+ * @constructor
213
+ */
214
+ proto.google.rpc.RequestInfo = function (opt_data) {
215
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
216
+ };
217
+ goog.inherits(proto.google.rpc.RequestInfo, jspb.Message);
218
+ if (goog.DEBUG && !COMPILED) {
219
+ /**
220
+ * @public
221
+ * @override
222
+ */
223
+ proto.google.rpc.RequestInfo.displayName = 'proto.google.rpc.RequestInfo';
224
+ }
225
+ /**
226
+ * Generated by JsPbCodeGenerator.
227
+ * @param {Array=} opt_data Optional initial data array, typically from a
228
+ * server response, or constructed directly in Javascript. The array is used
229
+ * in place and becomes part of the constructed object. It is not cloned.
230
+ * If no data is provided, the constructed object will be empty, but still
231
+ * valid.
232
+ * @extends {jspb.Message}
233
+ * @constructor
234
+ */
235
+ proto.google.rpc.ResourceInfo = function (opt_data) {
236
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
237
+ };
238
+ goog.inherits(proto.google.rpc.ResourceInfo, jspb.Message);
239
+ if (goog.DEBUG && !COMPILED) {
240
+ /**
241
+ * @public
242
+ * @override
243
+ */
244
+ proto.google.rpc.ResourceInfo.displayName = 'proto.google.rpc.ResourceInfo';
245
+ }
246
+ /**
247
+ * Generated by JsPbCodeGenerator.
248
+ * @param {Array=} opt_data Optional initial data array, typically from a
249
+ * server response, or constructed directly in Javascript. The array is used
250
+ * in place and becomes part of the constructed object. It is not cloned.
251
+ * If no data is provided, the constructed object will be empty, but still
252
+ * valid.
253
+ * @extends {jspb.Message}
254
+ * @constructor
255
+ */
256
+ proto.google.rpc.Help = function (opt_data) {
257
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.Help.repeatedFields_, null);
258
+ };
259
+ goog.inherits(proto.google.rpc.Help, jspb.Message);
260
+ if (goog.DEBUG && !COMPILED) {
261
+ /**
262
+ * @public
263
+ * @override
264
+ */
265
+ proto.google.rpc.Help.displayName = 'proto.google.rpc.Help';
266
+ }
267
+ /**
268
+ * Generated by JsPbCodeGenerator.
269
+ * @param {Array=} opt_data Optional initial data array, typically from a
270
+ * server response, or constructed directly in Javascript. The array is used
271
+ * in place and becomes part of the constructed object. It is not cloned.
272
+ * If no data is provided, the constructed object will be empty, but still
273
+ * valid.
274
+ * @extends {jspb.Message}
275
+ * @constructor
276
+ */
277
+ proto.google.rpc.Help.Link = function (opt_data) {
278
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
279
+ };
280
+ goog.inherits(proto.google.rpc.Help.Link, jspb.Message);
281
+ if (goog.DEBUG && !COMPILED) {
282
+ /**
283
+ * @public
284
+ * @override
285
+ */
286
+ proto.google.rpc.Help.Link.displayName = 'proto.google.rpc.Help.Link';
287
+ }
288
+ /**
289
+ * Generated by JsPbCodeGenerator.
290
+ * @param {Array=} opt_data Optional initial data array, typically from a
291
+ * server response, or constructed directly in Javascript. The array is used
292
+ * in place and becomes part of the constructed object. It is not cloned.
293
+ * If no data is provided, the constructed object will be empty, but still
294
+ * valid.
295
+ * @extends {jspb.Message}
296
+ * @constructor
297
+ */
298
+ proto.google.rpc.LocalizedMessage = function (opt_data) {
299
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
300
+ };
301
+ goog.inherits(proto.google.rpc.LocalizedMessage, jspb.Message);
302
+ if (goog.DEBUG && !COMPILED) {
303
+ /**
304
+ * @public
305
+ * @override
306
+ */
307
+ proto.google.rpc.LocalizedMessage.displayName = 'proto.google.rpc.LocalizedMessage';
308
+ }
309
+ if (jspb.Message.GENERATE_TO_OBJECT) {
310
+ /**
311
+ * Creates an object representation of this proto.
312
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
313
+ * Optional fields that are not set will be set to undefined.
314
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
315
+ * For the list of reserved names please see:
316
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
317
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
318
+ * JSPB instance for transitional soy proto support:
319
+ * http://goto/soy-param-migration
320
+ * @return {!Object}
321
+ */
322
+ proto.google.rpc.RetryInfo.prototype.toObject = function (opt_includeInstance) {
323
+ return proto.google.rpc.RetryInfo.toObject(opt_includeInstance, this);
324
+ };
325
+
326
+ /**
327
+ * Static version of the {@see toObject} method.
328
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
329
+ * the JSPB instance for transitional soy proto support:
330
+ * http://goto/soy-param-migration
331
+ * @param {!proto.google.rpc.RetryInfo} msg The msg instance to transform.
332
+ * @return {!Object}
333
+ * @suppress {unusedLocalVariables} f is only used for nested messages
334
+ */
335
+ proto.google.rpc.RetryInfo.toObject = function (includeInstance, msg) {
336
+ var f,
337
+ obj = {
338
+ retryDelay: (f = msg.getRetryDelay()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f)
339
+ };
340
+ if (includeInstance) {
341
+ obj.$jspbMessageInstance = msg;
342
+ }
343
+ return obj;
344
+ };
345
+ }
346
+
347
+ /**
348
+ * Deserializes binary data (in protobuf wire format).
349
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
350
+ * @return {!proto.google.rpc.RetryInfo}
351
+ */
352
+ proto.google.rpc.RetryInfo.deserializeBinary = function (bytes) {
353
+ var reader = new jspb.BinaryReader(bytes);
354
+ var msg = new proto.google.rpc.RetryInfo();
355
+ return proto.google.rpc.RetryInfo.deserializeBinaryFromReader(msg, reader);
356
+ };
357
+
358
+ /**
359
+ * Deserializes binary data (in protobuf wire format) from the
360
+ * given reader into the given message object.
361
+ * @param {!proto.google.rpc.RetryInfo} msg The message object to deserialize into.
362
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
363
+ * @return {!proto.google.rpc.RetryInfo}
364
+ */
365
+ proto.google.rpc.RetryInfo.deserializeBinaryFromReader = function (msg, reader) {
366
+ while (reader.nextField()) {
367
+ if (reader.isEndGroup()) {
368
+ break;
369
+ }
370
+ var field = reader.getFieldNumber();
371
+ switch (field) {
372
+ case 1:
373
+ var value = new google_protobuf_duration_pb.Duration();
374
+ reader.readMessage(value, google_protobuf_duration_pb.Duration.deserializeBinaryFromReader);
375
+ msg.setRetryDelay(value);
376
+ break;
377
+ default:
378
+ reader.skipField();
379
+ break;
380
+ }
381
+ }
382
+ return msg;
383
+ };
384
+
385
+ /**
386
+ * Serializes the message to binary data (in protobuf wire format).
387
+ * @return {!Uint8Array}
388
+ */
389
+ proto.google.rpc.RetryInfo.prototype.serializeBinary = function () {
390
+ var writer = new jspb.BinaryWriter();
391
+ proto.google.rpc.RetryInfo.serializeBinaryToWriter(this, writer);
392
+ return writer.getResultBuffer();
393
+ };
394
+
395
+ /**
396
+ * Serializes the given message to binary data (in protobuf wire
397
+ * format), writing to the given BinaryWriter.
398
+ * @param {!proto.google.rpc.RetryInfo} message
399
+ * @param {!jspb.BinaryWriter} writer
400
+ * @suppress {unusedLocalVariables} f is only used for nested messages
401
+ */
402
+ proto.google.rpc.RetryInfo.serializeBinaryToWriter = function (message, writer) {
403
+ var f = undefined;
404
+ f = message.getRetryDelay();
405
+ if (f != null) {
406
+ writer.writeMessage(1, f, google_protobuf_duration_pb.Duration.serializeBinaryToWriter);
407
+ }
408
+ };
409
+
410
+ /**
411
+ * optional google.protobuf.Duration retry_delay = 1;
412
+ * @return {?proto.google.protobuf.Duration}
413
+ */
414
+ proto.google.rpc.RetryInfo.prototype.getRetryDelay = function () {
415
+ return /** @type{?proto.google.protobuf.Duration} */jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 1);
416
+ };
417
+
418
+ /**
419
+ * @param {?proto.google.protobuf.Duration|undefined} value
420
+ * @return {!proto.google.rpc.RetryInfo} returns this
421
+ */
422
+ proto.google.rpc.RetryInfo.prototype.setRetryDelay = function (value) {
423
+ return jspb.Message.setWrapperField(this, 1, value);
424
+ };
425
+
426
+ /**
427
+ * Clears the message field making it undefined.
428
+ * @return {!proto.google.rpc.RetryInfo} returns this
429
+ */
430
+ proto.google.rpc.RetryInfo.prototype.clearRetryDelay = function () {
431
+ return this.setRetryDelay(undefined);
432
+ };
433
+
434
+ /**
435
+ * Returns whether this field is set.
436
+ * @return {boolean}
437
+ */
438
+ proto.google.rpc.RetryInfo.prototype.hasRetryDelay = function () {
439
+ return jspb.Message.getField(this, 1) != null;
440
+ };
441
+
442
+ /**
443
+ * List of repeated fields within this message type.
444
+ * @private {!Array<number>}
445
+ * @const
446
+ */
447
+ proto.google.rpc.DebugInfo.repeatedFields_ = [1];
448
+ if (jspb.Message.GENERATE_TO_OBJECT) {
449
+ /**
450
+ * Creates an object representation of this proto.
451
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
452
+ * Optional fields that are not set will be set to undefined.
453
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
454
+ * For the list of reserved names please see:
455
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
456
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
457
+ * JSPB instance for transitional soy proto support:
458
+ * http://goto/soy-param-migration
459
+ * @return {!Object}
460
+ */
461
+ proto.google.rpc.DebugInfo.prototype.toObject = function (opt_includeInstance) {
462
+ return proto.google.rpc.DebugInfo.toObject(opt_includeInstance, this);
463
+ };
464
+
465
+ /**
466
+ * Static version of the {@see toObject} method.
467
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
468
+ * the JSPB instance for transitional soy proto support:
469
+ * http://goto/soy-param-migration
470
+ * @param {!proto.google.rpc.DebugInfo} msg The msg instance to transform.
471
+ * @return {!Object}
472
+ * @suppress {unusedLocalVariables} f is only used for nested messages
473
+ */
474
+ proto.google.rpc.DebugInfo.toObject = function (includeInstance, msg) {
475
+ var f,
476
+ obj = {
477
+ stackEntriesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
478
+ detail: jspb.Message.getFieldWithDefault(msg, 2, "")
479
+ };
480
+ if (includeInstance) {
481
+ obj.$jspbMessageInstance = msg;
482
+ }
483
+ return obj;
484
+ };
485
+ }
486
+
487
+ /**
488
+ * Deserializes binary data (in protobuf wire format).
489
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
490
+ * @return {!proto.google.rpc.DebugInfo}
491
+ */
492
+ proto.google.rpc.DebugInfo.deserializeBinary = function (bytes) {
493
+ var reader = new jspb.BinaryReader(bytes);
494
+ var msg = new proto.google.rpc.DebugInfo();
495
+ return proto.google.rpc.DebugInfo.deserializeBinaryFromReader(msg, reader);
496
+ };
497
+
498
+ /**
499
+ * Deserializes binary data (in protobuf wire format) from the
500
+ * given reader into the given message object.
501
+ * @param {!proto.google.rpc.DebugInfo} msg The message object to deserialize into.
502
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
503
+ * @return {!proto.google.rpc.DebugInfo}
504
+ */
505
+ proto.google.rpc.DebugInfo.deserializeBinaryFromReader = function (msg, reader) {
506
+ while (reader.nextField()) {
507
+ if (reader.isEndGroup()) {
508
+ break;
509
+ }
510
+ var field = reader.getFieldNumber();
511
+ switch (field) {
512
+ case 1:
513
+ var value = /** @type {string} */reader.readString();
514
+ msg.addStackEntries(value);
515
+ break;
516
+ case 2:
517
+ var value = /** @type {string} */reader.readString();
518
+ msg.setDetail(value);
519
+ break;
520
+ default:
521
+ reader.skipField();
522
+ break;
523
+ }
524
+ }
525
+ return msg;
526
+ };
527
+
528
+ /**
529
+ * Serializes the message to binary data (in protobuf wire format).
530
+ * @return {!Uint8Array}
531
+ */
532
+ proto.google.rpc.DebugInfo.prototype.serializeBinary = function () {
533
+ var writer = new jspb.BinaryWriter();
534
+ proto.google.rpc.DebugInfo.serializeBinaryToWriter(this, writer);
535
+ return writer.getResultBuffer();
536
+ };
537
+
538
+ /**
539
+ * Serializes the given message to binary data (in protobuf wire
540
+ * format), writing to the given BinaryWriter.
541
+ * @param {!proto.google.rpc.DebugInfo} message
542
+ * @param {!jspb.BinaryWriter} writer
543
+ * @suppress {unusedLocalVariables} f is only used for nested messages
544
+ */
545
+ proto.google.rpc.DebugInfo.serializeBinaryToWriter = function (message, writer) {
546
+ var f = undefined;
547
+ f = message.getStackEntriesList();
548
+ if (f.length > 0) {
549
+ writer.writeRepeatedString(1, f);
550
+ }
551
+ f = message.getDetail();
552
+ if (f.length > 0) {
553
+ writer.writeString(2, f);
554
+ }
555
+ };
556
+
557
+ /**
558
+ * repeated string stack_entries = 1;
559
+ * @return {!Array<string>}
560
+ */
561
+ proto.google.rpc.DebugInfo.prototype.getStackEntriesList = function () {
562
+ return /** @type {!Array<string>} */jspb.Message.getRepeatedField(this, 1);
563
+ };
564
+
565
+ /**
566
+ * @param {!Array<string>} value
567
+ * @return {!proto.google.rpc.DebugInfo} returns this
568
+ */
569
+ proto.google.rpc.DebugInfo.prototype.setStackEntriesList = function (value) {
570
+ return jspb.Message.setField(this, 1, value || []);
571
+ };
572
+
573
+ /**
574
+ * @param {string} value
575
+ * @param {number=} opt_index
576
+ * @return {!proto.google.rpc.DebugInfo} returns this
577
+ */
578
+ proto.google.rpc.DebugInfo.prototype.addStackEntries = function (value, opt_index) {
579
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
580
+ };
581
+
582
+ /**
583
+ * Clears the list making it empty but non-null.
584
+ * @return {!proto.google.rpc.DebugInfo} returns this
585
+ */
586
+ proto.google.rpc.DebugInfo.prototype.clearStackEntriesList = function () {
587
+ return this.setStackEntriesList([]);
588
+ };
589
+
590
+ /**
591
+ * optional string detail = 2;
592
+ * @return {string}
593
+ */
594
+ proto.google.rpc.DebugInfo.prototype.getDetail = function () {
595
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 2, "");
596
+ };
597
+
598
+ /**
599
+ * @param {string} value
600
+ * @return {!proto.google.rpc.DebugInfo} returns this
601
+ */
602
+ proto.google.rpc.DebugInfo.prototype.setDetail = function (value) {
603
+ return jspb.Message.setProto3StringField(this, 2, value);
604
+ };
605
+
606
+ /**
607
+ * List of repeated fields within this message type.
608
+ * @private {!Array<number>}
609
+ * @const
610
+ */
611
+ proto.google.rpc.QuotaFailure.repeatedFields_ = [1];
612
+ if (jspb.Message.GENERATE_TO_OBJECT) {
613
+ /**
614
+ * Creates an object representation of this proto.
615
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
616
+ * Optional fields that are not set will be set to undefined.
617
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
618
+ * For the list of reserved names please see:
619
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
620
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
621
+ * JSPB instance for transitional soy proto support:
622
+ * http://goto/soy-param-migration
623
+ * @return {!Object}
624
+ */
625
+ proto.google.rpc.QuotaFailure.prototype.toObject = function (opt_includeInstance) {
626
+ return proto.google.rpc.QuotaFailure.toObject(opt_includeInstance, this);
627
+ };
628
+
629
+ /**
630
+ * Static version of the {@see toObject} method.
631
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
632
+ * the JSPB instance for transitional soy proto support:
633
+ * http://goto/soy-param-migration
634
+ * @param {!proto.google.rpc.QuotaFailure} msg The msg instance to transform.
635
+ * @return {!Object}
636
+ * @suppress {unusedLocalVariables} f is only used for nested messages
637
+ */
638
+ proto.google.rpc.QuotaFailure.toObject = function (includeInstance, msg) {
639
+ var f,
640
+ obj = {
641
+ violationsList: jspb.Message.toObjectList(msg.getViolationsList(), proto.google.rpc.QuotaFailure.Violation.toObject, includeInstance)
642
+ };
643
+ if (includeInstance) {
644
+ obj.$jspbMessageInstance = msg;
645
+ }
646
+ return obj;
647
+ };
648
+ }
649
+
650
+ /**
651
+ * Deserializes binary data (in protobuf wire format).
652
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
653
+ * @return {!proto.google.rpc.QuotaFailure}
654
+ */
655
+ proto.google.rpc.QuotaFailure.deserializeBinary = function (bytes) {
656
+ var reader = new jspb.BinaryReader(bytes);
657
+ var msg = new proto.google.rpc.QuotaFailure();
658
+ return proto.google.rpc.QuotaFailure.deserializeBinaryFromReader(msg, reader);
659
+ };
660
+
661
+ /**
662
+ * Deserializes binary data (in protobuf wire format) from the
663
+ * given reader into the given message object.
664
+ * @param {!proto.google.rpc.QuotaFailure} msg The message object to deserialize into.
665
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
666
+ * @return {!proto.google.rpc.QuotaFailure}
667
+ */
668
+ proto.google.rpc.QuotaFailure.deserializeBinaryFromReader = function (msg, reader) {
669
+ while (reader.nextField()) {
670
+ if (reader.isEndGroup()) {
671
+ break;
672
+ }
673
+ var field = reader.getFieldNumber();
674
+ switch (field) {
675
+ case 1:
676
+ var value = new proto.google.rpc.QuotaFailure.Violation();
677
+ reader.readMessage(value, proto.google.rpc.QuotaFailure.Violation.deserializeBinaryFromReader);
678
+ msg.addViolations(value);
679
+ break;
680
+ default:
681
+ reader.skipField();
682
+ break;
683
+ }
684
+ }
685
+ return msg;
686
+ };
687
+
688
+ /**
689
+ * Serializes the message to binary data (in protobuf wire format).
690
+ * @return {!Uint8Array}
691
+ */
692
+ proto.google.rpc.QuotaFailure.prototype.serializeBinary = function () {
693
+ var writer = new jspb.BinaryWriter();
694
+ proto.google.rpc.QuotaFailure.serializeBinaryToWriter(this, writer);
695
+ return writer.getResultBuffer();
696
+ };
697
+
698
+ /**
699
+ * Serializes the given message to binary data (in protobuf wire
700
+ * format), writing to the given BinaryWriter.
701
+ * @param {!proto.google.rpc.QuotaFailure} message
702
+ * @param {!jspb.BinaryWriter} writer
703
+ * @suppress {unusedLocalVariables} f is only used for nested messages
704
+ */
705
+ proto.google.rpc.QuotaFailure.serializeBinaryToWriter = function (message, writer) {
706
+ var f = undefined;
707
+ f = message.getViolationsList();
708
+ if (f.length > 0) {
709
+ writer.writeRepeatedMessage(1, f, proto.google.rpc.QuotaFailure.Violation.serializeBinaryToWriter);
710
+ }
711
+ };
712
+ if (jspb.Message.GENERATE_TO_OBJECT) {
713
+ /**
714
+ * Creates an object representation of this proto.
715
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
716
+ * Optional fields that are not set will be set to undefined.
717
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
718
+ * For the list of reserved names please see:
719
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
720
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
721
+ * JSPB instance for transitional soy proto support:
722
+ * http://goto/soy-param-migration
723
+ * @return {!Object}
724
+ */
725
+ proto.google.rpc.QuotaFailure.Violation.prototype.toObject = function (opt_includeInstance) {
726
+ return proto.google.rpc.QuotaFailure.Violation.toObject(opt_includeInstance, this);
727
+ };
728
+
729
+ /**
730
+ * Static version of the {@see toObject} method.
731
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
732
+ * the JSPB instance for transitional soy proto support:
733
+ * http://goto/soy-param-migration
734
+ * @param {!proto.google.rpc.QuotaFailure.Violation} msg The msg instance to transform.
735
+ * @return {!Object}
736
+ * @suppress {unusedLocalVariables} f is only used for nested messages
737
+ */
738
+ proto.google.rpc.QuotaFailure.Violation.toObject = function (includeInstance, msg) {
739
+ var f,
740
+ obj = {
741
+ subject: jspb.Message.getFieldWithDefault(msg, 1, ""),
742
+ description: jspb.Message.getFieldWithDefault(msg, 2, "")
743
+ };
744
+ if (includeInstance) {
745
+ obj.$jspbMessageInstance = msg;
746
+ }
747
+ return obj;
748
+ };
749
+ }
750
+
751
+ /**
752
+ * Deserializes binary data (in protobuf wire format).
753
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
754
+ * @return {!proto.google.rpc.QuotaFailure.Violation}
755
+ */
756
+ proto.google.rpc.QuotaFailure.Violation.deserializeBinary = function (bytes) {
757
+ var reader = new jspb.BinaryReader(bytes);
758
+ var msg = new proto.google.rpc.QuotaFailure.Violation();
759
+ return proto.google.rpc.QuotaFailure.Violation.deserializeBinaryFromReader(msg, reader);
760
+ };
761
+
762
+ /**
763
+ * Deserializes binary data (in protobuf wire format) from the
764
+ * given reader into the given message object.
765
+ * @param {!proto.google.rpc.QuotaFailure.Violation} msg The message object to deserialize into.
766
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
767
+ * @return {!proto.google.rpc.QuotaFailure.Violation}
768
+ */
769
+ proto.google.rpc.QuotaFailure.Violation.deserializeBinaryFromReader = function (msg, reader) {
770
+ while (reader.nextField()) {
771
+ if (reader.isEndGroup()) {
772
+ break;
773
+ }
774
+ var field = reader.getFieldNumber();
775
+ switch (field) {
776
+ case 1:
777
+ var value = /** @type {string} */reader.readString();
778
+ msg.setSubject(value);
779
+ break;
780
+ case 2:
781
+ var value = /** @type {string} */reader.readString();
782
+ msg.setDescription(value);
783
+ break;
784
+ default:
785
+ reader.skipField();
786
+ break;
787
+ }
788
+ }
789
+ return msg;
790
+ };
791
+
792
+ /**
793
+ * Serializes the message to binary data (in protobuf wire format).
794
+ * @return {!Uint8Array}
795
+ */
796
+ proto.google.rpc.QuotaFailure.Violation.prototype.serializeBinary = function () {
797
+ var writer = new jspb.BinaryWriter();
798
+ proto.google.rpc.QuotaFailure.Violation.serializeBinaryToWriter(this, writer);
799
+ return writer.getResultBuffer();
800
+ };
801
+
802
+ /**
803
+ * Serializes the given message to binary data (in protobuf wire
804
+ * format), writing to the given BinaryWriter.
805
+ * @param {!proto.google.rpc.QuotaFailure.Violation} message
806
+ * @param {!jspb.BinaryWriter} writer
807
+ * @suppress {unusedLocalVariables} f is only used for nested messages
808
+ */
809
+ proto.google.rpc.QuotaFailure.Violation.serializeBinaryToWriter = function (message, writer) {
810
+ var f = undefined;
811
+ f = message.getSubject();
812
+ if (f.length > 0) {
813
+ writer.writeString(1, f);
814
+ }
815
+ f = message.getDescription();
816
+ if (f.length > 0) {
817
+ writer.writeString(2, f);
818
+ }
819
+ };
820
+
821
+ /**
822
+ * optional string subject = 1;
823
+ * @return {string}
824
+ */
825
+ proto.google.rpc.QuotaFailure.Violation.prototype.getSubject = function () {
826
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 1, "");
827
+ };
828
+
829
+ /**
830
+ * @param {string} value
831
+ * @return {!proto.google.rpc.QuotaFailure.Violation} returns this
832
+ */
833
+ proto.google.rpc.QuotaFailure.Violation.prototype.setSubject = function (value) {
834
+ return jspb.Message.setProto3StringField(this, 1, value);
835
+ };
836
+
837
+ /**
838
+ * optional string description = 2;
839
+ * @return {string}
840
+ */
841
+ proto.google.rpc.QuotaFailure.Violation.prototype.getDescription = function () {
842
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 2, "");
843
+ };
844
+
845
+ /**
846
+ * @param {string} value
847
+ * @return {!proto.google.rpc.QuotaFailure.Violation} returns this
848
+ */
849
+ proto.google.rpc.QuotaFailure.Violation.prototype.setDescription = function (value) {
850
+ return jspb.Message.setProto3StringField(this, 2, value);
851
+ };
852
+
853
+ /**
854
+ * repeated Violation violations = 1;
855
+ * @return {!Array<!proto.google.rpc.QuotaFailure.Violation>}
856
+ */
857
+ proto.google.rpc.QuotaFailure.prototype.getViolationsList = function () {
858
+ return /** @type{!Array<!proto.google.rpc.QuotaFailure.Violation>} */jspb.Message.getRepeatedWrapperField(this, proto.google.rpc.QuotaFailure.Violation, 1);
859
+ };
860
+
861
+ /**
862
+ * @param {!Array<!proto.google.rpc.QuotaFailure.Violation>} value
863
+ * @return {!proto.google.rpc.QuotaFailure} returns this
864
+ */
865
+ proto.google.rpc.QuotaFailure.prototype.setViolationsList = function (value) {
866
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
867
+ };
868
+
869
+ /**
870
+ * @param {!proto.google.rpc.QuotaFailure.Violation=} opt_value
871
+ * @param {number=} opt_index
872
+ * @return {!proto.google.rpc.QuotaFailure.Violation}
873
+ */
874
+ proto.google.rpc.QuotaFailure.prototype.addViolations = function (opt_value, opt_index) {
875
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.rpc.QuotaFailure.Violation, opt_index);
876
+ };
877
+
878
+ /**
879
+ * Clears the list making it empty but non-null.
880
+ * @return {!proto.google.rpc.QuotaFailure} returns this
881
+ */
882
+ proto.google.rpc.QuotaFailure.prototype.clearViolationsList = function () {
883
+ return this.setViolationsList([]);
884
+ };
885
+
886
+ /**
887
+ * List of repeated fields within this message type.
888
+ * @private {!Array<number>}
889
+ * @const
890
+ */
891
+ proto.google.rpc.PreconditionFailure.repeatedFields_ = [1];
892
+ if (jspb.Message.GENERATE_TO_OBJECT) {
893
+ /**
894
+ * Creates an object representation of this proto.
895
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
896
+ * Optional fields that are not set will be set to undefined.
897
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
898
+ * For the list of reserved names please see:
899
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
900
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
901
+ * JSPB instance for transitional soy proto support:
902
+ * http://goto/soy-param-migration
903
+ * @return {!Object}
904
+ */
905
+ proto.google.rpc.PreconditionFailure.prototype.toObject = function (opt_includeInstance) {
906
+ return proto.google.rpc.PreconditionFailure.toObject(opt_includeInstance, this);
907
+ };
908
+
909
+ /**
910
+ * Static version of the {@see toObject} method.
911
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
912
+ * the JSPB instance for transitional soy proto support:
913
+ * http://goto/soy-param-migration
914
+ * @param {!proto.google.rpc.PreconditionFailure} msg The msg instance to transform.
915
+ * @return {!Object}
916
+ * @suppress {unusedLocalVariables} f is only used for nested messages
917
+ */
918
+ proto.google.rpc.PreconditionFailure.toObject = function (includeInstance, msg) {
919
+ var f,
920
+ obj = {
921
+ violationsList: jspb.Message.toObjectList(msg.getViolationsList(), proto.google.rpc.PreconditionFailure.Violation.toObject, includeInstance)
922
+ };
923
+ if (includeInstance) {
924
+ obj.$jspbMessageInstance = msg;
925
+ }
926
+ return obj;
927
+ };
928
+ }
929
+
930
+ /**
931
+ * Deserializes binary data (in protobuf wire format).
932
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
933
+ * @return {!proto.google.rpc.PreconditionFailure}
934
+ */
935
+ proto.google.rpc.PreconditionFailure.deserializeBinary = function (bytes) {
936
+ var reader = new jspb.BinaryReader(bytes);
937
+ var msg = new proto.google.rpc.PreconditionFailure();
938
+ return proto.google.rpc.PreconditionFailure.deserializeBinaryFromReader(msg, reader);
939
+ };
940
+
941
+ /**
942
+ * Deserializes binary data (in protobuf wire format) from the
943
+ * given reader into the given message object.
944
+ * @param {!proto.google.rpc.PreconditionFailure} msg The message object to deserialize into.
945
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
946
+ * @return {!proto.google.rpc.PreconditionFailure}
947
+ */
948
+ proto.google.rpc.PreconditionFailure.deserializeBinaryFromReader = function (msg, reader) {
949
+ while (reader.nextField()) {
950
+ if (reader.isEndGroup()) {
951
+ break;
952
+ }
953
+ var field = reader.getFieldNumber();
954
+ switch (field) {
955
+ case 1:
956
+ var value = new proto.google.rpc.PreconditionFailure.Violation();
957
+ reader.readMessage(value, proto.google.rpc.PreconditionFailure.Violation.deserializeBinaryFromReader);
958
+ msg.addViolations(value);
959
+ break;
960
+ default:
961
+ reader.skipField();
962
+ break;
963
+ }
964
+ }
965
+ return msg;
966
+ };
967
+
968
+ /**
969
+ * Serializes the message to binary data (in protobuf wire format).
970
+ * @return {!Uint8Array}
971
+ */
972
+ proto.google.rpc.PreconditionFailure.prototype.serializeBinary = function () {
973
+ var writer = new jspb.BinaryWriter();
974
+ proto.google.rpc.PreconditionFailure.serializeBinaryToWriter(this, writer);
975
+ return writer.getResultBuffer();
976
+ };
977
+
978
+ /**
979
+ * Serializes the given message to binary data (in protobuf wire
980
+ * format), writing to the given BinaryWriter.
981
+ * @param {!proto.google.rpc.PreconditionFailure} message
982
+ * @param {!jspb.BinaryWriter} writer
983
+ * @suppress {unusedLocalVariables} f is only used for nested messages
984
+ */
985
+ proto.google.rpc.PreconditionFailure.serializeBinaryToWriter = function (message, writer) {
986
+ var f = undefined;
987
+ f = message.getViolationsList();
988
+ if (f.length > 0) {
989
+ writer.writeRepeatedMessage(1, f, proto.google.rpc.PreconditionFailure.Violation.serializeBinaryToWriter);
990
+ }
991
+ };
992
+ if (jspb.Message.GENERATE_TO_OBJECT) {
993
+ /**
994
+ * Creates an object representation of this proto.
995
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
996
+ * Optional fields that are not set will be set to undefined.
997
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
998
+ * For the list of reserved names please see:
999
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1000
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1001
+ * JSPB instance for transitional soy proto support:
1002
+ * http://goto/soy-param-migration
1003
+ * @return {!Object}
1004
+ */
1005
+ proto.google.rpc.PreconditionFailure.Violation.prototype.toObject = function (opt_includeInstance) {
1006
+ return proto.google.rpc.PreconditionFailure.Violation.toObject(opt_includeInstance, this);
1007
+ };
1008
+
1009
+ /**
1010
+ * Static version of the {@see toObject} method.
1011
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1012
+ * the JSPB instance for transitional soy proto support:
1013
+ * http://goto/soy-param-migration
1014
+ * @param {!proto.google.rpc.PreconditionFailure.Violation} msg The msg instance to transform.
1015
+ * @return {!Object}
1016
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1017
+ */
1018
+ proto.google.rpc.PreconditionFailure.Violation.toObject = function (includeInstance, msg) {
1019
+ var f,
1020
+ obj = {
1021
+ type: jspb.Message.getFieldWithDefault(msg, 1, ""),
1022
+ subject: jspb.Message.getFieldWithDefault(msg, 2, ""),
1023
+ description: jspb.Message.getFieldWithDefault(msg, 3, "")
1024
+ };
1025
+ if (includeInstance) {
1026
+ obj.$jspbMessageInstance = msg;
1027
+ }
1028
+ return obj;
1029
+ };
1030
+ }
1031
+
1032
+ /**
1033
+ * Deserializes binary data (in protobuf wire format).
1034
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1035
+ * @return {!proto.google.rpc.PreconditionFailure.Violation}
1036
+ */
1037
+ proto.google.rpc.PreconditionFailure.Violation.deserializeBinary = function (bytes) {
1038
+ var reader = new jspb.BinaryReader(bytes);
1039
+ var msg = new proto.google.rpc.PreconditionFailure.Violation();
1040
+ return proto.google.rpc.PreconditionFailure.Violation.deserializeBinaryFromReader(msg, reader);
1041
+ };
1042
+
1043
+ /**
1044
+ * Deserializes binary data (in protobuf wire format) from the
1045
+ * given reader into the given message object.
1046
+ * @param {!proto.google.rpc.PreconditionFailure.Violation} msg The message object to deserialize into.
1047
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1048
+ * @return {!proto.google.rpc.PreconditionFailure.Violation}
1049
+ */
1050
+ proto.google.rpc.PreconditionFailure.Violation.deserializeBinaryFromReader = function (msg, reader) {
1051
+ while (reader.nextField()) {
1052
+ if (reader.isEndGroup()) {
1053
+ break;
1054
+ }
1055
+ var field = reader.getFieldNumber();
1056
+ switch (field) {
1057
+ case 1:
1058
+ var value = /** @type {string} */reader.readString();
1059
+ msg.setType(value);
1060
+ break;
1061
+ case 2:
1062
+ var value = /** @type {string} */reader.readString();
1063
+ msg.setSubject(value);
1064
+ break;
1065
+ case 3:
1066
+ var value = /** @type {string} */reader.readString();
1067
+ msg.setDescription(value);
1068
+ break;
1069
+ default:
1070
+ reader.skipField();
1071
+ break;
1072
+ }
1073
+ }
1074
+ return msg;
1075
+ };
1076
+
1077
+ /**
1078
+ * Serializes the message to binary data (in protobuf wire format).
1079
+ * @return {!Uint8Array}
1080
+ */
1081
+ proto.google.rpc.PreconditionFailure.Violation.prototype.serializeBinary = function () {
1082
+ var writer = new jspb.BinaryWriter();
1083
+ proto.google.rpc.PreconditionFailure.Violation.serializeBinaryToWriter(this, writer);
1084
+ return writer.getResultBuffer();
1085
+ };
1086
+
1087
+ /**
1088
+ * Serializes the given message to binary data (in protobuf wire
1089
+ * format), writing to the given BinaryWriter.
1090
+ * @param {!proto.google.rpc.PreconditionFailure.Violation} message
1091
+ * @param {!jspb.BinaryWriter} writer
1092
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1093
+ */
1094
+ proto.google.rpc.PreconditionFailure.Violation.serializeBinaryToWriter = function (message, writer) {
1095
+ var f = undefined;
1096
+ f = message.getType();
1097
+ if (f.length > 0) {
1098
+ writer.writeString(1, f);
1099
+ }
1100
+ f = message.getSubject();
1101
+ if (f.length > 0) {
1102
+ writer.writeString(2, f);
1103
+ }
1104
+ f = message.getDescription();
1105
+ if (f.length > 0) {
1106
+ writer.writeString(3, f);
1107
+ }
1108
+ };
1109
+
1110
+ /**
1111
+ * optional string type = 1;
1112
+ * @return {string}
1113
+ */
1114
+ proto.google.rpc.PreconditionFailure.Violation.prototype.getType = function () {
1115
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 1, "");
1116
+ };
1117
+
1118
+ /**
1119
+ * @param {string} value
1120
+ * @return {!proto.google.rpc.PreconditionFailure.Violation} returns this
1121
+ */
1122
+ proto.google.rpc.PreconditionFailure.Violation.prototype.setType = function (value) {
1123
+ return jspb.Message.setProto3StringField(this, 1, value);
1124
+ };
1125
+
1126
+ /**
1127
+ * optional string subject = 2;
1128
+ * @return {string}
1129
+ */
1130
+ proto.google.rpc.PreconditionFailure.Violation.prototype.getSubject = function () {
1131
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 2, "");
1132
+ };
1133
+
1134
+ /**
1135
+ * @param {string} value
1136
+ * @return {!proto.google.rpc.PreconditionFailure.Violation} returns this
1137
+ */
1138
+ proto.google.rpc.PreconditionFailure.Violation.prototype.setSubject = function (value) {
1139
+ return jspb.Message.setProto3StringField(this, 2, value);
1140
+ };
1141
+
1142
+ /**
1143
+ * optional string description = 3;
1144
+ * @return {string}
1145
+ */
1146
+ proto.google.rpc.PreconditionFailure.Violation.prototype.getDescription = function () {
1147
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 3, "");
1148
+ };
1149
+
1150
+ /**
1151
+ * @param {string} value
1152
+ * @return {!proto.google.rpc.PreconditionFailure.Violation} returns this
1153
+ */
1154
+ proto.google.rpc.PreconditionFailure.Violation.prototype.setDescription = function (value) {
1155
+ return jspb.Message.setProto3StringField(this, 3, value);
1156
+ };
1157
+
1158
+ /**
1159
+ * repeated Violation violations = 1;
1160
+ * @return {!Array<!proto.google.rpc.PreconditionFailure.Violation>}
1161
+ */
1162
+ proto.google.rpc.PreconditionFailure.prototype.getViolationsList = function () {
1163
+ return /** @type{!Array<!proto.google.rpc.PreconditionFailure.Violation>} */jspb.Message.getRepeatedWrapperField(this, proto.google.rpc.PreconditionFailure.Violation, 1);
1164
+ };
1165
+
1166
+ /**
1167
+ * @param {!Array<!proto.google.rpc.PreconditionFailure.Violation>} value
1168
+ * @return {!proto.google.rpc.PreconditionFailure} returns this
1169
+ */
1170
+ proto.google.rpc.PreconditionFailure.prototype.setViolationsList = function (value) {
1171
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
1172
+ };
1173
+
1174
+ /**
1175
+ * @param {!proto.google.rpc.PreconditionFailure.Violation=} opt_value
1176
+ * @param {number=} opt_index
1177
+ * @return {!proto.google.rpc.PreconditionFailure.Violation}
1178
+ */
1179
+ proto.google.rpc.PreconditionFailure.prototype.addViolations = function (opt_value, opt_index) {
1180
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.rpc.PreconditionFailure.Violation, opt_index);
1181
+ };
1182
+
1183
+ /**
1184
+ * Clears the list making it empty but non-null.
1185
+ * @return {!proto.google.rpc.PreconditionFailure} returns this
1186
+ */
1187
+ proto.google.rpc.PreconditionFailure.prototype.clearViolationsList = function () {
1188
+ return this.setViolationsList([]);
1189
+ };
1190
+
1191
+ /**
1192
+ * List of repeated fields within this message type.
1193
+ * @private {!Array<number>}
1194
+ * @const
1195
+ */
1196
+ proto.google.rpc.BadRequest.repeatedFields_ = [1];
1197
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1198
+ /**
1199
+ * Creates an object representation of this proto.
1200
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1201
+ * Optional fields that are not set will be set to undefined.
1202
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1203
+ * For the list of reserved names please see:
1204
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1205
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1206
+ * JSPB instance for transitional soy proto support:
1207
+ * http://goto/soy-param-migration
1208
+ * @return {!Object}
1209
+ */
1210
+ proto.google.rpc.BadRequest.prototype.toObject = function (opt_includeInstance) {
1211
+ return proto.google.rpc.BadRequest.toObject(opt_includeInstance, this);
1212
+ };
1213
+
1214
+ /**
1215
+ * Static version of the {@see toObject} method.
1216
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1217
+ * the JSPB instance for transitional soy proto support:
1218
+ * http://goto/soy-param-migration
1219
+ * @param {!proto.google.rpc.BadRequest} msg The msg instance to transform.
1220
+ * @return {!Object}
1221
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1222
+ */
1223
+ proto.google.rpc.BadRequest.toObject = function (includeInstance, msg) {
1224
+ var f,
1225
+ obj = {
1226
+ fieldViolationsList: jspb.Message.toObjectList(msg.getFieldViolationsList(), proto.google.rpc.BadRequest.FieldViolation.toObject, includeInstance)
1227
+ };
1228
+ if (includeInstance) {
1229
+ obj.$jspbMessageInstance = msg;
1230
+ }
1231
+ return obj;
1232
+ };
1233
+ }
1234
+
1235
+ /**
1236
+ * Deserializes binary data (in protobuf wire format).
1237
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1238
+ * @return {!proto.google.rpc.BadRequest}
1239
+ */
1240
+ proto.google.rpc.BadRequest.deserializeBinary = function (bytes) {
1241
+ var reader = new jspb.BinaryReader(bytes);
1242
+ var msg = new proto.google.rpc.BadRequest();
1243
+ return proto.google.rpc.BadRequest.deserializeBinaryFromReader(msg, reader);
1244
+ };
1245
+
1246
+ /**
1247
+ * Deserializes binary data (in protobuf wire format) from the
1248
+ * given reader into the given message object.
1249
+ * @param {!proto.google.rpc.BadRequest} msg The message object to deserialize into.
1250
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1251
+ * @return {!proto.google.rpc.BadRequest}
1252
+ */
1253
+ proto.google.rpc.BadRequest.deserializeBinaryFromReader = function (msg, reader) {
1254
+ while (reader.nextField()) {
1255
+ if (reader.isEndGroup()) {
1256
+ break;
1257
+ }
1258
+ var field = reader.getFieldNumber();
1259
+ switch (field) {
1260
+ case 1:
1261
+ var value = new proto.google.rpc.BadRequest.FieldViolation();
1262
+ reader.readMessage(value, proto.google.rpc.BadRequest.FieldViolation.deserializeBinaryFromReader);
1263
+ msg.addFieldViolations(value);
1264
+ break;
1265
+ default:
1266
+ reader.skipField();
1267
+ break;
1268
+ }
1269
+ }
1270
+ return msg;
1271
+ };
1272
+
1273
+ /**
1274
+ * Serializes the message to binary data (in protobuf wire format).
1275
+ * @return {!Uint8Array}
1276
+ */
1277
+ proto.google.rpc.BadRequest.prototype.serializeBinary = function () {
1278
+ var writer = new jspb.BinaryWriter();
1279
+ proto.google.rpc.BadRequest.serializeBinaryToWriter(this, writer);
1280
+ return writer.getResultBuffer();
1281
+ };
1282
+
1283
+ /**
1284
+ * Serializes the given message to binary data (in protobuf wire
1285
+ * format), writing to the given BinaryWriter.
1286
+ * @param {!proto.google.rpc.BadRequest} message
1287
+ * @param {!jspb.BinaryWriter} writer
1288
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1289
+ */
1290
+ proto.google.rpc.BadRequest.serializeBinaryToWriter = function (message, writer) {
1291
+ var f = undefined;
1292
+ f = message.getFieldViolationsList();
1293
+ if (f.length > 0) {
1294
+ writer.writeRepeatedMessage(1, f, proto.google.rpc.BadRequest.FieldViolation.serializeBinaryToWriter);
1295
+ }
1296
+ };
1297
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1298
+ /**
1299
+ * Creates an object representation of this proto.
1300
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1301
+ * Optional fields that are not set will be set to undefined.
1302
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1303
+ * For the list of reserved names please see:
1304
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1305
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1306
+ * JSPB instance for transitional soy proto support:
1307
+ * http://goto/soy-param-migration
1308
+ * @return {!Object}
1309
+ */
1310
+ proto.google.rpc.BadRequest.FieldViolation.prototype.toObject = function (opt_includeInstance) {
1311
+ return proto.google.rpc.BadRequest.FieldViolation.toObject(opt_includeInstance, this);
1312
+ };
1313
+
1314
+ /**
1315
+ * Static version of the {@see toObject} method.
1316
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1317
+ * the JSPB instance for transitional soy proto support:
1318
+ * http://goto/soy-param-migration
1319
+ * @param {!proto.google.rpc.BadRequest.FieldViolation} msg The msg instance to transform.
1320
+ * @return {!Object}
1321
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1322
+ */
1323
+ proto.google.rpc.BadRequest.FieldViolation.toObject = function (includeInstance, msg) {
1324
+ var f,
1325
+ obj = {
1326
+ field: jspb.Message.getFieldWithDefault(msg, 1, ""),
1327
+ description: jspb.Message.getFieldWithDefault(msg, 2, "")
1328
+ };
1329
+ if (includeInstance) {
1330
+ obj.$jspbMessageInstance = msg;
1331
+ }
1332
+ return obj;
1333
+ };
1334
+ }
1335
+
1336
+ /**
1337
+ * Deserializes binary data (in protobuf wire format).
1338
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1339
+ * @return {!proto.google.rpc.BadRequest.FieldViolation}
1340
+ */
1341
+ proto.google.rpc.BadRequest.FieldViolation.deserializeBinary = function (bytes) {
1342
+ var reader = new jspb.BinaryReader(bytes);
1343
+ var msg = new proto.google.rpc.BadRequest.FieldViolation();
1344
+ return proto.google.rpc.BadRequest.FieldViolation.deserializeBinaryFromReader(msg, reader);
1345
+ };
1346
+
1347
+ /**
1348
+ * Deserializes binary data (in protobuf wire format) from the
1349
+ * given reader into the given message object.
1350
+ * @param {!proto.google.rpc.BadRequest.FieldViolation} msg The message object to deserialize into.
1351
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1352
+ * @return {!proto.google.rpc.BadRequest.FieldViolation}
1353
+ */
1354
+ proto.google.rpc.BadRequest.FieldViolation.deserializeBinaryFromReader = function (msg, reader) {
1355
+ while (reader.nextField()) {
1356
+ if (reader.isEndGroup()) {
1357
+ break;
1358
+ }
1359
+ var field = reader.getFieldNumber();
1360
+ switch (field) {
1361
+ case 1:
1362
+ var value = /** @type {string} */reader.readString();
1363
+ msg.setField(value);
1364
+ break;
1365
+ case 2:
1366
+ var value = /** @type {string} */reader.readString();
1367
+ msg.setDescription(value);
1368
+ break;
1369
+ default:
1370
+ reader.skipField();
1371
+ break;
1372
+ }
1373
+ }
1374
+ return msg;
1375
+ };
1376
+
1377
+ /**
1378
+ * Serializes the message to binary data (in protobuf wire format).
1379
+ * @return {!Uint8Array}
1380
+ */
1381
+ proto.google.rpc.BadRequest.FieldViolation.prototype.serializeBinary = function () {
1382
+ var writer = new jspb.BinaryWriter();
1383
+ proto.google.rpc.BadRequest.FieldViolation.serializeBinaryToWriter(this, writer);
1384
+ return writer.getResultBuffer();
1385
+ };
1386
+
1387
+ /**
1388
+ * Serializes the given message to binary data (in protobuf wire
1389
+ * format), writing to the given BinaryWriter.
1390
+ * @param {!proto.google.rpc.BadRequest.FieldViolation} message
1391
+ * @param {!jspb.BinaryWriter} writer
1392
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1393
+ */
1394
+ proto.google.rpc.BadRequest.FieldViolation.serializeBinaryToWriter = function (message, writer) {
1395
+ var f = undefined;
1396
+ f = message.getField();
1397
+ if (f.length > 0) {
1398
+ writer.writeString(1, f);
1399
+ }
1400
+ f = message.getDescription();
1401
+ if (f.length > 0) {
1402
+ writer.writeString(2, f);
1403
+ }
1404
+ };
1405
+
1406
+ /**
1407
+ * optional string field = 1;
1408
+ * @return {string}
1409
+ */
1410
+ proto.google.rpc.BadRequest.FieldViolation.prototype.getField = function () {
1411
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 1, "");
1412
+ };
1413
+
1414
+ /**
1415
+ * @param {string} value
1416
+ * @return {!proto.google.rpc.BadRequest.FieldViolation} returns this
1417
+ */
1418
+ proto.google.rpc.BadRequest.FieldViolation.prototype.setField = function (value) {
1419
+ return jspb.Message.setProto3StringField(this, 1, value);
1420
+ };
1421
+
1422
+ /**
1423
+ * optional string description = 2;
1424
+ * @return {string}
1425
+ */
1426
+ proto.google.rpc.BadRequest.FieldViolation.prototype.getDescription = function () {
1427
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 2, "");
1428
+ };
1429
+
1430
+ /**
1431
+ * @param {string} value
1432
+ * @return {!proto.google.rpc.BadRequest.FieldViolation} returns this
1433
+ */
1434
+ proto.google.rpc.BadRequest.FieldViolation.prototype.setDescription = function (value) {
1435
+ return jspb.Message.setProto3StringField(this, 2, value);
1436
+ };
1437
+
1438
+ /**
1439
+ * repeated FieldViolation field_violations = 1;
1440
+ * @return {!Array<!proto.google.rpc.BadRequest.FieldViolation>}
1441
+ */
1442
+ proto.google.rpc.BadRequest.prototype.getFieldViolationsList = function () {
1443
+ return /** @type{!Array<!proto.google.rpc.BadRequest.FieldViolation>} */jspb.Message.getRepeatedWrapperField(this, proto.google.rpc.BadRequest.FieldViolation, 1);
1444
+ };
1445
+
1446
+ /**
1447
+ * @param {!Array<!proto.google.rpc.BadRequest.FieldViolation>} value
1448
+ * @return {!proto.google.rpc.BadRequest} returns this
1449
+ */
1450
+ proto.google.rpc.BadRequest.prototype.setFieldViolationsList = function (value) {
1451
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
1452
+ };
1453
+
1454
+ /**
1455
+ * @param {!proto.google.rpc.BadRequest.FieldViolation=} opt_value
1456
+ * @param {number=} opt_index
1457
+ * @return {!proto.google.rpc.BadRequest.FieldViolation}
1458
+ */
1459
+ proto.google.rpc.BadRequest.prototype.addFieldViolations = function (opt_value, opt_index) {
1460
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.rpc.BadRequest.FieldViolation, opt_index);
1461
+ };
1462
+
1463
+ /**
1464
+ * Clears the list making it empty but non-null.
1465
+ * @return {!proto.google.rpc.BadRequest} returns this
1466
+ */
1467
+ proto.google.rpc.BadRequest.prototype.clearFieldViolationsList = function () {
1468
+ return this.setFieldViolationsList([]);
1469
+ };
1470
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1471
+ /**
1472
+ * Creates an object representation of this proto.
1473
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1474
+ * Optional fields that are not set will be set to undefined.
1475
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1476
+ * For the list of reserved names please see:
1477
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1478
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1479
+ * JSPB instance for transitional soy proto support:
1480
+ * http://goto/soy-param-migration
1481
+ * @return {!Object}
1482
+ */
1483
+ proto.google.rpc.RequestInfo.prototype.toObject = function (opt_includeInstance) {
1484
+ return proto.google.rpc.RequestInfo.toObject(opt_includeInstance, this);
1485
+ };
1486
+
1487
+ /**
1488
+ * Static version of the {@see toObject} method.
1489
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1490
+ * the JSPB instance for transitional soy proto support:
1491
+ * http://goto/soy-param-migration
1492
+ * @param {!proto.google.rpc.RequestInfo} msg The msg instance to transform.
1493
+ * @return {!Object}
1494
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1495
+ */
1496
+ proto.google.rpc.RequestInfo.toObject = function (includeInstance, msg) {
1497
+ var f,
1498
+ obj = {
1499
+ requestId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1500
+ servingData: jspb.Message.getFieldWithDefault(msg, 2, "")
1501
+ };
1502
+ if (includeInstance) {
1503
+ obj.$jspbMessageInstance = msg;
1504
+ }
1505
+ return obj;
1506
+ };
1507
+ }
1508
+
1509
+ /**
1510
+ * Deserializes binary data (in protobuf wire format).
1511
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1512
+ * @return {!proto.google.rpc.RequestInfo}
1513
+ */
1514
+ proto.google.rpc.RequestInfo.deserializeBinary = function (bytes) {
1515
+ var reader = new jspb.BinaryReader(bytes);
1516
+ var msg = new proto.google.rpc.RequestInfo();
1517
+ return proto.google.rpc.RequestInfo.deserializeBinaryFromReader(msg, reader);
1518
+ };
1519
+
1520
+ /**
1521
+ * Deserializes binary data (in protobuf wire format) from the
1522
+ * given reader into the given message object.
1523
+ * @param {!proto.google.rpc.RequestInfo} msg The message object to deserialize into.
1524
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1525
+ * @return {!proto.google.rpc.RequestInfo}
1526
+ */
1527
+ proto.google.rpc.RequestInfo.deserializeBinaryFromReader = function (msg, reader) {
1528
+ while (reader.nextField()) {
1529
+ if (reader.isEndGroup()) {
1530
+ break;
1531
+ }
1532
+ var field = reader.getFieldNumber();
1533
+ switch (field) {
1534
+ case 1:
1535
+ var value = /** @type {string} */reader.readString();
1536
+ msg.setRequestId(value);
1537
+ break;
1538
+ case 2:
1539
+ var value = /** @type {string} */reader.readString();
1540
+ msg.setServingData(value);
1541
+ break;
1542
+ default:
1543
+ reader.skipField();
1544
+ break;
1545
+ }
1546
+ }
1547
+ return msg;
1548
+ };
1549
+
1550
+ /**
1551
+ * Serializes the message to binary data (in protobuf wire format).
1552
+ * @return {!Uint8Array}
1553
+ */
1554
+ proto.google.rpc.RequestInfo.prototype.serializeBinary = function () {
1555
+ var writer = new jspb.BinaryWriter();
1556
+ proto.google.rpc.RequestInfo.serializeBinaryToWriter(this, writer);
1557
+ return writer.getResultBuffer();
1558
+ };
1559
+
1560
+ /**
1561
+ * Serializes the given message to binary data (in protobuf wire
1562
+ * format), writing to the given BinaryWriter.
1563
+ * @param {!proto.google.rpc.RequestInfo} message
1564
+ * @param {!jspb.BinaryWriter} writer
1565
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1566
+ */
1567
+ proto.google.rpc.RequestInfo.serializeBinaryToWriter = function (message, writer) {
1568
+ var f = undefined;
1569
+ f = message.getRequestId();
1570
+ if (f.length > 0) {
1571
+ writer.writeString(1, f);
1572
+ }
1573
+ f = message.getServingData();
1574
+ if (f.length > 0) {
1575
+ writer.writeString(2, f);
1576
+ }
1577
+ };
1578
+
1579
+ /**
1580
+ * optional string request_id = 1;
1581
+ * @return {string}
1582
+ */
1583
+ proto.google.rpc.RequestInfo.prototype.getRequestId = function () {
1584
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 1, "");
1585
+ };
1586
+
1587
+ /**
1588
+ * @param {string} value
1589
+ * @return {!proto.google.rpc.RequestInfo} returns this
1590
+ */
1591
+ proto.google.rpc.RequestInfo.prototype.setRequestId = function (value) {
1592
+ return jspb.Message.setProto3StringField(this, 1, value);
1593
+ };
1594
+
1595
+ /**
1596
+ * optional string serving_data = 2;
1597
+ * @return {string}
1598
+ */
1599
+ proto.google.rpc.RequestInfo.prototype.getServingData = function () {
1600
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 2, "");
1601
+ };
1602
+
1603
+ /**
1604
+ * @param {string} value
1605
+ * @return {!proto.google.rpc.RequestInfo} returns this
1606
+ */
1607
+ proto.google.rpc.RequestInfo.prototype.setServingData = function (value) {
1608
+ return jspb.Message.setProto3StringField(this, 2, value);
1609
+ };
1610
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1611
+ /**
1612
+ * Creates an object representation of this proto.
1613
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1614
+ * Optional fields that are not set will be set to undefined.
1615
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1616
+ * For the list of reserved names please see:
1617
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1618
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1619
+ * JSPB instance for transitional soy proto support:
1620
+ * http://goto/soy-param-migration
1621
+ * @return {!Object}
1622
+ */
1623
+ proto.google.rpc.ResourceInfo.prototype.toObject = function (opt_includeInstance) {
1624
+ return proto.google.rpc.ResourceInfo.toObject(opt_includeInstance, this);
1625
+ };
1626
+
1627
+ /**
1628
+ * Static version of the {@see toObject} method.
1629
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1630
+ * the JSPB instance for transitional soy proto support:
1631
+ * http://goto/soy-param-migration
1632
+ * @param {!proto.google.rpc.ResourceInfo} msg The msg instance to transform.
1633
+ * @return {!Object}
1634
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1635
+ */
1636
+ proto.google.rpc.ResourceInfo.toObject = function (includeInstance, msg) {
1637
+ var f,
1638
+ obj = {
1639
+ resourceType: jspb.Message.getFieldWithDefault(msg, 1, ""),
1640
+ resourceName: jspb.Message.getFieldWithDefault(msg, 2, ""),
1641
+ owner: jspb.Message.getFieldWithDefault(msg, 3, ""),
1642
+ description: jspb.Message.getFieldWithDefault(msg, 4, "")
1643
+ };
1644
+ if (includeInstance) {
1645
+ obj.$jspbMessageInstance = msg;
1646
+ }
1647
+ return obj;
1648
+ };
1649
+ }
1650
+
1651
+ /**
1652
+ * Deserializes binary data (in protobuf wire format).
1653
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1654
+ * @return {!proto.google.rpc.ResourceInfo}
1655
+ */
1656
+ proto.google.rpc.ResourceInfo.deserializeBinary = function (bytes) {
1657
+ var reader = new jspb.BinaryReader(bytes);
1658
+ var msg = new proto.google.rpc.ResourceInfo();
1659
+ return proto.google.rpc.ResourceInfo.deserializeBinaryFromReader(msg, reader);
1660
+ };
1661
+
1662
+ /**
1663
+ * Deserializes binary data (in protobuf wire format) from the
1664
+ * given reader into the given message object.
1665
+ * @param {!proto.google.rpc.ResourceInfo} msg The message object to deserialize into.
1666
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1667
+ * @return {!proto.google.rpc.ResourceInfo}
1668
+ */
1669
+ proto.google.rpc.ResourceInfo.deserializeBinaryFromReader = function (msg, reader) {
1670
+ while (reader.nextField()) {
1671
+ if (reader.isEndGroup()) {
1672
+ break;
1673
+ }
1674
+ var field = reader.getFieldNumber();
1675
+ switch (field) {
1676
+ case 1:
1677
+ var value = /** @type {string} */reader.readString();
1678
+ msg.setResourceType(value);
1679
+ break;
1680
+ case 2:
1681
+ var value = /** @type {string} */reader.readString();
1682
+ msg.setResourceName(value);
1683
+ break;
1684
+ case 3:
1685
+ var value = /** @type {string} */reader.readString();
1686
+ msg.setOwner(value);
1687
+ break;
1688
+ case 4:
1689
+ var value = /** @type {string} */reader.readString();
1690
+ msg.setDescription(value);
1691
+ break;
1692
+ default:
1693
+ reader.skipField();
1694
+ break;
1695
+ }
1696
+ }
1697
+ return msg;
1698
+ };
1699
+
1700
+ /**
1701
+ * Serializes the message to binary data (in protobuf wire format).
1702
+ * @return {!Uint8Array}
1703
+ */
1704
+ proto.google.rpc.ResourceInfo.prototype.serializeBinary = function () {
1705
+ var writer = new jspb.BinaryWriter();
1706
+ proto.google.rpc.ResourceInfo.serializeBinaryToWriter(this, writer);
1707
+ return writer.getResultBuffer();
1708
+ };
1709
+
1710
+ /**
1711
+ * Serializes the given message to binary data (in protobuf wire
1712
+ * format), writing to the given BinaryWriter.
1713
+ * @param {!proto.google.rpc.ResourceInfo} message
1714
+ * @param {!jspb.BinaryWriter} writer
1715
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1716
+ */
1717
+ proto.google.rpc.ResourceInfo.serializeBinaryToWriter = function (message, writer) {
1718
+ var f = undefined;
1719
+ f = message.getResourceType();
1720
+ if (f.length > 0) {
1721
+ writer.writeString(1, f);
1722
+ }
1723
+ f = message.getResourceName();
1724
+ if (f.length > 0) {
1725
+ writer.writeString(2, f);
1726
+ }
1727
+ f = message.getOwner();
1728
+ if (f.length > 0) {
1729
+ writer.writeString(3, f);
1730
+ }
1731
+ f = message.getDescription();
1732
+ if (f.length > 0) {
1733
+ writer.writeString(4, f);
1734
+ }
1735
+ };
1736
+
1737
+ /**
1738
+ * optional string resource_type = 1;
1739
+ * @return {string}
1740
+ */
1741
+ proto.google.rpc.ResourceInfo.prototype.getResourceType = function () {
1742
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 1, "");
1743
+ };
1744
+
1745
+ /**
1746
+ * @param {string} value
1747
+ * @return {!proto.google.rpc.ResourceInfo} returns this
1748
+ */
1749
+ proto.google.rpc.ResourceInfo.prototype.setResourceType = function (value) {
1750
+ return jspb.Message.setProto3StringField(this, 1, value);
1751
+ };
1752
+
1753
+ /**
1754
+ * optional string resource_name = 2;
1755
+ * @return {string}
1756
+ */
1757
+ proto.google.rpc.ResourceInfo.prototype.getResourceName = function () {
1758
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 2, "");
1759
+ };
1760
+
1761
+ /**
1762
+ * @param {string} value
1763
+ * @return {!proto.google.rpc.ResourceInfo} returns this
1764
+ */
1765
+ proto.google.rpc.ResourceInfo.prototype.setResourceName = function (value) {
1766
+ return jspb.Message.setProto3StringField(this, 2, value);
1767
+ };
1768
+
1769
+ /**
1770
+ * optional string owner = 3;
1771
+ * @return {string}
1772
+ */
1773
+ proto.google.rpc.ResourceInfo.prototype.getOwner = function () {
1774
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 3, "");
1775
+ };
1776
+
1777
+ /**
1778
+ * @param {string} value
1779
+ * @return {!proto.google.rpc.ResourceInfo} returns this
1780
+ */
1781
+ proto.google.rpc.ResourceInfo.prototype.setOwner = function (value) {
1782
+ return jspb.Message.setProto3StringField(this, 3, value);
1783
+ };
1784
+
1785
+ /**
1786
+ * optional string description = 4;
1787
+ * @return {string}
1788
+ */
1789
+ proto.google.rpc.ResourceInfo.prototype.getDescription = function () {
1790
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 4, "");
1791
+ };
1792
+
1793
+ /**
1794
+ * @param {string} value
1795
+ * @return {!proto.google.rpc.ResourceInfo} returns this
1796
+ */
1797
+ proto.google.rpc.ResourceInfo.prototype.setDescription = function (value) {
1798
+ return jspb.Message.setProto3StringField(this, 4, value);
1799
+ };
1800
+
1801
+ /**
1802
+ * List of repeated fields within this message type.
1803
+ * @private {!Array<number>}
1804
+ * @const
1805
+ */
1806
+ proto.google.rpc.Help.repeatedFields_ = [1];
1807
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1808
+ /**
1809
+ * Creates an object representation of this proto.
1810
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1811
+ * Optional fields that are not set will be set to undefined.
1812
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1813
+ * For the list of reserved names please see:
1814
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1815
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1816
+ * JSPB instance for transitional soy proto support:
1817
+ * http://goto/soy-param-migration
1818
+ * @return {!Object}
1819
+ */
1820
+ proto.google.rpc.Help.prototype.toObject = function (opt_includeInstance) {
1821
+ return proto.google.rpc.Help.toObject(opt_includeInstance, this);
1822
+ };
1823
+
1824
+ /**
1825
+ * Static version of the {@see toObject} method.
1826
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1827
+ * the JSPB instance for transitional soy proto support:
1828
+ * http://goto/soy-param-migration
1829
+ * @param {!proto.google.rpc.Help} msg The msg instance to transform.
1830
+ * @return {!Object}
1831
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1832
+ */
1833
+ proto.google.rpc.Help.toObject = function (includeInstance, msg) {
1834
+ var f,
1835
+ obj = {
1836
+ linksList: jspb.Message.toObjectList(msg.getLinksList(), proto.google.rpc.Help.Link.toObject, includeInstance)
1837
+ };
1838
+ if (includeInstance) {
1839
+ obj.$jspbMessageInstance = msg;
1840
+ }
1841
+ return obj;
1842
+ };
1843
+ }
1844
+
1845
+ /**
1846
+ * Deserializes binary data (in protobuf wire format).
1847
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1848
+ * @return {!proto.google.rpc.Help}
1849
+ */
1850
+ proto.google.rpc.Help.deserializeBinary = function (bytes) {
1851
+ var reader = new jspb.BinaryReader(bytes);
1852
+ var msg = new proto.google.rpc.Help();
1853
+ return proto.google.rpc.Help.deserializeBinaryFromReader(msg, reader);
1854
+ };
1855
+
1856
+ /**
1857
+ * Deserializes binary data (in protobuf wire format) from the
1858
+ * given reader into the given message object.
1859
+ * @param {!proto.google.rpc.Help} msg The message object to deserialize into.
1860
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1861
+ * @return {!proto.google.rpc.Help}
1862
+ */
1863
+ proto.google.rpc.Help.deserializeBinaryFromReader = function (msg, reader) {
1864
+ while (reader.nextField()) {
1865
+ if (reader.isEndGroup()) {
1866
+ break;
1867
+ }
1868
+ var field = reader.getFieldNumber();
1869
+ switch (field) {
1870
+ case 1:
1871
+ var value = new proto.google.rpc.Help.Link();
1872
+ reader.readMessage(value, proto.google.rpc.Help.Link.deserializeBinaryFromReader);
1873
+ msg.addLinks(value);
1874
+ break;
1875
+ default:
1876
+ reader.skipField();
1877
+ break;
1878
+ }
1879
+ }
1880
+ return msg;
1881
+ };
1882
+
1883
+ /**
1884
+ * Serializes the message to binary data (in protobuf wire format).
1885
+ * @return {!Uint8Array}
1886
+ */
1887
+ proto.google.rpc.Help.prototype.serializeBinary = function () {
1888
+ var writer = new jspb.BinaryWriter();
1889
+ proto.google.rpc.Help.serializeBinaryToWriter(this, writer);
1890
+ return writer.getResultBuffer();
1891
+ };
1892
+
1893
+ /**
1894
+ * Serializes the given message to binary data (in protobuf wire
1895
+ * format), writing to the given BinaryWriter.
1896
+ * @param {!proto.google.rpc.Help} message
1897
+ * @param {!jspb.BinaryWriter} writer
1898
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1899
+ */
1900
+ proto.google.rpc.Help.serializeBinaryToWriter = function (message, writer) {
1901
+ var f = undefined;
1902
+ f = message.getLinksList();
1903
+ if (f.length > 0) {
1904
+ writer.writeRepeatedMessage(1, f, proto.google.rpc.Help.Link.serializeBinaryToWriter);
1905
+ }
1906
+ };
1907
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1908
+ /**
1909
+ * Creates an object representation of this proto.
1910
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1911
+ * Optional fields that are not set will be set to undefined.
1912
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1913
+ * For the list of reserved names please see:
1914
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1915
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1916
+ * JSPB instance for transitional soy proto support:
1917
+ * http://goto/soy-param-migration
1918
+ * @return {!Object}
1919
+ */
1920
+ proto.google.rpc.Help.Link.prototype.toObject = function (opt_includeInstance) {
1921
+ return proto.google.rpc.Help.Link.toObject(opt_includeInstance, this);
1922
+ };
1923
+
1924
+ /**
1925
+ * Static version of the {@see toObject} method.
1926
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1927
+ * the JSPB instance for transitional soy proto support:
1928
+ * http://goto/soy-param-migration
1929
+ * @param {!proto.google.rpc.Help.Link} msg The msg instance to transform.
1930
+ * @return {!Object}
1931
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1932
+ */
1933
+ proto.google.rpc.Help.Link.toObject = function (includeInstance, msg) {
1934
+ var f,
1935
+ obj = {
1936
+ description: jspb.Message.getFieldWithDefault(msg, 1, ""),
1937
+ url: jspb.Message.getFieldWithDefault(msg, 2, "")
1938
+ };
1939
+ if (includeInstance) {
1940
+ obj.$jspbMessageInstance = msg;
1941
+ }
1942
+ return obj;
1943
+ };
1944
+ }
1945
+
1946
+ /**
1947
+ * Deserializes binary data (in protobuf wire format).
1948
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1949
+ * @return {!proto.google.rpc.Help.Link}
1950
+ */
1951
+ proto.google.rpc.Help.Link.deserializeBinary = function (bytes) {
1952
+ var reader = new jspb.BinaryReader(bytes);
1953
+ var msg = new proto.google.rpc.Help.Link();
1954
+ return proto.google.rpc.Help.Link.deserializeBinaryFromReader(msg, reader);
1955
+ };
1956
+
1957
+ /**
1958
+ * Deserializes binary data (in protobuf wire format) from the
1959
+ * given reader into the given message object.
1960
+ * @param {!proto.google.rpc.Help.Link} msg The message object to deserialize into.
1961
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1962
+ * @return {!proto.google.rpc.Help.Link}
1963
+ */
1964
+ proto.google.rpc.Help.Link.deserializeBinaryFromReader = function (msg, reader) {
1965
+ while (reader.nextField()) {
1966
+ if (reader.isEndGroup()) {
1967
+ break;
1968
+ }
1969
+ var field = reader.getFieldNumber();
1970
+ switch (field) {
1971
+ case 1:
1972
+ var value = /** @type {string} */reader.readString();
1973
+ msg.setDescription(value);
1974
+ break;
1975
+ case 2:
1976
+ var value = /** @type {string} */reader.readString();
1977
+ msg.setUrl(value);
1978
+ break;
1979
+ default:
1980
+ reader.skipField();
1981
+ break;
1982
+ }
1983
+ }
1984
+ return msg;
1985
+ };
1986
+
1987
+ /**
1988
+ * Serializes the message to binary data (in protobuf wire format).
1989
+ * @return {!Uint8Array}
1990
+ */
1991
+ proto.google.rpc.Help.Link.prototype.serializeBinary = function () {
1992
+ var writer = new jspb.BinaryWriter();
1993
+ proto.google.rpc.Help.Link.serializeBinaryToWriter(this, writer);
1994
+ return writer.getResultBuffer();
1995
+ };
1996
+
1997
+ /**
1998
+ * Serializes the given message to binary data (in protobuf wire
1999
+ * format), writing to the given BinaryWriter.
2000
+ * @param {!proto.google.rpc.Help.Link} message
2001
+ * @param {!jspb.BinaryWriter} writer
2002
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2003
+ */
2004
+ proto.google.rpc.Help.Link.serializeBinaryToWriter = function (message, writer) {
2005
+ var f = undefined;
2006
+ f = message.getDescription();
2007
+ if (f.length > 0) {
2008
+ writer.writeString(1, f);
2009
+ }
2010
+ f = message.getUrl();
2011
+ if (f.length > 0) {
2012
+ writer.writeString(2, f);
2013
+ }
2014
+ };
2015
+
2016
+ /**
2017
+ * optional string description = 1;
2018
+ * @return {string}
2019
+ */
2020
+ proto.google.rpc.Help.Link.prototype.getDescription = function () {
2021
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 1, "");
2022
+ };
2023
+
2024
+ /**
2025
+ * @param {string} value
2026
+ * @return {!proto.google.rpc.Help.Link} returns this
2027
+ */
2028
+ proto.google.rpc.Help.Link.prototype.setDescription = function (value) {
2029
+ return jspb.Message.setProto3StringField(this, 1, value);
2030
+ };
2031
+
2032
+ /**
2033
+ * optional string url = 2;
2034
+ * @return {string}
2035
+ */
2036
+ proto.google.rpc.Help.Link.prototype.getUrl = function () {
2037
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 2, "");
2038
+ };
2039
+
2040
+ /**
2041
+ * @param {string} value
2042
+ * @return {!proto.google.rpc.Help.Link} returns this
2043
+ */
2044
+ proto.google.rpc.Help.Link.prototype.setUrl = function (value) {
2045
+ return jspb.Message.setProto3StringField(this, 2, value);
2046
+ };
2047
+
2048
+ /**
2049
+ * repeated Link links = 1;
2050
+ * @return {!Array<!proto.google.rpc.Help.Link>}
2051
+ */
2052
+ proto.google.rpc.Help.prototype.getLinksList = function () {
2053
+ return /** @type{!Array<!proto.google.rpc.Help.Link>} */jspb.Message.getRepeatedWrapperField(this, proto.google.rpc.Help.Link, 1);
2054
+ };
2055
+
2056
+ /**
2057
+ * @param {!Array<!proto.google.rpc.Help.Link>} value
2058
+ * @return {!proto.google.rpc.Help} returns this
2059
+ */
2060
+ proto.google.rpc.Help.prototype.setLinksList = function (value) {
2061
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
2062
+ };
2063
+
2064
+ /**
2065
+ * @param {!proto.google.rpc.Help.Link=} opt_value
2066
+ * @param {number=} opt_index
2067
+ * @return {!proto.google.rpc.Help.Link}
2068
+ */
2069
+ proto.google.rpc.Help.prototype.addLinks = function (opt_value, opt_index) {
2070
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.rpc.Help.Link, opt_index);
2071
+ };
2072
+
2073
+ /**
2074
+ * Clears the list making it empty but non-null.
2075
+ * @return {!proto.google.rpc.Help} returns this
2076
+ */
2077
+ proto.google.rpc.Help.prototype.clearLinksList = function () {
2078
+ return this.setLinksList([]);
2079
+ };
2080
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2081
+ /**
2082
+ * Creates an object representation of this proto.
2083
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2084
+ * Optional fields that are not set will be set to undefined.
2085
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2086
+ * For the list of reserved names please see:
2087
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2088
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2089
+ * JSPB instance for transitional soy proto support:
2090
+ * http://goto/soy-param-migration
2091
+ * @return {!Object}
2092
+ */
2093
+ proto.google.rpc.LocalizedMessage.prototype.toObject = function (opt_includeInstance) {
2094
+ return proto.google.rpc.LocalizedMessage.toObject(opt_includeInstance, this);
2095
+ };
2096
+
2097
+ /**
2098
+ * Static version of the {@see toObject} method.
2099
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2100
+ * the JSPB instance for transitional soy proto support:
2101
+ * http://goto/soy-param-migration
2102
+ * @param {!proto.google.rpc.LocalizedMessage} msg The msg instance to transform.
2103
+ * @return {!Object}
2104
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2105
+ */
2106
+ proto.google.rpc.LocalizedMessage.toObject = function (includeInstance, msg) {
2107
+ var f,
2108
+ obj = {
2109
+ locale: jspb.Message.getFieldWithDefault(msg, 1, ""),
2110
+ message: jspb.Message.getFieldWithDefault(msg, 2, "")
2111
+ };
2112
+ if (includeInstance) {
2113
+ obj.$jspbMessageInstance = msg;
2114
+ }
2115
+ return obj;
2116
+ };
2117
+ }
2118
+
2119
+ /**
2120
+ * Deserializes binary data (in protobuf wire format).
2121
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2122
+ * @return {!proto.google.rpc.LocalizedMessage}
2123
+ */
2124
+ proto.google.rpc.LocalizedMessage.deserializeBinary = function (bytes) {
2125
+ var reader = new jspb.BinaryReader(bytes);
2126
+ var msg = new proto.google.rpc.LocalizedMessage();
2127
+ return proto.google.rpc.LocalizedMessage.deserializeBinaryFromReader(msg, reader);
2128
+ };
2129
+
2130
+ /**
2131
+ * Deserializes binary data (in protobuf wire format) from the
2132
+ * given reader into the given message object.
2133
+ * @param {!proto.google.rpc.LocalizedMessage} msg The message object to deserialize into.
2134
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2135
+ * @return {!proto.google.rpc.LocalizedMessage}
2136
+ */
2137
+ proto.google.rpc.LocalizedMessage.deserializeBinaryFromReader = function (msg, reader) {
2138
+ while (reader.nextField()) {
2139
+ if (reader.isEndGroup()) {
2140
+ break;
2141
+ }
2142
+ var field = reader.getFieldNumber();
2143
+ switch (field) {
2144
+ case 1:
2145
+ var value = /** @type {string} */reader.readString();
2146
+ msg.setLocale(value);
2147
+ break;
2148
+ case 2:
2149
+ var value = /** @type {string} */reader.readString();
2150
+ msg.setMessage(value);
2151
+ break;
2152
+ default:
2153
+ reader.skipField();
2154
+ break;
2155
+ }
2156
+ }
2157
+ return msg;
2158
+ };
2159
+
2160
+ /**
2161
+ * Serializes the message to binary data (in protobuf wire format).
2162
+ * @return {!Uint8Array}
2163
+ */
2164
+ proto.google.rpc.LocalizedMessage.prototype.serializeBinary = function () {
2165
+ var writer = new jspb.BinaryWriter();
2166
+ proto.google.rpc.LocalizedMessage.serializeBinaryToWriter(this, writer);
2167
+ return writer.getResultBuffer();
2168
+ };
2169
+
2170
+ /**
2171
+ * Serializes the given message to binary data (in protobuf wire
2172
+ * format), writing to the given BinaryWriter.
2173
+ * @param {!proto.google.rpc.LocalizedMessage} message
2174
+ * @param {!jspb.BinaryWriter} writer
2175
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2176
+ */
2177
+ proto.google.rpc.LocalizedMessage.serializeBinaryToWriter = function (message, writer) {
2178
+ var f = undefined;
2179
+ f = message.getLocale();
2180
+ if (f.length > 0) {
2181
+ writer.writeString(1, f);
2182
+ }
2183
+ f = message.getMessage();
2184
+ if (f.length > 0) {
2185
+ writer.writeString(2, f);
2186
+ }
2187
+ };
2188
+
2189
+ /**
2190
+ * optional string locale = 1;
2191
+ * @return {string}
2192
+ */
2193
+ proto.google.rpc.LocalizedMessage.prototype.getLocale = function () {
2194
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 1, "");
2195
+ };
2196
+
2197
+ /**
2198
+ * @param {string} value
2199
+ * @return {!proto.google.rpc.LocalizedMessage} returns this
2200
+ */
2201
+ proto.google.rpc.LocalizedMessage.prototype.setLocale = function (value) {
2202
+ return jspb.Message.setProto3StringField(this, 1, value);
2203
+ };
2204
+
2205
+ /**
2206
+ * optional string message = 2;
2207
+ * @return {string}
2208
+ */
2209
+ proto.google.rpc.LocalizedMessage.prototype.getMessage = function () {
2210
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 2, "");
2211
+ };
2212
+
2213
+ /**
2214
+ * @param {string} value
2215
+ * @return {!proto.google.rpc.LocalizedMessage} returns this
2216
+ */
2217
+ proto.google.rpc.LocalizedMessage.prototype.setMessage = function (value) {
2218
+ return jspb.Message.setProto3StringField(this, 2, value);
2219
+ };
2220
+ goog.object.extend(exports, proto.google.rpc);