// Code generated by generators/resource/main.go; DO NOT EDIT. package pinpoint import ( "context" "github.com/hashicorp/terraform-plugin-framework/tfsdk" "github.com/hashicorp/terraform-plugin-framework/types" . "github.com/hashicorp/terraform-provider-awscc/internal/generic" "github.com/hashicorp/terraform-provider-awscc/internal/registry" "github.com/hashicorp/terraform-provider-awscc/internal/validate" ) func init() { registry.AddResourceTypeFactory("awscc_pinpoint_in_app_template", inAppTemplateResourceType) } // inAppTemplateResourceType returns the Terraform awscc_pinpoint_in_app_template resource type. // This Terraform resource type corresponds to the CloudFormation AWS::Pinpoint::InAppTemplate resource type. func inAppTemplateResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "arn": { // Property: Arn // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "content": { // Property: Content // CloudFormation resource type schema: // { // "insertionOrder": true, // "items": { // "additionalProperties": false, // "properties": { // "BackgroundColor": { // "type": "string" // }, // "BodyConfig": { // "additionalProperties": false, // "properties": { // "Alignment": { // "enum": [ // "LEFT", // "CENTER", // "RIGHT" // ], // "type": "string" // }, // "Body": { // "type": "string" // }, // "TextColor": { // "type": "string" // } // }, // "type": "object" // }, // "HeaderConfig": { // "additionalProperties": false, // "properties": { // "Alignment": { // "enum": [ // "LEFT", // "CENTER", // "RIGHT" // ], // "type": "string" // }, // "Header": { // "type": "string" // }, // "TextColor": { // "type": "string" // } // }, // "type": "object" // }, // "ImageUrl": { // "type": "string" // }, // "PrimaryBtn": { // "additionalProperties": false, // "properties": { // "Android": { // "additionalProperties": false, // "properties": { // "ButtonAction": { // "enum": [ // "LINK", // "DEEP_LINK", // "CLOSE" // ], // "type": "string" // }, // "Link": { // "type": "string" // } // }, // "type": "object" // }, // "DefaultConfig": { // "additionalProperties": false, // "properties": { // "BackgroundColor": { // "type": "string" // }, // "BorderRadius": { // "type": "integer" // }, // "ButtonAction": { // "enum": [ // "LINK", // "DEEP_LINK", // "CLOSE" // ], // "type": "string" // }, // "Link": { // "type": "string" // }, // "Text": { // "type": "string" // }, // "TextColor": { // "type": "string" // } // }, // "type": "object" // }, // "IOS": { // "additionalProperties": false, // "properties": { // "ButtonAction": { // "enum": [ // "LINK", // "DEEP_LINK", // "CLOSE" // ], // "type": "string" // }, // "Link": { // "type": "string" // } // }, // "type": "object" // }, // "Web": { // "additionalProperties": false, // "properties": { // "ButtonAction": { // "enum": [ // "LINK", // "DEEP_LINK", // "CLOSE" // ], // "type": "string" // }, // "Link": { // "type": "string" // } // }, // "type": "object" // } // }, // "type": "object" // }, // "SecondaryBtn": { // "additionalProperties": false, // "properties": { // "Android": { // "additionalProperties": false, // "properties": { // "ButtonAction": { // "enum": [ // "LINK", // "DEEP_LINK", // "CLOSE" // ], // "type": "string" // }, // "Link": { // "type": "string" // } // }, // "type": "object" // }, // "DefaultConfig": { // "additionalProperties": false, // "properties": { // "BackgroundColor": { // "type": "string" // }, // "BorderRadius": { // "type": "integer" // }, // "ButtonAction": { // "enum": [ // "LINK", // "DEEP_LINK", // "CLOSE" // ], // "type": "string" // }, // "Link": { // "type": "string" // }, // "Text": { // "type": "string" // }, // "TextColor": { // "type": "string" // } // }, // "type": "object" // }, // "IOS": { // "additionalProperties": false, // "properties": { // "ButtonAction": { // "enum": [ // "LINK", // "DEEP_LINK", // "CLOSE" // ], // "type": "string" // }, // "Link": { // "type": "string" // } // }, // "type": "object" // }, // "Web": { // "additionalProperties": false, // "properties": { // "ButtonAction": { // "enum": [ // "LINK", // "DEEP_LINK", // "CLOSE" // ], // "type": "string" // }, // "Link": { // "type": "string" // } // }, // "type": "object" // } // }, // "type": "object" // } // }, // "type": "object" // }, // "type": "array" // } Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "background_color": { // Property: BackgroundColor Type: types.StringType, Optional: true, }, "body_config": { // Property: BodyConfig Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "alignment": { // Property: Alignment Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "LEFT", "CENTER", "RIGHT", }), }, }, "body": { // Property: Body Type: types.StringType, Optional: true, }, "text_color": { // Property: TextColor Type: types.StringType, Optional: true, }, }, ), Optional: true, }, "header_config": { // Property: HeaderConfig Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "alignment": { // Property: Alignment Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "LEFT", "CENTER", "RIGHT", }), }, }, "header": { // Property: Header Type: types.StringType, Optional: true, }, "text_color": { // Property: TextColor Type: types.StringType, Optional: true, }, }, ), Optional: true, }, "image_url": { // Property: ImageUrl Type: types.StringType, Optional: true, }, "primary_btn": { // Property: PrimaryBtn Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "android": { // Property: Android Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "button_action": { // Property: ButtonAction Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "LINK", "DEEP_LINK", "CLOSE", }), }, }, "link": { // Property: Link Type: types.StringType, Optional: true, }, }, ), Optional: true, }, "default_config": { // Property: DefaultConfig Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "background_color": { // Property: BackgroundColor Type: types.StringType, Optional: true, }, "border_radius": { // Property: BorderRadius Type: types.Int64Type, Optional: true, }, "button_action": { // Property: ButtonAction Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "LINK", "DEEP_LINK", "CLOSE", }), }, }, "link": { // Property: Link Type: types.StringType, Optional: true, }, "text": { // Property: Text Type: types.StringType, Optional: true, }, "text_color": { // Property: TextColor Type: types.StringType, Optional: true, }, }, ), Optional: true, }, "ios": { // Property: IOS Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "button_action": { // Property: ButtonAction Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "LINK", "DEEP_LINK", "CLOSE", }), }, }, "link": { // Property: Link Type: types.StringType, Optional: true, }, }, ), Optional: true, }, "web": { // Property: Web Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "button_action": { // Property: ButtonAction Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "LINK", "DEEP_LINK", "CLOSE", }), }, }, "link": { // Property: Link Type: types.StringType, Optional: true, }, }, ), Optional: true, }, }, ), Optional: true, }, "secondary_btn": { // Property: SecondaryBtn Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "android": { // Property: Android Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "button_action": { // Property: ButtonAction Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "LINK", "DEEP_LINK", "CLOSE", }), }, }, "link": { // Property: Link Type: types.StringType, Optional: true, }, }, ), Optional: true, }, "default_config": { // Property: DefaultConfig Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "background_color": { // Property: BackgroundColor Type: types.StringType, Optional: true, }, "border_radius": { // Property: BorderRadius Type: types.Int64Type, Optional: true, }, "button_action": { // Property: ButtonAction Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "LINK", "DEEP_LINK", "CLOSE", }), }, }, "link": { // Property: Link Type: types.StringType, Optional: true, }, "text": { // Property: Text Type: types.StringType, Optional: true, }, "text_color": { // Property: TextColor Type: types.StringType, Optional: true, }, }, ), Optional: true, }, "ios": { // Property: IOS Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "button_action": { // Property: ButtonAction Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "LINK", "DEEP_LINK", "CLOSE", }), }, }, "link": { // Property: Link Type: types.StringType, Optional: true, }, }, ), Optional: true, }, "web": { // Property: Web Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "button_action": { // Property: ButtonAction Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "LINK", "DEEP_LINK", "CLOSE", }), }, }, "link": { // Property: Link Type: types.StringType, Optional: true, }, }, ), Optional: true, }, }, ), Optional: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, }, "custom_config": { // Property: CustomConfig // CloudFormation resource type schema: // { // "type": "object" // } Type: types.MapType{ElemType: types.StringType}, Optional: true, }, "layout": { // Property: Layout // CloudFormation resource type schema: // { // "enum": [ // "BOTTOM_BANNER", // "TOP_BANNER", // "OVERLAYS", // "MOBILE_FEED", // "MIDDLE_BANNER", // "CAROUSEL" // ], // "type": "string" // } Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "BOTTOM_BANNER", "TOP_BANNER", "OVERLAYS", "MOBILE_FEED", "MIDDLE_BANNER", "CAROUSEL", }), }, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "type": "object" // } Type: types.MapType{ElemType: types.StringType}, Optional: true, }, "template_description": { // Property: TemplateDescription // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Optional: true, }, "template_name": { // Property: TemplateName // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, } schema := tfsdk.Schema{ Description: "Resource Type definition for AWS::Pinpoint::InAppTemplate", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::Pinpoint::InAppTemplate").WithTerraformTypeName("awscc_pinpoint_in_app_template") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "alignment": "Alignment", "android": "Android", "arn": "Arn", "background_color": "BackgroundColor", "body": "Body", "body_config": "BodyConfig", "border_radius": "BorderRadius", "button_action": "ButtonAction", "content": "Content", "custom_config": "CustomConfig", "default_config": "DefaultConfig", "header": "Header", "header_config": "HeaderConfig", "image_url": "ImageUrl", "ios": "IOS", "layout": "Layout", "link": "Link", "primary_btn": "PrimaryBtn", "secondary_btn": "SecondaryBtn", "tags": "Tags", "template_description": "TemplateDescription", "template_name": "TemplateName", "text": "Text", "text_color": "TextColor", "web": "Web", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }