11/* eslint-disable */
2- import Long from "long" ;
3- import * as _m0 from "protobufjs/minimal" ;
2+ import _m0 from "protobufjs/minimal" ;
43
54export const protobufPackage = "" ;
65
@@ -100,10 +99,7 @@ function createBaseRobotId(): RobotId {
10099}
101100
102101export const RobotId = {
103- encode (
104- message : RobotId ,
105- writer : _m0 . Writer = _m0 . Writer . create ( )
106- ) : _m0 . Writer {
102+ encode ( message : RobotId , writer : _m0 . Writer = _m0 . Writer . create ( ) ) : _m0 . Writer {
107103 if ( message . id !== 0 ) {
108104 writer . uint32 ( 8 ) . uint32 ( message . id ) ;
109105 }
@@ -114,31 +110,37 @@ export const RobotId = {
114110 } ,
115111
116112 decode ( input : _m0 . Reader | Uint8Array , length ?: number ) : RobotId {
117- const reader = input instanceof _m0 . Reader ? input : new _m0 . Reader ( input ) ;
113+ const reader = input instanceof _m0 . Reader ? input : _m0 . Reader . create ( input ) ;
118114 let end = length === undefined ? reader . len : reader . pos + length ;
119115 const message = createBaseRobotId ( ) ;
120116 while ( reader . pos < end ) {
121117 const tag = reader . uint32 ( ) ;
122118 switch ( tag >>> 3 ) {
123119 case 1 :
120+ if ( tag != 8 ) {
121+ break ;
122+ }
123+
124124 message . id = reader . uint32 ( ) ;
125- break ;
125+ continue ;
126126 case 2 :
127+ if ( tag != 16 ) {
128+ break ;
129+ }
130+
127131 message . team = reader . int32 ( ) as any ;
128- break ;
129- default :
130- reader . skipType ( tag & 7 ) ;
131- break ;
132+ continue ;
132133 }
134+ if ( ( tag & 7 ) == 4 || tag == 0 ) {
135+ break ;
136+ }
137+ reader . skipType ( tag & 7 ) ;
133138 }
134139 return message ;
135140 } ,
136141
137142 fromJSON ( object : any ) : RobotId {
138- return {
139- id : isSet ( object . id ) ? Number ( object . id ) : 0 ,
140- team : isSet ( object . team ) ? teamFromJSON ( object . team ) : 0 ,
141- } ;
143+ return { id : isSet ( object . id ) ? Number ( object . id ) : 0 , team : isSet ( object . team ) ? teamFromJSON ( object . team ) : 0 } ;
142144 } ,
143145
144146 toJSON ( message : RobotId ) : unknown {
@@ -148,6 +150,10 @@ export const RobotId = {
148150 return obj ;
149151 } ,
150152
153+ create < I extends Exact < DeepPartial < RobotId > , I > > ( base ?: I ) : RobotId {
154+ return RobotId . fromPartial ( base ?? { } ) ;
155+ } ,
156+
151157 fromPartial < I extends Exact < DeepPartial < RobotId > , I > > ( object : I ) : RobotId {
152158 const message = createBaseRobotId ( ) ;
153159 message . id = object . id ?? 0 ;
@@ -156,41 +162,17 @@ export const RobotId = {
156162 } ,
157163} ;
158164
159- type Builtin =
160- | Date
161- | Function
162- | Uint8Array
163- | string
164- | number
165- | boolean
166- | undefined ;
167-
168- export type DeepPartial < T > = T extends Builtin
169- ? T
170- : T extends Array < infer U >
171- ? Array < DeepPartial < U > >
172- : T extends ReadonlyArray < infer U >
173- ? ReadonlyArray < DeepPartial < U > >
174- : T extends { $case : string }
175- ? { [ K in keyof Omit < T , "$case" > ] ?: DeepPartial < T [ K ] > } & {
176- $case : T [ "$case" ] ;
177- }
178- : T extends { }
179- ? { [ K in keyof T ] ?: DeepPartial < T [ K ] > }
165+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined ;
166+
167+ export type DeepPartial < T > = T extends Builtin ? T
168+ : T extends Array < infer U > ? Array < DeepPartial < U > > : T extends ReadonlyArray < infer U > ? ReadonlyArray < DeepPartial < U > >
169+ : T extends { $case : string } ? { [ K in keyof Omit < T , "$case" > ] ?: DeepPartial < T [ K ] > } & { $case : T [ "$case" ] }
170+ : T extends { } ? { [ K in keyof T ] ?: DeepPartial < T [ K ] > }
180171 : Partial < T > ;
181172
182173type KeysOfUnion < T > = T extends T ? keyof T : never ;
183- export type Exact < P , I extends P > = P extends Builtin
184- ? P
185- : P & { [ K in keyof P ] : Exact < P [ K ] , I [ K ] > } & Record <
186- Exclude < keyof I , KeysOfUnion < P > > ,
187- never
188- > ;
189-
190- if ( _m0 . util . Long !== Long ) {
191- _m0 . util . Long = Long as any ;
192- _m0 . configure ( ) ;
193- }
174+ export type Exact < P , I extends P > = P extends Builtin ? P
175+ : P & { [ K in keyof P ] : Exact < P [ K ] , I [ K ] > } & { [ K in Exclude < keyof I , KeysOfUnion < P > > ] : never } ;
194176
195177function isSet ( value : any ) : boolean {
196178 return value !== null && value !== undefined ;
0 commit comments