<commit_before>package fastly

import (
	"fmt"
	"sort"
)

// Dictionary represents a dictionary response from the Fastly API.
type Dictionary struct {
	ServiceID string `mapstructure:"service_id"`
	Version   string `mapstructure:"version"`

	ID      string `mapstructure:"id"`
	Name    string `mapstructure:"name"`
	Address string `mapstructure:"address"`
}

// dictionariesByName is a sortable list of dictionaries.
type dictionariesByName []*Dictionary

// Len, Swap, and Less implement the sortable interface.
func (s dictionariesByName) Len() int      { return len(s) }
func (s dictionariesByName) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
func (s dictionariesByName) Less(i, j int) bool {
	return s[i].Name < s[j].Name
}

// ListDictionariesInput is used as input to the ListDictionaries function.
type ListDictionariesInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version string<commit_msg>Add Created and Updated fields to Dictionary.<commit_after>package fastly

import (
	"fmt"
	"sort"
)

// Dictionary represents a dictionary response from the Fastly API.
type Dictionary struct {
	ServiceID string `mapstructure:"service_id"`
	Version   string `mapstructure:"version"`

	ID      string `mapstructure:"id"`
	Name    string `mapstructure:"name"`
	Address string `mapstructure:"address"`
	Created string `mapstructure:"created_at"`
	Updated string `mapstructure:"updated_at"`
}

// dictionariesByName is a sortable list of dictionaries.
type dictionariesByName []*Dictionary

// Len, Swap, and Less implement the sortable interface.
func (s dictionariesByName) Len() int      { return len(s) }
func (s dictionariesByName) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
func (s dictionariesByName) Less(i, j int) bool {
	return s[i].Name < s[j].Name
}

// ListDictionariesInput is used as input to the ListDictionaries function.
type ListDictionariesInput struct {
	// Service is the ID of the service (required).
	Service string

	// Version is the specific configuration version (required).
	Version string
{'fraction_non_alphanumeric': 0.1037914691943128, 'fraction_numerical': 0.0, 'mean_word_length': 4.61436170212766, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5579760', 'n_tokens_mistral': 631, 'n_tokens_neox': 618, 'n_words': 227}