"use strict";
/* tslint:disable */
/**
 * File was automatically generated using json-schema-to-typescript.
 * DO NOT MODIFY IT BY HAND.
 * Instead, modify the source file https://formats.openag.io/oada/resource.schema.json of @oada/formats
 * and run `$ yarn build` to regenerate this file.
 */
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.assert = exports.is = exports.$id = void 0;
// Import packed validation function
const resource_validate_js_1 = __importDefault(require("./resource-validate.js"));
/**
 * $id of the source schema
 * @see {@link https://formats.openag.io/oada/resource.schema.json}
 */
exports.$id = "https://formats.openag.io/oada/resource.schema.json";
/**
 * Returns true if val is a @type Resource, false otherwise
 */
function is(val) {
    return resource_validate_js_1.default(val);
}
exports.is = is;
/**
 * Asserts that val is a @type Resource
 */
function assert(val) {
    if (!resource_validate_js_1.default(val)) {
        throw {
            errors: resource_validate_js_1.default.errors,
            input: val
        };
    }
}
exports.assert = assert;
//# sourceMappingURL=resource.js.map