@miradorlabs/web-grpc 4.20.0 → 4.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,986 @@
1
+ // source: proto/gateway/web/v1/desktop_auth_gateway.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global = globalThis;
17
+
18
+ var google_api_field_behavior_pb = require('../../../../google/api/field_behavior_pb.js');
19
+ goog.object.extend(proto, google_api_field_behavior_pb);
20
+ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
21
+ goog.object.extend(proto, google_protobuf_timestamp_pb);
22
+ var proto_gateway_common_v1_status_pb = require('../../../../proto/gateway/common/v1/status_pb.js');
23
+ goog.object.extend(proto, proto_gateway_common_v1_status_pb);
24
+ goog.exportSymbol('proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest', null, global);
25
+ goog.exportSymbol('proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse', null, global);
26
+ goog.exportSymbol('proto.gateway.web.v1.AuthorizeDesktopLoginRequest', null, global);
27
+ goog.exportSymbol('proto.gateway.web.v1.AuthorizeDesktopLoginResponse', null, global);
28
+ /**
29
+ * Generated by JsPbCodeGenerator.
30
+ * @param {Array=} opt_data Optional initial data array, typically from a
31
+ * server response, or constructed directly in Javascript. The array is used
32
+ * in place and becomes part of the constructed object. It is not cloned.
33
+ * If no data is provided, the constructed object will be empty, but still
34
+ * valid.
35
+ * @extends {jspb.Message}
36
+ * @constructor
37
+ */
38
+ proto.gateway.web.v1.AuthorizeDesktopLoginRequest = function(opt_data) {
39
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
40
+ };
41
+ goog.inherits(proto.gateway.web.v1.AuthorizeDesktopLoginRequest, jspb.Message);
42
+ if (goog.DEBUG && !COMPILED) {
43
+ /**
44
+ * @public
45
+ * @override
46
+ */
47
+ proto.gateway.web.v1.AuthorizeDesktopLoginRequest.displayName = 'proto.gateway.web.v1.AuthorizeDesktopLoginRequest';
48
+ }
49
+ /**
50
+ * Generated by JsPbCodeGenerator.
51
+ * @param {Array=} opt_data Optional initial data array, typically from a
52
+ * server response, or constructed directly in Javascript. The array is used
53
+ * in place and becomes part of the constructed object. It is not cloned.
54
+ * If no data is provided, the constructed object will be empty, but still
55
+ * valid.
56
+ * @extends {jspb.Message}
57
+ * @constructor
58
+ */
59
+ proto.gateway.web.v1.AuthorizeDesktopLoginResponse = function(opt_data) {
60
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
61
+ };
62
+ goog.inherits(proto.gateway.web.v1.AuthorizeDesktopLoginResponse, jspb.Message);
63
+ if (goog.DEBUG && !COMPILED) {
64
+ /**
65
+ * @public
66
+ * @override
67
+ */
68
+ proto.gateway.web.v1.AuthorizeDesktopLoginResponse.displayName = 'proto.gateway.web.v1.AuthorizeDesktopLoginResponse';
69
+ }
70
+ /**
71
+ * Generated by JsPbCodeGenerator.
72
+ * @param {Array=} opt_data Optional initial data array, typically from a
73
+ * server response, or constructed directly in Javascript. The array is used
74
+ * in place and becomes part of the constructed object. It is not cloned.
75
+ * If no data is provided, the constructed object will be empty, but still
76
+ * valid.
77
+ * @extends {jspb.Message}
78
+ * @constructor
79
+ */
80
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest = function(opt_data) {
81
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
82
+ };
83
+ goog.inherits(proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest, jspb.Message);
84
+ if (goog.DEBUG && !COMPILED) {
85
+ /**
86
+ * @public
87
+ * @override
88
+ */
89
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest.displayName = 'proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest';
90
+ }
91
+ /**
92
+ * Generated by JsPbCodeGenerator.
93
+ * @param {Array=} opt_data Optional initial data array, typically from a
94
+ * server response, or constructed directly in Javascript. The array is used
95
+ * in place and becomes part of the constructed object. It is not cloned.
96
+ * If no data is provided, the constructed object will be empty, but still
97
+ * valid.
98
+ * @extends {jspb.Message}
99
+ * @constructor
100
+ */
101
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse = function(opt_data) {
102
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
103
+ };
104
+ goog.inherits(proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse, jspb.Message);
105
+ if (goog.DEBUG && !COMPILED) {
106
+ /**
107
+ * @public
108
+ * @override
109
+ */
110
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.displayName = 'proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse';
111
+ }
112
+
113
+
114
+
115
+ if (jspb.Message.GENERATE_TO_OBJECT) {
116
+ /**
117
+ * Creates an object representation of this proto.
118
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
119
+ * Optional fields that are not set will be set to undefined.
120
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
121
+ * For the list of reserved names please see:
122
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
123
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
124
+ * JSPB instance for transitional soy proto support:
125
+ * http://goto/soy-param-migration
126
+ * @return {!Object}
127
+ */
128
+ proto.gateway.web.v1.AuthorizeDesktopLoginRequest.prototype.toObject = function(opt_includeInstance) {
129
+ return proto.gateway.web.v1.AuthorizeDesktopLoginRequest.toObject(opt_includeInstance, this);
130
+ };
131
+
132
+
133
+ /**
134
+ * Static version of the {@see toObject} method.
135
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
136
+ * the JSPB instance for transitional soy proto support:
137
+ * http://goto/soy-param-migration
138
+ * @param {!proto.gateway.web.v1.AuthorizeDesktopLoginRequest} msg The msg instance to transform.
139
+ * @return {!Object}
140
+ * @suppress {unusedLocalVariables} f is only used for nested messages
141
+ */
142
+ proto.gateway.web.v1.AuthorizeDesktopLoginRequest.toObject = function(includeInstance, msg) {
143
+ var f, obj = {
144
+ organizationId: jspb.Message.getFieldWithDefault(msg, 1, ""),
145
+ codeChallenge: jspb.Message.getFieldWithDefault(msg, 2, ""),
146
+ redirectPort: jspb.Message.getFieldWithDefault(msg, 3, 0),
147
+ label: jspb.Message.getFieldWithDefault(msg, 4, "")
148
+ };
149
+
150
+ if (includeInstance) {
151
+ obj.$jspbMessageInstance = msg;
152
+ }
153
+ return obj;
154
+ };
155
+ }
156
+
157
+
158
+ /**
159
+ * Deserializes binary data (in protobuf wire format).
160
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
161
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopLoginRequest}
162
+ */
163
+ proto.gateway.web.v1.AuthorizeDesktopLoginRequest.deserializeBinary = function(bytes) {
164
+ var reader = new jspb.BinaryReader(bytes);
165
+ var msg = new proto.gateway.web.v1.AuthorizeDesktopLoginRequest;
166
+ return proto.gateway.web.v1.AuthorizeDesktopLoginRequest.deserializeBinaryFromReader(msg, reader);
167
+ };
168
+
169
+
170
+ /**
171
+ * Deserializes binary data (in protobuf wire format) from the
172
+ * given reader into the given message object.
173
+ * @param {!proto.gateway.web.v1.AuthorizeDesktopLoginRequest} msg The message object to deserialize into.
174
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
175
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopLoginRequest}
176
+ */
177
+ proto.gateway.web.v1.AuthorizeDesktopLoginRequest.deserializeBinaryFromReader = function(msg, reader) {
178
+ while (reader.nextField()) {
179
+ if (reader.isEndGroup()) {
180
+ break;
181
+ }
182
+ var field = reader.getFieldNumber();
183
+ switch (field) {
184
+ case 1:
185
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
186
+ msg.setOrganizationId(value);
187
+ break;
188
+ case 2:
189
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
190
+ msg.setCodeChallenge(value);
191
+ break;
192
+ case 3:
193
+ var value = /** @type {number} */ (reader.readInt32());
194
+ msg.setRedirectPort(value);
195
+ break;
196
+ case 4:
197
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
198
+ msg.setLabel(value);
199
+ break;
200
+ default:
201
+ reader.skipField();
202
+ break;
203
+ }
204
+ }
205
+ return msg;
206
+ };
207
+
208
+
209
+ /**
210
+ * Serializes the message to binary data (in protobuf wire format).
211
+ * @return {!Uint8Array}
212
+ */
213
+ proto.gateway.web.v1.AuthorizeDesktopLoginRequest.prototype.serializeBinary = function() {
214
+ var writer = new jspb.BinaryWriter();
215
+ proto.gateway.web.v1.AuthorizeDesktopLoginRequest.serializeBinaryToWriter(this, writer);
216
+ return writer.getResultBuffer();
217
+ };
218
+
219
+
220
+ /**
221
+ * Serializes the given message to binary data (in protobuf wire
222
+ * format), writing to the given BinaryWriter.
223
+ * @param {!proto.gateway.web.v1.AuthorizeDesktopLoginRequest} message
224
+ * @param {!jspb.BinaryWriter} writer
225
+ * @suppress {unusedLocalVariables} f is only used for nested messages
226
+ */
227
+ proto.gateway.web.v1.AuthorizeDesktopLoginRequest.serializeBinaryToWriter = function(message, writer) {
228
+ var f = undefined;
229
+ f = message.getOrganizationId();
230
+ if (f.length > 0) {
231
+ writer.writeString(
232
+ 1,
233
+ f
234
+ );
235
+ }
236
+ f = message.getCodeChallenge();
237
+ if (f.length > 0) {
238
+ writer.writeString(
239
+ 2,
240
+ f
241
+ );
242
+ }
243
+ f = message.getRedirectPort();
244
+ if (f !== 0) {
245
+ writer.writeInt32(
246
+ 3,
247
+ f
248
+ );
249
+ }
250
+ f = message.getLabel();
251
+ if (f.length > 0) {
252
+ writer.writeString(
253
+ 4,
254
+ f
255
+ );
256
+ }
257
+ };
258
+
259
+
260
+ /**
261
+ * optional string organization_id = 1;
262
+ * @return {string}
263
+ */
264
+ proto.gateway.web.v1.AuthorizeDesktopLoginRequest.prototype.getOrganizationId = function() {
265
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
266
+ };
267
+
268
+
269
+ /**
270
+ * @param {string} value
271
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopLoginRequest} returns this
272
+ */
273
+ proto.gateway.web.v1.AuthorizeDesktopLoginRequest.prototype.setOrganizationId = function(value) {
274
+ return jspb.Message.setProto3StringField(this, 1, value);
275
+ };
276
+
277
+
278
+ /**
279
+ * optional string code_challenge = 2;
280
+ * @return {string}
281
+ */
282
+ proto.gateway.web.v1.AuthorizeDesktopLoginRequest.prototype.getCodeChallenge = function() {
283
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
284
+ };
285
+
286
+
287
+ /**
288
+ * @param {string} value
289
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopLoginRequest} returns this
290
+ */
291
+ proto.gateway.web.v1.AuthorizeDesktopLoginRequest.prototype.setCodeChallenge = function(value) {
292
+ return jspb.Message.setProto3StringField(this, 2, value);
293
+ };
294
+
295
+
296
+ /**
297
+ * optional int32 redirect_port = 3;
298
+ * @return {number}
299
+ */
300
+ proto.gateway.web.v1.AuthorizeDesktopLoginRequest.prototype.getRedirectPort = function() {
301
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
302
+ };
303
+
304
+
305
+ /**
306
+ * @param {number} value
307
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopLoginRequest} returns this
308
+ */
309
+ proto.gateway.web.v1.AuthorizeDesktopLoginRequest.prototype.setRedirectPort = function(value) {
310
+ return jspb.Message.setProto3IntField(this, 3, value);
311
+ };
312
+
313
+
314
+ /**
315
+ * optional string label = 4;
316
+ * @return {string}
317
+ */
318
+ proto.gateway.web.v1.AuthorizeDesktopLoginRequest.prototype.getLabel = function() {
319
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
320
+ };
321
+
322
+
323
+ /**
324
+ * @param {string} value
325
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopLoginRequest} returns this
326
+ */
327
+ proto.gateway.web.v1.AuthorizeDesktopLoginRequest.prototype.setLabel = function(value) {
328
+ return jspb.Message.setProto3StringField(this, 4, value);
329
+ };
330
+
331
+
332
+
333
+
334
+
335
+ if (jspb.Message.GENERATE_TO_OBJECT) {
336
+ /**
337
+ * Creates an object representation of this proto.
338
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
339
+ * Optional fields that are not set will be set to undefined.
340
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
341
+ * For the list of reserved names please see:
342
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
343
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
344
+ * JSPB instance for transitional soy proto support:
345
+ * http://goto/soy-param-migration
346
+ * @return {!Object}
347
+ */
348
+ proto.gateway.web.v1.AuthorizeDesktopLoginResponse.prototype.toObject = function(opt_includeInstance) {
349
+ return proto.gateway.web.v1.AuthorizeDesktopLoginResponse.toObject(opt_includeInstance, this);
350
+ };
351
+
352
+
353
+ /**
354
+ * Static version of the {@see toObject} method.
355
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
356
+ * the JSPB instance for transitional soy proto support:
357
+ * http://goto/soy-param-migration
358
+ * @param {!proto.gateway.web.v1.AuthorizeDesktopLoginResponse} msg The msg instance to transform.
359
+ * @return {!Object}
360
+ * @suppress {unusedLocalVariables} f is only used for nested messages
361
+ */
362
+ proto.gateway.web.v1.AuthorizeDesktopLoginResponse.toObject = function(includeInstance, msg) {
363
+ var f, obj = {
364
+ status: (f = msg.getStatus()) && proto_gateway_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
365
+ code: jspb.Message.getFieldWithDefault(msg, 2, ""),
366
+ expiresAt: (f = msg.getExpiresAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
367
+ };
368
+
369
+ if (includeInstance) {
370
+ obj.$jspbMessageInstance = msg;
371
+ }
372
+ return obj;
373
+ };
374
+ }
375
+
376
+
377
+ /**
378
+ * Deserializes binary data (in protobuf wire format).
379
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
380
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopLoginResponse}
381
+ */
382
+ proto.gateway.web.v1.AuthorizeDesktopLoginResponse.deserializeBinary = function(bytes) {
383
+ var reader = new jspb.BinaryReader(bytes);
384
+ var msg = new proto.gateway.web.v1.AuthorizeDesktopLoginResponse;
385
+ return proto.gateway.web.v1.AuthorizeDesktopLoginResponse.deserializeBinaryFromReader(msg, reader);
386
+ };
387
+
388
+
389
+ /**
390
+ * Deserializes binary data (in protobuf wire format) from the
391
+ * given reader into the given message object.
392
+ * @param {!proto.gateway.web.v1.AuthorizeDesktopLoginResponse} msg The message object to deserialize into.
393
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
394
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopLoginResponse}
395
+ */
396
+ proto.gateway.web.v1.AuthorizeDesktopLoginResponse.deserializeBinaryFromReader = function(msg, reader) {
397
+ while (reader.nextField()) {
398
+ if (reader.isEndGroup()) {
399
+ break;
400
+ }
401
+ var field = reader.getFieldNumber();
402
+ switch (field) {
403
+ case 1:
404
+ var value = new proto_gateway_common_v1_status_pb.ResponseStatus;
405
+ reader.readMessage(value,proto_gateway_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
406
+ msg.setStatus(value);
407
+ break;
408
+ case 2:
409
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
410
+ msg.setCode(value);
411
+ break;
412
+ case 3:
413
+ var value = new google_protobuf_timestamp_pb.Timestamp;
414
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
415
+ msg.setExpiresAt(value);
416
+ break;
417
+ default:
418
+ reader.skipField();
419
+ break;
420
+ }
421
+ }
422
+ return msg;
423
+ };
424
+
425
+
426
+ /**
427
+ * Serializes the message to binary data (in protobuf wire format).
428
+ * @return {!Uint8Array}
429
+ */
430
+ proto.gateway.web.v1.AuthorizeDesktopLoginResponse.prototype.serializeBinary = function() {
431
+ var writer = new jspb.BinaryWriter();
432
+ proto.gateway.web.v1.AuthorizeDesktopLoginResponse.serializeBinaryToWriter(this, writer);
433
+ return writer.getResultBuffer();
434
+ };
435
+
436
+
437
+ /**
438
+ * Serializes the given message to binary data (in protobuf wire
439
+ * format), writing to the given BinaryWriter.
440
+ * @param {!proto.gateway.web.v1.AuthorizeDesktopLoginResponse} message
441
+ * @param {!jspb.BinaryWriter} writer
442
+ * @suppress {unusedLocalVariables} f is only used for nested messages
443
+ */
444
+ proto.gateway.web.v1.AuthorizeDesktopLoginResponse.serializeBinaryToWriter = function(message, writer) {
445
+ var f = undefined;
446
+ f = message.getStatus();
447
+ if (f != null) {
448
+ writer.writeMessage(
449
+ 1,
450
+ f,
451
+ proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
452
+ );
453
+ }
454
+ f = message.getCode();
455
+ if (f.length > 0) {
456
+ writer.writeString(
457
+ 2,
458
+ f
459
+ );
460
+ }
461
+ f = message.getExpiresAt();
462
+ if (f != null) {
463
+ writer.writeMessage(
464
+ 3,
465
+ f,
466
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
467
+ );
468
+ }
469
+ };
470
+
471
+
472
+ /**
473
+ * optional gateway.common.v1.ResponseStatus status = 1;
474
+ * @return {?proto.gateway.common.v1.ResponseStatus}
475
+ */
476
+ proto.gateway.web.v1.AuthorizeDesktopLoginResponse.prototype.getStatus = function() {
477
+ return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
478
+ jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
479
+ };
480
+
481
+
482
+ /**
483
+ * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
484
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopLoginResponse} returns this
485
+ */
486
+ proto.gateway.web.v1.AuthorizeDesktopLoginResponse.prototype.setStatus = function(value) {
487
+ return jspb.Message.setWrapperField(this, 1, value);
488
+ };
489
+
490
+
491
+ /**
492
+ * Clears the message field making it undefined.
493
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopLoginResponse} returns this
494
+ */
495
+ proto.gateway.web.v1.AuthorizeDesktopLoginResponse.prototype.clearStatus = function() {
496
+ return this.setStatus(undefined);
497
+ };
498
+
499
+
500
+ /**
501
+ * Returns whether this field is set.
502
+ * @return {boolean}
503
+ */
504
+ proto.gateway.web.v1.AuthorizeDesktopLoginResponse.prototype.hasStatus = function() {
505
+ return jspb.Message.getField(this, 1) != null;
506
+ };
507
+
508
+
509
+ /**
510
+ * optional string code = 2;
511
+ * @return {string}
512
+ */
513
+ proto.gateway.web.v1.AuthorizeDesktopLoginResponse.prototype.getCode = function() {
514
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
515
+ };
516
+
517
+
518
+ /**
519
+ * @param {string} value
520
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopLoginResponse} returns this
521
+ */
522
+ proto.gateway.web.v1.AuthorizeDesktopLoginResponse.prototype.setCode = function(value) {
523
+ return jspb.Message.setProto3StringField(this, 2, value);
524
+ };
525
+
526
+
527
+ /**
528
+ * optional google.protobuf.Timestamp expires_at = 3;
529
+ * @return {?proto.google.protobuf.Timestamp}
530
+ */
531
+ proto.gateway.web.v1.AuthorizeDesktopLoginResponse.prototype.getExpiresAt = function() {
532
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
533
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
534
+ };
535
+
536
+
537
+ /**
538
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
539
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopLoginResponse} returns this
540
+ */
541
+ proto.gateway.web.v1.AuthorizeDesktopLoginResponse.prototype.setExpiresAt = function(value) {
542
+ return jspb.Message.setWrapperField(this, 3, value);
543
+ };
544
+
545
+
546
+ /**
547
+ * Clears the message field making it undefined.
548
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopLoginResponse} returns this
549
+ */
550
+ proto.gateway.web.v1.AuthorizeDesktopLoginResponse.prototype.clearExpiresAt = function() {
551
+ return this.setExpiresAt(undefined);
552
+ };
553
+
554
+
555
+ /**
556
+ * Returns whether this field is set.
557
+ * @return {boolean}
558
+ */
559
+ proto.gateway.web.v1.AuthorizeDesktopLoginResponse.prototype.hasExpiresAt = function() {
560
+ return jspb.Message.getField(this, 3) != null;
561
+ };
562
+
563
+
564
+
565
+
566
+
567
+ if (jspb.Message.GENERATE_TO_OBJECT) {
568
+ /**
569
+ * Creates an object representation of this proto.
570
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
571
+ * Optional fields that are not set will be set to undefined.
572
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
573
+ * For the list of reserved names please see:
574
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
575
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
576
+ * JSPB instance for transitional soy proto support:
577
+ * http://goto/soy-param-migration
578
+ * @return {!Object}
579
+ */
580
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest.prototype.toObject = function(opt_includeInstance) {
581
+ return proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest.toObject(opt_includeInstance, this);
582
+ };
583
+
584
+
585
+ /**
586
+ * Static version of the {@see toObject} method.
587
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
588
+ * the JSPB instance for transitional soy proto support:
589
+ * http://goto/soy-param-migration
590
+ * @param {!proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest} msg The msg instance to transform.
591
+ * @return {!Object}
592
+ * @suppress {unusedLocalVariables} f is only used for nested messages
593
+ */
594
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest.toObject = function(includeInstance, msg) {
595
+ var f, obj = {
596
+ codeChallenge: jspb.Message.getFieldWithDefault(msg, 1, ""),
597
+ redirectPort: jspb.Message.getFieldWithDefault(msg, 2, 0),
598
+ label: jspb.Message.getFieldWithDefault(msg, 3, "")
599
+ };
600
+
601
+ if (includeInstance) {
602
+ obj.$jspbMessageInstance = msg;
603
+ }
604
+ return obj;
605
+ };
606
+ }
607
+
608
+
609
+ /**
610
+ * Deserializes binary data (in protobuf wire format).
611
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
612
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest}
613
+ */
614
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest.deserializeBinary = function(bytes) {
615
+ var reader = new jspb.BinaryReader(bytes);
616
+ var msg = new proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest;
617
+ return proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest.deserializeBinaryFromReader(msg, reader);
618
+ };
619
+
620
+
621
+ /**
622
+ * Deserializes binary data (in protobuf wire format) from the
623
+ * given reader into the given message object.
624
+ * @param {!proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest} msg The message object to deserialize into.
625
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
626
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest}
627
+ */
628
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest.deserializeBinaryFromReader = function(msg, reader) {
629
+ while (reader.nextField()) {
630
+ if (reader.isEndGroup()) {
631
+ break;
632
+ }
633
+ var field = reader.getFieldNumber();
634
+ switch (field) {
635
+ case 1:
636
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
637
+ msg.setCodeChallenge(value);
638
+ break;
639
+ case 2:
640
+ var value = /** @type {number} */ (reader.readInt32());
641
+ msg.setRedirectPort(value);
642
+ break;
643
+ case 3:
644
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
645
+ msg.setLabel(value);
646
+ break;
647
+ default:
648
+ reader.skipField();
649
+ break;
650
+ }
651
+ }
652
+ return msg;
653
+ };
654
+
655
+
656
+ /**
657
+ * Serializes the message to binary data (in protobuf wire format).
658
+ * @return {!Uint8Array}
659
+ */
660
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest.prototype.serializeBinary = function() {
661
+ var writer = new jspb.BinaryWriter();
662
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest.serializeBinaryToWriter(this, writer);
663
+ return writer.getResultBuffer();
664
+ };
665
+
666
+
667
+ /**
668
+ * Serializes the given message to binary data (in protobuf wire
669
+ * format), writing to the given BinaryWriter.
670
+ * @param {!proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest} message
671
+ * @param {!jspb.BinaryWriter} writer
672
+ * @suppress {unusedLocalVariables} f is only used for nested messages
673
+ */
674
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest.serializeBinaryToWriter = function(message, writer) {
675
+ var f = undefined;
676
+ f = message.getCodeChallenge();
677
+ if (f.length > 0) {
678
+ writer.writeString(
679
+ 1,
680
+ f
681
+ );
682
+ }
683
+ f = message.getRedirectPort();
684
+ if (f !== 0) {
685
+ writer.writeInt32(
686
+ 2,
687
+ f
688
+ );
689
+ }
690
+ f = message.getLabel();
691
+ if (f.length > 0) {
692
+ writer.writeString(
693
+ 3,
694
+ f
695
+ );
696
+ }
697
+ };
698
+
699
+
700
+ /**
701
+ * optional string code_challenge = 1;
702
+ * @return {string}
703
+ */
704
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest.prototype.getCodeChallenge = function() {
705
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
706
+ };
707
+
708
+
709
+ /**
710
+ * @param {string} value
711
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest} returns this
712
+ */
713
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest.prototype.setCodeChallenge = function(value) {
714
+ return jspb.Message.setProto3StringField(this, 1, value);
715
+ };
716
+
717
+
718
+ /**
719
+ * optional int32 redirect_port = 2;
720
+ * @return {number}
721
+ */
722
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest.prototype.getRedirectPort = function() {
723
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
724
+ };
725
+
726
+
727
+ /**
728
+ * @param {number} value
729
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest} returns this
730
+ */
731
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest.prototype.setRedirectPort = function(value) {
732
+ return jspb.Message.setProto3IntField(this, 2, value);
733
+ };
734
+
735
+
736
+ /**
737
+ * optional string label = 3;
738
+ * @return {string}
739
+ */
740
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest.prototype.getLabel = function() {
741
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
742
+ };
743
+
744
+
745
+ /**
746
+ * @param {string} value
747
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest} returns this
748
+ */
749
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionRequest.prototype.setLabel = function(value) {
750
+ return jspb.Message.setProto3StringField(this, 3, value);
751
+ };
752
+
753
+
754
+
755
+
756
+
757
+ if (jspb.Message.GENERATE_TO_OBJECT) {
758
+ /**
759
+ * Creates an object representation of this proto.
760
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
761
+ * Optional fields that are not set will be set to undefined.
762
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
763
+ * For the list of reserved names please see:
764
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
765
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
766
+ * JSPB instance for transitional soy proto support:
767
+ * http://goto/soy-param-migration
768
+ * @return {!Object}
769
+ */
770
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.prototype.toObject = function(opt_includeInstance) {
771
+ return proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.toObject(opt_includeInstance, this);
772
+ };
773
+
774
+
775
+ /**
776
+ * Static version of the {@see toObject} method.
777
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
778
+ * the JSPB instance for transitional soy proto support:
779
+ * http://goto/soy-param-migration
780
+ * @param {!proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse} msg The msg instance to transform.
781
+ * @return {!Object}
782
+ * @suppress {unusedLocalVariables} f is only used for nested messages
783
+ */
784
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.toObject = function(includeInstance, msg) {
785
+ var f, obj = {
786
+ status: (f = msg.getStatus()) && proto_gateway_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
787
+ code: jspb.Message.getFieldWithDefault(msg, 2, ""),
788
+ expiresAt: (f = msg.getExpiresAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
789
+ };
790
+
791
+ if (includeInstance) {
792
+ obj.$jspbMessageInstance = msg;
793
+ }
794
+ return obj;
795
+ };
796
+ }
797
+
798
+
799
+ /**
800
+ * Deserializes binary data (in protobuf wire format).
801
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
802
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse}
803
+ */
804
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.deserializeBinary = function(bytes) {
805
+ var reader = new jspb.BinaryReader(bytes);
806
+ var msg = new proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse;
807
+ return proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.deserializeBinaryFromReader(msg, reader);
808
+ };
809
+
810
+
811
+ /**
812
+ * Deserializes binary data (in protobuf wire format) from the
813
+ * given reader into the given message object.
814
+ * @param {!proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse} msg The message object to deserialize into.
815
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
816
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse}
817
+ */
818
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.deserializeBinaryFromReader = function(msg, reader) {
819
+ while (reader.nextField()) {
820
+ if (reader.isEndGroup()) {
821
+ break;
822
+ }
823
+ var field = reader.getFieldNumber();
824
+ switch (field) {
825
+ case 1:
826
+ var value = new proto_gateway_common_v1_status_pb.ResponseStatus;
827
+ reader.readMessage(value,proto_gateway_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
828
+ msg.setStatus(value);
829
+ break;
830
+ case 2:
831
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
832
+ msg.setCode(value);
833
+ break;
834
+ case 3:
835
+ var value = new google_protobuf_timestamp_pb.Timestamp;
836
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
837
+ msg.setExpiresAt(value);
838
+ break;
839
+ default:
840
+ reader.skipField();
841
+ break;
842
+ }
843
+ }
844
+ return msg;
845
+ };
846
+
847
+
848
+ /**
849
+ * Serializes the message to binary data (in protobuf wire format).
850
+ * @return {!Uint8Array}
851
+ */
852
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.prototype.serializeBinary = function() {
853
+ var writer = new jspb.BinaryWriter();
854
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.serializeBinaryToWriter(this, writer);
855
+ return writer.getResultBuffer();
856
+ };
857
+
858
+
859
+ /**
860
+ * Serializes the given message to binary data (in protobuf wire
861
+ * format), writing to the given BinaryWriter.
862
+ * @param {!proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse} message
863
+ * @param {!jspb.BinaryWriter} writer
864
+ * @suppress {unusedLocalVariables} f is only used for nested messages
865
+ */
866
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.serializeBinaryToWriter = function(message, writer) {
867
+ var f = undefined;
868
+ f = message.getStatus();
869
+ if (f != null) {
870
+ writer.writeMessage(
871
+ 1,
872
+ f,
873
+ proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
874
+ );
875
+ }
876
+ f = message.getCode();
877
+ if (f.length > 0) {
878
+ writer.writeString(
879
+ 2,
880
+ f
881
+ );
882
+ }
883
+ f = message.getExpiresAt();
884
+ if (f != null) {
885
+ writer.writeMessage(
886
+ 3,
887
+ f,
888
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
889
+ );
890
+ }
891
+ };
892
+
893
+
894
+ /**
895
+ * optional gateway.common.v1.ResponseStatus status = 1;
896
+ * @return {?proto.gateway.common.v1.ResponseStatus}
897
+ */
898
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.prototype.getStatus = function() {
899
+ return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
900
+ jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
901
+ };
902
+
903
+
904
+ /**
905
+ * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
906
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse} returns this
907
+ */
908
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.prototype.setStatus = function(value) {
909
+ return jspb.Message.setWrapperField(this, 1, value);
910
+ };
911
+
912
+
913
+ /**
914
+ * Clears the message field making it undefined.
915
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse} returns this
916
+ */
917
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.prototype.clearStatus = function() {
918
+ return this.setStatus(undefined);
919
+ };
920
+
921
+
922
+ /**
923
+ * Returns whether this field is set.
924
+ * @return {boolean}
925
+ */
926
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.prototype.hasStatus = function() {
927
+ return jspb.Message.getField(this, 1) != null;
928
+ };
929
+
930
+
931
+ /**
932
+ * optional string code = 2;
933
+ * @return {string}
934
+ */
935
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.prototype.getCode = function() {
936
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
937
+ };
938
+
939
+
940
+ /**
941
+ * @param {string} value
942
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse} returns this
943
+ */
944
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.prototype.setCode = function(value) {
945
+ return jspb.Message.setProto3StringField(this, 2, value);
946
+ };
947
+
948
+
949
+ /**
950
+ * optional google.protobuf.Timestamp expires_at = 3;
951
+ * @return {?proto.google.protobuf.Timestamp}
952
+ */
953
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.prototype.getExpiresAt = function() {
954
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
955
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
956
+ };
957
+
958
+
959
+ /**
960
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
961
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse} returns this
962
+ */
963
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.prototype.setExpiresAt = function(value) {
964
+ return jspb.Message.setWrapperField(this, 3, value);
965
+ };
966
+
967
+
968
+ /**
969
+ * Clears the message field making it undefined.
970
+ * @return {!proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse} returns this
971
+ */
972
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.prototype.clearExpiresAt = function() {
973
+ return this.setExpiresAt(undefined);
974
+ };
975
+
976
+
977
+ /**
978
+ * Returns whether this field is set.
979
+ * @return {boolean}
980
+ */
981
+ proto.gateway.web.v1.AuthorizeDesktopFreshSessionResponse.prototype.hasExpiresAt = function() {
982
+ return jspb.Message.getField(this, 3) != null;
983
+ };
984
+
985
+
986
+ goog.object.extend(exports, proto.gateway.web.v1);