/** * Bean property setter: <property>additionalProperties</property>. * * @param value * The new value for this property. * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ public SchemaInfo additionalProperties(Object value) { additionalProperties = toType(value, SchemaInfo.class); return this; }
/** * Adds one or more values to the <property>enum</property> property. * * @param value * The values to add to this property. * <br>Ignored if <jk>null</jk>. * @return This object (for method chaining). */ public SchemaInfo addEnum(Collection<Object> value) { _enum = addToList(_enum, value); return this; }
/** * Adds one or more values to the <property>examples</property> property. * * @param values * The values to add to this property. * <br>Ignored if <jk>null</jk>. * @return This object (for method chaining). */ public ResponseInfo addExamples(Map<String,Object> values) { examples = addToMap(examples, values); return this; }
/** * Same as {@link #setReadOnly(Boolean)}. * * @param value * The new value for this property. * <br>Non-boolean values will be converted to boolean using <code>Boolean.<jsm>valueOf</jsm>(value.toString())</code>. * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ public SchemaInfo readOnly(Object value) { return setReadOnly(toBoolean(value)); }
/** * Bean property setter: <property>allOf</property>. * * @param value * The new value for this property. * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ public SchemaInfo setAllOf(Collection<Object> value) { allOf = newList(value); return this; }
/** * Bean property setter: <property>properties</property>. * * @param value * The new value for this property. * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ public SchemaInfo setProperties(Map<String,SchemaInfo> value) { properties = newMap(value); return this; }
/** * Same as {@link #setMaxLength(Integer)}. * * @param value * The new value for this property. * <br>Non-Integer values will be converted to Integer using <code>Integer.<jsm>valueOf</jsm>(value.toString())</code>. * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ public SchemaInfo maxLength(Object value) { return setMaxLength(toInteger(value)); }
/** * Same as {@link #setMaximum(Number)}. * * @param value * The new value for this property. * <br>Non-Number values will be converted to Number using <code>toString()</code> then best number match. * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ public Items maximum(Object value) { return setMaximum(toNumber(value)); }
/** * Bean property setter: <property>paths</property>. * * <p> * The available paths and operations for the API. * * @param value * The new value for this property. * <br>Property value is required. * @return This object (for method chaining). */ public Swagger setPaths(Map<String,OperationMap> value) { paths = newSortedMap(value, PATH_COMPARATOR); return this; }
/** * Adds one or more values to the <property>produces</property> property. * * <p> * A list of MIME types the APIs can produce. * * <p> * This is global to all APIs but can be overridden on specific API calls. * * @param values * The values to add to this property. * <br>Ignored if <jk>null</jk>. * @return This object (for method chaining). */ public Swagger addPaths(Map<String,OperationMap> values) { paths = addToSortedMap(paths, values, PATH_COMPARATOR); return this; }
/** * Same as {@link #setDeprecated(Boolean)}. * * @param value * The new value for this property. * <br>Non-boolean values will be converted to boolean using <code>Boolean.<jsm>valueOf</jsm>(value.toString())</code>. * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ public Operation deprecated(Object value) { return setDeprecated(toBoolean(value)); }
/** * Bean property setter: <property>allOf</property>. * * @param value * The new value for this property. * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ public SchemaInfo setAllOf(Collection<Object> value) { allOf = newList(value); return this; }
/** * Bean property setter: <property>properties</property>. * * @param value * The new value for this property. * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ public SchemaInfo setProperties(Map<String,SchemaInfo> value) { properties = newMap(value); return this; }
/** * Same as {@link #setMinProperties(Integer)}. * * @param value * The new value for this property. * <br>Non-Integer values will be converted to Integer using <code>Integer.<jsm>valueOf</jsm>(value.toString())</code>. * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ public SchemaInfo minProperties(Object value) { return setMinProperties(toInteger(value)); }
/** * Same as {@link #setMultipleOf(Number)}. * * @param value * The new value for this property. * <br>Non-Number values will be converted to Number using <code>toString()</code> then best number match. * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ public Items multipleOf(Object value) { return setMultipleOf(toNumber(value)); }
/** * Bean property setter: <property>paths</property>. * * <p> * The available paths and operations for the API. * * @param value * The new value for this property. * <br>Property value is required. * @return This object (for method chaining). */ public Swagger setPaths(Map<String,OperationMap> value) { paths = newSortedMap(value, PATH_COMPARATOR); return this; }
/** * Adds one or more values to the <property>produces</property> property. * * <p> * A list of MIME types the APIs can produce. * * <p> * This is global to all APIs but can be overridden on specific API calls. * * @param values * The values to add to this property. * <br>Ignored if <jk>null</jk>. * @return This object (for method chaining). */ public Swagger addPaths(Map<String,OperationMap> values) { paths = addToSortedMap(paths, values, PATH_COMPARATOR); return this; }
@Override /* SwaggerElement */ public <T> T get(String property, Class<T> type) { if (property == null) return null; switch (property) { case "name": return toType(getName(), type); case "url": return toType(getUrl(), type); case "email": return toType(getEmail(), type); default: return super.get(property, type); } }
/** * Adds a single value to the <property>examples</property> property. * * @param mimeType The mime-type string. * @param example The example. * @return This object (for method chaining). */ public ResponseInfo example(String mimeType, Object example) { examples = addToMap(examples, mimeType, example); return this; }
/** * Adds one or more values to the <property>enum</property> property. * * @param values * The values to add to this property. * <br>Ignored if <jk>null</jk>. * @return This object (for method chaining). */ public Items addEnum(Collection<Object> values) { _enum = addToList(_enum, values); return this; }