import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js";
import * as __typia_transform__accessExpressionAsString from "typia/lib/internal/_accessExpressionAsString.js";
import * as typia from 'typia';
export const assertSharableCertificateAttributesContentsSchema = (() => { const _io0 = input => "string" === typeof input.certificate && (undefined === input.intermediates || Array.isArray(input.intermediates) && input.intermediates.every(elem => "string" === typeof elem)) && ("object" === typeof input.attributes && null !== input.attributes && false === Array.isArray(input.attributes) && _io1(input.attributes)); const _io1 = input => Object.keys(input).every(key => {
    const value = input[key];
    if (undefined === value)
        return true;
    return "object" === typeof value && null !== value && _iu0(value);
}); const _io2 = input => true === input.sensitive && ("object" === typeof input.value && null !== input.value && _io3(input.value)) && (undefined === input.references || "object" === typeof input.references && null !== input.references && false === Array.isArray(input.references) && _io5(input.references)); const _io3 = input => "string" === typeof input.value && ("object" === typeof input.hash && null !== input.hash && _io4(input.hash)); const _io4 = input => "string" === typeof input.salt; const _io5 = input => Object.keys(input).every(key => {
    const value = input[key];
    if (undefined === value)
        return true;
    return "string" === typeof value;
}); const _io6 = input => false === input.sensitive && "string" === typeof input.value && (undefined === input.references || "object" === typeof input.references && null !== input.references && false === Array.isArray(input.references) && _io7(input.references)); const _io7 = input => Object.keys(input).every(key => {
    const value = input[key];
    if (undefined === value)
        return true;
    return "string" === typeof value;
}); const _iu0 = input => (() => {
    if (false === input.sensitive)
        return _io6(input);
    else if (true === input.sensitive)
        return _io2(input);
    else
        return false;
})(); const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.certificate || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".certificate",
    expected: "string",
    value: input.certificate
}, _errorFactory)) && (undefined === input.intermediates || (Array.isArray(input.intermediates) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".intermediates",
    expected: "(Array<string> | undefined)",
    value: input.intermediates
}, _errorFactory)) && input.intermediates.every((elem, _index2) => "string" === typeof elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".intermediates[" + _index2 + "]",
    expected: "string",
    value: elem
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".intermediates",
    expected: "(Array<string> | undefined)",
    value: input.intermediates
}, _errorFactory)) && (("object" === typeof input.attributes && null !== input.attributes && false === Array.isArray(input.attributes) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".attributes",
    expected: "__type",
    value: input.attributes
}, _errorFactory)) && _ao1(input.attributes, _path + ".attributes", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".attributes",
    expected: "__type",
    value: input.attributes
}, _errorFactory)); const _ao1 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
    const value = input[key];
    if (undefined === value)
        return true;
    return ("object" === typeof value && null !== value || __typia_transform__assertGuard._assertGuard(_exceptionable, {
        method: "typia.createAssert",
        path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
        expected: "(__type.o1 | __type.o5)",
        value: value
    }, _errorFactory)) && _au0(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
        method: "typia.createAssert",
        path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
        expected: "(__type.o1 | __type.o5)",
        value: value
    }, _errorFactory);
}); const _ao2 = (input, _path, _exceptionable = true) => (true === input.sensitive || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".sensitive",
    expected: "true",
    value: input.sensitive
}, _errorFactory)) && (("object" === typeof input.value && null !== input.value || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".value",
    expected: "__type.o2",
    value: input.value
}, _errorFactory)) && _ao3(input.value, _path + ".value", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".value",
    expected: "__type.o2",
    value: input.value
}, _errorFactory)) && (undefined === input.references || ("object" === typeof input.references && null !== input.references && false === Array.isArray(input.references) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".references",
    expected: "(__type.o4 | undefined)",
    value: input.references
}, _errorFactory)) && _ao5(input.references, _path + ".references", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".references",
    expected: "(__type.o4 | undefined)",
    value: input.references
}, _errorFactory)); const _ao3 = (input, _path, _exceptionable = true) => ("string" === typeof input.value || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".value",
    expected: "string",
    value: input.value
}, _errorFactory)) && (("object" === typeof input.hash && null !== input.hash || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".hash",
    expected: "__type.o3",
    value: input.hash
}, _errorFactory)) && _ao4(input.hash, _path + ".hash", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".hash",
    expected: "__type.o3",
    value: input.hash
}, _errorFactory)); const _ao4 = (input, _path, _exceptionable = true) => "string" === typeof input.salt || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".salt",
    expected: "string",
    value: input.salt
}, _errorFactory); const _ao5 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
    const value = input[key];
    if (undefined === value)
        return true;
    return "string" === typeof value || __typia_transform__assertGuard._assertGuard(_exceptionable, {
        method: "typia.createAssert",
        path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
        expected: "string",
        value: value
    }, _errorFactory);
}); const _ao6 = (input, _path, _exceptionable = true) => (false === input.sensitive || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".sensitive",
    expected: "false",
    value: input.sensitive
}, _errorFactory)) && ("string" === typeof input.value || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".value",
    expected: "string",
    value: input.value
}, _errorFactory)) && (undefined === input.references || ("object" === typeof input.references && null !== input.references && false === Array.isArray(input.references) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".references",
    expected: "(__type.o6 | undefined)",
    value: input.references
}, _errorFactory)) && _ao7(input.references, _path + ".references", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".references",
    expected: "(__type.o6 | undefined)",
    value: input.references
}, _errorFactory)); const _ao7 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
    const value = input[key];
    if (undefined === value)
        return true;
    return "string" === typeof value || __typia_transform__assertGuard._assertGuard(_exceptionable, {
        method: "typia.createAssert",
        path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
        expected: "string",
        value: value
    }, _errorFactory);
}); const _au0 = (input, _path, _exceptionable = true) => (() => {
    if (false === input.sensitive)
        return _ao6(input, _path, true && _exceptionable);
    else if (true === input.sensitive)
        return _ao2(input, _path, true && _exceptionable);
    else
        return __typia_transform__assertGuard._assertGuard(_exceptionable, {
            method: "typia.createAssert",
            path: _path,
            expected: "(__type.o5 | __type.o1)",
            value: input
        }, _errorFactory);
})(); const __is = input => "object" === typeof input && null !== input && _io0(input); let _errorFactory; return (input, errorFactory) => {
    if (false === __is(input)) {
        _errorFactory = errorFactory;
        ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || __typia_transform__assertGuard._assertGuard(true, {
            method: "typia.createAssert",
            path: _path + "",
            expected: "SharableCertificateAttributesTypes.ContentsSchema",
            value: input
        }, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
            method: "typia.createAssert",
            path: _path + "",
            expected: "SharableCertificateAttributesTypes.ContentsSchema",
            value: input
        }, _errorFactory))(input, "$input", true);
    }
    return input;
}; })();
//# sourceMappingURL=certificates.generated.js.map