// Code generated by user config generator. DO NOT EDIT.

package serviceintegration

import (
	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

	"github.com/aiven/terraform-provider-aiven/internal/sdkprovider/userconfig/diff"
)

func externalAwsCloudwatchMetricsUserConfig() *schema.Schema {
	return &schema.Schema{
		Description:      "ExternalAwsCloudwatchMetrics user configurable settings. **Warning:** There's no way to reset advanced configuration options to default. Options that you add cannot be removed later",
		DiffSuppressFunc: diff.SuppressUnchanged,
		Elem: &schema.Resource{Schema: map[string]*schema.Schema{
			"dropped_metrics": {
				Description: "Metrics to not send to AWS CloudWatch (takes precedence over extra_metrics)",
				Elem: &schema.Resource{Schema: map[string]*schema.Schema{
					"field": {
						Description: "Identifier of a value in the metric. Example: `used`.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"metric": {
						Description: "Identifier of the metric. Example: `java.lang:Memory`.",
						Required:    true,
						Type:        schema.TypeString,
					},
				}},
				MaxItems: 1024,
				Optional: true,
				Type:     schema.TypeList,
			},
			"extra_metrics": {
				Description: "Metrics to allow through to AWS CloudWatch (in addition to default metrics)",
				Elem: &schema.Resource{Schema: map[string]*schema.Schema{
					"field": {
						Description: "Identifier of a value in the metric. Example: `used`.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"metric": {
						Description: "Identifier of the metric. Example: `java.lang:Memory`.",
						Required:    true,
						Type:        schema.TypeString,
					},
				}},
				MaxItems: 1024,
				Optional: true,
				Type:     schema.TypeList,
			},
		}},
		MaxItems: 1,
		Optional: true,
		Type:     schema.TypeList,
	}
}
