/**
 * This file was automatically generated by openapi-codegeneration.
 * DO NOT MODIFY IT BY HAND. Instead, modify the source OpenAPI file,
 * and run openapi-codegeneration to regenerate this file.
 */
import * as BasicValidation from './basicValidation.cjs';
/**
 * This function validates the inputs to listInstitutions()
 */
export function validateListInstitutionsInput() {
    return true;
}
/**
 * This function validates the outputs of listInstitutions()
 */
export function validateListInstitutionsOutput(response) {
    if (response.status < 100 || response.status >= 600)
        return false;
    if (response.status === 200) {
        if (!BasicValidation.validateListInstitutionsResponse200Response(response.body)) {
            validateListInstitutionsOutput.errors = BasicValidation.validateListInstitutionsResponse200Response.errors;
            return false;
        }
        return true;
    }
    if (response.status === 400) {
        return true;
    }
    if (response.status === 401) {
        return true;
    }
    if (response.status === 403) {
        return true;
    }
    if (response.status === 404) {
        return true;
    }
    if (response.status === 500) {
        return true;
    }
    validateListInstitutionsOutput.errors =
        `Response status ${response.status} is unexpected`;
    return false;
}
/**
 * This function validates the inputs to createInstitution()
 */
export function validateCreateInstitutionInput(body) {
    if (!BasicValidation.validateCreateInstitutionBodyRequest(body)) {
        validateCreateInstitutionInput.errors = BasicValidation.validateCreateInstitutionBodyRequest.errors;
        return false;
    }
    return true;
}
/**
 * This function validates the outputs of createInstitution()
 */
export function validateCreateInstitutionOutput(response) {
    if (response.status < 100 || response.status >= 600)
        return false;
    if (response.status === 201) {
        if (!BasicValidation.validateCreateInstitutionResponse201Response(response.body)) {
            validateCreateInstitutionOutput.errors = BasicValidation.validateCreateInstitutionResponse201Response.errors;
            return false;
        }
        return true;
    }
    if (response.status === 400) {
        return true;
    }
    if (response.status === 401) {
        return true;
    }
    if (response.status === 403) {
        return true;
    }
    if (response.status === 404) {
        return true;
    }
    if (response.status === 500) {
        return true;
    }
    validateCreateInstitutionOutput.errors =
        `Response status ${response.status} is unexpected`;
    return false;
}
/**
 * This function validates the inputs to getInstitution()
 */
export function validateGetInstitutionInput(parameters) {
    if (parameters) {
        if (!BasicValidation.validateInstitutionIdRequest(parameters['institution_id'])) {
            validateGetInstitutionInput.errors = BasicValidation.validateInstitutionIdRequest.errors;
            return false;
        }
    }
    else {
        return false;
    }
    return true;
}
/**
 * This function validates the outputs of getInstitution()
 */
export function validateGetInstitutionOutput(response) {
    if (response.status < 100 || response.status >= 600)
        return false;
    if (response.status === 200) {
        if (!BasicValidation.validateGetInstitutionResponse200Response(response.body)) {
            validateGetInstitutionOutput.errors = BasicValidation.validateGetInstitutionResponse200Response.errors;
            return false;
        }
        return true;
    }
    if (response.status === 400) {
        return true;
    }
    if (response.status === 401) {
        return true;
    }
    if (response.status === 403) {
        return true;
    }
    if (response.status === 404) {
        return true;
    }
    if (response.status === 500) {
        return true;
    }
    validateGetInstitutionOutput.errors =
        `Response status ${response.status} is unexpected`;
    return false;
}
/**
 * This function validates the inputs to updateInstitution()
 */
export function validateUpdateInstitutionInput(parameters, body) {
    if (parameters) {
        if (!BasicValidation.validateInstitutionIdRequest(parameters['institution_id'])) {
            validateUpdateInstitutionInput.errors = BasicValidation.validateInstitutionIdRequest.errors;
            return false;
        }
    }
    else {
        return false;
    }
    if (body === undefined) {
        return true;
    }
    if (!BasicValidation.validateUpdateInstitutionBodyRequest(body)) {
        validateUpdateInstitutionInput.errors = BasicValidation.validateUpdateInstitutionBodyRequest.errors;
        return false;
    }
    return true;
}
/**
 * This function validates the outputs of updateInstitution()
 */
export function validateUpdateInstitutionOutput(response) {
    if (response.status < 100 || response.status >= 600)
        return false;
    if (response.status === 200) {
        if (!BasicValidation.validateUpdateInstitutionResponse200Response(response.body)) {
            validateUpdateInstitutionOutput.errors = BasicValidation.validateUpdateInstitutionResponse200Response.errors;
            return false;
        }
        return true;
    }
    if (response.status === 400) {
        return true;
    }
    if (response.status === 401) {
        return true;
    }
    if (response.status === 403) {
        return true;
    }
    if (response.status === 404) {
        return true;
    }
    if (response.status === 500) {
        return true;
    }
    validateUpdateInstitutionOutput.errors =
        `Response status ${response.status} is unexpected`;
    return false;
}
/**
 * This function validates the inputs to deleteInstitution()
 */
