class Artifact {
        private String base64;
        private int seed;
        private String finishReason;
    }

    private String result;
    private List<Artifact> artifacts;

    @Override
    public String getOutputText() {
        return artifacts.get(0).base64;
    }

    @Override
    public FinishReason getFinishReason() {<FILL_FUNCTION_BODY>

        switch (artifacts.get(0).finishReason) {
            case "SUCCESS":
                return FinishReason.STOP;
            case "CONTENT_FILTERED":
                return FinishReason.CONTENT_FILTER;
            default:
                throw new IllegalArgumentException("Unknown stop reason: " + artifacts.get(0).finishReason);
        }
    
<no_super_class>