Iterate over models in SchemasStream
[netconf.git] / restconf / restconf-openapi / src / main / java / org / opendaylight / restconf / openapi / model / OpenApiEntity.java
1 /*
2  * Copyright (c) 2023 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.restconf.openapi.model;
9
10 import com.fasterxml.jackson.core.JsonGenerator;
11 import java.io.IOException;
12 import org.eclipse.jdt.annotation.NonNull;
13
14 /**
15  * A response entity for complex generated type.
16  */
17 public abstract sealed class OpenApiEntity permits ComponentsEntity, InfoEntity, OpenApiVersionEntity, OperationEntity,
18         PathEntity, SchemaEntity, SecurityEntity, SecuritySchemesEntity, ServerEntity, ServersEntity {
19     /**
20      * Generate JSON events into specified generator.
21      *
22      * @param generator JsonGenerator to emit events to
23      * @throws IOException when an error occurs
24      */
25     public abstract void generate(@NonNull JsonGenerator generator) throws IOException;
26 }