@sellout/models 0.0.51 → 0.0.54

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.
@@ -74925,6 +74925,2142 @@ $root.FindUserByEmailResponse = (function() {
74925
74925
  return FindUserByEmailResponse;
74926
74926
  })();
74927
74927
 
74928
+ $root.AddSecondaryEmailRequest = (function() {
74929
+
74930
+ /**
74931
+ * Properties of an AddSecondaryEmailRequest.
74932
+ * @exports IAddSecondaryEmailRequest
74933
+ * @interface IAddSecondaryEmailRequest
74934
+ * @property {string|null} [spanContext] AddSecondaryEmailRequest spanContext
74935
+ * @property {string|null} [email] AddSecondaryEmailRequest email
74936
+ * @property {string|null} [userId] AddSecondaryEmailRequest userId
74937
+ */
74938
+
74939
+ /**
74940
+ * Constructs a new AddSecondaryEmailRequest.
74941
+ * @exports AddSecondaryEmailRequest
74942
+ * @classdesc Represents an AddSecondaryEmailRequest.
74943
+ * @implements IAddSecondaryEmailRequest
74944
+ * @constructor
74945
+ * @param {IAddSecondaryEmailRequest=} [properties] Properties to set
74946
+ */
74947
+ function AddSecondaryEmailRequest(properties) {
74948
+ if (properties)
74949
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
74950
+ if (properties[keys[i]] != null)
74951
+ this[keys[i]] = properties[keys[i]];
74952
+ }
74953
+
74954
+ /**
74955
+ * AddSecondaryEmailRequest spanContext.
74956
+ * @member {string} spanContext
74957
+ * @memberof AddSecondaryEmailRequest
74958
+ * @instance
74959
+ */
74960
+ AddSecondaryEmailRequest.prototype.spanContext = "";
74961
+
74962
+ /**
74963
+ * AddSecondaryEmailRequest email.
74964
+ * @member {string} email
74965
+ * @memberof AddSecondaryEmailRequest
74966
+ * @instance
74967
+ */
74968
+ AddSecondaryEmailRequest.prototype.email = "";
74969
+
74970
+ /**
74971
+ * AddSecondaryEmailRequest userId.
74972
+ * @member {string} userId
74973
+ * @memberof AddSecondaryEmailRequest
74974
+ * @instance
74975
+ */
74976
+ AddSecondaryEmailRequest.prototype.userId = "";
74977
+
74978
+ /**
74979
+ * Creates a new AddSecondaryEmailRequest instance using the specified properties.
74980
+ * @function create
74981
+ * @memberof AddSecondaryEmailRequest
74982
+ * @static
74983
+ * @param {IAddSecondaryEmailRequest=} [properties] Properties to set
74984
+ * @returns {AddSecondaryEmailRequest} AddSecondaryEmailRequest instance
74985
+ */
74986
+ AddSecondaryEmailRequest.create = function create(properties) {
74987
+ return new AddSecondaryEmailRequest(properties);
74988
+ };
74989
+
74990
+ /**
74991
+ * Encodes the specified AddSecondaryEmailRequest message. Does not implicitly {@link AddSecondaryEmailRequest.verify|verify} messages.
74992
+ * @function encode
74993
+ * @memberof AddSecondaryEmailRequest
74994
+ * @static
74995
+ * @param {IAddSecondaryEmailRequest} message AddSecondaryEmailRequest message or plain object to encode
74996
+ * @param {$protobuf.Writer} [writer] Writer to encode to
74997
+ * @returns {$protobuf.Writer} Writer
74998
+ */
74999
+ AddSecondaryEmailRequest.encode = function encode(message, writer) {
75000
+ if (!writer)
75001
+ writer = $Writer.create();
75002
+ if (message.spanContext != null && message.hasOwnProperty("spanContext"))
75003
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.spanContext);
75004
+ if (message.email != null && message.hasOwnProperty("email"))
75005
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.email);
75006
+ if (message.userId != null && message.hasOwnProperty("userId"))
75007
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.userId);
75008
+ return writer;
75009
+ };
75010
+
75011
+ /**
75012
+ * Encodes the specified AddSecondaryEmailRequest message, length delimited. Does not implicitly {@link AddSecondaryEmailRequest.verify|verify} messages.
75013
+ * @function encodeDelimited
75014
+ * @memberof AddSecondaryEmailRequest
75015
+ * @static
75016
+ * @param {IAddSecondaryEmailRequest} message AddSecondaryEmailRequest message or plain object to encode
75017
+ * @param {$protobuf.Writer} [writer] Writer to encode to
75018
+ * @returns {$protobuf.Writer} Writer
75019
+ */
75020
+ AddSecondaryEmailRequest.encodeDelimited = function encodeDelimited(message, writer) {
75021
+ return this.encode(message, writer).ldelim();
75022
+ };
75023
+
75024
+ /**
75025
+ * Decodes an AddSecondaryEmailRequest message from the specified reader or buffer.
75026
+ * @function decode
75027
+ * @memberof AddSecondaryEmailRequest
75028
+ * @static
75029
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
75030
+ * @param {number} [length] Message length if known beforehand
75031
+ * @returns {AddSecondaryEmailRequest} AddSecondaryEmailRequest
75032
+ * @throws {Error} If the payload is not a reader or valid buffer
75033
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
75034
+ */
75035
+ AddSecondaryEmailRequest.decode = function decode(reader, length) {
75036
+ if (!(reader instanceof $Reader))
75037
+ reader = $Reader.create(reader);
75038
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.AddSecondaryEmailRequest();
75039
+ while (reader.pos < end) {
75040
+ var tag = reader.uint32();
75041
+ switch (tag >>> 3) {
75042
+ case 1:
75043
+ message.spanContext = reader.string();
75044
+ break;
75045
+ case 2:
75046
+ message.email = reader.string();
75047
+ break;
75048
+ case 3:
75049
+ message.userId = reader.string();
75050
+ break;
75051
+ default:
75052
+ reader.skipType(tag & 7);
75053
+ break;
75054
+ }
75055
+ }
75056
+ return message;
75057
+ };
75058
+
75059
+ /**
75060
+ * Decodes an AddSecondaryEmailRequest message from the specified reader or buffer, length delimited.
75061
+ * @function decodeDelimited
75062
+ * @memberof AddSecondaryEmailRequest
75063
+ * @static
75064
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
75065
+ * @returns {AddSecondaryEmailRequest} AddSecondaryEmailRequest
75066
+ * @throws {Error} If the payload is not a reader or valid buffer
75067
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
75068
+ */
75069
+ AddSecondaryEmailRequest.decodeDelimited = function decodeDelimited(reader) {
75070
+ if (!(reader instanceof $Reader))
75071
+ reader = new $Reader(reader);
75072
+ return this.decode(reader, reader.uint32());
75073
+ };
75074
+
75075
+ /**
75076
+ * Verifies an AddSecondaryEmailRequest message.
75077
+ * @function verify
75078
+ * @memberof AddSecondaryEmailRequest
75079
+ * @static
75080
+ * @param {Object.<string,*>} message Plain object to verify
75081
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
75082
+ */
75083
+ AddSecondaryEmailRequest.verify = function verify(message) {
75084
+ if (typeof message !== "object" || message === null)
75085
+ return "object expected";
75086
+ if (message.spanContext != null && message.hasOwnProperty("spanContext"))
75087
+ if (!$util.isString(message.spanContext))
75088
+ return "spanContext: string expected";
75089
+ if (message.email != null && message.hasOwnProperty("email"))
75090
+ if (!$util.isString(message.email))
75091
+ return "email: string expected";
75092
+ if (message.userId != null && message.hasOwnProperty("userId"))
75093
+ if (!$util.isString(message.userId))
75094
+ return "userId: string expected";
75095
+ return null;
75096
+ };
75097
+
75098
+ /**
75099
+ * Creates an AddSecondaryEmailRequest message from a plain object. Also converts values to their respective internal types.
75100
+ * @function fromObject
75101
+ * @memberof AddSecondaryEmailRequest
75102
+ * @static
75103
+ * @param {Object.<string,*>} object Plain object
75104
+ * @returns {AddSecondaryEmailRequest} AddSecondaryEmailRequest
75105
+ */
75106
+ AddSecondaryEmailRequest.fromObject = function fromObject(object) {
75107
+ if (object instanceof $root.AddSecondaryEmailRequest)
75108
+ return object;
75109
+ var message = new $root.AddSecondaryEmailRequest();
75110
+ if (object.spanContext != null)
75111
+ message.spanContext = String(object.spanContext);
75112
+ if (object.email != null)
75113
+ message.email = String(object.email);
75114
+ if (object.userId != null)
75115
+ message.userId = String(object.userId);
75116
+ return message;
75117
+ };
75118
+
75119
+ /**
75120
+ * Creates a plain object from an AddSecondaryEmailRequest message. Also converts values to other types if specified.
75121
+ * @function toObject
75122
+ * @memberof AddSecondaryEmailRequest
75123
+ * @static
75124
+ * @param {AddSecondaryEmailRequest} message AddSecondaryEmailRequest
75125
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
75126
+ * @returns {Object.<string,*>} Plain object
75127
+ */
75128
+ AddSecondaryEmailRequest.toObject = function toObject(message, options) {
75129
+ if (!options)
75130
+ options = {};
75131
+ var object = {};
75132
+ if (options.defaults) {
75133
+ object.spanContext = "";
75134
+ object.email = "";
75135
+ object.userId = "";
75136
+ }
75137
+ if (message.spanContext != null && message.hasOwnProperty("spanContext"))
75138
+ object.spanContext = message.spanContext;
75139
+ if (message.email != null && message.hasOwnProperty("email"))
75140
+ object.email = message.email;
75141
+ if (message.userId != null && message.hasOwnProperty("userId"))
75142
+ object.userId = message.userId;
75143
+ return object;
75144
+ };
75145
+
75146
+ /**
75147
+ * Converts this AddSecondaryEmailRequest to JSON.
75148
+ * @function toJSON
75149
+ * @memberof AddSecondaryEmailRequest
75150
+ * @instance
75151
+ * @returns {Object.<string,*>} JSON object
75152
+ */
75153
+ AddSecondaryEmailRequest.prototype.toJSON = function toJSON() {
75154
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
75155
+ };
75156
+
75157
+ return AddSecondaryEmailRequest;
75158
+ })();
75159
+
75160
+ $root.AddSecondaryEmailResponse = (function() {
75161
+
75162
+ /**
75163
+ * Properties of an AddSecondaryEmailResponse.
75164
+ * @exports IAddSecondaryEmailResponse
75165
+ * @interface IAddSecondaryEmailResponse
75166
+ * @property {StatusCode|null} [status] AddSecondaryEmailResponse status
75167
+ * @property {Array.<IError>|null} [errors] AddSecondaryEmailResponse errors
75168
+ * @property {IUser|null} [user] AddSecondaryEmailResponse user
75169
+ */
75170
+
75171
+ /**
75172
+ * Constructs a new AddSecondaryEmailResponse.
75173
+ * @exports AddSecondaryEmailResponse
75174
+ * @classdesc Represents an AddSecondaryEmailResponse.
75175
+ * @implements IAddSecondaryEmailResponse
75176
+ * @constructor
75177
+ * @param {IAddSecondaryEmailResponse=} [properties] Properties to set
75178
+ */
75179
+ function AddSecondaryEmailResponse(properties) {
75180
+ this.errors = [];
75181
+ if (properties)
75182
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
75183
+ if (properties[keys[i]] != null)
75184
+ this[keys[i]] = properties[keys[i]];
75185
+ }
75186
+
75187
+ /**
75188
+ * AddSecondaryEmailResponse status.
75189
+ * @member {StatusCode} status
75190
+ * @memberof AddSecondaryEmailResponse
75191
+ * @instance
75192
+ */
75193
+ AddSecondaryEmailResponse.prototype.status = 0;
75194
+
75195
+ /**
75196
+ * AddSecondaryEmailResponse errors.
75197
+ * @member {Array.<IError>} errors
75198
+ * @memberof AddSecondaryEmailResponse
75199
+ * @instance
75200
+ */
75201
+ AddSecondaryEmailResponse.prototype.errors = $util.emptyArray;
75202
+
75203
+ /**
75204
+ * AddSecondaryEmailResponse user.
75205
+ * @member {IUser|null|undefined} user
75206
+ * @memberof AddSecondaryEmailResponse
75207
+ * @instance
75208
+ */
75209
+ AddSecondaryEmailResponse.prototype.user = null;
75210
+
75211
+ /**
75212
+ * Creates a new AddSecondaryEmailResponse instance using the specified properties.
75213
+ * @function create
75214
+ * @memberof AddSecondaryEmailResponse
75215
+ * @static
75216
+ * @param {IAddSecondaryEmailResponse=} [properties] Properties to set
75217
+ * @returns {AddSecondaryEmailResponse} AddSecondaryEmailResponse instance
75218
+ */
75219
+ AddSecondaryEmailResponse.create = function create(properties) {
75220
+ return new AddSecondaryEmailResponse(properties);
75221
+ };
75222
+
75223
+ /**
75224
+ * Encodes the specified AddSecondaryEmailResponse message. Does not implicitly {@link AddSecondaryEmailResponse.verify|verify} messages.
75225
+ * @function encode
75226
+ * @memberof AddSecondaryEmailResponse
75227
+ * @static
75228
+ * @param {IAddSecondaryEmailResponse} message AddSecondaryEmailResponse message or plain object to encode
75229
+ * @param {$protobuf.Writer} [writer] Writer to encode to
75230
+ * @returns {$protobuf.Writer} Writer
75231
+ */
75232
+ AddSecondaryEmailResponse.encode = function encode(message, writer) {
75233
+ if (!writer)
75234
+ writer = $Writer.create();
75235
+ if (message.status != null && message.hasOwnProperty("status"))
75236
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status);
75237
+ if (message.errors != null && message.errors.length)
75238
+ for (var i = 0; i < message.errors.length; ++i)
75239
+ $root.Error.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
75240
+ if (message.user != null && message.hasOwnProperty("user"))
75241
+ $root.User.encode(message.user, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
75242
+ return writer;
75243
+ };
75244
+
75245
+ /**
75246
+ * Encodes the specified AddSecondaryEmailResponse message, length delimited. Does not implicitly {@link AddSecondaryEmailResponse.verify|verify} messages.
75247
+ * @function encodeDelimited
75248
+ * @memberof AddSecondaryEmailResponse
75249
+ * @static
75250
+ * @param {IAddSecondaryEmailResponse} message AddSecondaryEmailResponse message or plain object to encode
75251
+ * @param {$protobuf.Writer} [writer] Writer to encode to
75252
+ * @returns {$protobuf.Writer} Writer
75253
+ */
75254
+ AddSecondaryEmailResponse.encodeDelimited = function encodeDelimited(message, writer) {
75255
+ return this.encode(message, writer).ldelim();
75256
+ };
75257
+
75258
+ /**
75259
+ * Decodes an AddSecondaryEmailResponse message from the specified reader or buffer.
75260
+ * @function decode
75261
+ * @memberof AddSecondaryEmailResponse
75262
+ * @static
75263
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
75264
+ * @param {number} [length] Message length if known beforehand
75265
+ * @returns {AddSecondaryEmailResponse} AddSecondaryEmailResponse
75266
+ * @throws {Error} If the payload is not a reader or valid buffer
75267
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
75268
+ */
75269
+ AddSecondaryEmailResponse.decode = function decode(reader, length) {
75270
+ if (!(reader instanceof $Reader))
75271
+ reader = $Reader.create(reader);
75272
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.AddSecondaryEmailResponse();
75273
+ while (reader.pos < end) {
75274
+ var tag = reader.uint32();
75275
+ switch (tag >>> 3) {
75276
+ case 1:
75277
+ message.status = reader.int32();
75278
+ break;
75279
+ case 2:
75280
+ if (!(message.errors && message.errors.length))
75281
+ message.errors = [];
75282
+ message.errors.push($root.Error.decode(reader, reader.uint32()));
75283
+ break;
75284
+ case 3:
75285
+ message.user = $root.User.decode(reader, reader.uint32());
75286
+ break;
75287
+ default:
75288
+ reader.skipType(tag & 7);
75289
+ break;
75290
+ }
75291
+ }
75292
+ return message;
75293
+ };
75294
+
75295
+ /**
75296
+ * Decodes an AddSecondaryEmailResponse message from the specified reader or buffer, length delimited.
75297
+ * @function decodeDelimited
75298
+ * @memberof AddSecondaryEmailResponse
75299
+ * @static
75300
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
75301
+ * @returns {AddSecondaryEmailResponse} AddSecondaryEmailResponse
75302
+ * @throws {Error} If the payload is not a reader or valid buffer
75303
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
75304
+ */
75305
+ AddSecondaryEmailResponse.decodeDelimited = function decodeDelimited(reader) {
75306
+ if (!(reader instanceof $Reader))
75307
+ reader = new $Reader(reader);
75308
+ return this.decode(reader, reader.uint32());
75309
+ };
75310
+
75311
+ /**
75312
+ * Verifies an AddSecondaryEmailResponse message.
75313
+ * @function verify
75314
+ * @memberof AddSecondaryEmailResponse
75315
+ * @static
75316
+ * @param {Object.<string,*>} message Plain object to verify
75317
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
75318
+ */
75319
+ AddSecondaryEmailResponse.verify = function verify(message) {
75320
+ if (typeof message !== "object" || message === null)
75321
+ return "object expected";
75322
+ if (message.status != null && message.hasOwnProperty("status"))
75323
+ switch (message.status) {
75324
+ default:
75325
+ return "status: enum value expected";
75326
+ case 0:
75327
+ case 200:
75328
+ case 400:
75329
+ case 401:
75330
+ case 403:
75331
+ case 422:
75332
+ case 500:
75333
+ case 504:
75334
+ break;
75335
+ }
75336
+ if (message.errors != null && message.hasOwnProperty("errors")) {
75337
+ if (!Array.isArray(message.errors))
75338
+ return "errors: array expected";
75339
+ for (var i = 0; i < message.errors.length; ++i) {
75340
+ var error = $root.Error.verify(message.errors[i]);
75341
+ if (error)
75342
+ return "errors." + error;
75343
+ }
75344
+ }
75345
+ if (message.user != null && message.hasOwnProperty("user")) {
75346
+ var error = $root.User.verify(message.user);
75347
+ if (error)
75348
+ return "user." + error;
75349
+ }
75350
+ return null;
75351
+ };
75352
+
75353
+ /**
75354
+ * Creates an AddSecondaryEmailResponse message from a plain object. Also converts values to their respective internal types.
75355
+ * @function fromObject
75356
+ * @memberof AddSecondaryEmailResponse
75357
+ * @static
75358
+ * @param {Object.<string,*>} object Plain object
75359
+ * @returns {AddSecondaryEmailResponse} AddSecondaryEmailResponse
75360
+ */
75361
+ AddSecondaryEmailResponse.fromObject = function fromObject(object) {
75362
+ if (object instanceof $root.AddSecondaryEmailResponse)
75363
+ return object;
75364
+ var message = new $root.AddSecondaryEmailResponse();
75365
+ switch (object.status) {
75366
+ case "UNKNOWN_CODE":
75367
+ case 0:
75368
+ message.status = 0;
75369
+ break;
75370
+ case "OK":
75371
+ case 200:
75372
+ message.status = 200;
75373
+ break;
75374
+ case "BAD_REQUEST":
75375
+ case 400:
75376
+ message.status = 400;
75377
+ break;
75378
+ case "UNAUTHORIZED":
75379
+ case 401:
75380
+ message.status = 401;
75381
+ break;
75382
+ case "FORBIDDEN":
75383
+ case 403:
75384
+ message.status = 403;
75385
+ break;
75386
+ case "UNPROCESSABLE_ENTITY":
75387
+ case 422:
75388
+ message.status = 422;
75389
+ break;
75390
+ case "INTERNAL_SERVER_ERROR":
75391
+ case 500:
75392
+ message.status = 500;
75393
+ break;
75394
+ case "GATEWAY_TIMEOUT":
75395
+ case 504:
75396
+ message.status = 504;
75397
+ break;
75398
+ }
75399
+ if (object.errors) {
75400
+ if (!Array.isArray(object.errors))
75401
+ throw TypeError(".AddSecondaryEmailResponse.errors: array expected");
75402
+ message.errors = [];
75403
+ for (var i = 0; i < object.errors.length; ++i) {
75404
+ if (typeof object.errors[i] !== "object")
75405
+ throw TypeError(".AddSecondaryEmailResponse.errors: object expected");
75406
+ message.errors[i] = $root.Error.fromObject(object.errors[i]);
75407
+ }
75408
+ }
75409
+ if (object.user != null) {
75410
+ if (typeof object.user !== "object")
75411
+ throw TypeError(".AddSecondaryEmailResponse.user: object expected");
75412
+ message.user = $root.User.fromObject(object.user);
75413
+ }
75414
+ return message;
75415
+ };
75416
+
75417
+ /**
75418
+ * Creates a plain object from an AddSecondaryEmailResponse message. Also converts values to other types if specified.
75419
+ * @function toObject
75420
+ * @memberof AddSecondaryEmailResponse
75421
+ * @static
75422
+ * @param {AddSecondaryEmailResponse} message AddSecondaryEmailResponse
75423
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
75424
+ * @returns {Object.<string,*>} Plain object
75425
+ */
75426
+ AddSecondaryEmailResponse.toObject = function toObject(message, options) {
75427
+ if (!options)
75428
+ options = {};
75429
+ var object = {};
75430
+ if (options.arrays || options.defaults)
75431
+ object.errors = [];
75432
+ if (options.defaults) {
75433
+ object.status = options.enums === String ? "UNKNOWN_CODE" : 0;
75434
+ object.user = null;
75435
+ }
75436
+ if (message.status != null && message.hasOwnProperty("status"))
75437
+ object.status = options.enums === String ? $root.StatusCode[message.status] : message.status;
75438
+ if (message.errors && message.errors.length) {
75439
+ object.errors = [];
75440
+ for (var j = 0; j < message.errors.length; ++j)
75441
+ object.errors[j] = $root.Error.toObject(message.errors[j], options);
75442
+ }
75443
+ if (message.user != null && message.hasOwnProperty("user"))
75444
+ object.user = $root.User.toObject(message.user, options);
75445
+ return object;
75446
+ };
75447
+
75448
+ /**
75449
+ * Converts this AddSecondaryEmailResponse to JSON.
75450
+ * @function toJSON
75451
+ * @memberof AddSecondaryEmailResponse
75452
+ * @instance
75453
+ * @returns {Object.<string,*>} JSON object
75454
+ */
75455
+ AddSecondaryEmailResponse.prototype.toJSON = function toJSON() {
75456
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
75457
+ };
75458
+
75459
+ return AddSecondaryEmailResponse;
75460
+ })();
75461
+
75462
+ $root.UpdateSecondaryEmailRequest = (function() {
75463
+
75464
+ /**
75465
+ * Properties of an UpdateSecondaryEmailRequest.
75466
+ * @exports IUpdateSecondaryEmailRequest
75467
+ * @interface IUpdateSecondaryEmailRequest
75468
+ * @property {string|null} [spanContext] UpdateSecondaryEmailRequest spanContext
75469
+ * @property {string|null} [email] UpdateSecondaryEmailRequest email
75470
+ * @property {string|null} [userId] UpdateSecondaryEmailRequest userId
75471
+ */
75472
+
75473
+ /**
75474
+ * Constructs a new UpdateSecondaryEmailRequest.
75475
+ * @exports UpdateSecondaryEmailRequest
75476
+ * @classdesc Represents an UpdateSecondaryEmailRequest.
75477
+ * @implements IUpdateSecondaryEmailRequest
75478
+ * @constructor
75479
+ * @param {IUpdateSecondaryEmailRequest=} [properties] Properties to set
75480
+ */
75481
+ function UpdateSecondaryEmailRequest(properties) {
75482
+ if (properties)
75483
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
75484
+ if (properties[keys[i]] != null)
75485
+ this[keys[i]] = properties[keys[i]];
75486
+ }
75487
+
75488
+ /**
75489
+ * UpdateSecondaryEmailRequest spanContext.
75490
+ * @member {string} spanContext
75491
+ * @memberof UpdateSecondaryEmailRequest
75492
+ * @instance
75493
+ */
75494
+ UpdateSecondaryEmailRequest.prototype.spanContext = "";
75495
+
75496
+ /**
75497
+ * UpdateSecondaryEmailRequest email.
75498
+ * @member {string} email
75499
+ * @memberof UpdateSecondaryEmailRequest
75500
+ * @instance
75501
+ */
75502
+ UpdateSecondaryEmailRequest.prototype.email = "";
75503
+
75504
+ /**
75505
+ * UpdateSecondaryEmailRequest userId.
75506
+ * @member {string} userId
75507
+ * @memberof UpdateSecondaryEmailRequest
75508
+ * @instance
75509
+ */
75510
+ UpdateSecondaryEmailRequest.prototype.userId = "";
75511
+
75512
+ /**
75513
+ * Creates a new UpdateSecondaryEmailRequest instance using the specified properties.
75514
+ * @function create
75515
+ * @memberof UpdateSecondaryEmailRequest
75516
+ * @static
75517
+ * @param {IUpdateSecondaryEmailRequest=} [properties] Properties to set
75518
+ * @returns {UpdateSecondaryEmailRequest} UpdateSecondaryEmailRequest instance
75519
+ */
75520
+ UpdateSecondaryEmailRequest.create = function create(properties) {
75521
+ return new UpdateSecondaryEmailRequest(properties);
75522
+ };
75523
+
75524
+ /**
75525
+ * Encodes the specified UpdateSecondaryEmailRequest message. Does not implicitly {@link UpdateSecondaryEmailRequest.verify|verify} messages.
75526
+ * @function encode
75527
+ * @memberof UpdateSecondaryEmailRequest
75528
+ * @static
75529
+ * @param {IUpdateSecondaryEmailRequest} message UpdateSecondaryEmailRequest message or plain object to encode
75530
+ * @param {$protobuf.Writer} [writer] Writer to encode to
75531
+ * @returns {$protobuf.Writer} Writer
75532
+ */
75533
+ UpdateSecondaryEmailRequest.encode = function encode(message, writer) {
75534
+ if (!writer)
75535
+ writer = $Writer.create();
75536
+ if (message.spanContext != null && message.hasOwnProperty("spanContext"))
75537
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.spanContext);
75538
+ if (message.email != null && message.hasOwnProperty("email"))
75539
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.email);
75540
+ if (message.userId != null && message.hasOwnProperty("userId"))
75541
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.userId);
75542
+ return writer;
75543
+ };
75544
+
75545
+ /**
75546
+ * Encodes the specified UpdateSecondaryEmailRequest message, length delimited. Does not implicitly {@link UpdateSecondaryEmailRequest.verify|verify} messages.
75547
+ * @function encodeDelimited
75548
+ * @memberof UpdateSecondaryEmailRequest
75549
+ * @static
75550
+ * @param {IUpdateSecondaryEmailRequest} message UpdateSecondaryEmailRequest message or plain object to encode
75551
+ * @param {$protobuf.Writer} [writer] Writer to encode to
75552
+ * @returns {$protobuf.Writer} Writer
75553
+ */
75554
+ UpdateSecondaryEmailRequest.encodeDelimited = function encodeDelimited(message, writer) {
75555
+ return this.encode(message, writer).ldelim();
75556
+ };
75557
+
75558
+ /**
75559
+ * Decodes an UpdateSecondaryEmailRequest message from the specified reader or buffer.
75560
+ * @function decode
75561
+ * @memberof UpdateSecondaryEmailRequest
75562
+ * @static
75563
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
75564
+ * @param {number} [length] Message length if known beforehand
75565
+ * @returns {UpdateSecondaryEmailRequest} UpdateSecondaryEmailRequest
75566
+ * @throws {Error} If the payload is not a reader or valid buffer
75567
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
75568
+ */
75569
+ UpdateSecondaryEmailRequest.decode = function decode(reader, length) {
75570
+ if (!(reader instanceof $Reader))
75571
+ reader = $Reader.create(reader);
75572
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UpdateSecondaryEmailRequest();
75573
+ while (reader.pos < end) {
75574
+ var tag = reader.uint32();
75575
+ switch (tag >>> 3) {
75576
+ case 1:
75577
+ message.spanContext = reader.string();
75578
+ break;
75579
+ case 2:
75580
+ message.email = reader.string();
75581
+ break;
75582
+ case 3:
75583
+ message.userId = reader.string();
75584
+ break;
75585
+ default:
75586
+ reader.skipType(tag & 7);
75587
+ break;
75588
+ }
75589
+ }
75590
+ return message;
75591
+ };
75592
+
75593
+ /**
75594
+ * Decodes an UpdateSecondaryEmailRequest message from the specified reader or buffer, length delimited.
75595
+ * @function decodeDelimited
75596
+ * @memberof UpdateSecondaryEmailRequest
75597
+ * @static
75598
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
75599
+ * @returns {UpdateSecondaryEmailRequest} UpdateSecondaryEmailRequest
75600
+ * @throws {Error} If the payload is not a reader or valid buffer
75601
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
75602
+ */
75603
+ UpdateSecondaryEmailRequest.decodeDelimited = function decodeDelimited(reader) {
75604
+ if (!(reader instanceof $Reader))
75605
+ reader = new $Reader(reader);
75606
+ return this.decode(reader, reader.uint32());
75607
+ };
75608
+
75609
+ /**
75610
+ * Verifies an UpdateSecondaryEmailRequest message.
75611
+ * @function verify
75612
+ * @memberof UpdateSecondaryEmailRequest
75613
+ * @static
75614
+ * @param {Object.<string,*>} message Plain object to verify
75615
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
75616
+ */
75617
+ UpdateSecondaryEmailRequest.verify = function verify(message) {
75618
+ if (typeof message !== "object" || message === null)
75619
+ return "object expected";
75620
+ if (message.spanContext != null && message.hasOwnProperty("spanContext"))
75621
+ if (!$util.isString(message.spanContext))
75622
+ return "spanContext: string expected";
75623
+ if (message.email != null && message.hasOwnProperty("email"))
75624
+ if (!$util.isString(message.email))
75625
+ return "email: string expected";
75626
+ if (message.userId != null && message.hasOwnProperty("userId"))
75627
+ if (!$util.isString(message.userId))
75628
+ return "userId: string expected";
75629
+ return null;
75630
+ };
75631
+
75632
+ /**
75633
+ * Creates an UpdateSecondaryEmailRequest message from a plain object. Also converts values to their respective internal types.
75634
+ * @function fromObject
75635
+ * @memberof UpdateSecondaryEmailRequest
75636
+ * @static
75637
+ * @param {Object.<string,*>} object Plain object
75638
+ * @returns {UpdateSecondaryEmailRequest} UpdateSecondaryEmailRequest
75639
+ */
75640
+ UpdateSecondaryEmailRequest.fromObject = function fromObject(object) {
75641
+ if (object instanceof $root.UpdateSecondaryEmailRequest)
75642
+ return object;
75643
+ var message = new $root.UpdateSecondaryEmailRequest();
75644
+ if (object.spanContext != null)
75645
+ message.spanContext = String(object.spanContext);
75646
+ if (object.email != null)
75647
+ message.email = String(object.email);
75648
+ if (object.userId != null)
75649
+ message.userId = String(object.userId);
75650
+ return message;
75651
+ };
75652
+
75653
+ /**
75654
+ * Creates a plain object from an UpdateSecondaryEmailRequest message. Also converts values to other types if specified.
75655
+ * @function toObject
75656
+ * @memberof UpdateSecondaryEmailRequest
75657
+ * @static
75658
+ * @param {UpdateSecondaryEmailRequest} message UpdateSecondaryEmailRequest
75659
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
75660
+ * @returns {Object.<string,*>} Plain object
75661
+ */
75662
+ UpdateSecondaryEmailRequest.toObject = function toObject(message, options) {
75663
+ if (!options)
75664
+ options = {};
75665
+ var object = {};
75666
+ if (options.defaults) {
75667
+ object.spanContext = "";
75668
+ object.email = "";
75669
+ object.userId = "";
75670
+ }
75671
+ if (message.spanContext != null && message.hasOwnProperty("spanContext"))
75672
+ object.spanContext = message.spanContext;
75673
+ if (message.email != null && message.hasOwnProperty("email"))
75674
+ object.email = message.email;
75675
+ if (message.userId != null && message.hasOwnProperty("userId"))
75676
+ object.userId = message.userId;
75677
+ return object;
75678
+ };
75679
+
75680
+ /**
75681
+ * Converts this UpdateSecondaryEmailRequest to JSON.
75682
+ * @function toJSON
75683
+ * @memberof UpdateSecondaryEmailRequest
75684
+ * @instance
75685
+ * @returns {Object.<string,*>} JSON object
75686
+ */
75687
+ UpdateSecondaryEmailRequest.prototype.toJSON = function toJSON() {
75688
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
75689
+ };
75690
+
75691
+ return UpdateSecondaryEmailRequest;
75692
+ })();
75693
+
75694
+ $root.UpdateSecondaryEmailResponse = (function() {
75695
+
75696
+ /**
75697
+ * Properties of an UpdateSecondaryEmailResponse.
75698
+ * @exports IUpdateSecondaryEmailResponse
75699
+ * @interface IUpdateSecondaryEmailResponse
75700
+ * @property {StatusCode|null} [status] UpdateSecondaryEmailResponse status
75701
+ * @property {Array.<IError>|null} [errors] UpdateSecondaryEmailResponse errors
75702
+ * @property {IUser|null} [user] UpdateSecondaryEmailResponse user
75703
+ */
75704
+
75705
+ /**
75706
+ * Constructs a new UpdateSecondaryEmailResponse.
75707
+ * @exports UpdateSecondaryEmailResponse
75708
+ * @classdesc Represents an UpdateSecondaryEmailResponse.
75709
+ * @implements IUpdateSecondaryEmailResponse
75710
+ * @constructor
75711
+ * @param {IUpdateSecondaryEmailResponse=} [properties] Properties to set
75712
+ */
75713
+ function UpdateSecondaryEmailResponse(properties) {
75714
+ this.errors = [];
75715
+ if (properties)
75716
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
75717
+ if (properties[keys[i]] != null)
75718
+ this[keys[i]] = properties[keys[i]];
75719
+ }
75720
+
75721
+ /**
75722
+ * UpdateSecondaryEmailResponse status.
75723
+ * @member {StatusCode} status
75724
+ * @memberof UpdateSecondaryEmailResponse
75725
+ * @instance
75726
+ */
75727
+ UpdateSecondaryEmailResponse.prototype.status = 0;
75728
+
75729
+ /**
75730
+ * UpdateSecondaryEmailResponse errors.
75731
+ * @member {Array.<IError>} errors
75732
+ * @memberof UpdateSecondaryEmailResponse
75733
+ * @instance
75734
+ */
75735
+ UpdateSecondaryEmailResponse.prototype.errors = $util.emptyArray;
75736
+
75737
+ /**
75738
+ * UpdateSecondaryEmailResponse user.
75739
+ * @member {IUser|null|undefined} user
75740
+ * @memberof UpdateSecondaryEmailResponse
75741
+ * @instance
75742
+ */
75743
+ UpdateSecondaryEmailResponse.prototype.user = null;
75744
+
75745
+ /**
75746
+ * Creates a new UpdateSecondaryEmailResponse instance using the specified properties.
75747
+ * @function create
75748
+ * @memberof UpdateSecondaryEmailResponse
75749
+ * @static
75750
+ * @param {IUpdateSecondaryEmailResponse=} [properties] Properties to set
75751
+ * @returns {UpdateSecondaryEmailResponse} UpdateSecondaryEmailResponse instance
75752
+ */
75753
+ UpdateSecondaryEmailResponse.create = function create(properties) {
75754
+ return new UpdateSecondaryEmailResponse(properties);
75755
+ };
75756
+
75757
+ /**
75758
+ * Encodes the specified UpdateSecondaryEmailResponse message. Does not implicitly {@link UpdateSecondaryEmailResponse.verify|verify} messages.
75759
+ * @function encode
75760
+ * @memberof UpdateSecondaryEmailResponse
75761
+ * @static
75762
+ * @param {IUpdateSecondaryEmailResponse} message UpdateSecondaryEmailResponse message or plain object to encode
75763
+ * @param {$protobuf.Writer} [writer] Writer to encode to
75764
+ * @returns {$protobuf.Writer} Writer
75765
+ */
75766
+ UpdateSecondaryEmailResponse.encode = function encode(message, writer) {
75767
+ if (!writer)
75768
+ writer = $Writer.create();
75769
+ if (message.status != null && message.hasOwnProperty("status"))
75770
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status);
75771
+ if (message.errors != null && message.errors.length)
75772
+ for (var i = 0; i < message.errors.length; ++i)
75773
+ $root.Error.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
75774
+ if (message.user != null && message.hasOwnProperty("user"))
75775
+ $root.User.encode(message.user, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
75776
+ return writer;
75777
+ };
75778
+
75779
+ /**
75780
+ * Encodes the specified UpdateSecondaryEmailResponse message, length delimited. Does not implicitly {@link UpdateSecondaryEmailResponse.verify|verify} messages.
75781
+ * @function encodeDelimited
75782
+ * @memberof UpdateSecondaryEmailResponse
75783
+ * @static
75784
+ * @param {IUpdateSecondaryEmailResponse} message UpdateSecondaryEmailResponse message or plain object to encode
75785
+ * @param {$protobuf.Writer} [writer] Writer to encode to
75786
+ * @returns {$protobuf.Writer} Writer
75787
+ */
75788
+ UpdateSecondaryEmailResponse.encodeDelimited = function encodeDelimited(message, writer) {
75789
+ return this.encode(message, writer).ldelim();
75790
+ };
75791
+
75792
+ /**
75793
+ * Decodes an UpdateSecondaryEmailResponse message from the specified reader or buffer.
75794
+ * @function decode
75795
+ * @memberof UpdateSecondaryEmailResponse
75796
+ * @static
75797
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
75798
+ * @param {number} [length] Message length if known beforehand
75799
+ * @returns {UpdateSecondaryEmailResponse} UpdateSecondaryEmailResponse
75800
+ * @throws {Error} If the payload is not a reader or valid buffer
75801
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
75802
+ */
75803
+ UpdateSecondaryEmailResponse.decode = function decode(reader, length) {
75804
+ if (!(reader instanceof $Reader))
75805
+ reader = $Reader.create(reader);
75806
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UpdateSecondaryEmailResponse();
75807
+ while (reader.pos < end) {
75808
+ var tag = reader.uint32();
75809
+ switch (tag >>> 3) {
75810
+ case 1:
75811
+ message.status = reader.int32();
75812
+ break;
75813
+ case 2:
75814
+ if (!(message.errors && message.errors.length))
75815
+ message.errors = [];
75816
+ message.errors.push($root.Error.decode(reader, reader.uint32()));
75817
+ break;
75818
+ case 3:
75819
+ message.user = $root.User.decode(reader, reader.uint32());
75820
+ break;
75821
+ default:
75822
+ reader.skipType(tag & 7);
75823
+ break;
75824
+ }
75825
+ }
75826
+ return message;
75827
+ };
75828
+
75829
+ /**
75830
+ * Decodes an UpdateSecondaryEmailResponse message from the specified reader or buffer, length delimited.
75831
+ * @function decodeDelimited
75832
+ * @memberof UpdateSecondaryEmailResponse
75833
+ * @static
75834
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
75835
+ * @returns {UpdateSecondaryEmailResponse} UpdateSecondaryEmailResponse
75836
+ * @throws {Error} If the payload is not a reader or valid buffer
75837
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
75838
+ */
75839
+ UpdateSecondaryEmailResponse.decodeDelimited = function decodeDelimited(reader) {
75840
+ if (!(reader instanceof $Reader))
75841
+ reader = new $Reader(reader);
75842
+ return this.decode(reader, reader.uint32());
75843
+ };
75844
+
75845
+ /**
75846
+ * Verifies an UpdateSecondaryEmailResponse message.
75847
+ * @function verify
75848
+ * @memberof UpdateSecondaryEmailResponse
75849
+ * @static
75850
+ * @param {Object.<string,*>} message Plain object to verify
75851
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
75852
+ */
75853
+ UpdateSecondaryEmailResponse.verify = function verify(message) {
75854
+ if (typeof message !== "object" || message === null)
75855
+ return "object expected";
75856
+ if (message.status != null && message.hasOwnProperty("status"))
75857
+ switch (message.status) {
75858
+ default:
75859
+ return "status: enum value expected";
75860
+ case 0:
75861
+ case 200:
75862
+ case 400:
75863
+ case 401:
75864
+ case 403:
75865
+ case 422:
75866
+ case 500:
75867
+ case 504:
75868
+ break;
75869
+ }
75870
+ if (message.errors != null && message.hasOwnProperty("errors")) {
75871
+ if (!Array.isArray(message.errors))
75872
+ return "errors: array expected";
75873
+ for (var i = 0; i < message.errors.length; ++i) {
75874
+ var error = $root.Error.verify(message.errors[i]);
75875
+ if (error)
75876
+ return "errors." + error;
75877
+ }
75878
+ }
75879
+ if (message.user != null && message.hasOwnProperty("user")) {
75880
+ var error = $root.User.verify(message.user);
75881
+ if (error)
75882
+ return "user." + error;
75883
+ }
75884
+ return null;
75885
+ };
75886
+
75887
+ /**
75888
+ * Creates an UpdateSecondaryEmailResponse message from a plain object. Also converts values to their respective internal types.
75889
+ * @function fromObject
75890
+ * @memberof UpdateSecondaryEmailResponse
75891
+ * @static
75892
+ * @param {Object.<string,*>} object Plain object
75893
+ * @returns {UpdateSecondaryEmailResponse} UpdateSecondaryEmailResponse
75894
+ */
75895
+ UpdateSecondaryEmailResponse.fromObject = function fromObject(object) {
75896
+ if (object instanceof $root.UpdateSecondaryEmailResponse)
75897
+ return object;
75898
+ var message = new $root.UpdateSecondaryEmailResponse();
75899
+ switch (object.status) {
75900
+ case "UNKNOWN_CODE":
75901
+ case 0:
75902
+ message.status = 0;
75903
+ break;
75904
+ case "OK":
75905
+ case 200:
75906
+ message.status = 200;
75907
+ break;
75908
+ case "BAD_REQUEST":
75909
+ case 400:
75910
+ message.status = 400;
75911
+ break;
75912
+ case "UNAUTHORIZED":
75913
+ case 401:
75914
+ message.status = 401;
75915
+ break;
75916
+ case "FORBIDDEN":
75917
+ case 403:
75918
+ message.status = 403;
75919
+ break;
75920
+ case "UNPROCESSABLE_ENTITY":
75921
+ case 422:
75922
+ message.status = 422;
75923
+ break;
75924
+ case "INTERNAL_SERVER_ERROR":
75925
+ case 500:
75926
+ message.status = 500;
75927
+ break;
75928
+ case "GATEWAY_TIMEOUT":
75929
+ case 504:
75930
+ message.status = 504;
75931
+ break;
75932
+ }
75933
+ if (object.errors) {
75934
+ if (!Array.isArray(object.errors))
75935
+ throw TypeError(".UpdateSecondaryEmailResponse.errors: array expected");
75936
+ message.errors = [];
75937
+ for (var i = 0; i < object.errors.length; ++i) {
75938
+ if (typeof object.errors[i] !== "object")
75939
+ throw TypeError(".UpdateSecondaryEmailResponse.errors: object expected");
75940
+ message.errors[i] = $root.Error.fromObject(object.errors[i]);
75941
+ }
75942
+ }
75943
+ if (object.user != null) {
75944
+ if (typeof object.user !== "object")
75945
+ throw TypeError(".UpdateSecondaryEmailResponse.user: object expected");
75946
+ message.user = $root.User.fromObject(object.user);
75947
+ }
75948
+ return message;
75949
+ };
75950
+
75951
+ /**
75952
+ * Creates a plain object from an UpdateSecondaryEmailResponse message. Also converts values to other types if specified.
75953
+ * @function toObject
75954
+ * @memberof UpdateSecondaryEmailResponse
75955
+ * @static
75956
+ * @param {UpdateSecondaryEmailResponse} message UpdateSecondaryEmailResponse
75957
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
75958
+ * @returns {Object.<string,*>} Plain object
75959
+ */
75960
+ UpdateSecondaryEmailResponse.toObject = function toObject(message, options) {
75961
+ if (!options)
75962
+ options = {};
75963
+ var object = {};
75964
+ if (options.arrays || options.defaults)
75965
+ object.errors = [];
75966
+ if (options.defaults) {
75967
+ object.status = options.enums === String ? "UNKNOWN_CODE" : 0;
75968
+ object.user = null;
75969
+ }
75970
+ if (message.status != null && message.hasOwnProperty("status"))
75971
+ object.status = options.enums === String ? $root.StatusCode[message.status] : message.status;
75972
+ if (message.errors && message.errors.length) {
75973
+ object.errors = [];
75974
+ for (var j = 0; j < message.errors.length; ++j)
75975
+ object.errors[j] = $root.Error.toObject(message.errors[j], options);
75976
+ }
75977
+ if (message.user != null && message.hasOwnProperty("user"))
75978
+ object.user = $root.User.toObject(message.user, options);
75979
+ return object;
75980
+ };
75981
+
75982
+ /**
75983
+ * Converts this UpdateSecondaryEmailResponse to JSON.
75984
+ * @function toJSON
75985
+ * @memberof UpdateSecondaryEmailResponse
75986
+ * @instance
75987
+ * @returns {Object.<string,*>} JSON object
75988
+ */
75989
+ UpdateSecondaryEmailResponse.prototype.toJSON = function toJSON() {
75990
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
75991
+ };
75992
+
75993
+ return UpdateSecondaryEmailResponse;
75994
+ })();
75995
+
75996
+ $root.DeleteSecondaryEmailRequest = (function() {
75997
+
75998
+ /**
75999
+ * Properties of a DeleteSecondaryEmailRequest.
76000
+ * @exports IDeleteSecondaryEmailRequest
76001
+ * @interface IDeleteSecondaryEmailRequest
76002
+ * @property {string|null} [spanContext] DeleteSecondaryEmailRequest spanContext
76003
+ * @property {string|null} [email] DeleteSecondaryEmailRequest email
76004
+ * @property {string|null} [userId] DeleteSecondaryEmailRequest userId
76005
+ */
76006
+
76007
+ /**
76008
+ * Constructs a new DeleteSecondaryEmailRequest.
76009
+ * @exports DeleteSecondaryEmailRequest
76010
+ * @classdesc Represents a DeleteSecondaryEmailRequest.
76011
+ * @implements IDeleteSecondaryEmailRequest
76012
+ * @constructor
76013
+ * @param {IDeleteSecondaryEmailRequest=} [properties] Properties to set
76014
+ */
76015
+ function DeleteSecondaryEmailRequest(properties) {
76016
+ if (properties)
76017
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
76018
+ if (properties[keys[i]] != null)
76019
+ this[keys[i]] = properties[keys[i]];
76020
+ }
76021
+
76022
+ /**
76023
+ * DeleteSecondaryEmailRequest spanContext.
76024
+ * @member {string} spanContext
76025
+ * @memberof DeleteSecondaryEmailRequest
76026
+ * @instance
76027
+ */
76028
+ DeleteSecondaryEmailRequest.prototype.spanContext = "";
76029
+
76030
+ /**
76031
+ * DeleteSecondaryEmailRequest email.
76032
+ * @member {string} email
76033
+ * @memberof DeleteSecondaryEmailRequest
76034
+ * @instance
76035
+ */
76036
+ DeleteSecondaryEmailRequest.prototype.email = "";
76037
+
76038
+ /**
76039
+ * DeleteSecondaryEmailRequest userId.
76040
+ * @member {string} userId
76041
+ * @memberof DeleteSecondaryEmailRequest
76042
+ * @instance
76043
+ */
76044
+ DeleteSecondaryEmailRequest.prototype.userId = "";
76045
+
76046
+ /**
76047
+ * Creates a new DeleteSecondaryEmailRequest instance using the specified properties.
76048
+ * @function create
76049
+ * @memberof DeleteSecondaryEmailRequest
76050
+ * @static
76051
+ * @param {IDeleteSecondaryEmailRequest=} [properties] Properties to set
76052
+ * @returns {DeleteSecondaryEmailRequest} DeleteSecondaryEmailRequest instance
76053
+ */
76054
+ DeleteSecondaryEmailRequest.create = function create(properties) {
76055
+ return new DeleteSecondaryEmailRequest(properties);
76056
+ };
76057
+
76058
+ /**
76059
+ * Encodes the specified DeleteSecondaryEmailRequest message. Does not implicitly {@link DeleteSecondaryEmailRequest.verify|verify} messages.
76060
+ * @function encode
76061
+ * @memberof DeleteSecondaryEmailRequest
76062
+ * @static
76063
+ * @param {IDeleteSecondaryEmailRequest} message DeleteSecondaryEmailRequest message or plain object to encode
76064
+ * @param {$protobuf.Writer} [writer] Writer to encode to
76065
+ * @returns {$protobuf.Writer} Writer
76066
+ */
76067
+ DeleteSecondaryEmailRequest.encode = function encode(message, writer) {
76068
+ if (!writer)
76069
+ writer = $Writer.create();
76070
+ if (message.spanContext != null && message.hasOwnProperty("spanContext"))
76071
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.spanContext);
76072
+ if (message.email != null && message.hasOwnProperty("email"))
76073
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.email);
76074
+ if (message.userId != null && message.hasOwnProperty("userId"))
76075
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.userId);
76076
+ return writer;
76077
+ };
76078
+
76079
+ /**
76080
+ * Encodes the specified DeleteSecondaryEmailRequest message, length delimited. Does not implicitly {@link DeleteSecondaryEmailRequest.verify|verify} messages.
76081
+ * @function encodeDelimited
76082
+ * @memberof DeleteSecondaryEmailRequest
76083
+ * @static
76084
+ * @param {IDeleteSecondaryEmailRequest} message DeleteSecondaryEmailRequest message or plain object to encode
76085
+ * @param {$protobuf.Writer} [writer] Writer to encode to
76086
+ * @returns {$protobuf.Writer} Writer
76087
+ */
76088
+ DeleteSecondaryEmailRequest.encodeDelimited = function encodeDelimited(message, writer) {
76089
+ return this.encode(message, writer).ldelim();
76090
+ };
76091
+
76092
+ /**
76093
+ * Decodes a DeleteSecondaryEmailRequest message from the specified reader or buffer.
76094
+ * @function decode
76095
+ * @memberof DeleteSecondaryEmailRequest
76096
+ * @static
76097
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
76098
+ * @param {number} [length] Message length if known beforehand
76099
+ * @returns {DeleteSecondaryEmailRequest} DeleteSecondaryEmailRequest
76100
+ * @throws {Error} If the payload is not a reader or valid buffer
76101
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
76102
+ */
76103
+ DeleteSecondaryEmailRequest.decode = function decode(reader, length) {
76104
+ if (!(reader instanceof $Reader))
76105
+ reader = $Reader.create(reader);
76106
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.DeleteSecondaryEmailRequest();
76107
+ while (reader.pos < end) {
76108
+ var tag = reader.uint32();
76109
+ switch (tag >>> 3) {
76110
+ case 1:
76111
+ message.spanContext = reader.string();
76112
+ break;
76113
+ case 2:
76114
+ message.email = reader.string();
76115
+ break;
76116
+ case 3:
76117
+ message.userId = reader.string();
76118
+ break;
76119
+ default:
76120
+ reader.skipType(tag & 7);
76121
+ break;
76122
+ }
76123
+ }
76124
+ return message;
76125
+ };
76126
+
76127
+ /**
76128
+ * Decodes a DeleteSecondaryEmailRequest message from the specified reader or buffer, length delimited.
76129
+ * @function decodeDelimited
76130
+ * @memberof DeleteSecondaryEmailRequest
76131
+ * @static
76132
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
76133
+ * @returns {DeleteSecondaryEmailRequest} DeleteSecondaryEmailRequest
76134
+ * @throws {Error} If the payload is not a reader or valid buffer
76135
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
76136
+ */
76137
+ DeleteSecondaryEmailRequest.decodeDelimited = function decodeDelimited(reader) {
76138
+ if (!(reader instanceof $Reader))
76139
+ reader = new $Reader(reader);
76140
+ return this.decode(reader, reader.uint32());
76141
+ };
76142
+
76143
+ /**
76144
+ * Verifies a DeleteSecondaryEmailRequest message.
76145
+ * @function verify
76146
+ * @memberof DeleteSecondaryEmailRequest
76147
+ * @static
76148
+ * @param {Object.<string,*>} message Plain object to verify
76149
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
76150
+ */
76151
+ DeleteSecondaryEmailRequest.verify = function verify(message) {
76152
+ if (typeof message !== "object" || message === null)
76153
+ return "object expected";
76154
+ if (message.spanContext != null && message.hasOwnProperty("spanContext"))
76155
+ if (!$util.isString(message.spanContext))
76156
+ return "spanContext: string expected";
76157
+ if (message.email != null && message.hasOwnProperty("email"))
76158
+ if (!$util.isString(message.email))
76159
+ return "email: string expected";
76160
+ if (message.userId != null && message.hasOwnProperty("userId"))
76161
+ if (!$util.isString(message.userId))
76162
+ return "userId: string expected";
76163
+ return null;
76164
+ };
76165
+
76166
+ /**
76167
+ * Creates a DeleteSecondaryEmailRequest message from a plain object. Also converts values to their respective internal types.
76168
+ * @function fromObject
76169
+ * @memberof DeleteSecondaryEmailRequest
76170
+ * @static
76171
+ * @param {Object.<string,*>} object Plain object
76172
+ * @returns {DeleteSecondaryEmailRequest} DeleteSecondaryEmailRequest
76173
+ */
76174
+ DeleteSecondaryEmailRequest.fromObject = function fromObject(object) {
76175
+ if (object instanceof $root.DeleteSecondaryEmailRequest)
76176
+ return object;
76177
+ var message = new $root.DeleteSecondaryEmailRequest();
76178
+ if (object.spanContext != null)
76179
+ message.spanContext = String(object.spanContext);
76180
+ if (object.email != null)
76181
+ message.email = String(object.email);
76182
+ if (object.userId != null)
76183
+ message.userId = String(object.userId);
76184
+ return message;
76185
+ };
76186
+
76187
+ /**
76188
+ * Creates a plain object from a DeleteSecondaryEmailRequest message. Also converts values to other types if specified.
76189
+ * @function toObject
76190
+ * @memberof DeleteSecondaryEmailRequest
76191
+ * @static
76192
+ * @param {DeleteSecondaryEmailRequest} message DeleteSecondaryEmailRequest
76193
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
76194
+ * @returns {Object.<string,*>} Plain object
76195
+ */
76196
+ DeleteSecondaryEmailRequest.toObject = function toObject(message, options) {
76197
+ if (!options)
76198
+ options = {};
76199
+ var object = {};
76200
+ if (options.defaults) {
76201
+ object.spanContext = "";
76202
+ object.email = "";
76203
+ object.userId = "";
76204
+ }
76205
+ if (message.spanContext != null && message.hasOwnProperty("spanContext"))
76206
+ object.spanContext = message.spanContext;
76207
+ if (message.email != null && message.hasOwnProperty("email"))
76208
+ object.email = message.email;
76209
+ if (message.userId != null && message.hasOwnProperty("userId"))
76210
+ object.userId = message.userId;
76211
+ return object;
76212
+ };
76213
+
76214
+ /**
76215
+ * Converts this DeleteSecondaryEmailRequest to JSON.
76216
+ * @function toJSON
76217
+ * @memberof DeleteSecondaryEmailRequest
76218
+ * @instance
76219
+ * @returns {Object.<string,*>} JSON object
76220
+ */
76221
+ DeleteSecondaryEmailRequest.prototype.toJSON = function toJSON() {
76222
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
76223
+ };
76224
+
76225
+ return DeleteSecondaryEmailRequest;
76226
+ })();
76227
+
76228
+ $root.DeleteSecondaryEmailResponse = (function() {
76229
+
76230
+ /**
76231
+ * Properties of a DeleteSecondaryEmailResponse.
76232
+ * @exports IDeleteSecondaryEmailResponse
76233
+ * @interface IDeleteSecondaryEmailResponse
76234
+ * @property {StatusCode|null} [status] DeleteSecondaryEmailResponse status
76235
+ * @property {Array.<IError>|null} [errors] DeleteSecondaryEmailResponse errors
76236
+ * @property {IUser|null} [user] DeleteSecondaryEmailResponse user
76237
+ */
76238
+
76239
+ /**
76240
+ * Constructs a new DeleteSecondaryEmailResponse.
76241
+ * @exports DeleteSecondaryEmailResponse
76242
+ * @classdesc Represents a DeleteSecondaryEmailResponse.
76243
+ * @implements IDeleteSecondaryEmailResponse
76244
+ * @constructor
76245
+ * @param {IDeleteSecondaryEmailResponse=} [properties] Properties to set
76246
+ */
76247
+ function DeleteSecondaryEmailResponse(properties) {
76248
+ this.errors = [];
76249
+ if (properties)
76250
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
76251
+ if (properties[keys[i]] != null)
76252
+ this[keys[i]] = properties[keys[i]];
76253
+ }
76254
+
76255
+ /**
76256
+ * DeleteSecondaryEmailResponse status.
76257
+ * @member {StatusCode} status
76258
+ * @memberof DeleteSecondaryEmailResponse
76259
+ * @instance
76260
+ */
76261
+ DeleteSecondaryEmailResponse.prototype.status = 0;
76262
+
76263
+ /**
76264
+ * DeleteSecondaryEmailResponse errors.
76265
+ * @member {Array.<IError>} errors
76266
+ * @memberof DeleteSecondaryEmailResponse
76267
+ * @instance
76268
+ */
76269
+ DeleteSecondaryEmailResponse.prototype.errors = $util.emptyArray;
76270
+
76271
+ /**
76272
+ * DeleteSecondaryEmailResponse user.
76273
+ * @member {IUser|null|undefined} user
76274
+ * @memberof DeleteSecondaryEmailResponse
76275
+ * @instance
76276
+ */
76277
+ DeleteSecondaryEmailResponse.prototype.user = null;
76278
+
76279
+ /**
76280
+ * Creates a new DeleteSecondaryEmailResponse instance using the specified properties.
76281
+ * @function create
76282
+ * @memberof DeleteSecondaryEmailResponse
76283
+ * @static
76284
+ * @param {IDeleteSecondaryEmailResponse=} [properties] Properties to set
76285
+ * @returns {DeleteSecondaryEmailResponse} DeleteSecondaryEmailResponse instance
76286
+ */
76287
+ DeleteSecondaryEmailResponse.create = function create(properties) {
76288
+ return new DeleteSecondaryEmailResponse(properties);
76289
+ };
76290
+
76291
+ /**
76292
+ * Encodes the specified DeleteSecondaryEmailResponse message. Does not implicitly {@link DeleteSecondaryEmailResponse.verify|verify} messages.
76293
+ * @function encode
76294
+ * @memberof DeleteSecondaryEmailResponse
76295
+ * @static
76296
+ * @param {IDeleteSecondaryEmailResponse} message DeleteSecondaryEmailResponse message or plain object to encode
76297
+ * @param {$protobuf.Writer} [writer] Writer to encode to
76298
+ * @returns {$protobuf.Writer} Writer
76299
+ */
76300
+ DeleteSecondaryEmailResponse.encode = function encode(message, writer) {
76301
+ if (!writer)
76302
+ writer = $Writer.create();
76303
+ if (message.status != null && message.hasOwnProperty("status"))
76304
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status);
76305
+ if (message.errors != null && message.errors.length)
76306
+ for (var i = 0; i < message.errors.length; ++i)
76307
+ $root.Error.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
76308
+ if (message.user != null && message.hasOwnProperty("user"))
76309
+ $root.User.encode(message.user, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
76310
+ return writer;
76311
+ };
76312
+
76313
+ /**
76314
+ * Encodes the specified DeleteSecondaryEmailResponse message, length delimited. Does not implicitly {@link DeleteSecondaryEmailResponse.verify|verify} messages.
76315
+ * @function encodeDelimited
76316
+ * @memberof DeleteSecondaryEmailResponse
76317
+ * @static
76318
+ * @param {IDeleteSecondaryEmailResponse} message DeleteSecondaryEmailResponse message or plain object to encode
76319
+ * @param {$protobuf.Writer} [writer] Writer to encode to
76320
+ * @returns {$protobuf.Writer} Writer
76321
+ */
76322
+ DeleteSecondaryEmailResponse.encodeDelimited = function encodeDelimited(message, writer) {
76323
+ return this.encode(message, writer).ldelim();
76324
+ };
76325
+
76326
+ /**
76327
+ * Decodes a DeleteSecondaryEmailResponse message from the specified reader or buffer.
76328
+ * @function decode
76329
+ * @memberof DeleteSecondaryEmailResponse
76330
+ * @static
76331
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
76332
+ * @param {number} [length] Message length if known beforehand
76333
+ * @returns {DeleteSecondaryEmailResponse} DeleteSecondaryEmailResponse
76334
+ * @throws {Error} If the payload is not a reader or valid buffer
76335
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
76336
+ */
76337
+ DeleteSecondaryEmailResponse.decode = function decode(reader, length) {
76338
+ if (!(reader instanceof $Reader))
76339
+ reader = $Reader.create(reader);
76340
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.DeleteSecondaryEmailResponse();
76341
+ while (reader.pos < end) {
76342
+ var tag = reader.uint32();
76343
+ switch (tag >>> 3) {
76344
+ case 1:
76345
+ message.status = reader.int32();
76346
+ break;
76347
+ case 2:
76348
+ if (!(message.errors && message.errors.length))
76349
+ message.errors = [];
76350
+ message.errors.push($root.Error.decode(reader, reader.uint32()));
76351
+ break;
76352
+ case 3:
76353
+ message.user = $root.User.decode(reader, reader.uint32());
76354
+ break;
76355
+ default:
76356
+ reader.skipType(tag & 7);
76357
+ break;
76358
+ }
76359
+ }
76360
+ return message;
76361
+ };
76362
+
76363
+ /**
76364
+ * Decodes a DeleteSecondaryEmailResponse message from the specified reader or buffer, length delimited.
76365
+ * @function decodeDelimited
76366
+ * @memberof DeleteSecondaryEmailResponse
76367
+ * @static
76368
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
76369
+ * @returns {DeleteSecondaryEmailResponse} DeleteSecondaryEmailResponse
76370
+ * @throws {Error} If the payload is not a reader or valid buffer
76371
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
76372
+ */
76373
+ DeleteSecondaryEmailResponse.decodeDelimited = function decodeDelimited(reader) {
76374
+ if (!(reader instanceof $Reader))
76375
+ reader = new $Reader(reader);
76376
+ return this.decode(reader, reader.uint32());
76377
+ };
76378
+
76379
+ /**
76380
+ * Verifies a DeleteSecondaryEmailResponse message.
76381
+ * @function verify
76382
+ * @memberof DeleteSecondaryEmailResponse
76383
+ * @static
76384
+ * @param {Object.<string,*>} message Plain object to verify
76385
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
76386
+ */
76387
+ DeleteSecondaryEmailResponse.verify = function verify(message) {
76388
+ if (typeof message !== "object" || message === null)
76389
+ return "object expected";
76390
+ if (message.status != null && message.hasOwnProperty("status"))
76391
+ switch (message.status) {
76392
+ default:
76393
+ return "status: enum value expected";
76394
+ case 0:
76395
+ case 200:
76396
+ case 400:
76397
+ case 401:
76398
+ case 403:
76399
+ case 422:
76400
+ case 500:
76401
+ case 504:
76402
+ break;
76403
+ }
76404
+ if (message.errors != null && message.hasOwnProperty("errors")) {
76405
+ if (!Array.isArray(message.errors))
76406
+ return "errors: array expected";
76407
+ for (var i = 0; i < message.errors.length; ++i) {
76408
+ var error = $root.Error.verify(message.errors[i]);
76409
+ if (error)
76410
+ return "errors." + error;
76411
+ }
76412
+ }
76413
+ if (message.user != null && message.hasOwnProperty("user")) {
76414
+ var error = $root.User.verify(message.user);
76415
+ if (error)
76416
+ return "user." + error;
76417
+ }
76418
+ return null;
76419
+ };
76420
+
76421
+ /**
76422
+ * Creates a DeleteSecondaryEmailResponse message from a plain object. Also converts values to their respective internal types.
76423
+ * @function fromObject
76424
+ * @memberof DeleteSecondaryEmailResponse
76425
+ * @static
76426
+ * @param {Object.<string,*>} object Plain object
76427
+ * @returns {DeleteSecondaryEmailResponse} DeleteSecondaryEmailResponse
76428
+ */
76429
+ DeleteSecondaryEmailResponse.fromObject = function fromObject(object) {
76430
+ if (object instanceof $root.DeleteSecondaryEmailResponse)
76431
+ return object;
76432
+ var message = new $root.DeleteSecondaryEmailResponse();
76433
+ switch (object.status) {
76434
+ case "UNKNOWN_CODE":
76435
+ case 0:
76436
+ message.status = 0;
76437
+ break;
76438
+ case "OK":
76439
+ case 200:
76440
+ message.status = 200;
76441
+ break;
76442
+ case "BAD_REQUEST":
76443
+ case 400:
76444
+ message.status = 400;
76445
+ break;
76446
+ case "UNAUTHORIZED":
76447
+ case 401:
76448
+ message.status = 401;
76449
+ break;
76450
+ case "FORBIDDEN":
76451
+ case 403:
76452
+ message.status = 403;
76453
+ break;
76454
+ case "UNPROCESSABLE_ENTITY":
76455
+ case 422:
76456
+ message.status = 422;
76457
+ break;
76458
+ case "INTERNAL_SERVER_ERROR":
76459
+ case 500:
76460
+ message.status = 500;
76461
+ break;
76462
+ case "GATEWAY_TIMEOUT":
76463
+ case 504:
76464
+ message.status = 504;
76465
+ break;
76466
+ }
76467
+ if (object.errors) {
76468
+ if (!Array.isArray(object.errors))
76469
+ throw TypeError(".DeleteSecondaryEmailResponse.errors: array expected");
76470
+ message.errors = [];
76471
+ for (var i = 0; i < object.errors.length; ++i) {
76472
+ if (typeof object.errors[i] !== "object")
76473
+ throw TypeError(".DeleteSecondaryEmailResponse.errors: object expected");
76474
+ message.errors[i] = $root.Error.fromObject(object.errors[i]);
76475
+ }
76476
+ }
76477
+ if (object.user != null) {
76478
+ if (typeof object.user !== "object")
76479
+ throw TypeError(".DeleteSecondaryEmailResponse.user: object expected");
76480
+ message.user = $root.User.fromObject(object.user);
76481
+ }
76482
+ return message;
76483
+ };
76484
+
76485
+ /**
76486
+ * Creates a plain object from a DeleteSecondaryEmailResponse message. Also converts values to other types if specified.
76487
+ * @function toObject
76488
+ * @memberof DeleteSecondaryEmailResponse
76489
+ * @static
76490
+ * @param {DeleteSecondaryEmailResponse} message DeleteSecondaryEmailResponse
76491
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
76492
+ * @returns {Object.<string,*>} Plain object
76493
+ */
76494
+ DeleteSecondaryEmailResponse.toObject = function toObject(message, options) {
76495
+ if (!options)
76496
+ options = {};
76497
+ var object = {};
76498
+ if (options.arrays || options.defaults)
76499
+ object.errors = [];
76500
+ if (options.defaults) {
76501
+ object.status = options.enums === String ? "UNKNOWN_CODE" : 0;
76502
+ object.user = null;
76503
+ }
76504
+ if (message.status != null && message.hasOwnProperty("status"))
76505
+ object.status = options.enums === String ? $root.StatusCode[message.status] : message.status;
76506
+ if (message.errors && message.errors.length) {
76507
+ object.errors = [];
76508
+ for (var j = 0; j < message.errors.length; ++j)
76509
+ object.errors[j] = $root.Error.toObject(message.errors[j], options);
76510
+ }
76511
+ if (message.user != null && message.hasOwnProperty("user"))
76512
+ object.user = $root.User.toObject(message.user, options);
76513
+ return object;
76514
+ };
76515
+
76516
+ /**
76517
+ * Converts this DeleteSecondaryEmailResponse to JSON.
76518
+ * @function toJSON
76519
+ * @memberof DeleteSecondaryEmailResponse
76520
+ * @instance
76521
+ * @returns {Object.<string,*>} JSON object
76522
+ */
76523
+ DeleteSecondaryEmailResponse.prototype.toJSON = function toJSON() {
76524
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
76525
+ };
76526
+
76527
+ return DeleteSecondaryEmailResponse;
76528
+ })();
76529
+
76530
+ $root.MakeSecondaryEmailPrimaryRequest = (function() {
76531
+
76532
+ /**
76533
+ * Properties of a MakeSecondaryEmailPrimaryRequest.
76534
+ * @exports IMakeSecondaryEmailPrimaryRequest
76535
+ * @interface IMakeSecondaryEmailPrimaryRequest
76536
+ * @property {string|null} [spanContext] MakeSecondaryEmailPrimaryRequest spanContext
76537
+ * @property {string|null} [email] MakeSecondaryEmailPrimaryRequest email
76538
+ * @property {string|null} [userId] MakeSecondaryEmailPrimaryRequest userId
76539
+ */
76540
+
76541
+ /**
76542
+ * Constructs a new MakeSecondaryEmailPrimaryRequest.
76543
+ * @exports MakeSecondaryEmailPrimaryRequest
76544
+ * @classdesc Represents a MakeSecondaryEmailPrimaryRequest.
76545
+ * @implements IMakeSecondaryEmailPrimaryRequest
76546
+ * @constructor
76547
+ * @param {IMakeSecondaryEmailPrimaryRequest=} [properties] Properties to set
76548
+ */
76549
+ function MakeSecondaryEmailPrimaryRequest(properties) {
76550
+ if (properties)
76551
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
76552
+ if (properties[keys[i]] != null)
76553
+ this[keys[i]] = properties[keys[i]];
76554
+ }
76555
+
76556
+ /**
76557
+ * MakeSecondaryEmailPrimaryRequest spanContext.
76558
+ * @member {string} spanContext
76559
+ * @memberof MakeSecondaryEmailPrimaryRequest
76560
+ * @instance
76561
+ */
76562
+ MakeSecondaryEmailPrimaryRequest.prototype.spanContext = "";
76563
+
76564
+ /**
76565
+ * MakeSecondaryEmailPrimaryRequest email.
76566
+ * @member {string} email
76567
+ * @memberof MakeSecondaryEmailPrimaryRequest
76568
+ * @instance
76569
+ */
76570
+ MakeSecondaryEmailPrimaryRequest.prototype.email = "";
76571
+
76572
+ /**
76573
+ * MakeSecondaryEmailPrimaryRequest userId.
76574
+ * @member {string} userId
76575
+ * @memberof MakeSecondaryEmailPrimaryRequest
76576
+ * @instance
76577
+ */
76578
+ MakeSecondaryEmailPrimaryRequest.prototype.userId = "";
76579
+
76580
+ /**
76581
+ * Creates a new MakeSecondaryEmailPrimaryRequest instance using the specified properties.
76582
+ * @function create
76583
+ * @memberof MakeSecondaryEmailPrimaryRequest
76584
+ * @static
76585
+ * @param {IMakeSecondaryEmailPrimaryRequest=} [properties] Properties to set
76586
+ * @returns {MakeSecondaryEmailPrimaryRequest} MakeSecondaryEmailPrimaryRequest instance
76587
+ */
76588
+ MakeSecondaryEmailPrimaryRequest.create = function create(properties) {
76589
+ return new MakeSecondaryEmailPrimaryRequest(properties);
76590
+ };
76591
+
76592
+ /**
76593
+ * Encodes the specified MakeSecondaryEmailPrimaryRequest message. Does not implicitly {@link MakeSecondaryEmailPrimaryRequest.verify|verify} messages.
76594
+ * @function encode
76595
+ * @memberof MakeSecondaryEmailPrimaryRequest
76596
+ * @static
76597
+ * @param {IMakeSecondaryEmailPrimaryRequest} message MakeSecondaryEmailPrimaryRequest message or plain object to encode
76598
+ * @param {$protobuf.Writer} [writer] Writer to encode to
76599
+ * @returns {$protobuf.Writer} Writer
76600
+ */
76601
+ MakeSecondaryEmailPrimaryRequest.encode = function encode(message, writer) {
76602
+ if (!writer)
76603
+ writer = $Writer.create();
76604
+ if (message.spanContext != null && message.hasOwnProperty("spanContext"))
76605
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.spanContext);
76606
+ if (message.email != null && message.hasOwnProperty("email"))
76607
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.email);
76608
+ if (message.userId != null && message.hasOwnProperty("userId"))
76609
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.userId);
76610
+ return writer;
76611
+ };
76612
+
76613
+ /**
76614
+ * Encodes the specified MakeSecondaryEmailPrimaryRequest message, length delimited. Does not implicitly {@link MakeSecondaryEmailPrimaryRequest.verify|verify} messages.
76615
+ * @function encodeDelimited
76616
+ * @memberof MakeSecondaryEmailPrimaryRequest
76617
+ * @static
76618
+ * @param {IMakeSecondaryEmailPrimaryRequest} message MakeSecondaryEmailPrimaryRequest message or plain object to encode
76619
+ * @param {$protobuf.Writer} [writer] Writer to encode to
76620
+ * @returns {$protobuf.Writer} Writer
76621
+ */
76622
+ MakeSecondaryEmailPrimaryRequest.encodeDelimited = function encodeDelimited(message, writer) {
76623
+ return this.encode(message, writer).ldelim();
76624
+ };
76625
+
76626
+ /**
76627
+ * Decodes a MakeSecondaryEmailPrimaryRequest message from the specified reader or buffer.
76628
+ * @function decode
76629
+ * @memberof MakeSecondaryEmailPrimaryRequest
76630
+ * @static
76631
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
76632
+ * @param {number} [length] Message length if known beforehand
76633
+ * @returns {MakeSecondaryEmailPrimaryRequest} MakeSecondaryEmailPrimaryRequest
76634
+ * @throws {Error} If the payload is not a reader or valid buffer
76635
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
76636
+ */
76637
+ MakeSecondaryEmailPrimaryRequest.decode = function decode(reader, length) {
76638
+ if (!(reader instanceof $Reader))
76639
+ reader = $Reader.create(reader);
76640
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.MakeSecondaryEmailPrimaryRequest();
76641
+ while (reader.pos < end) {
76642
+ var tag = reader.uint32();
76643
+ switch (tag >>> 3) {
76644
+ case 1:
76645
+ message.spanContext = reader.string();
76646
+ break;
76647
+ case 2:
76648
+ message.email = reader.string();
76649
+ break;
76650
+ case 3:
76651
+ message.userId = reader.string();
76652
+ break;
76653
+ default:
76654
+ reader.skipType(tag & 7);
76655
+ break;
76656
+ }
76657
+ }
76658
+ return message;
76659
+ };
76660
+
76661
+ /**
76662
+ * Decodes a MakeSecondaryEmailPrimaryRequest message from the specified reader or buffer, length delimited.
76663
+ * @function decodeDelimited
76664
+ * @memberof MakeSecondaryEmailPrimaryRequest
76665
+ * @static
76666
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
76667
+ * @returns {MakeSecondaryEmailPrimaryRequest} MakeSecondaryEmailPrimaryRequest
76668
+ * @throws {Error} If the payload is not a reader or valid buffer
76669
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
76670
+ */
76671
+ MakeSecondaryEmailPrimaryRequest.decodeDelimited = function decodeDelimited(reader) {
76672
+ if (!(reader instanceof $Reader))
76673
+ reader = new $Reader(reader);
76674
+ return this.decode(reader, reader.uint32());
76675
+ };
76676
+
76677
+ /**
76678
+ * Verifies a MakeSecondaryEmailPrimaryRequest message.
76679
+ * @function verify
76680
+ * @memberof MakeSecondaryEmailPrimaryRequest
76681
+ * @static
76682
+ * @param {Object.<string,*>} message Plain object to verify
76683
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
76684
+ */
76685
+ MakeSecondaryEmailPrimaryRequest.verify = function verify(message) {
76686
+ if (typeof message !== "object" || message === null)
76687
+ return "object expected";
76688
+ if (message.spanContext != null && message.hasOwnProperty("spanContext"))
76689
+ if (!$util.isString(message.spanContext))
76690
+ return "spanContext: string expected";
76691
+ if (message.email != null && message.hasOwnProperty("email"))
76692
+ if (!$util.isString(message.email))
76693
+ return "email: string expected";
76694
+ if (message.userId != null && message.hasOwnProperty("userId"))
76695
+ if (!$util.isString(message.userId))
76696
+ return "userId: string expected";
76697
+ return null;
76698
+ };
76699
+
76700
+ /**
76701
+ * Creates a MakeSecondaryEmailPrimaryRequest message from a plain object. Also converts values to their respective internal types.
76702
+ * @function fromObject
76703
+ * @memberof MakeSecondaryEmailPrimaryRequest
76704
+ * @static
76705
+ * @param {Object.<string,*>} object Plain object
76706
+ * @returns {MakeSecondaryEmailPrimaryRequest} MakeSecondaryEmailPrimaryRequest
76707
+ */
76708
+ MakeSecondaryEmailPrimaryRequest.fromObject = function fromObject(object) {
76709
+ if (object instanceof $root.MakeSecondaryEmailPrimaryRequest)
76710
+ return object;
76711
+ var message = new $root.MakeSecondaryEmailPrimaryRequest();
76712
+ if (object.spanContext != null)
76713
+ message.spanContext = String(object.spanContext);
76714
+ if (object.email != null)
76715
+ message.email = String(object.email);
76716
+ if (object.userId != null)
76717
+ message.userId = String(object.userId);
76718
+ return message;
76719
+ };
76720
+
76721
+ /**
76722
+ * Creates a plain object from a MakeSecondaryEmailPrimaryRequest message. Also converts values to other types if specified.
76723
+ * @function toObject
76724
+ * @memberof MakeSecondaryEmailPrimaryRequest
76725
+ * @static
76726
+ * @param {MakeSecondaryEmailPrimaryRequest} message MakeSecondaryEmailPrimaryRequest
76727
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
76728
+ * @returns {Object.<string,*>} Plain object
76729
+ */
76730
+ MakeSecondaryEmailPrimaryRequest.toObject = function toObject(message, options) {
76731
+ if (!options)
76732
+ options = {};
76733
+ var object = {};
76734
+ if (options.defaults) {
76735
+ object.spanContext = "";
76736
+ object.email = "";
76737
+ object.userId = "";
76738
+ }
76739
+ if (message.spanContext != null && message.hasOwnProperty("spanContext"))
76740
+ object.spanContext = message.spanContext;
76741
+ if (message.email != null && message.hasOwnProperty("email"))
76742
+ object.email = message.email;
76743
+ if (message.userId != null && message.hasOwnProperty("userId"))
76744
+ object.userId = message.userId;
76745
+ return object;
76746
+ };
76747
+
76748
+ /**
76749
+ * Converts this MakeSecondaryEmailPrimaryRequest to JSON.
76750
+ * @function toJSON
76751
+ * @memberof MakeSecondaryEmailPrimaryRequest
76752
+ * @instance
76753
+ * @returns {Object.<string,*>} JSON object
76754
+ */
76755
+ MakeSecondaryEmailPrimaryRequest.prototype.toJSON = function toJSON() {
76756
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
76757
+ };
76758
+
76759
+ return MakeSecondaryEmailPrimaryRequest;
76760
+ })();
76761
+
76762
+ $root.MakeSecondaryEmailPrimaryResponse = (function() {
76763
+
76764
+ /**
76765
+ * Properties of a MakeSecondaryEmailPrimaryResponse.
76766
+ * @exports IMakeSecondaryEmailPrimaryResponse
76767
+ * @interface IMakeSecondaryEmailPrimaryResponse
76768
+ * @property {StatusCode|null} [status] MakeSecondaryEmailPrimaryResponse status
76769
+ * @property {Array.<IError>|null} [errors] MakeSecondaryEmailPrimaryResponse errors
76770
+ * @property {IUser|null} [user] MakeSecondaryEmailPrimaryResponse user
76771
+ */
76772
+
76773
+ /**
76774
+ * Constructs a new MakeSecondaryEmailPrimaryResponse.
76775
+ * @exports MakeSecondaryEmailPrimaryResponse
76776
+ * @classdesc Represents a MakeSecondaryEmailPrimaryResponse.
76777
+ * @implements IMakeSecondaryEmailPrimaryResponse
76778
+ * @constructor
76779
+ * @param {IMakeSecondaryEmailPrimaryResponse=} [properties] Properties to set
76780
+ */
76781
+ function MakeSecondaryEmailPrimaryResponse(properties) {
76782
+ this.errors = [];
76783
+ if (properties)
76784
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
76785
+ if (properties[keys[i]] != null)
76786
+ this[keys[i]] = properties[keys[i]];
76787
+ }
76788
+
76789
+ /**
76790
+ * MakeSecondaryEmailPrimaryResponse status.
76791
+ * @member {StatusCode} status
76792
+ * @memberof MakeSecondaryEmailPrimaryResponse
76793
+ * @instance
76794
+ */
76795
+ MakeSecondaryEmailPrimaryResponse.prototype.status = 0;
76796
+
76797
+ /**
76798
+ * MakeSecondaryEmailPrimaryResponse errors.
76799
+ * @member {Array.<IError>} errors
76800
+ * @memberof MakeSecondaryEmailPrimaryResponse
76801
+ * @instance
76802
+ */
76803
+ MakeSecondaryEmailPrimaryResponse.prototype.errors = $util.emptyArray;
76804
+
76805
+ /**
76806
+ * MakeSecondaryEmailPrimaryResponse user.
76807
+ * @member {IUser|null|undefined} user
76808
+ * @memberof MakeSecondaryEmailPrimaryResponse
76809
+ * @instance
76810
+ */
76811
+ MakeSecondaryEmailPrimaryResponse.prototype.user = null;
76812
+
76813
+ /**
76814
+ * Creates a new MakeSecondaryEmailPrimaryResponse instance using the specified properties.
76815
+ * @function create
76816
+ * @memberof MakeSecondaryEmailPrimaryResponse
76817
+ * @static
76818
+ * @param {IMakeSecondaryEmailPrimaryResponse=} [properties] Properties to set
76819
+ * @returns {MakeSecondaryEmailPrimaryResponse} MakeSecondaryEmailPrimaryResponse instance
76820
+ */
76821
+ MakeSecondaryEmailPrimaryResponse.create = function create(properties) {
76822
+ return new MakeSecondaryEmailPrimaryResponse(properties);
76823
+ };
76824
+
76825
+ /**
76826
+ * Encodes the specified MakeSecondaryEmailPrimaryResponse message. Does not implicitly {@link MakeSecondaryEmailPrimaryResponse.verify|verify} messages.
76827
+ * @function encode
76828
+ * @memberof MakeSecondaryEmailPrimaryResponse
76829
+ * @static
76830
+ * @param {IMakeSecondaryEmailPrimaryResponse} message MakeSecondaryEmailPrimaryResponse message or plain object to encode
76831
+ * @param {$protobuf.Writer} [writer] Writer to encode to
76832
+ * @returns {$protobuf.Writer} Writer
76833
+ */
76834
+ MakeSecondaryEmailPrimaryResponse.encode = function encode(message, writer) {
76835
+ if (!writer)
76836
+ writer = $Writer.create();
76837
+ if (message.status != null && message.hasOwnProperty("status"))
76838
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status);
76839
+ if (message.errors != null && message.errors.length)
76840
+ for (var i = 0; i < message.errors.length; ++i)
76841
+ $root.Error.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
76842
+ if (message.user != null && message.hasOwnProperty("user"))
76843
+ $root.User.encode(message.user, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
76844
+ return writer;
76845
+ };
76846
+
76847
+ /**
76848
+ * Encodes the specified MakeSecondaryEmailPrimaryResponse message, length delimited. Does not implicitly {@link MakeSecondaryEmailPrimaryResponse.verify|verify} messages.
76849
+ * @function encodeDelimited
76850
+ * @memberof MakeSecondaryEmailPrimaryResponse
76851
+ * @static
76852
+ * @param {IMakeSecondaryEmailPrimaryResponse} message MakeSecondaryEmailPrimaryResponse message or plain object to encode
76853
+ * @param {$protobuf.Writer} [writer] Writer to encode to
76854
+ * @returns {$protobuf.Writer} Writer
76855
+ */
76856
+ MakeSecondaryEmailPrimaryResponse.encodeDelimited = function encodeDelimited(message, writer) {
76857
+ return this.encode(message, writer).ldelim();
76858
+ };
76859
+
76860
+ /**
76861
+ * Decodes a MakeSecondaryEmailPrimaryResponse message from the specified reader or buffer.
76862
+ * @function decode
76863
+ * @memberof MakeSecondaryEmailPrimaryResponse
76864
+ * @static
76865
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
76866
+ * @param {number} [length] Message length if known beforehand
76867
+ * @returns {MakeSecondaryEmailPrimaryResponse} MakeSecondaryEmailPrimaryResponse
76868
+ * @throws {Error} If the payload is not a reader or valid buffer
76869
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
76870
+ */
76871
+ MakeSecondaryEmailPrimaryResponse.decode = function decode(reader, length) {
76872
+ if (!(reader instanceof $Reader))
76873
+ reader = $Reader.create(reader);
76874
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.MakeSecondaryEmailPrimaryResponse();
76875
+ while (reader.pos < end) {
76876
+ var tag = reader.uint32();
76877
+ switch (tag >>> 3) {
76878
+ case 1:
76879
+ message.status = reader.int32();
76880
+ break;
76881
+ case 2:
76882
+ if (!(message.errors && message.errors.length))
76883
+ message.errors = [];
76884
+ message.errors.push($root.Error.decode(reader, reader.uint32()));
76885
+ break;
76886
+ case 3:
76887
+ message.user = $root.User.decode(reader, reader.uint32());
76888
+ break;
76889
+ default:
76890
+ reader.skipType(tag & 7);
76891
+ break;
76892
+ }
76893
+ }
76894
+ return message;
76895
+ };
76896
+
76897
+ /**
76898
+ * Decodes a MakeSecondaryEmailPrimaryResponse message from the specified reader or buffer, length delimited.
76899
+ * @function decodeDelimited
76900
+ * @memberof MakeSecondaryEmailPrimaryResponse
76901
+ * @static
76902
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
76903
+ * @returns {MakeSecondaryEmailPrimaryResponse} MakeSecondaryEmailPrimaryResponse
76904
+ * @throws {Error} If the payload is not a reader or valid buffer
76905
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
76906
+ */
76907
+ MakeSecondaryEmailPrimaryResponse.decodeDelimited = function decodeDelimited(reader) {
76908
+ if (!(reader instanceof $Reader))
76909
+ reader = new $Reader(reader);
76910
+ return this.decode(reader, reader.uint32());
76911
+ };
76912
+
76913
+ /**
76914
+ * Verifies a MakeSecondaryEmailPrimaryResponse message.
76915
+ * @function verify
76916
+ * @memberof MakeSecondaryEmailPrimaryResponse
76917
+ * @static
76918
+ * @param {Object.<string,*>} message Plain object to verify
76919
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
76920
+ */
76921
+ MakeSecondaryEmailPrimaryResponse.verify = function verify(message) {
76922
+ if (typeof message !== "object" || message === null)
76923
+ return "object expected";
76924
+ if (message.status != null && message.hasOwnProperty("status"))
76925
+ switch (message.status) {
76926
+ default:
76927
+ return "status: enum value expected";
76928
+ case 0:
76929
+ case 200:
76930
+ case 400:
76931
+ case 401:
76932
+ case 403:
76933
+ case 422:
76934
+ case 500:
76935
+ case 504:
76936
+ break;
76937
+ }
76938
+ if (message.errors != null && message.hasOwnProperty("errors")) {
76939
+ if (!Array.isArray(message.errors))
76940
+ return "errors: array expected";
76941
+ for (var i = 0; i < message.errors.length; ++i) {
76942
+ var error = $root.Error.verify(message.errors[i]);
76943
+ if (error)
76944
+ return "errors." + error;
76945
+ }
76946
+ }
76947
+ if (message.user != null && message.hasOwnProperty("user")) {
76948
+ var error = $root.User.verify(message.user);
76949
+ if (error)
76950
+ return "user." + error;
76951
+ }
76952
+ return null;
76953
+ };
76954
+
76955
+ /**
76956
+ * Creates a MakeSecondaryEmailPrimaryResponse message from a plain object. Also converts values to their respective internal types.
76957
+ * @function fromObject
76958
+ * @memberof MakeSecondaryEmailPrimaryResponse
76959
+ * @static
76960
+ * @param {Object.<string,*>} object Plain object
76961
+ * @returns {MakeSecondaryEmailPrimaryResponse} MakeSecondaryEmailPrimaryResponse
76962
+ */
76963
+ MakeSecondaryEmailPrimaryResponse.fromObject = function fromObject(object) {
76964
+ if (object instanceof $root.MakeSecondaryEmailPrimaryResponse)
76965
+ return object;
76966
+ var message = new $root.MakeSecondaryEmailPrimaryResponse();
76967
+ switch (object.status) {
76968
+ case "UNKNOWN_CODE":
76969
+ case 0:
76970
+ message.status = 0;
76971
+ break;
76972
+ case "OK":
76973
+ case 200:
76974
+ message.status = 200;
76975
+ break;
76976
+ case "BAD_REQUEST":
76977
+ case 400:
76978
+ message.status = 400;
76979
+ break;
76980
+ case "UNAUTHORIZED":
76981
+ case 401:
76982
+ message.status = 401;
76983
+ break;
76984
+ case "FORBIDDEN":
76985
+ case 403:
76986
+ message.status = 403;
76987
+ break;
76988
+ case "UNPROCESSABLE_ENTITY":
76989
+ case 422:
76990
+ message.status = 422;
76991
+ break;
76992
+ case "INTERNAL_SERVER_ERROR":
76993
+ case 500:
76994
+ message.status = 500;
76995
+ break;
76996
+ case "GATEWAY_TIMEOUT":
76997
+ case 504:
76998
+ message.status = 504;
76999
+ break;
77000
+ }
77001
+ if (object.errors) {
77002
+ if (!Array.isArray(object.errors))
77003
+ throw TypeError(".MakeSecondaryEmailPrimaryResponse.errors: array expected");
77004
+ message.errors = [];
77005
+ for (var i = 0; i < object.errors.length; ++i) {
77006
+ if (typeof object.errors[i] !== "object")
77007
+ throw TypeError(".MakeSecondaryEmailPrimaryResponse.errors: object expected");
77008
+ message.errors[i] = $root.Error.fromObject(object.errors[i]);
77009
+ }
77010
+ }
77011
+ if (object.user != null) {
77012
+ if (typeof object.user !== "object")
77013
+ throw TypeError(".MakeSecondaryEmailPrimaryResponse.user: object expected");
77014
+ message.user = $root.User.fromObject(object.user);
77015
+ }
77016
+ return message;
77017
+ };
77018
+
77019
+ /**
77020
+ * Creates a plain object from a MakeSecondaryEmailPrimaryResponse message. Also converts values to other types if specified.
77021
+ * @function toObject
77022
+ * @memberof MakeSecondaryEmailPrimaryResponse
77023
+ * @static
77024
+ * @param {MakeSecondaryEmailPrimaryResponse} message MakeSecondaryEmailPrimaryResponse
77025
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
77026
+ * @returns {Object.<string,*>} Plain object
77027
+ */
77028
+ MakeSecondaryEmailPrimaryResponse.toObject = function toObject(message, options) {
77029
+ if (!options)
77030
+ options = {};
77031
+ var object = {};
77032
+ if (options.arrays || options.defaults)
77033
+ object.errors = [];
77034
+ if (options.defaults) {
77035
+ object.status = options.enums === String ? "UNKNOWN_CODE" : 0;
77036
+ object.user = null;
77037
+ }
77038
+ if (message.status != null && message.hasOwnProperty("status"))
77039
+ object.status = options.enums === String ? $root.StatusCode[message.status] : message.status;
77040
+ if (message.errors && message.errors.length) {
77041
+ object.errors = [];
77042
+ for (var j = 0; j < message.errors.length; ++j)
77043
+ object.errors[j] = $root.Error.toObject(message.errors[j], options);
77044
+ }
77045
+ if (message.user != null && message.hasOwnProperty("user"))
77046
+ object.user = $root.User.toObject(message.user, options);
77047
+ return object;
77048
+ };
77049
+
77050
+ /**
77051
+ * Converts this MakeSecondaryEmailPrimaryResponse to JSON.
77052
+ * @function toJSON
77053
+ * @memberof MakeSecondaryEmailPrimaryResponse
77054
+ * @instance
77055
+ * @returns {Object.<string,*>} JSON object
77056
+ */
77057
+ MakeSecondaryEmailPrimaryResponse.prototype.toJSON = function toJSON() {
77058
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
77059
+ };
77060
+
77061
+ return MakeSecondaryEmailPrimaryResponse;
77062
+ })();
77063
+
74928
77064
  $root.UpdateBasicUserInfoRequest = (function() {
74929
77065
 
74930
77066
  /**
@@ -78315,6 +80451,138 @@ $root.UserService = (function() {
78315
80451
  * @variation 2
78316
80452
  */
78317
80453
 
80454
+ /**
80455
+ * Callback as used by {@link UserService#addSecondaryEmail}.
80456
+ * @memberof UserService
80457
+ * @typedef addSecondaryEmailCallback
80458
+ * @type {function}
80459
+ * @param {Error|null} error Error, if any
80460
+ * @param {AddSecondaryEmailResponse} [response] AddSecondaryEmailResponse
80461
+ */
80462
+
80463
+ /**
80464
+ * Calls addSecondaryEmail.
80465
+ * @function addSecondaryEmail
80466
+ * @memberof UserService
80467
+ * @instance
80468
+ * @param {IAddSecondaryEmailRequest} request AddSecondaryEmailRequest message or plain object
80469
+ * @param {UserService.addSecondaryEmailCallback} callback Node-style callback called with the error, if any, and AddSecondaryEmailResponse
80470
+ * @returns {undefined}
80471
+ * @variation 1
80472
+ */
80473
+ Object.defineProperty(UserService.prototype.addSecondaryEmail = function addSecondaryEmail(request, callback) {
80474
+ return this.rpcCall(addSecondaryEmail, $root.AddSecondaryEmailRequest, $root.AddSecondaryEmailResponse, request, callback);
80475
+ }, "name", { value: "addSecondaryEmail" });
80476
+
80477
+ /**
80478
+ * Calls addSecondaryEmail.
80479
+ * @function addSecondaryEmail
80480
+ * @memberof UserService
80481
+ * @instance
80482
+ * @param {IAddSecondaryEmailRequest} request AddSecondaryEmailRequest message or plain object
80483
+ * @returns {Promise<AddSecondaryEmailResponse>} Promise
80484
+ * @variation 2
80485
+ */
80486
+
80487
+ /**
80488
+ * Callback as used by {@link UserService#updateSecondaryEmail}.
80489
+ * @memberof UserService
80490
+ * @typedef updateSecondaryEmailCallback
80491
+ * @type {function}
80492
+ * @param {Error|null} error Error, if any
80493
+ * @param {UpdateSecondaryEmailResponse} [response] UpdateSecondaryEmailResponse
80494
+ */
80495
+
80496
+ /**
80497
+ * Calls updateSecondaryEmail.
80498
+ * @function updateSecondaryEmail
80499
+ * @memberof UserService
80500
+ * @instance
80501
+ * @param {IUpdateSecondaryEmailRequest} request UpdateSecondaryEmailRequest message or plain object
80502
+ * @param {UserService.updateSecondaryEmailCallback} callback Node-style callback called with the error, if any, and UpdateSecondaryEmailResponse
80503
+ * @returns {undefined}
80504
+ * @variation 1
80505
+ */
80506
+ Object.defineProperty(UserService.prototype.updateSecondaryEmail = function updateSecondaryEmail(request, callback) {
80507
+ return this.rpcCall(updateSecondaryEmail, $root.UpdateSecondaryEmailRequest, $root.UpdateSecondaryEmailResponse, request, callback);
80508
+ }, "name", { value: "updateSecondaryEmail" });
80509
+
80510
+ /**
80511
+ * Calls updateSecondaryEmail.
80512
+ * @function updateSecondaryEmail
80513
+ * @memberof UserService
80514
+ * @instance
80515
+ * @param {IUpdateSecondaryEmailRequest} request UpdateSecondaryEmailRequest message or plain object
80516
+ * @returns {Promise<UpdateSecondaryEmailResponse>} Promise
80517
+ * @variation 2
80518
+ */
80519
+
80520
+ /**
80521
+ * Callback as used by {@link UserService#deleteSecondaryEmail}.
80522
+ * @memberof UserService
80523
+ * @typedef deleteSecondaryEmailCallback
80524
+ * @type {function}
80525
+ * @param {Error|null} error Error, if any
80526
+ * @param {DeleteSecondaryEmailResponse} [response] DeleteSecondaryEmailResponse
80527
+ */
80528
+
80529
+ /**
80530
+ * Calls deleteSecondaryEmail.
80531
+ * @function deleteSecondaryEmail
80532
+ * @memberof UserService
80533
+ * @instance
80534
+ * @param {IDeleteSecondaryEmailRequest} request DeleteSecondaryEmailRequest message or plain object
80535
+ * @param {UserService.deleteSecondaryEmailCallback} callback Node-style callback called with the error, if any, and DeleteSecondaryEmailResponse
80536
+ * @returns {undefined}
80537
+ * @variation 1
80538
+ */
80539
+ Object.defineProperty(UserService.prototype.deleteSecondaryEmail = function deleteSecondaryEmail(request, callback) {
80540
+ return this.rpcCall(deleteSecondaryEmail, $root.DeleteSecondaryEmailRequest, $root.DeleteSecondaryEmailResponse, request, callback);
80541
+ }, "name", { value: "deleteSecondaryEmail" });
80542
+
80543
+ /**
80544
+ * Calls deleteSecondaryEmail.
80545
+ * @function deleteSecondaryEmail
80546
+ * @memberof UserService
80547
+ * @instance
80548
+ * @param {IDeleteSecondaryEmailRequest} request DeleteSecondaryEmailRequest message or plain object
80549
+ * @returns {Promise<DeleteSecondaryEmailResponse>} Promise
80550
+ * @variation 2
80551
+ */
80552
+
80553
+ /**
80554
+ * Callback as used by {@link UserService#makeSecondaryEmailPrimary}.
80555
+ * @memberof UserService
80556
+ * @typedef makeSecondaryEmailPrimaryCallback
80557
+ * @type {function}
80558
+ * @param {Error|null} error Error, if any
80559
+ * @param {MakeSecondaryEmailPrimaryResponse} [response] MakeSecondaryEmailPrimaryResponse
80560
+ */
80561
+
80562
+ /**
80563
+ * Calls makeSecondaryEmailPrimary.
80564
+ * @function makeSecondaryEmailPrimary
80565
+ * @memberof UserService
80566
+ * @instance
80567
+ * @param {IMakeSecondaryEmailPrimaryRequest} request MakeSecondaryEmailPrimaryRequest message or plain object
80568
+ * @param {UserService.makeSecondaryEmailPrimaryCallback} callback Node-style callback called with the error, if any, and MakeSecondaryEmailPrimaryResponse
80569
+ * @returns {undefined}
80570
+ * @variation 1
80571
+ */
80572
+ Object.defineProperty(UserService.prototype.makeSecondaryEmailPrimary = function makeSecondaryEmailPrimary(request, callback) {
80573
+ return this.rpcCall(makeSecondaryEmailPrimary, $root.MakeSecondaryEmailPrimaryRequest, $root.MakeSecondaryEmailPrimaryResponse, request, callback);
80574
+ }, "name", { value: "makeSecondaryEmailPrimary" });
80575
+
80576
+ /**
80577
+ * Calls makeSecondaryEmailPrimary.
80578
+ * @function makeSecondaryEmailPrimary
80579
+ * @memberof UserService
80580
+ * @instance
80581
+ * @param {IMakeSecondaryEmailPrimaryRequest} request MakeSecondaryEmailPrimaryRequest message or plain object
80582
+ * @returns {Promise<MakeSecondaryEmailPrimaryResponse>} Promise
80583
+ * @variation 2
80584
+ */
80585
+
78318
80586
  /**
78319
80587
  * Callback as used by {@link UserService#deleteUnverifiedUser}.
78320
80588
  * @memberof UserService