package schemas

import (
	"github.com/hashicorp/terraform-plugin-framework/resource/schema"
	"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
	"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
	"github.com/hashicorp/terraform-plugin-framework/types"
)

func MakeSchemaResourceVINSStaticRoute() map[string]schema.Attribute {
	return map[string]schema.Attribute{
		// required attributes
		"vins_id": schema.Int64Attribute{
			Required:    true,
			Description: "Unique ID of the ViNS.",
		},
		"destination": schema.StringAttribute{
			Required: true,
		},
		"netmask": schema.StringAttribute{
			Required: true,
		},
		"gateway": schema.StringAttribute{
			Required: true,
		},

		// computed attributes
		"id": schema.StringAttribute{
			Computed: true,
			PlanModifiers: []planmodifier.String{
				stringplanmodifier.UseStateForUnknown(),
			},
		},
		"last_updated": schema.StringAttribute{
			Computed: true,
		},
		"guid": schema.StringAttribute{
			Computed: true,
		},
		"route_id": schema.Int64Attribute{
			Computed: true,
		},
		"compute_ids": schema.ListAttribute{
			Computed:    true,
			ElementType: types.Int64Type,
		},
	}
}
