Interface ModelProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable, ModelOptions
All Known Implementing Classes:
ModelProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.99.0 (build 8f757e4)", date="2024-06-13T18:49:13.751Z") @Stability(Stable) public interface ModelProps extends software.amazon.jsii.JsiiSerializable, ModelOptions
Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.apigateway.*;
 Object default_;
 Object enum_;
 JsonSchema jsonSchema_;
 RestApi restApi;
 ModelProps modelProps = ModelProps.builder()
         .restApi(restApi)
         .schema(JsonSchema.builder()
                 .additionalItems(List.of(jsonSchema_))
                 .additionalProperties(false)
                 .allOf(List.of(jsonSchema_))
                 .anyOf(List.of(jsonSchema_))
                 .contains(jsonSchema_)
                 .default(default_)
                 .definitions(Map.of(
                         "definitionsKey", jsonSchema_))
                 .dependencies(Map.of(
                         "dependenciesKey", List.of("dependencies")))
                 .description("description")
                 .enum(List.of(enum_))
                 .exclusiveMaximum(false)
                 .exclusiveMinimum(false)
                 .format("format")
                 .id("id")
                 .items(jsonSchema_)
                 .maximum(123)
                 .maxItems(123)
                 .maxLength(123)
                 .maxProperties(123)
                 .minimum(123)
                 .minItems(123)
                 .minLength(123)
                 .minProperties(123)
                 .multipleOf(123)
                 .not(jsonSchema_)
                 .oneOf(List.of(jsonSchema_))
                 .pattern("pattern")
                 .patternProperties(Map.of(
                         "patternPropertiesKey", jsonSchema_))
                 .properties(Map.of(
                         "propertiesKey", jsonSchema_))
                 .propertyNames(jsonSchema_)
                 .ref("ref")
                 .required(List.of("required"))
                 .schema(JsonSchemaVersion.DRAFT4)
                 .title("title")
                 .type(JsonSchemaType.NULL)
                 .uniqueItems(false)
                 .build())
         // the properties below are optional
         .contentType("contentType")
         .description("description")
         .modelName("modelName")
         .build();
 
  • Method Details

    • getRestApi

      @Stability(Stable) @NotNull IRestApi getRestApi()
      The rest API that this model is part of.

      The reason we need the RestApi object itself and not just the ID is because the model is being tracked by the top-level RestApi object for the purpose of calculating it's hash to determine the ID of the deployment. This allows us to automatically update the deployment when the model of the REST API changes.

    • builder

      @Stability(Stable) static ModelProps.Builder builder()
      Returns:
      a ModelProps.Builder of ModelProps