// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. import { TypedMap, Entity, Value, ValueKind, store, Bytes, BigInt, BigDecimal } from "@graphprotocol/graph-ts"; export class MyEntity extends Entity { constructor(id: string) { super(); this.set("id", Value.fromString(id)); } save(): void { let id = this.get("id"); assert(id != null, "Cannot save MyEntity entity without an ID"); if (id) { assert( id.kind == ValueKind.STRING, `Entities of type MyEntity must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` ); store.set("MyEntity", id.toString(), this); } } static load(id: string): MyEntity | null { return changetype(store.get("MyEntity", id)); } get id(): string { let value = this.get("id"); return value!.toString(); } set id(value: string) { this.set("id", Value.fromString(value)); } get x(): BigDecimal { let value = this.get("x"); return value!.toBigDecimal(); } set x(value: BigDecimal) { this.set("x", Value.fromBigDecimal(value)); } }