Package io.swagger.models.properties
Class StringProperty
- java.lang.Object
-
- io.swagger.models.properties.AbstractProperty
-
- io.swagger.models.properties.StringProperty
-
- Direct Known Subclasses:
ByteArrayProperty,EmailProperty
public class StringProperty extends AbstractProperty implements Property
The StringProperty class defines properties for strings without a specific format, for standard formats which don't need specific handling, or for custom formats.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStringProperty.Format
-
Field Summary
Fields Modifier and Type Field Description protected String_defaultprotected List<String>_enumprotected IntegermaxLengthprotected IntegerminLengthprotected Stringpatternstatic StringTYPE-
Fields inherited from class io.swagger.models.properties.AbstractProperty
access, allowEmptyValue, booleanValue, description, example, format, name, position, readOnly, required, title, type, vendorExtensions, xml
-
-
Constructor Summary
Constructors Constructor Description StringProperty()StringProperty(StringProperty.Format format)StringProperty(String format)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringProperty_default(String _default)StringProperty_enum(String value)StringProperty_enum(List<String> value)booleanequals(Object obj)StringPropertyexample(String example)StringgetDefault()List<String>getEnum()IntegergetMaxLength()IntegergetMinLength()StringgetPattern()inthashCode()static booleanisType(String type, String format)StringPropertymaxLength(Integer maxLength)StringPropertyminLength(Integer minLength)StringPropertypattern(String pattern)StringPropertyreadOnly()StringPropertyrequired(boolean required)voidsetDefault(String _default)voidsetEnum(List<String> _enum)voidsetMaxLength(Integer maxLength)voidsetMinLength(Integer minLength)voidsetPattern(String pattern)StringPropertyvendorExtension(String key, Object obj)StringPropertyxml(Xml xml)-
Methods inherited from class io.swagger.models.properties.AbstractProperty
allowEmptyValue, description, getAccess, getAllowEmptyValue, getBooleanValue, getDescription, getExample, getFormat, getName, getPosition, getReadOnly, getRequired, getTitle, getType, getVendorExtensions, getXml, rename, setAccess, setAllowEmptyValue, setBooleanValue, setDescription, setExample, setExample, setFormat, setName, setPosition, setReadOnly, setRequired, setTitle, setType, setVendorExtension, setVendorExtensionMap, setVendorExtensions, setXml, title
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.swagger.models.properties.Property
description, getAccess, getAllowEmptyValue, getBooleanValue, getDescription, getExample, getFormat, getName, getPosition, getReadOnly, getRequired, getTitle, getType, getVendorExtensions, getXml, rename, setAccess, setAllowEmptyValue, setBooleanValue, setDescription, setExample, setExample, setName, setPosition, setReadOnly, setRequired, setTitle, setXml, title
-
-
-
-
Constructor Detail
-
StringProperty
public StringProperty()
-
StringProperty
public StringProperty(StringProperty.Format format)
-
StringProperty
public StringProperty(String format)
-
-
Method Detail
-
pattern
public StringProperty pattern(String pattern)
-
xml
public StringProperty xml(Xml xml)
-
example
public StringProperty example(String example)
-
minLength
public StringProperty minLength(Integer minLength)
-
maxLength
public StringProperty maxLength(Integer maxLength)
-
_enum
public StringProperty _enum(String value)
-
_enum
public StringProperty _enum(List<String> value)
-
_default
public StringProperty _default(String _default)
-
vendorExtension
public StringProperty vendorExtension(String key, Object obj)
-
required
public StringProperty required(boolean required)
-
readOnly
public StringProperty readOnly()
- Overrides:
readOnlyin classAbstractProperty
-
getMinLength
public Integer getMinLength()
-
setMinLength
public void setMinLength(Integer minLength)
-
getMaxLength
public Integer getMaxLength()
-
setMaxLength
public void setMaxLength(Integer maxLength)
-
getPattern
public String getPattern()
-
setPattern
public void setPattern(String pattern)
-
getDefault
public String getDefault()
-
setDefault
public void setDefault(String _default)
- Specified by:
setDefaultin interfaceProperty- Overrides:
setDefaultin classAbstractProperty
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractProperty
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classAbstractProperty
-
-