// 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=storage.azure.com,resources=storageaccounts,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=storage.azure.com,resources={storageaccounts/status,storageaccounts/finalizers},verbs=get;update;patch

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories={azure,storage}
// +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 v1api20230101.StorageAccount
// Generator information:
// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/storage.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}
type StorageAccount struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              StorageAccount_Spec   `json:"spec,omitempty"`
	Status            StorageAccount_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &StorageAccount{}

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

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

var _ configmaps.Exporter = &StorageAccount{}

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

var _ secrets.Exporter = &StorageAccount{}

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

var _ genruntime.KubernetesConfigExporter = &StorageAccount{}

// ExportKubernetesConfigMaps defines a resource which can create ConfigMaps in Kubernetes.
func (account *StorageAccount) ExportKubernetesConfigMaps(_ context.Context, _ genruntime.MetaObject, _ *genericarmclient.GenericClient, _ logr.Logger) ([]client.Object, error) {
	collector := configmaps.NewCollector(account.Namespace)
	if account.Spec.OperatorSpec != nil && account.Spec.OperatorSpec.ConfigMaps != nil {
		if account.Status.PrimaryEndpoints != nil {
			if account.Status.PrimaryEndpoints.Blob != nil {
				collector.AddValue(account.Spec.OperatorSpec.ConfigMaps.BlobEndpoint, *account.Status.PrimaryEndpoints.Blob)
			}
		}
	}
	if account.Spec.OperatorSpec != nil && account.Spec.OperatorSpec.ConfigMaps != nil {
		if account.Status.PrimaryEndpoints != nil {
			if account.Status.PrimaryEndpoints.Dfs != nil {
				collector.AddValue(account.Spec.OperatorSpec.ConfigMaps.DfsEndpoint, *account.Status.PrimaryEndpoints.Dfs)
			}
		}
	}
	if account.Spec.OperatorSpec != nil && account.Spec.OperatorSpec.ConfigMaps != nil {
		if account.Status.PrimaryEndpoints != nil {
			if account.Status.PrimaryEndpoints.File != nil {
				collector.AddValue(account.Spec.OperatorSpec.ConfigMaps.FileEndpoint, *account.Status.PrimaryEndpoints.File)
			}
		}
	}
	if account.Spec.OperatorSpec != nil && account.Spec.OperatorSpec.ConfigMaps != nil {
		if account.Status.PrimaryEndpoints != nil {
			if account.Status.PrimaryEndpoints.Queue != nil {
				collector.AddValue(account.Spec.OperatorSpec.ConfigMaps.QueueEndpoint, *account.Status.PrimaryEndpoints.Queue)
			}
		}
	}
	if account.Spec.OperatorSpec != nil && account.Spec.OperatorSpec.ConfigMaps != nil {
		if account.Status.PrimaryEndpoints != nil {
			if account.Status.PrimaryEndpoints.Table != nil {
				collector.AddValue(account.Spec.OperatorSpec.ConfigMaps.TableEndpoint, *account.Status.PrimaryEndpoints.Table)
			}
		}
	}
	if account.Spec.OperatorSpec != nil && account.Spec.OperatorSpec.ConfigMaps != nil {
		if account.Status.PrimaryEndpoints != nil {
			if account.Status.PrimaryEndpoints.Web != nil {
				collector.AddValue(account.Spec.OperatorSpec.ConfigMaps.WebEndpoint, *account.Status.PrimaryEndpoints.Web)
			}
		}
	}
	result, err := collector.Values()
	if err != nil {
		return nil, err
	}
	return configmaps.SliceToClientObjectSlice(result), nil
}

var _ genruntime.KubernetesResource = &StorageAccount{}

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

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

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

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

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.Storage/storageAccounts"
func (account *StorageAccount) GetType() string {
	return "Microsoft.Storage/storageAccounts"
}

// NewEmptyStatus returns a new empty (blank) status
func (account *StorageAccount) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &StorageAccount_STATUS{}
}

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

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

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

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

	account.Status = st
	return nil
}

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

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

// +kubebuilder:object:root=true
// Storage version of v1api20230101.StorageAccount
// Generator information:
// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2023-01-01/storage.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}
type StorageAccountList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []StorageAccount `json:"items"`
}

// Storage version of v1api20230101.APIVersion
// +kubebuilder:validation:Enum={"2023-01-01"}
type APIVersion string

const APIVersion_Value = APIVersion("2023-01-01")

