// 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 FlexibleServer_Spec struct {
	// Identity: Describes the identity of the application.
	Identity *UserAssignedIdentity `json:"identity,omitempty"`

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

	// Properties: Properties of the server.
	Properties *ServerProperties `json:"properties,omitempty"`

	// Sku: The SKU (pricing tier) of the server.
	Sku *Sku `json:"sku,omitempty"`

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

var _ genruntime.ARMResourceSpec = &FlexibleServer_Spec{}

// GetAPIVersion returns the ARM API version of the resource. This is always "2023-06-01-preview"
func (server FlexibleServer_Spec) GetAPIVersion() string {
	return "2023-06-01-preview"
}

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.DBforPostgreSQL/flexibleServers"
func (server *FlexibleServer_Spec) GetType() string {
	return "Microsoft.DBforPostgreSQL/flexibleServers"
}

// The properties of a server.
type ServerProperties struct {
	// AdministratorLogin: The administrator's login name of a server. Can only be specified when the server is being created
	// (and is required for creation).
	AdministratorLogin *string `json:"administratorLogin,omitempty"`

	// AdministratorLoginPassword: The administrator login password (required for server creation).
	AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"`

	// AuthConfig: AuthConfig properties of a server.
	AuthConfig *AuthConfig `json:"authConfig,omitempty"`

	// AvailabilityZone: availability zone information of the server.
	AvailabilityZone *string `json:"availabilityZone,omitempty"`

	// Backup: Backup properties of a server.
	Backup *Backup `json:"backup,omitempty"`

	// CreateMode: The mode to create a new PostgreSQL server.
	CreateMode *ServerProperties_CreateMode `json:"createMode,omitempty"`

	// DataEncryption: Data encryption properties of a server.
	DataEncryption *DataEncryption `json:"dataEncryption,omitempty"`

	// HighAvailability: High availability properties of a server.
	HighAvailability *HighAvailability `json:"highAvailability,omitempty"`

	// MaintenanceWindow: Maintenance window properties of a server.
	MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"`

	// Network: Network properties of a server. This Network property is required to be passed only in case you want the server
	// to be Private access server.
	Network *Network `json:"network,omitempty"`

	// PointInTimeUTC: Restore point creation time (ISO8601 format), specifying the time to restore from. It's required when
	// 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'ReviveDropped'.
	PointInTimeUTC *string `json:"pointInTimeUTC,omitempty"`

	// Replica: Replica properties of a server. These Replica properties are required to be passed only in case you want to
	// Promote a server.
	Replica *Replica `json:"replica,omitempty"`

	// ReplicationRole: Replication role of the server
	ReplicationRole *ReplicationRole `json:"replicationRole,omitempty"`

	// SourceServerResourceId: The source server resource ID to restore from. It's required when 'createMode' is
	// 'PointInTimeRestore' or 'GeoRestore' or 'Replica' or 'ReviveDropped'. This property is returned only for Replica server
	SourceServerResourceId *string `json:"sourceServerResourceId,omitempty"`

	// Storage: Storage properties of a server.
	Storage *Storage `json:"storage,omitempty"`

	// Version: PostgreSQL Server version.
	Version *ServerVersion `json:"version,omitempty"`
}

// Sku information related properties of a server.
type Sku struct {
	// Name: The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3.
	Name *string `json:"name,omitempty"`

	// Tier: The tier of the particular SKU, e.g. Burstable.
	Tier *Sku_Tier `json:"tier,omitempty"`
}

// Information describing the identities associated with this application.
type UserAssignedIdentity struct {
	// Type: the types of identities associated with this resource; currently restricted to 'None and UserAssigned'
	Type                   *UserAssignedIdentity_Type             `json:"type,omitempty"`
	UserAssignedIdentities map[string]UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"`
}

// Authentication configuration properties of a server
type AuthConfig struct {
	// ActiveDirectoryAuth: If Enabled, Azure Active Directory authentication is enabled.
	ActiveDirectoryAuth *AuthConfig_ActiveDirectoryAuth `json:"activeDirectoryAuth,omitempty"`

	// PasswordAuth: If Enabled, Password authentication is enabled.
	PasswordAuth *AuthConfig_PasswordAuth `json:"passwordAuth,omitempty"`

	// TenantId: Tenant id of the server.
	TenantId *string `json:"tenantId,omitempty"`
}

// Backup properties of a server
type Backup struct {
	// BackupRetentionDays: Backup retention days for the server.
	BackupRetentionDays *int `json:"backupRetentionDays,omitempty"`

	// GeoRedundantBackup: A value indicating whether Geo-Redundant backup is enabled on the server.
	GeoRedundantBackup *Backup_GeoRedundantBackup `json:"geoRedundantBackup,omitempty"`
}

