@juzi/wechaty-grpc 1.0.102 → 1.0.104
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/dist/cjs/out/wechaty/puppet/channel_pb.d.ts +70 -0
- package/dist/cjs/out/wechaty/puppet/channel_pb.js +544 -2
- package/dist/cjs/out/wechaty/puppet/message_pb.d.ts +84 -0
- package/dist/cjs/out/wechaty/puppet/message_pb.js +638 -0
- package/dist/cjs/out/wechaty/puppet.openapi.yaml +115 -1
- package/dist/cjs/out/wechaty/puppet.swagger.json +168 -1
- package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +34 -0
- package/dist/cjs/out/wechaty/puppet_grpc_pb.js +66 -0
- package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +38 -0
- package/dist/cjs/out/wechaty/puppet_pb_service.js +80 -0
- package/dist/cjs/proto/wechaty/puppet/channel.proto +19 -0
- package/dist/cjs/proto/wechaty/puppet/message.proto +15 -0
- package/dist/cjs/proto/wechaty/puppet.proto +6 -0
- package/dist/cjs/src/package-json.js +1 -1
- package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
- package/dist/cjs/tests/puppet-server-impl.js +10 -0
- package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
- package/dist/esm/out/wechaty/puppet/channel_pb.d.ts +70 -0
- package/dist/esm/out/wechaty/puppet/channel_pb.js +544 -2
- package/dist/esm/out/wechaty/puppet/message_pb.d.ts +84 -0
- package/dist/esm/out/wechaty/puppet/message_pb.js +638 -0
- package/dist/esm/out/wechaty/puppet.openapi.yaml +115 -1
- package/dist/esm/out/wechaty/puppet.swagger.json +168 -1
- package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +34 -0
- package/dist/esm/out/wechaty/puppet_grpc_pb.js +66 -0
- package/dist/esm/out/wechaty/puppet_pb_service.d.ts +38 -0
- package/dist/esm/out/wechaty/puppet_pb_service.js +80 -0
- package/dist/esm/proto/wechaty/puppet/channel.proto +19 -0
- package/dist/esm/proto/wechaty/puppet/message.proto +15 -0
- package/dist/esm/proto/wechaty/puppet.proto +6 -0
- package/dist/esm/src/package-json.js +1 -1
- package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
- package/dist/esm/tests/puppet-server-impl.js +10 -0
- package/dist/esm/tests/puppet-server-impl.js.map +1 -1
- package/out/wechaty/puppet/channel_pb.d.ts +70 -0
- package/out/wechaty/puppet/channel_pb.js +544 -2
- package/out/wechaty/puppet/message_pb.d.ts +84 -0
- package/out/wechaty/puppet/message_pb.js +638 -0
- package/out/wechaty/puppet.openapi.yaml +115 -1
- package/out/wechaty/puppet.swagger.json +168 -1
- package/out/wechaty/puppet_grpc_pb.d.ts +34 -0
- package/out/wechaty/puppet_grpc_pb.js +66 -0
- package/out/wechaty/puppet_pb_service.d.ts +38 -0
- package/out/wechaty/puppet_pb_service.js +80 -0
- package/package.json +1 -1
- package/src/package-json.ts +1 -1
|
@@ -34,6 +34,23 @@ export class ChannelPayload extends jspb.Message {
|
|
|
34
34
|
getObjectNonceId(): string;
|
|
35
35
|
setObjectNonceId(value: string): void;
|
|
36
36
|
|
|
37
|
+
getUsername(): string;
|
|
38
|
+
setUsername(value: string): void;
|
|
39
|
+
|
|
40
|
+
getAuthIconType(): number;
|
|
41
|
+
setAuthIconType(value: number): void;
|
|
42
|
+
|
|
43
|
+
getAuthIconUrl(): string;
|
|
44
|
+
setAuthIconUrl(value: string): void;
|
|
45
|
+
|
|
46
|
+
getFromUserName(): string;
|
|
47
|
+
setFromUserName(value: string): void;
|
|
48
|
+
|
|
49
|
+
clearMediaListList(): void;
|
|
50
|
+
getMediaListList(): Array<ChannelMedia>;
|
|
51
|
+
setMediaListList(value: Array<ChannelMedia>): void;
|
|
52
|
+
addMediaList(value?: ChannelMedia, index?: number): ChannelMedia;
|
|
53
|
+
|
|
37
54
|
serializeBinary(): Uint8Array;
|
|
38
55
|
toObject(includeInstance?: boolean): ChannelPayload.AsObject;
|
|
39
56
|
static toObject(includeInstance: boolean, msg: ChannelPayload): ChannelPayload.AsObject;
|
|
@@ -56,6 +73,59 @@ export namespace ChannelPayload {
|
|
|
56
73
|
url: string,
|
|
57
74
|
objectId: string,
|
|
58
75
|
objectNonceId: string,
|
|
76
|
+
username: string,
|
|
77
|
+
authIconType: number,
|
|
78
|
+
authIconUrl: string,
|
|
79
|
+
fromUserName: string,
|
|
80
|
+
mediaListList: Array<ChannelMedia.AsObject>,
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export class ChannelMedia extends jspb.Message {
|
|
85
|
+
getMediaType(): number;
|
|
86
|
+
setMediaType(value: number): void;
|
|
87
|
+
|
|
88
|
+
getUrl(): string;
|
|
89
|
+
setUrl(value: string): void;
|
|
90
|
+
|
|
91
|
+
getThumbUrl(): string;
|
|
92
|
+
setThumbUrl(value: string): void;
|
|
93
|
+
|
|
94
|
+
getFullCoverUrl(): string;
|
|
95
|
+
setFullCoverUrl(value: string): void;
|
|
96
|
+
|
|
97
|
+
getCoverUrl(): string;
|
|
98
|
+
setCoverUrl(value: string): void;
|
|
99
|
+
|
|
100
|
+
getWidth(): number;
|
|
101
|
+
setWidth(value: number): void;
|
|
102
|
+
|
|
103
|
+
getHeight(): number;
|
|
104
|
+
setHeight(value: number): void;
|
|
105
|
+
|
|
106
|
+
getVideoPlayDuration(): number;
|
|
107
|
+
setVideoPlayDuration(value: number): void;
|
|
108
|
+
|
|
109
|
+
serializeBinary(): Uint8Array;
|
|
110
|
+
toObject(includeInstance?: boolean): ChannelMedia.AsObject;
|
|
111
|
+
static toObject(includeInstance: boolean, msg: ChannelMedia): ChannelMedia.AsObject;
|
|
112
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
113
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
114
|
+
static serializeBinaryToWriter(message: ChannelMedia, writer: jspb.BinaryWriter): void;
|
|
115
|
+
static deserializeBinary(bytes: Uint8Array): ChannelMedia;
|
|
116
|
+
static deserializeBinaryFromReader(message: ChannelMedia, reader: jspb.BinaryReader): ChannelMedia;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export namespace ChannelMedia {
|
|
120
|
+
export type AsObject = {
|
|
121
|
+
mediaType: number,
|
|
122
|
+
url: string,
|
|
123
|
+
thumbUrl: string,
|
|
124
|
+
fullCoverUrl: string,
|
|
125
|
+
coverUrl: string,
|
|
126
|
+
width: number,
|
|
127
|
+
height: number,
|
|
128
|
+
videoPlayDuration: number,
|
|
59
129
|
}
|
|
60
130
|
}
|
|
61
131
|
|
|
@@ -16,6 +16,7 @@ var goog = jspb;
|
|
|
16
16
|
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
|
|
17
17
|
|
|
18
18
|
goog.exportSymbol('proto.wechaty.puppet.ChannelFeedType', null, global);
|
|
19
|
+
goog.exportSymbol('proto.wechaty.puppet.ChannelMedia', null, global);
|
|
19
20
|
goog.exportSymbol('proto.wechaty.puppet.ChannelPayload', null, global);
|
|
20
21
|
/**
|
|
21
22
|
* Generated by JsPbCodeGenerator.
|
|
@@ -28,7 +29,7 @@ goog.exportSymbol('proto.wechaty.puppet.ChannelPayload', null, global);
|
|
|
28
29
|
* @constructor
|
|
29
30
|
*/
|
|
30
31
|
proto.wechaty.puppet.ChannelPayload = function(opt_data) {
|
|
31
|
-
jspb.Message.initialize(this, opt_data, 0, -1,
|
|
32
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.ChannelPayload.repeatedFields_, null);
|
|
32
33
|
};
|
|
33
34
|
goog.inherits(proto.wechaty.puppet.ChannelPayload, jspb.Message);
|
|
34
35
|
if (goog.DEBUG && !COMPILED) {
|
|
@@ -38,6 +39,34 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
38
39
|
*/
|
|
39
40
|
proto.wechaty.puppet.ChannelPayload.displayName = 'proto.wechaty.puppet.ChannelPayload';
|
|
40
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Generated by JsPbCodeGenerator.
|
|
44
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
45
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
46
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
47
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
48
|
+
* valid.
|
|
49
|
+
* @extends {jspb.Message}
|
|
50
|
+
* @constructor
|
|
51
|
+
*/
|
|
52
|
+
proto.wechaty.puppet.ChannelMedia = function(opt_data) {
|
|
53
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
54
|
+
};
|
|
55
|
+
goog.inherits(proto.wechaty.puppet.ChannelMedia, jspb.Message);
|
|
56
|
+
if (goog.DEBUG && !COMPILED) {
|
|
57
|
+
/**
|
|
58
|
+
* @public
|
|
59
|
+
* @override
|
|
60
|
+
*/
|
|
61
|
+
proto.wechaty.puppet.ChannelMedia.displayName = 'proto.wechaty.puppet.ChannelMedia';
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* List of repeated fields within this message type.
|
|
66
|
+
* @private {!Array<number>}
|
|
67
|
+
* @const
|
|
68
|
+
*/
|
|
69
|
+
proto.wechaty.puppet.ChannelPayload.repeatedFields_ = [15];
|
|
41
70
|
|
|
42
71
|
|
|
43
72
|
|
|
@@ -79,7 +108,13 @@ proto.wechaty.puppet.ChannelPayload.toObject = function(includeInstance, msg) {
|
|
|
79
108
|
thumbUrl: jspb.Message.getFieldWithDefault(msg, 7, ""),
|
|
80
109
|
url: jspb.Message.getFieldWithDefault(msg, 8, ""),
|
|
81
110
|
objectId: jspb.Message.getFieldWithDefault(msg, 9, ""),
|
|
82
|
-
objectNonceId: jspb.Message.getFieldWithDefault(msg, 10, "")
|
|
111
|
+
objectNonceId: jspb.Message.getFieldWithDefault(msg, 10, ""),
|
|
112
|
+
username: jspb.Message.getFieldWithDefault(msg, 11, ""),
|
|
113
|
+
authIconType: jspb.Message.getFieldWithDefault(msg, 12, 0),
|
|
114
|
+
authIconUrl: jspb.Message.getFieldWithDefault(msg, 13, ""),
|
|
115
|
+
fromUserName: jspb.Message.getFieldWithDefault(msg, 14, ""),
|
|
116
|
+
mediaListList: jspb.Message.toObjectList(msg.getMediaListList(),
|
|
117
|
+
proto.wechaty.puppet.ChannelMedia.toObject, includeInstance)
|
|
83
118
|
};
|
|
84
119
|
|
|
85
120
|
if (includeInstance) {
|
|
@@ -156,6 +191,27 @@ proto.wechaty.puppet.ChannelPayload.deserializeBinaryFromReader = function(msg,
|
|
|
156
191
|
var value = /** @type {string} */ (reader.readString());
|
|
157
192
|
msg.setObjectNonceId(value);
|
|
158
193
|
break;
|
|
194
|
+
case 11:
|
|
195
|
+
var value = /** @type {string} */ (reader.readString());
|
|
196
|
+
msg.setUsername(value);
|
|
197
|
+
break;
|
|
198
|
+
case 12:
|
|
199
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
200
|
+
msg.setAuthIconType(value);
|
|
201
|
+
break;
|
|
202
|
+
case 13:
|
|
203
|
+
var value = /** @type {string} */ (reader.readString());
|
|
204
|
+
msg.setAuthIconUrl(value);
|
|
205
|
+
break;
|
|
206
|
+
case 14:
|
|
207
|
+
var value = /** @type {string} */ (reader.readString());
|
|
208
|
+
msg.setFromUserName(value);
|
|
209
|
+
break;
|
|
210
|
+
case 15:
|
|
211
|
+
var value = new proto.wechaty.puppet.ChannelMedia;
|
|
212
|
+
reader.readMessage(value,proto.wechaty.puppet.ChannelMedia.deserializeBinaryFromReader);
|
|
213
|
+
msg.addMediaList(value);
|
|
214
|
+
break;
|
|
159
215
|
default:
|
|
160
216
|
reader.skipField();
|
|
161
217
|
break;
|
|
@@ -255,6 +311,42 @@ proto.wechaty.puppet.ChannelPayload.serializeBinaryToWriter = function(message,
|
|
|
255
311
|
f
|
|
256
312
|
);
|
|
257
313
|
}
|
|
314
|
+
f = message.getUsername();
|
|
315
|
+
if (f.length > 0) {
|
|
316
|
+
writer.writeString(
|
|
317
|
+
11,
|
|
318
|
+
f
|
|
319
|
+
);
|
|
320
|
+
}
|
|
321
|
+
f = message.getAuthIconType();
|
|
322
|
+
if (f !== 0) {
|
|
323
|
+
writer.writeInt32(
|
|
324
|
+
12,
|
|
325
|
+
f
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
f = message.getAuthIconUrl();
|
|
329
|
+
if (f.length > 0) {
|
|
330
|
+
writer.writeString(
|
|
331
|
+
13,
|
|
332
|
+
f
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
f = message.getFromUserName();
|
|
336
|
+
if (f.length > 0) {
|
|
337
|
+
writer.writeString(
|
|
338
|
+
14,
|
|
339
|
+
f
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
f = message.getMediaListList();
|
|
343
|
+
if (f.length > 0) {
|
|
344
|
+
writer.writeRepeatedMessage(
|
|
345
|
+
15,
|
|
346
|
+
f,
|
|
347
|
+
proto.wechaty.puppet.ChannelMedia.serializeBinaryToWriter
|
|
348
|
+
);
|
|
349
|
+
}
|
|
258
350
|
};
|
|
259
351
|
|
|
260
352
|
|
|
@@ -438,6 +530,456 @@ proto.wechaty.puppet.ChannelPayload.prototype.setObjectNonceId = function(value)
|
|
|
438
530
|
};
|
|
439
531
|
|
|
440
532
|
|
|
533
|
+
/**
|
|
534
|
+
* optional string username = 11;
|
|
535
|
+
* @return {string}
|
|
536
|
+
*/
|
|
537
|
+
proto.wechaty.puppet.ChannelPayload.prototype.getUsername = function() {
|
|
538
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
|
|
539
|
+
};
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* @param {string} value
|
|
544
|
+
* @return {!proto.wechaty.puppet.ChannelPayload} returns this
|
|
545
|
+
*/
|
|
546
|
+
proto.wechaty.puppet.ChannelPayload.prototype.setUsername = function(value) {
|
|
547
|
+
return jspb.Message.setProto3StringField(this, 11, value);
|
|
548
|
+
};
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* optional int32 auth_icon_type = 12;
|
|
553
|
+
* @return {number}
|
|
554
|
+
*/
|
|
555
|
+
proto.wechaty.puppet.ChannelPayload.prototype.getAuthIconType = function() {
|
|
556
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0));
|
|
557
|
+
};
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* @param {number} value
|
|
562
|
+
* @return {!proto.wechaty.puppet.ChannelPayload} returns this
|
|
563
|
+
*/
|
|
564
|
+
proto.wechaty.puppet.ChannelPayload.prototype.setAuthIconType = function(value) {
|
|
565
|
+
return jspb.Message.setProto3IntField(this, 12, value);
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* optional string auth_icon_url = 13;
|
|
571
|
+
* @return {string}
|
|
572
|
+
*/
|
|
573
|
+
proto.wechaty.puppet.ChannelPayload.prototype.getAuthIconUrl = function() {
|
|
574
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, ""));
|
|
575
|
+
};
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* @param {string} value
|
|
580
|
+
* @return {!proto.wechaty.puppet.ChannelPayload} returns this
|
|
581
|
+
*/
|
|
582
|
+
proto.wechaty.puppet.ChannelPayload.prototype.setAuthIconUrl = function(value) {
|
|
583
|
+
return jspb.Message.setProto3StringField(this, 13, value);
|
|
584
|
+
};
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* optional string from_user_name = 14;
|
|
589
|
+
* @return {string}
|
|
590
|
+
*/
|
|
591
|
+
proto.wechaty.puppet.ChannelPayload.prototype.getFromUserName = function() {
|
|
592
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, ""));
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* @param {string} value
|
|
598
|
+
* @return {!proto.wechaty.puppet.ChannelPayload} returns this
|
|
599
|
+
*/
|
|
600
|
+
proto.wechaty.puppet.ChannelPayload.prototype.setFromUserName = function(value) {
|
|
601
|
+
return jspb.Message.setProto3StringField(this, 14, value);
|
|
602
|
+
};
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* repeated ChannelMedia media_list = 15;
|
|
607
|
+
* @return {!Array<!proto.wechaty.puppet.ChannelMedia>}
|
|
608
|
+
*/
|
|
609
|
+
proto.wechaty.puppet.ChannelPayload.prototype.getMediaListList = function() {
|
|
610
|
+
return /** @type{!Array<!proto.wechaty.puppet.ChannelMedia>} */ (
|
|
611
|
+
jspb.Message.getRepeatedWrapperField(this, proto.wechaty.puppet.ChannelMedia, 15));
|
|
612
|
+
};
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* @param {!Array<!proto.wechaty.puppet.ChannelMedia>} value
|
|
617
|
+
* @return {!proto.wechaty.puppet.ChannelPayload} returns this
|
|
618
|
+
*/
|
|
619
|
+
proto.wechaty.puppet.ChannelPayload.prototype.setMediaListList = function(value) {
|
|
620
|
+
return jspb.Message.setRepeatedWrapperField(this, 15, value);
|
|
621
|
+
};
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* @param {!proto.wechaty.puppet.ChannelMedia=} opt_value
|
|
626
|
+
* @param {number=} opt_index
|
|
627
|
+
* @return {!proto.wechaty.puppet.ChannelMedia}
|
|
628
|
+
*/
|
|
629
|
+
proto.wechaty.puppet.ChannelPayload.prototype.addMediaList = function(opt_value, opt_index) {
|
|
630
|
+
return jspb.Message.addToRepeatedWrapperField(this, 15, opt_value, proto.wechaty.puppet.ChannelMedia, opt_index);
|
|
631
|
+
};
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* Clears the list making it empty but non-null.
|
|
636
|
+
* @return {!proto.wechaty.puppet.ChannelPayload} returns this
|
|
637
|
+
*/
|
|
638
|
+
proto.wechaty.puppet.ChannelPayload.prototype.clearMediaListList = function() {
|
|
639
|
+
return this.setMediaListList([]);
|
|
640
|
+
};
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
647
|
+
/**
|
|
648
|
+
* Creates an object representation of this proto.
|
|
649
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
650
|
+
* Optional fields that are not set will be set to undefined.
|
|
651
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
652
|
+
* For the list of reserved names please see:
|
|
653
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
654
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
655
|
+
* JSPB instance for transitional soy proto support:
|
|
656
|
+
* http://goto/soy-param-migration
|
|
657
|
+
* @return {!Object}
|
|
658
|
+
*/
|
|
659
|
+
proto.wechaty.puppet.ChannelMedia.prototype.toObject = function(opt_includeInstance) {
|
|
660
|
+
return proto.wechaty.puppet.ChannelMedia.toObject(opt_includeInstance, this);
|
|
661
|
+
};
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* Static version of the {@see toObject} method.
|
|
666
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
667
|
+
* the JSPB instance for transitional soy proto support:
|
|
668
|
+
* http://goto/soy-param-migration
|
|
669
|
+
* @param {!proto.wechaty.puppet.ChannelMedia} msg The msg instance to transform.
|
|
670
|
+
* @return {!Object}
|
|
671
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
672
|
+
*/
|
|
673
|
+
proto.wechaty.puppet.ChannelMedia.toObject = function(includeInstance, msg) {
|
|
674
|
+
var f, obj = {
|
|
675
|
+
mediaType: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
676
|
+
url: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
677
|
+
thumbUrl: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
678
|
+
fullCoverUrl: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
|
679
|
+
coverUrl: jspb.Message.getFieldWithDefault(msg, 5, ""),
|
|
680
|
+
width: jspb.Message.getFieldWithDefault(msg, 6, 0),
|
|
681
|
+
height: jspb.Message.getFieldWithDefault(msg, 7, 0),
|
|
682
|
+
videoPlayDuration: jspb.Message.getFieldWithDefault(msg, 8, 0)
|
|
683
|
+
};
|
|
684
|
+
|
|
685
|
+
if (includeInstance) {
|
|
686
|
+
obj.$jspbMessageInstance = msg;
|
|
687
|
+
}
|
|
688
|
+
return obj;
|
|
689
|
+
};
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* Deserializes binary data (in protobuf wire format).
|
|
695
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
696
|
+
* @return {!proto.wechaty.puppet.ChannelMedia}
|
|
697
|
+
*/
|
|
698
|
+
proto.wechaty.puppet.ChannelMedia.deserializeBinary = function(bytes) {
|
|
699
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
700
|
+
var msg = new proto.wechaty.puppet.ChannelMedia;
|
|
701
|
+
return proto.wechaty.puppet.ChannelMedia.deserializeBinaryFromReader(msg, reader);
|
|
702
|
+
};
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
707
|
+
* given reader into the given message object.
|
|
708
|
+
* @param {!proto.wechaty.puppet.ChannelMedia} msg The message object to deserialize into.
|
|
709
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
710
|
+
* @return {!proto.wechaty.puppet.ChannelMedia}
|
|
711
|
+
*/
|
|
712
|
+
proto.wechaty.puppet.ChannelMedia.deserializeBinaryFromReader = function(msg, reader) {
|
|
713
|
+
while (reader.nextField()) {
|
|
714
|
+
if (reader.isEndGroup()) {
|
|
715
|
+
break;
|
|
716
|
+
}
|
|
717
|
+
var field = reader.getFieldNumber();
|
|
718
|
+
switch (field) {
|
|
719
|
+
case 1:
|
|
720
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
721
|
+
msg.setMediaType(value);
|
|
722
|
+
break;
|
|
723
|
+
case 2:
|
|
724
|
+
var value = /** @type {string} */ (reader.readString());
|
|
725
|
+
msg.setUrl(value);
|
|
726
|
+
break;
|
|
727
|
+
case 3:
|
|
728
|
+
var value = /** @type {string} */ (reader.readString());
|
|
729
|
+
msg.setThumbUrl(value);
|
|
730
|
+
break;
|
|
731
|
+
case 4:
|
|
732
|
+
var value = /** @type {string} */ (reader.readString());
|
|
733
|
+
msg.setFullCoverUrl(value);
|
|
734
|
+
break;
|
|
735
|
+
case 5:
|
|
736
|
+
var value = /** @type {string} */ (reader.readString());
|
|
737
|
+
msg.setCoverUrl(value);
|
|
738
|
+
break;
|
|
739
|
+
case 6:
|
|
740
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
741
|
+
msg.setWidth(value);
|
|
742
|
+
break;
|
|
743
|
+
case 7:
|
|
744
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
745
|
+
msg.setHeight(value);
|
|
746
|
+
break;
|
|
747
|
+
case 8:
|
|
748
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
749
|
+
msg.setVideoPlayDuration(value);
|
|
750
|
+
break;
|
|
751
|
+
default:
|
|
752
|
+
reader.skipField();
|
|
753
|
+
break;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
return msg;
|
|
757
|
+
};
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
762
|
+
* @return {!Uint8Array}
|
|
763
|
+
*/
|
|
764
|
+
proto.wechaty.puppet.ChannelMedia.prototype.serializeBinary = function() {
|
|
765
|
+
var writer = new jspb.BinaryWriter();
|
|
766
|
+
proto.wechaty.puppet.ChannelMedia.serializeBinaryToWriter(this, writer);
|
|
767
|
+
return writer.getResultBuffer();
|
|
768
|
+
};
|
|
769
|
+
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
773
|
+
* format), writing to the given BinaryWriter.
|
|
774
|
+
* @param {!proto.wechaty.puppet.ChannelMedia} message
|
|
775
|
+
* @param {!jspb.BinaryWriter} writer
|
|
776
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
777
|
+
*/
|
|
778
|
+
proto.wechaty.puppet.ChannelMedia.serializeBinaryToWriter = function(message, writer) {
|
|
779
|
+
var f = undefined;
|
|
780
|
+
f = message.getMediaType();
|
|
781
|
+
if (f !== 0) {
|
|
782
|
+
writer.writeInt32(
|
|
783
|
+
1,
|
|
784
|
+
f
|
|
785
|
+
);
|
|
786
|
+
}
|
|
787
|
+
f = message.getUrl();
|
|
788
|
+
if (f.length > 0) {
|
|
789
|
+
writer.writeString(
|
|
790
|
+
2,
|
|
791
|
+
f
|
|
792
|
+
);
|
|
793
|
+
}
|
|
794
|
+
f = message.getThumbUrl();
|
|
795
|
+
if (f.length > 0) {
|
|
796
|
+
writer.writeString(
|
|
797
|
+
3,
|
|
798
|
+
f
|
|
799
|
+
);
|
|
800
|
+
}
|
|
801
|
+
f = message.getFullCoverUrl();
|
|
802
|
+
if (f.length > 0) {
|
|
803
|
+
writer.writeString(
|
|
804
|
+
4,
|
|
805
|
+
f
|
|
806
|
+
);
|
|
807
|
+
}
|
|
808
|
+
f = message.getCoverUrl();
|
|
809
|
+
if (f.length > 0) {
|
|
810
|
+
writer.writeString(
|
|
811
|
+
5,
|
|
812
|
+
f
|
|
813
|
+
);
|
|
814
|
+
}
|
|
815
|
+
f = message.getWidth();
|
|
816
|
+
if (f !== 0) {
|
|
817
|
+
writer.writeInt32(
|
|
818
|
+
6,
|
|
819
|
+
f
|
|
820
|
+
);
|
|
821
|
+
}
|
|
822
|
+
f = message.getHeight();
|
|
823
|
+
if (f !== 0) {
|
|
824
|
+
writer.writeInt32(
|
|
825
|
+
7,
|
|
826
|
+
f
|
|
827
|
+
);
|
|
828
|
+
}
|
|
829
|
+
f = message.getVideoPlayDuration();
|
|
830
|
+
if (f !== 0) {
|
|
831
|
+
writer.writeInt32(
|
|
832
|
+
8,
|
|
833
|
+
f
|
|
834
|
+
);
|
|
835
|
+
}
|
|
836
|
+
};
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* optional int32 media_type = 1;
|
|
841
|
+
* @return {number}
|
|
842
|
+
*/
|
|
843
|
+
proto.wechaty.puppet.ChannelMedia.prototype.getMediaType = function() {
|
|
844
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
|
845
|
+
};
|
|
846
|
+
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* @param {number} value
|
|
850
|
+
* @return {!proto.wechaty.puppet.ChannelMedia} returns this
|
|
851
|
+
*/
|
|
852
|
+
proto.wechaty.puppet.ChannelMedia.prototype.setMediaType = function(value) {
|
|
853
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
|
854
|
+
};
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* optional string url = 2;
|
|
859
|
+
* @return {string}
|
|
860
|
+
*/
|
|
861
|
+
proto.wechaty.puppet.ChannelMedia.prototype.getUrl = function() {
|
|
862
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
863
|
+
};
|
|
864
|
+
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* @param {string} value
|
|
868
|
+
* @return {!proto.wechaty.puppet.ChannelMedia} returns this
|
|
869
|
+
*/
|
|
870
|
+
proto.wechaty.puppet.ChannelMedia.prototype.setUrl = function(value) {
|
|
871
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
872
|
+
};
|
|
873
|
+
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* optional string thumb_url = 3;
|
|
877
|
+
* @return {string}
|
|
878
|
+
*/
|
|
879
|
+
proto.wechaty.puppet.ChannelMedia.prototype.getThumbUrl = function() {
|
|
880
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
|
881
|
+
};
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* @param {string} value
|
|
886
|
+
* @return {!proto.wechaty.puppet.ChannelMedia} returns this
|
|
887
|
+
*/
|
|
888
|
+
proto.wechaty.puppet.ChannelMedia.prototype.setThumbUrl = function(value) {
|
|
889
|
+
return jspb.Message.setProto3StringField(this, 3, value);
|
|
890
|
+
};
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* optional string full_cover_url = 4;
|
|
895
|
+
* @return {string}
|
|
896
|
+
*/
|
|
897
|
+
proto.wechaty.puppet.ChannelMedia.prototype.getFullCoverUrl = function() {
|
|
898
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
|
899
|
+
};
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* @param {string} value
|
|
904
|
+
* @return {!proto.wechaty.puppet.ChannelMedia} returns this
|
|
905
|
+
*/
|
|
906
|
+
proto.wechaty.puppet.ChannelMedia.prototype.setFullCoverUrl = function(value) {
|
|
907
|
+
return jspb.Message.setProto3StringField(this, 4, value);
|
|
908
|
+
};
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
/**
|
|
912
|
+
* optional string cover_url = 5;
|
|
913
|
+
* @return {string}
|
|
914
|
+
*/
|
|
915
|
+
proto.wechaty.puppet.ChannelMedia.prototype.getCoverUrl = function() {
|
|
916
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
|
|
917
|
+
};
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* @param {string} value
|
|
922
|
+
* @return {!proto.wechaty.puppet.ChannelMedia} returns this
|
|
923
|
+
*/
|
|
924
|
+
proto.wechaty.puppet.ChannelMedia.prototype.setCoverUrl = function(value) {
|
|
925
|
+
return jspb.Message.setProto3StringField(this, 5, value);
|
|
926
|
+
};
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
/**
|
|
930
|
+
* optional int32 width = 6;
|
|
931
|
+
* @return {number}
|
|
932
|
+
*/
|
|
933
|
+
proto.wechaty.puppet.ChannelMedia.prototype.getWidth = function() {
|
|
934
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
|
|
935
|
+
};
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
/**
|
|
939
|
+
* @param {number} value
|
|
940
|
+
* @return {!proto.wechaty.puppet.ChannelMedia} returns this
|
|
941
|
+
*/
|
|
942
|
+
proto.wechaty.puppet.ChannelMedia.prototype.setWidth = function(value) {
|
|
943
|
+
return jspb.Message.setProto3IntField(this, 6, value);
|
|
944
|
+
};
|
|
945
|
+
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* optional int32 height = 7;
|
|
949
|
+
* @return {number}
|
|
950
|
+
*/
|
|
951
|
+
proto.wechaty.puppet.ChannelMedia.prototype.getHeight = function() {
|
|
952
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
|
|
953
|
+
};
|
|
954
|
+
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* @param {number} value
|
|
958
|
+
* @return {!proto.wechaty.puppet.ChannelMedia} returns this
|
|
959
|
+
*/
|
|
960
|
+
proto.wechaty.puppet.ChannelMedia.prototype.setHeight = function(value) {
|
|
961
|
+
return jspb.Message.setProto3IntField(this, 7, value);
|
|
962
|
+
};
|
|
963
|
+
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* optional int32 video_play_duration = 8;
|
|
967
|
+
* @return {number}
|
|
968
|
+
*/
|
|
969
|
+
proto.wechaty.puppet.ChannelMedia.prototype.getVideoPlayDuration = function() {
|
|
970
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
|
|
971
|
+
};
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* @param {number} value
|
|
976
|
+
* @return {!proto.wechaty.puppet.ChannelMedia} returns this
|
|
977
|
+
*/
|
|
978
|
+
proto.wechaty.puppet.ChannelMedia.prototype.setVideoPlayDuration = function(value) {
|
|
979
|
+
return jspb.Message.setProto3IntField(this, 8, value);
|
|
980
|
+
};
|
|
981
|
+
|
|
982
|
+
|
|
441
983
|
/**
|
|
442
984
|
* @enum {number}
|
|
443
985
|
*/
|