Class CfnModel.Builder

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

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

    • create

      @Stability(Stable) public static CfnModel.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnModel.Builder.
    • restApiId

      @Stability(Stable) public CfnModel.Builder restApiId(String restApiId)
      The string identifier of the associated RestApi.

      Parameters:
      restApiId - The string identifier of the associated RestApi. This parameter is required.
      Returns:
      this
    • contentType

      @Stability(Stable) public CfnModel.Builder contentType(String contentType)
      The content-type for the model.

      Parameters:
      contentType - The content-type for the model. This parameter is required.
      Returns:
      this
    • description

      @Stability(Stable) public CfnModel.Builder description(String description)
      The description of the model.

      Parameters:
      description - The description of the model. This parameter is required.
      Returns:
      this
    • name

      @Stability(Stable) public CfnModel.Builder name(String name)
      A name for the model.

      If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the model name. For more information, see Name Type .

      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.

      Parameters:
      name - A name for the model. This parameter is required.
      Returns:
      this
    • schema

      @Stability(Stable) public CfnModel.Builder schema(Object schema)
      The schema for the model.

      For application/json models, this should be JSON schema draft 4 model. Do not include "* /" characters in the description of any properties because such "* /" characters may be interpreted as the closing marker for comments in some languages, such as Java or JavaScript, causing the installation of your API's SDK generated by API Gateway to fail.

      Parameters:
      schema - The schema for the model. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CfnModel build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnModel>
      Returns:
      a newly built instance of CfnModel.