// Code generated by azure-service-operator-codegen. DO NOT EDIT.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
package arm

import "github.com/Azure/azure-service-operator/v2/pkg/genruntime"

type FleetsAutoUpgradeProfile_Spec struct {
	Name string `json:"name,omitempty"`

	// Properties: The resource-specific properties for this resource.
	Properties *AutoUpgradeProfileProperties `json:"properties,omitempty"`
}

var _ genruntime.ARMResourceSpec = &FleetsAutoUpgradeProfile_Spec{}

// GetAPIVersion returns the ARM API version of the resource. This is always "2025-03-01"
func (profile FleetsAutoUpgradeProfile_Spec) GetAPIVersion() string {
	return "2025-03-01"
}

// GetName returns the Name of the resource
func (profile *FleetsAutoUpgradeProfile_Spec) GetName() string {
	return profile.Name
}

// GetType returns the ARM Type of the resource. This is always "Microsoft.ContainerService/fleets/autoUpgradeProfiles"
func (profile *FleetsAutoUpgradeProfile_Spec) GetType() string {
	return "Microsoft.ContainerService/fleets/autoUpgradeProfiles"
}

// The properties of the AutoUpgradeProfile.
type AutoUpgradeProfileProperties struct {
	// Channel: Configures how auto-upgrade will be run.
	Channel *UpgradeChannel `json:"channel,omitempty"`

	// Disabled: If set to False: the auto upgrade has effect - target managed clusters will be upgraded on schedule.
	// If set to True: the auto upgrade has no effect - no upgrade will be run on the target managed clusters.
	// This is a boolean and not an enum because enabled/disabled are all available states of the auto upgrade profile.
	// By default, this is set to False.
	Disabled *bool `json:"disabled,omitempty"`

	// NodeImageSelection: The node image upgrade to be applied to the target clusters in auto upgrade.
	NodeImageSelection *AutoUpgradeNodeImageSelection `json:"nodeImageSelection,omitempty"`

	// UpdateStrategyId: The resource id of the UpdateStrategy resource to reference. If not specified, the auto upgrade will
	// run on all clusters which are members of the fleet.
	UpdateStrategyId *string `json:"updateStrategyId,omitempty"`
}

// The node image upgrade to be applied to the target clusters in auto upgrade.
type AutoUpgradeNodeImageSelection struct {
	// Type: The node image upgrade type.
	Type *AutoUpgradeNodeImageSelectionType `json:"type,omitempty"`
}

// Configuration of how auto upgrade will be run.
// +kubebuilder:validation:Enum={"NodeImage","Rapid","Stable"}
type UpgradeChannel string

const (
	UpgradeChannel_NodeImage = UpgradeChannel("NodeImage")
	UpgradeChannel_Rapid     = UpgradeChannel("Rapid")
	UpgradeChannel_Stable    = UpgradeChannel("Stable")
)

// Mapping from string to UpgradeChannel
var upgradeChannel_Values = map[string]UpgradeChannel{
	"nodeimage": UpgradeChannel_NodeImage,
	"rapid":     UpgradeChannel_Rapid,
	"stable":    UpgradeChannel_Stable,
}

// The node image upgrade type.
// +kubebuilder:validation:Enum={"Consistent","Latest"}
type AutoUpgradeNodeImageSelectionType string

const (
	AutoUpgradeNodeImageSelectionType_Consistent = AutoUpgradeNodeImageSelectionType("Consistent")
	AutoUpgradeNodeImageSelectionType_Latest     = AutoUpgradeNodeImageSelectionType("Latest")
)

// Mapping from string to AutoUpgradeNodeImageSelectionType
var autoUpgradeNodeImageSelectionType_Values = map[string]AutoUpgradeNodeImageSelectionType{
	"consistent": AutoUpgradeNodeImageSelectionType_Consistent,
	"latest":     AutoUpgradeNodeImageSelectionType_Latest,
}
