import { HttpStep } from '../../HttpStep.js';
export const NotIncludesAssertionKind = 'HttpAction#NotIncludesAssertion';
/**
 * An assertion that makes sure the input does not include the set value.
 */
export class NotIncludesAssertion extends HttpStep {
    kind = NotIncludesAssertionKind;
    /**
     * The value to search for.
     */
    value;
    constructor(valueOrInit) {
        super();
        if (typeof valueOrInit === 'object') {
            const typed = valueOrInit;
            this.new(typed);
        }
        else if (typeof valueOrInit === 'string') {
            this.new({
                kind: NotIncludesAssertionKind,
                value: valueOrInit,
                enabled: true,
            });
        }
    }
    new(init) {
        super.new(init);
        this.kind = NotIncludesAssertionKind;
        this.value = init.value;
    }
    checkValidity() {
        return !!this.value;
    }
    toJSON() {
        const result = {
            ...super.toJSON(),
            kind: NotIncludesAssertionKind,
        };
        if (this.value) {
            result.value = this.value;
        }
        return result;
    }
}
//# sourceMappingURL=NotIncludesAssertion.js.map