// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package networkmanager 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" ) func init() { registry.AddDataSourceTypeFactory("awscc_networkmanager_device", deviceDataSourceType) } // deviceDataSourceType returns the Terraform awscc_networkmanager_device data source type. // This Terraform data source type corresponds to the CloudFormation AWS::NetworkManager::Device resource type. func deviceDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "description": { // Property: Description // CloudFormation resource type schema: // { // "description": "The description of the device.", // "type": "string" // } Description: "The description of the device.", Type: types.StringType, Computed: true, }, "device_arn": { // Property: DeviceArn // CloudFormation resource type schema: // { // "description": "The Amazon Resource Name (ARN) of the device.", // "type": "string" // } Description: "The Amazon Resource Name (ARN) of the device.", Type: types.StringType, Computed: true, }, "device_id": { // Property: DeviceId // CloudFormation resource type schema: // { // "description": "The ID of the device.", // "type": "string" // } Description: "The ID of the device.", Type: types.StringType, Computed: true, }, "global_network_id": { // Property: GlobalNetworkId // CloudFormation resource type schema: // { // "description": "The ID of the global network.", // "type": "string" // } Description: "The ID of the global network.", Type: types.StringType, Computed: true, }, "location": { // Property: Location // CloudFormation resource type schema: // { // "additionalProperties": false, // "description": "The site location.", // "properties": { // "Address": { // "description": "The physical address.", // "type": "string" // }, // "Latitude": { // "description": "The latitude.", // "type": "string" // }, // "Longitude": { // "description": "The longitude.", // "type": "string" // } // }, // "type": "object" // } Description: "The site location.", Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "address": { // Property: Address Description: "The physical address.", Type: types.StringType, Computed: true, }, "latitude": { // Property: Latitude Description: "The latitude.", Type: types.StringType, Computed: true, }, "longitude": { // Property: Longitude Description: "The longitude.", Type: types.StringType, Computed: true, }, }, ), Computed: true, }, "model": { // Property: Model // CloudFormation resource type schema: // { // "description": "The device model", // "type": "string" // } Description: "The device model", Type: types.StringType, Computed: true, }, "serial_number": { // Property: SerialNumber // CloudFormation resource type schema: // { // "description": "The device serial number.", // "type": "string" // } Description: "The device serial number.", Type: types.StringType, Computed: true, }, "site_id": { // Property: SiteId // CloudFormation resource type schema: // { // "description": "The site ID.", // "type": "string" // } Description: "The site ID.", Type: types.StringType, Computed: true, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "description": "The tags for the device.", // "items": { // "additionalProperties": false, // "description": "A key-value pair to associate with a device resource.", // "properties": { // "Key": { // "type": "string" // }, // "Value": { // "type": "string" // } // }, // "type": "object" // }, // "type": "array" // } Description: "The tags for the device.", Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Type: types.StringType, Computed: true, }, "value": { // Property: Value Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, "type": { // Property: Type // CloudFormation resource type schema: // { // "description": "The device type.", // "type": "string" // } Description: "The device type.", Type: types.StringType, Computed: true, }, "vendor": { // Property: Vendor // CloudFormation resource type schema: // { // "description": "The device vendor.", // "type": "string" // } Description: "The device vendor.", Type: types.StringType, Computed: true, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Required: true, } schema := tfsdk.Schema{ Description: "Data Source schema for AWS::NetworkManager::Device", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::NetworkManager::Device").WithTerraformTypeName("awscc_networkmanager_device") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "address": "Address", "description": "Description", "device_arn": "DeviceArn", "device_id": "DeviceId", "global_network_id": "GlobalNetworkId", "key": "Key", "latitude": "Latitude", "location": "Location", "longitude": "Longitude", "model": "Model", "serial_number": "SerialNumber", "site_id": "SiteId", "tags": "Tags", "type": "Type", "value": "Value", "vendor": "Vendor", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }