Class CfnModelProps.Builder
java.lang.Object
software.amazon.awscdk.services.apigateway.CfnModelProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnModelProps>
- Enclosing interface:
CfnModelProps
@Stability(Stable)
public static final class CfnModelProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnModelProps>
A builder for
CfnModelProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.contentType
(String contentType) Sets the value ofCfnModelProps.getContentType()
description
(String description) Sets the value ofCfnModelProps.getDescription()
Sets the value ofCfnModelProps.getName()
Sets the value ofCfnModelProps.getRestApiId()
Sets the value ofCfnModelProps.getSchema()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
restApiId
Sets the value ofCfnModelProps.getRestApiId()
- Parameters:
restApiId
- The string identifier of the associated RestApi. This parameter is required.- Returns:
this
-
contentType
Sets the value ofCfnModelProps.getContentType()
- Parameters:
contentType
- The content-type for the model.- Returns:
this
-
description
Sets the value ofCfnModelProps.getDescription()
- Parameters:
description
- The description of the model.- Returns:
this
-
name
Sets the value ofCfnModelProps.getName()
- Parameters:
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.
- Returns:
this
-
schema
Sets the value ofCfnModelProps.getSchema()
- Parameters:
schema
- The schema for the model. Forapplication/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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnModelProps>
- Returns:
- a new instance of
CfnModelProps
- Throws:
NullPointerException
- if any required attribute was not provided
-