var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
import { ValidationRule } from '../../../ValidationRule';
/**
 * Constructor.
 * @param {ValidationRuleMetaData} ruleInfo
 * @class
 * @extends ValidationRule
 * @author eric.wittmann@gmail.com
 */
var OasInvalidPropertyTypeValidationRule = /** @class */ (function (_super) {
    __extends(OasInvalidPropertyTypeValidationRule, _super);
    function OasInvalidPropertyTypeValidationRule(ruleInfo) {
        return _super.call(this, ruleInfo) || this;
    }
    OasInvalidPropertyTypeValidationRule.ALLOWED_TYPES_$LI$ = function () { if (OasInvalidPropertyTypeValidationRule.ALLOWED_TYPES == null)
        OasInvalidPropertyTypeValidationRule.ALLOWED_TYPES = ["string", "number", "integer", "boolean", "array", "object"]; return OasInvalidPropertyTypeValidationRule.ALLOWED_TYPES; };
    ;
    /**
     * Returns true if the type node has a valid type.
     * @param {string} type
     * @return {boolean} {boolean}
     */
    OasInvalidPropertyTypeValidationRule.prototype.isValidType = function (type) {
        if (this.hasValue(type)) {
            return this.isValidEnumItem(type, OasInvalidPropertyTypeValidationRule.ALLOWED_TYPES_$LI$());
        }
        return true;
    };
    /**
     *
     * @param {OasSchema} node
     */
    OasInvalidPropertyTypeValidationRule.prototype.visitAllOfSchema = function (node) {
        this.visitSchema(node);
    };
    /**
     *
     * @param {Oas30Schema.Oas30AnyOfSchema} node
     */
    OasInvalidPropertyTypeValidationRule.prototype.visitAnyOfSchema = function (node) {
        this.visitSchema(node);
    };
    /**
     *
     * @param {Oas30Schema.Oas30OneOfSchema} node
     */
    OasInvalidPropertyTypeValidationRule.prototype.visitOneOfSchema = function (node) {
        this.visitSchema(node);
    };
    /**
     *
     * @param {Oas30Schema.Oas30NotSchema} node
     */
    OasInvalidPropertyTypeValidationRule.prototype.visitNotSchema = function (node) {
        this.visitSchema(node);
    };
    /**
     *
     * @param {*} node
     */
    OasInvalidPropertyTypeValidationRule.prototype.visitPropertySchema = function (node) {
        this.visitSchema(node);
    };
    /**
     *
     * @param {OasSchema} node
     */
    OasInvalidPropertyTypeValidationRule.prototype.visitItemsSchema = function (node) {
        this.visitSchema(node);
    };
    /**
     *
     * @param {OasSchema} node
     */
    OasInvalidPropertyTypeValidationRule.prototype.visitAdditionalPropertiesSchema = function (node) {
        this.visitSchema(node);
    };
    /**
     *
     * @param {*} node
     */
    OasInvalidPropertyTypeValidationRule.prototype.visitSchemaDefinition = function (node) {
        this.visitSchema(node);
    };
    return OasInvalidPropertyTypeValidationRule;
}(ValidationRule));
export { OasInvalidPropertyTypeValidationRule };
OasInvalidPropertyTypeValidationRule["__class"] = "io.apicurio.datamodels.core.validation.rules.invalid.type.OasInvalidPropertyTypeValidationRule";
OasInvalidPropertyTypeValidationRule["__interfaces"] = ["io.apicurio.datamodels.core.visitors.IVisitor", "io.apicurio.datamodels.asyncapi.v2.visitors.IAai20Visitor", "io.apicurio.datamodels.openapi.v3.visitors.IOas30Visitor", "io.apicurio.datamodels.asyncapi.visitors.IAaiVisitor", "io.apicurio.datamodels.openapi.v2.visitors.IOas20Visitor", "io.apicurio.datamodels.openapi.visitors.IOasVisitor"];
//# sourceMappingURL=OasInvalidPropertyTypeValidationRule.js.map