export function validateDeleteInstitutionInput(parameters) {
    if (parameters) {
        if (!BasicValidation.validateInstitutionIdRequest(parameters['institution_id'])) {
            validateDeleteInstitutionInput.errors = BasicValidation.validateInstitutionIdRequest.errors;
            return false;
        }
    }
    else {
        return false;
    }
    return true;
}
/**
 * This function validates the outputs of deleteInstitution()
 */
export function validateDeleteInstitutionOutput(response) {
    if (response.status < 100 || response.status >= 600)
        return false;
    if (response.status === 204) {
        return true;
    }
    if (response.status === 400) {
        return true;
    }
    if (response.status === 401) {
        return true;
    }
    if (response.status === 403) {
        return true;
    }
    if (response.status === 404) {
        return true;
    }
    if (response.status === 500) {
        return true;
    }
    validateDeleteInstitutionOutput.errors =
        `Response status ${response.status} is unexpected`;
    return false;
}
/**
 * This function validates the inputs to proxyGet()
 */
export function validateProxyGetInput(parameters) {
    if (parameters) {
        if (!BasicValidation.validateURLRequest(parameters['URL']) &&
            parameters['URL'] !== undefined) {
            validateProxyGetInput.errors = BasicValidation.validateURLRequest.errors;
            return false;
        }
    }
    else {
        if (parameters !== undefined) {
            return false;
        }
    }
    return true;
}
/**
 * This function validates the outputs of proxyGet()
 */
export function validateProxyGetOutput(response) {
    if (response.status < 100 || response.status >= 600)
        return false;
    if (response.status >= 100 && response.status < 200) {
        return true;
    }
    if (response.status >= 200 && response.status < 300) {
        return true;
    }
    if (response.status >= 300 && response.status < 400) {
        return true;
    }
    if (response.status >= 400 && response.status < 500) {
        return true;
    }
    if (response.status >= 500 && response.status < 600) {
        return true;
    }
    validateProxyGetOutput.errors =
        `Response status ${response.status} is unexpected`;
    return false;
}
/**
 * This function validates the inputs to proxyPost()
 */
export function validateProxyPostInput(parameters) {
    if (parameters) {
        if (!BasicValidation.validateURLRequest(parameters['URL']) &&
            parameters['URL'] !== undefined) {
            validateProxyPostInput.errors = BasicValidation.validateURLRequest.errors;
            return false;
        }
    }
    else {
        if (parameters !== undefined) {
            return false;
        }
    }
    return true;
}
/**
 * This function validates the outputs of proxyPost()
 */
export function validateProxyPostOutput(response) {
    if (response.status < 100 || response.status >= 600)
        return false;
    if (response.status >= 100 && response.status < 200) {
        return true;
    }
    if (response.status >= 200 && response.status < 300) {
        return true;
    }
    if (response.status >= 300 && response.status < 400) {
        return true;
    }
    if (response.status >= 400 && response.status < 500) {
        return true;
    }
    if (response.status >= 500 && response.status < 600) {
        return true;
    }
    validateProxyPostOutput.errors =
        `Response status ${response.status} is unexpected`;
    return false;
}
/**
 * This function validates the inputs to proxyPut()
 */
export function validateProxyPutInput(parameters) {
    if (parameters) {
        if (!BasicValidation.validateURLRequest(parameters['URL']) &&
            parameters['URL'] !== undefined) {
            validateProxyPutInput.errors = BasicValidation.validateURLRequest.errors;
            return false;
        }
    }
    else {
        if (parameters !== undefined) {
            return false;
        }
    }
    return true;
}
/**
 * This function validates the outputs of proxyPut()
 */
export function validateProxyPutOutput(response) {
    if (response.status < 100 || response.status >= 600)
        return false;
    if (response.status >= 100 && response.status < 200) {
        return true;
    }
    if (response.status >= 200 && response.status < 300) {
        return true;
    }
    if (response.status >= 300 && response.status < 400) {
        return true;
    }
    if (response.status >= 400 && response.status < 500) {
        return true;
    }
    if (response.status >= 500 && response.status < 600) {
        return true;
    }
    validateProxyPutOutput.errors =
        `Response status ${response.status} is unexpected`;
    return false;
}
/**
 * This function validates the inputs to proxyPatch()
 */
export function validateProxyPatchInput(parameters) {
    if (parameters) {
        if (!BasicValidation.validateURLRequest(parameters['URL']) &&
            parameters['URL'] !== undefined) {
            validateProxyPatchInput.errors = BasicValidation.validateURLRequest.errors;
            return false;
        }
    }
    else {
        if (parameters !== undefined) {
            return false;
        }
    }
    return true;
}
/**
 * This function validates the outputs of proxyPatch()
 */
