// 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 Extension_Spec struct {
	// Identity: Identity of the Extension resource
	Identity *Identity `json:"identity,omitempty"`
	Name     string    `json:"name,omitempty"`

	// Plan: The plan information.
	Plan *Plan `json:"plan,omitempty"`

	// Properties: Properties of an Extension resource
	Properties *Extension_Properties_Spec `json:"properties,omitempty"`

	// SystemData: Top level metadata
	// https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources
	SystemData *SystemData `json:"systemData,omitempty"`
}

var _ genruntime.ARMResourceSpec = &Extension_Spec{}

// GetAPIVersion returns the ARM API version of the resource. This is always "2024-11-01"
func (extension Extension_Spec) GetAPIVersion() string {
	return "2024-11-01"
}

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.KubernetesConfiguration/extensions"
func (extension *Extension_Spec) GetType() string {
	return "Microsoft.KubernetesConfiguration/extensions"
}

type Extension_Properties_Spec struct {
	// AksAssignedIdentity: Identity of the Extension resource in an AKS cluster
	AksAssignedIdentity *Extension_Properties_AksAssignedIdentity_Spec `json:"aksAssignedIdentity,omitempty"`

	// AutoUpgradeMinorVersion: Flag to note if this extension participates in auto upgrade of minor version, or not.
	AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`

	// ConfigurationProtectedSettings: Configuration settings that are sensitive, as name-value pairs for configuring this
	// extension.
	ConfigurationProtectedSettings map[string]string `json:"configurationProtectedSettings,omitempty"`

	// ConfigurationSettings: Configuration settings, as name-value pairs for configuring this extension.
	ConfigurationSettings map[string]string `json:"configurationSettings,omitempty"`

	// ExtensionType: Type of the Extension, of which this resource is an instance of.  It must be one of the Extension Types
	// registered with Microsoft.KubernetesConfiguration by the Extension publisher.
	ExtensionType *string `json:"extensionType,omitempty"`

	// ReleaseTrain: ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if
	// autoUpgradeMinorVersion is 'true'.
	ReleaseTrain *string `json:"releaseTrain,omitempty"`

	// Scope: Scope at which the extension is installed.
	Scope *Scope `json:"scope,omitempty"`

	// Version: User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion
	// must be 'false'.
	Version *string `json:"version,omitempty"`
}

// Identity for the resource.
type Identity struct {
	// Type: The identity type.
	Type *Identity_Type `json:"type,omitempty"`
}

// Plan for the resource.
type Plan struct {
	// Name: A user defined name of the 3rd Party Artifact that is being procured.
	Name *string `json:"name,omitempty"`

	// Product: The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the
	// artifact at the time of Data Market onboarding.
	Product *string `json:"product,omitempty"`

	// PromotionCode: A publisher provided promotion code as provisioned in Data Market for the said product/artifact.
	PromotionCode *string `json:"promotionCode,omitempty"`

	// Publisher: The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic
	Publisher *string `json:"publisher,omitempty"`

	// Version: The version of the desired product/artifact.
	Version *string `json:"version,omitempty"`
}

// Metadata pertaining to creation and last modification of the resource.
type SystemData struct {
	// CreatedAt: The timestamp of resource creation (UTC).
	CreatedAt *string `json:"createdAt,omitempty"`

	// CreatedBy: The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// CreatedByType: The type of identity that created the resource.
	CreatedByType *SystemData_CreatedByType `json:"createdByType,omitempty"`

	// LastModifiedAt: The timestamp of resource last modification (UTC)
	LastModifiedAt *string `json:"lastModifiedAt,omitempty"`

	// LastModifiedBy: The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// LastModifiedByType: The type of identity that last modified the resource.
	LastModifiedByType *SystemData_LastModifiedByType `json:"lastModifiedByType,omitempty"`
}

type Extension_Properties_AksAssignedIdentity_Spec struct {
	// Type: The identity type.
	Type *Extension_Properties_AksAssignedIdentity_Type_Spec `json:"type,omitempty"`
}

// +kubebuilder:validation:Enum={"SystemAssigned"}
type Identity_Type string

const Identity_Type_SystemAssigned = Identity_Type("SystemAssigned")

// Mapping from string to Identity_Type
var identity_Type_Values = map[string]Identity_Type{
	"systemassigned": Identity_Type_SystemAssigned,
}

// Scope of the extension. It can be either Cluster or Namespace; but not both.
type Scope struct {
	// Cluster: Specifies that the scope of the extension is Cluster
	Cluster *ScopeCluster `json:"cluster,omitempty"`

	// Namespace: Specifies that the scope of the extension is Namespace
	Namespace *ScopeNamespace `json:"namespace,omitempty"`
}

// +kubebuilder:validation:Enum={"Application","Key","ManagedIdentity","User"}
type SystemData_CreatedByType string

const (
	SystemData_CreatedByType_Application     = SystemData_CreatedByType("Application")
	SystemData_CreatedByType_Key             = SystemData_CreatedByType("Key")
	SystemData_CreatedByType_ManagedIdentity = SystemData_CreatedByType("ManagedIdentity")
	SystemData_CreatedByType_User            = SystemData_CreatedByType("User")
)

// Mapping from string to SystemData_CreatedByType
var systemData_CreatedByType_Values = map[string]SystemData_CreatedByType{
	"application":     SystemData_CreatedByType_Application,
	"key":             SystemData_CreatedByType_Key,
	"managedidentity": SystemData_CreatedByType_ManagedIdentity,
	"user":            SystemData_CreatedByType_User,
}

// +kubebuilder:validation:Enum={"Application","Key","ManagedIdentity","User"}
type SystemData_LastModifiedByType string

const (
	SystemData_LastModifiedByType_Application     = SystemData_LastModifiedByType("Application")
	SystemData_LastModifiedByType_Key             = SystemData_LastModifiedByType("Key")
	SystemData_LastModifiedByType_ManagedIdentity = SystemData_LastModifiedByType("ManagedIdentity")
	SystemData_LastModifiedByType_User            = SystemData_LastModifiedByType("User")
)

// Mapping from string to SystemData_LastModifiedByType
var systemData_LastModifiedByType_Values = map[string]SystemData_LastModifiedByType{
	"application":     SystemData_LastModifiedByType_Application,
	"key":             SystemData_LastModifiedByType_Key,
	"managedidentity": SystemData_LastModifiedByType_ManagedIdentity,
	"user":            SystemData_LastModifiedByType_User,
}

// +kubebuilder:validation:Enum={"SystemAssigned","UserAssigned"}
type Extension_Properties_AksAssignedIdentity_Type_Spec string

const (
	Extension_Properties_AksAssignedIdentity_Type_Spec_SystemAssigned = Extension_Properties_AksAssignedIdentity_Type_Spec("SystemAssigned")
	Extension_Properties_AksAssignedIdentity_Type_Spec_UserAssigned   = Extension_Properties_AksAssignedIdentity_Type_Spec("UserAssigned")
)

// Mapping from string to Extension_Properties_AksAssignedIdentity_Type_Spec
var extension_Properties_AksAssignedIdentity_Type_Spec_Values = map[string]Extension_Properties_AksAssignedIdentity_Type_Spec{
	"systemassigned": Extension_Properties_AksAssignedIdentity_Type_Spec_SystemAssigned,
	"userassigned":   Extension_Properties_AksAssignedIdentity_Type_Spec_UserAssigned,
}

// Specifies that the scope of the extension is Cluster
type ScopeCluster struct {
	// ReleaseNamespace: Namespace where the extension Release must be placed, for a Cluster scoped extension.  If this
	// namespace does not exist, it will be created
	ReleaseNamespace *string `json:"releaseNamespace,omitempty"`
}

// Specifies that the scope of the extension is Namespace
type ScopeNamespace struct {
	// TargetNamespace: Namespace where the extension will be created for an Namespace scoped extension.  If this namespace
	// does not exist, it will be created
	TargetNamespace *string `json:"targetNamespace,omitempty"`
}
