// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. import { TypedMap, Entity, Value, ValueKind, store, Address, Bytes, BigInt, BigDecimal } from "@graphprotocol/graph-ts"; export class User extends Entity { constructor(id: string) { super(); this.set("id", Value.fromString(id)); } save(): void { let id = this.get("id"); assert(id !== null, "Cannot save User entity without an ID"); assert( id.kind == ValueKind.STRING, "Cannot save User entity with non-string ID. " + 'Considering using .toHex() to convert the "id" to a string.' ); store.set("User", id.toString(), this); } static load(id: string): User | null { return store.get("User", id) as User | null; } get id(): string { let value = this.get("id"); return value.toString(); } set id(value: string) { this.set("id", Value.fromString(value)); } get totalInterestPaid(): BigInt { let value = this.get("totalInterestPaid"); return value.toBigInt(); } set totalInterestPaid(value: BigInt) { this.set("totalInterestPaid", Value.fromBigInt(value)); } get receivedAddressList(): Array { let value = this.get("receivedAddressList"); return value.toBytesArray(); } set receivedAddressList(value: Array) { this.set("receivedAddressList", Value.fromBytesArray(value)); } get sentAddressList(): Array { let value = this.get("sentAddressList"); return value.toBytesArray(); } set sentAddressList(value: Array) { this.set("sentAddressList", Value.fromBytesArray(value)); } get receivedLoansList(): Array | null { let value = this.get("receivedLoansList"); if (value === null) { return null; } else { return value.toStringArray(); } } set receivedLoansList(value: Array | null) { if (value === null) { this.unset("receivedLoansList"); } else { this.set( "receivedLoansList", Value.fromStringArray(value as Array) ); } } get sentLoansList(): Array | null { let value = this.get("sentLoansList"); if (value === null) { return null; } else { return value.toStringArray(); } } set sentLoansList(value: Array | null) { if (value === null) { this.unset("sentLoansList"); } else { this.set("sentLoansList", Value.fromStringArray(value as Array)); } } } export class Loan extends Entity { constructor(id: string) { super(); this.set("id", Value.fromString(id)); } save(): void { let id = this.get("id"); assert(id !== null, "Cannot save Loan entity without an ID"); assert( id.kind == ValueKind.STRING, "Cannot save Loan entity with non-string ID. " + 'Considering using .toHex() to convert the "id" to a string.' ); store.set("Loan", id.toString(), this); } static load(id: string): Loan | null { return store.get("Loan", id) as Loan | null; } get id(): string { let value = this.get("id"); return value.toString(); } set id(value: string) { this.set("id", Value.fromString(value)); } get from(): string { let value = this.get("from"); return value.toString(); } set from(value: string) { this.set("from", Value.fromString(value)); } get to(): string { let value = this.get("to"); return value.toString(); } set to(value: string) { this.set("to", Value.fromString(value)); } get timeStarted(): string { let value = this.get("timeStarted"); return value.toString(); } set timeStarted(value: string) { this.set("timeStarted", Value.fromString(value)); } get interestRateFloor(): BigInt { let value = this.get("interestRateFloor"); return value.toBigInt(); } set interestRateFloor(value: BigInt) { this.set("interestRateFloor", Value.fromBigInt(value)); } get sInternalAmount(): BigInt { let value = this.get("sInternalAmount"); return value.toBigInt(); } set sInternalAmount(value: BigInt) { this.set("sInternalAmount", Value.fromBigInt(value)); } get redeemableAmount(): BigInt { let value = this.get("redeemableAmount"); return value.toBigInt(); } set redeemableAmount(value: BigInt) { this.set("redeemableAmount", Value.fromBigInt(value)); } }