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

import (
	"context"
	"github.com/Azure/azure-service-operator/v2/internal/genericarmclient"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/configmaps"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/core"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/secrets"
	"github.com/go-logr/logr"
	"github.com/rotisserie/eris"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime/schema"
	"sigs.k8s.io/controller-runtime/pkg/client"
)

// +kubebuilder:rbac:groups=dbforpostgresql.azure.com,resources=flexibleservers,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=dbforpostgresql.azure.com,resources={flexibleservers/status,flexibleservers/finalizers},verbs=get;update;patch

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories={azure,dbforpostgresql}
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity"
// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason"
// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message"
// Storage version of v1api20240801.FlexibleServer
// Generator information:
// - Generated from: /postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/FlexibleServers.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}
type FlexibleServer struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              FlexibleServer_Spec   `json:"spec,omitempty"`
	Status            FlexibleServer_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &FlexibleServer{}

// GetConditions returns the conditions of the resource
func (server *FlexibleServer) GetConditions() conditions.Conditions {
	return server.Status.Conditions
}

// SetConditions sets the conditions on the resource status
func (server *FlexibleServer) SetConditions(conditions conditions.Conditions) {
	server.Status.Conditions = conditions
}

var _ configmaps.Exporter = &FlexibleServer{}

// ConfigMapDestinationExpressions returns the Spec.OperatorSpec.ConfigMapExpressions property
func (server *FlexibleServer) ConfigMapDestinationExpressions() []*core.DestinationExpression {
	if server.Spec.OperatorSpec == nil {
		return nil
	}
	return server.Spec.OperatorSpec.ConfigMapExpressions
}

var _ secrets.Exporter = &FlexibleServer{}

// SecretDestinationExpressions returns the Spec.OperatorSpec.SecretExpressions property
func (server *FlexibleServer) SecretDestinationExpressions() []*core.DestinationExpression {
	if server.Spec.OperatorSpec == nil {
		return nil
	}
	return server.Spec.OperatorSpec.SecretExpressions
}

var _ genruntime.KubernetesConfigExporter = &FlexibleServer{}

// ExportKubernetesConfigMaps defines a resource which can create ConfigMaps in Kubernetes.
func (server *FlexibleServer) ExportKubernetesConfigMaps(_ context.Context, _ genruntime.MetaObject, _ *genericarmclient.GenericClient, _ logr.Logger) ([]client.Object, error) {
	collector := configmaps.NewCollector(server.Namespace)
	if server.Spec.OperatorSpec != nil && server.Spec.OperatorSpec.ConfigMaps != nil {
		if server.Status.FullyQualifiedDomainName != nil {
			collector.AddValue(server.Spec.OperatorSpec.ConfigMaps.FullyQualifiedDomainName, *server.Status.FullyQualifiedDomainName)
		}
	}
	result, err := collector.Values()
	if err != nil {
		return nil, err
	}
	return configmaps.SliceToClientObjectSlice(result), nil
}

var _ genruntime.KubernetesResource = &FlexibleServer{}

// AzureName returns the Azure name of the resource
func (server *FlexibleServer) AzureName() string {
	return server.Spec.AzureName
}

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

// GetResourceScope returns the scope of the resource
func (server *FlexibleServer) GetResourceScope() genruntime.ResourceScope {
	return genruntime.ResourceScopeResourceGroup
}

// GetSpec returns the specification of this resource
func (server *FlexibleServer) GetSpec() genruntime.ConvertibleSpec {
	return &server.Spec
}

// GetStatus returns the status of this resource
func (server *FlexibleServer) GetStatus() genruntime.ConvertibleStatus {
	return &server.Status
}

// GetSupportedOperations returns the operations supported by the resource
func (server *FlexibleServer) GetSupportedOperations() []genruntime.ResourceOperation {
	return []genruntime.ResourceOperation{
		genruntime.ResourceOperationDelete,
		genruntime.ResourceOperationGet,
		genruntime.ResourceOperationPut,
	}
}

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

// NewEmptyStatus returns a new empty (blank) status
func (server *FlexibleServer) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &FlexibleServer_STATUS{}
}

