package policy

import "github.com/google/uuid"

type Target struct {
	Type string    `json:"type"`
	ID   uuid.UUID `json:"id"`
	Name string    `json:"name,omitempty"`
}

type Policy struct {
	ID           uuid.UUID `json:"id"`
	Name         string    `json:"name"`
	Description  string    `json:"description"`
	Priority     int       `json:"priority"`
	Effect       string    `json:"effect"`
	FullTunnel   bool      `json:"full_tunnel"`
	IsActive     bool      `json:"is_active"`
	Destinations []string  `json:"destinations"`
	Targets      []Target  `json:"targets"`
}

type CreateRequest struct {
	Name         string   `json:"name"`
	Description  string   `json:"description"`
	Priority     int      `json:"priority"`
	Effect       string   `json:"effect"`
	FullTunnel   bool     `json:"full_tunnel"`
	Destinations []string `json:"destinations"`
	Targets      []Target `json:"targets"`
}

type UpdateRequest struct {
	Name         *string  `json:"name"`
	Description  *string  `json:"description"`
	Priority     *int     `json:"priority"`
	Effect       *string  `json:"effect"`
	FullTunnel   *bool    `json:"full_tunnel"`
	IsActive     *bool    `json:"is_active"`
	Destinations []string `json:"destinations"`
	Targets      []Target `json:"targets"`
}
