// Package evaluation provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
package evaluation

import (
	"time"

	patternv1beta1 "github.com/meshery/schemas/models/v1beta1/pattern"
	"github.com/gofrs/uuid"
)

// Defines values for ActionOp.
const (
	ActionOpAddComponent                 ActionOp = "add_component"
	ActionOpAddRelationship              ActionOp = "add_relationship"
	ActionOpDeleteComponent              ActionOp = "delete_component"
	ActionOpDeleteRelationship           ActionOp = "delete_relationship"
	ActionOpUpdateComponent              ActionOp = "update_component"
	ActionOpUpdateComponentConfiguration ActionOp = "update_component_configuration"
	ActionOpUpdateRelationship           ActionOp = "update_relationship"
)

// Defines values for AddComponentOpOp.
const (
	AddComponentOpOpAddComponent AddComponentOpOp = "add_component"
)

// Defines values for AddRelationshipOpOp.
const (
	AddRelationship AddRelationshipOpOp = "add_relationship"
)

// Defines values for DeleteComponentOpOp.
const (
	DeleteComponent DeleteComponentOpOp = "delete_component"
)

// Defines values for DeleteRelationshipOpOp.
const (
	DeleteRelationship DeleteRelationshipOpOp = "delete_relationship"
)

// Defines values for UpdateComponentConfigurationOpOp.
const (
	UpdateComponentConfiguration UpdateComponentConfigurationOpOp = "update_component_configuration"
)

// Defines values for UpdateComponentConfigurationOpValueMode.
const (
	UpdateComponentConfigurationOpValueModeMerge   UpdateComponentConfigurationOpValueMode = "merge"
	UpdateComponentConfigurationOpValueModeReplace UpdateComponentConfigurationOpValueMode = "replace"
)

// Defines values for UpdateComponentOpOp.
const (
	UpdateComponent UpdateComponentOpOp = "update_component"
)

// Defines values for UpdateComponentOpValueMode.
const (
	UpdateComponentOpValueModeMerge   UpdateComponentOpValueMode = "merge"
	UpdateComponentOpValueModeReplace UpdateComponentOpValueMode = "replace"
)

// Defines values for UpdateRelationshipOpOp.
const (
	UpdateRelationship UpdateRelationshipOpOp = "update_relationship"
)

// Action defines model for Action.
type Action struct {
	// Op The op of the action.
	Op ActionOp `json:"op" yaml:"op"`

	// Value The value of the action.
	Value map[string]interface{} `json:"value" yaml:"value"`
}

// ActionOp The op of the action.
type ActionOp string

// AddComponentOp defines model for AddComponentOp.
type AddComponentOp struct {
	// Op The op of the addcomponentop.
	Op *AddComponentOpOp `json:"op,omitempty" yaml:"op,omitempty"`

	// Value The value of the addcomponentop.
	Value *struct {
		Item ComponentDeclaration `json:"item" yaml:"item"`
	} `json:"value,omitempty" yaml:"value,omitempty"`
}

// AddComponentOpOp The op of the addcomponentop.
type AddComponentOpOp string

// AddRelationshipOp defines model for AddRelationshipOp.
type AddRelationshipOp struct {
	// Op The op of the addrelationshipop.
	Op *AddRelationshipOpOp `json:"op,omitempty" yaml:"op,omitempty"`

	// Value The value of the addrelationshipop.
	Value *struct {
		Item RelationshipDeclaration `json:"item" yaml:"item"`
	} `json:"value,omitempty" yaml:"value,omitempty"`
}

// AddRelationshipOpOp The op of the addrelationshipop.
type AddRelationshipOpOp string

// ComponentDeclaration defines model for ComponentDeclaration.
type ComponentDeclaration map[string]interface{}

// DeleteComponentOp defines model for DeleteComponentOp.
type DeleteComponentOp struct {
	// Op The op of the deletecomponentop.
	Op *DeleteComponentOpOp `json:"op,omitempty" yaml:"op,omitempty"`

	// Value The value of the deletecomponentop.
	Value *struct {
		// Id Identifier of the component to delete.
		Id uuid.UUID `json:"id" yaml:"id"`
	} `json:"value,omitempty" yaml:"value,omitempty"`
}

// DeleteComponentOpOp The op of the deletecomponentop.
type DeleteComponentOpOp string

// DeleteRelationshipOp defines model for DeleteRelationshipOp.
type DeleteRelationshipOp struct {
	// Op The op of the deleterelationshipop.
	Op *DeleteRelationshipOpOp `json:"op,omitempty" yaml:"op,omitempty"`

	// Value The value of the deleterelationshipop.
	Value *struct {
		// Id Identifier of the relationship to delete.
		Id uuid.UUID `json:"id" yaml:"id"`
	} `json:"value,omitempty" yaml:"value,omitempty"`
}

// DeleteRelationshipOpOp The op of the deleterelationshipop.
type DeleteRelationshipOpOp string

