@headspace/protos-events 1.499.0 → 1.501.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/lib/index.d.ts +216 -210
- package/lib/index.js +570 -522
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -86796,528 +86796,6 @@ $root.HeadspaceContentSharePreviewCreated = (function() {
|
|
|
86796
86796
|
return HeadspaceContentSharePreviewCreated;
|
|
86797
86797
|
})();
|
|
86798
86798
|
|
|
86799
|
-
$root.UserMessageBrazePushNotification = (function() {
|
|
86800
|
-
|
|
86801
|
-
/**
|
|
86802
|
-
* Properties of a UserMessageBrazePushNotification.
|
|
86803
|
-
* @name IUserMessageBrazePushNotification
|
|
86804
|
-
* @interface IUserMessageBrazePushNotification
|
|
86805
|
-
* @property {string|null} [userId] UserMessageBrazePushNotification userId
|
|
86806
|
-
* @property {string|null} [brazeMessageHeader] UserMessageBrazePushNotification brazeMessageHeader
|
|
86807
|
-
* @property {string|null} [brazeMessageBody] UserMessageBrazePushNotification brazeMessageBody
|
|
86808
|
-
* @property {string|null} [brazeMessageDeeplink] UserMessageBrazePushNotification brazeMessageDeeplink
|
|
86809
|
-
*/
|
|
86810
|
-
|
|
86811
|
-
/**
|
|
86812
|
-
* Constructs a new UserMessageBrazePushNotification.
|
|
86813
|
-
* @name UserMessageBrazePushNotification
|
|
86814
|
-
* @classdesc Represents a UserMessageBrazePushNotification.
|
|
86815
|
-
* @implements IUserMessageBrazePushNotification
|
|
86816
|
-
* @constructor
|
|
86817
|
-
* @param {IUserMessageBrazePushNotification=} [properties] Properties to set
|
|
86818
|
-
*/
|
|
86819
|
-
function UserMessageBrazePushNotification(properties) {
|
|
86820
|
-
if (properties)
|
|
86821
|
-
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
86822
|
-
if (properties[keys[i]] != null)
|
|
86823
|
-
this[keys[i]] = properties[keys[i]];
|
|
86824
|
-
}
|
|
86825
|
-
|
|
86826
|
-
/**
|
|
86827
|
-
* UserMessageBrazePushNotification userId.
|
|
86828
|
-
* @member {string} userId
|
|
86829
|
-
* @memberof UserMessageBrazePushNotification
|
|
86830
|
-
* @instance
|
|
86831
|
-
*/
|
|
86832
|
-
UserMessageBrazePushNotification.prototype.userId = "";
|
|
86833
|
-
|
|
86834
|
-
/**
|
|
86835
|
-
* UserMessageBrazePushNotification brazeMessageHeader.
|
|
86836
|
-
* @member {string} brazeMessageHeader
|
|
86837
|
-
* @memberof UserMessageBrazePushNotification
|
|
86838
|
-
* @instance
|
|
86839
|
-
*/
|
|
86840
|
-
UserMessageBrazePushNotification.prototype.brazeMessageHeader = "";
|
|
86841
|
-
|
|
86842
|
-
/**
|
|
86843
|
-
* UserMessageBrazePushNotification brazeMessageBody.
|
|
86844
|
-
* @member {string} brazeMessageBody
|
|
86845
|
-
* @memberof UserMessageBrazePushNotification
|
|
86846
|
-
* @instance
|
|
86847
|
-
*/
|
|
86848
|
-
UserMessageBrazePushNotification.prototype.brazeMessageBody = "";
|
|
86849
|
-
|
|
86850
|
-
/**
|
|
86851
|
-
* UserMessageBrazePushNotification brazeMessageDeeplink.
|
|
86852
|
-
* @member {string} brazeMessageDeeplink
|
|
86853
|
-
* @memberof UserMessageBrazePushNotification
|
|
86854
|
-
* @instance
|
|
86855
|
-
*/
|
|
86856
|
-
UserMessageBrazePushNotification.prototype.brazeMessageDeeplink = "";
|
|
86857
|
-
|
|
86858
|
-
/**
|
|
86859
|
-
* Creates a new UserMessageBrazePushNotification instance using the specified properties.
|
|
86860
|
-
* @function create
|
|
86861
|
-
* @memberof UserMessageBrazePushNotification
|
|
86862
|
-
* @static
|
|
86863
|
-
* @param {IUserMessageBrazePushNotification=} [properties] Properties to set
|
|
86864
|
-
* @returns {UserMessageBrazePushNotification} UserMessageBrazePushNotification instance
|
|
86865
|
-
*/
|
|
86866
|
-
UserMessageBrazePushNotification.create = function create(properties) {
|
|
86867
|
-
return new UserMessageBrazePushNotification(properties);
|
|
86868
|
-
};
|
|
86869
|
-
|
|
86870
|
-
/**
|
|
86871
|
-
* Encodes the specified UserMessageBrazePushNotification message. Does not implicitly {@link UserMessageBrazePushNotification.verify|verify} messages.
|
|
86872
|
-
* @function encode
|
|
86873
|
-
* @memberof UserMessageBrazePushNotification
|
|
86874
|
-
* @static
|
|
86875
|
-
* @param {IUserMessageBrazePushNotification} message UserMessageBrazePushNotification message or plain object to encode
|
|
86876
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
86877
|
-
* @returns {$protobuf.Writer} Writer
|
|
86878
|
-
*/
|
|
86879
|
-
UserMessageBrazePushNotification.encode = function encode(message, writer) {
|
|
86880
|
-
if (!writer)
|
|
86881
|
-
writer = $Writer.create();
|
|
86882
|
-
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
86883
|
-
writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
|
|
86884
|
-
if (message.brazeMessageHeader != null && message.hasOwnProperty("brazeMessageHeader"))
|
|
86885
|
-
writer.uint32(/* id 2, wireType 2 =*/18).string(message.brazeMessageHeader);
|
|
86886
|
-
if (message.brazeMessageBody != null && message.hasOwnProperty("brazeMessageBody"))
|
|
86887
|
-
writer.uint32(/* id 3, wireType 2 =*/26).string(message.brazeMessageBody);
|
|
86888
|
-
if (message.brazeMessageDeeplink != null && message.hasOwnProperty("brazeMessageDeeplink"))
|
|
86889
|
-
writer.uint32(/* id 4, wireType 2 =*/34).string(message.brazeMessageDeeplink);
|
|
86890
|
-
return writer;
|
|
86891
|
-
};
|
|
86892
|
-
|
|
86893
|
-
/**
|
|
86894
|
-
* Encodes the specified UserMessageBrazePushNotification message, length delimited. Does not implicitly {@link UserMessageBrazePushNotification.verify|verify} messages.
|
|
86895
|
-
* @function encodeDelimited
|
|
86896
|
-
* @memberof UserMessageBrazePushNotification
|
|
86897
|
-
* @static
|
|
86898
|
-
* @param {IUserMessageBrazePushNotification} message UserMessageBrazePushNotification message or plain object to encode
|
|
86899
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
86900
|
-
* @returns {$protobuf.Writer} Writer
|
|
86901
|
-
*/
|
|
86902
|
-
UserMessageBrazePushNotification.encodeDelimited = function encodeDelimited(message, writer) {
|
|
86903
|
-
return this.encode(message, writer).ldelim();
|
|
86904
|
-
};
|
|
86905
|
-
|
|
86906
|
-
/**
|
|
86907
|
-
* Decodes a UserMessageBrazePushNotification message from the specified reader or buffer.
|
|
86908
|
-
* @function decode
|
|
86909
|
-
* @memberof UserMessageBrazePushNotification
|
|
86910
|
-
* @static
|
|
86911
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
86912
|
-
* @param {number} [length] Message length if known beforehand
|
|
86913
|
-
* @returns {UserMessageBrazePushNotification} UserMessageBrazePushNotification
|
|
86914
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
86915
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
86916
|
-
*/
|
|
86917
|
-
UserMessageBrazePushNotification.decode = function decode(reader, length) {
|
|
86918
|
-
if (!(reader instanceof $Reader))
|
|
86919
|
-
reader = $Reader.create(reader);
|
|
86920
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserMessageBrazePushNotification();
|
|
86921
|
-
while (reader.pos < end) {
|
|
86922
|
-
var tag = reader.uint32();
|
|
86923
|
-
switch (tag >>> 3) {
|
|
86924
|
-
case 1:
|
|
86925
|
-
message.userId = reader.string();
|
|
86926
|
-
break;
|
|
86927
|
-
case 2:
|
|
86928
|
-
message.brazeMessageHeader = reader.string();
|
|
86929
|
-
break;
|
|
86930
|
-
case 3:
|
|
86931
|
-
message.brazeMessageBody = reader.string();
|
|
86932
|
-
break;
|
|
86933
|
-
case 4:
|
|
86934
|
-
message.brazeMessageDeeplink = reader.string();
|
|
86935
|
-
break;
|
|
86936
|
-
default:
|
|
86937
|
-
reader.skipType(tag & 7);
|
|
86938
|
-
break;
|
|
86939
|
-
}
|
|
86940
|
-
}
|
|
86941
|
-
return message;
|
|
86942
|
-
};
|
|
86943
|
-
|
|
86944
|
-
/**
|
|
86945
|
-
* Decodes a UserMessageBrazePushNotification message from the specified reader or buffer, length delimited.
|
|
86946
|
-
* @function decodeDelimited
|
|
86947
|
-
* @memberof UserMessageBrazePushNotification
|
|
86948
|
-
* @static
|
|
86949
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
86950
|
-
* @returns {UserMessageBrazePushNotification} UserMessageBrazePushNotification
|
|
86951
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
86952
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
86953
|
-
*/
|
|
86954
|
-
UserMessageBrazePushNotification.decodeDelimited = function decodeDelimited(reader) {
|
|
86955
|
-
if (!(reader instanceof $Reader))
|
|
86956
|
-
reader = new $Reader(reader);
|
|
86957
|
-
return this.decode(reader, reader.uint32());
|
|
86958
|
-
};
|
|
86959
|
-
|
|
86960
|
-
/**
|
|
86961
|
-
* Verifies a UserMessageBrazePushNotification message.
|
|
86962
|
-
* @function verify
|
|
86963
|
-
* @memberof UserMessageBrazePushNotification
|
|
86964
|
-
* @static
|
|
86965
|
-
* @param {Object.<string,*>} message Plain object to verify
|
|
86966
|
-
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
86967
|
-
*/
|
|
86968
|
-
UserMessageBrazePushNotification.verify = function verify(message) {
|
|
86969
|
-
if (typeof message !== "object" || message === null)
|
|
86970
|
-
return "object expected";
|
|
86971
|
-
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
86972
|
-
if (!$util.isString(message.userId))
|
|
86973
|
-
return "userId: string expected";
|
|
86974
|
-
if (message.brazeMessageHeader != null && message.hasOwnProperty("brazeMessageHeader"))
|
|
86975
|
-
if (!$util.isString(message.brazeMessageHeader))
|
|
86976
|
-
return "brazeMessageHeader: string expected";
|
|
86977
|
-
if (message.brazeMessageBody != null && message.hasOwnProperty("brazeMessageBody"))
|
|
86978
|
-
if (!$util.isString(message.brazeMessageBody))
|
|
86979
|
-
return "brazeMessageBody: string expected";
|
|
86980
|
-
if (message.brazeMessageDeeplink != null && message.hasOwnProperty("brazeMessageDeeplink"))
|
|
86981
|
-
if (!$util.isString(message.brazeMessageDeeplink))
|
|
86982
|
-
return "brazeMessageDeeplink: string expected";
|
|
86983
|
-
return null;
|
|
86984
|
-
};
|
|
86985
|
-
|
|
86986
|
-
/**
|
|
86987
|
-
* Creates a UserMessageBrazePushNotification message from a plain object. Also converts values to their respective internal types.
|
|
86988
|
-
* @function fromObject
|
|
86989
|
-
* @memberof UserMessageBrazePushNotification
|
|
86990
|
-
* @static
|
|
86991
|
-
* @param {Object.<string,*>} object Plain object
|
|
86992
|
-
* @returns {UserMessageBrazePushNotification} UserMessageBrazePushNotification
|
|
86993
|
-
*/
|
|
86994
|
-
UserMessageBrazePushNotification.fromObject = function fromObject(object) {
|
|
86995
|
-
if (object instanceof $root.UserMessageBrazePushNotification)
|
|
86996
|
-
return object;
|
|
86997
|
-
var message = new $root.UserMessageBrazePushNotification();
|
|
86998
|
-
if (object.userId != null)
|
|
86999
|
-
message.userId = String(object.userId);
|
|
87000
|
-
if (object.brazeMessageHeader != null)
|
|
87001
|
-
message.brazeMessageHeader = String(object.brazeMessageHeader);
|
|
87002
|
-
if (object.brazeMessageBody != null)
|
|
87003
|
-
message.brazeMessageBody = String(object.brazeMessageBody);
|
|
87004
|
-
if (object.brazeMessageDeeplink != null)
|
|
87005
|
-
message.brazeMessageDeeplink = String(object.brazeMessageDeeplink);
|
|
87006
|
-
return message;
|
|
87007
|
-
};
|
|
87008
|
-
|
|
87009
|
-
/**
|
|
87010
|
-
* Creates a plain object from a UserMessageBrazePushNotification message. Also converts values to other types if specified.
|
|
87011
|
-
* @function toObject
|
|
87012
|
-
* @memberof UserMessageBrazePushNotification
|
|
87013
|
-
* @static
|
|
87014
|
-
* @param {UserMessageBrazePushNotification} message UserMessageBrazePushNotification
|
|
87015
|
-
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
87016
|
-
* @returns {Object.<string,*>} Plain object
|
|
87017
|
-
*/
|
|
87018
|
-
UserMessageBrazePushNotification.toObject = function toObject(message, options) {
|
|
87019
|
-
if (!options)
|
|
87020
|
-
options = {};
|
|
87021
|
-
var object = {};
|
|
87022
|
-
if (options.defaults) {
|
|
87023
|
-
object.userId = "";
|
|
87024
|
-
object.brazeMessageHeader = "";
|
|
87025
|
-
object.brazeMessageBody = "";
|
|
87026
|
-
object.brazeMessageDeeplink = "";
|
|
87027
|
-
}
|
|
87028
|
-
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
87029
|
-
object.userId = message.userId;
|
|
87030
|
-
if (message.brazeMessageHeader != null && message.hasOwnProperty("brazeMessageHeader"))
|
|
87031
|
-
object.brazeMessageHeader = message.brazeMessageHeader;
|
|
87032
|
-
if (message.brazeMessageBody != null && message.hasOwnProperty("brazeMessageBody"))
|
|
87033
|
-
object.brazeMessageBody = message.brazeMessageBody;
|
|
87034
|
-
if (message.brazeMessageDeeplink != null && message.hasOwnProperty("brazeMessageDeeplink"))
|
|
87035
|
-
object.brazeMessageDeeplink = message.brazeMessageDeeplink;
|
|
87036
|
-
return object;
|
|
87037
|
-
};
|
|
87038
|
-
|
|
87039
|
-
/**
|
|
87040
|
-
* Converts this UserMessageBrazePushNotification to JSON.
|
|
87041
|
-
* @function toJSON
|
|
87042
|
-
* @memberof UserMessageBrazePushNotification
|
|
87043
|
-
* @instance
|
|
87044
|
-
* @returns {Object.<string,*>} JSON object
|
|
87045
|
-
*/
|
|
87046
|
-
UserMessageBrazePushNotification.prototype.toJSON = function toJSON() {
|
|
87047
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
87048
|
-
};
|
|
87049
|
-
|
|
87050
|
-
return UserMessageBrazePushNotification;
|
|
87051
|
-
})();
|
|
87052
|
-
|
|
87053
|
-
$root.UserMessageBrazePushNotificationScheduled = (function() {
|
|
87054
|
-
|
|
87055
|
-
/**
|
|
87056
|
-
* Properties of a UserMessageBrazePushNotificationScheduled.
|
|
87057
|
-
* @name IUserMessageBrazePushNotificationScheduled
|
|
87058
|
-
* @interface IUserMessageBrazePushNotificationScheduled
|
|
87059
|
-
* @property {string|null} [brazeCanvasId] UserMessageBrazePushNotificationScheduled brazeCanvasId
|
|
87060
|
-
* @property {number|Long|null} [messageScheduleTimestamp] UserMessageBrazePushNotificationScheduled messageScheduleTimestamp
|
|
87061
|
-
* @property {Array.<IUserMessageBrazePushNotification>|null} [userMessage] UserMessageBrazePushNotificationScheduled userMessage
|
|
87062
|
-
*/
|
|
87063
|
-
|
|
87064
|
-
/**
|
|
87065
|
-
* Constructs a new UserMessageBrazePushNotificationScheduled.
|
|
87066
|
-
* @name UserMessageBrazePushNotificationScheduled
|
|
87067
|
-
* @classdesc Represents a UserMessageBrazePushNotificationScheduled.
|
|
87068
|
-
* @implements IUserMessageBrazePushNotificationScheduled
|
|
87069
|
-
* @constructor
|
|
87070
|
-
* @param {IUserMessageBrazePushNotificationScheduled=} [properties] Properties to set
|
|
87071
|
-
*/
|
|
87072
|
-
function UserMessageBrazePushNotificationScheduled(properties) {
|
|
87073
|
-
this.userMessage = [];
|
|
87074
|
-
if (properties)
|
|
87075
|
-
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
87076
|
-
if (properties[keys[i]] != null)
|
|
87077
|
-
this[keys[i]] = properties[keys[i]];
|
|
87078
|
-
}
|
|
87079
|
-
|
|
87080
|
-
/**
|
|
87081
|
-
* UserMessageBrazePushNotificationScheduled brazeCanvasId.
|
|
87082
|
-
* @member {string} brazeCanvasId
|
|
87083
|
-
* @memberof UserMessageBrazePushNotificationScheduled
|
|
87084
|
-
* @instance
|
|
87085
|
-
*/
|
|
87086
|
-
UserMessageBrazePushNotificationScheduled.prototype.brazeCanvasId = "";
|
|
87087
|
-
|
|
87088
|
-
/**
|
|
87089
|
-
* UserMessageBrazePushNotificationScheduled messageScheduleTimestamp.
|
|
87090
|
-
* @member {number|Long} messageScheduleTimestamp
|
|
87091
|
-
* @memberof UserMessageBrazePushNotificationScheduled
|
|
87092
|
-
* @instance
|
|
87093
|
-
*/
|
|
87094
|
-
UserMessageBrazePushNotificationScheduled.prototype.messageScheduleTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
87095
|
-
|
|
87096
|
-
/**
|
|
87097
|
-
* UserMessageBrazePushNotificationScheduled userMessage.
|
|
87098
|
-
* @member {Array.<IUserMessageBrazePushNotification>} userMessage
|
|
87099
|
-
* @memberof UserMessageBrazePushNotificationScheduled
|
|
87100
|
-
* @instance
|
|
87101
|
-
*/
|
|
87102
|
-
UserMessageBrazePushNotificationScheduled.prototype.userMessage = $util.emptyArray;
|
|
87103
|
-
|
|
87104
|
-
/**
|
|
87105
|
-
* Creates a new UserMessageBrazePushNotificationScheduled instance using the specified properties.
|
|
87106
|
-
* @function create
|
|
87107
|
-
* @memberof UserMessageBrazePushNotificationScheduled
|
|
87108
|
-
* @static
|
|
87109
|
-
* @param {IUserMessageBrazePushNotificationScheduled=} [properties] Properties to set
|
|
87110
|
-
* @returns {UserMessageBrazePushNotificationScheduled} UserMessageBrazePushNotificationScheduled instance
|
|
87111
|
-
*/
|
|
87112
|
-
UserMessageBrazePushNotificationScheduled.create = function create(properties) {
|
|
87113
|
-
return new UserMessageBrazePushNotificationScheduled(properties);
|
|
87114
|
-
};
|
|
87115
|
-
|
|
87116
|
-
/**
|
|
87117
|
-
* Encodes the specified UserMessageBrazePushNotificationScheduled message. Does not implicitly {@link UserMessageBrazePushNotificationScheduled.verify|verify} messages.
|
|
87118
|
-
* @function encode
|
|
87119
|
-
* @memberof UserMessageBrazePushNotificationScheduled
|
|
87120
|
-
* @static
|
|
87121
|
-
* @param {IUserMessageBrazePushNotificationScheduled} message UserMessageBrazePushNotificationScheduled message or plain object to encode
|
|
87122
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
87123
|
-
* @returns {$protobuf.Writer} Writer
|
|
87124
|
-
*/
|
|
87125
|
-
UserMessageBrazePushNotificationScheduled.encode = function encode(message, writer) {
|
|
87126
|
-
if (!writer)
|
|
87127
|
-
writer = $Writer.create();
|
|
87128
|
-
if (message.brazeCanvasId != null && message.hasOwnProperty("brazeCanvasId"))
|
|
87129
|
-
writer.uint32(/* id 1, wireType 2 =*/10).string(message.brazeCanvasId);
|
|
87130
|
-
if (message.messageScheduleTimestamp != null && message.hasOwnProperty("messageScheduleTimestamp"))
|
|
87131
|
-
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.messageScheduleTimestamp);
|
|
87132
|
-
if (message.userMessage != null && message.userMessage.length)
|
|
87133
|
-
for (var i = 0; i < message.userMessage.length; ++i)
|
|
87134
|
-
$root.UserMessageBrazePushNotification.encode(message.userMessage[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
87135
|
-
return writer;
|
|
87136
|
-
};
|
|
87137
|
-
|
|
87138
|
-
/**
|
|
87139
|
-
* Encodes the specified UserMessageBrazePushNotificationScheduled message, length delimited. Does not implicitly {@link UserMessageBrazePushNotificationScheduled.verify|verify} messages.
|
|
87140
|
-
* @function encodeDelimited
|
|
87141
|
-
* @memberof UserMessageBrazePushNotificationScheduled
|
|
87142
|
-
* @static
|
|
87143
|
-
* @param {IUserMessageBrazePushNotificationScheduled} message UserMessageBrazePushNotificationScheduled message or plain object to encode
|
|
87144
|
-
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
87145
|
-
* @returns {$protobuf.Writer} Writer
|
|
87146
|
-
*/
|
|
87147
|
-
UserMessageBrazePushNotificationScheduled.encodeDelimited = function encodeDelimited(message, writer) {
|
|
87148
|
-
return this.encode(message, writer).ldelim();
|
|
87149
|
-
};
|
|
87150
|
-
|
|
87151
|
-
/**
|
|
87152
|
-
* Decodes a UserMessageBrazePushNotificationScheduled message from the specified reader or buffer.
|
|
87153
|
-
* @function decode
|
|
87154
|
-
* @memberof UserMessageBrazePushNotificationScheduled
|
|
87155
|
-
* @static
|
|
87156
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
87157
|
-
* @param {number} [length] Message length if known beforehand
|
|
87158
|
-
* @returns {UserMessageBrazePushNotificationScheduled} UserMessageBrazePushNotificationScheduled
|
|
87159
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
87160
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
87161
|
-
*/
|
|
87162
|
-
UserMessageBrazePushNotificationScheduled.decode = function decode(reader, length) {
|
|
87163
|
-
if (!(reader instanceof $Reader))
|
|
87164
|
-
reader = $Reader.create(reader);
|
|
87165
|
-
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserMessageBrazePushNotificationScheduled();
|
|
87166
|
-
while (reader.pos < end) {
|
|
87167
|
-
var tag = reader.uint32();
|
|
87168
|
-
switch (tag >>> 3) {
|
|
87169
|
-
case 1:
|
|
87170
|
-
message.brazeCanvasId = reader.string();
|
|
87171
|
-
break;
|
|
87172
|
-
case 2:
|
|
87173
|
-
message.messageScheduleTimestamp = reader.uint64();
|
|
87174
|
-
break;
|
|
87175
|
-
case 3:
|
|
87176
|
-
if (!(message.userMessage && message.userMessage.length))
|
|
87177
|
-
message.userMessage = [];
|
|
87178
|
-
message.userMessage.push($root.UserMessageBrazePushNotification.decode(reader, reader.uint32()));
|
|
87179
|
-
break;
|
|
87180
|
-
default:
|
|
87181
|
-
reader.skipType(tag & 7);
|
|
87182
|
-
break;
|
|
87183
|
-
}
|
|
87184
|
-
}
|
|
87185
|
-
return message;
|
|
87186
|
-
};
|
|
87187
|
-
|
|
87188
|
-
/**
|
|
87189
|
-
* Decodes a UserMessageBrazePushNotificationScheduled message from the specified reader or buffer, length delimited.
|
|
87190
|
-
* @function decodeDelimited
|
|
87191
|
-
* @memberof UserMessageBrazePushNotificationScheduled
|
|
87192
|
-
* @static
|
|
87193
|
-
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
87194
|
-
* @returns {UserMessageBrazePushNotificationScheduled} UserMessageBrazePushNotificationScheduled
|
|
87195
|
-
* @throws {Error} If the payload is not a reader or valid buffer
|
|
87196
|
-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
87197
|
-
*/
|
|
87198
|
-
UserMessageBrazePushNotificationScheduled.decodeDelimited = function decodeDelimited(reader) {
|
|
87199
|
-
if (!(reader instanceof $Reader))
|
|
87200
|
-
reader = new $Reader(reader);
|
|
87201
|
-
return this.decode(reader, reader.uint32());
|
|
87202
|
-
};
|
|
87203
|
-
|
|
87204
|
-
/**
|
|
87205
|
-
* Verifies a UserMessageBrazePushNotificationScheduled message.
|
|
87206
|
-
* @function verify
|
|
87207
|
-
* @memberof UserMessageBrazePushNotificationScheduled
|
|
87208
|
-
* @static
|
|
87209
|
-
* @param {Object.<string,*>} message Plain object to verify
|
|
87210
|
-
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
87211
|
-
*/
|
|
87212
|
-
UserMessageBrazePushNotificationScheduled.verify = function verify(message) {
|
|
87213
|
-
if (typeof message !== "object" || message === null)
|
|
87214
|
-
return "object expected";
|
|
87215
|
-
if (message.brazeCanvasId != null && message.hasOwnProperty("brazeCanvasId"))
|
|
87216
|
-
if (!$util.isString(message.brazeCanvasId))
|
|
87217
|
-
return "brazeCanvasId: string expected";
|
|
87218
|
-
if (message.messageScheduleTimestamp != null && message.hasOwnProperty("messageScheduleTimestamp"))
|
|
87219
|
-
if (!$util.isInteger(message.messageScheduleTimestamp) && !(message.messageScheduleTimestamp && $util.isInteger(message.messageScheduleTimestamp.low) && $util.isInteger(message.messageScheduleTimestamp.high)))
|
|
87220
|
-
return "messageScheduleTimestamp: integer|Long expected";
|
|
87221
|
-
if (message.userMessage != null && message.hasOwnProperty("userMessage")) {
|
|
87222
|
-
if (!Array.isArray(message.userMessage))
|
|
87223
|
-
return "userMessage: array expected";
|
|
87224
|
-
for (var i = 0; i < message.userMessage.length; ++i) {
|
|
87225
|
-
var error = $root.UserMessageBrazePushNotification.verify(message.userMessage[i]);
|
|
87226
|
-
if (error)
|
|
87227
|
-
return "userMessage." + error;
|
|
87228
|
-
}
|
|
87229
|
-
}
|
|
87230
|
-
return null;
|
|
87231
|
-
};
|
|
87232
|
-
|
|
87233
|
-
/**
|
|
87234
|
-
* Creates a UserMessageBrazePushNotificationScheduled message from a plain object. Also converts values to their respective internal types.
|
|
87235
|
-
* @function fromObject
|
|
87236
|
-
* @memberof UserMessageBrazePushNotificationScheduled
|
|
87237
|
-
* @static
|
|
87238
|
-
* @param {Object.<string,*>} object Plain object
|
|
87239
|
-
* @returns {UserMessageBrazePushNotificationScheduled} UserMessageBrazePushNotificationScheduled
|
|
87240
|
-
*/
|
|
87241
|
-
UserMessageBrazePushNotificationScheduled.fromObject = function fromObject(object) {
|
|
87242
|
-
if (object instanceof $root.UserMessageBrazePushNotificationScheduled)
|
|
87243
|
-
return object;
|
|
87244
|
-
var message = new $root.UserMessageBrazePushNotificationScheduled();
|
|
87245
|
-
if (object.brazeCanvasId != null)
|
|
87246
|
-
message.brazeCanvasId = String(object.brazeCanvasId);
|
|
87247
|
-
if (object.messageScheduleTimestamp != null)
|
|
87248
|
-
if ($util.Long)
|
|
87249
|
-
(message.messageScheduleTimestamp = $util.Long.fromValue(object.messageScheduleTimestamp)).unsigned = true;
|
|
87250
|
-
else if (typeof object.messageScheduleTimestamp === "string")
|
|
87251
|
-
message.messageScheduleTimestamp = parseInt(object.messageScheduleTimestamp, 10);
|
|
87252
|
-
else if (typeof object.messageScheduleTimestamp === "number")
|
|
87253
|
-
message.messageScheduleTimestamp = object.messageScheduleTimestamp;
|
|
87254
|
-
else if (typeof object.messageScheduleTimestamp === "object")
|
|
87255
|
-
message.messageScheduleTimestamp = new $util.LongBits(object.messageScheduleTimestamp.low >>> 0, object.messageScheduleTimestamp.high >>> 0).toNumber(true);
|
|
87256
|
-
if (object.userMessage) {
|
|
87257
|
-
if (!Array.isArray(object.userMessage))
|
|
87258
|
-
throw TypeError(".UserMessageBrazePushNotificationScheduled.userMessage: array expected");
|
|
87259
|
-
message.userMessage = [];
|
|
87260
|
-
for (var i = 0; i < object.userMessage.length; ++i) {
|
|
87261
|
-
if (typeof object.userMessage[i] !== "object")
|
|
87262
|
-
throw TypeError(".UserMessageBrazePushNotificationScheduled.userMessage: object expected");
|
|
87263
|
-
message.userMessage[i] = $root.UserMessageBrazePushNotification.fromObject(object.userMessage[i]);
|
|
87264
|
-
}
|
|
87265
|
-
}
|
|
87266
|
-
return message;
|
|
87267
|
-
};
|
|
87268
|
-
|
|
87269
|
-
/**
|
|
87270
|
-
* Creates a plain object from a UserMessageBrazePushNotificationScheduled message. Also converts values to other types if specified.
|
|
87271
|
-
* @function toObject
|
|
87272
|
-
* @memberof UserMessageBrazePushNotificationScheduled
|
|
87273
|
-
* @static
|
|
87274
|
-
* @param {UserMessageBrazePushNotificationScheduled} message UserMessageBrazePushNotificationScheduled
|
|
87275
|
-
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
87276
|
-
* @returns {Object.<string,*>} Plain object
|
|
87277
|
-
*/
|
|
87278
|
-
UserMessageBrazePushNotificationScheduled.toObject = function toObject(message, options) {
|
|
87279
|
-
if (!options)
|
|
87280
|
-
options = {};
|
|
87281
|
-
var object = {};
|
|
87282
|
-
if (options.arrays || options.defaults)
|
|
87283
|
-
object.userMessage = [];
|
|
87284
|
-
if (options.defaults) {
|
|
87285
|
-
object.brazeCanvasId = "";
|
|
87286
|
-
if ($util.Long) {
|
|
87287
|
-
var long = new $util.Long(0, 0, true);
|
|
87288
|
-
object.messageScheduleTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
87289
|
-
} else
|
|
87290
|
-
object.messageScheduleTimestamp = options.longs === String ? "0" : 0;
|
|
87291
|
-
}
|
|
87292
|
-
if (message.brazeCanvasId != null && message.hasOwnProperty("brazeCanvasId"))
|
|
87293
|
-
object.brazeCanvasId = message.brazeCanvasId;
|
|
87294
|
-
if (message.messageScheduleTimestamp != null && message.hasOwnProperty("messageScheduleTimestamp"))
|
|
87295
|
-
if (typeof message.messageScheduleTimestamp === "number")
|
|
87296
|
-
object.messageScheduleTimestamp = options.longs === String ? String(message.messageScheduleTimestamp) : message.messageScheduleTimestamp;
|
|
87297
|
-
else
|
|
87298
|
-
object.messageScheduleTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.messageScheduleTimestamp) : options.longs === Number ? new $util.LongBits(message.messageScheduleTimestamp.low >>> 0, message.messageScheduleTimestamp.high >>> 0).toNumber(true) : message.messageScheduleTimestamp;
|
|
87299
|
-
if (message.userMessage && message.userMessage.length) {
|
|
87300
|
-
object.userMessage = [];
|
|
87301
|
-
for (var j = 0; j < message.userMessage.length; ++j)
|
|
87302
|
-
object.userMessage[j] = $root.UserMessageBrazePushNotification.toObject(message.userMessage[j], options);
|
|
87303
|
-
}
|
|
87304
|
-
return object;
|
|
87305
|
-
};
|
|
87306
|
-
|
|
87307
|
-
/**
|
|
87308
|
-
* Converts this UserMessageBrazePushNotificationScheduled to JSON.
|
|
87309
|
-
* @function toJSON
|
|
87310
|
-
* @memberof UserMessageBrazePushNotificationScheduled
|
|
87311
|
-
* @instance
|
|
87312
|
-
* @returns {Object.<string,*>} JSON object
|
|
87313
|
-
*/
|
|
87314
|
-
UserMessageBrazePushNotificationScheduled.prototype.toJSON = function toJSON() {
|
|
87315
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
87316
|
-
};
|
|
87317
|
-
|
|
87318
|
-
return UserMessageBrazePushNotificationScheduled;
|
|
87319
|
-
})();
|
|
87320
|
-
|
|
87321
86799
|
$root.UserBatchPredictionsGenerated = (function() {
|
|
87322
86800
|
|
|
87323
86801
|
/**
|
|
@@ -96146,6 +95624,7 @@ $root.ElfRecordPresent = (function() {
|
|
|
96146
95624
|
* @property {string|null} [rootOrgId] ElfRecordPresent rootOrgId
|
|
96147
95625
|
* @property {boolean|null} [isMemberMigrated] ElfRecordPresent isMemberMigrated
|
|
96148
95626
|
* @property {string|null} [priorB2bOrgId] ElfRecordPresent priorB2bOrgId
|
|
95627
|
+
* @property {string|null} [location] ElfRecordPresent location
|
|
96149
95628
|
* @property {boolean|null} [isDryRun] ElfRecordPresent isDryRun
|
|
96150
95629
|
* @property {boolean|null} [gingerShouldProcess] ElfRecordPresent gingerShouldProcess
|
|
96151
95630
|
* @property {boolean|null} [headspaceShouldProcess] ElfRecordPresent headspaceShouldProcess
|
|
@@ -96352,6 +95831,14 @@ $root.ElfRecordPresent = (function() {
|
|
|
96352
95831
|
*/
|
|
96353
95832
|
ElfRecordPresent.prototype.priorB2bOrgId = "";
|
|
96354
95833
|
|
|
95834
|
+
/**
|
|
95835
|
+
* ElfRecordPresent location.
|
|
95836
|
+
* @member {string} location
|
|
95837
|
+
* @memberof ElfRecordPresent
|
|
95838
|
+
* @instance
|
|
95839
|
+
*/
|
|
95840
|
+
ElfRecordPresent.prototype.location = "";
|
|
95841
|
+
|
|
96355
95842
|
/**
|
|
96356
95843
|
* ElfRecordPresent isDryRun.
|
|
96357
95844
|
* @member {boolean} isDryRun
|
|
@@ -96466,6 +95953,8 @@ $root.ElfRecordPresent = (function() {
|
|
|
96466
95953
|
writer.uint32(/* id 26, wireType 0 =*/208).bool(message.isMemberMigrated);
|
|
96467
95954
|
if (message.priorB2bOrgId != null && message.hasOwnProperty("priorB2bOrgId"))
|
|
96468
95955
|
writer.uint32(/* id 27, wireType 2 =*/218).string(message.priorB2bOrgId);
|
|
95956
|
+
if (message.location != null && message.hasOwnProperty("location"))
|
|
95957
|
+
writer.uint32(/* id 28, wireType 2 =*/226).string(message.location);
|
|
96469
95958
|
return writer;
|
|
96470
95959
|
};
|
|
96471
95960
|
|
|
@@ -96576,6 +96065,9 @@ $root.ElfRecordPresent = (function() {
|
|
|
96576
96065
|
case 27:
|
|
96577
96066
|
message.priorB2bOrgId = reader.string();
|
|
96578
96067
|
break;
|
|
96068
|
+
case 28:
|
|
96069
|
+
message.location = reader.string();
|
|
96070
|
+
break;
|
|
96579
96071
|
case 18:
|
|
96580
96072
|
message.isDryRun = reader.bool();
|
|
96581
96073
|
break;
|
|
@@ -96707,6 +96199,9 @@ $root.ElfRecordPresent = (function() {
|
|
|
96707
96199
|
if (message.priorB2bOrgId != null && message.hasOwnProperty("priorB2bOrgId"))
|
|
96708
96200
|
if (!$util.isString(message.priorB2bOrgId))
|
|
96709
96201
|
return "priorB2bOrgId: string expected";
|
|
96202
|
+
if (message.location != null && message.hasOwnProperty("location"))
|
|
96203
|
+
if (!$util.isString(message.location))
|
|
96204
|
+
return "location: string expected";
|
|
96710
96205
|
if (message.isDryRun != null && message.hasOwnProperty("isDryRun"))
|
|
96711
96206
|
if (typeof message.isDryRun !== "boolean")
|
|
96712
96207
|
return "isDryRun: boolean expected";
|
|
@@ -96814,6 +96309,8 @@ $root.ElfRecordPresent = (function() {
|
|
|
96814
96309
|
message.isMemberMigrated = Boolean(object.isMemberMigrated);
|
|
96815
96310
|
if (object.priorB2bOrgId != null)
|
|
96816
96311
|
message.priorB2bOrgId = String(object.priorB2bOrgId);
|
|
96312
|
+
if (object.location != null)
|
|
96313
|
+
message.location = String(object.location);
|
|
96817
96314
|
if (object.isDryRun != null)
|
|
96818
96315
|
message.isDryRun = Boolean(object.isDryRun);
|
|
96819
96316
|
if (object.gingerShouldProcess != null)
|
|
@@ -96871,6 +96368,7 @@ $root.ElfRecordPresent = (function() {
|
|
|
96871
96368
|
object.rootOrgId = "";
|
|
96872
96369
|
object.isMemberMigrated = false;
|
|
96873
96370
|
object.priorB2bOrgId = "";
|
|
96371
|
+
object.location = "";
|
|
96874
96372
|
}
|
|
96875
96373
|
if (message.headspaceHealthOrgId != null && message.hasOwnProperty("headspaceHealthOrgId"))
|
|
96876
96374
|
object.headspaceHealthOrgId = message.headspaceHealthOrgId;
|
|
@@ -96932,6 +96430,8 @@ $root.ElfRecordPresent = (function() {
|
|
|
96932
96430
|
object.isMemberMigrated = message.isMemberMigrated;
|
|
96933
96431
|
if (message.priorB2bOrgId != null && message.hasOwnProperty("priorB2bOrgId"))
|
|
96934
96432
|
object.priorB2bOrgId = message.priorB2bOrgId;
|
|
96433
|
+
if (message.location != null && message.hasOwnProperty("location"))
|
|
96434
|
+
object.location = message.location;
|
|
96935
96435
|
return object;
|
|
96936
96436
|
};
|
|
96937
96437
|
|
|
@@ -133762,6 +133262,554 @@ $root.UserConsentUpdated = (function() {
|
|
|
133762
133262
|
return UserConsentUpdated;
|
|
133763
133263
|
})();
|
|
133764
133264
|
|
|
133265
|
+
/**
|
|
133266
|
+
* DeliveryPlatformProvider enum.
|
|
133267
|
+
* @name DeliveryPlatformProvider
|
|
133268
|
+
* @enum {string}
|
|
133269
|
+
* @property {number} DELIVERY_PLATFORM_UNKNOWN=0 DELIVERY_PLATFORM_UNKNOWN value
|
|
133270
|
+
* @property {number} DELIVERY_PLATFORM_BRAZE=1 DELIVERY_PLATFORM_BRAZE value
|
|
133271
|
+
*/
|
|
133272
|
+
$root.DeliveryPlatformProvider = (function() {
|
|
133273
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
133274
|
+
values[valuesById[0] = "DELIVERY_PLATFORM_UNKNOWN"] = 0;
|
|
133275
|
+
values[valuesById[1] = "DELIVERY_PLATFORM_BRAZE"] = 1;
|
|
133276
|
+
return values;
|
|
133277
|
+
})();
|
|
133278
|
+
|
|
133279
|
+
$root.UserMessageDeliveryScheduledEvent = (function() {
|
|
133280
|
+
|
|
133281
|
+
/**
|
|
133282
|
+
* Properties of a UserMessageDeliveryScheduledEvent.
|
|
133283
|
+
* @name IUserMessageDeliveryScheduledEvent
|
|
133284
|
+
* @interface IUserMessageDeliveryScheduledEvent
|
|
133285
|
+
* @property {number|Long|null} [messageScheduleTimestamp] UserMessageDeliveryScheduledEvent messageScheduleTimestamp
|
|
133286
|
+
* @property {string|null} [deliveryPlatformId] UserMessageDeliveryScheduledEvent deliveryPlatformId
|
|
133287
|
+
* @property {DeliveryPlatformProvider|null} [deliveryPlatformProvider] UserMessageDeliveryScheduledEvent deliveryPlatformProvider
|
|
133288
|
+
* @property {Array.<IUserMessageNotification>|null} [userMessageNotifications] UserMessageDeliveryScheduledEvent userMessageNotifications
|
|
133289
|
+
*/
|
|
133290
|
+
|
|
133291
|
+
/**
|
|
133292
|
+
* Constructs a new UserMessageDeliveryScheduledEvent.
|
|
133293
|
+
* @name UserMessageDeliveryScheduledEvent
|
|
133294
|
+
* @classdesc Represents a UserMessageDeliveryScheduledEvent.
|
|
133295
|
+
* @implements IUserMessageDeliveryScheduledEvent
|
|
133296
|
+
* @constructor
|
|
133297
|
+
* @param {IUserMessageDeliveryScheduledEvent=} [properties] Properties to set
|
|
133298
|
+
*/
|
|
133299
|
+
function UserMessageDeliveryScheduledEvent(properties) {
|
|
133300
|
+
this.userMessageNotifications = [];
|
|
133301
|
+
if (properties)
|
|
133302
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
133303
|
+
if (properties[keys[i]] != null)
|
|
133304
|
+
this[keys[i]] = properties[keys[i]];
|
|
133305
|
+
}
|
|
133306
|
+
|
|
133307
|
+
/**
|
|
133308
|
+
* UserMessageDeliveryScheduledEvent messageScheduleTimestamp.
|
|
133309
|
+
* @member {number|Long} messageScheduleTimestamp
|
|
133310
|
+
* @memberof UserMessageDeliveryScheduledEvent
|
|
133311
|
+
* @instance
|
|
133312
|
+
*/
|
|
133313
|
+
UserMessageDeliveryScheduledEvent.prototype.messageScheduleTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
133314
|
+
|
|
133315
|
+
/**
|
|
133316
|
+
* UserMessageDeliveryScheduledEvent deliveryPlatformId.
|
|
133317
|
+
* @member {string} deliveryPlatformId
|
|
133318
|
+
* @memberof UserMessageDeliveryScheduledEvent
|
|
133319
|
+
* @instance
|
|
133320
|
+
*/
|
|
133321
|
+
UserMessageDeliveryScheduledEvent.prototype.deliveryPlatformId = "";
|
|
133322
|
+
|
|
133323
|
+
/**
|
|
133324
|
+
* UserMessageDeliveryScheduledEvent deliveryPlatformProvider.
|
|
133325
|
+
* @member {DeliveryPlatformProvider} deliveryPlatformProvider
|
|
133326
|
+
* @memberof UserMessageDeliveryScheduledEvent
|
|
133327
|
+
* @instance
|
|
133328
|
+
*/
|
|
133329
|
+
UserMessageDeliveryScheduledEvent.prototype.deliveryPlatformProvider = 0;
|
|
133330
|
+
|
|
133331
|
+
/**
|
|
133332
|
+
* UserMessageDeliveryScheduledEvent userMessageNotifications.
|
|
133333
|
+
* @member {Array.<IUserMessageNotification>} userMessageNotifications
|
|
133334
|
+
* @memberof UserMessageDeliveryScheduledEvent
|
|
133335
|
+
* @instance
|
|
133336
|
+
*/
|
|
133337
|
+
UserMessageDeliveryScheduledEvent.prototype.userMessageNotifications = $util.emptyArray;
|
|
133338
|
+
|
|
133339
|
+
/**
|
|
133340
|
+
* Creates a new UserMessageDeliveryScheduledEvent instance using the specified properties.
|
|
133341
|
+
* @function create
|
|
133342
|
+
* @memberof UserMessageDeliveryScheduledEvent
|
|
133343
|
+
* @static
|
|
133344
|
+
* @param {IUserMessageDeliveryScheduledEvent=} [properties] Properties to set
|
|
133345
|
+
* @returns {UserMessageDeliveryScheduledEvent} UserMessageDeliveryScheduledEvent instance
|
|
133346
|
+
*/
|
|
133347
|
+
UserMessageDeliveryScheduledEvent.create = function create(properties) {
|
|
133348
|
+
return new UserMessageDeliveryScheduledEvent(properties);
|
|
133349
|
+
};
|
|
133350
|
+
|
|
133351
|
+
/**
|
|
133352
|
+
* Encodes the specified UserMessageDeliveryScheduledEvent message. Does not implicitly {@link UserMessageDeliveryScheduledEvent.verify|verify} messages.
|
|
133353
|
+
* @function encode
|
|
133354
|
+
* @memberof UserMessageDeliveryScheduledEvent
|
|
133355
|
+
* @static
|
|
133356
|
+
* @param {IUserMessageDeliveryScheduledEvent} message UserMessageDeliveryScheduledEvent message or plain object to encode
|
|
133357
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
133358
|
+
* @returns {$protobuf.Writer} Writer
|
|
133359
|
+
*/
|
|
133360
|
+
UserMessageDeliveryScheduledEvent.encode = function encode(message, writer) {
|
|
133361
|
+
if (!writer)
|
|
133362
|
+
writer = $Writer.create();
|
|
133363
|
+
if (message.messageScheduleTimestamp != null && message.hasOwnProperty("messageScheduleTimestamp"))
|
|
133364
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.messageScheduleTimestamp);
|
|
133365
|
+
if (message.deliveryPlatformId != null && message.hasOwnProperty("deliveryPlatformId"))
|
|
133366
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.deliveryPlatformId);
|
|
133367
|
+
if (message.deliveryPlatformProvider != null && message.hasOwnProperty("deliveryPlatformProvider"))
|
|
133368
|
+
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.deliveryPlatformProvider);
|
|
133369
|
+
if (message.userMessageNotifications != null && message.userMessageNotifications.length)
|
|
133370
|
+
for (var i = 0; i < message.userMessageNotifications.length; ++i)
|
|
133371
|
+
$root.UserMessageNotification.encode(message.userMessageNotifications[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
133372
|
+
return writer;
|
|
133373
|
+
};
|
|
133374
|
+
|
|
133375
|
+
/**
|
|
133376
|
+
* Encodes the specified UserMessageDeliveryScheduledEvent message, length delimited. Does not implicitly {@link UserMessageDeliveryScheduledEvent.verify|verify} messages.
|
|
133377
|
+
* @function encodeDelimited
|
|
133378
|
+
* @memberof UserMessageDeliveryScheduledEvent
|
|
133379
|
+
* @static
|
|
133380
|
+
* @param {IUserMessageDeliveryScheduledEvent} message UserMessageDeliveryScheduledEvent message or plain object to encode
|
|
133381
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
133382
|
+
* @returns {$protobuf.Writer} Writer
|
|
133383
|
+
*/
|
|
133384
|
+
UserMessageDeliveryScheduledEvent.encodeDelimited = function encodeDelimited(message, writer) {
|
|
133385
|
+
return this.encode(message, writer).ldelim();
|
|
133386
|
+
};
|
|
133387
|
+
|
|
133388
|
+
/**
|
|
133389
|
+
* Decodes a UserMessageDeliveryScheduledEvent message from the specified reader or buffer.
|
|
133390
|
+
* @function decode
|
|
133391
|
+
* @memberof UserMessageDeliveryScheduledEvent
|
|
133392
|
+
* @static
|
|
133393
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
133394
|
+
* @param {number} [length] Message length if known beforehand
|
|
133395
|
+
* @returns {UserMessageDeliveryScheduledEvent} UserMessageDeliveryScheduledEvent
|
|
133396
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
133397
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
133398
|
+
*/
|
|
133399
|
+
UserMessageDeliveryScheduledEvent.decode = function decode(reader, length) {
|
|
133400
|
+
if (!(reader instanceof $Reader))
|
|
133401
|
+
reader = $Reader.create(reader);
|
|
133402
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserMessageDeliveryScheduledEvent();
|
|
133403
|
+
while (reader.pos < end) {
|
|
133404
|
+
var tag = reader.uint32();
|
|
133405
|
+
switch (tag >>> 3) {
|
|
133406
|
+
case 1:
|
|
133407
|
+
message.messageScheduleTimestamp = reader.uint64();
|
|
133408
|
+
break;
|
|
133409
|
+
case 2:
|
|
133410
|
+
message.deliveryPlatformId = reader.string();
|
|
133411
|
+
break;
|
|
133412
|
+
case 3:
|
|
133413
|
+
message.deliveryPlatformProvider = reader.int32();
|
|
133414
|
+
break;
|
|
133415
|
+
case 4:
|
|
133416
|
+
if (!(message.userMessageNotifications && message.userMessageNotifications.length))
|
|
133417
|
+
message.userMessageNotifications = [];
|
|
133418
|
+
message.userMessageNotifications.push($root.UserMessageNotification.decode(reader, reader.uint32()));
|
|
133419
|
+
break;
|
|
133420
|
+
default:
|
|
133421
|
+
reader.skipType(tag & 7);
|
|
133422
|
+
break;
|
|
133423
|
+
}
|
|
133424
|
+
}
|
|
133425
|
+
return message;
|
|
133426
|
+
};
|
|
133427
|
+
|
|
133428
|
+
/**
|
|
133429
|
+
* Decodes a UserMessageDeliveryScheduledEvent message from the specified reader or buffer, length delimited.
|
|
133430
|
+
* @function decodeDelimited
|
|
133431
|
+
* @memberof UserMessageDeliveryScheduledEvent
|
|
133432
|
+
* @static
|
|
133433
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
133434
|
+
* @returns {UserMessageDeliveryScheduledEvent} UserMessageDeliveryScheduledEvent
|
|
133435
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
133436
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
133437
|
+
*/
|
|
133438
|
+
UserMessageDeliveryScheduledEvent.decodeDelimited = function decodeDelimited(reader) {
|
|
133439
|
+
if (!(reader instanceof $Reader))
|
|
133440
|
+
reader = new $Reader(reader);
|
|
133441
|
+
return this.decode(reader, reader.uint32());
|
|
133442
|
+
};
|
|
133443
|
+
|
|
133444
|
+
/**
|
|
133445
|
+
* Verifies a UserMessageDeliveryScheduledEvent message.
|
|
133446
|
+
* @function verify
|
|
133447
|
+
* @memberof UserMessageDeliveryScheduledEvent
|
|
133448
|
+
* @static
|
|
133449
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
133450
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
133451
|
+
*/
|
|
133452
|
+
UserMessageDeliveryScheduledEvent.verify = function verify(message) {
|
|
133453
|
+
if (typeof message !== "object" || message === null)
|
|
133454
|
+
return "object expected";
|
|
133455
|
+
if (message.messageScheduleTimestamp != null && message.hasOwnProperty("messageScheduleTimestamp"))
|
|
133456
|
+
if (!$util.isInteger(message.messageScheduleTimestamp) && !(message.messageScheduleTimestamp && $util.isInteger(message.messageScheduleTimestamp.low) && $util.isInteger(message.messageScheduleTimestamp.high)))
|
|
133457
|
+
return "messageScheduleTimestamp: integer|Long expected";
|
|
133458
|
+
if (message.deliveryPlatformId != null && message.hasOwnProperty("deliveryPlatformId"))
|
|
133459
|
+
if (!$util.isString(message.deliveryPlatformId))
|
|
133460
|
+
return "deliveryPlatformId: string expected";
|
|
133461
|
+
if (message.deliveryPlatformProvider != null && message.hasOwnProperty("deliveryPlatformProvider"))
|
|
133462
|
+
switch (message.deliveryPlatformProvider) {
|
|
133463
|
+
default:
|
|
133464
|
+
return "deliveryPlatformProvider: enum value expected";
|
|
133465
|
+
case 0:
|
|
133466
|
+
case 1:
|
|
133467
|
+
break;
|
|
133468
|
+
}
|
|
133469
|
+
if (message.userMessageNotifications != null && message.hasOwnProperty("userMessageNotifications")) {
|
|
133470
|
+
if (!Array.isArray(message.userMessageNotifications))
|
|
133471
|
+
return "userMessageNotifications: array expected";
|
|
133472
|
+
for (var i = 0; i < message.userMessageNotifications.length; ++i) {
|
|
133473
|
+
var error = $root.UserMessageNotification.verify(message.userMessageNotifications[i]);
|
|
133474
|
+
if (error)
|
|
133475
|
+
return "userMessageNotifications." + error;
|
|
133476
|
+
}
|
|
133477
|
+
}
|
|
133478
|
+
return null;
|
|
133479
|
+
};
|
|
133480
|
+
|
|
133481
|
+
/**
|
|
133482
|
+
* Creates a UserMessageDeliveryScheduledEvent message from a plain object. Also converts values to their respective internal types.
|
|
133483
|
+
* @function fromObject
|
|
133484
|
+
* @memberof UserMessageDeliveryScheduledEvent
|
|
133485
|
+
* @static
|
|
133486
|
+
* @param {Object.<string,*>} object Plain object
|
|
133487
|
+
* @returns {UserMessageDeliveryScheduledEvent} UserMessageDeliveryScheduledEvent
|
|
133488
|
+
*/
|
|
133489
|
+
UserMessageDeliveryScheduledEvent.fromObject = function fromObject(object) {
|
|
133490
|
+
if (object instanceof $root.UserMessageDeliveryScheduledEvent)
|
|
133491
|
+
return object;
|
|
133492
|
+
var message = new $root.UserMessageDeliveryScheduledEvent();
|
|
133493
|
+
if (object.messageScheduleTimestamp != null)
|
|
133494
|
+
if ($util.Long)
|
|
133495
|
+
(message.messageScheduleTimestamp = $util.Long.fromValue(object.messageScheduleTimestamp)).unsigned = true;
|
|
133496
|
+
else if (typeof object.messageScheduleTimestamp === "string")
|
|
133497
|
+
message.messageScheduleTimestamp = parseInt(object.messageScheduleTimestamp, 10);
|
|
133498
|
+
else if (typeof object.messageScheduleTimestamp === "number")
|
|
133499
|
+
message.messageScheduleTimestamp = object.messageScheduleTimestamp;
|
|
133500
|
+
else if (typeof object.messageScheduleTimestamp === "object")
|
|
133501
|
+
message.messageScheduleTimestamp = new $util.LongBits(object.messageScheduleTimestamp.low >>> 0, object.messageScheduleTimestamp.high >>> 0).toNumber(true);
|
|
133502
|
+
if (object.deliveryPlatformId != null)
|
|
133503
|
+
message.deliveryPlatformId = String(object.deliveryPlatformId);
|
|
133504
|
+
switch (object.deliveryPlatformProvider) {
|
|
133505
|
+
case "DELIVERY_PLATFORM_UNKNOWN":
|
|
133506
|
+
case 0:
|
|
133507
|
+
message.deliveryPlatformProvider = 0;
|
|
133508
|
+
break;
|
|
133509
|
+
case "DELIVERY_PLATFORM_BRAZE":
|
|
133510
|
+
case 1:
|
|
133511
|
+
message.deliveryPlatformProvider = 1;
|
|
133512
|
+
break;
|
|
133513
|
+
}
|
|
133514
|
+
if (object.userMessageNotifications) {
|
|
133515
|
+
if (!Array.isArray(object.userMessageNotifications))
|
|
133516
|
+
throw TypeError(".UserMessageDeliveryScheduledEvent.userMessageNotifications: array expected");
|
|
133517
|
+
message.userMessageNotifications = [];
|
|
133518
|
+
for (var i = 0; i < object.userMessageNotifications.length; ++i) {
|
|
133519
|
+
if (typeof object.userMessageNotifications[i] !== "object")
|
|
133520
|
+
throw TypeError(".UserMessageDeliveryScheduledEvent.userMessageNotifications: object expected");
|
|
133521
|
+
message.userMessageNotifications[i] = $root.UserMessageNotification.fromObject(object.userMessageNotifications[i]);
|
|
133522
|
+
}
|
|
133523
|
+
}
|
|
133524
|
+
return message;
|
|
133525
|
+
};
|
|
133526
|
+
|
|
133527
|
+
/**
|
|
133528
|
+
* Creates a plain object from a UserMessageDeliveryScheduledEvent message. Also converts values to other types if specified.
|
|
133529
|
+
* @function toObject
|
|
133530
|
+
* @memberof UserMessageDeliveryScheduledEvent
|
|
133531
|
+
* @static
|
|
133532
|
+
* @param {UserMessageDeliveryScheduledEvent} message UserMessageDeliveryScheduledEvent
|
|
133533
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
133534
|
+
* @returns {Object.<string,*>} Plain object
|
|
133535
|
+
*/
|
|
133536
|
+
UserMessageDeliveryScheduledEvent.toObject = function toObject(message, options) {
|
|
133537
|
+
if (!options)
|
|
133538
|
+
options = {};
|
|
133539
|
+
var object = {};
|
|
133540
|
+
if (options.arrays || options.defaults)
|
|
133541
|
+
object.userMessageNotifications = [];
|
|
133542
|
+
if (options.defaults) {
|
|
133543
|
+
if ($util.Long) {
|
|
133544
|
+
var long = new $util.Long(0, 0, true);
|
|
133545
|
+
object.messageScheduleTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
133546
|
+
} else
|
|
133547
|
+
object.messageScheduleTimestamp = options.longs === String ? "0" : 0;
|
|
133548
|
+
object.deliveryPlatformId = "";
|
|
133549
|
+
object.deliveryPlatformProvider = options.enums === String ? "DELIVERY_PLATFORM_UNKNOWN" : 0;
|
|
133550
|
+
}
|
|
133551
|
+
if (message.messageScheduleTimestamp != null && message.hasOwnProperty("messageScheduleTimestamp"))
|
|
133552
|
+
if (typeof message.messageScheduleTimestamp === "number")
|
|
133553
|
+
object.messageScheduleTimestamp = options.longs === String ? String(message.messageScheduleTimestamp) : message.messageScheduleTimestamp;
|
|
133554
|
+
else
|
|
133555
|
+
object.messageScheduleTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.messageScheduleTimestamp) : options.longs === Number ? new $util.LongBits(message.messageScheduleTimestamp.low >>> 0, message.messageScheduleTimestamp.high >>> 0).toNumber(true) : message.messageScheduleTimestamp;
|
|
133556
|
+
if (message.deliveryPlatformId != null && message.hasOwnProperty("deliveryPlatformId"))
|
|
133557
|
+
object.deliveryPlatformId = message.deliveryPlatformId;
|
|
133558
|
+
if (message.deliveryPlatformProvider != null && message.hasOwnProperty("deliveryPlatformProvider"))
|
|
133559
|
+
object.deliveryPlatformProvider = options.enums === String ? $root.DeliveryPlatformProvider[message.deliveryPlatformProvider] : message.deliveryPlatformProvider;
|
|
133560
|
+
if (message.userMessageNotifications && message.userMessageNotifications.length) {
|
|
133561
|
+
object.userMessageNotifications = [];
|
|
133562
|
+
for (var j = 0; j < message.userMessageNotifications.length; ++j)
|
|
133563
|
+
object.userMessageNotifications[j] = $root.UserMessageNotification.toObject(message.userMessageNotifications[j], options);
|
|
133564
|
+
}
|
|
133565
|
+
return object;
|
|
133566
|
+
};
|
|
133567
|
+
|
|
133568
|
+
/**
|
|
133569
|
+
* Converts this UserMessageDeliveryScheduledEvent to JSON.
|
|
133570
|
+
* @function toJSON
|
|
133571
|
+
* @memberof UserMessageDeliveryScheduledEvent
|
|
133572
|
+
* @instance
|
|
133573
|
+
* @returns {Object.<string,*>} JSON object
|
|
133574
|
+
*/
|
|
133575
|
+
UserMessageDeliveryScheduledEvent.prototype.toJSON = function toJSON() {
|
|
133576
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
133577
|
+
};
|
|
133578
|
+
|
|
133579
|
+
return UserMessageDeliveryScheduledEvent;
|
|
133580
|
+
})();
|
|
133581
|
+
|
|
133582
|
+
$root.UserMessageNotification = (function() {
|
|
133583
|
+
|
|
133584
|
+
/**
|
|
133585
|
+
* Properties of a UserMessageNotification.
|
|
133586
|
+
* @name IUserMessageNotification
|
|
133587
|
+
* @interface IUserMessageNotification
|
|
133588
|
+
* @property {string|null} [userId] UserMessageNotification userId
|
|
133589
|
+
* @property {Object.<string,string>|null} [metadata] UserMessageNotification metadata
|
|
133590
|
+
*/
|
|
133591
|
+
|
|
133592
|
+
/**
|
|
133593
|
+
* Constructs a new UserMessageNotification.
|
|
133594
|
+
* @name UserMessageNotification
|
|
133595
|
+
* @classdesc Represents a UserMessageNotification.
|
|
133596
|
+
* @implements IUserMessageNotification
|
|
133597
|
+
* @constructor
|
|
133598
|
+
* @param {IUserMessageNotification=} [properties] Properties to set
|
|
133599
|
+
*/
|
|
133600
|
+
function UserMessageNotification(properties) {
|
|
133601
|
+
this.metadata = {};
|
|
133602
|
+
if (properties)
|
|
133603
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
133604
|
+
if (properties[keys[i]] != null)
|
|
133605
|
+
this[keys[i]] = properties[keys[i]];
|
|
133606
|
+
}
|
|
133607
|
+
|
|
133608
|
+
/**
|
|
133609
|
+
* UserMessageNotification userId.
|
|
133610
|
+
* @member {string} userId
|
|
133611
|
+
* @memberof UserMessageNotification
|
|
133612
|
+
* @instance
|
|
133613
|
+
*/
|
|
133614
|
+
UserMessageNotification.prototype.userId = "";
|
|
133615
|
+
|
|
133616
|
+
/**
|
|
133617
|
+
* UserMessageNotification metadata.
|
|
133618
|
+
* @member {Object.<string,string>} metadata
|
|
133619
|
+
* @memberof UserMessageNotification
|
|
133620
|
+
* @instance
|
|
133621
|
+
*/
|
|
133622
|
+
UserMessageNotification.prototype.metadata = $util.emptyObject;
|
|
133623
|
+
|
|
133624
|
+
/**
|
|
133625
|
+
* Creates a new UserMessageNotification instance using the specified properties.
|
|
133626
|
+
* @function create
|
|
133627
|
+
* @memberof UserMessageNotification
|
|
133628
|
+
* @static
|
|
133629
|
+
* @param {IUserMessageNotification=} [properties] Properties to set
|
|
133630
|
+
* @returns {UserMessageNotification} UserMessageNotification instance
|
|
133631
|
+
*/
|
|
133632
|
+
UserMessageNotification.create = function create(properties) {
|
|
133633
|
+
return new UserMessageNotification(properties);
|
|
133634
|
+
};
|
|
133635
|
+
|
|
133636
|
+
/**
|
|
133637
|
+
* Encodes the specified UserMessageNotification message. Does not implicitly {@link UserMessageNotification.verify|verify} messages.
|
|
133638
|
+
* @function encode
|
|
133639
|
+
* @memberof UserMessageNotification
|
|
133640
|
+
* @static
|
|
133641
|
+
* @param {IUserMessageNotification} message UserMessageNotification message or plain object to encode
|
|
133642
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
133643
|
+
* @returns {$protobuf.Writer} Writer
|
|
133644
|
+
*/
|
|
133645
|
+
UserMessageNotification.encode = function encode(message, writer) {
|
|
133646
|
+
if (!writer)
|
|
133647
|
+
writer = $Writer.create();
|
|
133648
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
133649
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
|
|
133650
|
+
if (message.metadata != null && message.hasOwnProperty("metadata"))
|
|
133651
|
+
for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i)
|
|
133652
|
+
writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim();
|
|
133653
|
+
return writer;
|
|
133654
|
+
};
|
|
133655
|
+
|
|
133656
|
+
/**
|
|
133657
|
+
* Encodes the specified UserMessageNotification message, length delimited. Does not implicitly {@link UserMessageNotification.verify|verify} messages.
|
|
133658
|
+
* @function encodeDelimited
|
|
133659
|
+
* @memberof UserMessageNotification
|
|
133660
|
+
* @static
|
|
133661
|
+
* @param {IUserMessageNotification} message UserMessageNotification message or plain object to encode
|
|
133662
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
133663
|
+
* @returns {$protobuf.Writer} Writer
|
|
133664
|
+
*/
|
|
133665
|
+
UserMessageNotification.encodeDelimited = function encodeDelimited(message, writer) {
|
|
133666
|
+
return this.encode(message, writer).ldelim();
|
|
133667
|
+
};
|
|
133668
|
+
|
|
133669
|
+
/**
|
|
133670
|
+
* Decodes a UserMessageNotification message from the specified reader or buffer.
|
|
133671
|
+
* @function decode
|
|
133672
|
+
* @memberof UserMessageNotification
|
|
133673
|
+
* @static
|
|
133674
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
133675
|
+
* @param {number} [length] Message length if known beforehand
|
|
133676
|
+
* @returns {UserMessageNotification} UserMessageNotification
|
|
133677
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
133678
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
133679
|
+
*/
|
|
133680
|
+
UserMessageNotification.decode = function decode(reader, length) {
|
|
133681
|
+
if (!(reader instanceof $Reader))
|
|
133682
|
+
reader = $Reader.create(reader);
|
|
133683
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserMessageNotification(), key;
|
|
133684
|
+
while (reader.pos < end) {
|
|
133685
|
+
var tag = reader.uint32();
|
|
133686
|
+
switch (tag >>> 3) {
|
|
133687
|
+
case 1:
|
|
133688
|
+
message.userId = reader.string();
|
|
133689
|
+
break;
|
|
133690
|
+
case 2:
|
|
133691
|
+
reader.skip().pos++;
|
|
133692
|
+
if (message.metadata === $util.emptyObject)
|
|
133693
|
+
message.metadata = {};
|
|
133694
|
+
key = reader.string();
|
|
133695
|
+
reader.pos++;
|
|
133696
|
+
message.metadata[key] = reader.string();
|
|
133697
|
+
break;
|
|
133698
|
+
default:
|
|
133699
|
+
reader.skipType(tag & 7);
|
|
133700
|
+
break;
|
|
133701
|
+
}
|
|
133702
|
+
}
|
|
133703
|
+
return message;
|
|
133704
|
+
};
|
|
133705
|
+
|
|
133706
|
+
/**
|
|
133707
|
+
* Decodes a UserMessageNotification message from the specified reader or buffer, length delimited.
|
|
133708
|
+
* @function decodeDelimited
|
|
133709
|
+
* @memberof UserMessageNotification
|
|
133710
|
+
* @static
|
|
133711
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
133712
|
+
* @returns {UserMessageNotification} UserMessageNotification
|
|
133713
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
133714
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
133715
|
+
*/
|
|
133716
|
+
UserMessageNotification.decodeDelimited = function decodeDelimited(reader) {
|
|
133717
|
+
if (!(reader instanceof $Reader))
|
|
133718
|
+
reader = new $Reader(reader);
|
|
133719
|
+
return this.decode(reader, reader.uint32());
|
|
133720
|
+
};
|
|
133721
|
+
|
|
133722
|
+
/**
|
|
133723
|
+
* Verifies a UserMessageNotification message.
|
|
133724
|
+
* @function verify
|
|
133725
|
+
* @memberof UserMessageNotification
|
|
133726
|
+
* @static
|
|
133727
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
133728
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
133729
|
+
*/
|
|
133730
|
+
UserMessageNotification.verify = function verify(message) {
|
|
133731
|
+
if (typeof message !== "object" || message === null)
|
|
133732
|
+
return "object expected";
|
|
133733
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
133734
|
+
if (!$util.isString(message.userId))
|
|
133735
|
+
return "userId: string expected";
|
|
133736
|
+
if (message.metadata != null && message.hasOwnProperty("metadata")) {
|
|
133737
|
+
if (!$util.isObject(message.metadata))
|
|
133738
|
+
return "metadata: object expected";
|
|
133739
|
+
var key = Object.keys(message.metadata);
|
|
133740
|
+
for (var i = 0; i < key.length; ++i)
|
|
133741
|
+
if (!$util.isString(message.metadata[key[i]]))
|
|
133742
|
+
return "metadata: string{k:string} expected";
|
|
133743
|
+
}
|
|
133744
|
+
return null;
|
|
133745
|
+
};
|
|
133746
|
+
|
|
133747
|
+
/**
|
|
133748
|
+
* Creates a UserMessageNotification message from a plain object. Also converts values to their respective internal types.
|
|
133749
|
+
* @function fromObject
|
|
133750
|
+
* @memberof UserMessageNotification
|
|
133751
|
+
* @static
|
|
133752
|
+
* @param {Object.<string,*>} object Plain object
|
|
133753
|
+
* @returns {UserMessageNotification} UserMessageNotification
|
|
133754
|
+
*/
|
|
133755
|
+
UserMessageNotification.fromObject = function fromObject(object) {
|
|
133756
|
+
if (object instanceof $root.UserMessageNotification)
|
|
133757
|
+
return object;
|
|
133758
|
+
var message = new $root.UserMessageNotification();
|
|
133759
|
+
if (object.userId != null)
|
|
133760
|
+
message.userId = String(object.userId);
|
|
133761
|
+
if (object.metadata) {
|
|
133762
|
+
if (typeof object.metadata !== "object")
|
|
133763
|
+
throw TypeError(".UserMessageNotification.metadata: object expected");
|
|
133764
|
+
message.metadata = {};
|
|
133765
|
+
for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i)
|
|
133766
|
+
message.metadata[keys[i]] = String(object.metadata[keys[i]]);
|
|
133767
|
+
}
|
|
133768
|
+
return message;
|
|
133769
|
+
};
|
|
133770
|
+
|
|
133771
|
+
/**
|
|
133772
|
+
* Creates a plain object from a UserMessageNotification message. Also converts values to other types if specified.
|
|
133773
|
+
* @function toObject
|
|
133774
|
+
* @memberof UserMessageNotification
|
|
133775
|
+
* @static
|
|
133776
|
+
* @param {UserMessageNotification} message UserMessageNotification
|
|
133777
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
133778
|
+
* @returns {Object.<string,*>} Plain object
|
|
133779
|
+
*/
|
|
133780
|
+
UserMessageNotification.toObject = function toObject(message, options) {
|
|
133781
|
+
if (!options)
|
|
133782
|
+
options = {};
|
|
133783
|
+
var object = {};
|
|
133784
|
+
if (options.objects || options.defaults)
|
|
133785
|
+
object.metadata = {};
|
|
133786
|
+
if (options.defaults)
|
|
133787
|
+
object.userId = "";
|
|
133788
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
133789
|
+
object.userId = message.userId;
|
|
133790
|
+
var keys2;
|
|
133791
|
+
if (message.metadata && (keys2 = Object.keys(message.metadata)).length) {
|
|
133792
|
+
object.metadata = {};
|
|
133793
|
+
for (var j = 0; j < keys2.length; ++j)
|
|
133794
|
+
object.metadata[keys2[j]] = message.metadata[keys2[j]];
|
|
133795
|
+
}
|
|
133796
|
+
return object;
|
|
133797
|
+
};
|
|
133798
|
+
|
|
133799
|
+
/**
|
|
133800
|
+
* Converts this UserMessageNotification to JSON.
|
|
133801
|
+
* @function toJSON
|
|
133802
|
+
* @memberof UserMessageNotification
|
|
133803
|
+
* @instance
|
|
133804
|
+
* @returns {Object.<string,*>} JSON object
|
|
133805
|
+
*/
|
|
133806
|
+
UserMessageNotification.prototype.toJSON = function toJSON() {
|
|
133807
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
133808
|
+
};
|
|
133809
|
+
|
|
133810
|
+
return UserMessageNotification;
|
|
133811
|
+
})();
|
|
133812
|
+
|
|
133765
133813
|
$root.VirginPulseAccountLinked = (function() {
|
|
133766
133814
|
|
|
133767
133815
|
/**
|