// Data encryption properties of a server
type DataEncryption struct {
	// GeoBackupEncryptionKeyStatus: Geo-backup encryption key status for Data encryption enabled server.
	GeoBackupEncryptionKeyStatus *DataEncryption_GeoBackupEncryptionKeyStatus `json:"geoBackupEncryptionKeyStatus,omitempty"`

	// GeoBackupKeyURI: URI for the key in keyvault for data encryption for geo-backup of server.
	GeoBackupKeyURI *string `json:"geoBackupKeyURI,omitempty" optionalConfigMapPair:"GeoBackupKeyURI"`

	// GeoBackupUserAssignedIdentityId: Resource Id for the User assigned identity to be used for data encryption for
	// geo-backup of server.
	GeoBackupUserAssignedIdentityId *string `json:"geoBackupUserAssignedIdentityId,omitempty"`

	// PrimaryEncryptionKeyStatus: Primary encryption key status for Data encryption enabled server.
	PrimaryEncryptionKeyStatus *DataEncryption_PrimaryEncryptionKeyStatus `json:"primaryEncryptionKeyStatus,omitempty"`

	// PrimaryKeyURI: URI for the key in keyvault for data encryption of the primary server.
	PrimaryKeyURI *string `json:"primaryKeyURI,omitempty" optionalConfigMapPair:"PrimaryKeyURI"`

	// PrimaryUserAssignedIdentityId: Resource Id for the User assigned identity to be used for data encryption of the primary
	// server.
	PrimaryUserAssignedIdentityId *string `json:"primaryUserAssignedIdentityId,omitempty"`

	// Type: Data encryption type to depict if it is System Managed vs Azure Key vault.
	Type *DataEncryption_Type `json:"type,omitempty"`
}

// High availability properties of a server
type HighAvailability struct {
	// Mode: The HA mode for the server.
	Mode *HighAvailability_Mode `json:"mode,omitempty"`

	// StandbyAvailabilityZone: availability zone information of the standby.
	StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty"`
}

// Maintenance window properties of a server.
type MaintenanceWindow struct {
	// CustomWindow: indicates whether custom window is enabled or disabled
	CustomWindow *string `json:"customWindow,omitempty"`

	// DayOfWeek: day of week for maintenance window
	DayOfWeek *int `json:"dayOfWeek,omitempty"`

	// StartHour: start hour for maintenance window
	StartHour *int `json:"startHour,omitempty"`

	// StartMinute: start minute for maintenance window
	StartMinute *int `json:"startMinute,omitempty"`
}

// Network properties of a server.
type Network struct {
	// DelegatedSubnetResourceId: Delegated subnet arm resource id. This is required to be passed during create, in case we
	// want the server to be VNET injected, i.e. Private access server. During update, pass this only if we want to update the
	// value for Private DNS zone.
	DelegatedSubnetResourceId *string `json:"delegatedSubnetResourceId,omitempty"`

	// PrivateDnsZoneArmResourceId: Private dns zone arm resource id. This is required to be passed during create, in case we
	// want the server to be VNET injected, i.e. Private access server. During update, pass this only if we want to update the
	// value for Private DNS zone.
	PrivateDnsZoneArmResourceId *string `json:"privateDnsZoneArmResourceId,omitempty"`

	// PublicNetworkAccess: public network access is enabled or not
	PublicNetworkAccess *Network_PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
}

// Replica properties of a server
type Replica struct {
	// PromoteMode: Sets the promote mode for a replica server. This is a write only property.
	PromoteMode *Replica_PromoteMode `json:"promoteMode,omitempty"`

	// PromoteOption: Sets the promote options for a replica server. This is a write only property.
	PromoteOption *Replica_PromoteOption `json:"promoteOption,omitempty"`

	// Role: Used to indicate role of the server in replication set.
	Role *ReplicationRole `json:"role,omitempty"`
}

// Used to indicate role of the server in replication set.
// +kubebuilder:validation:Enum={"AsyncReplica","GeoAsyncReplica","None","Primary"}
type ReplicationRole string

const (
	ReplicationRole_AsyncReplica    = ReplicationRole("AsyncReplica")
	ReplicationRole_GeoAsyncReplica = ReplicationRole("GeoAsyncReplica")
	ReplicationRole_None            = ReplicationRole("None")
	ReplicationRole_Primary         = ReplicationRole("Primary")
)

// Mapping from string to ReplicationRole
var replicationRole_Values = map[string]ReplicationRole{
	"asyncreplica":    ReplicationRole_AsyncReplica,
	"geoasyncreplica": ReplicationRole_GeoAsyncReplica,
	"none":            ReplicationRole_None,
	"primary":         ReplicationRole_Primary,
}

// +kubebuilder:validation:Enum={"Create","Default","GeoRestore","PointInTimeRestore","Replica","ReviveDropped","Update"}
type ServerProperties_CreateMode string

const (
	ServerProperties_CreateMode_Create             = ServerProperties_CreateMode("Create")
	ServerProperties_CreateMode_Default            = ServerProperties_CreateMode("Default")
	ServerProperties_CreateMode_GeoRestore         = ServerProperties_CreateMode("GeoRestore")
	ServerProperties_CreateMode_PointInTimeRestore = ServerProperties_CreateMode("PointInTimeRestore")
	ServerProperties_CreateMode_Replica            = ServerProperties_CreateMode("Replica")
	ServerProperties_CreateMode_ReviveDropped      = ServerProperties_CreateMode("ReviveDropped")
	ServerProperties_CreateMode_Update             = ServerProperties_CreateMode("Update")
)

// Mapping from string to ServerProperties_CreateMode
var serverProperties_CreateMode_Values = map[string]ServerProperties_CreateMode{
	"create":             ServerProperties_CreateMode_Create,
	"default":            ServerProperties_CreateMode_Default,
	"georestore":         ServerProperties_CreateMode_GeoRestore,
	"pointintimerestore": ServerProperties_CreateMode_PointInTimeRestore,
	"replica":            ServerProperties_CreateMode_Replica,
	"revivedropped":      ServerProperties_CreateMode_ReviveDropped,
	"update":             ServerProperties_CreateMode_Update,
}

// The version of a server.
// +kubebuilder:validation:Enum={"11","12","13","14","15","16"}
type ServerVersion string

const (
	ServerVersion_11 = ServerVersion("11")
	ServerVersion_12 = ServerVersion("12")
	ServerVersion_13 = ServerVersion("13")
	ServerVersion_14 = ServerVersion("14")
	ServerVersion_15 = ServerVersion("15")
	ServerVersion_16 = ServerVersion("16")
)

// Mapping from string to ServerVersion
var serverVersion_Values = map[string]ServerVersion{
	"11": ServerVersion_11,
	"12": ServerVersion_12,
	"13": ServerVersion_13,
	"14": ServerVersion_14,
	"15": ServerVersion_15,
	"16": ServerVersion_16,
}

// +kubebuilder:validation:Enum={"Burstable","GeneralPurpose","MemoryOptimized"}
type Sku_Tier string

const (
	Sku_Tier_Burstable       = Sku_Tier("Burstable")
	Sku_Tier_GeneralPurpose  = Sku_Tier("GeneralPurpose")
	Sku_Tier_MemoryOptimized = Sku_Tier("MemoryOptimized")
)

// Mapping from string to Sku_Tier
var sku_Tier_Values = map[string]Sku_Tier{
	"burstable":       Sku_Tier_Burstable,
	"generalpurpose":  Sku_Tier_GeneralPurpose,
	"memoryoptimized": Sku_Tier_MemoryOptimized,
}

// Storage properties of a server
type Storage struct {
	// AutoGrow: Flag to enable / disable Storage Auto grow for flexible server.
	AutoGrow *Storage_AutoGrow `json:"autoGrow,omitempty"`

	// Iops: Storage tier IOPS quantity. This property is required to be set for storage Type PremiumV2_LRS
	Iops *int `json:"iops,omitempty"`

	// StorageSizeGB: Max storage allowed for a server.
	StorageSizeGB *int `json:"storageSizeGB,omitempty"`

	// Throughput: Storage throughput for the server. This is required to be set for storage Type PremiumV2_LRS
	Throughput *int `json:"throughput,omitempty"`

	// Tier: Name of storage tier for IOPS.
	Tier *Storage_Tier `json:"tier,omitempty"`

	// Type: Storage type for the server. Allowed values are Premium_LRS and PremiumV2_LRS, and default is Premium_LRS if not
	// specified
	Type *Storage_Type `json:"type,omitempty"`
}

// +kubebuilder:validation:Enum={"None","UserAssigned"}
type UserAssignedIdentity_Type string

const (
	UserAssignedIdentity_Type_None         = UserAssignedIdentity_Type("None")
	UserAssignedIdentity_Type_UserAssigned = UserAssignedIdentity_Type("UserAssigned")
)