// Storage version of v1api20230101.StorageAccount_Spec
type StorageAccount_Spec struct {
	AccessTier                            *string                                `json:"accessTier,omitempty"`
	AllowBlobPublicAccess                 *bool                                  `json:"allowBlobPublicAccess,omitempty"`
	AllowCrossTenantReplication           *bool                                  `json:"allowCrossTenantReplication,omitempty"`
	AllowSharedKeyAccess                  *bool                                  `json:"allowSharedKeyAccess,omitempty"`
	AllowedCopyScope                      *string                                `json:"allowedCopyScope,omitempty"`
	AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,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"`
	CustomDomain                   *CustomDomain               `json:"customDomain,omitempty"`
	DefaultToOAuthAuthentication   *bool                       `json:"defaultToOAuthAuthentication,omitempty"`
	DnsEndpointType                *string                     `json:"dnsEndpointType,omitempty"`
	Encryption                     *Encryption                 `json:"encryption,omitempty"`
	ExtendedLocation               *ExtendedLocation           `json:"extendedLocation,omitempty"`
	Identity                       *Identity                   `json:"identity,omitempty"`
	ImmutableStorageWithVersioning *ImmutableStorageAccount    `json:"immutableStorageWithVersioning,omitempty"`
	IsHnsEnabled                   *bool                       `json:"isHnsEnabled,omitempty"`
	IsLocalUserEnabled             *bool                       `json:"isLocalUserEnabled,omitempty"`
	IsNfsV3Enabled                 *bool                       `json:"isNfsV3Enabled,omitempty"`
	IsSftpEnabled                  *bool                       `json:"isSftpEnabled,omitempty"`
	KeyPolicy                      *KeyPolicy                  `json:"keyPolicy,omitempty"`
	Kind                           *string                     `json:"kind,omitempty"`
	LargeFileSharesState           *string                     `json:"largeFileSharesState,omitempty"`
	Location                       *string                     `json:"location,omitempty"`
	MinimumTlsVersion              *string                     `json:"minimumTlsVersion,omitempty"`
	NetworkAcls                    *NetworkRuleSet             `json:"networkAcls,omitempty"`
	OperatorSpec                   *StorageAccountOperatorSpec `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"`
	PropertyBag              genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
	PublicNetworkAccess      *string                            `json:"publicNetworkAccess,omitempty"`
	RoutingPreference        *RoutingPreference                 `json:"routingPreference,omitempty"`
	SasPolicy                *SasPolicy                         `json:"sasPolicy,omitempty"`
	Sku                      *Sku                               `json:"sku,omitempty"`
	SupportsHttpsTrafficOnly *bool                              `json:"supportsHttpsTrafficOnly,omitempty"`
	Tags                     map[string]string                  `json:"tags,omitempty"`
}

var _ genruntime.ConvertibleSpec = &StorageAccount_Spec{}

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

	return source.ConvertSpecTo(account)
}

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

	return destination.ConvertSpecFrom(account)
}

