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

package serviceintegrationendpoint

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

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

func externalElasticsearchLogsUserConfig() *schema.Schema {
	return &schema.Schema{
		Description:      "ExternalElasticsearchLogs 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{
			"ca": {
				Description: "PEM encoded CA certificate. Example: `-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n`.",
				Optional:    true,
				Type:        schema.TypeString,
			},
			"index_days_max": {
				Description: "Maximum number of days of logs to keep. Default: `3`.",
				Optional:    true,
				Type:        schema.TypeInt,
			},
			"index_prefix": {
				Description: "Elasticsearch index prefix. Default: `logs`.",
				Required:    true,
				Type:        schema.TypeString,
			},
			"timeout": {
				Description: "Elasticsearch request timeout limit. Default: `10`.",
				Optional:    true,
				Type:        schema.TypeFloat,
			},
			"url": {
				Description: "Elasticsearch connection URL. Example: `https://user:passwd@logs.example.com/`.",
				Required:    true,
				Type:        schema.TypeString,
			},
		}},
		MaxItems: 1,
		Optional: true,
		Type:     schema.TypeList,
	}
}