// Mapping from string to UserAssignedIdentity_Type
var userAssignedIdentity_Type_Values = map[string]UserAssignedIdentity_Type{
	"none":         UserAssignedIdentity_Type_None,
	"userassigned": UserAssignedIdentity_Type_UserAssigned,
}

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

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

const (
	AuthConfig_ActiveDirectoryAuth_Disabled = AuthConfig_ActiveDirectoryAuth("Disabled")
	AuthConfig_ActiveDirectoryAuth_Enabled  = AuthConfig_ActiveDirectoryAuth("Enabled")
)

// Mapping from string to AuthConfig_ActiveDirectoryAuth
var authConfig_ActiveDirectoryAuth_Values = map[string]AuthConfig_ActiveDirectoryAuth{
	"disabled": AuthConfig_ActiveDirectoryAuth_Disabled,
	"enabled":  AuthConfig_ActiveDirectoryAuth_Enabled,
}

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

const (
	AuthConfig_PasswordAuth_Disabled = AuthConfig_PasswordAuth("Disabled")
	AuthConfig_PasswordAuth_Enabled  = AuthConfig_PasswordAuth("Enabled")
)

// Mapping from string to AuthConfig_PasswordAuth
var authConfig_PasswordAuth_Values = map[string]AuthConfig_PasswordAuth{
	"disabled": AuthConfig_PasswordAuth_Disabled,
	"enabled":  AuthConfig_PasswordAuth_Enabled,
}

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

const (
	Backup_GeoRedundantBackup_Disabled = Backup_GeoRedundantBackup("Disabled")
	Backup_GeoRedundantBackup_Enabled  = Backup_GeoRedundantBackup("Enabled")
)

// Mapping from string to Backup_GeoRedundantBackup
var backup_GeoRedundantBackup_Values = map[string]Backup_GeoRedundantBackup{
	"disabled": Backup_GeoRedundantBackup_Disabled,
	"enabled":  Backup_GeoRedundantBackup_Enabled,
}

// +kubebuilder:validation:Enum={"Invalid","Valid"}
type DataEncryption_GeoBackupEncryptionKeyStatus string

const (
	DataEncryption_GeoBackupEncryptionKeyStatus_Invalid = DataEncryption_GeoBackupEncryptionKeyStatus("Invalid")
	DataEncryption_GeoBackupEncryptionKeyStatus_Valid   = DataEncryption_GeoBackupEncryptionKeyStatus("Valid")
)

// Mapping from string to DataEncryption_GeoBackupEncryptionKeyStatus
var dataEncryption_GeoBackupEncryptionKeyStatus_Values = map[string]DataEncryption_GeoBackupEncryptionKeyStatus{
	"invalid": DataEncryption_GeoBackupEncryptionKeyStatus_Invalid,
	"valid":   DataEncryption_GeoBackupEncryptionKeyStatus_Valid,
}

// +kubebuilder:validation:Enum={"Invalid","Valid"}
type DataEncryption_PrimaryEncryptionKeyStatus string

const (
	DataEncryption_PrimaryEncryptionKeyStatus_Invalid = DataEncryption_PrimaryEncryptionKeyStatus("Invalid")
	DataEncryption_PrimaryEncryptionKeyStatus_Valid   = DataEncryption_PrimaryEncryptionKeyStatus("Valid")
)

// Mapping from string to DataEncryption_PrimaryEncryptionKeyStatus
var dataEncryption_PrimaryEncryptionKeyStatus_Values = map[string]DataEncryption_PrimaryEncryptionKeyStatus{
	"invalid": DataEncryption_PrimaryEncryptionKeyStatus_Invalid,
	"valid":   DataEncryption_PrimaryEncryptionKeyStatus_Valid,
}

// +kubebuilder:validation:Enum={"AzureKeyVault","SystemManaged"}
type DataEncryption_Type string

const (
	DataEncryption_Type_AzureKeyVault = DataEncryption_Type("AzureKeyVault")
	DataEncryption_Type_SystemManaged = DataEncryption_Type("SystemManaged")
)

// Mapping from string to DataEncryption_Type
var dataEncryption_Type_Values = map[string]DataEncryption_Type{
	"azurekeyvault": DataEncryption_Type_AzureKeyVault,
	"systemmanaged": DataEncryption_Type_SystemManaged,
}

// +kubebuilder:validation:Enum={"Disabled","SameZone","ZoneRedundant"}
type HighAvailability_Mode string

const (
	HighAvailability_Mode_Disabled      = HighAvailability_Mode("Disabled")
	HighAvailability_Mode_SameZone      = HighAvailability_Mode("SameZone")
	HighAvailability_Mode_ZoneRedundant = HighAvailability_Mode("ZoneRedundant")
)