export function validateProxyPatchOutput(response) {
    if (response.status < 100 || response.status >= 600)
        return false;
    if (response.status >= 100 && response.status < 200) {
        return true;
    }
    if (response.status >= 200 && response.status < 300) {
        return true;
    }
    if (response.status >= 300 && response.status < 400) {
        return true;
    }
    if (response.status >= 400 && response.status < 500) {
        return true;
    }
    if (response.status >= 500 && response.status < 600) {
        return true;
    }
    validateProxyPatchOutput.errors =
        `Response status ${response.status} is unexpected`;
    return false;
}
/**
 * This function validates the inputs to proxyDelete()
 */
export function validateProxyDeleteInput(parameters) {
    if (parameters) {
        if (!BasicValidation.validateURLRequest(parameters['URL']) &&
            parameters['URL'] !== undefined) {
            validateProxyDeleteInput.errors = BasicValidation.validateURLRequest.errors;
            return false;
        }
    }
    else {
        if (parameters !== undefined) {
            return false;
        }
    }
    return true;
}
/**
 * This function validates the outputs of proxyDelete()
 */
export function validateProxyDeleteOutput(response) {
    if (response.status < 100 || response.status >= 600)
        return false;
    if (response.status >= 100 && response.status < 200) {
        return true;
    }
    if (response.status >= 200 && response.status < 300) {
        return true;
    }
    if (response.status >= 300 && response.status < 400) {
        return true;
    }
    if (response.status >= 400 && response.status < 500) {
        return true;
    }
    if (response.status >= 500 && response.status < 600) {
        return true;
    }
    validateProxyDeleteOutput.errors =
        `Response status ${response.status} is unexpected`;
    return false;
}
/**
 * This function validates the inputs to proxyHead()
 */
export function validateProxyHeadInput(parameters) {
    if (parameters) {
        if (!BasicValidation.validateURLRequest(parameters['URL']) &&
            parameters['URL'] !== undefined) {
            validateProxyHeadInput.errors = BasicValidation.validateURLRequest.errors;
            return false;
        }
    }
    else {
        if (parameters !== undefined) {
            return false;
        }
    }
    return true;
}
/**
 * This function validates the outputs of proxyHead()
 */
export function validateProxyHeadOutput(response) {
    if (response.status < 100 || response.status >= 600)
        return false;
    if (response.status >= 100 && response.status < 200) {
        return true;
    }
    if (response.status >= 200 && response.status < 300) {
        return true;
    }
    if (response.status >= 300 && response.status < 400) {
        return true;
    }
    if (response.status >= 400 && response.status < 500) {
        return true;
    }
    if (response.status >= 500 && response.status < 600) {
        return true;
    }
    validateProxyHeadOutput.errors =
        `Response status ${response.status} is unexpected`;
    return false;
}
/**
 * This function validates the inputs to proxyOptions()
 */
export function validateProxyOptionsInput(parameters) {
    if (parameters) {
        if (!BasicValidation.validateURLRequest(parameters['URL']) &&
            parameters['URL'] !== undefined) {
            validateProxyOptionsInput.errors = BasicValidation.validateURLRequest.errors;
            return false;
        }
    }
    else {
        if (parameters !== undefined) {
            return false;
        }
    }
    return true;
}
/**
 * This function validates the outputs of proxyOptions()
 */
export function validateProxyOptionsOutput(response) {
    if (response.status < 100 || response.status >= 600)
        return false;
    if (response.status >= 100 && response.status < 200) {
        return true;
    }
    if (response.status >= 200 && response.status < 300) {
        return true;
    }
    if (response.status >= 300 && response.status < 400) {
        return true;
    }
    if (response.status >= 400 && response.status < 500) {
        return true;
    }
    if (response.status >= 500 && response.status < 600) {
        return true;
    }
    validateProxyOptionsOutput.errors =
        `Response status ${response.status} is unexpected`;
    return false;
}
/**
 * This function validates the inputs to proxyTrace()
 */
export function validateProxyTraceInput(parameters) {
    if (parameters) {
        if (!BasicValidation.validateURLRequest(parameters['URL']) &&
            parameters['URL'] !== undefined) {
            validateProxyTraceInput.errors = BasicValidation.validateURLRequest.errors;
            return false;
        }
    }
    else {
        if (parameters !== undefined) {
            return false;
        }
    }
    return true;
}
/**
 * This function validates the outputs of proxyTrace()
 */
export function validateProxyTraceOutput(response) {
    if (response.status < 100 || response.status >= 600)
        return false;
    if (response.status >= 100 && response.status < 200) {
        return true;
    }
    if (response.status >= 200 && response.status < 300) {
        return true;
    }
    if (response.status >= 300 && response.status < 400) {
        return true;
    }
    if (response.status >= 400 && response.status < 500) {
        return true;
    }
    if (response.status >= 500 && response.status < 600) {
        return true;
    }
    validateProxyTraceOutput.errors =
        `Response status ${response.status} is unexpected`;
    return false;
}
//# sourceMappingURL=requestValidation.js.map