@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,974 @@
1
+ "use strict";
2
+
3
+ // source: proto/feature/segment.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 proto_feature_rule_pb = require('../../proto/feature/rule_pb.js');
22
+ goog.object.extend(proto, proto_feature_rule_pb);
23
+ var proto_feature_feature_pb = require('../../proto/feature/feature_pb.js');
24
+ goog.object.extend(proto, proto_feature_feature_pb);
25
+ goog.exportSymbol('proto.bucketeer.feature.Segment', null, global);
26
+ goog.exportSymbol('proto.bucketeer.feature.Segment.Status', null, global);
27
+ goog.exportSymbol('proto.bucketeer.feature.SegmentUser', null, global);
28
+ goog.exportSymbol('proto.bucketeer.feature.SegmentUser.State', null, global);
29
+ goog.exportSymbol('proto.bucketeer.feature.SegmentUsers', null, global);
30
+ /**
31
+ * Generated by JsPbCodeGenerator.
32
+ * @param {Array=} opt_data Optional initial data array, typically from a
33
+ * server response, or constructed directly in Javascript. The array is used
34
+ * in place and becomes part of the constructed object. It is not cloned.
35
+ * If no data is provided, the constructed object will be empty, but still
36
+ * valid.
37
+ * @extends {jspb.Message}
38
+ * @constructor
39
+ */
40
+ proto.bucketeer.feature.Segment = function (opt_data) {
41
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.bucketeer.feature.Segment.repeatedFields_, null);
42
+ };
43
+ goog.inherits(proto.bucketeer.feature.Segment, jspb.Message);
44
+ if (goog.DEBUG && !COMPILED) {
45
+ /**
46
+ * @public
47
+ * @override
48
+ */
49
+ proto.bucketeer.feature.Segment.displayName = 'proto.bucketeer.feature.Segment';
50
+ }
51
+ /**
52
+ * Generated by JsPbCodeGenerator.
53
+ * @param {Array=} opt_data Optional initial data array, typically from a
54
+ * server response, or constructed directly in Javascript. The array is used
55
+ * in place and becomes part of the constructed object. It is not cloned.
56
+ * If no data is provided, the constructed object will be empty, but still
57
+ * valid.
58
+ * @extends {jspb.Message}
59
+ * @constructor
60
+ */
61
+ proto.bucketeer.feature.SegmentUser = function (opt_data) {
62
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
63
+ };
64
+ goog.inherits(proto.bucketeer.feature.SegmentUser, jspb.Message);
65
+ if (goog.DEBUG && !COMPILED) {
66
+ /**
67
+ * @public
68
+ * @override
69
+ */
70
+ proto.bucketeer.feature.SegmentUser.displayName = 'proto.bucketeer.feature.SegmentUser';
71
+ }
72
+ /**
73
+ * Generated by JsPbCodeGenerator.
74
+ * @param {Array=} opt_data Optional initial data array, typically from a
75
+ * server response, or constructed directly in Javascript. The array is used
76
+ * in place and becomes part of the constructed object. It is not cloned.
77
+ * If no data is provided, the constructed object will be empty, but still
78
+ * valid.
79
+ * @extends {jspb.Message}
80
+ * @constructor
81
+ */
82
+ proto.bucketeer.feature.SegmentUsers = function (opt_data) {
83
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.bucketeer.feature.SegmentUsers.repeatedFields_, null);
84
+ };
85
+ goog.inherits(proto.bucketeer.feature.SegmentUsers, jspb.Message);
86
+ if (goog.DEBUG && !COMPILED) {
87
+ /**
88
+ * @public
89
+ * @override
90
+ */
91
+ proto.bucketeer.feature.SegmentUsers.displayName = 'proto.bucketeer.feature.SegmentUsers';
92
+ }
93
+
94
+ /**
95
+ * List of repeated fields within this message type.
96
+ * @private {!Array<number>}
97
+ * @const
98
+ */
99
+ proto.bucketeer.feature.Segment.repeatedFields_ = [4, 13];
100
+ if (jspb.Message.GENERATE_TO_OBJECT) {
101
+ /**
102
+ * Creates an object representation of this proto.
103
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
104
+ * Optional fields that are not set will be set to undefined.
105
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
106
+ * For the list of reserved names please see:
107
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
108
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
109
+ * JSPB instance for transitional soy proto support:
110
+ * http://goto/soy-param-migration
111
+ * @return {!Object}
112
+ */
113
+ proto.bucketeer.feature.Segment.prototype.toObject = function (opt_includeInstance) {
114
+ return proto.bucketeer.feature.Segment.toObject(opt_includeInstance, this);
115
+ };
116
+
117
+ /**
118
+ * Static version of the {@see toObject} method.
119
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
120
+ * the JSPB instance for transitional soy proto support:
121
+ * http://goto/soy-param-migration
122
+ * @param {!proto.bucketeer.feature.Segment} msg The msg instance to transform.
123
+ * @return {!Object}
124
+ * @suppress {unusedLocalVariables} f is only used for nested messages
125
+ */
126
+ proto.bucketeer.feature.Segment.toObject = function (includeInstance, msg) {
127
+ var f,
128
+ obj = {
129
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
130
+ name: jspb.Message.getFieldWithDefault(msg, 2, ""),
131
+ description: jspb.Message.getFieldWithDefault(msg, 3, ""),
132
+ rulesList: jspb.Message.toObjectList(msg.getRulesList(), proto_feature_rule_pb.Rule.toObject, includeInstance),
133
+ createdAt: jspb.Message.getFieldWithDefault(msg, 5, 0),
134
+ updatedAt: jspb.Message.getFieldWithDefault(msg, 6, 0),
135
+ version: jspb.Message.getFieldWithDefault(msg, 7, 0),
136
+ deleted: jspb.Message.getBooleanFieldWithDefault(msg, 8, false),
137
+ includedUserCount: jspb.Message.getFieldWithDefault(msg, 9, 0),
138
+ excludedUserCount: jspb.Message.getFieldWithDefault(msg, 10, 0),
139
+ status: jspb.Message.getFieldWithDefault(msg, 11, 0),
140
+ isInUseStatus: jspb.Message.getBooleanFieldWithDefault(msg, 12, false),
141
+ featuresList: jspb.Message.toObjectList(msg.getFeaturesList(), proto_feature_feature_pb.Feature.toObject, includeInstance)
142
+ };
143
+ if (includeInstance) {
144
+ obj.$jspbMessageInstance = msg;
145
+ }
146
+ return obj;
147
+ };
148
+ }
149
+
150
+ /**
151
+ * Deserializes binary data (in protobuf wire format).
152
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
153
+ * @return {!proto.bucketeer.feature.Segment}
154
+ */
155
+ proto.bucketeer.feature.Segment.deserializeBinary = function (bytes) {
156
+ var reader = new jspb.BinaryReader(bytes);
157
+ var msg = new proto.bucketeer.feature.Segment();
158
+ return proto.bucketeer.feature.Segment.deserializeBinaryFromReader(msg, reader);
159
+ };
160
+
161
+ /**
162
+ * Deserializes binary data (in protobuf wire format) from the
163
+ * given reader into the given message object.
164
+ * @param {!proto.bucketeer.feature.Segment} msg The message object to deserialize into.
165
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
166
+ * @return {!proto.bucketeer.feature.Segment}
167
+ */
168
+ proto.bucketeer.feature.Segment.deserializeBinaryFromReader = function (msg, reader) {
169
+ while (reader.nextField()) {
170
+ if (reader.isEndGroup()) {
171
+ break;
172
+ }
173
+ var field = reader.getFieldNumber();
174
+ switch (field) {
175
+ case 1:
176
+ var value = /** @type {string} */reader.readString();
177
+ msg.setId(value);
178
+ break;
179
+ case 2:
180
+ var value = /** @type {string} */reader.readString();
181
+ msg.setName(value);
182
+ break;
183
+ case 3:
184
+ var value = /** @type {string} */reader.readString();
185
+ msg.setDescription(value);
186
+ break;
187
+ case 4:
188
+ var value = new proto_feature_rule_pb.Rule();
189
+ reader.readMessage(value, proto_feature_rule_pb.Rule.deserializeBinaryFromReader);
190
+ msg.addRules(value);
191
+ break;
192
+ case 5:
193
+ var value = /** @type {number} */reader.readInt64();
194
+ msg.setCreatedAt(value);
195
+ break;
196
+ case 6:
197
+ var value = /** @type {number} */reader.readInt64();
198
+ msg.setUpdatedAt(value);
199
+ break;
200
+ case 7:
201
+ var value = /** @type {number} */reader.readInt64();
202
+ msg.setVersion(value);
203
+ break;
204
+ case 8:
205
+ var value = /** @type {boolean} */reader.readBool();
206
+ msg.setDeleted(value);
207
+ break;
208
+ case 9:
209
+ var value = /** @type {number} */reader.readInt64();
210
+ msg.setIncludedUserCount(value);
211
+ break;
212
+ case 10:
213
+ var value = /** @type {number} */reader.readInt64();
214
+ msg.setExcludedUserCount(value);
215
+ break;
216
+ case 11:
217
+ var value = /** @type {!proto.bucketeer.feature.Segment.Status} */reader.readEnum();
218
+ msg.setStatus(value);
219
+ break;
220
+ case 12:
221
+ var value = /** @type {boolean} */reader.readBool();
222
+ msg.setIsInUseStatus(value);
223
+ break;
224
+ case 13:
225
+ var value = new proto_feature_feature_pb.Feature();
226
+ reader.readMessage(value, proto_feature_feature_pb.Feature.deserializeBinaryFromReader);
227
+ msg.addFeatures(value);
228
+ break;
229
+ default:
230
+ reader.skipField();
231
+ break;
232
+ }
233
+ }
234
+ return msg;
235
+ };
236
+
237
+ /**
238
+ * Serializes the message to binary data (in protobuf wire format).
239
+ * @return {!Uint8Array}
240
+ */
241
+ proto.bucketeer.feature.Segment.prototype.serializeBinary = function () {
242
+ var writer = new jspb.BinaryWriter();
243
+ proto.bucketeer.feature.Segment.serializeBinaryToWriter(this, writer);
244
+ return writer.getResultBuffer();
245
+ };
246
+
247
+ /**
248
+ * Serializes the given message to binary data (in protobuf wire
249
+ * format), writing to the given BinaryWriter.
250
+ * @param {!proto.bucketeer.feature.Segment} message
251
+ * @param {!jspb.BinaryWriter} writer
252
+ * @suppress {unusedLocalVariables} f is only used for nested messages
253
+ */
254
+ proto.bucketeer.feature.Segment.serializeBinaryToWriter = function (message, writer) {
255
+ var f = undefined;
256
+ f = message.getId();
257
+ if (f.length > 0) {
258
+ writer.writeString(1, f);
259
+ }
260
+ f = message.getName();
261
+ if (f.length > 0) {
262
+ writer.writeString(2, f);
263
+ }
264
+ f = message.getDescription();
265
+ if (f.length > 0) {
266
+ writer.writeString(3, f);
267
+ }
268
+ f = message.getRulesList();
269
+ if (f.length > 0) {
270
+ writer.writeRepeatedMessage(4, f, proto_feature_rule_pb.Rule.serializeBinaryToWriter);
271
+ }
272
+ f = message.getCreatedAt();
273
+ if (f !== 0) {
274
+ writer.writeInt64(5, f);
275
+ }
276
+ f = message.getUpdatedAt();
277
+ if (f !== 0) {
278
+ writer.writeInt64(6, f);
279
+ }
280
+ f = message.getVersion();
281
+ if (f !== 0) {
282
+ writer.writeInt64(7, f);
283
+ }
284
+ f = message.getDeleted();
285
+ if (f) {
286
+ writer.writeBool(8, f);
287
+ }
288
+ f = message.getIncludedUserCount();
289
+ if (f !== 0) {
290
+ writer.writeInt64(9, f);
291
+ }
292
+ f = message.getExcludedUserCount();
293
+ if (f !== 0) {
294
+ writer.writeInt64(10, f);
295
+ }
296
+ f = message.getStatus();
297
+ if (f !== 0.0) {
298
+ writer.writeEnum(11, f);
299
+ }
300
+ f = message.getIsInUseStatus();
301
+ if (f) {
302
+ writer.writeBool(12, f);
303
+ }
304
+ f = message.getFeaturesList();
305
+ if (f.length > 0) {
306
+ writer.writeRepeatedMessage(13, f, proto_feature_feature_pb.Feature.serializeBinaryToWriter);
307
+ }
308
+ };
309
+
310
+ /**
311
+ * @enum {number}
312
+ */
313
+ proto.bucketeer.feature.Segment.Status = {
314
+ INITIAL: 0,
315
+ UPLOADING: 1,
316
+ SUCEEDED: 2,
317
+ FAILED: 3
318
+ };
319
+
320
+ /**
321
+ * optional string id = 1;
322
+ * @return {string}
323
+ */
324
+ proto.bucketeer.feature.Segment.prototype.getId = function () {
325
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 1, "");
326
+ };
327
+
328
+ /**
329
+ * @param {string} value
330
+ * @return {!proto.bucketeer.feature.Segment} returns this
331
+ */
332
+ proto.bucketeer.feature.Segment.prototype.setId = function (value) {
333
+ return jspb.Message.setProto3StringField(this, 1, value);
334
+ };
335
+
336
+ /**
337
+ * optional string name = 2;
338
+ * @return {string}
339
+ */
340
+ proto.bucketeer.feature.Segment.prototype.getName = function () {
341
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 2, "");
342
+ };
343
+
344
+ /**
345
+ * @param {string} value
346
+ * @return {!proto.bucketeer.feature.Segment} returns this
347
+ */
348
+ proto.bucketeer.feature.Segment.prototype.setName = function (value) {
349
+ return jspb.Message.setProto3StringField(this, 2, value);
350
+ };
351
+
352
+ /**
353
+ * optional string description = 3;
354
+ * @return {string}
355
+ */
356
+ proto.bucketeer.feature.Segment.prototype.getDescription = function () {
357
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 3, "");
358
+ };
359
+
360
+ /**
361
+ * @param {string} value
362
+ * @return {!proto.bucketeer.feature.Segment} returns this
363
+ */
364
+ proto.bucketeer.feature.Segment.prototype.setDescription = function (value) {
365
+ return jspb.Message.setProto3StringField(this, 3, value);
366
+ };
367
+
368
+ /**
369
+ * repeated Rule rules = 4;
370
+ * @return {!Array<!proto.bucketeer.feature.Rule>}
371
+ */
372
+ proto.bucketeer.feature.Segment.prototype.getRulesList = function () {
373
+ return /** @type{!Array<!proto.bucketeer.feature.Rule>} */jspb.Message.getRepeatedWrapperField(this, proto_feature_rule_pb.Rule, 4);
374
+ };
375
+
376
+ /**
377
+ * @param {!Array<!proto.bucketeer.feature.Rule>} value
378
+ * @return {!proto.bucketeer.feature.Segment} returns this
379
+ */
380
+ proto.bucketeer.feature.Segment.prototype.setRulesList = function (value) {
381
+ return jspb.Message.setRepeatedWrapperField(this, 4, value);
382
+ };
383
+
384
+ /**
385
+ * @param {!proto.bucketeer.feature.Rule=} opt_value
386
+ * @param {number=} opt_index
387
+ * @return {!proto.bucketeer.feature.Rule}
388
+ */
389
+ proto.bucketeer.feature.Segment.prototype.addRules = function (opt_value, opt_index) {
390
+ return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.bucketeer.feature.Rule, opt_index);
391
+ };
392
+
393
+ /**
394
+ * Clears the list making it empty but non-null.
395
+ * @return {!proto.bucketeer.feature.Segment} returns this
396
+ */
397
+ proto.bucketeer.feature.Segment.prototype.clearRulesList = function () {
398
+ return this.setRulesList([]);
399
+ };
400
+
401
+ /**
402
+ * optional int64 created_at = 5;
403
+ * @return {number}
404
+ */
405
+ proto.bucketeer.feature.Segment.prototype.getCreatedAt = function () {
406
+ return /** @type {number} */jspb.Message.getFieldWithDefault(this, 5, 0);
407
+ };
408
+
409
+ /**
410
+ * @param {number} value
411
+ * @return {!proto.bucketeer.feature.Segment} returns this
412
+ */
413
+ proto.bucketeer.feature.Segment.prototype.setCreatedAt = function (value) {
414
+ return jspb.Message.setProto3IntField(this, 5, value);
415
+ };
416
+
417
+ /**
418
+ * optional int64 updated_at = 6;
419
+ * @return {number}
420
+ */
421
+ proto.bucketeer.feature.Segment.prototype.getUpdatedAt = function () {
422
+ return /** @type {number} */jspb.Message.getFieldWithDefault(this, 6, 0);
423
+ };
424
+
425
+ /**
426
+ * @param {number} value
427
+ * @return {!proto.bucketeer.feature.Segment} returns this
428
+ */
429
+ proto.bucketeer.feature.Segment.prototype.setUpdatedAt = function (value) {
430
+ return jspb.Message.setProto3IntField(this, 6, value);
431
+ };
432
+
433
+ /**
434
+ * optional int64 version = 7;
435
+ * @return {number}
436
+ */
437
+ proto.bucketeer.feature.Segment.prototype.getVersion = function () {
438
+ return /** @type {number} */jspb.Message.getFieldWithDefault(this, 7, 0);
439
+ };
440
+
441
+ /**
442
+ * @param {number} value
443
+ * @return {!proto.bucketeer.feature.Segment} returns this
444
+ */
445
+ proto.bucketeer.feature.Segment.prototype.setVersion = function (value) {
446
+ return jspb.Message.setProto3IntField(this, 7, value);
447
+ };
448
+
449
+ /**
450
+ * optional bool deleted = 8;
451
+ * @return {boolean}
452
+ */
453
+ proto.bucketeer.feature.Segment.prototype.getDeleted = function () {
454
+ return /** @type {boolean} */jspb.Message.getBooleanFieldWithDefault(this, 8, false);
455
+ };
456
+
457
+ /**
458
+ * @param {boolean} value
459
+ * @return {!proto.bucketeer.feature.Segment} returns this
460
+ */
461
+ proto.bucketeer.feature.Segment.prototype.setDeleted = function (value) {
462
+ return jspb.Message.setProto3BooleanField(this, 8, value);
463
+ };
464
+
465
+ /**
466
+ * optional int64 included_user_count = 9;
467
+ * @return {number}
468
+ */
469
+ proto.bucketeer.feature.Segment.prototype.getIncludedUserCount = function () {
470
+ return /** @type {number} */jspb.Message.getFieldWithDefault(this, 9, 0);
471
+ };
472
+
473
+ /**
474
+ * @param {number} value
475
+ * @return {!proto.bucketeer.feature.Segment} returns this
476
+ */
477
+ proto.bucketeer.feature.Segment.prototype.setIncludedUserCount = function (value) {
478
+ return jspb.Message.setProto3IntField(this, 9, value);
479
+ };
480
+
481
+ /**
482
+ * optional int64 excluded_user_count = 10;
483
+ * @return {number}
484
+ */
485
+ proto.bucketeer.feature.Segment.prototype.getExcludedUserCount = function () {
486
+ return /** @type {number} */jspb.Message.getFieldWithDefault(this, 10, 0);
487
+ };
488
+
489
+ /**
490
+ * @param {number} value
491
+ * @return {!proto.bucketeer.feature.Segment} returns this
492
+ */
493
+ proto.bucketeer.feature.Segment.prototype.setExcludedUserCount = function (value) {
494
+ return jspb.Message.setProto3IntField(this, 10, value);
495
+ };
496
+
497
+ /**
498
+ * optional Status status = 11;
499
+ * @return {!proto.bucketeer.feature.Segment.Status}
500
+ */
501
+ proto.bucketeer.feature.Segment.prototype.getStatus = function () {
502
+ return /** @type {!proto.bucketeer.feature.Segment.Status} */jspb.Message.getFieldWithDefault(this, 11, 0);
503
+ };
504
+
505
+ /**
506
+ * @param {!proto.bucketeer.feature.Segment.Status} value
507
+ * @return {!proto.bucketeer.feature.Segment} returns this
508
+ */
509
+ proto.bucketeer.feature.Segment.prototype.setStatus = function (value) {
510
+ return jspb.Message.setProto3EnumField(this, 11, value);
511
+ };
512
+
513
+ /**
514
+ * optional bool is_in_use_status = 12;
515
+ * @return {boolean}
516
+ */
517
+ proto.bucketeer.feature.Segment.prototype.getIsInUseStatus = function () {
518
+ return /** @type {boolean} */jspb.Message.getBooleanFieldWithDefault(this, 12, false);
519
+ };
520
+
521
+ /**
522
+ * @param {boolean} value
523
+ * @return {!proto.bucketeer.feature.Segment} returns this
524
+ */
525
+ proto.bucketeer.feature.Segment.prototype.setIsInUseStatus = function (value) {
526
+ return jspb.Message.setProto3BooleanField(this, 12, value);
527
+ };
528
+
529
+ /**
530
+ * repeated Feature features = 13;
531
+ * @return {!Array<!proto.bucketeer.feature.Feature>}
532
+ */
533
+ proto.bucketeer.feature.Segment.prototype.getFeaturesList = function () {
534
+ return /** @type{!Array<!proto.bucketeer.feature.Feature>} */jspb.Message.getRepeatedWrapperField(this, proto_feature_feature_pb.Feature, 13);
535
+ };
536
+
537
+ /**
538
+ * @param {!Array<!proto.bucketeer.feature.Feature>} value
539
+ * @return {!proto.bucketeer.feature.Segment} returns this
540
+ */
541
+ proto.bucketeer.feature.Segment.prototype.setFeaturesList = function (value) {
542
+ return jspb.Message.setRepeatedWrapperField(this, 13, value);
543
+ };
544
+
545
+ /**
546
+ * @param {!proto.bucketeer.feature.Feature=} opt_value
547
+ * @param {number=} opt_index
548
+ * @return {!proto.bucketeer.feature.Feature}
549
+ */
550
+ proto.bucketeer.feature.Segment.prototype.addFeatures = function (opt_value, opt_index) {
551
+ return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.bucketeer.feature.Feature, opt_index);
552
+ };
553
+
554
+ /**
555
+ * Clears the list making it empty but non-null.
556
+ * @return {!proto.bucketeer.feature.Segment} returns this
557
+ */
558
+ proto.bucketeer.feature.Segment.prototype.clearFeaturesList = function () {
559
+ return this.setFeaturesList([]);
560
+ };
561
+ if (jspb.Message.GENERATE_TO_OBJECT) {
562
+ /**
563
+ * Creates an object representation of this proto.
564
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
565
+ * Optional fields that are not set will be set to undefined.
566
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
567
+ * For the list of reserved names please see:
568
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
569
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
570
+ * JSPB instance for transitional soy proto support:
571
+ * http://goto/soy-param-migration
572
+ * @return {!Object}
573
+ */
574
+ proto.bucketeer.feature.SegmentUser.prototype.toObject = function (opt_includeInstance) {
575
+ return proto.bucketeer.feature.SegmentUser.toObject(opt_includeInstance, this);
576
+ };
577
+
578
+ /**
579
+ * Static version of the {@see toObject} method.
580
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
581
+ * the JSPB instance for transitional soy proto support:
582
+ * http://goto/soy-param-migration
583
+ * @param {!proto.bucketeer.feature.SegmentUser} msg The msg instance to transform.
584
+ * @return {!Object}
585
+ * @suppress {unusedLocalVariables} f is only used for nested messages
586
+ */
587
+ proto.bucketeer.feature.SegmentUser.toObject = function (includeInstance, msg) {
588
+ var f,
589
+ obj = {
590
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
591
+ segmentId: jspb.Message.getFieldWithDefault(msg, 2, ""),
592
+ userId: jspb.Message.getFieldWithDefault(msg, 3, ""),
593
+ state: jspb.Message.getFieldWithDefault(msg, 4, 0),
594
+ deleted: jspb.Message.getBooleanFieldWithDefault(msg, 5, false)
595
+ };
596
+ if (includeInstance) {
597
+ obj.$jspbMessageInstance = msg;
598
+ }
599
+ return obj;
600
+ };
601
+ }
602
+
603
+ /**
604
+ * Deserializes binary data (in protobuf wire format).
605
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
606
+ * @return {!proto.bucketeer.feature.SegmentUser}
607
+ */
608
+ proto.bucketeer.feature.SegmentUser.deserializeBinary = function (bytes) {
609
+ var reader = new jspb.BinaryReader(bytes);
610
+ var msg = new proto.bucketeer.feature.SegmentUser();
611
+ return proto.bucketeer.feature.SegmentUser.deserializeBinaryFromReader(msg, reader);
612
+ };
613
+
614
+ /**
615
+ * Deserializes binary data (in protobuf wire format) from the
616
+ * given reader into the given message object.
617
+ * @param {!proto.bucketeer.feature.SegmentUser} msg The message object to deserialize into.
618
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
619
+ * @return {!proto.bucketeer.feature.SegmentUser}
620
+ */
621
+ proto.bucketeer.feature.SegmentUser.deserializeBinaryFromReader = function (msg, reader) {
622
+ while (reader.nextField()) {
623
+ if (reader.isEndGroup()) {
624
+ break;
625
+ }
626
+ var field = reader.getFieldNumber();
627
+ switch (field) {
628
+ case 1:
629
+ var value = /** @type {string} */reader.readString();
630
+ msg.setId(value);
631
+ break;
632
+ case 2:
633
+ var value = /** @type {string} */reader.readString();
634
+ msg.setSegmentId(value);
635
+ break;
636
+ case 3:
637
+ var value = /** @type {string} */reader.readString();
638
+ msg.setUserId(value);
639
+ break;
640
+ case 4:
641
+ var value = /** @type {!proto.bucketeer.feature.SegmentUser.State} */reader.readEnum();
642
+ msg.setState(value);
643
+ break;
644
+ case 5:
645
+ var value = /** @type {boolean} */reader.readBool();
646
+ msg.setDeleted(value);
647
+ break;
648
+ default:
649
+ reader.skipField();
650
+ break;
651
+ }
652
+ }
653
+ return msg;
654
+ };
655
+
656
+ /**
657
+ * Serializes the message to binary data (in protobuf wire format).
658
+ * @return {!Uint8Array}
659
+ */
660
+ proto.bucketeer.feature.SegmentUser.prototype.serializeBinary = function () {
661
+ var writer = new jspb.BinaryWriter();
662
+ proto.bucketeer.feature.SegmentUser.serializeBinaryToWriter(this, writer);
663
+ return writer.getResultBuffer();
664
+ };
665
+
666
+ /**
667
+ * Serializes the given message to binary data (in protobuf wire
668
+ * format), writing to the given BinaryWriter.
669
+ * @param {!proto.bucketeer.feature.SegmentUser} message
670
+ * @param {!jspb.BinaryWriter} writer
671
+ * @suppress {unusedLocalVariables} f is only used for nested messages
672
+ */
673
+ proto.bucketeer.feature.SegmentUser.serializeBinaryToWriter = function (message, writer) {
674
+ var f = undefined;
675
+ f = message.getId();
676
+ if (f.length > 0) {
677
+ writer.writeString(1, f);
678
+ }
679
+ f = message.getSegmentId();
680
+ if (f.length > 0) {
681
+ writer.writeString(2, f);
682
+ }
683
+ f = message.getUserId();
684
+ if (f.length > 0) {
685
+ writer.writeString(3, f);
686
+ }
687
+ f = message.getState();
688
+ if (f !== 0.0) {
689
+ writer.writeEnum(4, f);
690
+ }
691
+ f = message.getDeleted();
692
+ if (f) {
693
+ writer.writeBool(5, f);
694
+ }
695
+ };
696
+
697
+ /**
698
+ * @enum {number}
699
+ */
700
+ proto.bucketeer.feature.SegmentUser.State = {
701
+ INCLUDED: 0,
702
+ EXCLUDED: 1
703
+ };
704
+
705
+ /**
706
+ * optional string id = 1;
707
+ * @return {string}
708
+ */
709
+ proto.bucketeer.feature.SegmentUser.prototype.getId = function () {
710
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 1, "");
711
+ };
712
+
713
+ /**
714
+ * @param {string} value
715
+ * @return {!proto.bucketeer.feature.SegmentUser} returns this
716
+ */
717
+ proto.bucketeer.feature.SegmentUser.prototype.setId = function (value) {
718
+ return jspb.Message.setProto3StringField(this, 1, value);
719
+ };
720
+
721
+ /**
722
+ * optional string segment_id = 2;
723
+ * @return {string}
724
+ */
725
+ proto.bucketeer.feature.SegmentUser.prototype.getSegmentId = function () {
726
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 2, "");
727
+ };
728
+
729
+ /**
730
+ * @param {string} value
731
+ * @return {!proto.bucketeer.feature.SegmentUser} returns this
732
+ */
733
+ proto.bucketeer.feature.SegmentUser.prototype.setSegmentId = function (value) {
734
+ return jspb.Message.setProto3StringField(this, 2, value);
735
+ };
736
+
737
+ /**
738
+ * optional string user_id = 3;
739
+ * @return {string}
740
+ */
741
+ proto.bucketeer.feature.SegmentUser.prototype.getUserId = function () {
742
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 3, "");
743
+ };
744
+
745
+ /**
746
+ * @param {string} value
747
+ * @return {!proto.bucketeer.feature.SegmentUser} returns this
748
+ */
749
+ proto.bucketeer.feature.SegmentUser.prototype.setUserId = function (value) {
750
+ return jspb.Message.setProto3StringField(this, 3, value);
751
+ };
752
+
753
+ /**
754
+ * optional State state = 4;
755
+ * @return {!proto.bucketeer.feature.SegmentUser.State}
756
+ */
757
+ proto.bucketeer.feature.SegmentUser.prototype.getState = function () {
758
+ return /** @type {!proto.bucketeer.feature.SegmentUser.State} */jspb.Message.getFieldWithDefault(this, 4, 0);
759
+ };
760
+
761
+ /**
762
+ * @param {!proto.bucketeer.feature.SegmentUser.State} value
763
+ * @return {!proto.bucketeer.feature.SegmentUser} returns this
764
+ */
765
+ proto.bucketeer.feature.SegmentUser.prototype.setState = function (value) {
766
+ return jspb.Message.setProto3EnumField(this, 4, value);
767
+ };
768
+
769
+ /**
770
+ * optional bool deleted = 5;
771
+ * @return {boolean}
772
+ */
773
+ proto.bucketeer.feature.SegmentUser.prototype.getDeleted = function () {
774
+ return /** @type {boolean} */jspb.Message.getBooleanFieldWithDefault(this, 5, false);
775
+ };
776
+
777
+ /**
778
+ * @param {boolean} value
779
+ * @return {!proto.bucketeer.feature.SegmentUser} returns this
780
+ */
781
+ proto.bucketeer.feature.SegmentUser.prototype.setDeleted = function (value) {
782
+ return jspb.Message.setProto3BooleanField(this, 5, value);
783
+ };
784
+
785
+ /**
786
+ * List of repeated fields within this message type.
787
+ * @private {!Array<number>}
788
+ * @const
789
+ */
790
+ proto.bucketeer.feature.SegmentUsers.repeatedFields_ = [2];
791
+ if (jspb.Message.GENERATE_TO_OBJECT) {
792
+ /**
793
+ * Creates an object representation of this proto.
794
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
795
+ * Optional fields that are not set will be set to undefined.
796
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
797
+ * For the list of reserved names please see:
798
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
799
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
800
+ * JSPB instance for transitional soy proto support:
801
+ * http://goto/soy-param-migration
802
+ * @return {!Object}
803
+ */
804
+ proto.bucketeer.feature.SegmentUsers.prototype.toObject = function (opt_includeInstance) {
805
+ return proto.bucketeer.feature.SegmentUsers.toObject(opt_includeInstance, this);
806
+ };
807
+
808
+ /**
809
+ * Static version of the {@see toObject} method.
810
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
811
+ * the JSPB instance for transitional soy proto support:
812
+ * http://goto/soy-param-migration
813
+ * @param {!proto.bucketeer.feature.SegmentUsers} msg The msg instance to transform.
814
+ * @return {!Object}
815
+ * @suppress {unusedLocalVariables} f is only used for nested messages
816
+ */
817
+ proto.bucketeer.feature.SegmentUsers.toObject = function (includeInstance, msg) {
818
+ var f,
819
+ obj = {
820
+ segmentId: jspb.Message.getFieldWithDefault(msg, 1, ""),
821
+ usersList: jspb.Message.toObjectList(msg.getUsersList(), proto.bucketeer.feature.SegmentUser.toObject, includeInstance),
822
+ updatedAt: jspb.Message.getFieldWithDefault(msg, 3, 0)
823
+ };
824
+ if (includeInstance) {
825
+ obj.$jspbMessageInstance = msg;
826
+ }
827
+ return obj;
828
+ };
829
+ }
830
+
831
+ /**
832
+ * Deserializes binary data (in protobuf wire format).
833
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
834
+ * @return {!proto.bucketeer.feature.SegmentUsers}
835
+ */
836
+ proto.bucketeer.feature.SegmentUsers.deserializeBinary = function (bytes) {
837
+ var reader = new jspb.BinaryReader(bytes);
838
+ var msg = new proto.bucketeer.feature.SegmentUsers();
839
+ return proto.bucketeer.feature.SegmentUsers.deserializeBinaryFromReader(msg, reader);
840
+ };
841
+
842
+ /**
843
+ * Deserializes binary data (in protobuf wire format) from the
844
+ * given reader into the given message object.
845
+ * @param {!proto.bucketeer.feature.SegmentUsers} msg The message object to deserialize into.
846
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
847
+ * @return {!proto.bucketeer.feature.SegmentUsers}
848
+ */
849
+ proto.bucketeer.feature.SegmentUsers.deserializeBinaryFromReader = function (msg, reader) {
850
+ while (reader.nextField()) {
851
+ if (reader.isEndGroup()) {
852
+ break;
853
+ }
854
+ var field = reader.getFieldNumber();
855
+ switch (field) {
856
+ case 1:
857
+ var value = /** @type {string} */reader.readString();
858
+ msg.setSegmentId(value);
859
+ break;
860
+ case 2:
861
+ var value = new proto.bucketeer.feature.SegmentUser();
862
+ reader.readMessage(value, proto.bucketeer.feature.SegmentUser.deserializeBinaryFromReader);
863
+ msg.addUsers(value);
864
+ break;
865
+ case 3:
866
+ var value = /** @type {number} */reader.readInt64();
867
+ msg.setUpdatedAt(value);
868
+ break;
869
+ default:
870
+ reader.skipField();
871
+ break;
872
+ }
873
+ }
874
+ return msg;
875
+ };
876
+
877
+ /**
878
+ * Serializes the message to binary data (in protobuf wire format).
879
+ * @return {!Uint8Array}
880
+ */
881
+ proto.bucketeer.feature.SegmentUsers.prototype.serializeBinary = function () {
882
+ var writer = new jspb.BinaryWriter();
883
+ proto.bucketeer.feature.SegmentUsers.serializeBinaryToWriter(this, writer);
884
+ return writer.getResultBuffer();
885
+ };
886
+
887
+ /**
888
+ * Serializes the given message to binary data (in protobuf wire
889
+ * format), writing to the given BinaryWriter.
890
+ * @param {!proto.bucketeer.feature.SegmentUsers} message
891
+ * @param {!jspb.BinaryWriter} writer
892
+ * @suppress {unusedLocalVariables} f is only used for nested messages
893
+ */
894
+ proto.bucketeer.feature.SegmentUsers.serializeBinaryToWriter = function (message, writer) {
895
+ var f = undefined;
896
+ f = message.getSegmentId();
897
+ if (f.length > 0) {
898
+ writer.writeString(1, f);
899
+ }
900
+ f = message.getUsersList();
901
+ if (f.length > 0) {
902
+ writer.writeRepeatedMessage(2, f, proto.bucketeer.feature.SegmentUser.serializeBinaryToWriter);
903
+ }
904
+ f = message.getUpdatedAt();
905
+ if (f !== 0) {
906
+ writer.writeInt64(3, f);
907
+ }
908
+ };
909
+
910
+ /**
911
+ * optional string segment_id = 1;
912
+ * @return {string}
913
+ */
914
+ proto.bucketeer.feature.SegmentUsers.prototype.getSegmentId = function () {
915
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 1, "");
916
+ };
917
+
918
+ /**
919
+ * @param {string} value
920
+ * @return {!proto.bucketeer.feature.SegmentUsers} returns this
921
+ */
922
+ proto.bucketeer.feature.SegmentUsers.prototype.setSegmentId = function (value) {
923
+ return jspb.Message.setProto3StringField(this, 1, value);
924
+ };
925
+
926
+ /**
927
+ * repeated SegmentUser users = 2;
928
+ * @return {!Array<!proto.bucketeer.feature.SegmentUser>}
929
+ */
930
+ proto.bucketeer.feature.SegmentUsers.prototype.getUsersList = function () {
931
+ return /** @type{!Array<!proto.bucketeer.feature.SegmentUser>} */jspb.Message.getRepeatedWrapperField(this, proto.bucketeer.feature.SegmentUser, 2);
932
+ };
933
+
934
+ /**
935
+ * @param {!Array<!proto.bucketeer.feature.SegmentUser>} value
936
+ * @return {!proto.bucketeer.feature.SegmentUsers} returns this
937
+ */
938
+ proto.bucketeer.feature.SegmentUsers.prototype.setUsersList = function (value) {
939
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
940
+ };
941
+
942
+ /**
943
+ * @param {!proto.bucketeer.feature.SegmentUser=} opt_value
944
+ * @param {number=} opt_index
945
+ * @return {!proto.bucketeer.feature.SegmentUser}
946
+ */
947
+ proto.bucketeer.feature.SegmentUsers.prototype.addUsers = function (opt_value, opt_index) {
948
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.bucketeer.feature.SegmentUser, opt_index);
949
+ };
950
+
951
+ /**
952
+ * Clears the list making it empty but non-null.
953
+ * @return {!proto.bucketeer.feature.SegmentUsers} returns this
954
+ */
955
+ proto.bucketeer.feature.SegmentUsers.prototype.clearUsersList = function () {
956
+ return this.setUsersList([]);
957
+ };
958
+
959
+ /**
960
+ * optional int64 updated_at = 3;
961
+ * @return {number}
962
+ */
963
+ proto.bucketeer.feature.SegmentUsers.prototype.getUpdatedAt = function () {
964
+ return /** @type {number} */jspb.Message.getFieldWithDefault(this, 3, 0);
965
+ };
966
+
967
+ /**
968
+ * @param {number} value
969
+ * @return {!proto.bucketeer.feature.SegmentUsers} returns this
970
+ */
971
+ proto.bucketeer.feature.SegmentUsers.prototype.setUpdatedAt = function (value) {
972
+ return jspb.Message.setProto3IntField(this, 3, value);
973
+ };
974
+ goog.object.extend(exports, proto.bucketeer.feature);