// Storage version of v1api20230101.StorageAccount_STATUS
// The storage account.
type StorageAccount_STATUS struct {
	AccessTier                            *string                                       `json:"accessTier,omitempty"`
	AccountMigrationInProgress            *bool                                         `json:"accountMigrationInProgress,omitempty"`
	AllowBlobPublicAccess                 *bool                                         `json:"allowBlobPublicAccess,omitempty"`
	AllowCrossTenantReplication           *bool                                         `json:"allowCrossTenantReplication,omitempty"`
	AllowSharedKeyAccess                  *bool                                         `json:"allowSharedKeyAccess,omitempty"`
	AllowedCopyScope                      *string                                       `json:"allowedCopyScope,omitempty"`
	AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication_STATUS `json:"azureFilesIdentityBasedAuthentication,omitempty"`
	BlobRestoreStatus                     *BlobRestoreStatus_STATUS                     `json:"blobRestoreStatus,omitempty"`
	Conditions                            []conditions.Condition                        `json:"conditions,omitempty"`
	CreationTime                          *string                                       `json:"creationTime,omitempty"`
	CustomDomain                          *CustomDomain_STATUS                          `json:"customDomain,omitempty"`
	DefaultToOAuthAuthentication          *bool                                         `json:"defaultToOAuthAuthentication,omitempty"`
	DnsEndpointType                       *string                                       `json:"dnsEndpointType,omitempty"`
	Encryption                            *Encryption_STATUS                            `json:"encryption,omitempty"`
	ExtendedLocation                      *ExtendedLocation_STATUS                      `json:"extendedLocation,omitempty"`
	FailoverInProgress                    *bool                                         `json:"failoverInProgress,omitempty"`
	GeoReplicationStats                   *GeoReplicationStats_STATUS                   `json:"geoReplicationStats,omitempty"`
	Id                                    *string                                       `json:"id,omitempty"`
	Identity                              *Identity_STATUS                              `json:"identity,omitempty"`
	ImmutableStorageWithVersioning        *ImmutableStorageAccount_STATUS               `json:"immutableStorageWithVersioning,omitempty"`
	IsHnsEnabled                          *bool                                         `json:"isHnsEnabled,omitempty"`
	IsLocalUserEnabled                    *bool                                         `json:"isLocalUserEnabled,omitempty"`
	IsNfsV3Enabled                        *bool                                         `json:"isNfsV3Enabled,omitempty"`
	IsSftpEnabled                         *bool                                         `json:"isSftpEnabled,omitempty"`
	IsSkuConversionBlocked                *bool                                         `json:"isSkuConversionBlocked,omitempty"`
	KeyCreationTime                       *KeyCreationTime_STATUS                       `json:"keyCreationTime,omitempty"`
	KeyPolicy                             *KeyPolicy_STATUS                             `json:"keyPolicy,omitempty"`
	Kind                                  *string                                       `json:"kind,omitempty"`
	LargeFileSharesState                  *string                                       `json:"largeFileSharesState,omitempty"`
	LastGeoFailoverTime                   *string                                       `json:"lastGeoFailoverTime,omitempty"`
	Location                              *string                                       `json:"location,omitempty"`
	MinimumTlsVersion                     *string                                       `json:"minimumTlsVersion,omitempty"`
	Name                                  *string                                       `json:"name,omitempty"`
	NetworkAcls                           *NetworkRuleSet_STATUS                        `json:"networkAcls,omitempty"`
	PrimaryEndpoints                      *Endpoints_STATUS                             `json:"primaryEndpoints,omitempty"`
	PrimaryLocation                       *string                                       `json:"primaryLocation,omitempty"`
	PrivateEndpointConnections            []PrivateEndpointConnection_STATUS            `json:"privateEndpointConnections,omitempty"`
	PropertyBag                           genruntime.PropertyBag                        `json:"$propertyBag,omitempty"`
	ProvisioningState                     *string                                       `json:"provisioningState,omitempty"`
	PublicNetworkAccess                   *string                                       `json:"publicNetworkAccess,omitempty"`
	RoutingPreference                     *RoutingPreference_STATUS                     `json:"routingPreference,omitempty"`
	SasPolicy                             *SasPolicy_STATUS                             `json:"sasPolicy,omitempty"`
	SecondaryEndpoints                    *Endpoints_STATUS                             `json:"secondaryEndpoints,omitempty"`
	SecondaryLocation                     *string                                       `json:"secondaryLocation,omitempty"`
	Sku                                   *Sku_STATUS                                   `json:"sku,omitempty"`
	StatusOfPrimary                       *string                                       `json:"statusOfPrimary,omitempty"`
	StatusOfSecondary                     *string                                       `json:"statusOfSecondary,omitempty"`
	StorageAccountSkuConversionStatus     *StorageAccountSkuConversionStatus_STATUS     `json:"storageAccountSkuConversionStatus,omitempty"`
	SupportsHttpsTrafficOnly              *bool                                         `json:"supportsHttpsTrafficOnly,omitempty"`
	Tags                                  map[string]string                             `json:"tags,omitempty"`
	Type                                  *string                                       `json:"type,omitempty"`
}

var _ genruntime.ConvertibleStatus = &StorageAccount_STATUS{}

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

	return source.ConvertStatusTo(account)
}

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

	return destination.ConvertStatusFrom(account)
}

