import * as thrift from "@creditkarma/thrift-server-core" ; export interface IClientId { name ? : string ; } export interface IClientIdArgs { name ? : string ; } export const ClientIdCodec = { encode ( args , output ) { const obj = { name : args . name } ; output . writeStructBegin ( "ClientId" ) ; if ( obj . name != null ) { output . writeFieldBegin ( "name" , thrift . TType . STRING , 1 ) ; output . writeString ( obj . name ) ; output . writeFieldEnd ( ) ; } output . writeFieldStop ( ) ; output . writeStructEnd ( ) ; return ; } , decode ( input ) { let _args = { } ; input . readStructBegin ( ) ; while ( true ) { const ret = input . readFieldBegin ( ) ; const fieldType = ret . fieldType ; const fieldId = ret . fieldId ; if ( fieldType === thrift . TType . STOP ) { break ; } switch ( fieldId ) { case 1 : if ( fieldType === thrift . TType . STRING ) { const value_1 = input . readString ( ) ; _args . name = value_1 ; } else { input . skip ( fieldType ) ; } break ; default : { input . skip ( fieldType ) ; } } input . readFieldEnd ( ) ; } input . readStructEnd ( ) ; return { name : _args . name } ; } } ; export class ClientId extends thrift . StructLike implements IClientId { public name ? : string ; public readonly _annotations : thrift . IThriftAnnotations = { } ; public readonly _fieldAnnotations : thrift . IFieldAnnotations = { } ; constructor ( args = { } ) { super ( ) ; if ( args . name != null ) { const value_2 = args . name ; this . name = value_2 ; } } public static read ( input ) { return new ClientId ( ClientIdCodec . decode ( input ) ) ; } public static write ( args , output ) { return ClientIdCodec . encode ( args , output ) ; } public write ( output ) { return ClientIdCodec . encode ( this , output ) ; } }