// Mapping from string to HighAvailability_Mode
var highAvailability_Mode_Values = map[string]HighAvailability_Mode{
	"disabled":      HighAvailability_Mode_Disabled,
	"samezone":      HighAvailability_Mode_SameZone,
	"zoneredundant": HighAvailability_Mode_ZoneRedundant,
}

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

const (
	Network_PublicNetworkAccess_Disabled = Network_PublicNetworkAccess("Disabled")
	Network_PublicNetworkAccess_Enabled  = Network_PublicNetworkAccess("Enabled")
)

// Mapping from string to Network_PublicNetworkAccess
var network_PublicNetworkAccess_Values = map[string]Network_PublicNetworkAccess{
	"disabled": Network_PublicNetworkAccess_Disabled,
	"enabled":  Network_PublicNetworkAccess_Enabled,
}

// +kubebuilder:validation:Enum={"standalone","switchover"}
type Replica_PromoteMode string

const (
	Replica_PromoteMode_Standalone = Replica_PromoteMode("standalone")
	Replica_PromoteMode_Switchover = Replica_PromoteMode("switchover")
)

// Mapping from string to Replica_PromoteMode
var replica_PromoteMode_Values = map[string]Replica_PromoteMode{
	"standalone": Replica_PromoteMode_Standalone,
	"switchover": Replica_PromoteMode_Switchover,
}

// +kubebuilder:validation:Enum={"forced","planned"}
type Replica_PromoteOption string

const (
	Replica_PromoteOption_Forced  = Replica_PromoteOption("forced")
	Replica_PromoteOption_Planned = Replica_PromoteOption("planned")
)

// Mapping from string to Replica_PromoteOption
var replica_PromoteOption_Values = map[string]Replica_PromoteOption{
	"forced":  Replica_PromoteOption_Forced,
	"planned": Replica_PromoteOption_Planned,
}

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

const (
	Storage_AutoGrow_Disabled = Storage_AutoGrow("Disabled")
	Storage_AutoGrow_Enabled  = Storage_AutoGrow("Enabled")
)

// Mapping from string to Storage_AutoGrow
var storage_AutoGrow_Values = map[string]Storage_AutoGrow{
	"disabled": Storage_AutoGrow_Disabled,
	"enabled":  Storage_AutoGrow_Enabled,
}

// +kubebuilder:validation:Enum={"P1","P10","P15","P2","P20","P3","P30","P4","P40","P50","P6","P60","P70","P80"}
type Storage_Tier string

const (
	Storage_Tier_P1  = Storage_Tier("P1")
	Storage_Tier_P10 = Storage_Tier("P10")
	Storage_Tier_P15 = Storage_Tier("P15")
	Storage_Tier_P2  = Storage_Tier("P2")
	Storage_Tier_P20 = Storage_Tier("P20")
	Storage_Tier_P3  = Storage_Tier("P3")
	Storage_Tier_P30 = Storage_Tier("P30")
	Storage_Tier_P4  = Storage_Tier("P4")
	Storage_Tier_P40 = Storage_Tier("P40")
	Storage_Tier_P50 = Storage_Tier("P50")
	Storage_Tier_P6  = Storage_Tier("P6")
	Storage_Tier_P60 = Storage_Tier("P60")
	Storage_Tier_P70 = Storage_Tier("P70")
	Storage_Tier_P80 = Storage_Tier("P80")
)

// Mapping from string to Storage_Tier
var storage_Tier_Values = map[string]Storage_Tier{
	"p1":  Storage_Tier_P1,
	"p10": Storage_Tier_P10,
	"p15": Storage_Tier_P15,
	"p2":  Storage_Tier_P2,
	"p20": Storage_Tier_P20,
	"p3":  Storage_Tier_P3,
	"p30": Storage_Tier_P30,
	"p4":  Storage_Tier_P4,
	"p40": Storage_Tier_P40,
	"p50": Storage_Tier_P50,
	"p6":  Storage_Tier_P6,
	"p60": Storage_Tier_P60,
	"p70": Storage_Tier_P70,
	"p80": Storage_Tier_P80,
}

// +kubebuilder:validation:Enum={"PremiumV2_LRS","Premium_LRS"}
type Storage_Type string

const (
	Storage_Type_PremiumV2_LRS = Storage_Type("PremiumV2_LRS")
	Storage_Type_Premium_LRS   = Storage_Type("Premium_LRS")
)

// Mapping from string to Storage_Type
var storage_Type_Values = map[string]Storage_Type{
	"premiumv2_lrs": Storage_Type_PremiumV2_LRS,
	"premium_lrs":   Storage_Type_Premium_LRS,
}
