class SchemaUnknownException extends ElasticsearchException implements ResourceUnknownException, SchemaScopeException {

    private static final String MESSAGE_TMPL = "Schema '%s' unknown";

    private final String schemaName;

    public static SchemaUnknownException of(String schema, List<String> candidates) {<FILL_FUNCTION_BODY>}

    public SchemaUnknownException(String schema) {
        this(schema, String.format(Locale.ENGLISH, MESSAGE_TMPL, schema));
    }

    private SchemaUnknownException(String schema, String errorMessage) {
        super(errorMessage);
        this.schemaName = schema;
    }

    public SchemaUnknownException(StreamInput in) throws IOException {
        super(in);
        schemaName = in.readString();
    }

    @Override
    public void writeTo(StreamOutput out) throws IOException {
        super.writeTo(out);
        out.writeString(schemaName);
    }

    @Override
    public String getSchemaName() {
        return schemaName;
    }

    @Override
    public HttpErrorStatus httpErrorStatus() {
        return HttpErrorStatus.SCHEMA_UNKNOWN;
    }
}

        switch (candidates.size()) {
            case 0:
                return new SchemaUnknownException(schema);

            case 1:
                return new SchemaUnknownException(
                    schema,
                    "Schema '" + schema + "' unknown. Maybe you meant '" + Identifiers.quoteIfNeeded(candidates.get(0)) + "'");

            default:
                String errorMsg = "Schema '" + schema + "' unknown. Maybe you meant one of: " + candidates.stream()
                    .map(Identifiers::quoteIfNeeded)
                    .collect(Collectors.joining(", "));
                return new SchemaUnknownException(schema, errorMsg);
        }
    
<methods>public void <init>(java.lang.Throwable) ,public transient void <init>(java.lang.String, java.lang.Object[]) ,public transient void <init>(java.lang.String, java.lang.Throwable, java.lang.Object[]) ,public void <init>(org.elasticsearch.common.io.stream.StreamInput) throws java.io.IOException,public void addHeader(java.lang.String, List<java.lang.String>) ,public transient void addMetadata(java.lang.String, java.lang.String[]) ,public void addMetadata(java.lang.String, List<java.lang.String>) ,public static org.elasticsearch.ElasticsearchException fromXContent(org.elasticsearch.common.xcontent.XContentParser) throws java.io.IOException,public static void generateThrowableXContent(org.elasticsearch.common.xcontent.XContentBuilder, org.elasticsearch.common.xcontent.ToXContent.Params, java.lang.Throwable) throws java.io.IOException,public java.lang.String getDetailedMessage() ,public static java.lang.String getExceptionName(java.lang.Throwable) ,public List<java.lang.String> getHeader(java.lang.String) ,public Set<java.lang.String> getHeaderKeys() ,public static int getId(Class<? extends org.elasticsearch.ElasticsearchException>) ,public org.elasticsearch.index.Index getIndex() ,public List<java.lang.String> getMetadata(java.lang.String) ,public Set<java.lang.String> getMetadataKeys() ,public java.lang.Throwable getRootCause() ,public org.elasticsearch.index.shard.ShardId getShardId() ,public io.crate.rest.action.HttpErrorStatus httpErrorStatus() ,public static org.elasticsearch.ElasticsearchException innerFromXContent(org.elasticsearch.common.xcontent.XContentParser, boolean) throws java.io.IOException,public static boolean isRegistered(Class<? extends java.lang.Throwable>, org.elasticsearch.Version) ,public io.crate.protocols.postgres.PGErrorStatus pgErrorStatus() ,public static org.elasticsearch.ElasticsearchException readException(org.elasticsearch.common.io.stream.StreamInput, int) throws java.io.IOException,public static T readStackTrace(T, org.elasticsearch.common.io.stream.StreamInput) throws java.io.IOException,public void setIndex(org.elasticsearch.index.Index) ,public void setIndex(java.lang.String) ,public transient void setResources(java.lang.String, java.lang.String[]) ,public void setShard(org.elasticsearch.index.shard.ShardId) ,public org.elasticsearch.rest.RestStatus status() ,public java.lang.String toString() ,public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder, org.elasticsearch.common.xcontent.ToXContent.Params) throws java.io.IOException,public java.lang.Throwable unwrapCause() ,public static T writeStackTraces(T, org.elasticsearch.common.io.stream.StreamOutput, Writer<java.lang.Throwable>) throws java.io.IOException,public void writeTo(org.elasticsearch.common.io.stream.StreamOutput) throws java.io.IOException<variables>private static final java.lang.String CAUSED_BY,private static final non-sealed Map<Class<? extends org.elasticsearch.ElasticsearchException>,org.elasticsearch.ElasticsearchException.ElasticsearchExceptionHandle> CLASS_TO_ELASTICSEARCH_EXCEPTION_HANDLE,private static final java.lang.String HEADER,private static final non-sealed Map<java.lang.Integer,CheckedFunction<org.elasticsearch.common.io.stream.StreamInput,? extends org.elasticsearch.ElasticsearchException,java.io.IOException>> ID_TO_SUPPLIER,private static final java.lang.String INDEX_METADATA_KEY,private static final java.lang.String INDEX_METADATA_KEY_UUID,private static final java.lang.String REASON,private static final java.lang.String RESOURCE_METADATA_ID_KEY,private static final java.lang.String RESOURCE_METADATA_TYPE_KEY,private static final java.lang.String REST_EXCEPTION_SKIP_CAUSE,private static final boolean REST_EXCEPTION_SKIP_CAUSE_DEFAULT,public static final java.lang.String REST_EXCEPTION_SKIP_STACK_TRACE,public static final boolean REST_EXCEPTION_SKIP_STACK_TRACE_DEFAULT,private static final java.lang.String ROOT_CAUSE,private static final java.lang.String SHARD_METADATA_KEY,private static final java.lang.String STACK_TRACE,private static final org.elasticsearch.common.xcontent.ParseField SUPPRESSED,private static final java.lang.String TYPE,private static final org.elasticsearch.Version UNKNOWN_VERSION_ADDED,private final Map<java.lang.String,List<java.lang.String>> headers,private final Map<java.lang.String,List<java.lang.String>> metadata