// EvaluationRequest defines model for EvaluationRequest.
type EvaluationRequest struct {
	// Design Designs are your primary tool for collaborative authorship of your infrastructure, workflow, and processes.
	Design patternv1beta1.PatternFile `json:"design" yaml:"design"`

	// Options The options of the evaluationrequest.
	Options *struct {
		// EnableTrace If true, include detailed trace information in the response
		EnableTrace *bool `json:"enableTrace,omitempty" yaml:"enableTrace,omitempty"`

		// ReturnDiffOnly If true, only return the diff of changes instead of the complete updated design
		ReturnDiffOnly *bool `json:"returnDiffOnly,omitempty" yaml:"returnDiffOnly,omitempty"`
	} `json:"options,omitempty" yaml:"options,omitempty"`
}

// EvaluationResponse Schema for the response of a relationship evaluation process in Meshery
type EvaluationResponse struct {
	// Actions The actions of the evaluationresponse.
	Actions []Action `json:"actions" yaml:"actions"`

	// Design Designs are your primary tool for collaborative authorship of your infrastructure, workflow, and processes.
	Design patternv1beta1.PatternFile `json:"design" yaml:"design"`

	// EvaluationHash Hash of the input parameters and configuration used for this evaluation. Useful for identifying duplicate evaluations or caching results.
	EvaluationHash *string `json:"evaluationHash,omitempty" yaml:"evaluationHash,omitempty"`

	// SchemaVersion Specifies the version of the schema to which the evaluation response conforms.
	SchemaVersion string `json:"schemaVersion" yaml:"schemaVersion"`

	// Timestamp ISO 8601 formatted timestamp of when the evaluation was completed.
	Timestamp *time.Time `json:"timestamp,omitempty" yaml:"timestamp,omitempty"`
}

// RelationshipDeclaration defines model for RelationshipDeclaration.
type RelationshipDeclaration map[string]interface{}

// UpdateComponentConfigurationOp defines model for UpdateComponentConfigurationOp.
type UpdateComponentConfigurationOp struct {
	// Op The op of the updatecomponentconfigurationop.
	Op *UpdateComponentConfigurationOpOp `json:"op,omitempty" yaml:"op,omitempty"`

	// Value The value of the updatecomponentconfigurationop.
	Value *struct {
		// Id Identifier of the component whose configuration will be updated.
		Id uuid.UUID `json:"id" yaml:"id"`

		// Mode Strategy to use when applying the configuration update value.
		Mode *UpdateComponentConfigurationOpValueMode `json:"mode,omitempty" yaml:"mode,omitempty"`

		// Path Path to the configuration field being updated.
		Path []string `json:"path" yaml:"path"`

		// Value New configuration value to write at the specified path.
		Value interface{} `json:"value" yaml:"value"`
	} `json:"value,omitempty" yaml:"value,omitempty"`
}

// UpdateComponentConfigurationOpOp The op of the updatecomponentconfigurationop.
type UpdateComponentConfigurationOpOp string

// UpdateComponentConfigurationOpValueMode Strategy to use when applying the configuration update value.
type UpdateComponentConfigurationOpValueMode string

// UpdateComponentOp defines model for UpdateComponentOp.
type UpdateComponentOp struct {
	// Op The op of the updatecomponentop.
	Op *UpdateComponentOpOp `json:"op,omitempty" yaml:"op,omitempty"`

	// Value The value of the updatecomponentop.
	Value *struct {
		// Id Identifier of the component to update.
		Id uuid.UUID `json:"id" yaml:"id"`

		// Mode Strategy to use when applying the component update value.
		Mode *UpdateComponentOpValueMode `json:"mode,omitempty" yaml:"mode,omitempty"`

		// Path Path to the field being updated on the component.
		Path []string `json:"path" yaml:"path"`

		// Value New value to write at the specified component path.
		Value interface{} `json:"value" yaml:"value"`
	} `json:"value,omitempty" yaml:"value,omitempty"`
}

// UpdateComponentOpOp The op of the updatecomponentop.
type UpdateComponentOpOp string

// UpdateComponentOpValueMode Strategy to use when applying the component update value.
type UpdateComponentOpValueMode string

// UpdateRelationshipOp defines model for UpdateRelationshipOp.
type UpdateRelationshipOp struct {
	// Op The op of the updaterelationshipop.
	Op *UpdateRelationshipOpOp `json:"op,omitempty" yaml:"op,omitempty"`

	// Value The value of the updaterelationshipop.
	Value *struct {
		// Id Identifier of the relationship to update.
		Id uuid.UUID `json:"id" yaml:"id"`

		// Path Path to the field being updated on the relationship.
		Path []string `json:"path" yaml:"path"`

		// Value New value to write at the specified relationship path.
		Value interface{} `json:"value" yaml:"value"`
	} `json:"value,omitempty" yaml:"value,omitempty"`
}

// UpdateRelationshipOpOp The op of the updaterelationshipop.
type UpdateRelationshipOpOp string
