com.github.davidmoten.oas3.internal.model.Inheritance Maven / Gradle / Ivy
package com.github.davidmoten.oas3.internal.model;
import java.util.List;
import java.util.Optional;
public final class Inheritance implements Relationship {
private final String from;
private final List to;
private final AssociationType type;
private final Optional propertyName;
public Inheritance(String from, List to, AssociationType type, Optional propertyName) {
this.from = from;
this.to = to;
this.type = type;
this.propertyName = propertyName;
}
public String from() {
return from;
}
public List to() {
return to;
}
public AssociationType type() {
return type;
}
public Optional propertyName() {
return propertyName;
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
b.append("Inheritance [from=");
b.append(from);
b.append(", to=");
b.append(to);
b.append(", type=");
b.append(type);
b.append(", propertyName=");
b.append(propertyName);
b.append("]");
return b.toString();
}
}