// Storage version of v1api20230101.AzureFilesIdentityBasedAuthentication
// Settings for Azure Files identity based authentication.
type AzureFilesIdentityBasedAuthentication struct {
	ActiveDirectoryProperties *ActiveDirectoryProperties `json:"activeDirectoryProperties,omitempty"`
	DefaultSharePermission    *string                    `json:"defaultSharePermission,omitempty"`
	DirectoryServiceOptions   *string                    `json:"directoryServiceOptions,omitempty"`
	PropertyBag               genruntime.PropertyBag     `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230101.AzureFilesIdentityBasedAuthentication_STATUS
// Settings for Azure Files identity based authentication.
type AzureFilesIdentityBasedAuthentication_STATUS struct {
	ActiveDirectoryProperties *ActiveDirectoryProperties_STATUS `json:"activeDirectoryProperties,omitempty"`
	DefaultSharePermission    *string                           `json:"defaultSharePermission,omitempty"`
	DirectoryServiceOptions   *string                           `json:"directoryServiceOptions,omitempty"`
	PropertyBag               genruntime.PropertyBag            `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230101.BlobRestoreStatus_STATUS
// Blob restore status.
type BlobRestoreStatus_STATUS struct {
	FailureReason *string                       `json:"failureReason,omitempty"`
	Parameters    *BlobRestoreParameters_STATUS `json:"parameters,omitempty"`
	PropertyBag   genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	RestoreId     *string                       `json:"restoreId,omitempty"`
	Status        *string                       `json:"status,omitempty"`
}

// Storage version of v1api20230101.CustomDomain
// The custom domain assigned to this storage account. This can be set via Update.
type CustomDomain struct {
	Name             *string                `json:"name,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	UseSubDomainName *bool                  `json:"useSubDomainName,omitempty"`
}

// Storage version of v1api20230101.CustomDomain_STATUS
// The custom domain assigned to this storage account. This can be set via Update.
type CustomDomain_STATUS struct {
	Name             *string                `json:"name,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	UseSubDomainName *bool                  `json:"useSubDomainName,omitempty"`
}

// Storage version of v1api20230101.Encryption
// The encryption settings on the storage account.
type Encryption struct {
	Identity                        *EncryptionIdentity    `json:"identity,omitempty"`
	KeySource                       *string                `json:"keySource,omitempty"`
	Keyvaultproperties              *KeyVaultProperties    `json:"keyvaultproperties,omitempty"`
	PropertyBag                     genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	RequireInfrastructureEncryption *bool                  `json:"requireInfrastructureEncryption,omitempty"`
	Services                        *EncryptionServices    `json:"services,omitempty"`
}

// Storage version of v1api20230101.Encryption_STATUS
// The encryption settings on the storage account.
type Encryption_STATUS struct {
	Identity                        *EncryptionIdentity_STATUS `json:"identity,omitempty"`
	KeySource                       *string                    `json:"keySource,omitempty"`
	Keyvaultproperties              *KeyVaultProperties_STATUS `json:"keyvaultproperties,omitempty"`
	PropertyBag                     genruntime.PropertyBag     `json:"$propertyBag,omitempty"`
	RequireInfrastructureEncryption *bool                      `json:"requireInfrastructureEncryption,omitempty"`
	Services                        *EncryptionServices_STATUS `json:"services,omitempty"`
}

// Storage version of v1api20230101.Endpoints_STATUS
// The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object.
type Endpoints_STATUS struct {
	Blob               *string                                  `json:"blob,omitempty"`
	Dfs                *string                                  `json:"dfs,omitempty"`
	File               *string                                  `json:"file,omitempty"`
	InternetEndpoints  *StorageAccountInternetEndpoints_STATUS  `json:"internetEndpoints,omitempty"`
	MicrosoftEndpoints *StorageAccountMicrosoftEndpoints_STATUS `json:"microsoftEndpoints,omitempty"`
	PropertyBag        genruntime.PropertyBag                   `json:"$propertyBag,omitempty"`
	Queue              *string                                  `json:"queue,omitempty"`
	Table              *string                                  `json:"table,omitempty"`
	Web                *string                                  `json:"web,omitempty"`
}

// Storage version of v1api20230101.ExtendedLocation
// The complex type of the extended location.
type ExtendedLocation struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Type        *string                `json:"type,omitempty"`
}

// Storage version of v1api20230101.ExtendedLocation_STATUS
// The complex type of the extended location.
type ExtendedLocation_STATUS struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Type        *string                `json:"type,omitempty"`
}

// Storage version of v1api20230101.GeoReplicationStats_STATUS
// Statistics related to replication for storage account's Blob, Table, Queue and File services. It is only available when
// geo-redundant replication is enabled for the storage account.
type GeoReplicationStats_STATUS struct {
	CanFailover                   *bool                  `json:"canFailover,omitempty"`
	CanPlannedFailover            *bool                  `json:"canPlannedFailover,omitempty"`
	LastSyncTime                  *string                `json:"lastSyncTime,omitempty"`
	PostFailoverRedundancy        *string                `json:"postFailoverRedundancy,omitempty"`
	PostPlannedFailoverRedundancy *string                `json:"postPlannedFailoverRedundancy,omitempty"`
	PropertyBag                   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Status                        *string                `json:"status,omitempty"`
}

