io.apicurio.datamodels.models.asyncapi.v23.AsyncApi23OneOfMessagesImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apicurio-data-models Show documentation
Show all versions of apicurio-data-models Show documentation
Open Source API Design Studio
The newest version!
package io.apicurio.datamodels.models.asyncapi.v23;
import io.apicurio.datamodels.models.Node;
import io.apicurio.datamodels.models.NodeImpl;
import io.apicurio.datamodels.models.asyncapi.AsyncApiMessage;
import io.apicurio.datamodels.models.asyncapi.v23.visitors.AsyncApi23Visitor;
import io.apicurio.datamodels.models.visitors.Visitor;
import java.util.ArrayList;
import java.util.List;
public class AsyncApi23OneOfMessagesImpl extends NodeImpl implements AsyncApi23OneOfMessages {
private List oneOf;
@Override
public AsyncApi23Message createMessage() {
AsyncApi23MessageImpl node = new AsyncApi23MessageImpl();
node.setParent(this);
return node;
}
@Override
public List getOneOf() {
return oneOf;
}
@Override
public void addOneOf(AsyncApiMessage value) {
if (this.oneOf == null) {
this.oneOf = new ArrayList<>();
}
this.oneOf.add(value);
}
@Override
public void clearOneOf() {
if (this.oneOf != null) {
this.oneOf.clear();
}
}
@Override
public void removeOneOf(AsyncApiMessage value) {
if (this.oneOf != null) {
this.oneOf.remove(value);
}
}
@Override
public void accept(Visitor visitor) {
AsyncApi23Visitor viz = (AsyncApi23Visitor) visitor;
viz.visitOneOfMessages(this);
}
@Override
public Node emptyClone() {
return new AsyncApi23OneOfMessagesImpl();
}
}