protobuf-platform 1.0.235 → 1.0.236
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.
- package/package.json +1 -1
- package/promocode/promocode.proto +40 -0
- package/promocode/promocode_grpc_pb.js +122 -0
- package/promocode/promocode_pb.js +1719 -0
@@ -21,6 +21,12 @@ var global = (function() {
|
|
21
21
|
return Function('return this')();
|
22
22
|
}.call(null));
|
23
23
|
|
24
|
+
goog.exportSymbol('proto.promocode.CodeItem', null, global);
|
25
|
+
goog.exportSymbol('proto.promocode.CodeItemsResponse', null, global);
|
26
|
+
goog.exportSymbol('proto.promocode.CodeRequest', null, global);
|
27
|
+
goog.exportSymbol('proto.promocode.CodeResponse', null, global);
|
28
|
+
goog.exportSymbol('proto.promocode.CodeStatusResponse', null, global);
|
29
|
+
goog.exportSymbol('proto.promocode.GetCodeRequest', null, global);
|
24
30
|
goog.exportSymbol('proto.promocode.PaginationRequest', null, global);
|
25
31
|
goog.exportSymbol('proto.promocode.PingRequest', null, global);
|
26
32
|
goog.exportSymbol('proto.promocode.PongResponse', null, global);
|
@@ -109,6 +115,132 @@ if (goog.DEBUG && !COMPILED) {
|
|
109
115
|
*/
|
110
116
|
proto.promocode.UserSearchRequest.displayName = 'proto.promocode.UserSearchRequest';
|
111
117
|
}
|
118
|
+
/**
|
119
|
+
* Generated by JsPbCodeGenerator.
|
120
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
121
|
+
* server response, or constructed directly in Javascript. The array is used
|
122
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
123
|
+
* If no data is provided, the constructed object will be empty, but still
|
124
|
+
* valid.
|
125
|
+
* @extends {jspb.Message}
|
126
|
+
* @constructor
|
127
|
+
*/
|
128
|
+
proto.promocode.GetCodeRequest = function(opt_data) {
|
129
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
130
|
+
};
|
131
|
+
goog.inherits(proto.promocode.GetCodeRequest, jspb.Message);
|
132
|
+
if (goog.DEBUG && !COMPILED) {
|
133
|
+
/**
|
134
|
+
* @public
|
135
|
+
* @override
|
136
|
+
*/
|
137
|
+
proto.promocode.GetCodeRequest.displayName = 'proto.promocode.GetCodeRequest';
|
138
|
+
}
|
139
|
+
/**
|
140
|
+
* Generated by JsPbCodeGenerator.
|
141
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
142
|
+
* server response, or constructed directly in Javascript. The array is used
|
143
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
144
|
+
* If no data is provided, the constructed object will be empty, but still
|
145
|
+
* valid.
|
146
|
+
* @extends {jspb.Message}
|
147
|
+
* @constructor
|
148
|
+
*/
|
149
|
+
proto.promocode.CodeRequest = function(opt_data) {
|
150
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
151
|
+
};
|
152
|
+
goog.inherits(proto.promocode.CodeRequest, jspb.Message);
|
153
|
+
if (goog.DEBUG && !COMPILED) {
|
154
|
+
/**
|
155
|
+
* @public
|
156
|
+
* @override
|
157
|
+
*/
|
158
|
+
proto.promocode.CodeRequest.displayName = 'proto.promocode.CodeRequest';
|
159
|
+
}
|
160
|
+
/**
|
161
|
+
* Generated by JsPbCodeGenerator.
|
162
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
163
|
+
* server response, or constructed directly in Javascript. The array is used
|
164
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
165
|
+
* If no data is provided, the constructed object will be empty, but still
|
166
|
+
* valid.
|
167
|
+
* @extends {jspb.Message}
|
168
|
+
* @constructor
|
169
|
+
*/
|
170
|
+
proto.promocode.CodeItem = function(opt_data) {
|
171
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
172
|
+
};
|
173
|
+
goog.inherits(proto.promocode.CodeItem, jspb.Message);
|
174
|
+
if (goog.DEBUG && !COMPILED) {
|
175
|
+
/**
|
176
|
+
* @public
|
177
|
+
* @override
|
178
|
+
*/
|
179
|
+
proto.promocode.CodeItem.displayName = 'proto.promocode.CodeItem';
|
180
|
+
}
|
181
|
+
/**
|
182
|
+
* Generated by JsPbCodeGenerator.
|
183
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
184
|
+
* server response, or constructed directly in Javascript. The array is used
|
185
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
186
|
+
* If no data is provided, the constructed object will be empty, but still
|
187
|
+
* valid.
|
188
|
+
* @extends {jspb.Message}
|
189
|
+
* @constructor
|
190
|
+
*/
|
191
|
+
proto.promocode.CodeResponse = function(opt_data) {
|
192
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
193
|
+
};
|
194
|
+
goog.inherits(proto.promocode.CodeResponse, jspb.Message);
|
195
|
+
if (goog.DEBUG && !COMPILED) {
|
196
|
+
/**
|
197
|
+
* @public
|
198
|
+
* @override
|
199
|
+
*/
|
200
|
+
proto.promocode.CodeResponse.displayName = 'proto.promocode.CodeResponse';
|
201
|
+
}
|
202
|
+
/**
|
203
|
+
* Generated by JsPbCodeGenerator.
|
204
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
205
|
+
* server response, or constructed directly in Javascript. The array is used
|
206
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
207
|
+
* If no data is provided, the constructed object will be empty, but still
|
208
|
+
* valid.
|
209
|
+
* @extends {jspb.Message}
|
210
|
+
* @constructor
|
211
|
+
*/
|
212
|
+
proto.promocode.CodeItemsResponse = function(opt_data) {
|
213
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.promocode.CodeItemsResponse.repeatedFields_, null);
|
214
|
+
};
|
215
|
+
goog.inherits(proto.promocode.CodeItemsResponse, jspb.Message);
|
216
|
+
if (goog.DEBUG && !COMPILED) {
|
217
|
+
/**
|
218
|
+
* @public
|
219
|
+
* @override
|
220
|
+
*/
|
221
|
+
proto.promocode.CodeItemsResponse.displayName = 'proto.promocode.CodeItemsResponse';
|
222
|
+
}
|
223
|
+
/**
|
224
|
+
* Generated by JsPbCodeGenerator.
|
225
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
226
|
+
* server response, or constructed directly in Javascript. The array is used
|
227
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
228
|
+
* If no data is provided, the constructed object will be empty, but still
|
229
|
+
* valid.
|
230
|
+
* @extends {jspb.Message}
|
231
|
+
* @constructor
|
232
|
+
*/
|
233
|
+
proto.promocode.CodeStatusResponse = function(opt_data) {
|
234
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
235
|
+
};
|
236
|
+
goog.inherits(proto.promocode.CodeStatusResponse, jspb.Message);
|
237
|
+
if (goog.DEBUG && !COMPILED) {
|
238
|
+
/**
|
239
|
+
* @public
|
240
|
+
* @override
|
241
|
+
*/
|
242
|
+
proto.promocode.CodeStatusResponse.displayName = 'proto.promocode.CodeStatusResponse';
|
243
|
+
}
|
112
244
|
|
113
245
|
|
114
246
|
|
@@ -824,4 +956,1591 @@ proto.promocode.UserSearchRequest.prototype.hasCurrency = function() {
|
|
824
956
|
};
|
825
957
|
|
826
958
|
|
959
|
+
|
960
|
+
|
961
|
+
|
962
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
963
|
+
/**
|
964
|
+
* Creates an object representation of this proto.
|
965
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
966
|
+
* Optional fields that are not set will be set to undefined.
|
967
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
968
|
+
* For the list of reserved names please see:
|
969
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
970
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
971
|
+
* JSPB instance for transitional soy proto support:
|
972
|
+
* http://goto/soy-param-migration
|
973
|
+
* @return {!Object}
|
974
|
+
*/
|
975
|
+
proto.promocode.GetCodeRequest.prototype.toObject = function(opt_includeInstance) {
|
976
|
+
return proto.promocode.GetCodeRequest.toObject(opt_includeInstance, this);
|
977
|
+
};
|
978
|
+
|
979
|
+
|
980
|
+
/**
|
981
|
+
* Static version of the {@see toObject} method.
|
982
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
983
|
+
* the JSPB instance for transitional soy proto support:
|
984
|
+
* http://goto/soy-param-migration
|
985
|
+
* @param {!proto.promocode.GetCodeRequest} msg The msg instance to transform.
|
986
|
+
* @return {!Object}
|
987
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
988
|
+
*/
|
989
|
+
proto.promocode.GetCodeRequest.toObject = function(includeInstance, msg) {
|
990
|
+
var f, obj = {
|
991
|
+
id: jspb.Message.getFieldWithDefault(msg, 1, 0)
|
992
|
+
};
|
993
|
+
|
994
|
+
if (includeInstance) {
|
995
|
+
obj.$jspbMessageInstance = msg;
|
996
|
+
}
|
997
|
+
return obj;
|
998
|
+
};
|
999
|
+
}
|
1000
|
+
|
1001
|
+
|
1002
|
+
/**
|
1003
|
+
* Deserializes binary data (in protobuf wire format).
|
1004
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
1005
|
+
* @return {!proto.promocode.GetCodeRequest}
|
1006
|
+
*/
|
1007
|
+
proto.promocode.GetCodeRequest.deserializeBinary = function(bytes) {
|
1008
|
+
var reader = new jspb.BinaryReader(bytes);
|
1009
|
+
var msg = new proto.promocode.GetCodeRequest;
|
1010
|
+
return proto.promocode.GetCodeRequest.deserializeBinaryFromReader(msg, reader);
|
1011
|
+
};
|
1012
|
+
|
1013
|
+
|
1014
|
+
/**
|
1015
|
+
* Deserializes binary data (in protobuf wire format) from the
|
1016
|
+
* given reader into the given message object.
|
1017
|
+
* @param {!proto.promocode.GetCodeRequest} msg The message object to deserialize into.
|
1018
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
1019
|
+
* @return {!proto.promocode.GetCodeRequest}
|
1020
|
+
*/
|
1021
|
+
proto.promocode.GetCodeRequest.deserializeBinaryFromReader = function(msg, reader) {
|
1022
|
+
while (reader.nextField()) {
|
1023
|
+
if (reader.isEndGroup()) {
|
1024
|
+
break;
|
1025
|
+
}
|
1026
|
+
var field = reader.getFieldNumber();
|
1027
|
+
switch (field) {
|
1028
|
+
case 1:
|
1029
|
+
var value = /** @type {number} */ (reader.readInt32());
|
1030
|
+
msg.setId(value);
|
1031
|
+
break;
|
1032
|
+
default:
|
1033
|
+
reader.skipField();
|
1034
|
+
break;
|
1035
|
+
}
|
1036
|
+
}
|
1037
|
+
return msg;
|
1038
|
+
};
|
1039
|
+
|
1040
|
+
|
1041
|
+
/**
|
1042
|
+
* Serializes the message to binary data (in protobuf wire format).
|
1043
|
+
* @return {!Uint8Array}
|
1044
|
+
*/
|
1045
|
+
proto.promocode.GetCodeRequest.prototype.serializeBinary = function() {
|
1046
|
+
var writer = new jspb.BinaryWriter();
|
1047
|
+
proto.promocode.GetCodeRequest.serializeBinaryToWriter(this, writer);
|
1048
|
+
return writer.getResultBuffer();
|
1049
|
+
};
|
1050
|
+
|
1051
|
+
|
1052
|
+
/**
|
1053
|
+
* Serializes the given message to binary data (in protobuf wire
|
1054
|
+
* format), writing to the given BinaryWriter.
|
1055
|
+
* @param {!proto.promocode.GetCodeRequest} message
|
1056
|
+
* @param {!jspb.BinaryWriter} writer
|
1057
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1058
|
+
*/
|
1059
|
+
proto.promocode.GetCodeRequest.serializeBinaryToWriter = function(message, writer) {
|
1060
|
+
var f = undefined;
|
1061
|
+
f = message.getId();
|
1062
|
+
if (f !== 0) {
|
1063
|
+
writer.writeInt32(
|
1064
|
+
1,
|
1065
|
+
f
|
1066
|
+
);
|
1067
|
+
}
|
1068
|
+
};
|
1069
|
+
|
1070
|
+
|
1071
|
+
/**
|
1072
|
+
* optional int32 id = 1;
|
1073
|
+
* @return {number}
|
1074
|
+
*/
|
1075
|
+
proto.promocode.GetCodeRequest.prototype.getId = function() {
|
1076
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
1077
|
+
};
|
1078
|
+
|
1079
|
+
|
1080
|
+
/**
|
1081
|
+
* @param {number} value
|
1082
|
+
* @return {!proto.promocode.GetCodeRequest} returns this
|
1083
|
+
*/
|
1084
|
+
proto.promocode.GetCodeRequest.prototype.setId = function(value) {
|
1085
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
1086
|
+
};
|
1087
|
+
|
1088
|
+
|
1089
|
+
|
1090
|
+
|
1091
|
+
|
1092
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
1093
|
+
/**
|
1094
|
+
* Creates an object representation of this proto.
|
1095
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
1096
|
+
* Optional fields that are not set will be set to undefined.
|
1097
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
1098
|
+
* For the list of reserved names please see:
|
1099
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
1100
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
1101
|
+
* JSPB instance for transitional soy proto support:
|
1102
|
+
* http://goto/soy-param-migration
|
1103
|
+
* @return {!Object}
|
1104
|
+
*/
|
1105
|
+
proto.promocode.CodeRequest.prototype.toObject = function(opt_includeInstance) {
|
1106
|
+
return proto.promocode.CodeRequest.toObject(opt_includeInstance, this);
|
1107
|
+
};
|
1108
|
+
|
1109
|
+
|
1110
|
+
/**
|
1111
|
+
* Static version of the {@see toObject} method.
|
1112
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
1113
|
+
* the JSPB instance for transitional soy proto support:
|
1114
|
+
* http://goto/soy-param-migration
|
1115
|
+
* @param {!proto.promocode.CodeRequest} msg The msg instance to transform.
|
1116
|
+
* @return {!Object}
|
1117
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1118
|
+
*/
|
1119
|
+
proto.promocode.CodeRequest.toObject = function(includeInstance, msg) {
|
1120
|
+
var f, obj = {
|
1121
|
+
id: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
1122
|
+
title: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
1123
|
+
code: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
1124
|
+
description: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
1125
|
+
maxUsedCount: jspb.Message.getFieldWithDefault(msg, 5, 0),
|
1126
|
+
isActive: jspb.Message.getFieldWithDefault(msg, 6, 0),
|
1127
|
+
type: jspb.Message.getFieldWithDefault(msg, 7, "")
|
1128
|
+
};
|
1129
|
+
|
1130
|
+
if (includeInstance) {
|
1131
|
+
obj.$jspbMessageInstance = msg;
|
1132
|
+
}
|
1133
|
+
return obj;
|
1134
|
+
};
|
1135
|
+
}
|
1136
|
+
|
1137
|
+
|
1138
|
+
/**
|
1139
|
+
* Deserializes binary data (in protobuf wire format).
|
1140
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
1141
|
+
* @return {!proto.promocode.CodeRequest}
|
1142
|
+
*/
|
1143
|
+
proto.promocode.CodeRequest.deserializeBinary = function(bytes) {
|
1144
|
+
var reader = new jspb.BinaryReader(bytes);
|
1145
|
+
var msg = new proto.promocode.CodeRequest;
|
1146
|
+
return proto.promocode.CodeRequest.deserializeBinaryFromReader(msg, reader);
|
1147
|
+
};
|
1148
|
+
|
1149
|
+
|
1150
|
+
/**
|
1151
|
+
* Deserializes binary data (in protobuf wire format) from the
|
1152
|
+
* given reader into the given message object.
|
1153
|
+
* @param {!proto.promocode.CodeRequest} msg The message object to deserialize into.
|
1154
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
1155
|
+
* @return {!proto.promocode.CodeRequest}
|
1156
|
+
*/
|
1157
|
+
proto.promocode.CodeRequest.deserializeBinaryFromReader = function(msg, reader) {
|
1158
|
+
while (reader.nextField()) {
|
1159
|
+
if (reader.isEndGroup()) {
|
1160
|
+
break;
|
1161
|
+
}
|
1162
|
+
var field = reader.getFieldNumber();
|
1163
|
+
switch (field) {
|
1164
|
+
case 1:
|
1165
|
+
var value = /** @type {number} */ (reader.readInt32());
|
1166
|
+
msg.setId(value);
|
1167
|
+
break;
|
1168
|
+
case 2:
|
1169
|
+
var value = /** @type {string} */ (reader.readString());
|
1170
|
+
msg.setTitle(value);
|
1171
|
+
break;
|
1172
|
+
case 3:
|
1173
|
+
var value = /** @type {string} */ (reader.readString());
|
1174
|
+
msg.setCode(value);
|
1175
|
+
break;
|
1176
|
+
case 4:
|
1177
|
+
var value = /** @type {string} */ (reader.readString());
|
1178
|
+
msg.setDescription(value);
|
1179
|
+
break;
|
1180
|
+
case 5:
|
1181
|
+
var value = /** @type {number} */ (reader.readInt32());
|
1182
|
+
msg.setMaxUsedCount(value);
|
1183
|
+
break;
|
1184
|
+
case 6:
|
1185
|
+
var value = /** @type {number} */ (reader.readInt32());
|
1186
|
+
msg.setIsActive(value);
|
1187
|
+
break;
|
1188
|
+
case 7:
|
1189
|
+
var value = /** @type {string} */ (reader.readString());
|
1190
|
+
msg.setType(value);
|
1191
|
+
break;
|
1192
|
+
default:
|
1193
|
+
reader.skipField();
|
1194
|
+
break;
|
1195
|
+
}
|
1196
|
+
}
|
1197
|
+
return msg;
|
1198
|
+
};
|
1199
|
+
|
1200
|
+
|
1201
|
+
/**
|
1202
|
+
* Serializes the message to binary data (in protobuf wire format).
|
1203
|
+
* @return {!Uint8Array}
|
1204
|
+
*/
|
1205
|
+
proto.promocode.CodeRequest.prototype.serializeBinary = function() {
|
1206
|
+
var writer = new jspb.BinaryWriter();
|
1207
|
+
proto.promocode.CodeRequest.serializeBinaryToWriter(this, writer);
|
1208
|
+
return writer.getResultBuffer();
|
1209
|
+
};
|
1210
|
+
|
1211
|
+
|
1212
|
+
/**
|
1213
|
+
* Serializes the given message to binary data (in protobuf wire
|
1214
|
+
* format), writing to the given BinaryWriter.
|
1215
|
+
* @param {!proto.promocode.CodeRequest} message
|
1216
|
+
* @param {!jspb.BinaryWriter} writer
|
1217
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1218
|
+
*/
|
1219
|
+
proto.promocode.CodeRequest.serializeBinaryToWriter = function(message, writer) {
|
1220
|
+
var f = undefined;
|
1221
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 1));
|
1222
|
+
if (f != null) {
|
1223
|
+
writer.writeInt32(
|
1224
|
+
1,
|
1225
|
+
f
|
1226
|
+
);
|
1227
|
+
}
|
1228
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 2));
|
1229
|
+
if (f != null) {
|
1230
|
+
writer.writeString(
|
1231
|
+
2,
|
1232
|
+
f
|
1233
|
+
);
|
1234
|
+
}
|
1235
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 3));
|
1236
|
+
if (f != null) {
|
1237
|
+
writer.writeString(
|
1238
|
+
3,
|
1239
|
+
f
|
1240
|
+
);
|
1241
|
+
}
|
1242
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 4));
|
1243
|
+
if (f != null) {
|
1244
|
+
writer.writeString(
|
1245
|
+
4,
|
1246
|
+
f
|
1247
|
+
);
|
1248
|
+
}
|
1249
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 5));
|
1250
|
+
if (f != null) {
|
1251
|
+
writer.writeInt32(
|
1252
|
+
5,
|
1253
|
+
f
|
1254
|
+
);
|
1255
|
+
}
|
1256
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 6));
|
1257
|
+
if (f != null) {
|
1258
|
+
writer.writeInt32(
|
1259
|
+
6,
|
1260
|
+
f
|
1261
|
+
);
|
1262
|
+
}
|
1263
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 7));
|
1264
|
+
if (f != null) {
|
1265
|
+
writer.writeString(
|
1266
|
+
7,
|
1267
|
+
f
|
1268
|
+
);
|
1269
|
+
}
|
1270
|
+
};
|
1271
|
+
|
1272
|
+
|
1273
|
+
/**
|
1274
|
+
* optional int32 id = 1;
|
1275
|
+
* @return {number}
|
1276
|
+
*/
|
1277
|
+
proto.promocode.CodeRequest.prototype.getId = function() {
|
1278
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
1279
|
+
};
|
1280
|
+
|
1281
|
+
|
1282
|
+
/**
|
1283
|
+
* @param {number} value
|
1284
|
+
* @return {!proto.promocode.CodeRequest} returns this
|
1285
|
+
*/
|
1286
|
+
proto.promocode.CodeRequest.prototype.setId = function(value) {
|
1287
|
+
return jspb.Message.setField(this, 1, value);
|
1288
|
+
};
|
1289
|
+
|
1290
|
+
|
1291
|
+
/**
|
1292
|
+
* Clears the field making it undefined.
|
1293
|
+
* @return {!proto.promocode.CodeRequest} returns this
|
1294
|
+
*/
|
1295
|
+
proto.promocode.CodeRequest.prototype.clearId = function() {
|
1296
|
+
return jspb.Message.setField(this, 1, undefined);
|
1297
|
+
};
|
1298
|
+
|
1299
|
+
|
1300
|
+
/**
|
1301
|
+
* Returns whether this field is set.
|
1302
|
+
* @return {boolean}
|
1303
|
+
*/
|
1304
|
+
proto.promocode.CodeRequest.prototype.hasId = function() {
|
1305
|
+
return jspb.Message.getField(this, 1) != null;
|
1306
|
+
};
|
1307
|
+
|
1308
|
+
|
1309
|
+
/**
|
1310
|
+
* optional string title = 2;
|
1311
|
+
* @return {string}
|
1312
|
+
*/
|
1313
|
+
proto.promocode.CodeRequest.prototype.getTitle = function() {
|
1314
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
1315
|
+
};
|
1316
|
+
|
1317
|
+
|
1318
|
+
/**
|
1319
|
+
* @param {string} value
|
1320
|
+
* @return {!proto.promocode.CodeRequest} returns this
|
1321
|
+
*/
|
1322
|
+
proto.promocode.CodeRequest.prototype.setTitle = function(value) {
|
1323
|
+
return jspb.Message.setField(this, 2, value);
|
1324
|
+
};
|
1325
|
+
|
1326
|
+
|
1327
|
+
/**
|
1328
|
+
* Clears the field making it undefined.
|
1329
|
+
* @return {!proto.promocode.CodeRequest} returns this
|
1330
|
+
*/
|
1331
|
+
proto.promocode.CodeRequest.prototype.clearTitle = function() {
|
1332
|
+
return jspb.Message.setField(this, 2, undefined);
|
1333
|
+
};
|
1334
|
+
|
1335
|
+
|
1336
|
+
/**
|
1337
|
+
* Returns whether this field is set.
|
1338
|
+
* @return {boolean}
|
1339
|
+
*/
|
1340
|
+
proto.promocode.CodeRequest.prototype.hasTitle = function() {
|
1341
|
+
return jspb.Message.getField(this, 2) != null;
|
1342
|
+
};
|
1343
|
+
|
1344
|
+
|
1345
|
+
/**
|
1346
|
+
* optional string code = 3;
|
1347
|
+
* @return {string}
|
1348
|
+
*/
|
1349
|
+
proto.promocode.CodeRequest.prototype.getCode = function() {
|
1350
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
1351
|
+
};
|
1352
|
+
|
1353
|
+
|
1354
|
+
/**
|
1355
|
+
* @param {string} value
|
1356
|
+
* @return {!proto.promocode.CodeRequest} returns this
|
1357
|
+
*/
|
1358
|
+
proto.promocode.CodeRequest.prototype.setCode = function(value) {
|
1359
|
+
return jspb.Message.setField(this, 3, value);
|
1360
|
+
};
|
1361
|
+
|
1362
|
+
|
1363
|
+
/**
|
1364
|
+
* Clears the field making it undefined.
|
1365
|
+
* @return {!proto.promocode.CodeRequest} returns this
|
1366
|
+
*/
|
1367
|
+
proto.promocode.CodeRequest.prototype.clearCode = function() {
|
1368
|
+
return jspb.Message.setField(this, 3, undefined);
|
1369
|
+
};
|
1370
|
+
|
1371
|
+
|
1372
|
+
/**
|
1373
|
+
* Returns whether this field is set.
|
1374
|
+
* @return {boolean}
|
1375
|
+
*/
|
1376
|
+
proto.promocode.CodeRequest.prototype.hasCode = function() {
|
1377
|
+
return jspb.Message.getField(this, 3) != null;
|
1378
|
+
};
|
1379
|
+
|
1380
|
+
|
1381
|
+
/**
|
1382
|
+
* optional string description = 4;
|
1383
|
+
* @return {string}
|
1384
|
+
*/
|
1385
|
+
proto.promocode.CodeRequest.prototype.getDescription = function() {
|
1386
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
1387
|
+
};
|
1388
|
+
|
1389
|
+
|
1390
|
+
/**
|
1391
|
+
* @param {string} value
|
1392
|
+
* @return {!proto.promocode.CodeRequest} returns this
|
1393
|
+
*/
|
1394
|
+
proto.promocode.CodeRequest.prototype.setDescription = function(value) {
|
1395
|
+
return jspb.Message.setField(this, 4, value);
|
1396
|
+
};
|
1397
|
+
|
1398
|
+
|
1399
|
+
/**
|
1400
|
+
* Clears the field making it undefined.
|
1401
|
+
* @return {!proto.promocode.CodeRequest} returns this
|
1402
|
+
*/
|
1403
|
+
proto.promocode.CodeRequest.prototype.clearDescription = function() {
|
1404
|
+
return jspb.Message.setField(this, 4, undefined);
|
1405
|
+
};
|
1406
|
+
|
1407
|
+
|
1408
|
+
/**
|
1409
|
+
* Returns whether this field is set.
|
1410
|
+
* @return {boolean}
|
1411
|
+
*/
|
1412
|
+
proto.promocode.CodeRequest.prototype.hasDescription = function() {
|
1413
|
+
return jspb.Message.getField(this, 4) != null;
|
1414
|
+
};
|
1415
|
+
|
1416
|
+
|
1417
|
+
/**
|
1418
|
+
* optional int32 max_used_count = 5;
|
1419
|
+
* @return {number}
|
1420
|
+
*/
|
1421
|
+
proto.promocode.CodeRequest.prototype.getMaxUsedCount = function() {
|
1422
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
|
1423
|
+
};
|
1424
|
+
|
1425
|
+
|
1426
|
+
/**
|
1427
|
+
* @param {number} value
|
1428
|
+
* @return {!proto.promocode.CodeRequest} returns this
|
1429
|
+
*/
|
1430
|
+
proto.promocode.CodeRequest.prototype.setMaxUsedCount = function(value) {
|
1431
|
+
return jspb.Message.setField(this, 5, value);
|
1432
|
+
};
|
1433
|
+
|
1434
|
+
|
1435
|
+
/**
|
1436
|
+
* Clears the field making it undefined.
|
1437
|
+
* @return {!proto.promocode.CodeRequest} returns this
|
1438
|
+
*/
|
1439
|
+
proto.promocode.CodeRequest.prototype.clearMaxUsedCount = function() {
|
1440
|
+
return jspb.Message.setField(this, 5, undefined);
|
1441
|
+
};
|
1442
|
+
|
1443
|
+
|
1444
|
+
/**
|
1445
|
+
* Returns whether this field is set.
|
1446
|
+
* @return {boolean}
|
1447
|
+
*/
|
1448
|
+
proto.promocode.CodeRequest.prototype.hasMaxUsedCount = function() {
|
1449
|
+
return jspb.Message.getField(this, 5) != null;
|
1450
|
+
};
|
1451
|
+
|
1452
|
+
|
1453
|
+
/**
|
1454
|
+
* optional int32 is_active = 6;
|
1455
|
+
* @return {number}
|
1456
|
+
*/
|
1457
|
+
proto.promocode.CodeRequest.prototype.getIsActive = function() {
|
1458
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
|
1459
|
+
};
|
1460
|
+
|
1461
|
+
|
1462
|
+
/**
|
1463
|
+
* @param {number} value
|
1464
|
+
* @return {!proto.promocode.CodeRequest} returns this
|
1465
|
+
*/
|
1466
|
+
proto.promocode.CodeRequest.prototype.setIsActive = function(value) {
|
1467
|
+
return jspb.Message.setField(this, 6, value);
|
1468
|
+
};
|
1469
|
+
|
1470
|
+
|
1471
|
+
/**
|
1472
|
+
* Clears the field making it undefined.
|
1473
|
+
* @return {!proto.promocode.CodeRequest} returns this
|
1474
|
+
*/
|
1475
|
+
proto.promocode.CodeRequest.prototype.clearIsActive = function() {
|
1476
|
+
return jspb.Message.setField(this, 6, undefined);
|
1477
|
+
};
|
1478
|
+
|
1479
|
+
|
1480
|
+
/**
|
1481
|
+
* Returns whether this field is set.
|
1482
|
+
* @return {boolean}
|
1483
|
+
*/
|
1484
|
+
proto.promocode.CodeRequest.prototype.hasIsActive = function() {
|
1485
|
+
return jspb.Message.getField(this, 6) != null;
|
1486
|
+
};
|
1487
|
+
|
1488
|
+
|
1489
|
+
/**
|
1490
|
+
* optional string type = 7;
|
1491
|
+
* @return {string}
|
1492
|
+
*/
|
1493
|
+
proto.promocode.CodeRequest.prototype.getType = function() {
|
1494
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
|
1495
|
+
};
|
1496
|
+
|
1497
|
+
|
1498
|
+
/**
|
1499
|
+
* @param {string} value
|
1500
|
+
* @return {!proto.promocode.CodeRequest} returns this
|
1501
|
+
*/
|
1502
|
+
proto.promocode.CodeRequest.prototype.setType = function(value) {
|
1503
|
+
return jspb.Message.setField(this, 7, value);
|
1504
|
+
};
|
1505
|
+
|
1506
|
+
|
1507
|
+
/**
|
1508
|
+
* Clears the field making it undefined.
|
1509
|
+
* @return {!proto.promocode.CodeRequest} returns this
|
1510
|
+
*/
|
1511
|
+
proto.promocode.CodeRequest.prototype.clearType = function() {
|
1512
|
+
return jspb.Message.setField(this, 7, undefined);
|
1513
|
+
};
|
1514
|
+
|
1515
|
+
|
1516
|
+
/**
|
1517
|
+
* Returns whether this field is set.
|
1518
|
+
* @return {boolean}
|
1519
|
+
*/
|
1520
|
+
proto.promocode.CodeRequest.prototype.hasType = function() {
|
1521
|
+
return jspb.Message.getField(this, 7) != null;
|
1522
|
+
};
|
1523
|
+
|
1524
|
+
|
1525
|
+
|
1526
|
+
|
1527
|
+
|
1528
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
1529
|
+
/**
|
1530
|
+
* Creates an object representation of this proto.
|
1531
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
1532
|
+
* Optional fields that are not set will be set to undefined.
|
1533
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
1534
|
+
* For the list of reserved names please see:
|
1535
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
1536
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
1537
|
+
* JSPB instance for transitional soy proto support:
|
1538
|
+
* http://goto/soy-param-migration
|
1539
|
+
* @return {!Object}
|
1540
|
+
*/
|
1541
|
+
proto.promocode.CodeItem.prototype.toObject = function(opt_includeInstance) {
|
1542
|
+
return proto.promocode.CodeItem.toObject(opt_includeInstance, this);
|
1543
|
+
};
|
1544
|
+
|
1545
|
+
|
1546
|
+
/**
|
1547
|
+
* Static version of the {@see toObject} method.
|
1548
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
1549
|
+
* the JSPB instance for transitional soy proto support:
|
1550
|
+
* http://goto/soy-param-migration
|
1551
|
+
* @param {!proto.promocode.CodeItem} msg The msg instance to transform.
|
1552
|
+
* @return {!Object}
|
1553
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1554
|
+
*/
|
1555
|
+
proto.promocode.CodeItem.toObject = function(includeInstance, msg) {
|
1556
|
+
var f, obj = {
|
1557
|
+
id: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
1558
|
+
title: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
1559
|
+
code: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
1560
|
+
description: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
1561
|
+
maxUsedCount: jspb.Message.getFieldWithDefault(msg, 5, 0),
|
1562
|
+
currentUsedCount: jspb.Message.getFieldWithDefault(msg, 6, 0),
|
1563
|
+
isActive: jspb.Message.getFieldWithDefault(msg, 7, 0),
|
1564
|
+
type: jspb.Message.getFieldWithDefault(msg, 8, "")
|
1565
|
+
};
|
1566
|
+
|
1567
|
+
if (includeInstance) {
|
1568
|
+
obj.$jspbMessageInstance = msg;
|
1569
|
+
}
|
1570
|
+
return obj;
|
1571
|
+
};
|
1572
|
+
}
|
1573
|
+
|
1574
|
+
|
1575
|
+
/**
|
1576
|
+
* Deserializes binary data (in protobuf wire format).
|
1577
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
1578
|
+
* @return {!proto.promocode.CodeItem}
|
1579
|
+
*/
|
1580
|
+
proto.promocode.CodeItem.deserializeBinary = function(bytes) {
|
1581
|
+
var reader = new jspb.BinaryReader(bytes);
|
1582
|
+
var msg = new proto.promocode.CodeItem;
|
1583
|
+
return proto.promocode.CodeItem.deserializeBinaryFromReader(msg, reader);
|
1584
|
+
};
|
1585
|
+
|
1586
|
+
|
1587
|
+
/**
|
1588
|
+
* Deserializes binary data (in protobuf wire format) from the
|
1589
|
+
* given reader into the given message object.
|
1590
|
+
* @param {!proto.promocode.CodeItem} msg The message object to deserialize into.
|
1591
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
1592
|
+
* @return {!proto.promocode.CodeItem}
|
1593
|
+
*/
|
1594
|
+
proto.promocode.CodeItem.deserializeBinaryFromReader = function(msg, reader) {
|
1595
|
+
while (reader.nextField()) {
|
1596
|
+
if (reader.isEndGroup()) {
|
1597
|
+
break;
|
1598
|
+
}
|
1599
|
+
var field = reader.getFieldNumber();
|
1600
|
+
switch (field) {
|
1601
|
+
case 1:
|
1602
|
+
var value = /** @type {number} */ (reader.readInt32());
|
1603
|
+
msg.setId(value);
|
1604
|
+
break;
|
1605
|
+
case 2:
|
1606
|
+
var value = /** @type {string} */ (reader.readString());
|
1607
|
+
msg.setTitle(value);
|
1608
|
+
break;
|
1609
|
+
case 3:
|
1610
|
+
var value = /** @type {string} */ (reader.readString());
|
1611
|
+
msg.setCode(value);
|
1612
|
+
break;
|
1613
|
+
case 4:
|
1614
|
+
var value = /** @type {string} */ (reader.readString());
|
1615
|
+
msg.setDescription(value);
|
1616
|
+
break;
|
1617
|
+
case 5:
|
1618
|
+
var value = /** @type {number} */ (reader.readInt32());
|
1619
|
+
msg.setMaxUsedCount(value);
|
1620
|
+
break;
|
1621
|
+
case 6:
|
1622
|
+
var value = /** @type {number} */ (reader.readInt32());
|
1623
|
+
msg.setCurrentUsedCount(value);
|
1624
|
+
break;
|
1625
|
+
case 7:
|
1626
|
+
var value = /** @type {number} */ (reader.readInt32());
|
1627
|
+
msg.setIsActive(value);
|
1628
|
+
break;
|
1629
|
+
case 8:
|
1630
|
+
var value = /** @type {string} */ (reader.readString());
|
1631
|
+
msg.setType(value);
|
1632
|
+
break;
|
1633
|
+
default:
|
1634
|
+
reader.skipField();
|
1635
|
+
break;
|
1636
|
+
}
|
1637
|
+
}
|
1638
|
+
return msg;
|
1639
|
+
};
|
1640
|
+
|
1641
|
+
|
1642
|
+
/**
|
1643
|
+
* Serializes the message to binary data (in protobuf wire format).
|
1644
|
+
* @return {!Uint8Array}
|
1645
|
+
*/
|
1646
|
+
proto.promocode.CodeItem.prototype.serializeBinary = function() {
|
1647
|
+
var writer = new jspb.BinaryWriter();
|
1648
|
+
proto.promocode.CodeItem.serializeBinaryToWriter(this, writer);
|
1649
|
+
return writer.getResultBuffer();
|
1650
|
+
};
|
1651
|
+
|
1652
|
+
|
1653
|
+
/**
|
1654
|
+
* Serializes the given message to binary data (in protobuf wire
|
1655
|
+
* format), writing to the given BinaryWriter.
|
1656
|
+
* @param {!proto.promocode.CodeItem} message
|
1657
|
+
* @param {!jspb.BinaryWriter} writer
|
1658
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1659
|
+
*/
|
1660
|
+
proto.promocode.CodeItem.serializeBinaryToWriter = function(message, writer) {
|
1661
|
+
var f = undefined;
|
1662
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 1));
|
1663
|
+
if (f != null) {
|
1664
|
+
writer.writeInt32(
|
1665
|
+
1,
|
1666
|
+
f
|
1667
|
+
);
|
1668
|
+
}
|
1669
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 2));
|
1670
|
+
if (f != null) {
|
1671
|
+
writer.writeString(
|
1672
|
+
2,
|
1673
|
+
f
|
1674
|
+
);
|
1675
|
+
}
|
1676
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 3));
|
1677
|
+
if (f != null) {
|
1678
|
+
writer.writeString(
|
1679
|
+
3,
|
1680
|
+
f
|
1681
|
+
);
|
1682
|
+
}
|
1683
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 4));
|
1684
|
+
if (f != null) {
|
1685
|
+
writer.writeString(
|
1686
|
+
4,
|
1687
|
+
f
|
1688
|
+
);
|
1689
|
+
}
|
1690
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 5));
|
1691
|
+
if (f != null) {
|
1692
|
+
writer.writeInt32(
|
1693
|
+
5,
|
1694
|
+
f
|
1695
|
+
);
|
1696
|
+
}
|
1697
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 6));
|
1698
|
+
if (f != null) {
|
1699
|
+
writer.writeInt32(
|
1700
|
+
6,
|
1701
|
+
f
|
1702
|
+
);
|
1703
|
+
}
|
1704
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 7));
|
1705
|
+
if (f != null) {
|
1706
|
+
writer.writeInt32(
|
1707
|
+
7,
|
1708
|
+
f
|
1709
|
+
);
|
1710
|
+
}
|
1711
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 8));
|
1712
|
+
if (f != null) {
|
1713
|
+
writer.writeString(
|
1714
|
+
8,
|
1715
|
+
f
|
1716
|
+
);
|
1717
|
+
}
|
1718
|
+
};
|
1719
|
+
|
1720
|
+
|
1721
|
+
/**
|
1722
|
+
* optional int32 id = 1;
|
1723
|
+
* @return {number}
|
1724
|
+
*/
|
1725
|
+
proto.promocode.CodeItem.prototype.getId = function() {
|
1726
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
1727
|
+
};
|
1728
|
+
|
1729
|
+
|
1730
|
+
/**
|
1731
|
+
* @param {number} value
|
1732
|
+
* @return {!proto.promocode.CodeItem} returns this
|
1733
|
+
*/
|
1734
|
+
proto.promocode.CodeItem.prototype.setId = function(value) {
|
1735
|
+
return jspb.Message.setField(this, 1, value);
|
1736
|
+
};
|
1737
|
+
|
1738
|
+
|
1739
|
+
/**
|
1740
|
+
* Clears the field making it undefined.
|
1741
|
+
* @return {!proto.promocode.CodeItem} returns this
|
1742
|
+
*/
|
1743
|
+
proto.promocode.CodeItem.prototype.clearId = function() {
|
1744
|
+
return jspb.Message.setField(this, 1, undefined);
|
1745
|
+
};
|
1746
|
+
|
1747
|
+
|
1748
|
+
/**
|
1749
|
+
* Returns whether this field is set.
|
1750
|
+
* @return {boolean}
|
1751
|
+
*/
|
1752
|
+
proto.promocode.CodeItem.prototype.hasId = function() {
|
1753
|
+
return jspb.Message.getField(this, 1) != null;
|
1754
|
+
};
|
1755
|
+
|
1756
|
+
|
1757
|
+
/**
|
1758
|
+
* optional string title = 2;
|
1759
|
+
* @return {string}
|
1760
|
+
*/
|
1761
|
+
proto.promocode.CodeItem.prototype.getTitle = function() {
|
1762
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
1763
|
+
};
|
1764
|
+
|
1765
|
+
|
1766
|
+
/**
|
1767
|
+
* @param {string} value
|
1768
|
+
* @return {!proto.promocode.CodeItem} returns this
|
1769
|
+
*/
|
1770
|
+
proto.promocode.CodeItem.prototype.setTitle = function(value) {
|
1771
|
+
return jspb.Message.setField(this, 2, value);
|
1772
|
+
};
|
1773
|
+
|
1774
|
+
|
1775
|
+
/**
|
1776
|
+
* Clears the field making it undefined.
|
1777
|
+
* @return {!proto.promocode.CodeItem} returns this
|
1778
|
+
*/
|
1779
|
+
proto.promocode.CodeItem.prototype.clearTitle = function() {
|
1780
|
+
return jspb.Message.setField(this, 2, undefined);
|
1781
|
+
};
|
1782
|
+
|
1783
|
+
|
1784
|
+
/**
|
1785
|
+
* Returns whether this field is set.
|
1786
|
+
* @return {boolean}
|
1787
|
+
*/
|
1788
|
+
proto.promocode.CodeItem.prototype.hasTitle = function() {
|
1789
|
+
return jspb.Message.getField(this, 2) != null;
|
1790
|
+
};
|
1791
|
+
|
1792
|
+
|
1793
|
+
/**
|
1794
|
+
* optional string code = 3;
|
1795
|
+
* @return {string}
|
1796
|
+
*/
|
1797
|
+
proto.promocode.CodeItem.prototype.getCode = function() {
|
1798
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
1799
|
+
};
|
1800
|
+
|
1801
|
+
|
1802
|
+
/**
|
1803
|
+
* @param {string} value
|
1804
|
+
* @return {!proto.promocode.CodeItem} returns this
|
1805
|
+
*/
|
1806
|
+
proto.promocode.CodeItem.prototype.setCode = function(value) {
|
1807
|
+
return jspb.Message.setField(this, 3, value);
|
1808
|
+
};
|
1809
|
+
|
1810
|
+
|
1811
|
+
/**
|
1812
|
+
* Clears the field making it undefined.
|
1813
|
+
* @return {!proto.promocode.CodeItem} returns this
|
1814
|
+
*/
|
1815
|
+
proto.promocode.CodeItem.prototype.clearCode = function() {
|
1816
|
+
return jspb.Message.setField(this, 3, undefined);
|
1817
|
+
};
|
1818
|
+
|
1819
|
+
|
1820
|
+
/**
|
1821
|
+
* Returns whether this field is set.
|
1822
|
+
* @return {boolean}
|
1823
|
+
*/
|
1824
|
+
proto.promocode.CodeItem.prototype.hasCode = function() {
|
1825
|
+
return jspb.Message.getField(this, 3) != null;
|
1826
|
+
};
|
1827
|
+
|
1828
|
+
|
1829
|
+
/**
|
1830
|
+
* optional string description = 4;
|
1831
|
+
* @return {string}
|
1832
|
+
*/
|
1833
|
+
proto.promocode.CodeItem.prototype.getDescription = function() {
|
1834
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
1835
|
+
};
|
1836
|
+
|
1837
|
+
|
1838
|
+
/**
|
1839
|
+
* @param {string} value
|
1840
|
+
* @return {!proto.promocode.CodeItem} returns this
|
1841
|
+
*/
|
1842
|
+
proto.promocode.CodeItem.prototype.setDescription = function(value) {
|
1843
|
+
return jspb.Message.setField(this, 4, value);
|
1844
|
+
};
|
1845
|
+
|
1846
|
+
|
1847
|
+
/**
|
1848
|
+
* Clears the field making it undefined.
|
1849
|
+
* @return {!proto.promocode.CodeItem} returns this
|
1850
|
+
*/
|
1851
|
+
proto.promocode.CodeItem.prototype.clearDescription = function() {
|
1852
|
+
return jspb.Message.setField(this, 4, undefined);
|
1853
|
+
};
|
1854
|
+
|
1855
|
+
|
1856
|
+
/**
|
1857
|
+
* Returns whether this field is set.
|
1858
|
+
* @return {boolean}
|
1859
|
+
*/
|
1860
|
+
proto.promocode.CodeItem.prototype.hasDescription = function() {
|
1861
|
+
return jspb.Message.getField(this, 4) != null;
|
1862
|
+
};
|
1863
|
+
|
1864
|
+
|
1865
|
+
/**
|
1866
|
+
* optional int32 max_used_count = 5;
|
1867
|
+
* @return {number}
|
1868
|
+
*/
|
1869
|
+
proto.promocode.CodeItem.prototype.getMaxUsedCount = function() {
|
1870
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
|
1871
|
+
};
|
1872
|
+
|
1873
|
+
|
1874
|
+
/**
|
1875
|
+
* @param {number} value
|
1876
|
+
* @return {!proto.promocode.CodeItem} returns this
|
1877
|
+
*/
|
1878
|
+
proto.promocode.CodeItem.prototype.setMaxUsedCount = function(value) {
|
1879
|
+
return jspb.Message.setField(this, 5, value);
|
1880
|
+
};
|
1881
|
+
|
1882
|
+
|
1883
|
+
/**
|
1884
|
+
* Clears the field making it undefined.
|
1885
|
+
* @return {!proto.promocode.CodeItem} returns this
|
1886
|
+
*/
|
1887
|
+
proto.promocode.CodeItem.prototype.clearMaxUsedCount = function() {
|
1888
|
+
return jspb.Message.setField(this, 5, undefined);
|
1889
|
+
};
|
1890
|
+
|
1891
|
+
|
1892
|
+
/**
|
1893
|
+
* Returns whether this field is set.
|
1894
|
+
* @return {boolean}
|
1895
|
+
*/
|
1896
|
+
proto.promocode.CodeItem.prototype.hasMaxUsedCount = function() {
|
1897
|
+
return jspb.Message.getField(this, 5) != null;
|
1898
|
+
};
|
1899
|
+
|
1900
|
+
|
1901
|
+
/**
|
1902
|
+
* optional int32 current_used_count = 6;
|
1903
|
+
* @return {number}
|
1904
|
+
*/
|
1905
|
+
proto.promocode.CodeItem.prototype.getCurrentUsedCount = function() {
|
1906
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
|
1907
|
+
};
|
1908
|
+
|
1909
|
+
|
1910
|
+
/**
|
1911
|
+
* @param {number} value
|
1912
|
+
* @return {!proto.promocode.CodeItem} returns this
|
1913
|
+
*/
|
1914
|
+
proto.promocode.CodeItem.prototype.setCurrentUsedCount = function(value) {
|
1915
|
+
return jspb.Message.setField(this, 6, value);
|
1916
|
+
};
|
1917
|
+
|
1918
|
+
|
1919
|
+
/**
|
1920
|
+
* Clears the field making it undefined.
|
1921
|
+
* @return {!proto.promocode.CodeItem} returns this
|
1922
|
+
*/
|
1923
|
+
proto.promocode.CodeItem.prototype.clearCurrentUsedCount = function() {
|
1924
|
+
return jspb.Message.setField(this, 6, undefined);
|
1925
|
+
};
|
1926
|
+
|
1927
|
+
|
1928
|
+
/**
|
1929
|
+
* Returns whether this field is set.
|
1930
|
+
* @return {boolean}
|
1931
|
+
*/
|
1932
|
+
proto.promocode.CodeItem.prototype.hasCurrentUsedCount = function() {
|
1933
|
+
return jspb.Message.getField(this, 6) != null;
|
1934
|
+
};
|
1935
|
+
|
1936
|
+
|
1937
|
+
/**
|
1938
|
+
* optional int32 is_active = 7;
|
1939
|
+
* @return {number}
|
1940
|
+
*/
|
1941
|
+
proto.promocode.CodeItem.prototype.getIsActive = function() {
|
1942
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
|
1943
|
+
};
|
1944
|
+
|
1945
|
+
|
1946
|
+
/**
|
1947
|
+
* @param {number} value
|
1948
|
+
* @return {!proto.promocode.CodeItem} returns this
|
1949
|
+
*/
|
1950
|
+
proto.promocode.CodeItem.prototype.setIsActive = function(value) {
|
1951
|
+
return jspb.Message.setField(this, 7, value);
|
1952
|
+
};
|
1953
|
+
|
1954
|
+
|
1955
|
+
/**
|
1956
|
+
* Clears the field making it undefined.
|
1957
|
+
* @return {!proto.promocode.CodeItem} returns this
|
1958
|
+
*/
|
1959
|
+
proto.promocode.CodeItem.prototype.clearIsActive = function() {
|
1960
|
+
return jspb.Message.setField(this, 7, undefined);
|
1961
|
+
};
|
1962
|
+
|
1963
|
+
|
1964
|
+
/**
|
1965
|
+
* Returns whether this field is set.
|
1966
|
+
* @return {boolean}
|
1967
|
+
*/
|
1968
|
+
proto.promocode.CodeItem.prototype.hasIsActive = function() {
|
1969
|
+
return jspb.Message.getField(this, 7) != null;
|
1970
|
+
};
|
1971
|
+
|
1972
|
+
|
1973
|
+
/**
|
1974
|
+
* optional string type = 8;
|
1975
|
+
* @return {string}
|
1976
|
+
*/
|
1977
|
+
proto.promocode.CodeItem.prototype.getType = function() {
|
1978
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
|
1979
|
+
};
|
1980
|
+
|
1981
|
+
|
1982
|
+
/**
|
1983
|
+
* @param {string} value
|
1984
|
+
* @return {!proto.promocode.CodeItem} returns this
|
1985
|
+
*/
|
1986
|
+
proto.promocode.CodeItem.prototype.setType = function(value) {
|
1987
|
+
return jspb.Message.setField(this, 8, value);
|
1988
|
+
};
|
1989
|
+
|
1990
|
+
|
1991
|
+
/**
|
1992
|
+
* Clears the field making it undefined.
|
1993
|
+
* @return {!proto.promocode.CodeItem} returns this
|
1994
|
+
*/
|
1995
|
+
proto.promocode.CodeItem.prototype.clearType = function() {
|
1996
|
+
return jspb.Message.setField(this, 8, undefined);
|
1997
|
+
};
|
1998
|
+
|
1999
|
+
|
2000
|
+
/**
|
2001
|
+
* Returns whether this field is set.
|
2002
|
+
* @return {boolean}
|
2003
|
+
*/
|
2004
|
+
proto.promocode.CodeItem.prototype.hasType = function() {
|
2005
|
+
return jspb.Message.getField(this, 8) != null;
|
2006
|
+
};
|
2007
|
+
|
2008
|
+
|
2009
|
+
|
2010
|
+
|
2011
|
+
|
2012
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
2013
|
+
/**
|
2014
|
+
* Creates an object representation of this proto.
|
2015
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
2016
|
+
* Optional fields that are not set will be set to undefined.
|
2017
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
2018
|
+
* For the list of reserved names please see:
|
2019
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
2020
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
2021
|
+
* JSPB instance for transitional soy proto support:
|
2022
|
+
* http://goto/soy-param-migration
|
2023
|
+
* @return {!Object}
|
2024
|
+
*/
|
2025
|
+
proto.promocode.CodeResponse.prototype.toObject = function(opt_includeInstance) {
|
2026
|
+
return proto.promocode.CodeResponse.toObject(opt_includeInstance, this);
|
2027
|
+
};
|
2028
|
+
|
2029
|
+
|
2030
|
+
/**
|
2031
|
+
* Static version of the {@see toObject} method.
|
2032
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
2033
|
+
* the JSPB instance for transitional soy proto support:
|
2034
|
+
* http://goto/soy-param-migration
|
2035
|
+
* @param {!proto.promocode.CodeResponse} msg The msg instance to transform.
|
2036
|
+
* @return {!Object}
|
2037
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
2038
|
+
*/
|
2039
|
+
proto.promocode.CodeResponse.toObject = function(includeInstance, msg) {
|
2040
|
+
var f, obj = {
|
2041
|
+
data: (f = msg.getData()) && proto.promocode.CodeItem.toObject(includeInstance, f)
|
2042
|
+
};
|
2043
|
+
|
2044
|
+
if (includeInstance) {
|
2045
|
+
obj.$jspbMessageInstance = msg;
|
2046
|
+
}
|
2047
|
+
return obj;
|
2048
|
+
};
|
2049
|
+
}
|
2050
|
+
|
2051
|
+
|
2052
|
+
/**
|
2053
|
+
* Deserializes binary data (in protobuf wire format).
|
2054
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
2055
|
+
* @return {!proto.promocode.CodeResponse}
|
2056
|
+
*/
|
2057
|
+
proto.promocode.CodeResponse.deserializeBinary = function(bytes) {
|
2058
|
+
var reader = new jspb.BinaryReader(bytes);
|
2059
|
+
var msg = new proto.promocode.CodeResponse;
|
2060
|
+
return proto.promocode.CodeResponse.deserializeBinaryFromReader(msg, reader);
|
2061
|
+
};
|
2062
|
+
|
2063
|
+
|
2064
|
+
/**
|
2065
|
+
* Deserializes binary data (in protobuf wire format) from the
|
2066
|
+
* given reader into the given message object.
|
2067
|
+
* @param {!proto.promocode.CodeResponse} msg The message object to deserialize into.
|
2068
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
2069
|
+
* @return {!proto.promocode.CodeResponse}
|
2070
|
+
*/
|
2071
|
+
proto.promocode.CodeResponse.deserializeBinaryFromReader = function(msg, reader) {
|
2072
|
+
while (reader.nextField()) {
|
2073
|
+
if (reader.isEndGroup()) {
|
2074
|
+
break;
|
2075
|
+
}
|
2076
|
+
var field = reader.getFieldNumber();
|
2077
|
+
switch (field) {
|
2078
|
+
case 1:
|
2079
|
+
var value = new proto.promocode.CodeItem;
|
2080
|
+
reader.readMessage(value,proto.promocode.CodeItem.deserializeBinaryFromReader);
|
2081
|
+
msg.setData(value);
|
2082
|
+
break;
|
2083
|
+
default:
|
2084
|
+
reader.skipField();
|
2085
|
+
break;
|
2086
|
+
}
|
2087
|
+
}
|
2088
|
+
return msg;
|
2089
|
+
};
|
2090
|
+
|
2091
|
+
|
2092
|
+
/**
|
2093
|
+
* Serializes the message to binary data (in protobuf wire format).
|
2094
|
+
* @return {!Uint8Array}
|
2095
|
+
*/
|
2096
|
+
proto.promocode.CodeResponse.prototype.serializeBinary = function() {
|
2097
|
+
var writer = new jspb.BinaryWriter();
|
2098
|
+
proto.promocode.CodeResponse.serializeBinaryToWriter(this, writer);
|
2099
|
+
return writer.getResultBuffer();
|
2100
|
+
};
|
2101
|
+
|
2102
|
+
|
2103
|
+
/**
|
2104
|
+
* Serializes the given message to binary data (in protobuf wire
|
2105
|
+
* format), writing to the given BinaryWriter.
|
2106
|
+
* @param {!proto.promocode.CodeResponse} message
|
2107
|
+
* @param {!jspb.BinaryWriter} writer
|
2108
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
2109
|
+
*/
|
2110
|
+
proto.promocode.CodeResponse.serializeBinaryToWriter = function(message, writer) {
|
2111
|
+
var f = undefined;
|
2112
|
+
f = message.getData();
|
2113
|
+
if (f != null) {
|
2114
|
+
writer.writeMessage(
|
2115
|
+
1,
|
2116
|
+
f,
|
2117
|
+
proto.promocode.CodeItem.serializeBinaryToWriter
|
2118
|
+
);
|
2119
|
+
}
|
2120
|
+
};
|
2121
|
+
|
2122
|
+
|
2123
|
+
/**
|
2124
|
+
* optional CodeItem data = 1;
|
2125
|
+
* @return {?proto.promocode.CodeItem}
|
2126
|
+
*/
|
2127
|
+
proto.promocode.CodeResponse.prototype.getData = function() {
|
2128
|
+
return /** @type{?proto.promocode.CodeItem} */ (
|
2129
|
+
jspb.Message.getWrapperField(this, proto.promocode.CodeItem, 1));
|
2130
|
+
};
|
2131
|
+
|
2132
|
+
|
2133
|
+
/**
|
2134
|
+
* @param {?proto.promocode.CodeItem|undefined} value
|
2135
|
+
* @return {!proto.promocode.CodeResponse} returns this
|
2136
|
+
*/
|
2137
|
+
proto.promocode.CodeResponse.prototype.setData = function(value) {
|
2138
|
+
return jspb.Message.setWrapperField(this, 1, value);
|
2139
|
+
};
|
2140
|
+
|
2141
|
+
|
2142
|
+
/**
|
2143
|
+
* Clears the message field making it undefined.
|
2144
|
+
* @return {!proto.promocode.CodeResponse} returns this
|
2145
|
+
*/
|
2146
|
+
proto.promocode.CodeResponse.prototype.clearData = function() {
|
2147
|
+
return this.setData(undefined);
|
2148
|
+
};
|
2149
|
+
|
2150
|
+
|
2151
|
+
/**
|
2152
|
+
* Returns whether this field is set.
|
2153
|
+
* @return {boolean}
|
2154
|
+
*/
|
2155
|
+
proto.promocode.CodeResponse.prototype.hasData = function() {
|
2156
|
+
return jspb.Message.getField(this, 1) != null;
|
2157
|
+
};
|
2158
|
+
|
2159
|
+
|
2160
|
+
|
2161
|
+
/**
|
2162
|
+
* List of repeated fields within this message type.
|
2163
|
+
* @private {!Array<number>}
|
2164
|
+
* @const
|
2165
|
+
*/
|
2166
|
+
proto.promocode.CodeItemsResponse.repeatedFields_ = [1];
|
2167
|
+
|
2168
|
+
|
2169
|
+
|
2170
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
2171
|
+
/**
|
2172
|
+
* Creates an object representation of this proto.
|
2173
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
2174
|
+
* Optional fields that are not set will be set to undefined.
|
2175
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
2176
|
+
* For the list of reserved names please see:
|
2177
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
2178
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
2179
|
+
* JSPB instance for transitional soy proto support:
|
2180
|
+
* http://goto/soy-param-migration
|
2181
|
+
* @return {!Object}
|
2182
|
+
*/
|
2183
|
+
proto.promocode.CodeItemsResponse.prototype.toObject = function(opt_includeInstance) {
|
2184
|
+
return proto.promocode.CodeItemsResponse.toObject(opt_includeInstance, this);
|
2185
|
+
};
|
2186
|
+
|
2187
|
+
|
2188
|
+
/**
|
2189
|
+
* Static version of the {@see toObject} method.
|
2190
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
2191
|
+
* the JSPB instance for transitional soy proto support:
|
2192
|
+
* http://goto/soy-param-migration
|
2193
|
+
* @param {!proto.promocode.CodeItemsResponse} msg The msg instance to transform.
|
2194
|
+
* @return {!Object}
|
2195
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
2196
|
+
*/
|
2197
|
+
proto.promocode.CodeItemsResponse.toObject = function(includeInstance, msg) {
|
2198
|
+
var f, obj = {
|
2199
|
+
itemsList: jspb.Message.toObjectList(msg.getItemsList(),
|
2200
|
+
proto.promocode.CodeItem.toObject, includeInstance),
|
2201
|
+
totalPages: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
2202
|
+
totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0)
|
2203
|
+
};
|
2204
|
+
|
2205
|
+
if (includeInstance) {
|
2206
|
+
obj.$jspbMessageInstance = msg;
|
2207
|
+
}
|
2208
|
+
return obj;
|
2209
|
+
};
|
2210
|
+
}
|
2211
|
+
|
2212
|
+
|
2213
|
+
/**
|
2214
|
+
* Deserializes binary data (in protobuf wire format).
|
2215
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
2216
|
+
* @return {!proto.promocode.CodeItemsResponse}
|
2217
|
+
*/
|
2218
|
+
proto.promocode.CodeItemsResponse.deserializeBinary = function(bytes) {
|
2219
|
+
var reader = new jspb.BinaryReader(bytes);
|
2220
|
+
var msg = new proto.promocode.CodeItemsResponse;
|
2221
|
+
return proto.promocode.CodeItemsResponse.deserializeBinaryFromReader(msg, reader);
|
2222
|
+
};
|
2223
|
+
|
2224
|
+
|
2225
|
+
/**
|
2226
|
+
* Deserializes binary data (in protobuf wire format) from the
|
2227
|
+
* given reader into the given message object.
|
2228
|
+
* @param {!proto.promocode.CodeItemsResponse} msg The message object to deserialize into.
|
2229
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
2230
|
+
* @return {!proto.promocode.CodeItemsResponse}
|
2231
|
+
*/
|
2232
|
+
proto.promocode.CodeItemsResponse.deserializeBinaryFromReader = function(msg, reader) {
|
2233
|
+
while (reader.nextField()) {
|
2234
|
+
if (reader.isEndGroup()) {
|
2235
|
+
break;
|
2236
|
+
}
|
2237
|
+
var field = reader.getFieldNumber();
|
2238
|
+
switch (field) {
|
2239
|
+
case 1:
|
2240
|
+
var value = new proto.promocode.CodeItem;
|
2241
|
+
reader.readMessage(value,proto.promocode.CodeItem.deserializeBinaryFromReader);
|
2242
|
+
msg.addItems(value);
|
2243
|
+
break;
|
2244
|
+
case 2:
|
2245
|
+
var value = /** @type {number} */ (reader.readInt32());
|
2246
|
+
msg.setTotalPages(value);
|
2247
|
+
break;
|
2248
|
+
case 3:
|
2249
|
+
var value = /** @type {number} */ (reader.readInt32());
|
2250
|
+
msg.setTotalItems(value);
|
2251
|
+
break;
|
2252
|
+
default:
|
2253
|
+
reader.skipField();
|
2254
|
+
break;
|
2255
|
+
}
|
2256
|
+
}
|
2257
|
+
return msg;
|
2258
|
+
};
|
2259
|
+
|
2260
|
+
|
2261
|
+
/**
|
2262
|
+
* Serializes the message to binary data (in protobuf wire format).
|
2263
|
+
* @return {!Uint8Array}
|
2264
|
+
*/
|
2265
|
+
proto.promocode.CodeItemsResponse.prototype.serializeBinary = function() {
|
2266
|
+
var writer = new jspb.BinaryWriter();
|
2267
|
+
proto.promocode.CodeItemsResponse.serializeBinaryToWriter(this, writer);
|
2268
|
+
return writer.getResultBuffer();
|
2269
|
+
};
|
2270
|
+
|
2271
|
+
|
2272
|
+
/**
|
2273
|
+
* Serializes the given message to binary data (in protobuf wire
|
2274
|
+
* format), writing to the given BinaryWriter.
|
2275
|
+
* @param {!proto.promocode.CodeItemsResponse} message
|
2276
|
+
* @param {!jspb.BinaryWriter} writer
|
2277
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
2278
|
+
*/
|
2279
|
+
proto.promocode.CodeItemsResponse.serializeBinaryToWriter = function(message, writer) {
|
2280
|
+
var f = undefined;
|
2281
|
+
f = message.getItemsList();
|
2282
|
+
if (f.length > 0) {
|
2283
|
+
writer.writeRepeatedMessage(
|
2284
|
+
1,
|
2285
|
+
f,
|
2286
|
+
proto.promocode.CodeItem.serializeBinaryToWriter
|
2287
|
+
);
|
2288
|
+
}
|
2289
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 2));
|
2290
|
+
if (f != null) {
|
2291
|
+
writer.writeInt32(
|
2292
|
+
2,
|
2293
|
+
f
|
2294
|
+
);
|
2295
|
+
}
|
2296
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 3));
|
2297
|
+
if (f != null) {
|
2298
|
+
writer.writeInt32(
|
2299
|
+
3,
|
2300
|
+
f
|
2301
|
+
);
|
2302
|
+
}
|
2303
|
+
};
|
2304
|
+
|
2305
|
+
|
2306
|
+
/**
|
2307
|
+
* repeated CodeItem items = 1;
|
2308
|
+
* @return {!Array<!proto.promocode.CodeItem>}
|
2309
|
+
*/
|
2310
|
+
proto.promocode.CodeItemsResponse.prototype.getItemsList = function() {
|
2311
|
+
return /** @type{!Array<!proto.promocode.CodeItem>} */ (
|
2312
|
+
jspb.Message.getRepeatedWrapperField(this, proto.promocode.CodeItem, 1));
|
2313
|
+
};
|
2314
|
+
|
2315
|
+
|
2316
|
+
/**
|
2317
|
+
* @param {!Array<!proto.promocode.CodeItem>} value
|
2318
|
+
* @return {!proto.promocode.CodeItemsResponse} returns this
|
2319
|
+
*/
|
2320
|
+
proto.promocode.CodeItemsResponse.prototype.setItemsList = function(value) {
|
2321
|
+
return jspb.Message.setRepeatedWrapperField(this, 1, value);
|
2322
|
+
};
|
2323
|
+
|
2324
|
+
|
2325
|
+
/**
|
2326
|
+
* @param {!proto.promocode.CodeItem=} opt_value
|
2327
|
+
* @param {number=} opt_index
|
2328
|
+
* @return {!proto.promocode.CodeItem}
|
2329
|
+
*/
|
2330
|
+
proto.promocode.CodeItemsResponse.prototype.addItems = function(opt_value, opt_index) {
|
2331
|
+
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.promocode.CodeItem, opt_index);
|
2332
|
+
};
|
2333
|
+
|
2334
|
+
|
2335
|
+
/**
|
2336
|
+
* Clears the list making it empty but non-null.
|
2337
|
+
* @return {!proto.promocode.CodeItemsResponse} returns this
|
2338
|
+
*/
|
2339
|
+
proto.promocode.CodeItemsResponse.prototype.clearItemsList = function() {
|
2340
|
+
return this.setItemsList([]);
|
2341
|
+
};
|
2342
|
+
|
2343
|
+
|
2344
|
+
/**
|
2345
|
+
* optional int32 total_pages = 2;
|
2346
|
+
* @return {number}
|
2347
|
+
*/
|
2348
|
+
proto.promocode.CodeItemsResponse.prototype.getTotalPages = function() {
|
2349
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
2350
|
+
};
|
2351
|
+
|
2352
|
+
|
2353
|
+
/**
|
2354
|
+
* @param {number} value
|
2355
|
+
* @return {!proto.promocode.CodeItemsResponse} returns this
|
2356
|
+
*/
|
2357
|
+
proto.promocode.CodeItemsResponse.prototype.setTotalPages = function(value) {
|
2358
|
+
return jspb.Message.setField(this, 2, value);
|
2359
|
+
};
|
2360
|
+
|
2361
|
+
|
2362
|
+
/**
|
2363
|
+
* Clears the field making it undefined.
|
2364
|
+
* @return {!proto.promocode.CodeItemsResponse} returns this
|
2365
|
+
*/
|
2366
|
+
proto.promocode.CodeItemsResponse.prototype.clearTotalPages = function() {
|
2367
|
+
return jspb.Message.setField(this, 2, undefined);
|
2368
|
+
};
|
2369
|
+
|
2370
|
+
|
2371
|
+
/**
|
2372
|
+
* Returns whether this field is set.
|
2373
|
+
* @return {boolean}
|
2374
|
+
*/
|
2375
|
+
proto.promocode.CodeItemsResponse.prototype.hasTotalPages = function() {
|
2376
|
+
return jspb.Message.getField(this, 2) != null;
|
2377
|
+
};
|
2378
|
+
|
2379
|
+
|
2380
|
+
/**
|
2381
|
+
* optional int32 total_items = 3;
|
2382
|
+
* @return {number}
|
2383
|
+
*/
|
2384
|
+
proto.promocode.CodeItemsResponse.prototype.getTotalItems = function() {
|
2385
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
2386
|
+
};
|
2387
|
+
|
2388
|
+
|
2389
|
+
/**
|
2390
|
+
* @param {number} value
|
2391
|
+
* @return {!proto.promocode.CodeItemsResponse} returns this
|
2392
|
+
*/
|
2393
|
+
proto.promocode.CodeItemsResponse.prototype.setTotalItems = function(value) {
|
2394
|
+
return jspb.Message.setField(this, 3, value);
|
2395
|
+
};
|
2396
|
+
|
2397
|
+
|
2398
|
+
/**
|
2399
|
+
* Clears the field making it undefined.
|
2400
|
+
* @return {!proto.promocode.CodeItemsResponse} returns this
|
2401
|
+
*/
|
2402
|
+
proto.promocode.CodeItemsResponse.prototype.clearTotalItems = function() {
|
2403
|
+
return jspb.Message.setField(this, 3, undefined);
|
2404
|
+
};
|
2405
|
+
|
2406
|
+
|
2407
|
+
/**
|
2408
|
+
* Returns whether this field is set.
|
2409
|
+
* @return {boolean}
|
2410
|
+
*/
|
2411
|
+
proto.promocode.CodeItemsResponse.prototype.hasTotalItems = function() {
|
2412
|
+
return jspb.Message.getField(this, 3) != null;
|
2413
|
+
};
|
2414
|
+
|
2415
|
+
|
2416
|
+
|
2417
|
+
|
2418
|
+
|
2419
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
2420
|
+
/**
|
2421
|
+
* Creates an object representation of this proto.
|
2422
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
2423
|
+
* Optional fields that are not set will be set to undefined.
|
2424
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
2425
|
+
* For the list of reserved names please see:
|
2426
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
2427
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
2428
|
+
* JSPB instance for transitional soy proto support:
|
2429
|
+
* http://goto/soy-param-migration
|
2430
|
+
* @return {!Object}
|
2431
|
+
*/
|
2432
|
+
proto.promocode.CodeStatusResponse.prototype.toObject = function(opt_includeInstance) {
|
2433
|
+
return proto.promocode.CodeStatusResponse.toObject(opt_includeInstance, this);
|
2434
|
+
};
|
2435
|
+
|
2436
|
+
|
2437
|
+
/**
|
2438
|
+
* Static version of the {@see toObject} method.
|
2439
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
2440
|
+
* the JSPB instance for transitional soy proto support:
|
2441
|
+
* http://goto/soy-param-migration
|
2442
|
+
* @param {!proto.promocode.CodeStatusResponse} msg The msg instance to transform.
|
2443
|
+
* @return {!Object}
|
2444
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
2445
|
+
*/
|
2446
|
+
proto.promocode.CodeStatusResponse.toObject = function(includeInstance, msg) {
|
2447
|
+
var f, obj = {
|
2448
|
+
status: jspb.Message.getFieldWithDefault(msg, 1, "")
|
2449
|
+
};
|
2450
|
+
|
2451
|
+
if (includeInstance) {
|
2452
|
+
obj.$jspbMessageInstance = msg;
|
2453
|
+
}
|
2454
|
+
return obj;
|
2455
|
+
};
|
2456
|
+
}
|
2457
|
+
|
2458
|
+
|
2459
|
+
/**
|
2460
|
+
* Deserializes binary data (in protobuf wire format).
|
2461
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
2462
|
+
* @return {!proto.promocode.CodeStatusResponse}
|
2463
|
+
*/
|
2464
|
+
proto.promocode.CodeStatusResponse.deserializeBinary = function(bytes) {
|
2465
|
+
var reader = new jspb.BinaryReader(bytes);
|
2466
|
+
var msg = new proto.promocode.CodeStatusResponse;
|
2467
|
+
return proto.promocode.CodeStatusResponse.deserializeBinaryFromReader(msg, reader);
|
2468
|
+
};
|
2469
|
+
|
2470
|
+
|
2471
|
+
/**
|
2472
|
+
* Deserializes binary data (in protobuf wire format) from the
|
2473
|
+
* given reader into the given message object.
|
2474
|
+
* @param {!proto.promocode.CodeStatusResponse} msg The message object to deserialize into.
|
2475
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
2476
|
+
* @return {!proto.promocode.CodeStatusResponse}
|
2477
|
+
*/
|
2478
|
+
proto.promocode.CodeStatusResponse.deserializeBinaryFromReader = function(msg, reader) {
|
2479
|
+
while (reader.nextField()) {
|
2480
|
+
if (reader.isEndGroup()) {
|
2481
|
+
break;
|
2482
|
+
}
|
2483
|
+
var field = reader.getFieldNumber();
|
2484
|
+
switch (field) {
|
2485
|
+
case 1:
|
2486
|
+
var value = /** @type {string} */ (reader.readString());
|
2487
|
+
msg.setStatus(value);
|
2488
|
+
break;
|
2489
|
+
default:
|
2490
|
+
reader.skipField();
|
2491
|
+
break;
|
2492
|
+
}
|
2493
|
+
}
|
2494
|
+
return msg;
|
2495
|
+
};
|
2496
|
+
|
2497
|
+
|
2498
|
+
/**
|
2499
|
+
* Serializes the message to binary data (in protobuf wire format).
|
2500
|
+
* @return {!Uint8Array}
|
2501
|
+
*/
|
2502
|
+
proto.promocode.CodeStatusResponse.prototype.serializeBinary = function() {
|
2503
|
+
var writer = new jspb.BinaryWriter();
|
2504
|
+
proto.promocode.CodeStatusResponse.serializeBinaryToWriter(this, writer);
|
2505
|
+
return writer.getResultBuffer();
|
2506
|
+
};
|
2507
|
+
|
2508
|
+
|
2509
|
+
/**
|
2510
|
+
* Serializes the given message to binary data (in protobuf wire
|
2511
|
+
* format), writing to the given BinaryWriter.
|
2512
|
+
* @param {!proto.promocode.CodeStatusResponse} message
|
2513
|
+
* @param {!jspb.BinaryWriter} writer
|
2514
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
2515
|
+
*/
|
2516
|
+
proto.promocode.CodeStatusResponse.serializeBinaryToWriter = function(message, writer) {
|
2517
|
+
var f = undefined;
|
2518
|
+
f = message.getStatus();
|
2519
|
+
if (f.length > 0) {
|
2520
|
+
writer.writeString(
|
2521
|
+
1,
|
2522
|
+
f
|
2523
|
+
);
|
2524
|
+
}
|
2525
|
+
};
|
2526
|
+
|
2527
|
+
|
2528
|
+
/**
|
2529
|
+
* optional string status = 1;
|
2530
|
+
* @return {string}
|
2531
|
+
*/
|
2532
|
+
proto.promocode.CodeStatusResponse.prototype.getStatus = function() {
|
2533
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
2534
|
+
};
|
2535
|
+
|
2536
|
+
|
2537
|
+
/**
|
2538
|
+
* @param {string} value
|
2539
|
+
* @return {!proto.promocode.CodeStatusResponse} returns this
|
2540
|
+
*/
|
2541
|
+
proto.promocode.CodeStatusResponse.prototype.setStatus = function(value) {
|
2542
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
2543
|
+
};
|
2544
|
+
|
2545
|
+
|
827
2546
|
goog.object.extend(exports, proto.promocode);
|