// Storage version of v1api20230101.Identity
// Identity for the resource.
type Identity struct {
	PropertyBag            genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	Type                   *string                       `json:"type,omitempty"`
	UserAssignedIdentities []UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"`
}

// Storage version of v1api20230101.Identity_STATUS
// Identity for the resource.
type Identity_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]UserAssignedIdentity_STATUS `json:"userAssignedIdentities,omitempty"`
}

// Storage version of v1api20230101.ImmutableStorageAccount
// This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning.
type ImmutableStorageAccount struct {
	Enabled            *bool                                `json:"enabled,omitempty"`
	ImmutabilityPolicy *AccountImmutabilityPolicyProperties `json:"immutabilityPolicy,omitempty"`
	PropertyBag        genruntime.PropertyBag               `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230101.ImmutableStorageAccount_STATUS
// This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning.
type ImmutableStorageAccount_STATUS struct {
	Enabled            *bool                                       `json:"enabled,omitempty"`
	ImmutabilityPolicy *AccountImmutabilityPolicyProperties_STATUS `json:"immutabilityPolicy,omitempty"`
	PropertyBag        genruntime.PropertyBag                      `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230101.KeyCreationTime_STATUS
// Storage account keys creation time.
type KeyCreationTime_STATUS struct {
	Key1        *string                `json:"key1,omitempty"`
	Key2        *string                `json:"key2,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230101.KeyPolicy
// KeyPolicy assigned to the storage account.
type KeyPolicy struct {
	KeyExpirationPeriodInDays *int                   `json:"keyExpirationPeriodInDays,omitempty"`
	PropertyBag               genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230101.KeyPolicy_STATUS
// KeyPolicy assigned to the storage account.
type KeyPolicy_STATUS struct {
	KeyExpirationPeriodInDays *int                   `json:"keyExpirationPeriodInDays,omitempty"`
	PropertyBag               genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230101.NetworkRuleSet
// Network rule set
type NetworkRuleSet struct {
	Bypass              *string                `json:"bypass,omitempty"`
	DefaultAction       *string                `json:"defaultAction,omitempty"`
	IpRules             []IPRule               `json:"ipRules,omitempty"`
	PropertyBag         genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ResourceAccessRules []ResourceAccessRule   `json:"resourceAccessRules,omitempty"`
	VirtualNetworkRules []VirtualNetworkRule   `json:"virtualNetworkRules,omitempty"`
}

// Storage version of v1api20230101.NetworkRuleSet_STATUS
// Network rule set
type NetworkRuleSet_STATUS struct {
	Bypass              *string                     `json:"bypass,omitempty"`
	DefaultAction       *string                     `json:"defaultAction,omitempty"`
	IpRules             []IPRule_STATUS             `json:"ipRules,omitempty"`
	PropertyBag         genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
	ResourceAccessRules []ResourceAccessRule_STATUS `json:"resourceAccessRules,omitempty"`
	VirtualNetworkRules []VirtualNetworkRule_STATUS `json:"virtualNetworkRules,omitempty"`
}

// Storage version of v1api20230101.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 v1api20230101.RoutingPreference
// Routing preference defines the type of network, either microsoft or internet routing to be used to deliver the user
// data, the default option is microsoft routing
type RoutingPreference struct {
	PropertyBag               genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	PublishInternetEndpoints  *bool                  `json:"publishInternetEndpoints,omitempty"`
	PublishMicrosoftEndpoints *bool                  `json:"publishMicrosoftEndpoints,omitempty"`
	RoutingChoice             *string                `json:"routingChoice,omitempty"`
}

// Storage version of v1api20230101.RoutingPreference_STATUS
// Routing preference defines the type of network, either microsoft or internet routing to be used to deliver the user
// data, the default option is microsoft routing
type RoutingPreference_STATUS struct {
	PropertyBag               genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	PublishInternetEndpoints  *bool                  `json:"publishInternetEndpoints,omitempty"`
	PublishMicrosoftEndpoints *bool                  `json:"publishMicrosoftEndpoints,omitempty"`
	RoutingChoice             *string                `json:"routingChoice,omitempty"`
}

// Storage version of v1api20230101.SasPolicy
// SasPolicy assigned to the storage account.
type SasPolicy struct {
	ExpirationAction    *string                `json:"expirationAction,omitempty"`
	PropertyBag         genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SasExpirationPeriod *string                `json:"sasExpirationPeriod,omitempty"`
}

// Storage version of v1api20230101.SasPolicy_STATUS
// SasPolicy assigned to the storage account.
type SasPolicy_STATUS struct {
	ExpirationAction    *string                `json:"expirationAction,omitempty"`
	PropertyBag         genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SasExpirationPeriod *string                `json:"sasExpirationPeriod,omitempty"`
}

// Storage version of v1api20230101.Sku
// The SKU of the storage account.
type Sku struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tier        *string                `json:"tier,omitempty"`
}

// Storage version of v1api20230101.Sku_STATUS
// The SKU of the storage account.
type Sku_STATUS struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tier        *string                `json:"tier,omitempty"`
}

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

// Storage version of v1api20230101.StorageAccountSkuConversionStatus_STATUS
// This defines the sku conversion status object for asynchronous sku conversions.
type StorageAccountSkuConversionStatus_STATUS struct {
	EndTime             *string                `json:"endTime,omitempty"`
	PropertyBag         genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SkuConversionStatus *string                `json:"skuConversionStatus,omitempty"`
	StartTime           *string                `json:"startTime,omitempty"`
	TargetSkuName       *string                `json:"targetSkuName,omitempty"`
}

// Storage version of v1api20230101.AccountImmutabilityPolicyProperties
// This defines account-level immutability policy properties.
type AccountImmutabilityPolicyProperties struct {
	AllowProtectedAppendWrites            *bool                  `json:"allowProtectedAppendWrites,omitempty"`
	ImmutabilityPeriodSinceCreationInDays *int                   `json:"immutabilityPeriodSinceCreationInDays,omitempty"`
	PropertyBag                           genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	State                                 *string                `json:"state,omitempty"`
}

// Storage version of v1api20230101.AccountImmutabilityPolicyProperties_STATUS
// This defines account-level immutability policy properties.
type AccountImmutabilityPolicyProperties_STATUS struct {
	AllowProtectedAppendWrites            *bool                  `json:"allowProtectedAppendWrites,omitempty"`
	ImmutabilityPeriodSinceCreationInDays *int                   `json:"immutabilityPeriodSinceCreationInDays,omitempty"`
	PropertyBag                           genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	State                                 *string                `json:"state,omitempty"`
}

// Storage version of v1api20230101.ActiveDirectoryProperties
// Settings properties for Active Directory (AD).
type ActiveDirectoryProperties struct {
	AccountType       *string                `json:"accountType,omitempty"`
	AzureStorageSid   *string                `json:"azureStorageSid,omitempty"`
	DomainGuid        *string                `json:"domainGuid,omitempty"`
	DomainName        *string                `json:"domainName,omitempty"`
	DomainSid         *string                `json:"domainSid,omitempty"`
	ForestName        *string                `json:"forestName,omitempty"`
	NetBiosDomainName *string                `json:"netBiosDomainName,omitempty"`
	PropertyBag       genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SamAccountName    *string                `json:"samAccountName,omitempty"`
}

// Storage version of v1api20230101.ActiveDirectoryProperties_STATUS
// Settings properties for Active Directory (AD).
type ActiveDirectoryProperties_STATUS struct {
	AccountType       *string                `json:"accountType,omitempty"`
	AzureStorageSid   *string                `json:"azureStorageSid,omitempty"`
	DomainGuid        *string                `json:"domainGuid,omitempty"`
	DomainName        *string                `json:"domainName,omitempty"`
	DomainSid         *string                `json:"domainSid,omitempty"`
	ForestName        *string                `json:"forestName,omitempty"`
	NetBiosDomainName *string                `json:"netBiosDomainName,omitempty"`
	PropertyBag       genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SamAccountName    *string                `json:"samAccountName,omitempty"`
}

// Storage version of v1api20230101.BlobRestoreParameters_STATUS
// Blob restore parameters
type BlobRestoreParameters_STATUS struct {
	BlobRanges    []BlobRestoreRange_STATUS `json:"blobRanges,omitempty"`
	PropertyBag   genruntime.PropertyBag    `json:"$propertyBag,omitempty"`
	TimeToRestore *string                   `json:"timeToRestore,omitempty"`
}

// Storage version of v1api20230101.EncryptionIdentity
// Encryption identity for the storage account.
type EncryptionIdentity struct {
	FederatedIdentityClientId *string                `json:"federatedIdentityClientId,omitempty"`
	PropertyBag               genruntime.PropertyBag `json:"$propertyBag,omitempty"`

	// UserAssignedIdentityReference: Resource identifier of the UserAssigned identity to be associated with server-side
	// encryption on the storage account.
	UserAssignedIdentityReference *genruntime.ResourceReference `armReference:"UserAssignedIdentity" json:"userAssignedIdentityReference,omitempty"`
}

// Storage version of v1api20230101.EncryptionIdentity_STATUS
// Encryption identity for the storage account.
type EncryptionIdentity_STATUS struct {
	FederatedIdentityClientId *string                `json:"federatedIdentityClientId,omitempty"`
	PropertyBag               genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	UserAssignedIdentity      *string                `json:"userAssignedIdentity,omitempty"`
}

// Storage version of v1api20230101.EncryptionServices
// A list of services that support encryption.
type EncryptionServices struct {
	Blob        *EncryptionService     `json:"blob,omitempty"`
	File        *EncryptionService     `json:"file,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Queue       *EncryptionService     `json:"queue,omitempty"`
	Table       *EncryptionService     `json:"table,omitempty"`
}

// Storage version of v1api20230101.EncryptionServices_STATUS
// A list of services that support encryption.
type EncryptionServices_STATUS struct {
	Blob        *EncryptionService_STATUS `json:"blob,omitempty"`
	File        *EncryptionService_STATUS `json:"file,omitempty"`
	PropertyBag genruntime.PropertyBag    `json:"$propertyBag,omitempty"`
	Queue       *EncryptionService_STATUS `json:"queue,omitempty"`
	Table       *EncryptionService_STATUS `json:"table,omitempty"`
}

// Storage version of v1api20230101.IPRule
// IP rule with specific IP or IP range in CIDR format.
type IPRule struct {
	Action          *string                        `json:"action,omitempty"`
	PropertyBag     genruntime.PropertyBag         `json:"$propertyBag,omitempty"`
	Value           *string                        `json:"value,omitempty" optionalConfigMapPair:"Value"`
	ValueFromConfig *genruntime.ConfigMapReference `json:"valueFromConfig,omitempty" optionalConfigMapPair:"Value"`
}

// Storage version of v1api20230101.IPRule_STATUS
// IP rule with specific IP or IP range in CIDR format.
type IPRule_STATUS struct {
	Action      *string                `json:"action,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Value       *string                `json:"value,omitempty"`
}

// Storage version of v1api20230101.KeyVaultProperties
// Properties of key vault.
type KeyVaultProperties struct {
	Keyname     *string                `json:"keyname,omitempty"`
	Keyvaulturi *string                `json:"keyvaulturi,omitempty"`
	Keyversion  *string                `json:"keyversion,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230101.KeyVaultProperties_STATUS
// Properties of key vault.
type KeyVaultProperties_STATUS struct {
	CurrentVersionedKeyExpirationTimestamp *string                `json:"currentVersionedKeyExpirationTimestamp,omitempty"`
	CurrentVersionedKeyIdentifier          *string                `json:"currentVersionedKeyIdentifier,omitempty"`
	Keyname                                *string                `json:"keyname,omitempty"`
	Keyvaulturi                            *string                `json:"keyvaulturi,omitempty"`
	Keyversion                             *string                `json:"keyversion,omitempty"`
	LastKeyRotationTimestamp               *string                `json:"lastKeyRotationTimestamp,omitempty"`
	PropertyBag                            genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230101.ResourceAccessRule
// Resource Access Rule.
type ResourceAccessRule struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`

	// ResourceReference: Resource Id
	ResourceReference *genruntime.ResourceReference `armReference:"ResourceId" json:"resourceReference,omitempty"`
	TenantId          *string                       `json:"tenantId,omitempty"`
}

// Storage version of v1api20230101.ResourceAccessRule_STATUS
// Resource Access Rule.
type ResourceAccessRule_STATUS struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ResourceId  *string                `json:"resourceId,omitempty"`
	TenantId    *string                `json:"tenantId,omitempty"`
}

// Storage version of v1api20230101.StorageAccountInternetEndpoints_STATUS
// The URIs that are used to perform a retrieval of a public blob, file, web or dfs object via a internet routing endpoint.
type StorageAccountInternetEndpoints_STATUS struct {
	Blob        *string                `json:"blob,omitempty"`
	Dfs         *string                `json:"dfs,omitempty"`
	File        *string                `json:"file,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Web         *string                `json:"web,omitempty"`
}

// Storage version of v1api20230101.StorageAccountMicrosoftEndpoints_STATUS
// The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object via a microsoft routing
// endpoint.
type StorageAccountMicrosoftEndpoints_STATUS struct {
	Blob        *string                `json:"blob,omitempty"`
	Dfs         *string                `json:"dfs,omitempty"`
	File        *string                `json:"file,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Queue       *string                `json:"queue,omitempty"`
	Table       *string                `json:"table,omitempty"`
	Web         *string                `json:"web,omitempty"`
}

// Storage version of v1api20230101.StorageAccountOperatorConfigMaps
type StorageAccountOperatorConfigMaps struct {
	BlobEndpoint  *genruntime.ConfigMapDestination `json:"blobEndpoint,omitempty"`
	DfsEndpoint   *genruntime.ConfigMapDestination `json:"dfsEndpoint,omitempty"`
	FileEndpoint  *genruntime.ConfigMapDestination `json:"fileEndpoint,omitempty"`
	PropertyBag   genruntime.PropertyBag           `json:"$propertyBag,omitempty"`
	QueueEndpoint *genruntime.ConfigMapDestination `json:"queueEndpoint,omitempty"`
	TableEndpoint *genruntime.ConfigMapDestination `json:"tableEndpoint,omitempty"`
	WebEndpoint   *genruntime.ConfigMapDestination `json:"webEndpoint,omitempty"`
}

// Storage version of v1api20230101.StorageAccountOperatorSecrets
type StorageAccountOperatorSecrets struct {
	BlobEndpoint  *genruntime.SecretDestination `json:"blobEndpoint,omitempty"`
	DfsEndpoint   *genruntime.SecretDestination `json:"dfsEndpoint,omitempty"`
	FileEndpoint  *genruntime.SecretDestination `json:"fileEndpoint,omitempty"`
	Key1          *genruntime.SecretDestination `json:"key1,omitempty"`
	Key2          *genruntime.SecretDestination `json:"key2,omitempty"`
	PropertyBag   genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	QueueEndpoint *genruntime.SecretDestination `json:"queueEndpoint,omitempty"`
	TableEndpoint *genruntime.SecretDestination `json:"tableEndpoint,omitempty"`
	WebEndpoint   *genruntime.SecretDestination `json:"webEndpoint,omitempty"`
}

// Storage version of v1api20230101.UserAssignedIdentity_STATUS
// UserAssignedIdentity for the resource.
type UserAssignedIdentity_STATUS struct {
	ClientId    *string                `json:"clientId,omitempty"`
	PrincipalId *string                `json:"principalId,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230101.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 v1api20230101.VirtualNetworkRule
// Virtual Network rule.
type VirtualNetworkRule struct {
	Action      *string                `json:"action,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`

	// +kubebuilder:validation:Required
	// Reference: Resource ID of a subnet, for example:
	// /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
	Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"`
	State     *string                       `json:"state,omitempty"`
}

// Storage version of v1api20230101.VirtualNetworkRule_STATUS
// Virtual Network rule.
type VirtualNetworkRule_STATUS struct {
	Action      *string                `json:"action,omitempty"`
	Id          *string                `json:"id,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	State       *string                `json:"state,omitempty"`
}

// Storage version of v1api20230101.BlobRestoreRange_STATUS
// Blob range
type BlobRestoreRange_STATUS struct {
	EndRange    *string                `json:"endRange,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	StartRange  *string                `json:"startRange,omitempty"`
}

// Storage version of v1api20230101.EncryptionService
// A service that allows server-side encryption to be used.
type EncryptionService struct {
	Enabled     *bool                  `json:"enabled,omitempty"`
	KeyType     *string                `json:"keyType,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20230101.EncryptionService_STATUS
// A service that allows server-side encryption to be used.
type EncryptionService_STATUS struct {
	Enabled         *bool                  `json:"enabled,omitempty"`
	KeyType         *string                `json:"keyType,omitempty"`
	LastEnabledTime *string                `json:"lastEnabledTime,omitempty"`
	PropertyBag     genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

func init() {
	SchemeBuilder.Register(&StorageAccount{}, &StorageAccountList{})
}
