Class JsonSchema.Builder
java.lang.Object
software.amazon.awscdk.services.apigateway.JsonSchema.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<JsonSchema>
- Enclosing interface:
JsonSchema
@Stability(Stable)
public static final class JsonSchema.Builder
extends Object
implements software.amazon.jsii.Builder<JsonSchema>
A builder for
JsonSchema
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadditionalItems
(List<? extends JsonSchema> additionalItems) Sets the value ofJsonSchema.getAdditionalItems()
additionalProperties
(Boolean additionalProperties) Sets the value ofJsonSchema.getAdditionalProperties()
additionalProperties
(JsonSchema additionalProperties) Sets the value ofJsonSchema.getAdditionalProperties()
allOf
(List<? extends JsonSchema> allOf) Sets the value ofJsonSchema.getAllOf()
anyOf
(List<? extends JsonSchema> anyOf) Sets the value ofJsonSchema.getAnyOf()
build()
Builds the configured instance.contains
(List<? extends JsonSchema> contains) Sets the value ofJsonSchema.getContains()
contains
(JsonSchema contains) Sets the value ofJsonSchema.getContains()
defaultValue
(Object defaultValue) Sets the value ofJsonSchema.getDefaultValue()
definitions
(Map<String, ? extends JsonSchema> definitions) Sets the value ofJsonSchema.getDefinitions()
dependencies
(Map<String, ? extends Object> dependencies) Sets the value ofJsonSchema.getDependencies()
description
(String description) Sets the value ofJsonSchema.getDescription()
Sets the value ofJsonSchema.getEnumValue()
exclusiveMaximum
(Boolean exclusiveMaximum) Sets the value ofJsonSchema.getExclusiveMaximum()
exclusiveMinimum
(Boolean exclusiveMinimum) Sets the value ofJsonSchema.getExclusiveMinimum()
Sets the value ofJsonSchema.getFormat()
Sets the value ofJsonSchema.getId()
items
(List<? extends JsonSchema> items) Sets the value ofJsonSchema.getItems()
items
(JsonSchema items) Sets the value ofJsonSchema.getItems()
Sets the value ofJsonSchema.getMaximum()
Sets the value ofJsonSchema.getMaxItems()
Sets the value ofJsonSchema.getMaxLength()
maxProperties
(Number maxProperties) Sets the value ofJsonSchema.getMaxProperties()
Sets the value ofJsonSchema.getMinimum()
Sets the value ofJsonSchema.getMinItems()
Sets the value ofJsonSchema.getMinLength()
minProperties
(Number minProperties) Sets the value ofJsonSchema.getMinProperties()
multipleOf
(Number multipleOf) Sets the value ofJsonSchema.getMultipleOf()
not
(JsonSchema not) Sets the value ofJsonSchema.getNot()
oneOf
(List<? extends JsonSchema> oneOf) Sets the value ofJsonSchema.getOneOf()
Sets the value ofJsonSchema.getPattern()
patternProperties
(Map<String, ? extends JsonSchema> patternProperties) Sets the value ofJsonSchema.getPatternProperties()
properties
(Map<String, ? extends JsonSchema> properties) Sets the value ofJsonSchema.getProperties()
propertyNames
(JsonSchema propertyNames) Sets the value ofJsonSchema.getPropertyNames()
Sets the value ofJsonSchema.getRef()
Sets the value ofJsonSchema.getRequired()
schema
(JsonSchemaVersion schema) Sets the value ofJsonSchema.getSchema()
Sets the value ofJsonSchema.getTitle()
type
(List<? extends JsonSchemaType> type) Sets the value ofJsonSchema.getType()
type
(JsonSchemaType type) Sets the value ofJsonSchema.getType()
uniqueItems
(Boolean uniqueItems) Sets the value ofJsonSchema.getUniqueItems()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
additionalItems
@Stability(Stable) public JsonSchema.Builder additionalItems(List<? extends JsonSchema> additionalItems) Sets the value ofJsonSchema.getAdditionalItems()
- Parameters:
additionalItems
- the value to be set.- Returns:
this
-
additionalProperties
Sets the value ofJsonSchema.getAdditionalProperties()
- Parameters:
additionalProperties
- the value to be set.- Returns:
this
-
additionalProperties
Sets the value ofJsonSchema.getAdditionalProperties()
- Parameters:
additionalProperties
- the value to be set.- Returns:
this
-
allOf
Sets the value ofJsonSchema.getAllOf()
- Parameters:
allOf
- the value to be set.- Returns:
this
-
anyOf
Sets the value ofJsonSchema.getAnyOf()
- Parameters:
anyOf
- the value to be set.- Returns:
this
-
contains
Sets the value ofJsonSchema.getContains()
- Parameters:
contains
- the value to be set.- Returns:
this
-
contains
Sets the value ofJsonSchema.getContains()
- Parameters:
contains
- the value to be set.- Returns:
this
-
defaultValue
Sets the value ofJsonSchema.getDefaultValue()
- Parameters:
defaultValue
- The default value if you use an enum.- Returns:
this
-
definitions
@Stability(Stable) public JsonSchema.Builder definitions(Map<String, ? extends JsonSchema> definitions) Sets the value ofJsonSchema.getDefinitions()
- Parameters:
definitions
- the value to be set.- Returns:
this
-
dependencies
@Stability(Stable) public JsonSchema.Builder dependencies(Map<String, ? extends Object> dependencies) Sets the value ofJsonSchema.getDependencies()
- Parameters:
dependencies
- the value to be set.- Returns:
this
-
description
Sets the value ofJsonSchema.getDescription()
- Parameters:
description
- the value to be set.- Returns:
this
-
enumValue
Sets the value ofJsonSchema.getEnumValue()
- Parameters:
enumValue
- the value to be set.- Returns:
this
-
exclusiveMaximum
Sets the value ofJsonSchema.getExclusiveMaximum()
- Parameters:
exclusiveMaximum
- the value to be set.- Returns:
this
-
exclusiveMinimum
Sets the value ofJsonSchema.getExclusiveMinimum()
- Parameters:
exclusiveMinimum
- the value to be set.- Returns:
this
-
format
Sets the value ofJsonSchema.getFormat()
- Parameters:
format
- the value to be set.- Returns:
this
-
id
Sets the value ofJsonSchema.getId()
- Parameters:
id
- the value to be set.- Returns:
this
-
items
Sets the value ofJsonSchema.getItems()
- Parameters:
items
- the value to be set.- Returns:
this
-
items
Sets the value ofJsonSchema.getItems()
- Parameters:
items
- the value to be set.- Returns:
this
-
maximum
Sets the value ofJsonSchema.getMaximum()
- Parameters:
maximum
- the value to be set.- Returns:
this
-
maxItems
Sets the value ofJsonSchema.getMaxItems()
- Parameters:
maxItems
- the value to be set.- Returns:
this
-
maxLength
Sets the value ofJsonSchema.getMaxLength()
- Parameters:
maxLength
- the value to be set.- Returns:
this
-
maxProperties
Sets the value ofJsonSchema.getMaxProperties()
- Parameters:
maxProperties
- the value to be set.- Returns:
this
-
minimum
Sets the value ofJsonSchema.getMinimum()
- Parameters:
minimum
- the value to be set.- Returns:
this
-
minItems
Sets the value ofJsonSchema.getMinItems()
- Parameters:
minItems
- the value to be set.- Returns:
this
-
minLength
Sets the value ofJsonSchema.getMinLength()
- Parameters:
minLength
- the value to be set.- Returns:
this
-
minProperties
Sets the value ofJsonSchema.getMinProperties()
- Parameters:
minProperties
- the value to be set.- Returns:
this
-
multipleOf
Sets the value ofJsonSchema.getMultipleOf()
- Parameters:
multipleOf
- the value to be set.- Returns:
this
-
not
Sets the value ofJsonSchema.getNot()
- Parameters:
not
- the value to be set.- Returns:
this
-
oneOf
Sets the value ofJsonSchema.getOneOf()
- Parameters:
oneOf
- the value to be set.- Returns:
this
-
pattern
Sets the value ofJsonSchema.getPattern()
- Parameters:
pattern
- the value to be set.- Returns:
this
-
patternProperties
@Stability(Stable) public JsonSchema.Builder patternProperties(Map<String, ? extends JsonSchema> patternProperties) Sets the value ofJsonSchema.getPatternProperties()
- Parameters:
patternProperties
- the value to be set.- Returns:
this
-
properties
@Stability(Stable) public JsonSchema.Builder properties(Map<String, ? extends JsonSchema> properties) Sets the value ofJsonSchema.getProperties()
- Parameters:
properties
- the value to be set.- Returns:
this
-
propertyNames
Sets the value ofJsonSchema.getPropertyNames()
- Parameters:
propertyNames
- the value to be set.- Returns:
this
-
ref
Sets the value ofJsonSchema.getRef()
- Parameters:
ref
- the value to be set.- Returns:
this
-
required
Sets the value ofJsonSchema.getRequired()
- Parameters:
required
- the value to be set.- Returns:
this
-
schema
Sets the value ofJsonSchema.getSchema()
- Parameters:
schema
- the value to be set.- Returns:
this
-
title
Sets the value ofJsonSchema.getTitle()
- Parameters:
title
- the value to be set.- Returns:
this
-
type
Sets the value ofJsonSchema.getType()
- Parameters:
type
- the value to be set.- Returns:
this
-
type
Sets the value ofJsonSchema.getType()
- Parameters:
type
- the value to be set.- Returns:
this
-
uniqueItems
Sets the value ofJsonSchema.getUniqueItems()
- Parameters:
uniqueItems
- the value to be set.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<JsonSchema>
- Returns:
- a new instance of
JsonSchema
- Throws:
NullPointerException
- if any required attribute was not provided
-