Class ModelOptions.Builder

java.lang.Object
software.amazon.awscdk.services.apigateway.ModelOptions.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<ModelOptions>
Enclosing interface:
ModelOptions

@Stability(Stable) public static final class ModelOptions.Builder extends Object implements software.amazon.jsii.Builder<ModelOptions>
A builder for ModelOptions
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • schema

      @Stability(Stable) public ModelOptions.Builder schema(JsonSchema schema)
      Sets the value of ModelOptions.getSchema()
      Parameters:
      schema - The schema to use to transform data to one or more output formats. This parameter is required. Specify null ({}) if you don't want to specify a schema.
      Returns:
      this
    • contentType

      @Stability(Stable) public ModelOptions.Builder contentType(String contentType)
      Parameters:
      contentType - The content type for the model. You can also force a content type in the request or response model mapping.
      Returns:
      this
    • description

      @Stability(Stable) public ModelOptions.Builder description(String description)
      Parameters:
      description - A description that identifies this model.
      Returns:
      this
    • modelName

      @Stability(Stable) public ModelOptions.Builder modelName(String modelName)
      Sets the value of ModelOptions.getModelName()
      Parameters:
      modelName - A name for the model. Important If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
      Returns:
      this
    • build

      @Stability(Stable) public ModelOptions build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<ModelOptions>
      Returns:
      a new instance of ModelOptions
      Throws:
      NullPointerException - if any required attribute was not provided