1
1
/* eslint-disable */
2
+ import Long from "long" ;
2
3
import _m0 from "protobufjs/minimal" ;
3
4
import { Struct , Value } from "../google/protobuf/struct" ;
4
5
import { Timestamp } from "../google/protobuf/timestamp" ;
@@ -113,6 +114,7 @@ export enum Domain {
113
114
DOMAIN_CHALLENGE_TRACK = 7 ,
114
115
DOMAIN_CHALLENGE_PHASE = 8 ,
115
116
DOMAIN_CHALLENGE_TIMELINE_TEMPLATE = 9 ,
117
+ DOMAIN_SUBMISSION = 10 ,
116
118
UNRECOGNIZED = - 1 ,
117
119
}
118
120
@@ -148,6 +150,9 @@ export function domainFromJSON(object: any): Domain {
148
150
case 9 :
149
151
case "DOMAIN_CHALLENGE_TIMELINE_TEMPLATE" :
150
152
return Domain . DOMAIN_CHALLENGE_TIMELINE_TEMPLATE ;
153
+ case 10 :
154
+ case "DOMAIN_SUBMISSION" :
155
+ return Domain . DOMAIN_SUBMISSION ;
151
156
case - 1 :
152
157
case "UNRECOGNIZED" :
153
158
default :
@@ -177,6 +182,8 @@ export function domainToJSON(object: Domain): string {
177
182
return "DOMAIN_CHALLENGE_PHASE" ;
178
183
case Domain . DOMAIN_CHALLENGE_TIMELINE_TEMPLATE :
179
184
return "DOMAIN_CHALLENGE_TIMELINE_TEMPLATE" ;
185
+ case Domain . DOMAIN_SUBMISSION :
186
+ return "DOMAIN_SUBMISSION" ;
180
187
case Domain . UNRECOGNIZED :
181
188
default :
182
189
return "UNRECOGNIZED" ;
@@ -199,6 +206,10 @@ export interface ScanResult {
199
206
items : { [ key : string ] : any } [ ] ;
200
207
}
201
208
209
+ export interface CreateResult {
210
+ kind ?: { $case : "integerId" ; integerId : number } | { $case : "stringId" ; stringId : string } ;
211
+ }
212
+
202
213
export interface LookupCriteria {
203
214
key : string ;
204
215
value ?: any ;
@@ -414,6 +425,75 @@ export const ScanResult = {
414
425
} ,
415
426
} ;
416
427
428
+ function createBaseCreateResult ( ) : CreateResult {
429
+ return { kind : undefined } ;
430
+ }
431
+
432
+ export const CreateResult = {
433
+ encode ( message : CreateResult , writer : _m0 . Writer = _m0 . Writer . create ( ) ) : _m0 . Writer {
434
+ if ( message . kind ?. $case === "integerId" ) {
435
+ writer . uint32 ( 8 ) . int64 ( message . kind . integerId ) ;
436
+ }
437
+ if ( message . kind ?. $case === "stringId" ) {
438
+ writer . uint32 ( 18 ) . string ( message . kind . stringId ) ;
439
+ }
440
+ return writer ;
441
+ } ,
442
+
443
+ decode ( input : _m0 . Reader | Uint8Array , length ?: number ) : CreateResult {
444
+ const reader = input instanceof _m0 . Reader ? input : new _m0 . Reader ( input ) ;
445
+ let end = length === undefined ? reader . len : reader . pos + length ;
446
+ const message = createBaseCreateResult ( ) ;
447
+ while ( reader . pos < end ) {
448
+ const tag = reader . uint32 ( ) ;
449
+ switch ( tag >>> 3 ) {
450
+ case 1 :
451
+ message . kind = { $case : "integerId" , integerId : longToNumber ( reader . int64 ( ) as Long ) } ;
452
+ break ;
453
+ case 2 :
454
+ message . kind = { $case : "stringId" , stringId : reader . string ( ) } ;
455
+ break ;
456
+ default :
457
+ reader . skipType ( tag & 7 ) ;
458
+ break ;
459
+ }
460
+ }
461
+ return message ;
462
+ } ,
463
+
464
+ fromJSON ( object : any ) : CreateResult {
465
+ return {
466
+ kind : isSet ( object . integerId )
467
+ ? { $case : "integerId" , integerId : Number ( object . integerId ) }
468
+ : isSet ( object . stringId )
469
+ ? { $case : "stringId" , stringId : String ( object . stringId ) }
470
+ : undefined ,
471
+ } ;
472
+ } ,
473
+
474
+ toJSON ( message : CreateResult ) : unknown {
475
+ const obj : any = { } ;
476
+ message . kind ?. $case === "integerId" && ( obj . integerId = Math . round ( message . kind ?. integerId ) ) ;
477
+ message . kind ?. $case === "stringId" && ( obj . stringId = message . kind ?. stringId ) ;
478
+ return obj ;
479
+ } ,
480
+
481
+ create < I extends Exact < DeepPartial < CreateResult > , I > > ( base ?: I ) : CreateResult {
482
+ return CreateResult . fromPartial ( base ?? { } ) ;
483
+ } ,
484
+
485
+ fromPartial < I extends Exact < DeepPartial < CreateResult > , I > > ( object : I ) : CreateResult {
486
+ const message = createBaseCreateResult ( ) ;
487
+ if ( object . kind ?. $case === "integerId" && object . kind ?. integerId !== undefined && object . kind ?. integerId !== null ) {
488
+ message . kind = { $case : "integerId" , integerId : object . kind . integerId } ;
489
+ }
490
+ if ( object . kind ?. $case === "stringId" && object . kind ?. stringId !== undefined && object . kind ?. stringId !== null ) {
491
+ message . kind = { $case : "stringId" , stringId : object . kind . stringId } ;
492
+ }
493
+ return message ;
494
+ } ,
495
+ } ;
496
+
417
497
function createBaseLookupCriteria ( ) : LookupCriteria {
418
498
return { key : "" , value : undefined } ;
419
499
}
@@ -526,6 +606,25 @@ export const GoogleProtobufTypesPlaceholder = {
526
606
} ,
527
607
} ;
528
608
609
+ declare var self : any | undefined ;
610
+ declare var window : any | undefined ;
611
+ declare var global : any | undefined ;
612
+ var tsProtoGlobalThis : any = ( ( ) => {
613
+ if ( typeof globalThis !== "undefined" ) {
614
+ return globalThis ;
615
+ }
616
+ if ( typeof self !== "undefined" ) {
617
+ return self ;
618
+ }
619
+ if ( typeof window !== "undefined" ) {
620
+ return window ;
621
+ }
622
+ if ( typeof global !== "undefined" ) {
623
+ return global ;
624
+ }
625
+ throw "Unable to locate global object" ;
626
+ } ) ( ) ;
627
+
529
628
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined ;
530
629
531
630
type DeepPartial < T > = T extends Builtin ? T
@@ -551,6 +650,18 @@ function fromTimestamp(t: Timestamp): string {
551
650
return new Date ( millis ) . toISOString ( ) ;
552
651
}
553
652
653
+ function longToNumber ( long : Long ) : number {
654
+ if ( long . gt ( Number . MAX_SAFE_INTEGER ) ) {
655
+ throw new tsProtoGlobalThis . Error ( "Value is larger than Number.MAX_SAFE_INTEGER" ) ;
656
+ }
657
+ return long . toNumber ( ) ;
658
+ }
659
+
660
+ if ( _m0 . util . Long !== Long ) {
661
+ _m0 . util . Long = Long as any ;
662
+ _m0 . configure ( ) ;
663
+ }
664
+
554
665
function isSet ( value : any ) : boolean {
555
666
return value !== null && value !== undefined ;
556
667
}
0 commit comments