// 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 ServersElasticPool_Spec struct {
	// Location: Resource location.
	Location *string `json:"location,omitempty"`
	Name     string  `json:"name,omitempty"`

	// Properties: Resource properties.
	Properties *ElasticPoolProperties `json:"properties,omitempty"`

	// Sku: The elastic pool SKU.
	// The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition,
	// family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation`
	// REST API or the following command:
	// ```azurecli
	// az sql elastic-pool list-editions -l <location> -o table
	// ````
	Sku *Sku `json:"sku,omitempty"`

	// Tags: Resource tags.
	Tags map[string]string `json:"tags,omitempty"`
}

var _ genruntime.ARMResourceSpec = &ServersElasticPool_Spec{}

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.Sql/servers/elasticPools"
func (pool *ServersElasticPool_Spec) GetType() string {
	return "Microsoft.Sql/servers/elasticPools"
}

// Properties of an elastic pool
type ElasticPoolProperties struct {
	// HighAvailabilityReplicaCount: The number of secondary replicas associated with the elastic pool that are used to provide
	// high availability. Applicable only to Hyperscale elastic pools.
	HighAvailabilityReplicaCount *int `json:"highAvailabilityReplicaCount,omitempty"`

	// LicenseType: The license type to apply for this elastic pool.
	LicenseType *ElasticPoolProperties_LicenseType `json:"licenseType,omitempty"`

	// MaintenanceConfigurationId: Maintenance configuration id assigned to the elastic pool. This configuration defines the
	// period when the maintenance updates will will occur.
	MaintenanceConfigurationId *string `json:"maintenanceConfigurationId,omitempty"`

	// MaxSizeBytes: The storage limit for the database elastic pool in bytes.
	MaxSizeBytes *int `json:"maxSizeBytes,omitempty"`

	// MinCapacity: Minimal capacity that serverless pool will not shrink below, if not paused
	MinCapacity *float64 `json:"minCapacity,omitempty"`

	// PerDatabaseSettings: The per database settings for the elastic pool.
	PerDatabaseSettings *ElasticPoolPerDatabaseSettings `json:"perDatabaseSettings,omitempty"`

	// ZoneRedundant: Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be
	// spread across multiple availability zones.
	ZoneRedundant *bool `json:"zoneRedundant,omitempty"`
}

// Per database settings of an elastic pool.
type ElasticPoolPerDatabaseSettings struct {
	// MaxCapacity: The maximum capacity any one database can consume.
	MaxCapacity *float64 `json:"maxCapacity,omitempty"`

	// MinCapacity: The minimum capacity all databases are guaranteed.
	MinCapacity *float64 `json:"minCapacity,omitempty"`
}

// +kubebuilder:validation:Enum={"BasePrice","LicenseIncluded"}
type ElasticPoolProperties_LicenseType string

const (
	ElasticPoolProperties_LicenseType_BasePrice       = ElasticPoolProperties_LicenseType("BasePrice")
	ElasticPoolProperties_LicenseType_LicenseIncluded = ElasticPoolProperties_LicenseType("LicenseIncluded")
)

// Mapping from string to ElasticPoolProperties_LicenseType
var elasticPoolProperties_LicenseType_Values = map[string]ElasticPoolProperties_LicenseType{
	"baseprice":       ElasticPoolProperties_LicenseType_BasePrice,
	"licenseincluded": ElasticPoolProperties_LicenseType_LicenseIncluded,
}
