@wireapp/protocol-messaging 1.50.0 → 1.52.0

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/web/messages.js CHANGED
@@ -25,6 +25,7 @@ $root.GenericMessage = (function() {
25
25
  * @property {ClientAction|null} [clientAction] GenericMessage clientAction
26
26
  * @property {ICalling|null} [calling] GenericMessage calling
27
27
  * @property {IAsset|null} [asset] GenericMessage asset
28
+ * @property {IMultipart|null} [multipart] GenericMessage multipart
28
29
  * @property {IMessageHide|null} [hidden] GenericMessage hidden
29
30
  * @property {ILocation|null} [location] GenericMessage location
30
31
  * @property {IMessageDelete|null} [deleted] GenericMessage deleted
@@ -38,6 +39,7 @@ $root.GenericMessage = (function() {
38
39
  * @property {IButtonActionConfirmation|null} [buttonActionConfirmation] GenericMessage buttonActionConfirmation
39
40
  * @property {IDataTransfer|null} [dataTransfer] GenericMessage dataTransfer
40
41
  * @property {IInCallEmoji|null} [inCallEmoji] GenericMessage inCallEmoji
42
+ * @property {IInCallHandRaise|null} [inCallHandRaise] GenericMessage inCallHandRaise
41
43
  * @property {GenericMessage.UnknownStrategy|null} [unknownStrategy] GenericMessage unknownStrategy
42
44
  */
43
45
 
@@ -136,6 +138,14 @@ $root.GenericMessage = (function() {
136
138
  */
137
139
  GenericMessage.prototype.asset = null;
138
140
 
141
+ /**
142
+ * GenericMessage multipart.
143
+ * @member {IMultipart|null|undefined} multipart
144
+ * @memberof GenericMessage
145
+ * @instance
146
+ */
147
+ GenericMessage.prototype.multipart = null;
148
+
139
149
  /**
140
150
  * GenericMessage hidden.
141
151
  * @member {IMessageHide|null|undefined} hidden
@@ -240,6 +250,14 @@ $root.GenericMessage = (function() {
240
250
  */
241
251
  GenericMessage.prototype.inCallEmoji = null;
242
252
 
253
+ /**
254
+ * GenericMessage inCallHandRaise.
255
+ * @member {IInCallHandRaise|null|undefined} inCallHandRaise
256
+ * @memberof GenericMessage
257
+ * @instance
258
+ */
259
+ GenericMessage.prototype.inCallHandRaise = null;
260
+
243
261
  /**
244
262
  * GenericMessage unknownStrategy.
245
263
  * @member {GenericMessage.UnknownStrategy} unknownStrategy
@@ -253,12 +271,12 @@ $root.GenericMessage = (function() {
253
271
 
254
272
  /**
255
273
  * GenericMessage content.
256
- * @member {"text"|"image"|"knock"|"lastRead"|"cleared"|"external"|"clientAction"|"calling"|"asset"|"hidden"|"location"|"deleted"|"edited"|"confirmation"|"reaction"|"ephemeral"|"availability"|"composite"|"buttonAction"|"buttonActionConfirmation"|"dataTransfer"|"inCallEmoji"|undefined} content
274
+ * @member {"text"|"image"|"knock"|"lastRead"|"cleared"|"external"|"clientAction"|"calling"|"asset"|"multipart"|"hidden"|"location"|"deleted"|"edited"|"confirmation"|"reaction"|"ephemeral"|"availability"|"composite"|"buttonAction"|"buttonActionConfirmation"|"dataTransfer"|"inCallEmoji"|"inCallHandRaise"|undefined} content
257
275
  * @memberof GenericMessage
258
276
  * @instance
259
277
  */
260
278
  Object.defineProperty(GenericMessage.prototype, "content", {
261
- get: $util.oneOfGetter($oneOfFields = ["text", "image", "knock", "lastRead", "cleared", "external", "clientAction", "calling", "asset", "hidden", "location", "deleted", "edited", "confirmation", "reaction", "ephemeral", "availability", "composite", "buttonAction", "buttonActionConfirmation", "dataTransfer", "inCallEmoji"]),
279
+ get: $util.oneOfGetter($oneOfFields = ["text", "image", "knock", "lastRead", "cleared", "external", "clientAction", "calling", "asset", "multipart", "hidden", "location", "deleted", "edited", "confirmation", "reaction", "ephemeral", "availability", "composite", "buttonAction", "buttonActionConfirmation", "dataTransfer", "inCallEmoji", "inCallHandRaise"]),
262
280
  set: $util.oneOfSetter($oneOfFields)
263
281
  });
264
282
 
@@ -333,6 +351,10 @@ $root.GenericMessage = (function() {
333
351
  $root.InCallEmoji.encode(message.inCallEmoji, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim();
334
352
  if (message.unknownStrategy != null && Object.hasOwnProperty.call(message, "unknownStrategy"))
335
353
  writer.uint32(/* id 25, wireType 0 =*/200).int32(message.unknownStrategy);
354
+ if (message.inCallHandRaise != null && Object.hasOwnProperty.call(message, "inCallHandRaise"))
355
+ $root.InCallHandRaise.encode(message.inCallHandRaise, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim();
356
+ if (message.multipart != null && Object.hasOwnProperty.call(message, "multipart"))
357
+ $root.Multipart.encode(message.multipart, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim();
336
358
  return writer;
337
359
  };
338
360
 
@@ -407,6 +429,10 @@ $root.GenericMessage = (function() {
407
429
  message.asset = $root.Asset.decode(reader, reader.uint32());
408
430
  break;
409
431
  }
432
+ case 27: {
433
+ message.multipart = $root.Multipart.decode(reader, reader.uint32());
434
+ break;
435
+ }
410
436
  case 12: {
411
437
  message.hidden = $root.MessageHide.decode(reader, reader.uint32());
412
438
  break;
@@ -459,6 +485,10 @@ $root.GenericMessage = (function() {
459
485
  message.inCallEmoji = $root.InCallEmoji.decode(reader, reader.uint32());
460
486
  break;
461
487
  }
488
+ case 26: {
489
+ message.inCallHandRaise = $root.InCallHandRaise.decode(reader, reader.uint32());
490
+ break;
491
+ }
462
492
  case 25: {
463
493
  message.unknownStrategy = reader.int32();
464
494
  break;
@@ -592,6 +622,16 @@ $root.GenericMessage = (function() {
592
622
  return "asset." + error;
593
623
  }
594
624
  }
625
+ if (message.multipart != null && message.hasOwnProperty("multipart")) {
626
+ if (properties.content === 1)
627
+ return "content: multiple values";
628
+ properties.content = 1;
629
+ {
630
+ var error = $root.Multipart.verify(message.multipart);
631
+ if (error)
632
+ return "multipart." + error;
633
+ }
634
+ }
595
635
  if (message.hidden != null && message.hasOwnProperty("hidden")) {
596
636
  if (properties.content === 1)
597
637
  return "content: multiple values";
@@ -722,6 +762,16 @@ $root.GenericMessage = (function() {
722
762
  return "inCallEmoji." + error;
723
763
  }
724
764
  }
765
+ if (message.inCallHandRaise != null && message.hasOwnProperty("inCallHandRaise")) {
766
+ if (properties.content === 1)
767
+ return "content: multiple values";
768
+ properties.content = 1;
769
+ {
770
+ var error = $root.InCallHandRaise.verify(message.inCallHandRaise);
771
+ if (error)
772
+ return "inCallHandRaise." + error;
773
+ }
774
+ }
725
775
  if (message.unknownStrategy != null && message.hasOwnProperty("unknownStrategy"))
726
776
  switch (message.unknownStrategy) {
727
777
  default:
@@ -800,6 +850,11 @@ $root.GenericMessage = (function() {
800
850
  throw TypeError(".GenericMessage.asset: object expected");
801
851
  message.asset = $root.Asset.fromObject(object.asset);
802
852
  }
853
+ if (object.multipart != null) {
854
+ if (typeof object.multipart !== "object")
855
+ throw TypeError(".GenericMessage.multipart: object expected");
856
+ message.multipart = $root.Multipart.fromObject(object.multipart);
857
+ }
803
858
  if (object.hidden != null) {
804
859
  if (typeof object.hidden !== "object")
805
860
  throw TypeError(".GenericMessage.hidden: object expected");
@@ -865,6 +920,11 @@ $root.GenericMessage = (function() {
865
920
  throw TypeError(".GenericMessage.inCallEmoji: object expected");
866
921
  message.inCallEmoji = $root.InCallEmoji.fromObject(object.inCallEmoji);
867
922
  }
923
+ if (object.inCallHandRaise != null) {
924
+ if (typeof object.inCallHandRaise !== "object")
925
+ throw TypeError(".GenericMessage.inCallHandRaise: object expected");
926
+ message.inCallHandRaise = $root.InCallHandRaise.fromObject(object.inCallHandRaise);
927
+ }
868
928
  switch (object.unknownStrategy) {
869
929
  default:
870
930
  if (typeof object.unknownStrategy === "number") {
@@ -1019,6 +1079,16 @@ $root.GenericMessage = (function() {
1019
1079
  }
1020
1080
  if (message.unknownStrategy != null && message.hasOwnProperty("unknownStrategy"))
1021
1081
  object.unknownStrategy = options.enums === String ? $root.GenericMessage.UnknownStrategy[message.unknownStrategy] === undefined ? message.unknownStrategy : $root.GenericMessage.UnknownStrategy[message.unknownStrategy] : message.unknownStrategy;
1082
+ if (message.inCallHandRaise != null && message.hasOwnProperty("inCallHandRaise")) {
1083
+ object.inCallHandRaise = $root.InCallHandRaise.toObject(message.inCallHandRaise, options);
1084
+ if (options.oneofs)
1085
+ object.content = "inCallHandRaise";
1086
+ }
1087
+ if (message.multipart != null && message.hasOwnProperty("multipart")) {
1088
+ object.multipart = $root.Multipart.toObject(message.multipart, options);
1089
+ if (options.oneofs)
1090
+ object.content = "multipart";
1091
+ }
1022
1092
  return object;
1023
1093
  };
1024
1094
 
@@ -7930,29 +8000,25 @@ $root.ImageAsset = (function() {
7930
8000
  return ImageAsset;
7931
8001
  })();
7932
8002
 
7933
- $root.Asset = (function() {
8003
+ $root.Attachment = (function() {
7934
8004
 
7935
8005
  /**
7936
- * Properties of an Asset.
7937
- * @exports IAsset
7938
- * @interface IAsset
7939
- * @property {Asset.IOriginal|null} [original] Asset original
7940
- * @property {Asset.NotUploaded|null} [notUploaded] Asset notUploaded
7941
- * @property {Asset.IRemoteData|null} [uploaded] Asset uploaded
7942
- * @property {Asset.IPreview|null} [preview] Asset preview
7943
- * @property {boolean|null} [expectsReadConfirmation] Asset expectsReadConfirmation
7944
- * @property {LegalHoldStatus|null} [legalHoldStatus] Asset legalHoldStatus
8006
+ * Properties of an Attachment.
8007
+ * @exports IAttachment
8008
+ * @interface IAttachment
8009
+ * @property {IAsset|null} [asset] Attachment asset
8010
+ * @property {ICellAsset|null} [cellAsset] Attachment cellAsset
7945
8011
  */
7946
8012
 
7947
8013
  /**
7948
- * Constructs a new Asset.
7949
- * @exports Asset
7950
- * @classdesc Represents an Asset.
7951
- * @implements IAsset
8014
+ * Constructs a new Attachment.
8015
+ * @exports Attachment
8016
+ * @classdesc Represents an Attachment.
8017
+ * @implements IAttachment
7952
8018
  * @constructor
7953
- * @param {IAsset=} [properties] Properties to set
8019
+ * @param {IAttachment=} [properties] Properties to set
7954
8020
  */
7955
- function Asset(properties) {
8021
+ function Attachment(properties) {
7956
8022
  if (properties)
7957
8023
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
7958
8024
  if (properties[keys[i]] != null)
@@ -7960,159 +8026,103 @@ $root.Asset = (function() {
7960
8026
  }
7961
8027
 
7962
8028
  /**
7963
- * Asset original.
7964
- * @member {Asset.IOriginal|null|undefined} original
7965
- * @memberof Asset
7966
- * @instance
7967
- */
7968
- Asset.prototype.original = null;
7969
-
7970
- /**
7971
- * Asset notUploaded.
7972
- * @member {Asset.NotUploaded|null|undefined} notUploaded
7973
- * @memberof Asset
7974
- * @instance
7975
- */
7976
- Asset.prototype.notUploaded = null;
7977
-
7978
- /**
7979
- * Asset uploaded.
7980
- * @member {Asset.IRemoteData|null|undefined} uploaded
7981
- * @memberof Asset
7982
- * @instance
7983
- */
7984
- Asset.prototype.uploaded = null;
7985
-
7986
- /**
7987
- * Asset preview.
7988
- * @member {Asset.IPreview|null|undefined} preview
7989
- * @memberof Asset
7990
- * @instance
7991
- */
7992
- Asset.prototype.preview = null;
7993
-
7994
- /**
7995
- * Asset expectsReadConfirmation.
7996
- * @member {boolean} expectsReadConfirmation
7997
- * @memberof Asset
8029
+ * Attachment asset.
8030
+ * @member {IAsset|null|undefined} asset
8031
+ * @memberof Attachment
7998
8032
  * @instance
7999
8033
  */
8000
- Asset.prototype.expectsReadConfirmation = false;
8034
+ Attachment.prototype.asset = null;
8001
8035
 
8002
8036
  /**
8003
- * Asset legalHoldStatus.
8004
- * @member {LegalHoldStatus} legalHoldStatus
8005
- * @memberof Asset
8037
+ * Attachment cellAsset.
8038
+ * @member {ICellAsset|null|undefined} cellAsset
8039
+ * @memberof Attachment
8006
8040
  * @instance
8007
8041
  */
8008
- Asset.prototype.legalHoldStatus = 0;
8042
+ Attachment.prototype.cellAsset = null;
8009
8043
 
8010
8044
  // OneOf field names bound to virtual getters and setters
8011
8045
  var $oneOfFields;
8012
8046
 
8013
8047
  /**
8014
- * Asset status.
8015
- * @member {"notUploaded"|"uploaded"|undefined} status
8016
- * @memberof Asset
8048
+ * Attachment content.
8049
+ * @member {"asset"|"cellAsset"|undefined} content
8050
+ * @memberof Attachment
8017
8051
  * @instance
8018
8052
  */
8019
- Object.defineProperty(Asset.prototype, "status", {
8020
- get: $util.oneOfGetter($oneOfFields = ["notUploaded", "uploaded"]),
8053
+ Object.defineProperty(Attachment.prototype, "content", {
8054
+ get: $util.oneOfGetter($oneOfFields = ["asset", "cellAsset"]),
8021
8055
  set: $util.oneOfSetter($oneOfFields)
8022
8056
  });
8023
8057
 
8024
8058
  /**
8025
- * Creates a new Asset instance using the specified properties.
8059
+ * Creates a new Attachment instance using the specified properties.
8026
8060
  * @function create
8027
- * @memberof Asset
8061
+ * @memberof Attachment
8028
8062
  * @static
8029
- * @param {IAsset=} [properties] Properties to set
8030
- * @returns {Asset} Asset instance
8063
+ * @param {IAttachment=} [properties] Properties to set
8064
+ * @returns {Attachment} Attachment instance
8031
8065
  */
8032
- Asset.create = function create(properties) {
8033
- return new Asset(properties);
8066
+ Attachment.create = function create(properties) {
8067
+ return new Attachment(properties);
8034
8068
  };
8035
8069
 
8036
8070
  /**
8037
- * Encodes the specified Asset message. Does not implicitly {@link Asset.verify|verify} messages.
8071
+ * Encodes the specified Attachment message. Does not implicitly {@link Attachment.verify|verify} messages.
8038
8072
  * @function encode
8039
- * @memberof Asset
8073
+ * @memberof Attachment
8040
8074
  * @static
8041
- * @param {IAsset} message Asset message or plain object to encode
8075
+ * @param {IAttachment} message Attachment message or plain object to encode
8042
8076
  * @param {$protobuf.Writer} [writer] Writer to encode to
8043
8077
  * @returns {$protobuf.Writer} Writer
8044
8078
  */
8045
- Asset.encode = function encode(message, writer) {
8079
+ Attachment.encode = function encode(message, writer) {
8046
8080
  if (!writer)
8047
8081
  writer = $Writer.create();
8048
- if (message.original != null && Object.hasOwnProperty.call(message, "original"))
8049
- $root.Asset.Original.encode(message.original, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
8050
- if (message.notUploaded != null && Object.hasOwnProperty.call(message, "notUploaded"))
8051
- writer.uint32(/* id 3, wireType 0 =*/24).int32(message.notUploaded);
8052
- if (message.uploaded != null && Object.hasOwnProperty.call(message, "uploaded"))
8053
- $root.Asset.RemoteData.encode(message.uploaded, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
8054
- if (message.preview != null && Object.hasOwnProperty.call(message, "preview"))
8055
- $root.Asset.Preview.encode(message.preview, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
8056
- if (message.expectsReadConfirmation != null && Object.hasOwnProperty.call(message, "expectsReadConfirmation"))
8057
- writer.uint32(/* id 6, wireType 0 =*/48).bool(message.expectsReadConfirmation);
8058
- if (message.legalHoldStatus != null && Object.hasOwnProperty.call(message, "legalHoldStatus"))
8059
- writer.uint32(/* id 7, wireType 0 =*/56).int32(message.legalHoldStatus);
8082
+ if (message.asset != null && Object.hasOwnProperty.call(message, "asset"))
8083
+ $root.Asset.encode(message.asset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
8084
+ if (message.cellAsset != null && Object.hasOwnProperty.call(message, "cellAsset"))
8085
+ $root.CellAsset.encode(message.cellAsset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
8060
8086
  return writer;
8061
8087
  };
8062
8088
 
8063
8089
  /**
8064
- * Encodes the specified Asset message, length delimited. Does not implicitly {@link Asset.verify|verify} messages.
8090
+ * Encodes the specified Attachment message, length delimited. Does not implicitly {@link Attachment.verify|verify} messages.
8065
8091
  * @function encodeDelimited
8066
- * @memberof Asset
8092
+ * @memberof Attachment
8067
8093
  * @static
8068
- * @param {IAsset} message Asset message or plain object to encode
8094
+ * @param {IAttachment} message Attachment message or plain object to encode
8069
8095
  * @param {$protobuf.Writer} [writer] Writer to encode to
8070
8096
  * @returns {$protobuf.Writer} Writer
8071
8097
  */
8072
- Asset.encodeDelimited = function encodeDelimited(message, writer) {
8098
+ Attachment.encodeDelimited = function encodeDelimited(message, writer) {
8073
8099
  return this.encode(message, writer).ldelim();
8074
8100
  };
8075
8101
 
8076
8102
  /**
8077
- * Decodes an Asset message from the specified reader or buffer.
8103
+ * Decodes an Attachment message from the specified reader or buffer.
8078
8104
  * @function decode
8079
- * @memberof Asset
8105
+ * @memberof Attachment
8080
8106
  * @static
8081
8107
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8082
8108
  * @param {number} [length] Message length if known beforehand
8083
- * @returns {Asset} Asset
8109
+ * @returns {Attachment} Attachment
8084
8110
  * @throws {Error} If the payload is not a reader or valid buffer
8085
8111
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
8086
8112
  */
8087
- Asset.decode = function decode(reader, length) {
8113
+ Attachment.decode = function decode(reader, length) {
8088
8114
  if (!(reader instanceof $Reader))
8089
8115
  reader = $Reader.create(reader);
8090
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Asset();
8116
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Attachment();
8091
8117
  while (reader.pos < end) {
8092
8118
  var tag = reader.uint32();
8093
8119
  switch (tag >>> 3) {
8094
8120
  case 1: {
8095
- message.original = $root.Asset.Original.decode(reader, reader.uint32());
8096
- break;
8097
- }
8098
- case 3: {
8099
- message.notUploaded = reader.int32();
8100
- break;
8101
- }
8102
- case 4: {
8103
- message.uploaded = $root.Asset.RemoteData.decode(reader, reader.uint32());
8104
- break;
8105
- }
8106
- case 5: {
8107
- message.preview = $root.Asset.Preview.decode(reader, reader.uint32());
8108
- break;
8109
- }
8110
- case 6: {
8111
- message.expectsReadConfirmation = reader.bool();
8121
+ message.asset = $root.Asset.decode(reader, reader.uint32());
8112
8122
  break;
8113
8123
  }
8114
- case 7: {
8115
- message.legalHoldStatus = reader.int32();
8124
+ case 2: {
8125
+ message.cellAsset = $root.CellAsset.decode(reader, reader.uint32());
8116
8126
  break;
8117
8127
  }
8118
8128
  default:
@@ -8124,123 +8134,1915 @@ $root.Asset = (function() {
8124
8134
  };
8125
8135
 
8126
8136
  /**
8127
- * Decodes an Asset message from the specified reader or buffer, length delimited.
8137
+ * Decodes an Attachment message from the specified reader or buffer, length delimited.
8128
8138
  * @function decodeDelimited
8129
- * @memberof Asset
8139
+ * @memberof Attachment
8130
8140
  * @static
8131
8141
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8132
- * @returns {Asset} Asset
8142
+ * @returns {Attachment} Attachment
8133
8143
  * @throws {Error} If the payload is not a reader or valid buffer
8134
8144
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
8135
8145
  */
8136
- Asset.decodeDelimited = function decodeDelimited(reader) {
8146
+ Attachment.decodeDelimited = function decodeDelimited(reader) {
8137
8147
  if (!(reader instanceof $Reader))
8138
8148
  reader = new $Reader(reader);
8139
8149
  return this.decode(reader, reader.uint32());
8140
8150
  };
8141
8151
 
8142
8152
  /**
8143
- * Verifies an Asset message.
8153
+ * Verifies an Attachment message.
8144
8154
  * @function verify
8145
- * @memberof Asset
8155
+ * @memberof Attachment
8146
8156
  * @static
8147
8157
  * @param {Object.<string,*>} message Plain object to verify
8148
8158
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
8149
8159
  */
8150
- Asset.verify = function verify(message) {
8160
+ Attachment.verify = function verify(message) {
8151
8161
  if (typeof message !== "object" || message === null)
8152
8162
  return "object expected";
8153
8163
  var properties = {};
8154
- if (message.original != null && message.hasOwnProperty("original")) {
8155
- var error = $root.Asset.Original.verify(message.original);
8156
- if (error)
8157
- return "original." + error;
8158
- }
8159
- if (message.notUploaded != null && message.hasOwnProperty("notUploaded")) {
8160
- properties.status = 1;
8161
- switch (message.notUploaded) {
8162
- default:
8163
- return "notUploaded: enum value expected";
8164
- case 0:
8165
- case 1:
8166
- break;
8164
+ if (message.asset != null && message.hasOwnProperty("asset")) {
8165
+ properties.content = 1;
8166
+ {
8167
+ var error = $root.Asset.verify(message.asset);
8168
+ if (error)
8169
+ return "asset." + error;
8167
8170
  }
8168
8171
  }
8169
- if (message.uploaded != null && message.hasOwnProperty("uploaded")) {
8170
- if (properties.status === 1)
8171
- return "status: multiple values";
8172
- properties.status = 1;
8172
+ if (message.cellAsset != null && message.hasOwnProperty("cellAsset")) {
8173
+ if (properties.content === 1)
8174
+ return "content: multiple values";
8175
+ properties.content = 1;
8173
8176
  {
8174
- var error = $root.Asset.RemoteData.verify(message.uploaded);
8177
+ var error = $root.CellAsset.verify(message.cellAsset);
8175
8178
  if (error)
8176
- return "uploaded." + error;
8179
+ return "cellAsset." + error;
8177
8180
  }
8178
8181
  }
8179
- if (message.preview != null && message.hasOwnProperty("preview")) {
8180
- var error = $root.Asset.Preview.verify(message.preview);
8181
- if (error)
8182
- return "preview." + error;
8183
- }
8184
- if (message.expectsReadConfirmation != null && message.hasOwnProperty("expectsReadConfirmation"))
8185
- if (typeof message.expectsReadConfirmation !== "boolean")
8186
- return "expectsReadConfirmation: boolean expected";
8187
- if (message.legalHoldStatus != null && message.hasOwnProperty("legalHoldStatus"))
8188
- switch (message.legalHoldStatus) {
8189
- default:
8190
- return "legalHoldStatus: enum value expected";
8191
- case 0:
8192
- case 1:
8193
- case 2:
8194
- break;
8195
- }
8196
8182
  return null;
8197
8183
  };
8198
8184
 
8199
8185
  /**
8200
- * Creates an Asset message from a plain object. Also converts values to their respective internal types.
8186
+ * Creates an Attachment message from a plain object. Also converts values to their respective internal types.
8201
8187
  * @function fromObject
8202
- * @memberof Asset
8188
+ * @memberof Attachment
8203
8189
  * @static
8204
8190
  * @param {Object.<string,*>} object Plain object
8205
- * @returns {Asset} Asset
8191
+ * @returns {Attachment} Attachment
8206
8192
  */
8207
- Asset.fromObject = function fromObject(object) {
8208
- if (object instanceof $root.Asset)
8193
+ Attachment.fromObject = function fromObject(object) {
8194
+ if (object instanceof $root.Attachment)
8209
8195
  return object;
8210
- var message = new $root.Asset();
8211
- if (object.original != null) {
8212
- if (typeof object.original !== "object")
8213
- throw TypeError(".Asset.original: object expected");
8214
- message.original = $root.Asset.Original.fromObject(object.original);
8196
+ var message = new $root.Attachment();
8197
+ if (object.asset != null) {
8198
+ if (typeof object.asset !== "object")
8199
+ throw TypeError(".Attachment.asset: object expected");
8200
+ message.asset = $root.Asset.fromObject(object.asset);
8215
8201
  }
8216
- switch (object.notUploaded) {
8217
- default:
8218
- if (typeof object.notUploaded === "number") {
8219
- message.notUploaded = object.notUploaded;
8220
- break;
8221
- }
8222
- break;
8223
- case "CANCELLED":
8224
- case 0:
8225
- message.notUploaded = 0;
8226
- break;
8227
- case "FAILED":
8228
- case 1:
8229
- message.notUploaded = 1;
8230
- break;
8202
+ if (object.cellAsset != null) {
8203
+ if (typeof object.cellAsset !== "object")
8204
+ throw TypeError(".Attachment.cellAsset: object expected");
8205
+ message.cellAsset = $root.CellAsset.fromObject(object.cellAsset);
8231
8206
  }
8232
- if (object.uploaded != null) {
8233
- if (typeof object.uploaded !== "object")
8234
- throw TypeError(".Asset.uploaded: object expected");
8235
- message.uploaded = $root.Asset.RemoteData.fromObject(object.uploaded);
8207
+ return message;
8208
+ };
8209
+
8210
+ /**
8211
+ * Creates a plain object from an Attachment message. Also converts values to other types if specified.
8212
+ * @function toObject
8213
+ * @memberof Attachment
8214
+ * @static
8215
+ * @param {Attachment} message Attachment
8216
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
8217
+ * @returns {Object.<string,*>} Plain object
8218
+ */
8219
+ Attachment.toObject = function toObject(message, options) {
8220
+ if (!options)
8221
+ options = {};
8222
+ var object = {};
8223
+ if (message.asset != null && message.hasOwnProperty("asset")) {
8224
+ object.asset = $root.Asset.toObject(message.asset, options);
8225
+ if (options.oneofs)
8226
+ object.content = "asset";
8236
8227
  }
8237
- if (object.preview != null) {
8238
- if (typeof object.preview !== "object")
8239
- throw TypeError(".Asset.preview: object expected");
8240
- message.preview = $root.Asset.Preview.fromObject(object.preview);
8228
+ if (message.cellAsset != null && message.hasOwnProperty("cellAsset")) {
8229
+ object.cellAsset = $root.CellAsset.toObject(message.cellAsset, options);
8230
+ if (options.oneofs)
8231
+ object.content = "cellAsset";
8241
8232
  }
8242
- if (object.expectsReadConfirmation != null)
8243
- message.expectsReadConfirmation = Boolean(object.expectsReadConfirmation);
8233
+ return object;
8234
+ };
8235
+
8236
+ /**
8237
+ * Converts this Attachment to JSON.
8238
+ * @function toJSON
8239
+ * @memberof Attachment
8240
+ * @instance
8241
+ * @returns {Object.<string,*>} JSON object
8242
+ */
8243
+ Attachment.prototype.toJSON = function toJSON() {
8244
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
8245
+ };
8246
+
8247
+ /**
8248
+ * Gets the default type url for Attachment
8249
+ * @function getTypeUrl
8250
+ * @memberof Attachment
8251
+ * @static
8252
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
8253
+ * @returns {string} The default type url
8254
+ */
8255
+ Attachment.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
8256
+ if (typeUrlPrefix === undefined) {
8257
+ typeUrlPrefix = "type.googleapis.com";
8258
+ }
8259
+ return typeUrlPrefix + "/Attachment";
8260
+ };
8261
+
8262
+ return Attachment;
8263
+ })();
8264
+
8265
+ $root.Multipart = (function() {
8266
+
8267
+ /**
8268
+ * Properties of a Multipart.
8269
+ * @exports IMultipart
8270
+ * @interface IMultipart
8271
+ * @property {IText|null} [text] Multipart text
8272
+ * @property {Array.<IAttachment>|null} [attachments] Multipart attachments
8273
+ * @property {boolean|null} [expectsReadConfirmation] Multipart expectsReadConfirmation
8274
+ * @property {LegalHoldStatus|null} [legalHoldStatus] Multipart legalHoldStatus
8275
+ */
8276
+
8277
+ /**
8278
+ * Constructs a new Multipart.
8279
+ * @exports Multipart
8280
+ * @classdesc Represents a Multipart.
8281
+ * @implements IMultipart
8282
+ * @constructor
8283
+ * @param {IMultipart=} [properties] Properties to set
8284
+ */
8285
+ function Multipart(properties) {
8286
+ this.attachments = [];
8287
+ if (properties)
8288
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
8289
+ if (properties[keys[i]] != null)
8290
+ this[keys[i]] = properties[keys[i]];
8291
+ }
8292
+
8293
+ /**
8294
+ * Multipart text.
8295
+ * @member {IText|null|undefined} text
8296
+ * @memberof Multipart
8297
+ * @instance
8298
+ */
8299
+ Multipart.prototype.text = null;
8300
+
8301
+ /**
8302
+ * Multipart attachments.
8303
+ * @member {Array.<IAttachment>} attachments
8304
+ * @memberof Multipart
8305
+ * @instance
8306
+ */
8307
+ Multipart.prototype.attachments = $util.emptyArray;
8308
+
8309
+ /**
8310
+ * Multipart expectsReadConfirmation.
8311
+ * @member {boolean} expectsReadConfirmation
8312
+ * @memberof Multipart
8313
+ * @instance
8314
+ */
8315
+ Multipart.prototype.expectsReadConfirmation = false;
8316
+
8317
+ /**
8318
+ * Multipart legalHoldStatus.
8319
+ * @member {LegalHoldStatus} legalHoldStatus
8320
+ * @memberof Multipart
8321
+ * @instance
8322
+ */
8323
+ Multipart.prototype.legalHoldStatus = 0;
8324
+
8325
+ /**
8326
+ * Creates a new Multipart instance using the specified properties.
8327
+ * @function create
8328
+ * @memberof Multipart
8329
+ * @static
8330
+ * @param {IMultipart=} [properties] Properties to set
8331
+ * @returns {Multipart} Multipart instance
8332
+ */
8333
+ Multipart.create = function create(properties) {
8334
+ return new Multipart(properties);
8335
+ };
8336
+
8337
+ /**
8338
+ * Encodes the specified Multipart message. Does not implicitly {@link Multipart.verify|verify} messages.
8339
+ * @function encode
8340
+ * @memberof Multipart
8341
+ * @static
8342
+ * @param {IMultipart} message Multipart message or plain object to encode
8343
+ * @param {$protobuf.Writer} [writer] Writer to encode to
8344
+ * @returns {$protobuf.Writer} Writer
8345
+ */
8346
+ Multipart.encode = function encode(message, writer) {
8347
+ if (!writer)
8348
+ writer = $Writer.create();
8349
+ if (message.text != null && Object.hasOwnProperty.call(message, "text"))
8350
+ $root.Text.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
8351
+ if (message.attachments != null && message.attachments.length)
8352
+ for (var i = 0; i < message.attachments.length; ++i)
8353
+ $root.Attachment.encode(message.attachments[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
8354
+ if (message.expectsReadConfirmation != null && Object.hasOwnProperty.call(message, "expectsReadConfirmation"))
8355
+ writer.uint32(/* id 3, wireType 0 =*/24).bool(message.expectsReadConfirmation);
8356
+ if (message.legalHoldStatus != null && Object.hasOwnProperty.call(message, "legalHoldStatus"))
8357
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.legalHoldStatus);
8358
+ return writer;
8359
+ };
8360
+
8361
+ /**
8362
+ * Encodes the specified Multipart message, length delimited. Does not implicitly {@link Multipart.verify|verify} messages.
8363
+ * @function encodeDelimited
8364
+ * @memberof Multipart
8365
+ * @static
8366
+ * @param {IMultipart} message Multipart message or plain object to encode
8367
+ * @param {$protobuf.Writer} [writer] Writer to encode to
8368
+ * @returns {$protobuf.Writer} Writer
8369
+ */
8370
+ Multipart.encodeDelimited = function encodeDelimited(message, writer) {
8371
+ return this.encode(message, writer).ldelim();
8372
+ };
8373
+
8374
+ /**
8375
+ * Decodes a Multipart message from the specified reader or buffer.
8376
+ * @function decode
8377
+ * @memberof Multipart
8378
+ * @static
8379
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8380
+ * @param {number} [length] Message length if known beforehand
8381
+ * @returns {Multipart} Multipart
8382
+ * @throws {Error} If the payload is not a reader or valid buffer
8383
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
8384
+ */
8385
+ Multipart.decode = function decode(reader, length) {
8386
+ if (!(reader instanceof $Reader))
8387
+ reader = $Reader.create(reader);
8388
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Multipart();
8389
+ while (reader.pos < end) {
8390
+ var tag = reader.uint32();
8391
+ switch (tag >>> 3) {
8392
+ case 1: {
8393
+ message.text = $root.Text.decode(reader, reader.uint32());
8394
+ break;
8395
+ }
8396
+ case 2: {
8397
+ if (!(message.attachments && message.attachments.length))
8398
+ message.attachments = [];
8399
+ message.attachments.push($root.Attachment.decode(reader, reader.uint32()));
8400
+ break;
8401
+ }
8402
+ case 3: {
8403
+ message.expectsReadConfirmation = reader.bool();
8404
+ break;
8405
+ }
8406
+ case 4: {
8407
+ message.legalHoldStatus = reader.int32();
8408
+ break;
8409
+ }
8410
+ default:
8411
+ reader.skipType(tag & 7);
8412
+ break;
8413
+ }
8414
+ }
8415
+ return message;
8416
+ };
8417
+
8418
+ /**
8419
+ * Decodes a Multipart message from the specified reader or buffer, length delimited.
8420
+ * @function decodeDelimited
8421
+ * @memberof Multipart
8422
+ * @static
8423
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8424
+ * @returns {Multipart} Multipart
8425
+ * @throws {Error} If the payload is not a reader or valid buffer
8426
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
8427
+ */
8428
+ Multipart.decodeDelimited = function decodeDelimited(reader) {
8429
+ if (!(reader instanceof $Reader))
8430
+ reader = new $Reader(reader);
8431
+ return this.decode(reader, reader.uint32());
8432
+ };
8433
+
8434
+ /**
8435
+ * Verifies a Multipart message.
8436
+ * @function verify
8437
+ * @memberof Multipart
8438
+ * @static
8439
+ * @param {Object.<string,*>} message Plain object to verify
8440
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
8441
+ */
8442
+ Multipart.verify = function verify(message) {
8443
+ if (typeof message !== "object" || message === null)
8444
+ return "object expected";
8445
+ if (message.text != null && message.hasOwnProperty("text")) {
8446
+ var error = $root.Text.verify(message.text);
8447
+ if (error)
8448
+ return "text." + error;
8449
+ }
8450
+ if (message.attachments != null && message.hasOwnProperty("attachments")) {
8451
+ if (!Array.isArray(message.attachments))
8452
+ return "attachments: array expected";
8453
+ for (var i = 0; i < message.attachments.length; ++i) {
8454
+ var error = $root.Attachment.verify(message.attachments[i]);
8455
+ if (error)
8456
+ return "attachments." + error;
8457
+ }
8458
+ }
8459
+ if (message.expectsReadConfirmation != null && message.hasOwnProperty("expectsReadConfirmation"))
8460
+ if (typeof message.expectsReadConfirmation !== "boolean")
8461
+ return "expectsReadConfirmation: boolean expected";
8462
+ if (message.legalHoldStatus != null && message.hasOwnProperty("legalHoldStatus"))
8463
+ switch (message.legalHoldStatus) {
8464
+ default:
8465
+ return "legalHoldStatus: enum value expected";
8466
+ case 0:
8467
+ case 1:
8468
+ case 2:
8469
+ break;
8470
+ }
8471
+ return null;
8472
+ };
8473
+
8474
+ /**
8475
+ * Creates a Multipart message from a plain object. Also converts values to their respective internal types.
8476
+ * @function fromObject
8477
+ * @memberof Multipart
8478
+ * @static
8479
+ * @param {Object.<string,*>} object Plain object
8480
+ * @returns {Multipart} Multipart
8481
+ */
8482
+ Multipart.fromObject = function fromObject(object) {
8483
+ if (object instanceof $root.Multipart)
8484
+ return object;
8485
+ var message = new $root.Multipart();
8486
+ if (object.text != null) {
8487
+ if (typeof object.text !== "object")
8488
+ throw TypeError(".Multipart.text: object expected");
8489
+ message.text = $root.Text.fromObject(object.text);
8490
+ }
8491
+ if (object.attachments) {
8492
+ if (!Array.isArray(object.attachments))
8493
+ throw TypeError(".Multipart.attachments: array expected");
8494
+ message.attachments = [];
8495
+ for (var i = 0; i < object.attachments.length; ++i) {
8496
+ if (typeof object.attachments[i] !== "object")
8497
+ throw TypeError(".Multipart.attachments: object expected");
8498
+ message.attachments[i] = $root.Attachment.fromObject(object.attachments[i]);
8499
+ }
8500
+ }
8501
+ if (object.expectsReadConfirmation != null)
8502
+ message.expectsReadConfirmation = Boolean(object.expectsReadConfirmation);
8503
+ switch (object.legalHoldStatus) {
8504
+ default:
8505
+ if (typeof object.legalHoldStatus === "number") {
8506
+ message.legalHoldStatus = object.legalHoldStatus;
8507
+ break;
8508
+ }
8509
+ break;
8510
+ case "UNKNOWN":
8511
+ case 0:
8512
+ message.legalHoldStatus = 0;
8513
+ break;
8514
+ case "DISABLED":
8515
+ case 1:
8516
+ message.legalHoldStatus = 1;
8517
+ break;
8518
+ case "ENABLED":
8519
+ case 2:
8520
+ message.legalHoldStatus = 2;
8521
+ break;
8522
+ }
8523
+ return message;
8524
+ };
8525
+
8526
+ /**
8527
+ * Creates a plain object from a Multipart message. Also converts values to other types if specified.
8528
+ * @function toObject
8529
+ * @memberof Multipart
8530
+ * @static
8531
+ * @param {Multipart} message Multipart
8532
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
8533
+ * @returns {Object.<string,*>} Plain object
8534
+ */
8535
+ Multipart.toObject = function toObject(message, options) {
8536
+ if (!options)
8537
+ options = {};
8538
+ var object = {};
8539
+ if (options.arrays || options.defaults)
8540
+ object.attachments = [];
8541
+ if (options.defaults) {
8542
+ object.text = null;
8543
+ object.expectsReadConfirmation = false;
8544
+ object.legalHoldStatus = options.enums === String ? "UNKNOWN" : 0;
8545
+ }
8546
+ if (message.text != null && message.hasOwnProperty("text"))
8547
+ object.text = $root.Text.toObject(message.text, options);
8548
+ if (message.attachments && message.attachments.length) {
8549
+ object.attachments = [];
8550
+ for (var j = 0; j < message.attachments.length; ++j)
8551
+ object.attachments[j] = $root.Attachment.toObject(message.attachments[j], options);
8552
+ }
8553
+ if (message.expectsReadConfirmation != null && message.hasOwnProperty("expectsReadConfirmation"))
8554
+ object.expectsReadConfirmation = message.expectsReadConfirmation;
8555
+ if (message.legalHoldStatus != null && message.hasOwnProperty("legalHoldStatus"))
8556
+ object.legalHoldStatus = options.enums === String ? $root.LegalHoldStatus[message.legalHoldStatus] === undefined ? message.legalHoldStatus : $root.LegalHoldStatus[message.legalHoldStatus] : message.legalHoldStatus;
8557
+ return object;
8558
+ };
8559
+
8560
+ /**
8561
+ * Converts this Multipart to JSON.
8562
+ * @function toJSON
8563
+ * @memberof Multipart
8564
+ * @instance
8565
+ * @returns {Object.<string,*>} JSON object
8566
+ */
8567
+ Multipart.prototype.toJSON = function toJSON() {
8568
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
8569
+ };
8570
+
8571
+ /**
8572
+ * Gets the default type url for Multipart
8573
+ * @function getTypeUrl
8574
+ * @memberof Multipart
8575
+ * @static
8576
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
8577
+ * @returns {string} The default type url
8578
+ */
8579
+ Multipart.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
8580
+ if (typeUrlPrefix === undefined) {
8581
+ typeUrlPrefix = "type.googleapis.com";
8582
+ }
8583
+ return typeUrlPrefix + "/Multipart";
8584
+ };
8585
+
8586
+ return Multipart;
8587
+ })();
8588
+
8589
+ $root.CellAsset = (function() {
8590
+
8591
+ /**
8592
+ * Properties of a CellAsset.
8593
+ * @exports ICellAsset
8594
+ * @interface ICellAsset
8595
+ * @property {string} uuid CellAsset uuid
8596
+ * @property {string} contentType CellAsset contentType
8597
+ * @property {string|null} [initialName] CellAsset initialName
8598
+ * @property {number|Long|null} [initialSize] CellAsset initialSize
8599
+ * @property {CellAsset.IImageMetaData|null} [image] CellAsset image
8600
+ * @property {CellAsset.IVideoMetaData|null} [video] CellAsset video
8601
+ * @property {CellAsset.IAudioMetaData|null} [audio] CellAsset audio
8602
+ */
8603
+
8604
+ /**
8605
+ * Constructs a new CellAsset.
8606
+ * @exports CellAsset
8607
+ * @classdesc Represents a CellAsset.
8608
+ * @implements ICellAsset
8609
+ * @constructor
8610
+ * @param {ICellAsset=} [properties] Properties to set
8611
+ */
8612
+ function CellAsset(properties) {
8613
+ if (properties)
8614
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
8615
+ if (properties[keys[i]] != null)
8616
+ this[keys[i]] = properties[keys[i]];
8617
+ }
8618
+
8619
+ /**
8620
+ * CellAsset uuid.
8621
+ * @member {string} uuid
8622
+ * @memberof CellAsset
8623
+ * @instance
8624
+ */
8625
+ CellAsset.prototype.uuid = "";
8626
+
8627
+ /**
8628
+ * CellAsset contentType.
8629
+ * @member {string} contentType
8630
+ * @memberof CellAsset
8631
+ * @instance
8632
+ */
8633
+ CellAsset.prototype.contentType = "";
8634
+
8635
+ /**
8636
+ * CellAsset initialName.
8637
+ * @member {string} initialName
8638
+ * @memberof CellAsset
8639
+ * @instance
8640
+ */
8641
+ CellAsset.prototype.initialName = "";
8642
+
8643
+ /**
8644
+ * CellAsset initialSize.
8645
+ * @member {number|Long} initialSize
8646
+ * @memberof CellAsset
8647
+ * @instance
8648
+ */
8649
+ CellAsset.prototype.initialSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
8650
+
8651
+ /**
8652
+ * CellAsset image.
8653
+ * @member {CellAsset.IImageMetaData|null|undefined} image
8654
+ * @memberof CellAsset
8655
+ * @instance
8656
+ */
8657
+ CellAsset.prototype.image = null;
8658
+
8659
+ /**
8660
+ * CellAsset video.
8661
+ * @member {CellAsset.IVideoMetaData|null|undefined} video
8662
+ * @memberof CellAsset
8663
+ * @instance
8664
+ */
8665
+ CellAsset.prototype.video = null;
8666
+
8667
+ /**
8668
+ * CellAsset audio.
8669
+ * @member {CellAsset.IAudioMetaData|null|undefined} audio
8670
+ * @memberof CellAsset
8671
+ * @instance
8672
+ */
8673
+ CellAsset.prototype.audio = null;
8674
+
8675
+ // OneOf field names bound to virtual getters and setters
8676
+ var $oneOfFields;
8677
+
8678
+ /**
8679
+ * CellAsset initialMetaData.
8680
+ * @member {"image"|"video"|"audio"|undefined} initialMetaData
8681
+ * @memberof CellAsset
8682
+ * @instance
8683
+ */
8684
+ Object.defineProperty(CellAsset.prototype, "initialMetaData", {
8685
+ get: $util.oneOfGetter($oneOfFields = ["image", "video", "audio"]),
8686
+ set: $util.oneOfSetter($oneOfFields)
8687
+ });
8688
+
8689
+ /**
8690
+ * Creates a new CellAsset instance using the specified properties.
8691
+ * @function create
8692
+ * @memberof CellAsset
8693
+ * @static
8694
+ * @param {ICellAsset=} [properties] Properties to set
8695
+ * @returns {CellAsset} CellAsset instance
8696
+ */
8697
+ CellAsset.create = function create(properties) {
8698
+ return new CellAsset(properties);
8699
+ };
8700
+
8701
+ /**
8702
+ * Encodes the specified CellAsset message. Does not implicitly {@link CellAsset.verify|verify} messages.
8703
+ * @function encode
8704
+ * @memberof CellAsset
8705
+ * @static
8706
+ * @param {ICellAsset} message CellAsset message or plain object to encode
8707
+ * @param {$protobuf.Writer} [writer] Writer to encode to
8708
+ * @returns {$protobuf.Writer} Writer
8709
+ */
8710
+ CellAsset.encode = function encode(message, writer) {
8711
+ if (!writer)
8712
+ writer = $Writer.create();
8713
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.uuid);
8714
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.contentType);
8715
+ if (message.initialName != null && Object.hasOwnProperty.call(message, "initialName"))
8716
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.initialName);
8717
+ if (message.initialSize != null && Object.hasOwnProperty.call(message, "initialSize"))
8718
+ writer.uint32(/* id 4, wireType 0 =*/32).int64(message.initialSize);
8719
+ if (message.image != null && Object.hasOwnProperty.call(message, "image"))
8720
+ $root.CellAsset.ImageMetaData.encode(message.image, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
8721
+ if (message.video != null && Object.hasOwnProperty.call(message, "video"))
8722
+ $root.CellAsset.VideoMetaData.encode(message.video, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
8723
+ if (message.audio != null && Object.hasOwnProperty.call(message, "audio"))
8724
+ $root.CellAsset.AudioMetaData.encode(message.audio, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
8725
+ return writer;
8726
+ };
8727
+
8728
+ /**
8729
+ * Encodes the specified CellAsset message, length delimited. Does not implicitly {@link CellAsset.verify|verify} messages.
8730
+ * @function encodeDelimited
8731
+ * @memberof CellAsset
8732
+ * @static
8733
+ * @param {ICellAsset} message CellAsset message or plain object to encode
8734
+ * @param {$protobuf.Writer} [writer] Writer to encode to
8735
+ * @returns {$protobuf.Writer} Writer
8736
+ */
8737
+ CellAsset.encodeDelimited = function encodeDelimited(message, writer) {
8738
+ return this.encode(message, writer).ldelim();
8739
+ };
8740
+
8741
+ /**
8742
+ * Decodes a CellAsset message from the specified reader or buffer.
8743
+ * @function decode
8744
+ * @memberof CellAsset
8745
+ * @static
8746
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8747
+ * @param {number} [length] Message length if known beforehand
8748
+ * @returns {CellAsset} CellAsset
8749
+ * @throws {Error} If the payload is not a reader or valid buffer
8750
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
8751
+ */
8752
+ CellAsset.decode = function decode(reader, length) {
8753
+ if (!(reader instanceof $Reader))
8754
+ reader = $Reader.create(reader);
8755
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CellAsset();
8756
+ while (reader.pos < end) {
8757
+ var tag = reader.uint32();
8758
+ switch (tag >>> 3) {
8759
+ case 1: {
8760
+ message.uuid = reader.string();
8761
+ break;
8762
+ }
8763
+ case 2: {
8764
+ message.contentType = reader.string();
8765
+ break;
8766
+ }
8767
+ case 3: {
8768
+ message.initialName = reader.string();
8769
+ break;
8770
+ }
8771
+ case 4: {
8772
+ message.initialSize = reader.int64();
8773
+ break;
8774
+ }
8775
+ case 5: {
8776
+ message.image = $root.CellAsset.ImageMetaData.decode(reader, reader.uint32());
8777
+ break;
8778
+ }
8779
+ case 6: {
8780
+ message.video = $root.CellAsset.VideoMetaData.decode(reader, reader.uint32());
8781
+ break;
8782
+ }
8783
+ case 7: {
8784
+ message.audio = $root.CellAsset.AudioMetaData.decode(reader, reader.uint32());
8785
+ break;
8786
+ }
8787
+ default:
8788
+ reader.skipType(tag & 7);
8789
+ break;
8790
+ }
8791
+ }
8792
+ if (!message.hasOwnProperty("uuid"))
8793
+ throw $util.ProtocolError("missing required 'uuid'", { instance: message });
8794
+ if (!message.hasOwnProperty("contentType"))
8795
+ throw $util.ProtocolError("missing required 'contentType'", { instance: message });
8796
+ return message;
8797
+ };
8798
+
8799
+ /**
8800
+ * Decodes a CellAsset message from the specified reader or buffer, length delimited.
8801
+ * @function decodeDelimited
8802
+ * @memberof CellAsset
8803
+ * @static
8804
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8805
+ * @returns {CellAsset} CellAsset
8806
+ * @throws {Error} If the payload is not a reader or valid buffer
8807
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
8808
+ */
8809
+ CellAsset.decodeDelimited = function decodeDelimited(reader) {
8810
+ if (!(reader instanceof $Reader))
8811
+ reader = new $Reader(reader);
8812
+ return this.decode(reader, reader.uint32());
8813
+ };
8814
+
8815
+ /**
8816
+ * Verifies a CellAsset message.
8817
+ * @function verify
8818
+ * @memberof CellAsset
8819
+ * @static
8820
+ * @param {Object.<string,*>} message Plain object to verify
8821
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
8822
+ */
8823
+ CellAsset.verify = function verify(message) {
8824
+ if (typeof message !== "object" || message === null)
8825
+ return "object expected";
8826
+ var properties = {};
8827
+ if (!$util.isString(message.uuid))
8828
+ return "uuid: string expected";
8829
+ if (!$util.isString(message.contentType))
8830
+ return "contentType: string expected";
8831
+ if (message.initialName != null && message.hasOwnProperty("initialName"))
8832
+ if (!$util.isString(message.initialName))
8833
+ return "initialName: string expected";
8834
+ if (message.initialSize != null && message.hasOwnProperty("initialSize"))
8835
+ if (!$util.isInteger(message.initialSize) && !(message.initialSize && $util.isInteger(message.initialSize.low) && $util.isInteger(message.initialSize.high)))
8836
+ return "initialSize: integer|Long expected";
8837
+ if (message.image != null && message.hasOwnProperty("image")) {
8838
+ properties.initialMetaData = 1;
8839
+ {
8840
+ var error = $root.CellAsset.ImageMetaData.verify(message.image);
8841
+ if (error)
8842
+ return "image." + error;
8843
+ }
8844
+ }
8845
+ if (message.video != null && message.hasOwnProperty("video")) {
8846
+ if (properties.initialMetaData === 1)
8847
+ return "initialMetaData: multiple values";
8848
+ properties.initialMetaData = 1;
8849
+ {
8850
+ var error = $root.CellAsset.VideoMetaData.verify(message.video);
8851
+ if (error)
8852
+ return "video." + error;
8853
+ }
8854
+ }
8855
+ if (message.audio != null && message.hasOwnProperty("audio")) {
8856
+ if (properties.initialMetaData === 1)
8857
+ return "initialMetaData: multiple values";
8858
+ properties.initialMetaData = 1;
8859
+ {
8860
+ var error = $root.CellAsset.AudioMetaData.verify(message.audio);
8861
+ if (error)
8862
+ return "audio." + error;
8863
+ }
8864
+ }
8865
+ return null;
8866
+ };
8867
+
8868
+ /**
8869
+ * Creates a CellAsset message from a plain object. Also converts values to their respective internal types.
8870
+ * @function fromObject
8871
+ * @memberof CellAsset
8872
+ * @static
8873
+ * @param {Object.<string,*>} object Plain object
8874
+ * @returns {CellAsset} CellAsset
8875
+ */
8876
+ CellAsset.fromObject = function fromObject(object) {
8877
+ if (object instanceof $root.CellAsset)
8878
+ return object;
8879
+ var message = new $root.CellAsset();
8880
+ if (object.uuid != null)
8881
+ message.uuid = String(object.uuid);
8882
+ if (object.contentType != null)
8883
+ message.contentType = String(object.contentType);
8884
+ if (object.initialName != null)
8885
+ message.initialName = String(object.initialName);
8886
+ if (object.initialSize != null)
8887
+ if ($util.Long)
8888
+ (message.initialSize = $util.Long.fromValue(object.initialSize)).unsigned = false;
8889
+ else if (typeof object.initialSize === "string")
8890
+ message.initialSize = parseInt(object.initialSize, 10);
8891
+ else if (typeof object.initialSize === "number")
8892
+ message.initialSize = object.initialSize;
8893
+ else if (typeof object.initialSize === "object")
8894
+ message.initialSize = new $util.LongBits(object.initialSize.low >>> 0, object.initialSize.high >>> 0).toNumber();
8895
+ if (object.image != null) {
8896
+ if (typeof object.image !== "object")
8897
+ throw TypeError(".CellAsset.image: object expected");
8898
+ message.image = $root.CellAsset.ImageMetaData.fromObject(object.image);
8899
+ }
8900
+ if (object.video != null) {
8901
+ if (typeof object.video !== "object")
8902
+ throw TypeError(".CellAsset.video: object expected");
8903
+ message.video = $root.CellAsset.VideoMetaData.fromObject(object.video);
8904
+ }
8905
+ if (object.audio != null) {
8906
+ if (typeof object.audio !== "object")
8907
+ throw TypeError(".CellAsset.audio: object expected");
8908
+ message.audio = $root.CellAsset.AudioMetaData.fromObject(object.audio);
8909
+ }
8910
+ return message;
8911
+ };
8912
+
8913
+ /**
8914
+ * Creates a plain object from a CellAsset message. Also converts values to other types if specified.
8915
+ * @function toObject
8916
+ * @memberof CellAsset
8917
+ * @static
8918
+ * @param {CellAsset} message CellAsset
8919
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
8920
+ * @returns {Object.<string,*>} Plain object
8921
+ */
8922
+ CellAsset.toObject = function toObject(message, options) {
8923
+ if (!options)
8924
+ options = {};
8925
+ var object = {};
8926
+ if (options.defaults) {
8927
+ object.uuid = "";
8928
+ object.contentType = "";
8929
+ object.initialName = "";
8930
+ if ($util.Long) {
8931
+ var long = new $util.Long(0, 0, false);
8932
+ object.initialSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
8933
+ } else
8934
+ object.initialSize = options.longs === String ? "0" : 0;
8935
+ }
8936
+ if (message.uuid != null && message.hasOwnProperty("uuid"))
8937
+ object.uuid = message.uuid;
8938
+ if (message.contentType != null && message.hasOwnProperty("contentType"))
8939
+ object.contentType = message.contentType;
8940
+ if (message.initialName != null && message.hasOwnProperty("initialName"))
8941
+ object.initialName = message.initialName;
8942
+ if (message.initialSize != null && message.hasOwnProperty("initialSize"))
8943
+ if (typeof message.initialSize === "number")
8944
+ object.initialSize = options.longs === String ? String(message.initialSize) : message.initialSize;
8945
+ else
8946
+ object.initialSize = options.longs === String ? $util.Long.prototype.toString.call(message.initialSize) : options.longs === Number ? new $util.LongBits(message.initialSize.low >>> 0, message.initialSize.high >>> 0).toNumber() : message.initialSize;
8947
+ if (message.image != null && message.hasOwnProperty("image")) {
8948
+ object.image = $root.CellAsset.ImageMetaData.toObject(message.image, options);
8949
+ if (options.oneofs)
8950
+ object.initialMetaData = "image";
8951
+ }
8952
+ if (message.video != null && message.hasOwnProperty("video")) {
8953
+ object.video = $root.CellAsset.VideoMetaData.toObject(message.video, options);
8954
+ if (options.oneofs)
8955
+ object.initialMetaData = "video";
8956
+ }
8957
+ if (message.audio != null && message.hasOwnProperty("audio")) {
8958
+ object.audio = $root.CellAsset.AudioMetaData.toObject(message.audio, options);
8959
+ if (options.oneofs)
8960
+ object.initialMetaData = "audio";
8961
+ }
8962
+ return object;
8963
+ };
8964
+
8965
+ /**
8966
+ * Converts this CellAsset to JSON.
8967
+ * @function toJSON
8968
+ * @memberof CellAsset
8969
+ * @instance
8970
+ * @returns {Object.<string,*>} JSON object
8971
+ */
8972
+ CellAsset.prototype.toJSON = function toJSON() {
8973
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
8974
+ };
8975
+
8976
+ /**
8977
+ * Gets the default type url for CellAsset
8978
+ * @function getTypeUrl
8979
+ * @memberof CellAsset
8980
+ * @static
8981
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
8982
+ * @returns {string} The default type url
8983
+ */
8984
+ CellAsset.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
8985
+ if (typeUrlPrefix === undefined) {
8986
+ typeUrlPrefix = "type.googleapis.com";
8987
+ }
8988
+ return typeUrlPrefix + "/CellAsset";
8989
+ };
8990
+
8991
+ CellAsset.ImageMetaData = (function() {
8992
+
8993
+ /**
8994
+ * Properties of an ImageMetaData.
8995
+ * @memberof CellAsset
8996
+ * @interface IImageMetaData
8997
+ * @property {number} width ImageMetaData width
8998
+ * @property {number} height ImageMetaData height
8999
+ */
9000
+
9001
+ /**
9002
+ * Constructs a new ImageMetaData.
9003
+ * @memberof CellAsset
9004
+ * @classdesc Represents an ImageMetaData.
9005
+ * @implements IImageMetaData
9006
+ * @constructor
9007
+ * @param {CellAsset.IImageMetaData=} [properties] Properties to set
9008
+ */
9009
+ function ImageMetaData(properties) {
9010
+ if (properties)
9011
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
9012
+ if (properties[keys[i]] != null)
9013
+ this[keys[i]] = properties[keys[i]];
9014
+ }
9015
+
9016
+ /**
9017
+ * ImageMetaData width.
9018
+ * @member {number} width
9019
+ * @memberof CellAsset.ImageMetaData
9020
+ * @instance
9021
+ */
9022
+ ImageMetaData.prototype.width = 0;
9023
+
9024
+ /**
9025
+ * ImageMetaData height.
9026
+ * @member {number} height
9027
+ * @memberof CellAsset.ImageMetaData
9028
+ * @instance
9029
+ */
9030
+ ImageMetaData.prototype.height = 0;
9031
+
9032
+ /**
9033
+ * Creates a new ImageMetaData instance using the specified properties.
9034
+ * @function create
9035
+ * @memberof CellAsset.ImageMetaData
9036
+ * @static
9037
+ * @param {CellAsset.IImageMetaData=} [properties] Properties to set
9038
+ * @returns {CellAsset.ImageMetaData} ImageMetaData instance
9039
+ */
9040
+ ImageMetaData.create = function create(properties) {
9041
+ return new ImageMetaData(properties);
9042
+ };
9043
+
9044
+ /**
9045
+ * Encodes the specified ImageMetaData message. Does not implicitly {@link CellAsset.ImageMetaData.verify|verify} messages.
9046
+ * @function encode
9047
+ * @memberof CellAsset.ImageMetaData
9048
+ * @static
9049
+ * @param {CellAsset.IImageMetaData} message ImageMetaData message or plain object to encode
9050
+ * @param {$protobuf.Writer} [writer] Writer to encode to
9051
+ * @returns {$protobuf.Writer} Writer
9052
+ */
9053
+ ImageMetaData.encode = function encode(message, writer) {
9054
+ if (!writer)
9055
+ writer = $Writer.create();
9056
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.width);
9057
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.height);
9058
+ return writer;
9059
+ };
9060
+
9061
+ /**
9062
+ * Encodes the specified ImageMetaData message, length delimited. Does not implicitly {@link CellAsset.ImageMetaData.verify|verify} messages.
9063
+ * @function encodeDelimited
9064
+ * @memberof CellAsset.ImageMetaData
9065
+ * @static
9066
+ * @param {CellAsset.IImageMetaData} message ImageMetaData message or plain object to encode
9067
+ * @param {$protobuf.Writer} [writer] Writer to encode to
9068
+ * @returns {$protobuf.Writer} Writer
9069
+ */
9070
+ ImageMetaData.encodeDelimited = function encodeDelimited(message, writer) {
9071
+ return this.encode(message, writer).ldelim();
9072
+ };
9073
+
9074
+ /**
9075
+ * Decodes an ImageMetaData message from the specified reader or buffer.
9076
+ * @function decode
9077
+ * @memberof CellAsset.ImageMetaData
9078
+ * @static
9079
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
9080
+ * @param {number} [length] Message length if known beforehand
9081
+ * @returns {CellAsset.ImageMetaData} ImageMetaData
9082
+ * @throws {Error} If the payload is not a reader or valid buffer
9083
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
9084
+ */
9085
+ ImageMetaData.decode = function decode(reader, length) {
9086
+ if (!(reader instanceof $Reader))
9087
+ reader = $Reader.create(reader);
9088
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CellAsset.ImageMetaData();
9089
+ while (reader.pos < end) {
9090
+ var tag = reader.uint32();
9091
+ switch (tag >>> 3) {
9092
+ case 1: {
9093
+ message.width = reader.int32();
9094
+ break;
9095
+ }
9096
+ case 2: {
9097
+ message.height = reader.int32();
9098
+ break;
9099
+ }
9100
+ default:
9101
+ reader.skipType(tag & 7);
9102
+ break;
9103
+ }
9104
+ }
9105
+ if (!message.hasOwnProperty("width"))
9106
+ throw $util.ProtocolError("missing required 'width'", { instance: message });
9107
+ if (!message.hasOwnProperty("height"))
9108
+ throw $util.ProtocolError("missing required 'height'", { instance: message });
9109
+ return message;
9110
+ };
9111
+
9112
+ /**
9113
+ * Decodes an ImageMetaData message from the specified reader or buffer, length delimited.
9114
+ * @function decodeDelimited
9115
+ * @memberof CellAsset.ImageMetaData
9116
+ * @static
9117
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
9118
+ * @returns {CellAsset.ImageMetaData} ImageMetaData
9119
+ * @throws {Error} If the payload is not a reader or valid buffer
9120
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
9121
+ */
9122
+ ImageMetaData.decodeDelimited = function decodeDelimited(reader) {
9123
+ if (!(reader instanceof $Reader))
9124
+ reader = new $Reader(reader);
9125
+ return this.decode(reader, reader.uint32());
9126
+ };
9127
+
9128
+ /**
9129
+ * Verifies an ImageMetaData message.
9130
+ * @function verify
9131
+ * @memberof CellAsset.ImageMetaData
9132
+ * @static
9133
+ * @param {Object.<string,*>} message Plain object to verify
9134
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
9135
+ */
9136
+ ImageMetaData.verify = function verify(message) {
9137
+ if (typeof message !== "object" || message === null)
9138
+ return "object expected";
9139
+ if (!$util.isInteger(message.width))
9140
+ return "width: integer expected";
9141
+ if (!$util.isInteger(message.height))
9142
+ return "height: integer expected";
9143
+ return null;
9144
+ };
9145
+
9146
+ /**
9147
+ * Creates an ImageMetaData message from a plain object. Also converts values to their respective internal types.
9148
+ * @function fromObject
9149
+ * @memberof CellAsset.ImageMetaData
9150
+ * @static
9151
+ * @param {Object.<string,*>} object Plain object
9152
+ * @returns {CellAsset.ImageMetaData} ImageMetaData
9153
+ */
9154
+ ImageMetaData.fromObject = function fromObject(object) {
9155
+ if (object instanceof $root.CellAsset.ImageMetaData)
9156
+ return object;
9157
+ var message = new $root.CellAsset.ImageMetaData();
9158
+ if (object.width != null)
9159
+ message.width = object.width | 0;
9160
+ if (object.height != null)
9161
+ message.height = object.height | 0;
9162
+ return message;
9163
+ };
9164
+
9165
+ /**
9166
+ * Creates a plain object from an ImageMetaData message. Also converts values to other types if specified.
9167
+ * @function toObject
9168
+ * @memberof CellAsset.ImageMetaData
9169
+ * @static
9170
+ * @param {CellAsset.ImageMetaData} message ImageMetaData
9171
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
9172
+ * @returns {Object.<string,*>} Plain object
9173
+ */
9174
+ ImageMetaData.toObject = function toObject(message, options) {
9175
+ if (!options)
9176
+ options = {};
9177
+ var object = {};
9178
+ if (options.defaults) {
9179
+ object.width = 0;
9180
+ object.height = 0;
9181
+ }
9182
+ if (message.width != null && message.hasOwnProperty("width"))
9183
+ object.width = message.width;
9184
+ if (message.height != null && message.hasOwnProperty("height"))
9185
+ object.height = message.height;
9186
+ return object;
9187
+ };
9188
+
9189
+ /**
9190
+ * Converts this ImageMetaData to JSON.
9191
+ * @function toJSON
9192
+ * @memberof CellAsset.ImageMetaData
9193
+ * @instance
9194
+ * @returns {Object.<string,*>} JSON object
9195
+ */
9196
+ ImageMetaData.prototype.toJSON = function toJSON() {
9197
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
9198
+ };
9199
+
9200
+ /**
9201
+ * Gets the default type url for ImageMetaData
9202
+ * @function getTypeUrl
9203
+ * @memberof CellAsset.ImageMetaData
9204
+ * @static
9205
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
9206
+ * @returns {string} The default type url
9207
+ */
9208
+ ImageMetaData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
9209
+ if (typeUrlPrefix === undefined) {
9210
+ typeUrlPrefix = "type.googleapis.com";
9211
+ }
9212
+ return typeUrlPrefix + "/CellAsset.ImageMetaData";
9213
+ };
9214
+
9215
+ return ImageMetaData;
9216
+ })();
9217
+
9218
+ CellAsset.VideoMetaData = (function() {
9219
+
9220
+ /**
9221
+ * Properties of a VideoMetaData.
9222
+ * @memberof CellAsset
9223
+ * @interface IVideoMetaData
9224
+ * @property {number|null} [width] VideoMetaData width
9225
+ * @property {number|null} [height] VideoMetaData height
9226
+ * @property {number|Long|null} [durationInMillis] VideoMetaData durationInMillis
9227
+ */
9228
+
9229
+ /**
9230
+ * Constructs a new VideoMetaData.
9231
+ * @memberof CellAsset
9232
+ * @classdesc Represents a VideoMetaData.
9233
+ * @implements IVideoMetaData
9234
+ * @constructor
9235
+ * @param {CellAsset.IVideoMetaData=} [properties] Properties to set
9236
+ */
9237
+ function VideoMetaData(properties) {
9238
+ if (properties)
9239
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
9240
+ if (properties[keys[i]] != null)
9241
+ this[keys[i]] = properties[keys[i]];
9242
+ }
9243
+
9244
+ /**
9245
+ * VideoMetaData width.
9246
+ * @member {number} width
9247
+ * @memberof CellAsset.VideoMetaData
9248
+ * @instance
9249
+ */
9250
+ VideoMetaData.prototype.width = 0;
9251
+
9252
+ /**
9253
+ * VideoMetaData height.
9254
+ * @member {number} height
9255
+ * @memberof CellAsset.VideoMetaData
9256
+ * @instance
9257
+ */
9258
+ VideoMetaData.prototype.height = 0;
9259
+
9260
+ /**
9261
+ * VideoMetaData durationInMillis.
9262
+ * @member {number|Long} durationInMillis
9263
+ * @memberof CellAsset.VideoMetaData
9264
+ * @instance
9265
+ */
9266
+ VideoMetaData.prototype.durationInMillis = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
9267
+
9268
+ /**
9269
+ * Creates a new VideoMetaData instance using the specified properties.
9270
+ * @function create
9271
+ * @memberof CellAsset.VideoMetaData
9272
+ * @static
9273
+ * @param {CellAsset.IVideoMetaData=} [properties] Properties to set
9274
+ * @returns {CellAsset.VideoMetaData} VideoMetaData instance
9275
+ */
9276
+ VideoMetaData.create = function create(properties) {
9277
+ return new VideoMetaData(properties);
9278
+ };
9279
+
9280
+ /**
9281
+ * Encodes the specified VideoMetaData message. Does not implicitly {@link CellAsset.VideoMetaData.verify|verify} messages.
9282
+ * @function encode
9283
+ * @memberof CellAsset.VideoMetaData
9284
+ * @static
9285
+ * @param {CellAsset.IVideoMetaData} message VideoMetaData message or plain object to encode
9286
+ * @param {$protobuf.Writer} [writer] Writer to encode to
9287
+ * @returns {$protobuf.Writer} Writer
9288
+ */
9289
+ VideoMetaData.encode = function encode(message, writer) {
9290
+ if (!writer)
9291
+ writer = $Writer.create();
9292
+ if (message.width != null && Object.hasOwnProperty.call(message, "width"))
9293
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.width);
9294
+ if (message.height != null && Object.hasOwnProperty.call(message, "height"))
9295
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.height);
9296
+ if (message.durationInMillis != null && Object.hasOwnProperty.call(message, "durationInMillis"))
9297
+ writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.durationInMillis);
9298
+ return writer;
9299
+ };
9300
+
9301
+ /**
9302
+ * Encodes the specified VideoMetaData message, length delimited. Does not implicitly {@link CellAsset.VideoMetaData.verify|verify} messages.
9303
+ * @function encodeDelimited
9304
+ * @memberof CellAsset.VideoMetaData
9305
+ * @static
9306
+ * @param {CellAsset.IVideoMetaData} message VideoMetaData message or plain object to encode
9307
+ * @param {$protobuf.Writer} [writer] Writer to encode to
9308
+ * @returns {$protobuf.Writer} Writer
9309
+ */
9310
+ VideoMetaData.encodeDelimited = function encodeDelimited(message, writer) {
9311
+ return this.encode(message, writer).ldelim();
9312
+ };
9313
+
9314
+ /**
9315
+ * Decodes a VideoMetaData message from the specified reader or buffer.
9316
+ * @function decode
9317
+ * @memberof CellAsset.VideoMetaData
9318
+ * @static
9319
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
9320
+ * @param {number} [length] Message length if known beforehand
9321
+ * @returns {CellAsset.VideoMetaData} VideoMetaData
9322
+ * @throws {Error} If the payload is not a reader or valid buffer
9323
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
9324
+ */
9325
+ VideoMetaData.decode = function decode(reader, length) {
9326
+ if (!(reader instanceof $Reader))
9327
+ reader = $Reader.create(reader);
9328
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CellAsset.VideoMetaData();
9329
+ while (reader.pos < end) {
9330
+ var tag = reader.uint32();
9331
+ switch (tag >>> 3) {
9332
+ case 1: {
9333
+ message.width = reader.int32();
9334
+ break;
9335
+ }
9336
+ case 2: {
9337
+ message.height = reader.int32();
9338
+ break;
9339
+ }
9340
+ case 3: {
9341
+ message.durationInMillis = reader.uint64();
9342
+ break;
9343
+ }
9344
+ default:
9345
+ reader.skipType(tag & 7);
9346
+ break;
9347
+ }
9348
+ }
9349
+ return message;
9350
+ };
9351
+
9352
+ /**
9353
+ * Decodes a VideoMetaData message from the specified reader or buffer, length delimited.
9354
+ * @function decodeDelimited
9355
+ * @memberof CellAsset.VideoMetaData
9356
+ * @static
9357
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
9358
+ * @returns {CellAsset.VideoMetaData} VideoMetaData
9359
+ * @throws {Error} If the payload is not a reader or valid buffer
9360
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
9361
+ */
9362
+ VideoMetaData.decodeDelimited = function decodeDelimited(reader) {
9363
+ if (!(reader instanceof $Reader))
9364
+ reader = new $Reader(reader);
9365
+ return this.decode(reader, reader.uint32());
9366
+ };
9367
+
9368
+ /**
9369
+ * Verifies a VideoMetaData message.
9370
+ * @function verify
9371
+ * @memberof CellAsset.VideoMetaData
9372
+ * @static
9373
+ * @param {Object.<string,*>} message Plain object to verify
9374
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
9375
+ */
9376
+ VideoMetaData.verify = function verify(message) {
9377
+ if (typeof message !== "object" || message === null)
9378
+ return "object expected";
9379
+ if (message.width != null && message.hasOwnProperty("width"))
9380
+ if (!$util.isInteger(message.width))
9381
+ return "width: integer expected";
9382
+ if (message.height != null && message.hasOwnProperty("height"))
9383
+ if (!$util.isInteger(message.height))
9384
+ return "height: integer expected";
9385
+ if (message.durationInMillis != null && message.hasOwnProperty("durationInMillis"))
9386
+ if (!$util.isInteger(message.durationInMillis) && !(message.durationInMillis && $util.isInteger(message.durationInMillis.low) && $util.isInteger(message.durationInMillis.high)))
9387
+ return "durationInMillis: integer|Long expected";
9388
+ return null;
9389
+ };
9390
+
9391
+ /**
9392
+ * Creates a VideoMetaData message from a plain object. Also converts values to their respective internal types.
9393
+ * @function fromObject
9394
+ * @memberof CellAsset.VideoMetaData
9395
+ * @static
9396
+ * @param {Object.<string,*>} object Plain object
9397
+ * @returns {CellAsset.VideoMetaData} VideoMetaData
9398
+ */
9399
+ VideoMetaData.fromObject = function fromObject(object) {
9400
+ if (object instanceof $root.CellAsset.VideoMetaData)
9401
+ return object;
9402
+ var message = new $root.CellAsset.VideoMetaData();
9403
+ if (object.width != null)
9404
+ message.width = object.width | 0;
9405
+ if (object.height != null)
9406
+ message.height = object.height | 0;
9407
+ if (object.durationInMillis != null)
9408
+ if ($util.Long)
9409
+ (message.durationInMillis = $util.Long.fromValue(object.durationInMillis)).unsigned = true;
9410
+ else if (typeof object.durationInMillis === "string")
9411
+ message.durationInMillis = parseInt(object.durationInMillis, 10);
9412
+ else if (typeof object.durationInMillis === "number")
9413
+ message.durationInMillis = object.durationInMillis;
9414
+ else if (typeof object.durationInMillis === "object")
9415
+ message.durationInMillis = new $util.LongBits(object.durationInMillis.low >>> 0, object.durationInMillis.high >>> 0).toNumber(true);
9416
+ return message;
9417
+ };
9418
+
9419
+ /**
9420
+ * Creates a plain object from a VideoMetaData message. Also converts values to other types if specified.
9421
+ * @function toObject
9422
+ * @memberof CellAsset.VideoMetaData
9423
+ * @static
9424
+ * @param {CellAsset.VideoMetaData} message VideoMetaData
9425
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
9426
+ * @returns {Object.<string,*>} Plain object
9427
+ */
9428
+ VideoMetaData.toObject = function toObject(message, options) {
9429
+ if (!options)
9430
+ options = {};
9431
+ var object = {};
9432
+ if (options.defaults) {
9433
+ object.width = 0;
9434
+ object.height = 0;
9435
+ if ($util.Long) {
9436
+ var long = new $util.Long(0, 0, true);
9437
+ object.durationInMillis = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
9438
+ } else
9439
+ object.durationInMillis = options.longs === String ? "0" : 0;
9440
+ }
9441
+ if (message.width != null && message.hasOwnProperty("width"))
9442
+ object.width = message.width;
9443
+ if (message.height != null && message.hasOwnProperty("height"))
9444
+ object.height = message.height;
9445
+ if (message.durationInMillis != null && message.hasOwnProperty("durationInMillis"))
9446
+ if (typeof message.durationInMillis === "number")
9447
+ object.durationInMillis = options.longs === String ? String(message.durationInMillis) : message.durationInMillis;
9448
+ else
9449
+ object.durationInMillis = options.longs === String ? $util.Long.prototype.toString.call(message.durationInMillis) : options.longs === Number ? new $util.LongBits(message.durationInMillis.low >>> 0, message.durationInMillis.high >>> 0).toNumber(true) : message.durationInMillis;
9450
+ return object;
9451
+ };
9452
+
9453
+ /**
9454
+ * Converts this VideoMetaData to JSON.
9455
+ * @function toJSON
9456
+ * @memberof CellAsset.VideoMetaData
9457
+ * @instance
9458
+ * @returns {Object.<string,*>} JSON object
9459
+ */
9460
+ VideoMetaData.prototype.toJSON = function toJSON() {
9461
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
9462
+ };
9463
+
9464
+ /**
9465
+ * Gets the default type url for VideoMetaData
9466
+ * @function getTypeUrl
9467
+ * @memberof CellAsset.VideoMetaData
9468
+ * @static
9469
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
9470
+ * @returns {string} The default type url
9471
+ */
9472
+ VideoMetaData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
9473
+ if (typeUrlPrefix === undefined) {
9474
+ typeUrlPrefix = "type.googleapis.com";
9475
+ }
9476
+ return typeUrlPrefix + "/CellAsset.VideoMetaData";
9477
+ };
9478
+
9479
+ return VideoMetaData;
9480
+ })();
9481
+
9482
+ CellAsset.AudioMetaData = (function() {
9483
+
9484
+ /**
9485
+ * Properties of an AudioMetaData.
9486
+ * @memberof CellAsset
9487
+ * @interface IAudioMetaData
9488
+ * @property {number|Long|null} [durationInMillis] AudioMetaData durationInMillis
9489
+ * @property {Uint8Array|null} [normalizedLoudness] AudioMetaData normalizedLoudness
9490
+ */
9491
+
9492
+ /**
9493
+ * Constructs a new AudioMetaData.
9494
+ * @memberof CellAsset
9495
+ * @classdesc Represents an AudioMetaData.
9496
+ * @implements IAudioMetaData
9497
+ * @constructor
9498
+ * @param {CellAsset.IAudioMetaData=} [properties] Properties to set
9499
+ */
9500
+ function AudioMetaData(properties) {
9501
+ if (properties)
9502
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
9503
+ if (properties[keys[i]] != null)
9504
+ this[keys[i]] = properties[keys[i]];
9505
+ }
9506
+
9507
+ /**
9508
+ * AudioMetaData durationInMillis.
9509
+ * @member {number|Long} durationInMillis
9510
+ * @memberof CellAsset.AudioMetaData
9511
+ * @instance
9512
+ */
9513
+ AudioMetaData.prototype.durationInMillis = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
9514
+
9515
+ /**
9516
+ * AudioMetaData normalizedLoudness.
9517
+ * @member {Uint8Array} normalizedLoudness
9518
+ * @memberof CellAsset.AudioMetaData
9519
+ * @instance
9520
+ */
9521
+ AudioMetaData.prototype.normalizedLoudness = $util.newBuffer([]);
9522
+
9523
+ /**
9524
+ * Creates a new AudioMetaData instance using the specified properties.
9525
+ * @function create
9526
+ * @memberof CellAsset.AudioMetaData
9527
+ * @static
9528
+ * @param {CellAsset.IAudioMetaData=} [properties] Properties to set
9529
+ * @returns {CellAsset.AudioMetaData} AudioMetaData instance
9530
+ */
9531
+ AudioMetaData.create = function create(properties) {
9532
+ return new AudioMetaData(properties);
9533
+ };
9534
+
9535
+ /**
9536
+ * Encodes the specified AudioMetaData message. Does not implicitly {@link CellAsset.AudioMetaData.verify|verify} messages.
9537
+ * @function encode
9538
+ * @memberof CellAsset.AudioMetaData
9539
+ * @static
9540
+ * @param {CellAsset.IAudioMetaData} message AudioMetaData message or plain object to encode
9541
+ * @param {$protobuf.Writer} [writer] Writer to encode to
9542
+ * @returns {$protobuf.Writer} Writer
9543
+ */
9544
+ AudioMetaData.encode = function encode(message, writer) {
9545
+ if (!writer)
9546
+ writer = $Writer.create();
9547
+ if (message.durationInMillis != null && Object.hasOwnProperty.call(message, "durationInMillis"))
9548
+ writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.durationInMillis);
9549
+ if (message.normalizedLoudness != null && Object.hasOwnProperty.call(message, "normalizedLoudness"))
9550
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.normalizedLoudness);
9551
+ return writer;
9552
+ };
9553
+
9554
+ /**
9555
+ * Encodes the specified AudioMetaData message, length delimited. Does not implicitly {@link CellAsset.AudioMetaData.verify|verify} messages.
9556
+ * @function encodeDelimited
9557
+ * @memberof CellAsset.AudioMetaData
9558
+ * @static
9559
+ * @param {CellAsset.IAudioMetaData} message AudioMetaData message or plain object to encode
9560
+ * @param {$protobuf.Writer} [writer] Writer to encode to
9561
+ * @returns {$protobuf.Writer} Writer
9562
+ */
9563
+ AudioMetaData.encodeDelimited = function encodeDelimited(message, writer) {
9564
+ return this.encode(message, writer).ldelim();
9565
+ };
9566
+
9567
+ /**
9568
+ * Decodes an AudioMetaData message from the specified reader or buffer.
9569
+ * @function decode
9570
+ * @memberof CellAsset.AudioMetaData
9571
+ * @static
9572
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
9573
+ * @param {number} [length] Message length if known beforehand
9574
+ * @returns {CellAsset.AudioMetaData} AudioMetaData
9575
+ * @throws {Error} If the payload is not a reader or valid buffer
9576
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
9577
+ */
9578
+ AudioMetaData.decode = function decode(reader, length) {
9579
+ if (!(reader instanceof $Reader))
9580
+ reader = $Reader.create(reader);
9581
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CellAsset.AudioMetaData();
9582
+ while (reader.pos < end) {
9583
+ var tag = reader.uint32();
9584
+ switch (tag >>> 3) {
9585
+ case 1: {
9586
+ message.durationInMillis = reader.uint64();
9587
+ break;
9588
+ }
9589
+ case 2: {
9590
+ message.normalizedLoudness = reader.bytes();
9591
+ break;
9592
+ }
9593
+ default:
9594
+ reader.skipType(tag & 7);
9595
+ break;
9596
+ }
9597
+ }
9598
+ return message;
9599
+ };
9600
+
9601
+ /**
9602
+ * Decodes an AudioMetaData message from the specified reader or buffer, length delimited.
9603
+ * @function decodeDelimited
9604
+ * @memberof CellAsset.AudioMetaData
9605
+ * @static
9606
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
9607
+ * @returns {CellAsset.AudioMetaData} AudioMetaData
9608
+ * @throws {Error} If the payload is not a reader or valid buffer
9609
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
9610
+ */
9611
+ AudioMetaData.decodeDelimited = function decodeDelimited(reader) {
9612
+ if (!(reader instanceof $Reader))
9613
+ reader = new $Reader(reader);
9614
+ return this.decode(reader, reader.uint32());
9615
+ };
9616
+
9617
+ /**
9618
+ * Verifies an AudioMetaData message.
9619
+ * @function verify
9620
+ * @memberof CellAsset.AudioMetaData
9621
+ * @static
9622
+ * @param {Object.<string,*>} message Plain object to verify
9623
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
9624
+ */
9625
+ AudioMetaData.verify = function verify(message) {
9626
+ if (typeof message !== "object" || message === null)
9627
+ return "object expected";
9628
+ if (message.durationInMillis != null && message.hasOwnProperty("durationInMillis"))
9629
+ if (!$util.isInteger(message.durationInMillis) && !(message.durationInMillis && $util.isInteger(message.durationInMillis.low) && $util.isInteger(message.durationInMillis.high)))
9630
+ return "durationInMillis: integer|Long expected";
9631
+ if (message.normalizedLoudness != null && message.hasOwnProperty("normalizedLoudness"))
9632
+ if (!(message.normalizedLoudness && typeof message.normalizedLoudness.length === "number" || $util.isString(message.normalizedLoudness)))
9633
+ return "normalizedLoudness: buffer expected";
9634
+ return null;
9635
+ };
9636
+
9637
+ /**
9638
+ * Creates an AudioMetaData message from a plain object. Also converts values to their respective internal types.
9639
+ * @function fromObject
9640
+ * @memberof CellAsset.AudioMetaData
9641
+ * @static
9642
+ * @param {Object.<string,*>} object Plain object
9643
+ * @returns {CellAsset.AudioMetaData} AudioMetaData
9644
+ */
9645
+ AudioMetaData.fromObject = function fromObject(object) {
9646
+ if (object instanceof $root.CellAsset.AudioMetaData)
9647
+ return object;
9648
+ var message = new $root.CellAsset.AudioMetaData();
9649
+ if (object.durationInMillis != null)
9650
+ if ($util.Long)
9651
+ (message.durationInMillis = $util.Long.fromValue(object.durationInMillis)).unsigned = true;
9652
+ else if (typeof object.durationInMillis === "string")
9653
+ message.durationInMillis = parseInt(object.durationInMillis, 10);
9654
+ else if (typeof object.durationInMillis === "number")
9655
+ message.durationInMillis = object.durationInMillis;
9656
+ else if (typeof object.durationInMillis === "object")
9657
+ message.durationInMillis = new $util.LongBits(object.durationInMillis.low >>> 0, object.durationInMillis.high >>> 0).toNumber(true);
9658
+ if (object.normalizedLoudness != null)
9659
+ if (typeof object.normalizedLoudness === "string")
9660
+ $util.base64.decode(object.normalizedLoudness, message.normalizedLoudness = $util.newBuffer($util.base64.length(object.normalizedLoudness)), 0);
9661
+ else if (object.normalizedLoudness.length >= 0)
9662
+ message.normalizedLoudness = object.normalizedLoudness;
9663
+ return message;
9664
+ };
9665
+
9666
+ /**
9667
+ * Creates a plain object from an AudioMetaData message. Also converts values to other types if specified.
9668
+ * @function toObject
9669
+ * @memberof CellAsset.AudioMetaData
9670
+ * @static
9671
+ * @param {CellAsset.AudioMetaData} message AudioMetaData
9672
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
9673
+ * @returns {Object.<string,*>} Plain object
9674
+ */
9675
+ AudioMetaData.toObject = function toObject(message, options) {
9676
+ if (!options)
9677
+ options = {};
9678
+ var object = {};
9679
+ if (options.defaults) {
9680
+ if ($util.Long) {
9681
+ var long = new $util.Long(0, 0, true);
9682
+ object.durationInMillis = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
9683
+ } else
9684
+ object.durationInMillis = options.longs === String ? "0" : 0;
9685
+ if (options.bytes === String)
9686
+ object.normalizedLoudness = "";
9687
+ else {
9688
+ object.normalizedLoudness = [];
9689
+ if (options.bytes !== Array)
9690
+ object.normalizedLoudness = $util.newBuffer(object.normalizedLoudness);
9691
+ }
9692
+ }
9693
+ if (message.durationInMillis != null && message.hasOwnProperty("durationInMillis"))
9694
+ if (typeof message.durationInMillis === "number")
9695
+ object.durationInMillis = options.longs === String ? String(message.durationInMillis) : message.durationInMillis;
9696
+ else
9697
+ object.durationInMillis = options.longs === String ? $util.Long.prototype.toString.call(message.durationInMillis) : options.longs === Number ? new $util.LongBits(message.durationInMillis.low >>> 0, message.durationInMillis.high >>> 0).toNumber(true) : message.durationInMillis;
9698
+ if (message.normalizedLoudness != null && message.hasOwnProperty("normalizedLoudness"))
9699
+ object.normalizedLoudness = options.bytes === String ? $util.base64.encode(message.normalizedLoudness, 0, message.normalizedLoudness.length) : options.bytes === Array ? Array.prototype.slice.call(message.normalizedLoudness) : message.normalizedLoudness;
9700
+ return object;
9701
+ };
9702
+
9703
+ /**
9704
+ * Converts this AudioMetaData to JSON.
9705
+ * @function toJSON
9706
+ * @memberof CellAsset.AudioMetaData
9707
+ * @instance
9708
+ * @returns {Object.<string,*>} JSON object
9709
+ */
9710
+ AudioMetaData.prototype.toJSON = function toJSON() {
9711
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
9712
+ };
9713
+
9714
+ /**
9715
+ * Gets the default type url for AudioMetaData
9716
+ * @function getTypeUrl
9717
+ * @memberof CellAsset.AudioMetaData
9718
+ * @static
9719
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
9720
+ * @returns {string} The default type url
9721
+ */
9722
+ AudioMetaData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
9723
+ if (typeUrlPrefix === undefined) {
9724
+ typeUrlPrefix = "type.googleapis.com";
9725
+ }
9726
+ return typeUrlPrefix + "/CellAsset.AudioMetaData";
9727
+ };
9728
+
9729
+ return AudioMetaData;
9730
+ })();
9731
+
9732
+ return CellAsset;
9733
+ })();
9734
+
9735
+ $root.Asset = (function() {
9736
+
9737
+ /**
9738
+ * Properties of an Asset.
9739
+ * @exports IAsset
9740
+ * @interface IAsset
9741
+ * @property {Asset.IOriginal|null} [original] Asset original
9742
+ * @property {Asset.NotUploaded|null} [notUploaded] Asset notUploaded
9743
+ * @property {Asset.IRemoteData|null} [uploaded] Asset uploaded
9744
+ * @property {Asset.IPreview|null} [preview] Asset preview
9745
+ * @property {boolean|null} [expectsReadConfirmation] Asset expectsReadConfirmation
9746
+ * @property {LegalHoldStatus|null} [legalHoldStatus] Asset legalHoldStatus
9747
+ */
9748
+
9749
+ /**
9750
+ * Constructs a new Asset.
9751
+ * @exports Asset
9752
+ * @classdesc Represents an Asset.
9753
+ * @implements IAsset
9754
+ * @constructor
9755
+ * @param {IAsset=} [properties] Properties to set
9756
+ */
9757
+ function Asset(properties) {
9758
+ if (properties)
9759
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
9760
+ if (properties[keys[i]] != null)
9761
+ this[keys[i]] = properties[keys[i]];
9762
+ }
9763
+
9764
+ /**
9765
+ * Asset original.
9766
+ * @member {Asset.IOriginal|null|undefined} original
9767
+ * @memberof Asset
9768
+ * @instance
9769
+ */
9770
+ Asset.prototype.original = null;
9771
+
9772
+ /**
9773
+ * Asset notUploaded.
9774
+ * @member {Asset.NotUploaded|null|undefined} notUploaded
9775
+ * @memberof Asset
9776
+ * @instance
9777
+ */
9778
+ Asset.prototype.notUploaded = null;
9779
+
9780
+ /**
9781
+ * Asset uploaded.
9782
+ * @member {Asset.IRemoteData|null|undefined} uploaded
9783
+ * @memberof Asset
9784
+ * @instance
9785
+ */
9786
+ Asset.prototype.uploaded = null;
9787
+
9788
+ /**
9789
+ * Asset preview.
9790
+ * @member {Asset.IPreview|null|undefined} preview
9791
+ * @memberof Asset
9792
+ * @instance
9793
+ */
9794
+ Asset.prototype.preview = null;
9795
+
9796
+ /**
9797
+ * Asset expectsReadConfirmation.
9798
+ * @member {boolean} expectsReadConfirmation
9799
+ * @memberof Asset
9800
+ * @instance
9801
+ */
9802
+ Asset.prototype.expectsReadConfirmation = false;
9803
+
9804
+ /**
9805
+ * Asset legalHoldStatus.
9806
+ * @member {LegalHoldStatus} legalHoldStatus
9807
+ * @memberof Asset
9808
+ * @instance
9809
+ */
9810
+ Asset.prototype.legalHoldStatus = 0;
9811
+
9812
+ // OneOf field names bound to virtual getters and setters
9813
+ var $oneOfFields;
9814
+
9815
+ /**
9816
+ * Asset status.
9817
+ * @member {"notUploaded"|"uploaded"|undefined} status
9818
+ * @memberof Asset
9819
+ * @instance
9820
+ */
9821
+ Object.defineProperty(Asset.prototype, "status", {
9822
+ get: $util.oneOfGetter($oneOfFields = ["notUploaded", "uploaded"]),
9823
+ set: $util.oneOfSetter($oneOfFields)
9824
+ });
9825
+
9826
+ /**
9827
+ * Creates a new Asset instance using the specified properties.
9828
+ * @function create
9829
+ * @memberof Asset
9830
+ * @static
9831
+ * @param {IAsset=} [properties] Properties to set
9832
+ * @returns {Asset} Asset instance
9833
+ */
9834
+ Asset.create = function create(properties) {
9835
+ return new Asset(properties);
9836
+ };
9837
+
9838
+ /**
9839
+ * Encodes the specified Asset message. Does not implicitly {@link Asset.verify|verify} messages.
9840
+ * @function encode
9841
+ * @memberof Asset
9842
+ * @static
9843
+ * @param {IAsset} message Asset message or plain object to encode
9844
+ * @param {$protobuf.Writer} [writer] Writer to encode to
9845
+ * @returns {$protobuf.Writer} Writer
9846
+ */
9847
+ Asset.encode = function encode(message, writer) {
9848
+ if (!writer)
9849
+ writer = $Writer.create();
9850
+ if (message.original != null && Object.hasOwnProperty.call(message, "original"))
9851
+ $root.Asset.Original.encode(message.original, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
9852
+ if (message.notUploaded != null && Object.hasOwnProperty.call(message, "notUploaded"))
9853
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.notUploaded);
9854
+ if (message.uploaded != null && Object.hasOwnProperty.call(message, "uploaded"))
9855
+ $root.Asset.RemoteData.encode(message.uploaded, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
9856
+ if (message.preview != null && Object.hasOwnProperty.call(message, "preview"))
9857
+ $root.Asset.Preview.encode(message.preview, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
9858
+ if (message.expectsReadConfirmation != null && Object.hasOwnProperty.call(message, "expectsReadConfirmation"))
9859
+ writer.uint32(/* id 6, wireType 0 =*/48).bool(message.expectsReadConfirmation);
9860
+ if (message.legalHoldStatus != null && Object.hasOwnProperty.call(message, "legalHoldStatus"))
9861
+ writer.uint32(/* id 7, wireType 0 =*/56).int32(message.legalHoldStatus);
9862
+ return writer;
9863
+ };
9864
+
9865
+ /**
9866
+ * Encodes the specified Asset message, length delimited. Does not implicitly {@link Asset.verify|verify} messages.
9867
+ * @function encodeDelimited
9868
+ * @memberof Asset
9869
+ * @static
9870
+ * @param {IAsset} message Asset message or plain object to encode
9871
+ * @param {$protobuf.Writer} [writer] Writer to encode to
9872
+ * @returns {$protobuf.Writer} Writer
9873
+ */
9874
+ Asset.encodeDelimited = function encodeDelimited(message, writer) {
9875
+ return this.encode(message, writer).ldelim();
9876
+ };
9877
+
9878
+ /**
9879
+ * Decodes an Asset message from the specified reader or buffer.
9880
+ * @function decode
9881
+ * @memberof Asset
9882
+ * @static
9883
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
9884
+ * @param {number} [length] Message length if known beforehand
9885
+ * @returns {Asset} Asset
9886
+ * @throws {Error} If the payload is not a reader or valid buffer
9887
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
9888
+ */
9889
+ Asset.decode = function decode(reader, length) {
9890
+ if (!(reader instanceof $Reader))
9891
+ reader = $Reader.create(reader);
9892
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Asset();
9893
+ while (reader.pos < end) {
9894
+ var tag = reader.uint32();
9895
+ switch (tag >>> 3) {
9896
+ case 1: {
9897
+ message.original = $root.Asset.Original.decode(reader, reader.uint32());
9898
+ break;
9899
+ }
9900
+ case 3: {
9901
+ message.notUploaded = reader.int32();
9902
+ break;
9903
+ }
9904
+ case 4: {
9905
+ message.uploaded = $root.Asset.RemoteData.decode(reader, reader.uint32());
9906
+ break;
9907
+ }
9908
+ case 5: {
9909
+ message.preview = $root.Asset.Preview.decode(reader, reader.uint32());
9910
+ break;
9911
+ }
9912
+ case 6: {
9913
+ message.expectsReadConfirmation = reader.bool();
9914
+ break;
9915
+ }
9916
+ case 7: {
9917
+ message.legalHoldStatus = reader.int32();
9918
+ break;
9919
+ }
9920
+ default:
9921
+ reader.skipType(tag & 7);
9922
+ break;
9923
+ }
9924
+ }
9925
+ return message;
9926
+ };
9927
+
9928
+ /**
9929
+ * Decodes an Asset message from the specified reader or buffer, length delimited.
9930
+ * @function decodeDelimited
9931
+ * @memberof Asset
9932
+ * @static
9933
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
9934
+ * @returns {Asset} Asset
9935
+ * @throws {Error} If the payload is not a reader or valid buffer
9936
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
9937
+ */
9938
+ Asset.decodeDelimited = function decodeDelimited(reader) {
9939
+ if (!(reader instanceof $Reader))
9940
+ reader = new $Reader(reader);
9941
+ return this.decode(reader, reader.uint32());
9942
+ };
9943
+
9944
+ /**
9945
+ * Verifies an Asset message.
9946
+ * @function verify
9947
+ * @memberof Asset
9948
+ * @static
9949
+ * @param {Object.<string,*>} message Plain object to verify
9950
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
9951
+ */
9952
+ Asset.verify = function verify(message) {
9953
+ if (typeof message !== "object" || message === null)
9954
+ return "object expected";
9955
+ var properties = {};
9956
+ if (message.original != null && message.hasOwnProperty("original")) {
9957
+ var error = $root.Asset.Original.verify(message.original);
9958
+ if (error)
9959
+ return "original." + error;
9960
+ }
9961
+ if (message.notUploaded != null && message.hasOwnProperty("notUploaded")) {
9962
+ properties.status = 1;
9963
+ switch (message.notUploaded) {
9964
+ default:
9965
+ return "notUploaded: enum value expected";
9966
+ case 0:
9967
+ case 1:
9968
+ break;
9969
+ }
9970
+ }
9971
+ if (message.uploaded != null && message.hasOwnProperty("uploaded")) {
9972
+ if (properties.status === 1)
9973
+ return "status: multiple values";
9974
+ properties.status = 1;
9975
+ {
9976
+ var error = $root.Asset.RemoteData.verify(message.uploaded);
9977
+ if (error)
9978
+ return "uploaded." + error;
9979
+ }
9980
+ }
9981
+ if (message.preview != null && message.hasOwnProperty("preview")) {
9982
+ var error = $root.Asset.Preview.verify(message.preview);
9983
+ if (error)
9984
+ return "preview." + error;
9985
+ }
9986
+ if (message.expectsReadConfirmation != null && message.hasOwnProperty("expectsReadConfirmation"))
9987
+ if (typeof message.expectsReadConfirmation !== "boolean")
9988
+ return "expectsReadConfirmation: boolean expected";
9989
+ if (message.legalHoldStatus != null && message.hasOwnProperty("legalHoldStatus"))
9990
+ switch (message.legalHoldStatus) {
9991
+ default:
9992
+ return "legalHoldStatus: enum value expected";
9993
+ case 0:
9994
+ case 1:
9995
+ case 2:
9996
+ break;
9997
+ }
9998
+ return null;
9999
+ };
10000
+
10001
+ /**
10002
+ * Creates an Asset message from a plain object. Also converts values to their respective internal types.
10003
+ * @function fromObject
10004
+ * @memberof Asset
10005
+ * @static
10006
+ * @param {Object.<string,*>} object Plain object
10007
+ * @returns {Asset} Asset
10008
+ */
10009
+ Asset.fromObject = function fromObject(object) {
10010
+ if (object instanceof $root.Asset)
10011
+ return object;
10012
+ var message = new $root.Asset();
10013
+ if (object.original != null) {
10014
+ if (typeof object.original !== "object")
10015
+ throw TypeError(".Asset.original: object expected");
10016
+ message.original = $root.Asset.Original.fromObject(object.original);
10017
+ }
10018
+ switch (object.notUploaded) {
10019
+ default:
10020
+ if (typeof object.notUploaded === "number") {
10021
+ message.notUploaded = object.notUploaded;
10022
+ break;
10023
+ }
10024
+ break;
10025
+ case "CANCELLED":
10026
+ case 0:
10027
+ message.notUploaded = 0;
10028
+ break;
10029
+ case "FAILED":
10030
+ case 1:
10031
+ message.notUploaded = 1;
10032
+ break;
10033
+ }
10034
+ if (object.uploaded != null) {
10035
+ if (typeof object.uploaded !== "object")
10036
+ throw TypeError(".Asset.uploaded: object expected");
10037
+ message.uploaded = $root.Asset.RemoteData.fromObject(object.uploaded);
10038
+ }
10039
+ if (object.preview != null) {
10040
+ if (typeof object.preview !== "object")
10041
+ throw TypeError(".Asset.preview: object expected");
10042
+ message.preview = $root.Asset.Preview.fromObject(object.preview);
10043
+ }
10044
+ if (object.expectsReadConfirmation != null)
10045
+ message.expectsReadConfirmation = Boolean(object.expectsReadConfirmation);
8244
10046
  switch (object.legalHoldStatus) {
8245
10047
  default:
8246
10048
  if (typeof object.legalHoldStatus === "number") {
@@ -11011,6 +12813,209 @@ $root.InCallEmoji = (function() {
11011
12813
  return InCallEmoji;
11012
12814
  })();
11013
12815
 
12816
+ $root.InCallHandRaise = (function() {
12817
+
12818
+ /**
12819
+ * Properties of an InCallHandRaise.
12820
+ * @exports IInCallHandRaise
12821
+ * @interface IInCallHandRaise
12822
+ * @property {boolean} isHandUp InCallHandRaise isHandUp
12823
+ */
12824
+
12825
+ /**
12826
+ * Constructs a new InCallHandRaise.
12827
+ * @exports InCallHandRaise
12828
+ * @classdesc Represents an InCallHandRaise.
12829
+ * @implements IInCallHandRaise
12830
+ * @constructor
12831
+ * @param {IInCallHandRaise=} [properties] Properties to set
12832
+ */
12833
+ function InCallHandRaise(properties) {
12834
+ if (properties)
12835
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
12836
+ if (properties[keys[i]] != null)
12837
+ this[keys[i]] = properties[keys[i]];
12838
+ }
12839
+
12840
+ /**
12841
+ * InCallHandRaise isHandUp.
12842
+ * @member {boolean} isHandUp
12843
+ * @memberof InCallHandRaise
12844
+ * @instance
12845
+ */
12846
+ InCallHandRaise.prototype.isHandUp = false;
12847
+
12848
+ /**
12849
+ * Creates a new InCallHandRaise instance using the specified properties.
12850
+ * @function create
12851
+ * @memberof InCallHandRaise
12852
+ * @static
12853
+ * @param {IInCallHandRaise=} [properties] Properties to set
12854
+ * @returns {InCallHandRaise} InCallHandRaise instance
12855
+ */
12856
+ InCallHandRaise.create = function create(properties) {
12857
+ return new InCallHandRaise(properties);
12858
+ };
12859
+
12860
+ /**
12861
+ * Encodes the specified InCallHandRaise message. Does not implicitly {@link InCallHandRaise.verify|verify} messages.
12862
+ * @function encode
12863
+ * @memberof InCallHandRaise
12864
+ * @static
12865
+ * @param {IInCallHandRaise} message InCallHandRaise message or plain object to encode
12866
+ * @param {$protobuf.Writer} [writer] Writer to encode to
12867
+ * @returns {$protobuf.Writer} Writer
12868
+ */
12869
+ InCallHandRaise.encode = function encode(message, writer) {
12870
+ if (!writer)
12871
+ writer = $Writer.create();
12872
+ writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isHandUp);
12873
+ return writer;
12874
+ };
12875
+
12876
+ /**
12877
+ * Encodes the specified InCallHandRaise message, length delimited. Does not implicitly {@link InCallHandRaise.verify|verify} messages.
12878
+ * @function encodeDelimited
12879
+ * @memberof InCallHandRaise
12880
+ * @static
12881
+ * @param {IInCallHandRaise} message InCallHandRaise message or plain object to encode
12882
+ * @param {$protobuf.Writer} [writer] Writer to encode to
12883
+ * @returns {$protobuf.Writer} Writer
12884
+ */
12885
+ InCallHandRaise.encodeDelimited = function encodeDelimited(message, writer) {
12886
+ return this.encode(message, writer).ldelim();
12887
+ };
12888
+
12889
+ /**
12890
+ * Decodes an InCallHandRaise message from the specified reader or buffer.
12891
+ * @function decode
12892
+ * @memberof InCallHandRaise
12893
+ * @static
12894
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
12895
+ * @param {number} [length] Message length if known beforehand
12896
+ * @returns {InCallHandRaise} InCallHandRaise
12897
+ * @throws {Error} If the payload is not a reader or valid buffer
12898
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
12899
+ */
12900
+ InCallHandRaise.decode = function decode(reader, length) {
12901
+ if (!(reader instanceof $Reader))
12902
+ reader = $Reader.create(reader);
12903
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.InCallHandRaise();
12904
+ while (reader.pos < end) {
12905
+ var tag = reader.uint32();
12906
+ switch (tag >>> 3) {
12907
+ case 1: {
12908
+ message.isHandUp = reader.bool();
12909
+ break;
12910
+ }
12911
+ default:
12912
+ reader.skipType(tag & 7);
12913
+ break;
12914
+ }
12915
+ }
12916
+ if (!message.hasOwnProperty("isHandUp"))
12917
+ throw $util.ProtocolError("missing required 'isHandUp'", { instance: message });
12918
+ return message;
12919
+ };
12920
+
12921
+ /**
12922
+ * Decodes an InCallHandRaise message from the specified reader or buffer, length delimited.
12923
+ * @function decodeDelimited
12924
+ * @memberof InCallHandRaise
12925
+ * @static
12926
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
12927
+ * @returns {InCallHandRaise} InCallHandRaise
12928
+ * @throws {Error} If the payload is not a reader or valid buffer
12929
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
12930
+ */
12931
+ InCallHandRaise.decodeDelimited = function decodeDelimited(reader) {
12932
+ if (!(reader instanceof $Reader))
12933
+ reader = new $Reader(reader);
12934
+ return this.decode(reader, reader.uint32());
12935
+ };
12936
+
12937
+ /**
12938
+ * Verifies an InCallHandRaise message.
12939
+ * @function verify
12940
+ * @memberof InCallHandRaise
12941
+ * @static
12942
+ * @param {Object.<string,*>} message Plain object to verify
12943
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
12944
+ */
12945
+ InCallHandRaise.verify = function verify(message) {
12946
+ if (typeof message !== "object" || message === null)
12947
+ return "object expected";
12948
+ if (typeof message.isHandUp !== "boolean")
12949
+ return "isHandUp: boolean expected";
12950
+ return null;
12951
+ };
12952
+
12953
+ /**
12954
+ * Creates an InCallHandRaise message from a plain object. Also converts values to their respective internal types.
12955
+ * @function fromObject
12956
+ * @memberof InCallHandRaise
12957
+ * @static
12958
+ * @param {Object.<string,*>} object Plain object
12959
+ * @returns {InCallHandRaise} InCallHandRaise
12960
+ */
12961
+ InCallHandRaise.fromObject = function fromObject(object) {
12962
+ if (object instanceof $root.InCallHandRaise)
12963
+ return object;
12964
+ var message = new $root.InCallHandRaise();
12965
+ if (object.isHandUp != null)
12966
+ message.isHandUp = Boolean(object.isHandUp);
12967
+ return message;
12968
+ };
12969
+
12970
+ /**
12971
+ * Creates a plain object from an InCallHandRaise message. Also converts values to other types if specified.
12972
+ * @function toObject
12973
+ * @memberof InCallHandRaise
12974
+ * @static
12975
+ * @param {InCallHandRaise} message InCallHandRaise
12976
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
12977
+ * @returns {Object.<string,*>} Plain object
12978
+ */
12979
+ InCallHandRaise.toObject = function toObject(message, options) {
12980
+ if (!options)
12981
+ options = {};
12982
+ var object = {};
12983
+ if (options.defaults)
12984
+ object.isHandUp = false;
12985
+ if (message.isHandUp != null && message.hasOwnProperty("isHandUp"))
12986
+ object.isHandUp = message.isHandUp;
12987
+ return object;
12988
+ };
12989
+
12990
+ /**
12991
+ * Converts this InCallHandRaise to JSON.
12992
+ * @function toJSON
12993
+ * @memberof InCallHandRaise
12994
+ * @instance
12995
+ * @returns {Object.<string,*>} JSON object
12996
+ */
12997
+ InCallHandRaise.prototype.toJSON = function toJSON() {
12998
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
12999
+ };
13000
+
13001
+ /**
13002
+ * Gets the default type url for InCallHandRaise
13003
+ * @function getTypeUrl
13004
+ * @memberof InCallHandRaise
13005
+ * @static
13006
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
13007
+ * @returns {string} The default type url
13008
+ */
13009
+ InCallHandRaise.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
13010
+ if (typeUrlPrefix === undefined) {
13011
+ typeUrlPrefix = "type.googleapis.com";
13012
+ }
13013
+ return typeUrlPrefix + "/InCallHandRaise";
13014
+ };
13015
+
13016
+ return InCallHandRaise;
13017
+ })();
13018
+
11014
13019
  $root.Calling = (function() {
11015
13020
 
11016
13021
  /**