// Owner returns the ResourceReference of the owner
func (server *FlexibleServer) Owner() *genruntime.ResourceReference {
	if server.Spec.Owner == nil {
		return nil
	}

	group, kind := genruntime.LookupOwnerGroupKind(server.Spec)
	return server.Spec.Owner.AsResourceReference(group, kind)
}

// SetStatus sets the status of this resource
func (server *FlexibleServer) SetStatus(status genruntime.ConvertibleStatus) error {
	// If we have exactly the right type of status, assign it
	if st, ok := status.(*FlexibleServer_STATUS); ok {
		server.Status = *st
		return nil
	}

	// Convert status to required version
	var st FlexibleServer_STATUS
	err := status.ConvertStatusTo(&st)
	if err != nil {
		return eris.Wrap(err, "failed to convert status")
	}

	server.Status = st
	return nil
}

// Hub marks that this FlexibleServer is the hub type for conversion
func (server *FlexibleServer) Hub() {}

// OriginalGVK returns a GroupValueKind for the original API version used to create the resource
func (server *FlexibleServer) OriginalGVK() *schema.GroupVersionKind {
	return &schema.GroupVersionKind{
		Group:   GroupVersion.Group,
		Version: server.Spec.OriginalVersion,
		Kind:    "FlexibleServer",
	}
}

// +kubebuilder:object:root=true
// Storage version of v1api20240801.FlexibleServer
// Generator information:
// - Generated from: /postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/FlexibleServers.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}
type FlexibleServerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []FlexibleServer `json:"items"`
}

// Storage version of v1api20240801.APIVersion
// +kubebuilder:validation:Enum={"2024-08-01"}
type APIVersion string

const APIVersion_Value = APIVersion("2024-08-01")

// Storage version of v1api20240801.FlexibleServer_Spec
type FlexibleServer_Spec struct {
	AdministratorLogin         *string                     `json:"administratorLogin,omitempty"`
	AdministratorLoginPassword *genruntime.SecretReference `json:"administratorLoginPassword,omitempty"`
	AuthConfig                 *AuthConfig                 `json:"authConfig,omitempty"`
	AvailabilityZone           *string                     `json:"availabilityZone,omitempty"`

	// AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it
	// doesn't have to be.
	AzureName         string                      `json:"azureName,omitempty"`
	Backup            *Backup                     `json:"backup,omitempty"`
	CreateMode        *string                     `json:"createMode,omitempty"`
	DataEncryption    *DataEncryption             `json:"dataEncryption,omitempty"`
	HighAvailability  *HighAvailability           `json:"highAvailability,omitempty"`
	Identity          *UserAssignedIdentity       `json:"identity,omitempty"`
	Location          *string                     `json:"location,omitempty"`
	MaintenanceWindow *MaintenanceWindow          `json:"maintenanceWindow,omitempty"`
	Network           *Network                    `json:"network,omitempty"`
	OperatorSpec      *FlexibleServerOperatorSpec `json:"operatorSpec,omitempty"`
	OriginalVersion   string                      `json:"originalVersion,omitempty"`

	// +kubebuilder:validation:Required
	// Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also
	// controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a
	// reference to a resources.azure.com/ResourceGroup resource
	Owner           *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"`
	PointInTimeUTC  *string                            `json:"pointInTimeUTC,omitempty"`
	PropertyBag     genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
	Replica         *Replica                           `json:"replica,omitempty"`
	ReplicationRole *string                            `json:"replicationRole,omitempty"`
	Sku             *Sku                               `json:"sku,omitempty"`

	// SourceServerResourceReference: Identifier of the flexible server to be used as the source of the new flexible server.
	// Required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', 'Replica', or 'ReviveDropped'. This property is
	// returned only when the target flexible server is a read replica.
	SourceServerResourceReference *genruntime.ResourceReference `armReference:"SourceServerResourceId" json:"sourceServerResourceReference,omitempty"`
	Storage                       *Storage                      `json:"storage,omitempty"`
	Tags                          map[string]string             `json:"tags,omitempty"`
	Version                       *string                       `json:"version,omitempty"`
}

