Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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: {
[name: string]: string;
} = {};
public readonly _fieldAnnotations: {
[fieldName: string]: {
[name: string]: string;
};
} = {};
constructor(args: IClientIdArgs = {}) {
super();
if (args.name != null) {
const value_44: string = args.name;
this.name = value_44;
}
}
}
break;
default: {
input.skip(fieldType);
}
}
input.readFieldEnd();
}
input.readStructEnd();
return {
src: _args.src,
dst: _args.dst
};
}
};
export class Delegation extends thrift.StructLike implements IDelegation {
public src?: string;
public dst?: string;
public readonly _annotations: {
[name: string]: string;
} = {};
public readonly _fieldAnnotations: {
[fieldName: string]: {
[name: string]: string;
};
} = {};
constructor(args: IDelegationArgs = {}) {
super();
if (args.src != null) {
const value_51: string = args.src;
this.src = value_51;
}
break;
default: {
input.skip(fieldType);
}
}
input.readFieldEnd();
}
input.readStructEnd();
return {
ipv4: _args.ipv4,
port: _args.port,
service_name: _args.service_name
};
}
};
export class Endpoint extends thrift.StructLike implements IEndpoint {
public ipv4?: number;
public port?: number;
public service_name?: string;
public readonly _annotations: {
[name: string]: string;
} = {};
public readonly _fieldAnnotations: {
[fieldName: string]: {
[name: string]: string;
};
} = {};
constructor(args: IEndpointArgs = {}) {
super();
if (args.ipv4 != null) {
const value_4: number = args.ipv4;
this.ipv4 = value_4;
break;
default: {
input.skip(fieldType);
}
}
input.readFieldEnd();
}
input.readStructEnd();
return {
ipv4: _args.ipv4,
port: _args.port,
service_name: _args.service_name
};
}
};
export class Endpoint extends thrift.StructLike implements IEndpoint {
public ipv4?: number;
public port?: number;
public service_name?: string;
public readonly _annotations: thrift.IThriftAnnotations = {};
public readonly _fieldAnnotations: thrift.IFieldAnnotations = {};
constructor(args: IEndpointArgs = {}) {
super();
if (args.ipv4 != null) {
const value_4: number = args.ipv4;
this.ipv4 = value_4;
}
if (args.port != null) {
const value_5: number = args.port;
this.port = value_5;
}
if (args.service_name != null) {
break;
default: {
input.skip(fieldType);
}
}
input.readFieldEnd();
}
input.readStructEnd();
return {
timestamp: _args.timestamp,
value: _args.value,
host: _args.host
};
}
};
export class Annotation extends thrift.StructLike implements IAnnotation {
public timestamp?: thrift.Int64;
public value?: string;
public host?: IEndpoint;
public readonly _annotations: {
[name: string]: string;
} = {};
public readonly _fieldAnnotations: {
[fieldName: string]: {
[name: string]: string;
};
} = {};
constructor(args: IAnnotationArgs = {}) {
super();
if (args.timestamp != null) {
const value_10: thrift.Int64 = (typeof args.timestamp === "number" ? new thrift.Int64(args.timestamp) : args.timestamp);
this.timestamp = value_10;
}
break;
default: {
input.skip(fieldType);
}
}
input.readFieldEnd();
}
input.readStructEnd();
return {
src: _args.src,
dst: _args.dst
};
}
};
export class Delegation extends thrift.StructLike implements IDelegation {
public src?: string;
public dst?: string;
public readonly _annotations: thrift.IThriftAnnotations = {};
public readonly _fieldAnnotations: thrift.IFieldAnnotations = {};
constructor(args: IDelegationArgs = {}) {
super();
if (args.src != null) {
const value_3: string = args.src;
this.src = value_3;
}
if (args.dst != null) {
const value_4: string = args.dst;
this.dst = value_4;
}
}
public static read(input: thrift.TProtocol): Delegation {
}
input.readFieldEnd();
}
input.readStructEnd();
return {
trace_id: _args.trace_id,
name: _args.name,
id: _args.id,
parent_id: _args.parent_id,
annotations: _args.annotations,
binary_annotations: _args.binary_annotations,
debug: _args.debug
};
}
};
export class Span extends thrift.StructLike implements ISpan {
public trace_id?: thrift.Int64;
public name?: string;
public id?: thrift.Int64;
public parent_id?: thrift.Int64;
public annotations?: Array;
public binary_annotations?: Array;
public debug?: boolean;
public readonly _annotations: {
[name: string]: string;
} = {};
public readonly _fieldAnnotations: {
[fieldName: string]: {
[name: string]: string;
};
} = {};
constructor(args: ISpanArgs = {}) {
const fieldId: number = ret.fieldId;
if (fieldType === thrift.TType.STOP) {
break;
}
switch (fieldId) {
default: {
input.skip(fieldType);
}
}
input.readFieldEnd();
}
input.readStructEnd();
return {};
}
};
export class ConnectionOptions extends thrift.StructLike implements IConnectionOptions {
public readonly _annotations: {
[name: string]: string;
} = {};
public readonly _fieldAnnotations: {
[fieldName: string]: {
[name: string]: string;
};
} = {};
constructor(args: IConnectionOptionsArgs = {}) {
super();
}
public static read(input: thrift.TProtocol): ConnectionOptions {
return new ConnectionOptions(ConnectionOptionsCodec.decode(input));
}
public static write(args: IConnectionOptionsArgs, output: thrift.TProtocol): void {
return ConnectionOptionsCodec.encode(args, output);
}
break;
default: {
input.skip(fieldType);
}
}
input.readFieldEnd();
}
input.readStructEnd();
return {
spans: _args.spans,
contexts: _args.contexts
};
}
};
export class ResponseHeader extends thrift.StructLike implements IResponseHeader {
public spans?: Array;
public contexts?: Array;
public readonly _annotations: {
[name: string]: string;
} = {};
public readonly _fieldAnnotations: {
[fieldName: string]: {
[name: string]: string;
};
} = {};
constructor(args: IResponseHeaderArgs = {}) {
super();
if (args.spans != null) {
const value_85: Array = new Array();
args.spans.forEach((value_87: ISpanArgs): void => {
const value_88: ISpan = new Span(value_87);
default: {
input.skip(fieldType);
}
}
input.readFieldEnd();
}
input.readStructEnd();
return {
key: _args.key,
value: _args.value,
annotation_type: _args.annotation_type,
host: _args.host
};
}
};
export class BinaryAnnotation extends thrift.StructLike implements IBinaryAnnotation {
public key?: string;
public value?: Buffer;
public annotation_type?: AnnotationType;
public host?: IEndpoint;
public readonly _annotations: {
[name: string]: string;
} = {};
public readonly _fieldAnnotations: {
[fieldName: string]: {
[name: string]: string;
};
} = {};
constructor(args: IBinaryAnnotationArgs = {}) {
super();
if (args.key != null) {
const value_17: string = args.key;