static CaptchaValidator getInstance(final GoogleRecaptchaProperties googleRecaptcha) {
        return switch (googleRecaptcha.getVersion()) {
            case GOOGLE_RECAPTCHA_V2 -> new GoogleCaptchaV2Validator(googleRecaptcha);
            case GOOGLE_RECAPTCHA_V3 -> new GoogleCaptchaV3Validator(googleRecaptcha);
            case HCAPTCHA -> new HCaptchaValidator(googleRecaptcha);
            case TURNSTILE -> new TurnstileCaptchaValidator(googleRecaptcha);
            case FRIENDLY_CAPTCHA -> new FriendlyCaptchaValidator(googleRecaptcha);
        };
    }
Gets instance.

@param googleRecaptcha the google recaptcha
@return the instance
support/cas-server-support-captcha-core/src/main/java/org/apereo/cas/web/CaptchaValidator.java