// 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 Redis_Spec struct {
	// Identity: The identity of the resource.
	Identity *ManagedServiceIdentity `json:"identity,omitempty"`

	// Location: The geo-location where the resource lives
	Location *string `json:"location,omitempty"`
	Name     string  `json:"name,omitempty"`

	// Properties: Redis cache properties.
	Properties *RedisCreateProperties `json:"properties,omitempty"`

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

	// Zones: A list of availability zones denoting where the resource needs to come from.
	Zones []string `json:"zones,omitempty"`
}

var _ genruntime.ARMResourceSpec = &Redis_Spec{}

// GetAPIVersion returns the ARM API version of the resource. This is always "2023-08-01"
func (redis Redis_Spec) GetAPIVersion() string {
	return "2023-08-01"
}

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.Cache/redis"
func (redis *Redis_Spec) GetType() string {
	return "Microsoft.Cache/redis"
}

// Managed service identity (system assigned and/or user assigned identities)
type ManagedServiceIdentity struct {
	// Type: Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
	Type                   *ManagedServiceIdentityType            `json:"type,omitempty"`
	UserAssignedIdentities map[string]UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"`
}

// Properties supplied to Create Redis operation.
type RedisCreateProperties struct {
	// EnableNonSslPort: Specifies whether the non-ssl Redis server port (6379) is enabled.
	EnableNonSslPort *bool `json:"enableNonSslPort,omitempty"`

	// MinimumTlsVersion: Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1',
	// '1.2')
	MinimumTlsVersion *RedisCreateProperties_MinimumTlsVersion `json:"minimumTlsVersion,omitempty"`

	// PublicNetworkAccess: Whether or not public endpoint access is allowed for this cache.  Value is optional but if passed
	// in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is
	// 'Enabled'
	PublicNetworkAccess *RedisCreateProperties_PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`

	// RedisConfiguration: All Redis Settings. Few possible keys:
	// rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value
	// etc.
	RedisConfiguration *RedisCreateProperties_RedisConfiguration `json:"redisConfiguration,omitempty"`

	// RedisVersion: Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest'
	// which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value
	// is 'latest'.
	RedisVersion *string `json:"redisVersion,omitempty"`

	// ReplicasPerMaster: The number of replicas to be created per primary.
	ReplicasPerMaster *int `json:"replicasPerMaster,omitempty"`

	// ReplicasPerPrimary: The number of replicas to be created per primary.
	ReplicasPerPrimary *int `json:"replicasPerPrimary,omitempty"`

	// ShardCount: The number of shards to be created on a Premium Cluster Cache.
	ShardCount *int `json:"shardCount,omitempty"`

	// Sku: The SKU of the Redis cache to deploy.
	Sku *Sku `json:"sku,omitempty"`

	// StaticIP: Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual
	// Network; auto assigned by default.
	StaticIP *string `json:"staticIP,omitempty"`

	// SubnetId: The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format:
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1
	SubnetId *string `json:"subnetId,omitempty"`

	// TenantSettings: A dictionary of tenant settings
	TenantSettings map[string]string `json:"tenantSettings,omitempty"`

	// UpdateChannel: Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive.
	// Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches.
	// Default value is 'Stable'.
	UpdateChannel *RedisCreateProperties_UpdateChannel `json:"updateChannel,omitempty"`
}

// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
// +kubebuilder:validation:Enum={"None","SystemAssigned","SystemAssigned, UserAssigned","UserAssigned"}
type ManagedServiceIdentityType string

const (
	ManagedServiceIdentityType_None                       = ManagedServiceIdentityType("None")
	ManagedServiceIdentityType_SystemAssigned             = ManagedServiceIdentityType("SystemAssigned")
	ManagedServiceIdentityType_SystemAssignedUserAssigned = ManagedServiceIdentityType("SystemAssigned, UserAssigned")
	ManagedServiceIdentityType_UserAssigned               = ManagedServiceIdentityType("UserAssigned")
)

// Mapping from string to ManagedServiceIdentityType
var managedServiceIdentityType_Values = map[string]ManagedServiceIdentityType{
	"none":                         ManagedServiceIdentityType_None,
	"systemassigned":               ManagedServiceIdentityType_SystemAssigned,
	"systemassigned, userassigned": ManagedServiceIdentityType_SystemAssignedUserAssigned,
	"userassigned":                 ManagedServiceIdentityType_UserAssigned,
}

// +kubebuilder:validation:Enum={"1.0","1.1","1.2"}
type RedisCreateProperties_MinimumTlsVersion string

const (
	RedisCreateProperties_MinimumTlsVersion_10 = RedisCreateProperties_MinimumTlsVersion("1.0")
	RedisCreateProperties_MinimumTlsVersion_11 = RedisCreateProperties_MinimumTlsVersion("1.1")
	RedisCreateProperties_MinimumTlsVersion_12 = RedisCreateProperties_MinimumTlsVersion("1.2")
)

// Mapping from string to RedisCreateProperties_MinimumTlsVersion
var redisCreateProperties_MinimumTlsVersion_Values = map[string]RedisCreateProperties_MinimumTlsVersion{
	"1.0": RedisCreateProperties_MinimumTlsVersion_10,
	"1.1": RedisCreateProperties_MinimumTlsVersion_11,
	"1.2": RedisCreateProperties_MinimumTlsVersion_12,
}

// +kubebuilder:validation:Enum={"Disabled","Enabled"}
type RedisCreateProperties_PublicNetworkAccess string

const (
	RedisCreateProperties_PublicNetworkAccess_Disabled = RedisCreateProperties_PublicNetworkAccess("Disabled")
	RedisCreateProperties_PublicNetworkAccess_Enabled  = RedisCreateProperties_PublicNetworkAccess("Enabled")
)

// Mapping from string to RedisCreateProperties_PublicNetworkAccess
var redisCreateProperties_PublicNetworkAccess_Values = map[string]RedisCreateProperties_PublicNetworkAccess{
	"disabled": RedisCreateProperties_PublicNetworkAccess_Disabled,
	"enabled":  RedisCreateProperties_PublicNetworkAccess_Enabled,
}

type RedisCreateProperties_RedisConfiguration struct {
	// AadEnabled: Specifies whether AAD based authentication has been enabled or disabled for the cache
	AadEnabled *string `json:"aad-enabled,omitempty"`

	// AofBackupEnabled: Specifies whether the aof backup is enabled
	AofBackupEnabled *string `json:"aof-backup-enabled,omitempty"`

	// AofStorageConnectionString0: First storage account connection string
	AofStorageConnectionString0 *string `json:"aof-storage-connection-string-0,omitempty"`

	// AofStorageConnectionString1: Second storage account connection string
	AofStorageConnectionString1 *string `json:"aof-storage-connection-string-1,omitempty"`

	// Authnotrequired: Specifies whether the authentication is disabled. Setting this property is highly discouraged from
	// security point of view.
	Authnotrequired *string `json:"authnotrequired,omitempty"`

	// MaxfragmentationmemoryReserved: Value in megabytes reserved for fragmentation per shard
	MaxfragmentationmemoryReserved *string `json:"maxfragmentationmemory-reserved,omitempty"`

	// MaxmemoryDelta: Value in megabytes reserved for non-cache usage per shard e.g. failover.
	MaxmemoryDelta *string `json:"maxmemory-delta,omitempty"`

	// MaxmemoryPolicy: The eviction strategy used when your data won't fit within its memory limit.
	MaxmemoryPolicy *string `json:"maxmemory-policy,omitempty"`

	// MaxmemoryReserved: Value in megabytes reserved for non-cache usage per shard e.g. failover.
	MaxmemoryReserved *string `json:"maxmemory-reserved,omitempty"`

	// NotifyKeyspaceEvents: The keyspace events which should be monitored.
	NotifyKeyspaceEvents *string `json:"notify-keyspace-events,omitempty"`

	// PreferredDataPersistenceAuthMethod: Preferred auth method to communicate to storage account used for data persistence,
	// specify SAS or ManagedIdentity, default value is SAS
	PreferredDataPersistenceAuthMethod *string `json:"preferred-data-persistence-auth-method,omitempty"`

	// RdbBackupEnabled: Specifies whether the rdb backup is enabled
	RdbBackupEnabled *string `json:"rdb-backup-enabled,omitempty"`

	// RdbBackupFrequency: Specifies the frequency for creating rdb backup in minutes. Valid values: (15, 30, 60, 360, 720,
	// 1440)
	RdbBackupFrequency *string `json:"rdb-backup-frequency,omitempty"`

	// RdbBackupMaxSnapshotCount: Specifies the maximum number of snapshots for rdb backup
	RdbBackupMaxSnapshotCount *string `json:"rdb-backup-max-snapshot-count,omitempty"`

	// RdbStorageConnectionString: The storage account connection string for storing rdb file
	RdbStorageConnectionString *string `json:"rdb-storage-connection-string,omitempty"`

	// StorageSubscriptionId: SubscriptionId of the storage account for persistence (aof/rdb) using ManagedIdentity.
	StorageSubscriptionId *string `json:"storage-subscription-id,omitempty"`
}

// +kubebuilder:validation:Enum={"Preview","Stable"}
type RedisCreateProperties_UpdateChannel string

const (
	RedisCreateProperties_UpdateChannel_Preview = RedisCreateProperties_UpdateChannel("Preview")
	RedisCreateProperties_UpdateChannel_Stable  = RedisCreateProperties_UpdateChannel("Stable")
)

// Mapping from string to RedisCreateProperties_UpdateChannel
var redisCreateProperties_UpdateChannel_Values = map[string]RedisCreateProperties_UpdateChannel{
	"preview": RedisCreateProperties_UpdateChannel_Preview,
	"stable":  RedisCreateProperties_UpdateChannel_Stable,
}

// SKU parameters supplied to the create Redis operation.
type Sku struct {
	// Capacity: The size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for
	// P (Premium) family (1, 2, 3, 4).
	Capacity *int `json:"capacity,omitempty"`

	// Family: The SKU family to use. Valid values: (C, P). (C = Basic/Standard, P = Premium).
	Family *Sku_Family `json:"family,omitempty"`

	// Name: The type of Redis cache to deploy. Valid values: (Basic, Standard, Premium)
	Name *Sku_Name `json:"name,omitempty"`
}

// Information about the user assigned identity for the resource
type UserAssignedIdentityDetails struct {
}

// +kubebuilder:validation:Enum={"C","P"}
type Sku_Family string

const (
	Sku_Family_C = Sku_Family("C")
	Sku_Family_P = Sku_Family("P")
)

// Mapping from string to Sku_Family
var sku_Family_Values = map[string]Sku_Family{
	"c": Sku_Family_C,
	"p": Sku_Family_P,
}

// +kubebuilder:validation:Enum={"Basic","Premium","Standard"}
type Sku_Name string

const (
	Sku_Name_Basic    = Sku_Name("Basic")
	Sku_Name_Premium  = Sku_Name("Premium")
	Sku_Name_Standard = Sku_Name("Standard")
)

// Mapping from string to Sku_Name
var sku_Name_Values = map[string]Sku_Name{
	"basic":    Sku_Name_Basic,
	"premium":  Sku_Name_Premium,
	"standard": Sku_Name_Standard,
}
