package cloudconfig

type (
	DefaultConfigurationChangePhase string
)

// Enums
// Update value list `XXXValues` when update a enum
const (
	DefaultConfigurationChangePhaseInProgress DefaultConfigurationChangePhase = "in_progress"
	DefaultConfigurationChangePhaseSuccess    DefaultConfigurationChangePhase = "success"
	DefaultConfigurationChangePhaseTerminated DefaultConfigurationChangePhase = "terminated"
)

var (
	DefaultConfigurationChangeValues = []DefaultConfigurationChangePhase{
		DefaultConfigurationChangePhaseInProgress,
		DefaultConfigurationChangePhaseSuccess,
		DefaultConfigurationChangePhaseTerminated,
	}
	DefaultConfigurationChangeClosedValues = []DefaultConfigurationChangePhase{
		DefaultConfigurationChangePhaseSuccess,
		DefaultConfigurationChangePhaseTerminated,
	}
)

type DefaultConfigurationChange struct {
	ID           uint64                               `json:"id"`
	CreatedAt    int64                                `json:"created_at"`
	ClosedAt     *int64                               `json:"closed_at"`
	Applicant    string                               `json:"applicant"`
	Reason       string                               `json:"reason"`
	DisplayName  string                               `json:"display_name"`
	Phase        DefaultConfigurationChangePhase      `json:"phase"`
	PhaseReason  string                               `json:"phase_reason"`
	ItemTypes    []DefaultConfigurationChangeItemType `json:"item_types"`
	Environments []string                             `json:"environments"`
} // @name cloudconfig.DefaultConfigurationChange
