io.swagger.models.properties.DateTimeProperty Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swagger-all Show documentation
Show all versions of swagger-all Show documentation
swagger-all is a rebundled verison of Swagger as one OSGi bundle.
The newest version!
package io.swagger.models.properties;
import io.swagger.models.Xml;
import java.util.ArrayList;
import java.util.List;
public class DateTimeProperty extends AbstractProperty implements Property {
protected List _enum;
public DateTimeProperty() {
super.type = "string";
super.format = "date-time";
}
public DateTimeProperty _enum(String value) {
if (this._enum == null) {
this._enum = new ArrayList();
}
if (!_enum.contains(value)) {
_enum.add(value);
}
return this;
}
public DateTimeProperty _enum(List value) {
this._enum = value;
return this;
}
public static boolean isType(String type, String format) {
if ("string".equals(type) && "date-time".equals(format)) {
return true;
} else {
return false;
}
}
public DateTimeProperty xml(Xml xml) {
this.setXml(xml);
return this;
}
public DateTimeProperty example(String example) {
this.setExample(example);
return this;
}
public DateTimeProperty vendorExtension(String key, Object obj) {
this.setVendorExtension(key, obj);
return this;
}
public List getEnum() {
return _enum;
}
public void setEnum(List _enum) {
this._enum = _enum;
}
}