var _ genruntime.ConvertibleSpec = &FlexibleServer_Spec{}

// ConvertSpecFrom populates our FlexibleServer_Spec from the provided source
func (server *FlexibleServer_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error {
	if source == server {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec")
	}

	return source.ConvertSpecTo(server)
}

// ConvertSpecTo populates the provided destination from our FlexibleServer_Spec
func (server *FlexibleServer_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error {
	if destination == server {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec")
	}

	return destination.ConvertSpecFrom(server)
}

// Storage version of v1api20240801.FlexibleServer_STATUS
type FlexibleServer_STATUS struct {
	AdministratorLogin         *string                            `json:"administratorLogin,omitempty"`
	AuthConfig                 *AuthConfig_STATUS                 `json:"authConfig,omitempty"`
	AvailabilityZone           *string                            `json:"availabilityZone,omitempty"`
	Backup                     *Backup_STATUS                     `json:"backup,omitempty"`
	Conditions                 []conditions.Condition             `json:"conditions,omitempty"`
	CreateMode                 *string                            `json:"createMode,omitempty"`
	DataEncryption             *DataEncryption_STATUS             `json:"dataEncryption,omitempty"`
	FullyQualifiedDomainName   *string                            `json:"fullyQualifiedDomainName,omitempty"`
	HighAvailability           *HighAvailability_STATUS           `json:"highAvailability,omitempty"`
	Id                         *string                            `json:"id,omitempty"`
	Identity                   *UserAssignedIdentity_STATUS       `json:"identity,omitempty"`
	Location                   *string                            `json:"location,omitempty"`
	MaintenanceWindow          *MaintenanceWindow_STATUS          `json:"maintenanceWindow,omitempty"`
	MinorVersion               *string                            `json:"minorVersion,omitempty"`
	Name                       *string                            `json:"name,omitempty"`
	Network                    *Network_STATUS                    `json:"network,omitempty"`
	PointInTimeUTC             *string                            `json:"pointInTimeUTC,omitempty"`
	PrivateEndpointConnections []PrivateEndpointConnection_STATUS `json:"privateEndpointConnections,omitempty"`
	PropertyBag                genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
	Replica                    *Replica_STATUS                    `json:"replica,omitempty"`
	ReplicaCapacity            *int                               `json:"replicaCapacity,omitempty"`
	ReplicationRole            *string                            `json:"replicationRole,omitempty"`
	Sku                        *Sku_STATUS                        `json:"sku,omitempty"`
	SourceServerResourceId     *string                            `json:"sourceServerResourceId,omitempty"`
	State                      *string                            `json:"state,omitempty"`
	Storage                    *Storage_STATUS                    `json:"storage,omitempty"`
	SystemData                 *SystemData_STATUS                 `json:"systemData,omitempty"`
	Tags                       map[string]string                  `json:"tags,omitempty"`
	Type                       *string                            `json:"type,omitempty"`
	Version                    *string                            `json:"version,omitempty"`
}

var _ genruntime.ConvertibleStatus = &FlexibleServer_STATUS{}

// ConvertStatusFrom populates our FlexibleServer_STATUS from the provided source
func (server *FlexibleServer_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error {
	if source == server {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus")
	}

	return source.ConvertStatusTo(server)
}

// ConvertStatusTo populates the provided destination from our FlexibleServer_STATUS
func (server *FlexibleServer_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error {
	if destination == server {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus")
	}

	return destination.ConvertStatusFrom(server)
}

// Storage version of v1api20240801.AuthConfig
// Authentication configuration properties of a flexible server.
type AuthConfig struct {
	ActiveDirectoryAuth *string                `json:"activeDirectoryAuth,omitempty"`
	PasswordAuth        *string                `json:"passwordAuth,omitempty"`
	PropertyBag         genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TenantId            *string                `json:"tenantId,omitempty"`
}

// Storage version of v1api20240801.AuthConfig_STATUS
// Authentication configuration properties of a flexible server.
type AuthConfig_STATUS struct {
	ActiveDirectoryAuth *string                `json:"activeDirectoryAuth,omitempty"`
	PasswordAuth        *string                `json:"passwordAuth,omitempty"`
	PropertyBag         genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TenantId            *string                `json:"tenantId,omitempty"`
}

// Storage version of v1api20240801.Backup
// Backup properties of a flexible server.
type Backup struct {
	BackupRetentionDays *int                   `json:"backupRetentionDays,omitempty"`
	GeoRedundantBackup  *string                `json:"geoRedundantBackup,omitempty"`
	PropertyBag         genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240801.Backup_STATUS
// Backup properties of a flexible server.
type Backup_STATUS struct {
	BackupRetentionDays *int                   `json:"backupRetentionDays,omitempty"`
	EarliestRestoreDate *string                `json:"earliestRestoreDate,omitempty"`
	GeoRedundantBackup  *string                `json:"geoRedundantBackup,omitempty"`
	PropertyBag         genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240801.DataEncryption
// Data encryption properties of a flexible server.
type DataEncryption struct {
	GeoBackupEncryptionKeyStatus *string                        `json:"geoBackupEncryptionKeyStatus,omitempty"`
	GeoBackupKeyURI              *string                        `json:"geoBackupKeyURI,omitempty" optionalConfigMapPair:"GeoBackupKeyURI"`
	GeoBackupKeyURIFromConfig    *genruntime.ConfigMapReference `json:"geoBackupKeyURIFromConfig,omitempty" optionalConfigMapPair:"GeoBackupKeyURI"`

	// GeoBackupUserAssignedIdentityReference: Identifier of the user assigned managed identity used to access the key in Azure
	// Key Vault for data encryption of the geographically redundant storage associated to a flexible server that is configured
	// to support geographically redundant backups.
	GeoBackupUserAssignedIdentityReference *genruntime.ResourceReference  `armReference:"GeoBackupUserAssignedIdentityId" json:"geoBackupUserAssignedIdentityReference,omitempty"`
	PrimaryEncryptionKeyStatus             *string                        `json:"primaryEncryptionKeyStatus,omitempty"`
	PrimaryKeyURI                          *string                        `json:"primaryKeyURI,omitempty" optionalConfigMapPair:"PrimaryKeyURI"`
	PrimaryKeyURIFromConfig                *genruntime.ConfigMapReference `json:"primaryKeyURIFromConfig,omitempty" optionalConfigMapPair:"PrimaryKeyURI"`

	// PrimaryUserAssignedIdentityReference: Identifier of the user assigned managed identity used to access the key in Azure
	// Key Vault for data encryption of the primary storage associated to a flexible server.
	PrimaryUserAssignedIdentityReference *genruntime.ResourceReference `armReference:"PrimaryUserAssignedIdentityId" json:"primaryUserAssignedIdentityReference,omitempty"`
	PropertyBag                          genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	Type                                 *string                       `json:"type,omitempty"`
}

// Storage version of v1api20240801.DataEncryption_STATUS
// Data encryption properties of a flexible server.
type DataEncryption_STATUS struct {
	GeoBackupEncryptionKeyStatus    *string                `json:"geoBackupEncryptionKeyStatus,omitempty"`
	GeoBackupKeyURI                 *string                `json:"geoBackupKeyURI,omitempty"`
	GeoBackupUserAssignedIdentityId *string                `json:"geoBackupUserAssignedIdentityId,omitempty"`
	PrimaryEncryptionKeyStatus      *string                `json:"primaryEncryptionKeyStatus,omitempty"`
	PrimaryKeyURI                   *string                `json:"primaryKeyURI,omitempty"`
	PrimaryUserAssignedIdentityId   *string                `json:"primaryUserAssignedIdentityId,omitempty"`
	PropertyBag                     genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Type                            *string                `json:"type,omitempty"`
}

// Storage version of v1api20240801.FlexibleServerOperatorSpec
// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure
type FlexibleServerOperatorSpec struct {
	ConfigMapExpressions []*core.DestinationExpression     `json:"configMapExpressions,omitempty"`
	ConfigMaps           *FlexibleServerOperatorConfigMaps `json:"configMaps,omitempty"`
	PropertyBag          genruntime.PropertyBag            `json:"$propertyBag,omitempty"`
	SecretExpressions    []*core.DestinationExpression     `json:"secretExpressions,omitempty"`
	Secrets              *FlexibleServerOperatorSecrets    `json:"secrets,omitempty"`
}

// Storage version of v1api20240801.HighAvailability
// High availability properties of a flexible server.
type HighAvailability struct {
	Mode                    *string                `json:"mode,omitempty"`
	PropertyBag             genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	StandbyAvailabilityZone *string                `json:"standbyAvailabilityZone,omitempty"`
}

// Storage version of v1api20240801.HighAvailability_STATUS
// High availability properties of a flexible server.
type HighAvailability_STATUS struct {
	Mode                    *string                `json:"mode,omitempty"`
	PropertyBag             genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	StandbyAvailabilityZone *string                `json:"standbyAvailabilityZone,omitempty"`
	State                   *string                `json:"state,omitempty"`
}

// Storage version of v1api20240801.MaintenanceWindow
// Maintenance window properties of a flexible server.
type MaintenanceWindow struct {
	CustomWindow *string                `json:"customWindow,omitempty"`
	DayOfWeek    *int                   `json:"dayOfWeek,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	StartHour    *int                   `json:"startHour,omitempty"`
	StartMinute  *int                   `json:"startMinute,omitempty"`
}

// Storage version of v1api20240801.MaintenanceWindow_STATUS
// Maintenance window properties of a flexible server.
type MaintenanceWindow_STATUS struct {
	CustomWindow *string                `json:"customWindow,omitempty"`
	DayOfWeek    *int                   `json:"dayOfWeek,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	StartHour    *int                   `json:"startHour,omitempty"`
	StartMinute  *int                   `json:"startMinute,omitempty"`
}

// Storage version of v1api20240801.Network
// Network properties of a flexible server.
type Network struct {
	// DelegatedSubnetResourceReference: Resource identifier of the delegated subnet. Required during creation of a new server,
	// in case you want the server to be integrated into your own virtual network. For an update operation, you only have to
	// provide this property if you want to change the value assigned for the private DNS zone.
	DelegatedSubnetResourceReference *genruntime.ResourceReference `armReference:"DelegatedSubnetResourceId" json:"delegatedSubnetResourceReference,omitempty"`

	// PrivateDnsZoneArmResourceReference: Identifier of the private DNS zone. Required during creation of a new server, in
	// case you want the server to be integrated into your own virtual network. For an update operation, you only have to
	// provide this property if you want to change the value assigned for the private DNS zone.
	PrivateDnsZoneArmResourceReference *genruntime.ResourceReference `armReference:"PrivateDnsZoneArmResourceId" json:"privateDnsZoneArmResourceReference,omitempty"`
	PropertyBag                        genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	PublicNetworkAccess                *string                       `json:"publicNetworkAccess,omitempty"`
}

// Storage version of v1api20240801.Network_STATUS
// Network properties of a flexible server.
type Network_STATUS struct {
	DelegatedSubnetResourceId   *string                `json:"delegatedSubnetResourceId,omitempty"`
	PrivateDnsZoneArmResourceId *string                `json:"privateDnsZoneArmResourceId,omitempty"`
	PropertyBag                 genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	PublicNetworkAccess         *string                `json:"publicNetworkAccess,omitempty"`
}

// Storage version of v1api20240801.PrivateEndpointConnection_STATUS
// The private endpoint connection resource.
type PrivateEndpointConnection_STATUS struct {
	Id          *string                `json:"id,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240801.Replica
// Replica properties of a flexible server.
type Replica struct {
	PromoteMode   *string                `json:"promoteMode,omitempty"`
	PromoteOption *string                `json:"promoteOption,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Role          *string                `json:"role,omitempty"`
}

// Storage version of v1api20240801.Replica_STATUS
// Replica properties of a flexible server.
type Replica_STATUS struct {
	Capacity         *int                   `json:"capacity,omitempty"`
	PromoteMode      *string                `json:"promoteMode,omitempty"`
	PromoteOption    *string                `json:"promoteOption,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ReplicationState *string                `json:"replicationState,omitempty"`
	Role             *string                `json:"role,omitempty"`
}

// Storage version of v1api20240801.Sku
// Compute information of a flexible server.
type Sku struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tier        *string                `json:"tier,omitempty"`
}

// Storage version of v1api20240801.Sku_STATUS
// Compute information of a flexible server.
type Sku_STATUS struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tier        *string                `json:"tier,omitempty"`
}

// Storage version of v1api20240801.Storage
// Storage properties of a flexible server.
type Storage struct {
	AutoGrow      *string                `json:"autoGrow,omitempty"`
	Iops          *int                   `json:"iops,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	StorageSizeGB *int                   `json:"storageSizeGB,omitempty"`
	Throughput    *int                   `json:"throughput,omitempty"`
	Tier          *string                `json:"tier,omitempty"`
	Type          *string                `json:"type,omitempty"`
}

// Storage version of v1api20240801.Storage_STATUS
// Storage properties of a flexible server.
type Storage_STATUS struct {
	AutoGrow      *string                `json:"autoGrow,omitempty"`
	Iops          *int                   `json:"iops,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	StorageSizeGB *int                   `json:"storageSizeGB,omitempty"`
	Throughput    *int                   `json:"throughput,omitempty"`
	Tier          *string                `json:"tier,omitempty"`
	Type          *string                `json:"type,omitempty"`
}

// Storage version of v1api20240801.SystemData_STATUS
// Metadata pertaining to creation and last modification of the resource.
type SystemData_STATUS struct {
	CreatedAt          *string                `json:"createdAt,omitempty"`
	CreatedBy          *string                `json:"createdBy,omitempty"`
	CreatedByType      *string                `json:"createdByType,omitempty"`
	LastModifiedAt     *string                `json:"lastModifiedAt,omitempty"`
	LastModifiedBy     *string                `json:"lastModifiedBy,omitempty"`
	LastModifiedByType *string                `json:"lastModifiedByType,omitempty"`
	PropertyBag        genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240801.UserAssignedIdentity
// Identities associated with a flexible server.
type UserAssignedIdentity struct {
	PrincipalId            *string                       `json:"principalId,omitempty"`
	PropertyBag            genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	Type                   *string                       `json:"type,omitempty"`
	UserAssignedIdentities []UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"`
}

// Storage version of v1api20240801.UserAssignedIdentity_STATUS
// Identities associated with a flexible server.
type UserAssignedIdentity_STATUS struct {
	PrincipalId            *string                        `json:"principalId,omitempty"`
	PropertyBag            genruntime.PropertyBag         `json:"$propertyBag,omitempty"`
	TenantId               *string                        `json:"tenantId,omitempty"`
	Type                   *string                        `json:"type,omitempty"`
	UserAssignedIdentities map[string]UserIdentity_STATUS `json:"userAssignedIdentities,omitempty"`
}

// Storage version of v1api20240801.FlexibleServerOperatorConfigMaps
type FlexibleServerOperatorConfigMaps struct {
	FullyQualifiedDomainName *genruntime.ConfigMapDestination `json:"fullyQualifiedDomainName,omitempty"`
	PropertyBag              genruntime.PropertyBag           `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240801.FlexibleServerOperatorSecrets
type FlexibleServerOperatorSecrets struct {
	FullyQualifiedDomainName *genruntime.SecretDestination `json:"fullyQualifiedDomainName,omitempty"`
	PropertyBag              genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240801.UserAssignedIdentityDetails
// Information about the user assigned identity for the resource
type UserAssignedIdentityDetails struct {
	PropertyBag genruntime.PropertyBag       `json:"$propertyBag,omitempty"`
	Reference   genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"`
}

// Storage version of v1api20240801.UserIdentity_STATUS
// User assigned managed identity associated with a flexible server.
type UserIdentity_STATUS struct {
	ClientId    *string                `json:"clientId,omitempty"`
	PrincipalId *string                `json:"principalId,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

func init() {
	SchemeBuilder.Register(&FlexibleServer{}, &FlexibleServerList{})
}
