Class: AWSCDK::APIGateway::CfnModelProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGateway::CfnModelProps
- Defined in:
- api_gateway/cfn_model_props.rb
Overview
Properties for defining a CfnModel.
Instance Attribute Summary collapse
-
#content_type ⇒ String?
readonly
The content-type for the model.
-
#description ⇒ String?
readonly
The description of the model.
-
#name ⇒ String?
readonly
A name for the model.
-
#rest_api_id ⇒ String, AWSCDK::Interfaces::AWSApigateway::IRestAPIRef
readonly
The string identifier of the associated RestApi.
-
#schema ⇒ Object?
readonly
The schema for the model.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(rest_api_id:, content_type: nil, description: nil, name: nil, schema: nil) ⇒ CfnModelProps
constructor
A new instance of CfnModelProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(rest_api_id:, content_type: nil, description: nil, name: nil, schema: nil) ⇒ CfnModelProps
Returns a new instance of CfnModelProps.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'api_gateway/cfn_model_props.rb', line 14 def initialize(rest_api_id:, content_type: nil, description: nil, name: nil, schema: nil) @rest_api_id = rest_api_id Jsii::Type.check_type(@rest_api_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hcGlnYXRld2F5LklSZXN0QXBpUmVmIn1dfX0=")), "restApiId") @content_type = content_type Jsii::Type.check_type(@content_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "contentType") unless @content_type.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? @schema = schema Jsii::Type.check_type(@schema, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "schema") unless @schema.nil? end |
Instance Attribute Details
#content_type ⇒ String? (readonly)
The content-type for the model.
36 37 38 |
# File 'api_gateway/cfn_model_props.rb', line 36 def content_type @content_type end |
#description ⇒ String? (readonly)
The description of the model.
41 42 43 |
# File 'api_gateway/cfn_model_props.rb', line 41 def description @description end |
#name ⇒ String? (readonly)
A name for the model.
If you don't specify a name, 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.
50 51 52 |
# File 'api_gateway/cfn_model_props.rb', line 50 def name @name end |
#rest_api_id ⇒ String, AWSCDK::Interfaces::AWSApigateway::IRestAPIRef (readonly)
The string identifier of the associated RestApi.
31 32 33 |
# File 'api_gateway/cfn_model_props.rb', line 31 def rest_api_id @rest_api_id end |
#schema ⇒ Object? (readonly)
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.
57 58 59 |
# File 'api_gateway/cfn_model_props.rb', line 57 def schema @schema end |
Class Method Details
.jsii_properties ⇒ Object
59 60 61 62 63 64 65 66 67 |
# File 'api_gateway/cfn_model_props.rb', line 59 def self.jsii_properties { :rest_api_id => "restApiId", :content_type => "contentType", :description => "description", :name => "name", :schema => "schema", } end |
Instance Method Details
#to_jsii ⇒ Object
69 70 71 72 73 74 75 76 77 78 79 |
# File 'api_gateway/cfn_model_props.rb', line 69 def to_jsii result = {} result.merge!({ "restApiId" => @rest_api_id, "contentType" => @content_type, "description" => @description, "name" => @name, "schema" => @schema, }) result.compact end |