class Generation {
        private String id;
        private String text;
        private String finish_reason;
        private List<TokenLikelihood> token_likelihoods;
    }

    private String id;
    private List<Generation> generations;
    private String prompt;


    @Override
    public String getOutputText() {
        return generations.get(0).text;
    }

    @Override
    public FinishReason getFinishReason() {<FILL_FUNCTION_BODY>

        final String finishReason = generations.get(0).finish_reason;
        if ("COMPLETE".equals(finishReason)) {
            return FinishReason.STOP;
        }

        throw new IllegalStateException("Unknown finish reason: " + finishReason);
    
<no_super_class>