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

import (
	"context"
	"fmt"
	arm "github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401/arm"
	storage "github.com/Azure/azure-service-operator/v2/api/storage/v1api20210401/storage"
	"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"
	"sigs.k8s.io/controller-runtime/pkg/conversion"
)

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories={azure,storage}
// +kubebuilder:subresource:status
// +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"
// Generator information:
// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2021-04-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 _ conversion.Convertible = &StorageAccount{}

// ConvertFrom populates our StorageAccount from the provided hub StorageAccount
func (account *StorageAccount) ConvertFrom(hub conversion.Hub) error {
	// intermediate variable for conversion
	var source storage.StorageAccount

	err := source.ConvertFrom(hub)
	if err != nil {
		return eris.Wrap(err, "converting from hub to source")
	}

	err = account.AssignProperties_From_StorageAccount(&source)
	if err != nil {
		return eris.Wrap(err, "converting from source to account")
	}

	return nil
}

// ConvertTo populates the provided hub StorageAccount from our StorageAccount
func (account *StorageAccount) ConvertTo(hub conversion.Hub) error {
	// intermediate variable for conversion
	var destination storage.StorageAccount
	err := account.AssignProperties_To_StorageAccount(&destination)
	if err != nil {
		return eris.Wrap(err, "converting to destination from account")
	}
	err = destination.ConvertTo(hub)
	if err != nil {
		return eris.Wrap(err, "converting from destination to hub")
	}

	return nil
}

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 "2021-04-01"
func (account StorageAccount) GetAPIVersion() string {
	return "2021-04-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
}

// AssignProperties_From_StorageAccount populates our StorageAccount from the provided source StorageAccount
func (account *StorageAccount) AssignProperties_From_StorageAccount(source *storage.StorageAccount) error {

	// ObjectMeta
	account.ObjectMeta = *source.ObjectMeta.DeepCopy()

	// Spec
	var spec StorageAccount_Spec
	err := spec.AssignProperties_From_StorageAccount_Spec(&source.Spec)
	if err != nil {
		return eris.Wrap(err, "calling AssignProperties_From_StorageAccount_Spec() to populate field Spec")
	}
	account.Spec = spec

	// Status
	var status StorageAccount_STATUS
	err = status.AssignProperties_From_StorageAccount_STATUS(&source.Status)
	if err != nil {
		return eris.Wrap(err, "calling AssignProperties_From_StorageAccount_STATUS() to populate field Status")
	}
	account.Status = status

	// No error
	return nil
}

// AssignProperties_To_StorageAccount populates the provided destination StorageAccount from our StorageAccount
func (account *StorageAccount) AssignProperties_To_StorageAccount(destination *storage.StorageAccount) error {

	// ObjectMeta
	destination.ObjectMeta = *account.ObjectMeta.DeepCopy()

	// Spec
	var spec storage.StorageAccount_Spec
	err := account.Spec.AssignProperties_To_StorageAccount_Spec(&spec)
	if err != nil {
		return eris.Wrap(err, "calling AssignProperties_To_StorageAccount_Spec() to populate field Spec")
	}
	destination.Spec = spec

	// Status
	var status storage.StorageAccount_STATUS
	err = account.Status.AssignProperties_To_StorageAccount_STATUS(&status)
	if err != nil {
		return eris.Wrap(err, "calling AssignProperties_To_StorageAccount_STATUS() to populate field Status")
	}
	destination.Status = status

	// No error
	return nil
}

// 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
// Generator information:
// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2021-04-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"`
}

// +kubebuilder:validation:Enum={"2021-04-01"}
type APIVersion string

const APIVersion_Value = APIVersion("2021-04-01")

type StorageAccount_Spec struct {
	// AccessTier: Required for storage accounts where kind = BlobStorage. The access tier used for billing.
	AccessTier *StorageAccountPropertiesCreateParameters_AccessTier `json:"accessTier,omitempty"`

	// AllowBlobPublicAccess: Allow or disallow public access to all blobs or containers in the storage account. The default
	// interpretation is true for this property.
	AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"`

	// AllowCrossTenantReplication: Allow or disallow cross AAD tenant object replication. The default interpretation is true
	// for this property.
	AllowCrossTenantReplication *bool `json:"allowCrossTenantReplication,omitempty"`

	// AllowSharedKeyAccess: Indicates whether the storage account permits requests to be authorized with the account access
	// key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure
	// Active Directory (Azure AD). The default value is null, which is equivalent to true.
	AllowSharedKeyAccess *bool `json:"allowSharedKeyAccess,omitempty"`

	// AzureFilesIdentityBasedAuthentication: Provides the identity based authentication settings for Azure Files.
	AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"`

	// +kubebuilder:validation:MaxLength=24
	// +kubebuilder:validation:MinLength=3
	// 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: User domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported
	// per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name
	// property.
	CustomDomain *CustomDomain `json:"customDomain,omitempty"`

	// Encryption: Not applicable. Azure Storage encryption is enabled for all storage accounts and cannot be disabled.
	Encryption *Encryption `json:"encryption,omitempty"`

	// ExtendedLocation: Optional. Set the extended location of the resource. If not set, the storage account will be created
	// in Azure main region. Otherwise it will be created in the specified extended location
	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`

	// Identity: The identity of the resource.
	Identity *Identity `json:"identity,omitempty"`

	// IsHnsEnabled: Account HierarchicalNamespace enabled if sets to true.
	IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"`

	// IsNfsV3Enabled: NFS 3.0 protocol support enabled if set to true.
	IsNfsV3Enabled *bool `json:"isNfsV3Enabled,omitempty"`

	// KeyPolicy: KeyPolicy assigned to the storage account.
	KeyPolicy *KeyPolicy `json:"keyPolicy,omitempty"`

	// +kubebuilder:validation:Required
	// Kind: Required. Indicates the type of storage account.
	Kind *StorageAccount_Kind_Spec `json:"kind,omitempty"`

	// LargeFileSharesState: Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled.
	LargeFileSharesState *StorageAccountPropertiesCreateParameters_LargeFileSharesState `json:"largeFileSharesState,omitempty"`

	// +kubebuilder:validation:Required
	// Location: Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure
	// Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is
	// created, but if an identical geo region is specified on update, the request will succeed.
	Location *string `json:"location,omitempty"`

	// MinimumTlsVersion: Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS
	// 1.0 for this property.
	MinimumTlsVersion *StorageAccountPropertiesCreateParameters_MinimumTlsVersion `json:"minimumTlsVersion,omitempty"`

	// NetworkAcls: Network rule set
	NetworkAcls *NetworkRuleSet `json:"networkAcls,omitempty"`

	// OperatorSpec: The specification for configuring operator behavior. This field is interpreted by the operator and not
	// passed directly to Azure
	OperatorSpec *StorageAccountOperatorSpec `json:"operatorSpec,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"`

	// RoutingPreference: Maintains information about the network routing choice opted by the user for data transfer
	RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"`

	// SasPolicy: SasPolicy assigned to the storage account.
	SasPolicy *SasPolicy `json:"sasPolicy,omitempty"`

	// +kubebuilder:validation:Required
	// Sku: Required. Gets or sets the SKU name.
	Sku *Sku `json:"sku,omitempty"`

	// SupportsHttpsTrafficOnly: Allows https traffic only to storage service if sets to true. The default value is true since
	// API version 2019-04-01.
	SupportsHttpsTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"`

	// Tags: Gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping
	// this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key
	// with a length no greater than 128 characters and a value with a length no greater than 256 characters.
	Tags map[string]string `json:"tags,omitempty"`
}

var _ genruntime.ARMTransformer = &StorageAccount_Spec{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (account *StorageAccount_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if account == nil {
		return nil, nil
	}
	result := &arm.StorageAccount_Spec{}

	// Set property "ExtendedLocation":
	if account.ExtendedLocation != nil {
		extendedLocation_ARM, err := account.ExtendedLocation.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		extendedLocation := *extendedLocation_ARM.(*arm.ExtendedLocation)
		result.ExtendedLocation = &extendedLocation
	}

	// Set property "Identity":
	if account.Identity != nil {
		identity_ARM, err := account.Identity.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		identity := *identity_ARM.(*arm.Identity)
		result.Identity = &identity
	}

	// Set property "Kind":
	if account.Kind != nil {
		var temp string
		temp = string(*account.Kind)
		kind := arm.StorageAccount_Kind_Spec(temp)
		result.Kind = &kind
	}

	// Set property "Location":
	if account.Location != nil {
		location := *account.Location
		result.Location = &location
	}

	// Set property "Name":
	result.Name = resolved.Name

	// Set property "Properties":
	if account.AccessTier != nil ||
		account.AllowBlobPublicAccess != nil ||
		account.AllowCrossTenantReplication != nil ||
		account.AllowSharedKeyAccess != nil ||
		account.AzureFilesIdentityBasedAuthentication != nil ||
		account.CustomDomain != nil ||
		account.Encryption != nil ||
		account.IsHnsEnabled != nil ||
		account.IsNfsV3Enabled != nil ||
		account.KeyPolicy != nil ||
		account.LargeFileSharesState != nil ||
		account.MinimumTlsVersion != nil ||
		account.NetworkAcls != nil ||
		account.RoutingPreference != nil ||
		account.SasPolicy != nil ||
		account.SupportsHttpsTrafficOnly != nil {
		result.Properties = &arm.StorageAccountPropertiesCreateParameters{}
	}
	if account.AccessTier != nil {
		var temp string
		temp = string(*account.AccessTier)
		accessTier := arm.StorageAccountPropertiesCreateParameters_AccessTier(temp)
		result.Properties.AccessTier = &accessTier
	}
	if account.AllowBlobPublicAccess != nil {
		allowBlobPublicAccess := *account.AllowBlobPublicAccess
		result.Properties.AllowBlobPublicAccess = &allowBlobPublicAccess
	}
	if account.AllowCrossTenantReplication != nil {
		allowCrossTenantReplication := *account.AllowCrossTenantReplication
		result.Properties.AllowCrossTenantReplication = &allowCrossTenantReplication
	}
	if account.AllowSharedKeyAccess != nil {
		allowSharedKeyAccess := *account.AllowSharedKeyAccess
		result.Properties.AllowSharedKeyAccess = &allowSharedKeyAccess
	}
	if account.AzureFilesIdentityBasedAuthentication != nil {
		azureFilesIdentityBasedAuthentication_ARM, err := account.AzureFilesIdentityBasedAuthentication.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		azureFilesIdentityBasedAuthentication := *azureFilesIdentityBasedAuthentication_ARM.(*arm.AzureFilesIdentityBasedAuthentication)
		result.Properties.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication
	}
	if account.CustomDomain != nil {
		customDomain_ARM, err := account.CustomDomain.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		customDomain := *customDomain_ARM.(*arm.CustomDomain)
		result.Properties.CustomDomain = &customDomain
	}
	if account.Encryption != nil {
		encryption_ARM, err := account.Encryption.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		encryption := *encryption_ARM.(*arm.Encryption)
		result.Properties.Encryption = &encryption
	}
	if account.IsHnsEnabled != nil {
		isHnsEnabled := *account.IsHnsEnabled
		result.Properties.IsHnsEnabled = &isHnsEnabled
	}
	if account.IsNfsV3Enabled != nil {
		isNfsV3Enabled := *account.IsNfsV3Enabled
		result.Properties.IsNfsV3Enabled = &isNfsV3Enabled
	}
	if account.KeyPolicy != nil {
		keyPolicy_ARM, err := account.KeyPolicy.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		keyPolicy := *keyPolicy_ARM.(*arm.KeyPolicy)
		result.Properties.KeyPolicy = &keyPolicy
	}
	if account.LargeFileSharesState != nil {
		var temp string
		temp = string(*account.LargeFileSharesState)
		largeFileSharesState := arm.StorageAccountPropertiesCreateParameters_LargeFileSharesState(temp)
		result.Properties.LargeFileSharesState = &largeFileSharesState
	}
	if account.MinimumTlsVersion != nil {
		var temp string
		temp = string(*account.MinimumTlsVersion)
		minimumTlsVersion := arm.StorageAccountPropertiesCreateParameters_MinimumTlsVersion(temp)
		result.Properties.MinimumTlsVersion = &minimumTlsVersion
	}
	if account.NetworkAcls != nil {
		networkAcls_ARM, err := account.NetworkAcls.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		networkAcls := *networkAcls_ARM.(*arm.NetworkRuleSet)
		result.Properties.NetworkAcls = &networkAcls
	}
	if account.RoutingPreference != nil {
		routingPreference_ARM, err := account.RoutingPreference.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		routingPreference := *routingPreference_ARM.(*arm.RoutingPreference)
		result.Properties.RoutingPreference = &routingPreference
	}
	if account.SasPolicy != nil {
		sasPolicy_ARM, err := account.SasPolicy.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		sasPolicy := *sasPolicy_ARM.(*arm.SasPolicy)
		result.Properties.SasPolicy = &sasPolicy
	}
	if account.SupportsHttpsTrafficOnly != nil {
		supportsHttpsTrafficOnly := *account.SupportsHttpsTrafficOnly
		result.Properties.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly
	}

	// Set property "Sku":
	if account.Sku != nil {
		sku_ARM, err := account.Sku.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		sku := *sku_ARM.(*arm.Sku)
		result.Sku = &sku
	}

	// Set property "Tags":
	if account.Tags != nil {
		result.Tags = make(map[string]string, len(account.Tags))
		for key, value := range account.Tags {
			result.Tags[key] = value
		}
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (account *StorageAccount_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.StorageAccount_Spec{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (account *StorageAccount_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.StorageAccount_Spec)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.StorageAccount_Spec, got %T", armInput)
	}

	// Set property "AccessTier":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AccessTier != nil {
			var temp string
			temp = string(*typedInput.Properties.AccessTier)
			accessTier := StorageAccountPropertiesCreateParameters_AccessTier(temp)
			account.AccessTier = &accessTier
		}
	}

	// Set property "AllowBlobPublicAccess":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AllowBlobPublicAccess != nil {
			allowBlobPublicAccess := *typedInput.Properties.AllowBlobPublicAccess
			account.AllowBlobPublicAccess = &allowBlobPublicAccess
		}
	}

	// Set property "AllowCrossTenantReplication":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AllowCrossTenantReplication != nil {
			allowCrossTenantReplication := *typedInput.Properties.AllowCrossTenantReplication
			account.AllowCrossTenantReplication = &allowCrossTenantReplication
		}
	}

	// Set property "AllowSharedKeyAccess":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AllowSharedKeyAccess != nil {
			allowSharedKeyAccess := *typedInput.Properties.AllowSharedKeyAccess
			account.AllowSharedKeyAccess = &allowSharedKeyAccess
		}
	}

	// Set property "AzureFilesIdentityBasedAuthentication":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AzureFilesIdentityBasedAuthentication != nil {
			var azureFilesIdentityBasedAuthentication1 AzureFilesIdentityBasedAuthentication
			err := azureFilesIdentityBasedAuthentication1.PopulateFromARM(owner, *typedInput.Properties.AzureFilesIdentityBasedAuthentication)
			if err != nil {
				return err
			}
			azureFilesIdentityBasedAuthentication := azureFilesIdentityBasedAuthentication1
			account.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication
		}
	}

	// Set property "AzureName":
	account.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name))

	// Set property "CustomDomain":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.CustomDomain != nil {
			var customDomain1 CustomDomain
			err := customDomain1.PopulateFromARM(owner, *typedInput.Properties.CustomDomain)
			if err != nil {
				return err
			}
			customDomain := customDomain1
			account.CustomDomain = &customDomain
		}
	}

	// Set property "Encryption":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Encryption != nil {
			var encryption1 Encryption
			err := encryption1.PopulateFromARM(owner, *typedInput.Properties.Encryption)
			if err != nil {
				return err
			}
			encryption := encryption1
			account.Encryption = &encryption
		}
	}

	// Set property "ExtendedLocation":
	if typedInput.ExtendedLocation != nil {
		var extendedLocation1 ExtendedLocation
		err := extendedLocation1.PopulateFromARM(owner, *typedInput.ExtendedLocation)
		if err != nil {
			return err
		}
		extendedLocation := extendedLocation1
		account.ExtendedLocation = &extendedLocation
	}

	// Set property "Identity":
	if typedInput.Identity != nil {
		var identity1 Identity
		err := identity1.PopulateFromARM(owner, *typedInput.Identity)
		if err != nil {
			return err
		}
		identity := identity1
		account.Identity = &identity
	}

	// Set property "IsHnsEnabled":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.IsHnsEnabled != nil {
			isHnsEnabled := *typedInput.Properties.IsHnsEnabled
			account.IsHnsEnabled = &isHnsEnabled
		}
	}

	// Set property "IsNfsV3Enabled":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.IsNfsV3Enabled != nil {
			isNfsV3Enabled := *typedInput.Properties.IsNfsV3Enabled
			account.IsNfsV3Enabled = &isNfsV3Enabled
		}
	}

	// Set property "KeyPolicy":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.KeyPolicy != nil {
			var keyPolicy1 KeyPolicy
			err := keyPolicy1.PopulateFromARM(owner, *typedInput.Properties.KeyPolicy)
			if err != nil {
				return err
			}
			keyPolicy := keyPolicy1
			account.KeyPolicy = &keyPolicy
		}
	}

	// Set property "Kind":
	if typedInput.Kind != nil {
		var temp string
		temp = string(*typedInput.Kind)
		kind := StorageAccount_Kind_Spec(temp)
		account.Kind = &kind
	}

	// Set property "LargeFileSharesState":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.LargeFileSharesState != nil {
			var temp string
			temp = string(*typedInput.Properties.LargeFileSharesState)
			largeFileSharesState := StorageAccountPropertiesCreateParameters_LargeFileSharesState(temp)
			account.LargeFileSharesState = &largeFileSharesState
		}
	}

	// Set property "Location":
	if typedInput.Location != nil {
		location := *typedInput.Location
		account.Location = &location
	}

	// Set property "MinimumTlsVersion":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.MinimumTlsVersion != nil {
			var temp string
			temp = string(*typedInput.Properties.MinimumTlsVersion)
			minimumTlsVersion := StorageAccountPropertiesCreateParameters_MinimumTlsVersion(temp)
			account.MinimumTlsVersion = &minimumTlsVersion
		}
	}

	// Set property "NetworkAcls":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.NetworkAcls != nil {
			var networkAcls1 NetworkRuleSet
			err := networkAcls1.PopulateFromARM(owner, *typedInput.Properties.NetworkAcls)
			if err != nil {
				return err
			}
			networkAcls := networkAcls1
			account.NetworkAcls = &networkAcls
		}
	}

	// no assignment for property "OperatorSpec"

	// Set property "Owner":
	account.Owner = &genruntime.KnownResourceReference{
		Name:  owner.Name,
		ARMID: owner.ARMID,
	}

	// Set property "RoutingPreference":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.RoutingPreference != nil {
			var routingPreference1 RoutingPreference
			err := routingPreference1.PopulateFromARM(owner, *typedInput.Properties.RoutingPreference)
			if err != nil {
				return err
			}
			routingPreference := routingPreference1
			account.RoutingPreference = &routingPreference
		}
	}

	// Set property "SasPolicy":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.SasPolicy != nil {
			var sasPolicy1 SasPolicy
			err := sasPolicy1.PopulateFromARM(owner, *typedInput.Properties.SasPolicy)
			if err != nil {
				return err
			}
			sasPolicy := sasPolicy1
			account.SasPolicy = &sasPolicy
		}
	}

	// Set property "Sku":
	if typedInput.Sku != nil {
		var sku1 Sku
		err := sku1.PopulateFromARM(owner, *typedInput.Sku)
		if err != nil {
			return err
		}
		sku := sku1
		account.Sku = &sku
	}

	// Set property "SupportsHttpsTrafficOnly":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.SupportsHttpsTrafficOnly != nil {
			supportsHttpsTrafficOnly := *typedInput.Properties.SupportsHttpsTrafficOnly
			account.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly
		}
	}

	// Set property "Tags":
	if typedInput.Tags != nil {
		account.Tags = make(map[string]string, len(typedInput.Tags))
		for key, value := range typedInput.Tags {
			account.Tags[key] = value
		}
	}

	// No error
	return nil
}

var _ genruntime.ConvertibleSpec = &StorageAccount_Spec{}

// ConvertSpecFrom populates our StorageAccount_Spec from the provided source
func (account *StorageAccount_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error {
	src, ok := source.(*storage.StorageAccount_Spec)
	if ok {
		// Populate our instance from source
		return account.AssignProperties_From_StorageAccount_Spec(src)
	}

	// Convert to an intermediate form
	src = &storage.StorageAccount_Spec{}
	err := src.ConvertSpecFrom(source)
	if err != nil {
		return eris.Wrap(err, "initial step of conversion in ConvertSpecFrom()")
	}

	// Update our instance from src
	err = account.AssignProperties_From_StorageAccount_Spec(src)
	if err != nil {
		return eris.Wrap(err, "final step of conversion in ConvertSpecFrom()")
	}

	return nil
}

// ConvertSpecTo populates the provided destination from our StorageAccount_Spec
func (account *StorageAccount_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error {
	dst, ok := destination.(*storage.StorageAccount_Spec)
	if ok {
		// Populate destination from our instance
		return account.AssignProperties_To_StorageAccount_Spec(dst)
	}

	// Convert to an intermediate form
	dst = &storage.StorageAccount_Spec{}
	err := account.AssignProperties_To_StorageAccount_Spec(dst)
	if err != nil {
		return eris.Wrap(err, "initial step of conversion in ConvertSpecTo()")
	}

	// Update dst from our instance
	err = dst.ConvertSpecTo(destination)
	if err != nil {
		return eris.Wrap(err, "final step of conversion in ConvertSpecTo()")
	}

	return nil
}

// AssignProperties_From_StorageAccount_Spec populates our StorageAccount_Spec from the provided source StorageAccount_Spec
func (account *StorageAccount_Spec) AssignProperties_From_StorageAccount_Spec(source *storage.StorageAccount_Spec) error {

	// AccessTier
	if source.AccessTier != nil {
		accessTier := *source.AccessTier
		accessTierTemp := genruntime.ToEnum(accessTier, storageAccountPropertiesCreateParameters_AccessTier_Values)
		account.AccessTier = &accessTierTemp
	} else {
		account.AccessTier = nil
	}

	// AllowBlobPublicAccess
	if source.AllowBlobPublicAccess != nil {
		allowBlobPublicAccess := *source.AllowBlobPublicAccess
		account.AllowBlobPublicAccess = &allowBlobPublicAccess
	} else {
		account.AllowBlobPublicAccess = nil
	}

	// AllowCrossTenantReplication
	if source.AllowCrossTenantReplication != nil {
		allowCrossTenantReplication := *source.AllowCrossTenantReplication
		account.AllowCrossTenantReplication = &allowCrossTenantReplication
	} else {
		account.AllowCrossTenantReplication = nil
	}

	// AllowSharedKeyAccess
	if source.AllowSharedKeyAccess != nil {
		allowSharedKeyAccess := *source.AllowSharedKeyAccess
		account.AllowSharedKeyAccess = &allowSharedKeyAccess
	} else {
		account.AllowSharedKeyAccess = nil
	}

	// AzureFilesIdentityBasedAuthentication
	if source.AzureFilesIdentityBasedAuthentication != nil {
		var azureFilesIdentityBasedAuthentication AzureFilesIdentityBasedAuthentication
		err := azureFilesIdentityBasedAuthentication.AssignProperties_From_AzureFilesIdentityBasedAuthentication(source.AzureFilesIdentityBasedAuthentication)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_AzureFilesIdentityBasedAuthentication() to populate field AzureFilesIdentityBasedAuthentication")
		}
		account.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication
	} else {
		account.AzureFilesIdentityBasedAuthentication = nil
	}

	// AzureName
	account.AzureName = source.AzureName

	// CustomDomain
	if source.CustomDomain != nil {
		var customDomain CustomDomain
		err := customDomain.AssignProperties_From_CustomDomain(source.CustomDomain)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_CustomDomain() to populate field CustomDomain")
		}
		account.CustomDomain = &customDomain
	} else {
		account.CustomDomain = nil
	}

	// Encryption
	if source.Encryption != nil {
		var encryption Encryption
		err := encryption.AssignProperties_From_Encryption(source.Encryption)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_Encryption() to populate field Encryption")
		}
		account.Encryption = &encryption
	} else {
		account.Encryption = nil
	}

	// ExtendedLocation
	if source.ExtendedLocation != nil {
		var extendedLocation ExtendedLocation
		err := extendedLocation.AssignProperties_From_ExtendedLocation(source.ExtendedLocation)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ExtendedLocation() to populate field ExtendedLocation")
		}
		account.ExtendedLocation = &extendedLocation
	} else {
		account.ExtendedLocation = nil
	}

	// Identity
	if source.Identity != nil {
		var identity Identity
		err := identity.AssignProperties_From_Identity(source.Identity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_Identity() to populate field Identity")
		}
		account.Identity = &identity
	} else {
		account.Identity = nil
	}

	// IsHnsEnabled
	if source.IsHnsEnabled != nil {
		isHnsEnabled := *source.IsHnsEnabled
		account.IsHnsEnabled = &isHnsEnabled
	} else {
		account.IsHnsEnabled = nil
	}

	// IsNfsV3Enabled
	if source.IsNfsV3Enabled != nil {
		isNfsV3Enabled := *source.IsNfsV3Enabled
		account.IsNfsV3Enabled = &isNfsV3Enabled
	} else {
		account.IsNfsV3Enabled = nil
	}

	// KeyPolicy
	if source.KeyPolicy != nil {
		var keyPolicy KeyPolicy
		err := keyPolicy.AssignProperties_From_KeyPolicy(source.KeyPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_KeyPolicy() to populate field KeyPolicy")
		}
		account.KeyPolicy = &keyPolicy
	} else {
		account.KeyPolicy = nil
	}

	// Kind
	if source.Kind != nil {
		kind := *source.Kind
		kindTemp := genruntime.ToEnum(kind, storageAccount_Kind_Spec_Values)
		account.Kind = &kindTemp
	} else {
		account.Kind = nil
	}

	// LargeFileSharesState
	if source.LargeFileSharesState != nil {
		largeFileSharesState := *source.LargeFileSharesState
		largeFileSharesStateTemp := genruntime.ToEnum(largeFileSharesState, storageAccountPropertiesCreateParameters_LargeFileSharesState_Values)
		account.LargeFileSharesState = &largeFileSharesStateTemp
	} else {
		account.LargeFileSharesState = nil
	}

	// Location
	account.Location = genruntime.ClonePointerToString(source.Location)

	// MinimumTlsVersion
	if source.MinimumTlsVersion != nil {
		minimumTlsVersion := *source.MinimumTlsVersion
		minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, storageAccountPropertiesCreateParameters_MinimumTlsVersion_Values)
		account.MinimumTlsVersion = &minimumTlsVersionTemp
	} else {
		account.MinimumTlsVersion = nil
	}

	// NetworkAcls
	if source.NetworkAcls != nil {
		var networkAcl NetworkRuleSet
		err := networkAcl.AssignProperties_From_NetworkRuleSet(source.NetworkAcls)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NetworkRuleSet() to populate field NetworkAcls")
		}
		account.NetworkAcls = &networkAcl
	} else {
		account.NetworkAcls = nil
	}

	// OperatorSpec
	if source.OperatorSpec != nil {
		var operatorSpec StorageAccountOperatorSpec
		err := operatorSpec.AssignProperties_From_StorageAccountOperatorSpec(source.OperatorSpec)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StorageAccountOperatorSpec() to populate field OperatorSpec")
		}
		account.OperatorSpec = &operatorSpec
	} else {
		account.OperatorSpec = nil
	}

	// Owner
	if source.Owner != nil {
		owner := source.Owner.Copy()
		account.Owner = &owner
	} else {
		account.Owner = nil
	}

	// RoutingPreference
	if source.RoutingPreference != nil {
		var routingPreference RoutingPreference
		err := routingPreference.AssignProperties_From_RoutingPreference(source.RoutingPreference)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_RoutingPreference() to populate field RoutingPreference")
		}
		account.RoutingPreference = &routingPreference
	} else {
		account.RoutingPreference = nil
	}

	// SasPolicy
	if source.SasPolicy != nil {
		var sasPolicy SasPolicy
		err := sasPolicy.AssignProperties_From_SasPolicy(source.SasPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SasPolicy() to populate field SasPolicy")
		}
		account.SasPolicy = &sasPolicy
	} else {
		account.SasPolicy = nil
	}

	// Sku
	if source.Sku != nil {
		var sku Sku
		err := sku.AssignProperties_From_Sku(source.Sku)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_Sku() to populate field Sku")
		}
		account.Sku = &sku
	} else {
		account.Sku = nil
	}

	// SupportsHttpsTrafficOnly
	if source.SupportsHttpsTrafficOnly != nil {
		supportsHttpsTrafficOnly := *source.SupportsHttpsTrafficOnly
		account.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly
	} else {
		account.SupportsHttpsTrafficOnly = nil
	}

	// Tags
	account.Tags = genruntime.CloneMapOfStringToString(source.Tags)

	// No error
	return nil
}

// AssignProperties_To_StorageAccount_Spec populates the provided destination StorageAccount_Spec from our StorageAccount_Spec
func (account *StorageAccount_Spec) AssignProperties_To_StorageAccount_Spec(destination *storage.StorageAccount_Spec) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// AccessTier
	if account.AccessTier != nil {
		accessTier := string(*account.AccessTier)
		destination.AccessTier = &accessTier
	} else {
		destination.AccessTier = nil
	}

	// AllowBlobPublicAccess
	if account.AllowBlobPublicAccess != nil {
		allowBlobPublicAccess := *account.AllowBlobPublicAccess
		destination.AllowBlobPublicAccess = &allowBlobPublicAccess
	} else {
		destination.AllowBlobPublicAccess = nil
	}

	// AllowCrossTenantReplication
	if account.AllowCrossTenantReplication != nil {
		allowCrossTenantReplication := *account.AllowCrossTenantReplication
		destination.AllowCrossTenantReplication = &allowCrossTenantReplication
	} else {
		destination.AllowCrossTenantReplication = nil
	}

	// AllowSharedKeyAccess
	if account.AllowSharedKeyAccess != nil {
		allowSharedKeyAccess := *account.AllowSharedKeyAccess
		destination.AllowSharedKeyAccess = &allowSharedKeyAccess
	} else {
		destination.AllowSharedKeyAccess = nil
	}

	// AzureFilesIdentityBasedAuthentication
	if account.AzureFilesIdentityBasedAuthentication != nil {
		var azureFilesIdentityBasedAuthentication storage.AzureFilesIdentityBasedAuthentication
		err := account.AzureFilesIdentityBasedAuthentication.AssignProperties_To_AzureFilesIdentityBasedAuthentication(&azureFilesIdentityBasedAuthentication)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_AzureFilesIdentityBasedAuthentication() to populate field AzureFilesIdentityBasedAuthentication")
		}
		destination.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication
	} else {
		destination.AzureFilesIdentityBasedAuthentication = nil
	}

	// AzureName
	destination.AzureName = account.AzureName

	// CustomDomain
	if account.CustomDomain != nil {
		var customDomain storage.CustomDomain
		err := account.CustomDomain.AssignProperties_To_CustomDomain(&customDomain)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_CustomDomain() to populate field CustomDomain")
		}
		destination.CustomDomain = &customDomain
	} else {
		destination.CustomDomain = nil
	}

	// Encryption
	if account.Encryption != nil {
		var encryption storage.Encryption
		err := account.Encryption.AssignProperties_To_Encryption(&encryption)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_Encryption() to populate field Encryption")
		}
		destination.Encryption = &encryption
	} else {
		destination.Encryption = nil
	}

	// ExtendedLocation
	if account.ExtendedLocation != nil {
		var extendedLocation storage.ExtendedLocation
		err := account.ExtendedLocation.AssignProperties_To_ExtendedLocation(&extendedLocation)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ExtendedLocation() to populate field ExtendedLocation")
		}
		destination.ExtendedLocation = &extendedLocation
	} else {
		destination.ExtendedLocation = nil
	}

	// Identity
	if account.Identity != nil {
		var identity storage.Identity
		err := account.Identity.AssignProperties_To_Identity(&identity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_Identity() to populate field Identity")
		}
		destination.Identity = &identity
	} else {
		destination.Identity = nil
	}

	// IsHnsEnabled
	if account.IsHnsEnabled != nil {
		isHnsEnabled := *account.IsHnsEnabled
		destination.IsHnsEnabled = &isHnsEnabled
	} else {
		destination.IsHnsEnabled = nil
	}

	// IsNfsV3Enabled
	if account.IsNfsV3Enabled != nil {
		isNfsV3Enabled := *account.IsNfsV3Enabled
		destination.IsNfsV3Enabled = &isNfsV3Enabled
	} else {
		destination.IsNfsV3Enabled = nil
	}

	// KeyPolicy
	if account.KeyPolicy != nil {
		var keyPolicy storage.KeyPolicy
		err := account.KeyPolicy.AssignProperties_To_KeyPolicy(&keyPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_KeyPolicy() to populate field KeyPolicy")
		}
		destination.KeyPolicy = &keyPolicy
	} else {
		destination.KeyPolicy = nil
	}

	// Kind
	if account.Kind != nil {
		kind := string(*account.Kind)
		destination.Kind = &kind
	} else {
		destination.Kind = nil
	}

	// LargeFileSharesState
	if account.LargeFileSharesState != nil {
		largeFileSharesState := string(*account.LargeFileSharesState)
		destination.LargeFileSharesState = &largeFileSharesState
	} else {
		destination.LargeFileSharesState = nil
	}

	// Location
	destination.Location = genruntime.ClonePointerToString(account.Location)

	// MinimumTlsVersion
	if account.MinimumTlsVersion != nil {
		minimumTlsVersion := string(*account.MinimumTlsVersion)
		destination.MinimumTlsVersion = &minimumTlsVersion
	} else {
		destination.MinimumTlsVersion = nil
	}

	// NetworkAcls
	if account.NetworkAcls != nil {
		var networkAcl storage.NetworkRuleSet
		err := account.NetworkAcls.AssignProperties_To_NetworkRuleSet(&networkAcl)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NetworkRuleSet() to populate field NetworkAcls")
		}
		destination.NetworkAcls = &networkAcl
	} else {
		destination.NetworkAcls = nil
	}

	// OperatorSpec
	if account.OperatorSpec != nil {
		var operatorSpec storage.StorageAccountOperatorSpec
		err := account.OperatorSpec.AssignProperties_To_StorageAccountOperatorSpec(&operatorSpec)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StorageAccountOperatorSpec() to populate field OperatorSpec")
		}
		destination.OperatorSpec = &operatorSpec
	} else {
		destination.OperatorSpec = nil
	}

	// OriginalVersion
	destination.OriginalVersion = account.OriginalVersion()

	// Owner
	if account.Owner != nil {
		owner := account.Owner.Copy()
		destination.Owner = &owner
	} else {
		destination.Owner = nil
	}

	// RoutingPreference
	if account.RoutingPreference != nil {
		var routingPreference storage.RoutingPreference
		err := account.RoutingPreference.AssignProperties_To_RoutingPreference(&routingPreference)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_RoutingPreference() to populate field RoutingPreference")
		}
		destination.RoutingPreference = &routingPreference
	} else {
		destination.RoutingPreference = nil
	}

	// SasPolicy
	if account.SasPolicy != nil {
		var sasPolicy storage.SasPolicy
		err := account.SasPolicy.AssignProperties_To_SasPolicy(&sasPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SasPolicy() to populate field SasPolicy")
		}
		destination.SasPolicy = &sasPolicy
	} else {
		destination.SasPolicy = nil
	}

	// Sku
	if account.Sku != nil {
		var sku storage.Sku
		err := account.Sku.AssignProperties_To_Sku(&sku)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_Sku() to populate field Sku")
		}
		destination.Sku = &sku
	} else {
		destination.Sku = nil
	}

	// SupportsHttpsTrafficOnly
	if account.SupportsHttpsTrafficOnly != nil {
		supportsHttpsTrafficOnly := *account.SupportsHttpsTrafficOnly
		destination.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly
	} else {
		destination.SupportsHttpsTrafficOnly = nil
	}

	// Tags
	destination.Tags = genruntime.CloneMapOfStringToString(account.Tags)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// OriginalVersion returns the original API version used to create the resource.
func (account *StorageAccount_Spec) OriginalVersion() string {
	return GroupVersion.Version
}

// SetAzureName sets the Azure name of the resource
func (account *StorageAccount_Spec) SetAzureName(azureName string) { account.AzureName = azureName }

// The storage account.
type StorageAccount_STATUS struct {
	// AccessTier: Required for storage accounts where kind = BlobStorage. The access tier used for billing.
	AccessTier *StorageAccountProperties_AccessTier_STATUS `json:"accessTier,omitempty"`

	// AllowBlobPublicAccess: Allow or disallow public access to all blobs or containers in the storage account. The default
	// interpretation is true for this property.
	AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"`

	// AllowCrossTenantReplication: Allow or disallow cross AAD tenant object replication. The default interpretation is true
	// for this property.
	AllowCrossTenantReplication *bool `json:"allowCrossTenantReplication,omitempty"`

	// AllowSharedKeyAccess: Indicates whether the storage account permits requests to be authorized with the account access
	// key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure
	// Active Directory (Azure AD). The default value is null, which is equivalent to true.
	AllowSharedKeyAccess *bool `json:"allowSharedKeyAccess,omitempty"`

	// AzureFilesIdentityBasedAuthentication: Provides the identity based authentication settings for Azure Files.
	AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication_STATUS `json:"azureFilesIdentityBasedAuthentication,omitempty"`

	// BlobRestoreStatus: Blob restore status
	BlobRestoreStatus *BlobRestoreStatus_STATUS `json:"blobRestoreStatus,omitempty"`

	// Conditions: The observed state of the resource
	Conditions []conditions.Condition `json:"conditions,omitempty"`

	// CreationTime: Gets the creation date and time of the storage account in UTC.
	CreationTime *string `json:"creationTime,omitempty"`

	// CustomDomain: Gets the custom domain the user assigned to this storage account.
	CustomDomain *CustomDomain_STATUS `json:"customDomain,omitempty"`

	// Encryption: Gets the encryption settings on the account. If unspecified, the account is unencrypted.
	Encryption *Encryption_STATUS `json:"encryption,omitempty"`

	// ExtendedLocation: The extendedLocation of the resource.
	ExtendedLocation *ExtendedLocation_STATUS `json:"extendedLocation,omitempty"`

	// FailoverInProgress: If the failover is in progress, the value will be true, otherwise, it will be null.
	FailoverInProgress *bool `json:"failoverInProgress,omitempty"`

	// GeoReplicationStats: Geo Replication Stats
	GeoReplicationStats *GeoReplicationStats_STATUS `json:"geoReplicationStats,omitempty"`

	// Id: Fully qualified resource ID for the resource. Ex -
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	Id *string `json:"id,omitempty"`

	// Identity: The identity of the resource.
	Identity *Identity_STATUS `json:"identity,omitempty"`

	// IsHnsEnabled: Account HierarchicalNamespace enabled if sets to true.
	IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"`

	// IsNfsV3Enabled: NFS 3.0 protocol support enabled if set to true.
	IsNfsV3Enabled *bool `json:"isNfsV3Enabled,omitempty"`

	// KeyCreationTime: Storage account keys creation time.
	KeyCreationTime *KeyCreationTime_STATUS `json:"keyCreationTime,omitempty"`

	// KeyPolicy: KeyPolicy assigned to the storage account.
	KeyPolicy *KeyPolicy_STATUS `json:"keyPolicy,omitempty"`

	// Kind: Gets the Kind.
	Kind *StorageAccount_Kind_STATUS `json:"kind,omitempty"`

	// LargeFileSharesState: Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled.
	LargeFileSharesState *StorageAccountProperties_LargeFileSharesState_STATUS `json:"largeFileSharesState,omitempty"`

	// LastGeoFailoverTime: Gets the timestamp of the most recent instance of a failover to the secondary location. Only the
	// most recent timestamp is retained. This element is not returned if there has never been a failover instance. Only
	// available if the accountType is Standard_GRS or Standard_RAGRS.
	LastGeoFailoverTime *string `json:"lastGeoFailoverTime,omitempty"`

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

	// MinimumTlsVersion: Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS
	// 1.0 for this property.
	MinimumTlsVersion *StorageAccountProperties_MinimumTlsVersion_STATUS `json:"minimumTlsVersion,omitempty"`

	// Name: The name of the resource
	Name *string `json:"name,omitempty"`

	// NetworkAcls: Network rule set
	NetworkAcls *NetworkRuleSet_STATUS `json:"networkAcls,omitempty"`

	// PrimaryEndpoints: Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object. Note that
	// Standard_ZRS and Premium_LRS accounts only return the blob endpoint.
	PrimaryEndpoints *Endpoints_STATUS `json:"primaryEndpoints,omitempty"`

	// PrimaryLocation: Gets the location of the primary data center for the storage account.
	PrimaryLocation *string `json:"primaryLocation,omitempty"`

	// PrivateEndpointConnections: List of private endpoint connection associated with the specified storage account
	PrivateEndpointConnections []PrivateEndpointConnection_STATUS `json:"privateEndpointConnections,omitempty"`

	// ProvisioningState: Gets the status of the storage account at the time the operation was called.
	ProvisioningState *StorageAccountProperties_ProvisioningState_STATUS `json:"provisioningState,omitempty"`

	// RoutingPreference: Maintains information about the network routing choice opted by the user for data transfer
	RoutingPreference *RoutingPreference_STATUS `json:"routingPreference,omitempty"`

	// SasPolicy: SasPolicy assigned to the storage account.
	SasPolicy *SasPolicy_STATUS `json:"sasPolicy,omitempty"`

	// SecondaryEndpoints: Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object from the
	// secondary location of the storage account. Only available if the SKU name is Standard_RAGRS.
	SecondaryEndpoints *Endpoints_STATUS `json:"secondaryEndpoints,omitempty"`

	// SecondaryLocation: Gets the location of the geo-replicated secondary for the storage account. Only available if the
	// accountType is Standard_GRS or Standard_RAGRS.
	SecondaryLocation *string `json:"secondaryLocation,omitempty"`

	// Sku: Gets the SKU.
	Sku *Sku_STATUS `json:"sku,omitempty"`

	// StatusOfPrimary: Gets the status indicating whether the primary location of the storage account is available or
	// unavailable.
	StatusOfPrimary *StorageAccountProperties_StatusOfPrimary_STATUS `json:"statusOfPrimary,omitempty"`

	// StatusOfSecondary: Gets the status indicating whether the secondary location of the storage account is available or
	// unavailable. Only available if the SKU name is Standard_GRS or Standard_RAGRS.
	StatusOfSecondary *StorageAccountProperties_StatusOfSecondary_STATUS `json:"statusOfSecondary,omitempty"`

	// SupportsHttpsTrafficOnly: Allows https traffic only to storage service if sets to true.
	SupportsHttpsTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"`

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

	// Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	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 {
	src, ok := source.(*storage.StorageAccount_STATUS)
	if ok {
		// Populate our instance from source
		return account.AssignProperties_From_StorageAccount_STATUS(src)
	}

	// Convert to an intermediate form
	src = &storage.StorageAccount_STATUS{}
	err := src.ConvertStatusFrom(source)
	if err != nil {
		return eris.Wrap(err, "initial step of conversion in ConvertStatusFrom()")
	}

	// Update our instance from src
	err = account.AssignProperties_From_StorageAccount_STATUS(src)
	if err != nil {
		return eris.Wrap(err, "final step of conversion in ConvertStatusFrom()")
	}

	return nil
}

// ConvertStatusTo populates the provided destination from our StorageAccount_STATUS
func (account *StorageAccount_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error {
	dst, ok := destination.(*storage.StorageAccount_STATUS)
	if ok {
		// Populate destination from our instance
		return account.AssignProperties_To_StorageAccount_STATUS(dst)
	}

	// Convert to an intermediate form
	dst = &storage.StorageAccount_STATUS{}
	err := account.AssignProperties_To_StorageAccount_STATUS(dst)
	if err != nil {
		return eris.Wrap(err, "initial step of conversion in ConvertStatusTo()")
	}

	// Update dst from our instance
	err = dst.ConvertStatusTo(destination)
	if err != nil {
		return eris.Wrap(err, "final step of conversion in ConvertStatusTo()")
	}

	return nil
}

var _ genruntime.FromARMConverter = &StorageAccount_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (account *StorageAccount_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.StorageAccount_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (account *StorageAccount_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.StorageAccount_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.StorageAccount_STATUS, got %T", armInput)
	}

	// Set property "AccessTier":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AccessTier != nil {
			var temp string
			temp = string(*typedInput.Properties.AccessTier)
			accessTier := StorageAccountProperties_AccessTier_STATUS(temp)
			account.AccessTier = &accessTier
		}
	}

	// Set property "AllowBlobPublicAccess":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AllowBlobPublicAccess != nil {
			allowBlobPublicAccess := *typedInput.Properties.AllowBlobPublicAccess
			account.AllowBlobPublicAccess = &allowBlobPublicAccess
		}
	}

	// Set property "AllowCrossTenantReplication":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AllowCrossTenantReplication != nil {
			allowCrossTenantReplication := *typedInput.Properties.AllowCrossTenantReplication
			account.AllowCrossTenantReplication = &allowCrossTenantReplication
		}
	}

	// Set property "AllowSharedKeyAccess":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AllowSharedKeyAccess != nil {
			allowSharedKeyAccess := *typedInput.Properties.AllowSharedKeyAccess
			account.AllowSharedKeyAccess = &allowSharedKeyAccess
		}
	}

	// Set property "AzureFilesIdentityBasedAuthentication":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AzureFilesIdentityBasedAuthentication != nil {
			var azureFilesIdentityBasedAuthentication1 AzureFilesIdentityBasedAuthentication_STATUS
			err := azureFilesIdentityBasedAuthentication1.PopulateFromARM(owner, *typedInput.Properties.AzureFilesIdentityBasedAuthentication)
			if err != nil {
				return err
			}
			azureFilesIdentityBasedAuthentication := azureFilesIdentityBasedAuthentication1
			account.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication
		}
	}

	// Set property "BlobRestoreStatus":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.BlobRestoreStatus != nil {
			var blobRestoreStatus1 BlobRestoreStatus_STATUS
			err := blobRestoreStatus1.PopulateFromARM(owner, *typedInput.Properties.BlobRestoreStatus)
			if err != nil {
				return err
			}
			blobRestoreStatus := blobRestoreStatus1
			account.BlobRestoreStatus = &blobRestoreStatus
		}
	}

	// no assignment for property "Conditions"

	// Set property "CreationTime":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.CreationTime != nil {
			creationTime := *typedInput.Properties.CreationTime
			account.CreationTime = &creationTime
		}
	}

	// Set property "CustomDomain":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.CustomDomain != nil {
			var customDomain1 CustomDomain_STATUS
			err := customDomain1.PopulateFromARM(owner, *typedInput.Properties.CustomDomain)
			if err != nil {
				return err
			}
			customDomain := customDomain1
			account.CustomDomain = &customDomain
		}
	}

	// Set property "Encryption":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Encryption != nil {
			var encryption1 Encryption_STATUS
			err := encryption1.PopulateFromARM(owner, *typedInput.Properties.Encryption)
			if err != nil {
				return err
			}
			encryption := encryption1
			account.Encryption = &encryption
		}
	}

	// Set property "ExtendedLocation":
	if typedInput.ExtendedLocation != nil {
		var extendedLocation1 ExtendedLocation_STATUS
		err := extendedLocation1.PopulateFromARM(owner, *typedInput.ExtendedLocation)
		if err != nil {
			return err
		}
		extendedLocation := extendedLocation1
		account.ExtendedLocation = &extendedLocation
	}

	// Set property "FailoverInProgress":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.FailoverInProgress != nil {
			failoverInProgress := *typedInput.Properties.FailoverInProgress
			account.FailoverInProgress = &failoverInProgress
		}
	}

	// Set property "GeoReplicationStats":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.GeoReplicationStats != nil {
			var geoReplicationStats1 GeoReplicationStats_STATUS
			err := geoReplicationStats1.PopulateFromARM(owner, *typedInput.Properties.GeoReplicationStats)
			if err != nil {
				return err
			}
			geoReplicationStats := geoReplicationStats1
			account.GeoReplicationStats = &geoReplicationStats
		}
	}

	// Set property "Id":
	if typedInput.Id != nil {
		id := *typedInput.Id
		account.Id = &id
	}

	// Set property "Identity":
	if typedInput.Identity != nil {
		var identity1 Identity_STATUS
		err := identity1.PopulateFromARM(owner, *typedInput.Identity)
		if err != nil {
			return err
		}
		identity := identity1
		account.Identity = &identity
	}

	// Set property "IsHnsEnabled":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.IsHnsEnabled != nil {
			isHnsEnabled := *typedInput.Properties.IsHnsEnabled
			account.IsHnsEnabled = &isHnsEnabled
		}
	}

	// Set property "IsNfsV3Enabled":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.IsNfsV3Enabled != nil {
			isNfsV3Enabled := *typedInput.Properties.IsNfsV3Enabled
			account.IsNfsV3Enabled = &isNfsV3Enabled
		}
	}

	// Set property "KeyCreationTime":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.KeyCreationTime != nil {
			var keyCreationTime1 KeyCreationTime_STATUS
			err := keyCreationTime1.PopulateFromARM(owner, *typedInput.Properties.KeyCreationTime)
			if err != nil {
				return err
			}
			keyCreationTime := keyCreationTime1
			account.KeyCreationTime = &keyCreationTime
		}
	}

	// Set property "KeyPolicy":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.KeyPolicy != nil {
			var keyPolicy1 KeyPolicy_STATUS
			err := keyPolicy1.PopulateFromARM(owner, *typedInput.Properties.KeyPolicy)
			if err != nil {
				return err
			}
			keyPolicy := keyPolicy1
			account.KeyPolicy = &keyPolicy
		}
	}

	// Set property "Kind":
	if typedInput.Kind != nil {
		var temp string
		temp = string(*typedInput.Kind)
		kind := StorageAccount_Kind_STATUS(temp)
		account.Kind = &kind
	}

	// Set property "LargeFileSharesState":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.LargeFileSharesState != nil {
			var temp string
			temp = string(*typedInput.Properties.LargeFileSharesState)
			largeFileSharesState := StorageAccountProperties_LargeFileSharesState_STATUS(temp)
			account.LargeFileSharesState = &largeFileSharesState
		}
	}

	// Set property "LastGeoFailoverTime":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.LastGeoFailoverTime != nil {
			lastGeoFailoverTime := *typedInput.Properties.LastGeoFailoverTime
			account.LastGeoFailoverTime = &lastGeoFailoverTime
		}
	}

	// Set property "Location":
	if typedInput.Location != nil {
		location := *typedInput.Location
		account.Location = &location
	}

	// Set property "MinimumTlsVersion":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.MinimumTlsVersion != nil {
			var temp string
			temp = string(*typedInput.Properties.MinimumTlsVersion)
			minimumTlsVersion := StorageAccountProperties_MinimumTlsVersion_STATUS(temp)
			account.MinimumTlsVersion = &minimumTlsVersion
		}
	}

	// Set property "Name":
	if typedInput.Name != nil {
		name := *typedInput.Name
		account.Name = &name
	}

	// Set property "NetworkAcls":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.NetworkAcls != nil {
			var networkAcls1 NetworkRuleSet_STATUS
			err := networkAcls1.PopulateFromARM(owner, *typedInput.Properties.NetworkAcls)
			if err != nil {
				return err
			}
			networkAcls := networkAcls1
			account.NetworkAcls = &networkAcls
		}
	}

	// Set property "PrimaryEndpoints":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PrimaryEndpoints != nil {
			var primaryEndpoints1 Endpoints_STATUS
			err := primaryEndpoints1.PopulateFromARM(owner, *typedInput.Properties.PrimaryEndpoints)
			if err != nil {
				return err
			}
			primaryEndpoints := primaryEndpoints1
			account.PrimaryEndpoints = &primaryEndpoints
		}
	}

	// Set property "PrimaryLocation":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PrimaryLocation != nil {
			primaryLocation := *typedInput.Properties.PrimaryLocation
			account.PrimaryLocation = &primaryLocation
		}
	}

	// Set property "PrivateEndpointConnections":
	// copying flattened property:
	if typedInput.Properties != nil {
		for _, item := range typedInput.Properties.PrivateEndpointConnections {
			var item1 PrivateEndpointConnection_STATUS
			err := item1.PopulateFromARM(owner, item)
			if err != nil {
				return err
			}
			account.PrivateEndpointConnections = append(account.PrivateEndpointConnections, item1)
		}
	}

	// Set property "ProvisioningState":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ProvisioningState != nil {
			var temp string
			temp = string(*typedInput.Properties.ProvisioningState)
			provisioningState := StorageAccountProperties_ProvisioningState_STATUS(temp)
			account.ProvisioningState = &provisioningState
		}
	}

	// Set property "RoutingPreference":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.RoutingPreference != nil {
			var routingPreference1 RoutingPreference_STATUS
			err := routingPreference1.PopulateFromARM(owner, *typedInput.Properties.RoutingPreference)
			if err != nil {
				return err
			}
			routingPreference := routingPreference1
			account.RoutingPreference = &routingPreference
		}
	}

	// Set property "SasPolicy":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.SasPolicy != nil {
			var sasPolicy1 SasPolicy_STATUS
			err := sasPolicy1.PopulateFromARM(owner, *typedInput.Properties.SasPolicy)
			if err != nil {
				return err
			}
			sasPolicy := sasPolicy1
			account.SasPolicy = &sasPolicy
		}
	}

	// Set property "SecondaryEndpoints":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.SecondaryEndpoints != nil {
			var secondaryEndpoints1 Endpoints_STATUS
			err := secondaryEndpoints1.PopulateFromARM(owner, *typedInput.Properties.SecondaryEndpoints)
			if err != nil {
				return err
			}
			secondaryEndpoints := secondaryEndpoints1
			account.SecondaryEndpoints = &secondaryEndpoints
		}
	}

	// Set property "SecondaryLocation":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.SecondaryLocation != nil {
			secondaryLocation := *typedInput.Properties.SecondaryLocation
			account.SecondaryLocation = &secondaryLocation
		}
	}

	// Set property "Sku":
	if typedInput.Sku != nil {
		var sku1 Sku_STATUS
		err := sku1.PopulateFromARM(owner, *typedInput.Sku)
		if err != nil {
			return err
		}
		sku := sku1
		account.Sku = &sku
	}

	// Set property "StatusOfPrimary":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.StatusOfPrimary != nil {
			var temp string
			temp = string(*typedInput.Properties.StatusOfPrimary)
			statusOfPrimary := StorageAccountProperties_StatusOfPrimary_STATUS(temp)
			account.StatusOfPrimary = &statusOfPrimary
		}
	}

	// Set property "StatusOfSecondary":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.StatusOfSecondary != nil {
			var temp string
			temp = string(*typedInput.Properties.StatusOfSecondary)
			statusOfSecondary := StorageAccountProperties_StatusOfSecondary_STATUS(temp)
			account.StatusOfSecondary = &statusOfSecondary
		}
	}

	// Set property "SupportsHttpsTrafficOnly":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.SupportsHttpsTrafficOnly != nil {
			supportsHttpsTrafficOnly := *typedInput.Properties.SupportsHttpsTrafficOnly
			account.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly
		}
	}

	// Set property "Tags":
	if typedInput.Tags != nil {
		account.Tags = make(map[string]string, len(typedInput.Tags))
		for key, value := range typedInput.Tags {
			account.Tags[key] = value
		}
	}

	// Set property "Type":
	if typedInput.Type != nil {
		typeVar := *typedInput.Type
		account.Type = &typeVar
	}

	// No error
	return nil
}

// AssignProperties_From_StorageAccount_STATUS populates our StorageAccount_STATUS from the provided source StorageAccount_STATUS
func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATUS(source *storage.StorageAccount_STATUS) error {

	// AccessTier
	if source.AccessTier != nil {
		accessTier := *source.AccessTier
		accessTierTemp := genruntime.ToEnum(accessTier, storageAccountProperties_AccessTier_STATUS_Values)
		account.AccessTier = &accessTierTemp
	} else {
		account.AccessTier = nil
	}

	// AllowBlobPublicAccess
	if source.AllowBlobPublicAccess != nil {
		allowBlobPublicAccess := *source.AllowBlobPublicAccess
		account.AllowBlobPublicAccess = &allowBlobPublicAccess
	} else {
		account.AllowBlobPublicAccess = nil
	}

	// AllowCrossTenantReplication
	if source.AllowCrossTenantReplication != nil {
		allowCrossTenantReplication := *source.AllowCrossTenantReplication
		account.AllowCrossTenantReplication = &allowCrossTenantReplication
	} else {
		account.AllowCrossTenantReplication = nil
	}

	// AllowSharedKeyAccess
	if source.AllowSharedKeyAccess != nil {
		allowSharedKeyAccess := *source.AllowSharedKeyAccess
		account.AllowSharedKeyAccess = &allowSharedKeyAccess
	} else {
		account.AllowSharedKeyAccess = nil
	}

	// AzureFilesIdentityBasedAuthentication
	if source.AzureFilesIdentityBasedAuthentication != nil {
		var azureFilesIdentityBasedAuthentication AzureFilesIdentityBasedAuthentication_STATUS
		err := azureFilesIdentityBasedAuthentication.AssignProperties_From_AzureFilesIdentityBasedAuthentication_STATUS(source.AzureFilesIdentityBasedAuthentication)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_AzureFilesIdentityBasedAuthentication_STATUS() to populate field AzureFilesIdentityBasedAuthentication")
		}
		account.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication
	} else {
		account.AzureFilesIdentityBasedAuthentication = nil
	}

	// BlobRestoreStatus
	if source.BlobRestoreStatus != nil {
		var blobRestoreStatus BlobRestoreStatus_STATUS
		err := blobRestoreStatus.AssignProperties_From_BlobRestoreStatus_STATUS(source.BlobRestoreStatus)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_BlobRestoreStatus_STATUS() to populate field BlobRestoreStatus")
		}
		account.BlobRestoreStatus = &blobRestoreStatus
	} else {
		account.BlobRestoreStatus = nil
	}

	// Conditions
	account.Conditions = genruntime.CloneSliceOfCondition(source.Conditions)

	// CreationTime
	account.CreationTime = genruntime.ClonePointerToString(source.CreationTime)

	// CustomDomain
	if source.CustomDomain != nil {
		var customDomain CustomDomain_STATUS
		err := customDomain.AssignProperties_From_CustomDomain_STATUS(source.CustomDomain)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_CustomDomain_STATUS() to populate field CustomDomain")
		}
		account.CustomDomain = &customDomain
	} else {
		account.CustomDomain = nil
	}

	// Encryption
	if source.Encryption != nil {
		var encryption Encryption_STATUS
		err := encryption.AssignProperties_From_Encryption_STATUS(source.Encryption)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_Encryption_STATUS() to populate field Encryption")
		}
		account.Encryption = &encryption
	} else {
		account.Encryption = nil
	}

	// ExtendedLocation
	if source.ExtendedLocation != nil {
		var extendedLocation ExtendedLocation_STATUS
		err := extendedLocation.AssignProperties_From_ExtendedLocation_STATUS(source.ExtendedLocation)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ExtendedLocation_STATUS() to populate field ExtendedLocation")
		}
		account.ExtendedLocation = &extendedLocation
	} else {
		account.ExtendedLocation = nil
	}

	// FailoverInProgress
	if source.FailoverInProgress != nil {
		failoverInProgress := *source.FailoverInProgress
		account.FailoverInProgress = &failoverInProgress
	} else {
		account.FailoverInProgress = nil
	}

	// GeoReplicationStats
	if source.GeoReplicationStats != nil {
		var geoReplicationStat GeoReplicationStats_STATUS
		err := geoReplicationStat.AssignProperties_From_GeoReplicationStats_STATUS(source.GeoReplicationStats)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_GeoReplicationStats_STATUS() to populate field GeoReplicationStats")
		}
		account.GeoReplicationStats = &geoReplicationStat
	} else {
		account.GeoReplicationStats = nil
	}

	// Id
	account.Id = genruntime.ClonePointerToString(source.Id)

	// Identity
	if source.Identity != nil {
		var identity Identity_STATUS
		err := identity.AssignProperties_From_Identity_STATUS(source.Identity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_Identity_STATUS() to populate field Identity")
		}
		account.Identity = &identity
	} else {
		account.Identity = nil
	}

	// IsHnsEnabled
	if source.IsHnsEnabled != nil {
		isHnsEnabled := *source.IsHnsEnabled
		account.IsHnsEnabled = &isHnsEnabled
	} else {
		account.IsHnsEnabled = nil
	}

	// IsNfsV3Enabled
	if source.IsNfsV3Enabled != nil {
		isNfsV3Enabled := *source.IsNfsV3Enabled
		account.IsNfsV3Enabled = &isNfsV3Enabled
	} else {
		account.IsNfsV3Enabled = nil
	}

	// KeyCreationTime
	if source.KeyCreationTime != nil {
		var keyCreationTime KeyCreationTime_STATUS
		err := keyCreationTime.AssignProperties_From_KeyCreationTime_STATUS(source.KeyCreationTime)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_KeyCreationTime_STATUS() to populate field KeyCreationTime")
		}
		account.KeyCreationTime = &keyCreationTime
	} else {
		account.KeyCreationTime = nil
	}

	// KeyPolicy
	if source.KeyPolicy != nil {
		var keyPolicy KeyPolicy_STATUS
		err := keyPolicy.AssignProperties_From_KeyPolicy_STATUS(source.KeyPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_KeyPolicy_STATUS() to populate field KeyPolicy")
		}
		account.KeyPolicy = &keyPolicy
	} else {
		account.KeyPolicy = nil
	}

	// Kind
	if source.Kind != nil {
		kind := *source.Kind
		kindTemp := genruntime.ToEnum(kind, storageAccount_Kind_STATUS_Values)
		account.Kind = &kindTemp
	} else {
		account.Kind = nil
	}

	// LargeFileSharesState
	if source.LargeFileSharesState != nil {
		largeFileSharesState := *source.LargeFileSharesState
		largeFileSharesStateTemp := genruntime.ToEnum(largeFileSharesState, storageAccountProperties_LargeFileSharesState_STATUS_Values)
		account.LargeFileSharesState = &largeFileSharesStateTemp
	} else {
		account.LargeFileSharesState = nil
	}

	// LastGeoFailoverTime
	account.LastGeoFailoverTime = genruntime.ClonePointerToString(source.LastGeoFailoverTime)

	// Location
	account.Location = genruntime.ClonePointerToString(source.Location)

	// MinimumTlsVersion
	if source.MinimumTlsVersion != nil {
		minimumTlsVersion := *source.MinimumTlsVersion
		minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, storageAccountProperties_MinimumTlsVersion_STATUS_Values)
		account.MinimumTlsVersion = &minimumTlsVersionTemp
	} else {
		account.MinimumTlsVersion = nil
	}

	// Name
	account.Name = genruntime.ClonePointerToString(source.Name)

	// NetworkAcls
	if source.NetworkAcls != nil {
		var networkAcl NetworkRuleSet_STATUS
		err := networkAcl.AssignProperties_From_NetworkRuleSet_STATUS(source.NetworkAcls)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NetworkRuleSet_STATUS() to populate field NetworkAcls")
		}
		account.NetworkAcls = &networkAcl
	} else {
		account.NetworkAcls = nil
	}

	// PrimaryEndpoints
	if source.PrimaryEndpoints != nil {
		var primaryEndpoint Endpoints_STATUS
		err := primaryEndpoint.AssignProperties_From_Endpoints_STATUS(source.PrimaryEndpoints)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_Endpoints_STATUS() to populate field PrimaryEndpoints")
		}
		account.PrimaryEndpoints = &primaryEndpoint
	} else {
		account.PrimaryEndpoints = nil
	}

	// PrimaryLocation
	account.PrimaryLocation = genruntime.ClonePointerToString(source.PrimaryLocation)

	// PrivateEndpointConnections
	if source.PrivateEndpointConnections != nil {
		privateEndpointConnectionList := make([]PrivateEndpointConnection_STATUS, len(source.PrivateEndpointConnections))
		for privateEndpointConnectionIndex, privateEndpointConnectionItem := range source.PrivateEndpointConnections {
			var privateEndpointConnection PrivateEndpointConnection_STATUS
			err := privateEndpointConnection.AssignProperties_From_PrivateEndpointConnection_STATUS(&privateEndpointConnectionItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_PrivateEndpointConnection_STATUS() to populate field PrivateEndpointConnections")
			}
			privateEndpointConnectionList[privateEndpointConnectionIndex] = privateEndpointConnection
		}
		account.PrivateEndpointConnections = privateEndpointConnectionList
	} else {
		account.PrivateEndpointConnections = nil
	}

	// ProvisioningState
	if source.ProvisioningState != nil {
		provisioningState := *source.ProvisioningState
		provisioningStateTemp := genruntime.ToEnum(provisioningState, storageAccountProperties_ProvisioningState_STATUS_Values)
		account.ProvisioningState = &provisioningStateTemp
	} else {
		account.ProvisioningState = nil
	}

	// RoutingPreference
	if source.RoutingPreference != nil {
		var routingPreference RoutingPreference_STATUS
		err := routingPreference.AssignProperties_From_RoutingPreference_STATUS(source.RoutingPreference)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_RoutingPreference_STATUS() to populate field RoutingPreference")
		}
		account.RoutingPreference = &routingPreference
	} else {
		account.RoutingPreference = nil
	}

	// SasPolicy
	if source.SasPolicy != nil {
		var sasPolicy SasPolicy_STATUS
		err := sasPolicy.AssignProperties_From_SasPolicy_STATUS(source.SasPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SasPolicy_STATUS() to populate field SasPolicy")
		}
		account.SasPolicy = &sasPolicy
	} else {
		account.SasPolicy = nil
	}

	// SecondaryEndpoints
	if source.SecondaryEndpoints != nil {
		var secondaryEndpoint Endpoints_STATUS
		err := secondaryEndpoint.AssignProperties_From_Endpoints_STATUS(source.SecondaryEndpoints)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_Endpoints_STATUS() to populate field SecondaryEndpoints")
		}
		account.SecondaryEndpoints = &secondaryEndpoint
	} else {
		account.SecondaryEndpoints = nil
	}

	// SecondaryLocation
	account.SecondaryLocation = genruntime.ClonePointerToString(source.SecondaryLocation)

	// Sku
	if source.Sku != nil {
		var sku Sku_STATUS
		err := sku.AssignProperties_From_Sku_STATUS(source.Sku)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_Sku_STATUS() to populate field Sku")
		}
		account.Sku = &sku
	} else {
		account.Sku = nil
	}

	// StatusOfPrimary
	if source.StatusOfPrimary != nil {
		statusOfPrimary := *source.StatusOfPrimary
		statusOfPrimaryTemp := genruntime.ToEnum(statusOfPrimary, storageAccountProperties_StatusOfPrimary_STATUS_Values)
		account.StatusOfPrimary = &statusOfPrimaryTemp
	} else {
		account.StatusOfPrimary = nil
	}

	// StatusOfSecondary
	if source.StatusOfSecondary != nil {
		statusOfSecondary := *source.StatusOfSecondary
		statusOfSecondaryTemp := genruntime.ToEnum(statusOfSecondary, storageAccountProperties_StatusOfSecondary_STATUS_Values)
		account.StatusOfSecondary = &statusOfSecondaryTemp
	} else {
		account.StatusOfSecondary = nil
	}

	// SupportsHttpsTrafficOnly
	if source.SupportsHttpsTrafficOnly != nil {
		supportsHttpsTrafficOnly := *source.SupportsHttpsTrafficOnly
		account.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly
	} else {
		account.SupportsHttpsTrafficOnly = nil
	}

	// Tags
	account.Tags = genruntime.CloneMapOfStringToString(source.Tags)

	// Type
	account.Type = genruntime.ClonePointerToString(source.Type)

	// No error
	return nil
}

// AssignProperties_To_StorageAccount_STATUS populates the provided destination StorageAccount_STATUS from our StorageAccount_STATUS
func (account *StorageAccount_STATUS) AssignProperties_To_StorageAccount_STATUS(destination *storage.StorageAccount_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// AccessTier
	if account.AccessTier != nil {
		accessTier := string(*account.AccessTier)
		destination.AccessTier = &accessTier
	} else {
		destination.AccessTier = nil
	}

	// AllowBlobPublicAccess
	if account.AllowBlobPublicAccess != nil {
		allowBlobPublicAccess := *account.AllowBlobPublicAccess
		destination.AllowBlobPublicAccess = &allowBlobPublicAccess
	} else {
		destination.AllowBlobPublicAccess = nil
	}

	// AllowCrossTenantReplication
	if account.AllowCrossTenantReplication != nil {
		allowCrossTenantReplication := *account.AllowCrossTenantReplication
		destination.AllowCrossTenantReplication = &allowCrossTenantReplication
	} else {
		destination.AllowCrossTenantReplication = nil
	}

	// AllowSharedKeyAccess
	if account.AllowSharedKeyAccess != nil {
		allowSharedKeyAccess := *account.AllowSharedKeyAccess
		destination.AllowSharedKeyAccess = &allowSharedKeyAccess
	} else {
		destination.AllowSharedKeyAccess = nil
	}

	// AzureFilesIdentityBasedAuthentication
	if account.AzureFilesIdentityBasedAuthentication != nil {
		var azureFilesIdentityBasedAuthentication storage.AzureFilesIdentityBasedAuthentication_STATUS
		err := account.AzureFilesIdentityBasedAuthentication.AssignProperties_To_AzureFilesIdentityBasedAuthentication_STATUS(&azureFilesIdentityBasedAuthentication)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_AzureFilesIdentityBasedAuthentication_STATUS() to populate field AzureFilesIdentityBasedAuthentication")
		}
		destination.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication
	} else {
		destination.AzureFilesIdentityBasedAuthentication = nil
	}

	// BlobRestoreStatus
	if account.BlobRestoreStatus != nil {
		var blobRestoreStatus storage.BlobRestoreStatus_STATUS
		err := account.BlobRestoreStatus.AssignProperties_To_BlobRestoreStatus_STATUS(&blobRestoreStatus)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_BlobRestoreStatus_STATUS() to populate field BlobRestoreStatus")
		}
		destination.BlobRestoreStatus = &blobRestoreStatus
	} else {
		destination.BlobRestoreStatus = nil
	}

	// Conditions
	destination.Conditions = genruntime.CloneSliceOfCondition(account.Conditions)

	// CreationTime
	destination.CreationTime = genruntime.ClonePointerToString(account.CreationTime)

	// CustomDomain
	if account.CustomDomain != nil {
		var customDomain storage.CustomDomain_STATUS
		err := account.CustomDomain.AssignProperties_To_CustomDomain_STATUS(&customDomain)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_CustomDomain_STATUS() to populate field CustomDomain")
		}
		destination.CustomDomain = &customDomain
	} else {
		destination.CustomDomain = nil
	}

	// Encryption
	if account.Encryption != nil {
		var encryption storage.Encryption_STATUS
		err := account.Encryption.AssignProperties_To_Encryption_STATUS(&encryption)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_Encryption_STATUS() to populate field Encryption")
		}
		destination.Encryption = &encryption
	} else {
		destination.Encryption = nil
	}

	// ExtendedLocation
	if account.ExtendedLocation != nil {
		var extendedLocation storage.ExtendedLocation_STATUS
		err := account.ExtendedLocation.AssignProperties_To_ExtendedLocation_STATUS(&extendedLocation)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ExtendedLocation_STATUS() to populate field ExtendedLocation")
		}
		destination.ExtendedLocation = &extendedLocation
	} else {
		destination.ExtendedLocation = nil
	}

	// FailoverInProgress
	if account.FailoverInProgress != nil {
		failoverInProgress := *account.FailoverInProgress
		destination.FailoverInProgress = &failoverInProgress
	} else {
		destination.FailoverInProgress = nil
	}

	// GeoReplicationStats
	if account.GeoReplicationStats != nil {
		var geoReplicationStat storage.GeoReplicationStats_STATUS
		err := account.GeoReplicationStats.AssignProperties_To_GeoReplicationStats_STATUS(&geoReplicationStat)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_GeoReplicationStats_STATUS() to populate field GeoReplicationStats")
		}
		destination.GeoReplicationStats = &geoReplicationStat
	} else {
		destination.GeoReplicationStats = nil
	}

	// Id
	destination.Id = genruntime.ClonePointerToString(account.Id)

	// Identity
	if account.Identity != nil {
		var identity storage.Identity_STATUS
		err := account.Identity.AssignProperties_To_Identity_STATUS(&identity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_Identity_STATUS() to populate field Identity")
		}
		destination.Identity = &identity
	} else {
		destination.Identity = nil
	}

	// IsHnsEnabled
	if account.IsHnsEnabled != nil {
		isHnsEnabled := *account.IsHnsEnabled
		destination.IsHnsEnabled = &isHnsEnabled
	} else {
		destination.IsHnsEnabled = nil
	}

	// IsNfsV3Enabled
	if account.IsNfsV3Enabled != nil {
		isNfsV3Enabled := *account.IsNfsV3Enabled
		destination.IsNfsV3Enabled = &isNfsV3Enabled
	} else {
		destination.IsNfsV3Enabled = nil
	}

	// KeyCreationTime
	if account.KeyCreationTime != nil {
		var keyCreationTime storage.KeyCreationTime_STATUS
		err := account.KeyCreationTime.AssignProperties_To_KeyCreationTime_STATUS(&keyCreationTime)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_KeyCreationTime_STATUS() to populate field KeyCreationTime")
		}
		destination.KeyCreationTime = &keyCreationTime
	} else {
		destination.KeyCreationTime = nil
	}

	// KeyPolicy
	if account.KeyPolicy != nil {
		var keyPolicy storage.KeyPolicy_STATUS
		err := account.KeyPolicy.AssignProperties_To_KeyPolicy_STATUS(&keyPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_KeyPolicy_STATUS() to populate field KeyPolicy")
		}
		destination.KeyPolicy = &keyPolicy
	} else {
		destination.KeyPolicy = nil
	}

	// Kind
	if account.Kind != nil {
		kind := string(*account.Kind)
		destination.Kind = &kind
	} else {
		destination.Kind = nil
	}

	// LargeFileSharesState
	if account.LargeFileSharesState != nil {
		largeFileSharesState := string(*account.LargeFileSharesState)
		destination.LargeFileSharesState = &largeFileSharesState
	} else {
		destination.LargeFileSharesState = nil
	}

	// LastGeoFailoverTime
	destination.LastGeoFailoverTime = genruntime.ClonePointerToString(account.LastGeoFailoverTime)

	// Location
	destination.Location = genruntime.ClonePointerToString(account.Location)

	// MinimumTlsVersion
	if account.MinimumTlsVersion != nil {
		minimumTlsVersion := string(*account.MinimumTlsVersion)
		destination.MinimumTlsVersion = &minimumTlsVersion
	} else {
		destination.MinimumTlsVersion = nil
	}

	// Name
	destination.Name = genruntime.ClonePointerToString(account.Name)

	// NetworkAcls
	if account.NetworkAcls != nil {
		var networkAcl storage.NetworkRuleSet_STATUS
		err := account.NetworkAcls.AssignProperties_To_NetworkRuleSet_STATUS(&networkAcl)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NetworkRuleSet_STATUS() to populate field NetworkAcls")
		}
		destination.NetworkAcls = &networkAcl
	} else {
		destination.NetworkAcls = nil
	}

	// PrimaryEndpoints
	if account.PrimaryEndpoints != nil {
		var primaryEndpoint storage.Endpoints_STATUS
		err := account.PrimaryEndpoints.AssignProperties_To_Endpoints_STATUS(&primaryEndpoint)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_Endpoints_STATUS() to populate field PrimaryEndpoints")
		}
		destination.PrimaryEndpoints = &primaryEndpoint
	} else {
		destination.PrimaryEndpoints = nil
	}

	// PrimaryLocation
	destination.PrimaryLocation = genruntime.ClonePointerToString(account.PrimaryLocation)

	// PrivateEndpointConnections
	if account.PrivateEndpointConnections != nil {
		privateEndpointConnectionList := make([]storage.PrivateEndpointConnection_STATUS, len(account.PrivateEndpointConnections))
		for privateEndpointConnectionIndex, privateEndpointConnectionItem := range account.PrivateEndpointConnections {
			var privateEndpointConnection storage.PrivateEndpointConnection_STATUS
			err := privateEndpointConnectionItem.AssignProperties_To_PrivateEndpointConnection_STATUS(&privateEndpointConnection)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_PrivateEndpointConnection_STATUS() to populate field PrivateEndpointConnections")
			}
			privateEndpointConnectionList[privateEndpointConnectionIndex] = privateEndpointConnection
		}
		destination.PrivateEndpointConnections = privateEndpointConnectionList
	} else {
		destination.PrivateEndpointConnections = nil
	}

	// ProvisioningState
	if account.ProvisioningState != nil {
		provisioningState := string(*account.ProvisioningState)
		destination.ProvisioningState = &provisioningState
	} else {
		destination.ProvisioningState = nil
	}

	// RoutingPreference
	if account.RoutingPreference != nil {
		var routingPreference storage.RoutingPreference_STATUS
		err := account.RoutingPreference.AssignProperties_To_RoutingPreference_STATUS(&routingPreference)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_RoutingPreference_STATUS() to populate field RoutingPreference")
		}
		destination.RoutingPreference = &routingPreference
	} else {
		destination.RoutingPreference = nil
	}

	// SasPolicy
	if account.SasPolicy != nil {
		var sasPolicy storage.SasPolicy_STATUS
		err := account.SasPolicy.AssignProperties_To_SasPolicy_STATUS(&sasPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SasPolicy_STATUS() to populate field SasPolicy")
		}
		destination.SasPolicy = &sasPolicy
	} else {
		destination.SasPolicy = nil
	}

	// SecondaryEndpoints
	if account.SecondaryEndpoints != nil {
		var secondaryEndpoint storage.Endpoints_STATUS
		err := account.SecondaryEndpoints.AssignProperties_To_Endpoints_STATUS(&secondaryEndpoint)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_Endpoints_STATUS() to populate field SecondaryEndpoints")
		}
		destination.SecondaryEndpoints = &secondaryEndpoint
	} else {
		destination.SecondaryEndpoints = nil
	}

	// SecondaryLocation
	destination.SecondaryLocation = genruntime.ClonePointerToString(account.SecondaryLocation)

	// Sku
	if account.Sku != nil {
		var sku storage.Sku_STATUS
		err := account.Sku.AssignProperties_To_Sku_STATUS(&sku)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_Sku_STATUS() to populate field Sku")
		}
		destination.Sku = &sku
	} else {
		destination.Sku = nil
	}

	// StatusOfPrimary
	if account.StatusOfPrimary != nil {
		statusOfPrimary := string(*account.StatusOfPrimary)
		destination.StatusOfPrimary = &statusOfPrimary
	} else {
		destination.StatusOfPrimary = nil
	}

	// StatusOfSecondary
	if account.StatusOfSecondary != nil {
		statusOfSecondary := string(*account.StatusOfSecondary)
		destination.StatusOfSecondary = &statusOfSecondary
	} else {
		destination.StatusOfSecondary = nil
	}

	// SupportsHttpsTrafficOnly
	if account.SupportsHttpsTrafficOnly != nil {
		supportsHttpsTrafficOnly := *account.SupportsHttpsTrafficOnly
		destination.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly
	} else {
		destination.SupportsHttpsTrafficOnly = nil
	}

	// Tags
	destination.Tags = genruntime.CloneMapOfStringToString(account.Tags)

	// Type
	destination.Type = genruntime.ClonePointerToString(account.Type)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Settings for Azure Files identity based authentication.
type AzureFilesIdentityBasedAuthentication struct {
	// ActiveDirectoryProperties: Required if choose AD.
	ActiveDirectoryProperties *ActiveDirectoryProperties `json:"activeDirectoryProperties,omitempty"`

	// DefaultSharePermission: Default share permission for users using Kerberos authentication if RBAC role is not assigned.
	DefaultSharePermission *AzureFilesIdentityBasedAuthentication_DefaultSharePermission `json:"defaultSharePermission,omitempty"`

	// +kubebuilder:validation:Required
	// DirectoryServiceOptions: Indicates the directory service used.
	DirectoryServiceOptions *AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions `json:"directoryServiceOptions,omitempty"`
}

var _ genruntime.ARMTransformer = &AzureFilesIdentityBasedAuthentication{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (authentication *AzureFilesIdentityBasedAuthentication) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if authentication == nil {
		return nil, nil
	}
	result := &arm.AzureFilesIdentityBasedAuthentication{}

	// Set property "ActiveDirectoryProperties":
	if authentication.ActiveDirectoryProperties != nil {
		activeDirectoryProperties_ARM, err := authentication.ActiveDirectoryProperties.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		activeDirectoryProperties := *activeDirectoryProperties_ARM.(*arm.ActiveDirectoryProperties)
		result.ActiveDirectoryProperties = &activeDirectoryProperties
	}

	// Set property "DefaultSharePermission":
	if authentication.DefaultSharePermission != nil {
		var temp string
		temp = string(*authentication.DefaultSharePermission)
		defaultSharePermission := arm.AzureFilesIdentityBasedAuthentication_DefaultSharePermission(temp)
		result.DefaultSharePermission = &defaultSharePermission
	}

	// Set property "DirectoryServiceOptions":
	if authentication.DirectoryServiceOptions != nil {
		var temp string
		temp = string(*authentication.DirectoryServiceOptions)
		directoryServiceOptions := arm.AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions(temp)
		result.DirectoryServiceOptions = &directoryServiceOptions
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (authentication *AzureFilesIdentityBasedAuthentication) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.AzureFilesIdentityBasedAuthentication{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (authentication *AzureFilesIdentityBasedAuthentication) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.AzureFilesIdentityBasedAuthentication)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AzureFilesIdentityBasedAuthentication, got %T", armInput)
	}

	// Set property "ActiveDirectoryProperties":
	if typedInput.ActiveDirectoryProperties != nil {
		var activeDirectoryProperties1 ActiveDirectoryProperties
		err := activeDirectoryProperties1.PopulateFromARM(owner, *typedInput.ActiveDirectoryProperties)
		if err != nil {
			return err
		}
		activeDirectoryProperties := activeDirectoryProperties1
		authentication.ActiveDirectoryProperties = &activeDirectoryProperties
	}

	// Set property "DefaultSharePermission":
	if typedInput.DefaultSharePermission != nil {
		var temp string
		temp = string(*typedInput.DefaultSharePermission)
		defaultSharePermission := AzureFilesIdentityBasedAuthentication_DefaultSharePermission(temp)
		authentication.DefaultSharePermission = &defaultSharePermission
	}

	// Set property "DirectoryServiceOptions":
	if typedInput.DirectoryServiceOptions != nil {
		var temp string
		temp = string(*typedInput.DirectoryServiceOptions)
		directoryServiceOptions := AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions(temp)
		authentication.DirectoryServiceOptions = &directoryServiceOptions
	}

	// No error
	return nil
}

// AssignProperties_From_AzureFilesIdentityBasedAuthentication populates our AzureFilesIdentityBasedAuthentication from the provided source AzureFilesIdentityBasedAuthentication
func (authentication *AzureFilesIdentityBasedAuthentication) AssignProperties_From_AzureFilesIdentityBasedAuthentication(source *storage.AzureFilesIdentityBasedAuthentication) error {

	// ActiveDirectoryProperties
	if source.ActiveDirectoryProperties != nil {
		var activeDirectoryProperty ActiveDirectoryProperties
		err := activeDirectoryProperty.AssignProperties_From_ActiveDirectoryProperties(source.ActiveDirectoryProperties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ActiveDirectoryProperties() to populate field ActiveDirectoryProperties")
		}
		authentication.ActiveDirectoryProperties = &activeDirectoryProperty
	} else {
		authentication.ActiveDirectoryProperties = nil
	}

	// DefaultSharePermission
	if source.DefaultSharePermission != nil {
		defaultSharePermission := *source.DefaultSharePermission
		defaultSharePermissionTemp := genruntime.ToEnum(defaultSharePermission, azureFilesIdentityBasedAuthentication_DefaultSharePermission_Values)
		authentication.DefaultSharePermission = &defaultSharePermissionTemp
	} else {
		authentication.DefaultSharePermission = nil
	}

	// DirectoryServiceOptions
	if source.DirectoryServiceOptions != nil {
		directoryServiceOption := *source.DirectoryServiceOptions
		directoryServiceOptionTemp := genruntime.ToEnum(directoryServiceOption, azureFilesIdentityBasedAuthentication_DirectoryServiceOptions_Values)
		authentication.DirectoryServiceOptions = &directoryServiceOptionTemp
	} else {
		authentication.DirectoryServiceOptions = nil
	}

	// No error
	return nil
}

// AssignProperties_To_AzureFilesIdentityBasedAuthentication populates the provided destination AzureFilesIdentityBasedAuthentication from our AzureFilesIdentityBasedAuthentication
func (authentication *AzureFilesIdentityBasedAuthentication) AssignProperties_To_AzureFilesIdentityBasedAuthentication(destination *storage.AzureFilesIdentityBasedAuthentication) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// ActiveDirectoryProperties
	if authentication.ActiveDirectoryProperties != nil {
		var activeDirectoryProperty storage.ActiveDirectoryProperties
		err := authentication.ActiveDirectoryProperties.AssignProperties_To_ActiveDirectoryProperties(&activeDirectoryProperty)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ActiveDirectoryProperties() to populate field ActiveDirectoryProperties")
		}
		destination.ActiveDirectoryProperties = &activeDirectoryProperty
	} else {
		destination.ActiveDirectoryProperties = nil
	}

	// DefaultSharePermission
	if authentication.DefaultSharePermission != nil {
		defaultSharePermission := string(*authentication.DefaultSharePermission)
		destination.DefaultSharePermission = &defaultSharePermission
	} else {
		destination.DefaultSharePermission = nil
	}

	// DirectoryServiceOptions
	if authentication.DirectoryServiceOptions != nil {
		directoryServiceOption := string(*authentication.DirectoryServiceOptions)
		destination.DirectoryServiceOptions = &directoryServiceOption
	} else {
		destination.DirectoryServiceOptions = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Settings for Azure Files identity based authentication.
type AzureFilesIdentityBasedAuthentication_STATUS struct {
	// ActiveDirectoryProperties: Required if choose AD.
	ActiveDirectoryProperties *ActiveDirectoryProperties_STATUS `json:"activeDirectoryProperties,omitempty"`

	// DefaultSharePermission: Default share permission for users using Kerberos authentication if RBAC role is not assigned.
	DefaultSharePermission *AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS `json:"defaultSharePermission,omitempty"`

	// DirectoryServiceOptions: Indicates the directory service used.
	DirectoryServiceOptions *AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS `json:"directoryServiceOptions,omitempty"`
}

var _ genruntime.FromARMConverter = &AzureFilesIdentityBasedAuthentication_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (authentication *AzureFilesIdentityBasedAuthentication_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.AzureFilesIdentityBasedAuthentication_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (authentication *AzureFilesIdentityBasedAuthentication_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.AzureFilesIdentityBasedAuthentication_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AzureFilesIdentityBasedAuthentication_STATUS, got %T", armInput)
	}

	// Set property "ActiveDirectoryProperties":
	if typedInput.ActiveDirectoryProperties != nil {
		var activeDirectoryProperties1 ActiveDirectoryProperties_STATUS
		err := activeDirectoryProperties1.PopulateFromARM(owner, *typedInput.ActiveDirectoryProperties)
		if err != nil {
			return err
		}
		activeDirectoryProperties := activeDirectoryProperties1
		authentication.ActiveDirectoryProperties = &activeDirectoryProperties
	}

	// Set property "DefaultSharePermission":
	if typedInput.DefaultSharePermission != nil {
		var temp string
		temp = string(*typedInput.DefaultSharePermission)
		defaultSharePermission := AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS(temp)
		authentication.DefaultSharePermission = &defaultSharePermission
	}

	// Set property "DirectoryServiceOptions":
	if typedInput.DirectoryServiceOptions != nil {
		var temp string
		temp = string(*typedInput.DirectoryServiceOptions)
		directoryServiceOptions := AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS(temp)
		authentication.DirectoryServiceOptions = &directoryServiceOptions
	}

	// No error
	return nil
}

// AssignProperties_From_AzureFilesIdentityBasedAuthentication_STATUS populates our AzureFilesIdentityBasedAuthentication_STATUS from the provided source AzureFilesIdentityBasedAuthentication_STATUS
func (authentication *AzureFilesIdentityBasedAuthentication_STATUS) AssignProperties_From_AzureFilesIdentityBasedAuthentication_STATUS(source *storage.AzureFilesIdentityBasedAuthentication_STATUS) error {

	// ActiveDirectoryProperties
	if source.ActiveDirectoryProperties != nil {
		var activeDirectoryProperty ActiveDirectoryProperties_STATUS
		err := activeDirectoryProperty.AssignProperties_From_ActiveDirectoryProperties_STATUS(source.ActiveDirectoryProperties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ActiveDirectoryProperties_STATUS() to populate field ActiveDirectoryProperties")
		}
		authentication.ActiveDirectoryProperties = &activeDirectoryProperty
	} else {
		authentication.ActiveDirectoryProperties = nil
	}

	// DefaultSharePermission
	if source.DefaultSharePermission != nil {
		defaultSharePermission := *source.DefaultSharePermission
		defaultSharePermissionTemp := genruntime.ToEnum(defaultSharePermission, azureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_Values)
		authentication.DefaultSharePermission = &defaultSharePermissionTemp
	} else {
		authentication.DefaultSharePermission = nil
	}

	// DirectoryServiceOptions
	if source.DirectoryServiceOptions != nil {
		directoryServiceOption := *source.DirectoryServiceOptions
		directoryServiceOptionTemp := genruntime.ToEnum(directoryServiceOption, azureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_Values)
		authentication.DirectoryServiceOptions = &directoryServiceOptionTemp
	} else {
		authentication.DirectoryServiceOptions = nil
	}

	// No error
	return nil
}

// AssignProperties_To_AzureFilesIdentityBasedAuthentication_STATUS populates the provided destination AzureFilesIdentityBasedAuthentication_STATUS from our AzureFilesIdentityBasedAuthentication_STATUS
func (authentication *AzureFilesIdentityBasedAuthentication_STATUS) AssignProperties_To_AzureFilesIdentityBasedAuthentication_STATUS(destination *storage.AzureFilesIdentityBasedAuthentication_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// ActiveDirectoryProperties
	if authentication.ActiveDirectoryProperties != nil {
		var activeDirectoryProperty storage.ActiveDirectoryProperties_STATUS
		err := authentication.ActiveDirectoryProperties.AssignProperties_To_ActiveDirectoryProperties_STATUS(&activeDirectoryProperty)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ActiveDirectoryProperties_STATUS() to populate field ActiveDirectoryProperties")
		}
		destination.ActiveDirectoryProperties = &activeDirectoryProperty
	} else {
		destination.ActiveDirectoryProperties = nil
	}

	// DefaultSharePermission
	if authentication.DefaultSharePermission != nil {
		defaultSharePermission := string(*authentication.DefaultSharePermission)
		destination.DefaultSharePermission = &defaultSharePermission
	} else {
		destination.DefaultSharePermission = nil
	}

	// DirectoryServiceOptions
	if authentication.DirectoryServiceOptions != nil {
		directoryServiceOption := string(*authentication.DirectoryServiceOptions)
		destination.DirectoryServiceOptions = &directoryServiceOption
	} else {
		destination.DirectoryServiceOptions = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Blob restore status.
type BlobRestoreStatus_STATUS struct {
	// FailureReason: Failure reason when blob restore is failed.
	FailureReason *string `json:"failureReason,omitempty"`

	// Parameters: Blob restore request parameters.
	Parameters *BlobRestoreParameters_STATUS `json:"parameters,omitempty"`

	// RestoreId: Id for tracking blob restore request.
	RestoreId *string `json:"restoreId,omitempty"`

	// Status: The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing.
	// - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed.
	Status *BlobRestoreStatus_Status_STATUS `json:"status,omitempty"`
}

var _ genruntime.FromARMConverter = &BlobRestoreStatus_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (status *BlobRestoreStatus_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.BlobRestoreStatus_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (status *BlobRestoreStatus_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.BlobRestoreStatus_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.BlobRestoreStatus_STATUS, got %T", armInput)
	}

	// Set property "FailureReason":
	if typedInput.FailureReason != nil {
		failureReason := *typedInput.FailureReason
		status.FailureReason = &failureReason
	}

	// Set property "Parameters":
	if typedInput.Parameters != nil {
		var parameters1 BlobRestoreParameters_STATUS
		err := parameters1.PopulateFromARM(owner, *typedInput.Parameters)
		if err != nil {
			return err
		}
		parameters := parameters1
		status.Parameters = &parameters
	}

	// Set property "RestoreId":
	if typedInput.RestoreId != nil {
		restoreId := *typedInput.RestoreId
		status.RestoreId = &restoreId
	}

	// Set property "Status":
	if typedInput.Status != nil {
		var temp string
		temp = string(*typedInput.Status)
		status1 := BlobRestoreStatus_Status_STATUS(temp)
		status.Status = &status1
	}

	// No error
	return nil
}

// AssignProperties_From_BlobRestoreStatus_STATUS populates our BlobRestoreStatus_STATUS from the provided source BlobRestoreStatus_STATUS
func (status *BlobRestoreStatus_STATUS) AssignProperties_From_BlobRestoreStatus_STATUS(source *storage.BlobRestoreStatus_STATUS) error {

	// FailureReason
	status.FailureReason = genruntime.ClonePointerToString(source.FailureReason)

	// Parameters
	if source.Parameters != nil {
		var parameter BlobRestoreParameters_STATUS
		err := parameter.AssignProperties_From_BlobRestoreParameters_STATUS(source.Parameters)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_BlobRestoreParameters_STATUS() to populate field Parameters")
		}
		status.Parameters = &parameter
	} else {
		status.Parameters = nil
	}

	// RestoreId
	status.RestoreId = genruntime.ClonePointerToString(source.RestoreId)

	// Status
	if source.Status != nil {
		statusValue := *source.Status
		statusTemp := genruntime.ToEnum(statusValue, blobRestoreStatus_Status_STATUS_Values)
		status.Status = &statusTemp
	} else {
		status.Status = nil
	}

	// No error
	return nil
}

// AssignProperties_To_BlobRestoreStatus_STATUS populates the provided destination BlobRestoreStatus_STATUS from our BlobRestoreStatus_STATUS
func (status *BlobRestoreStatus_STATUS) AssignProperties_To_BlobRestoreStatus_STATUS(destination *storage.BlobRestoreStatus_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// FailureReason
	destination.FailureReason = genruntime.ClonePointerToString(status.FailureReason)

	// Parameters
	if status.Parameters != nil {
		var parameter storage.BlobRestoreParameters_STATUS
		err := status.Parameters.AssignProperties_To_BlobRestoreParameters_STATUS(&parameter)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_BlobRestoreParameters_STATUS() to populate field Parameters")
		}
		destination.Parameters = &parameter
	} else {
		destination.Parameters = nil
	}

	// RestoreId
	destination.RestoreId = genruntime.ClonePointerToString(status.RestoreId)

	// Status
	if status.Status != nil {
		statusTemp := string(*status.Status)
		destination.Status = &statusTemp
	} else {
		destination.Status = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// The custom domain assigned to this storage account. This can be set via Update.
type CustomDomain struct {
	// +kubebuilder:validation:Required
	// Name: Gets or sets the custom domain name assigned to the storage account. Name is the CNAME source.
	Name *string `json:"name,omitempty"`

	// UseSubDomainName: Indicates whether indirect CName validation is enabled. Default value is false. This should only be
	// set on updates.
	UseSubDomainName *bool `json:"useSubDomainName,omitempty"`
}

var _ genruntime.ARMTransformer = &CustomDomain{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (domain *CustomDomain) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if domain == nil {
		return nil, nil
	}
	result := &arm.CustomDomain{}

	// Set property "Name":
	if domain.Name != nil {
		name := *domain.Name
		result.Name = &name
	}

	// Set property "UseSubDomainName":
	if domain.UseSubDomainName != nil {
		useSubDomainName := *domain.UseSubDomainName
		result.UseSubDomainName = &useSubDomainName
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (domain *CustomDomain) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.CustomDomain{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (domain *CustomDomain) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.CustomDomain)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.CustomDomain, got %T", armInput)
	}

	// Set property "Name":
	if typedInput.Name != nil {
		name := *typedInput.Name
		domain.Name = &name
	}

	// Set property "UseSubDomainName":
	if typedInput.UseSubDomainName != nil {
		useSubDomainName := *typedInput.UseSubDomainName
		domain.UseSubDomainName = &useSubDomainName
	}

	// No error
	return nil
}

// AssignProperties_From_CustomDomain populates our CustomDomain from the provided source CustomDomain
func (domain *CustomDomain) AssignProperties_From_CustomDomain(source *storage.CustomDomain) error {

	// Name
	domain.Name = genruntime.ClonePointerToString(source.Name)

	// UseSubDomainName
	if source.UseSubDomainName != nil {
		useSubDomainName := *source.UseSubDomainName
		domain.UseSubDomainName = &useSubDomainName
	} else {
		domain.UseSubDomainName = nil
	}

	// No error
	return nil
}

// AssignProperties_To_CustomDomain populates the provided destination CustomDomain from our CustomDomain
func (domain *CustomDomain) AssignProperties_To_CustomDomain(destination *storage.CustomDomain) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Name
	destination.Name = genruntime.ClonePointerToString(domain.Name)

	// UseSubDomainName
	if domain.UseSubDomainName != nil {
		useSubDomainName := *domain.UseSubDomainName
		destination.UseSubDomainName = &useSubDomainName
	} else {
		destination.UseSubDomainName = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// The custom domain assigned to this storage account. This can be set via Update.
type CustomDomain_STATUS struct {
	// Name: Gets or sets the custom domain name assigned to the storage account. Name is the CNAME source.
	Name *string `json:"name,omitempty"`

	// UseSubDomainName: Indicates whether indirect CName validation is enabled. Default value is false. This should only be
	// set on updates.
	UseSubDomainName *bool `json:"useSubDomainName,omitempty"`
}

var _ genruntime.FromARMConverter = &CustomDomain_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (domain *CustomDomain_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.CustomDomain_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (domain *CustomDomain_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.CustomDomain_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.CustomDomain_STATUS, got %T", armInput)
	}

	// Set property "Name":
	if typedInput.Name != nil {
		name := *typedInput.Name
		domain.Name = &name
	}

	// Set property "UseSubDomainName":
	if typedInput.UseSubDomainName != nil {
		useSubDomainName := *typedInput.UseSubDomainName
		domain.UseSubDomainName = &useSubDomainName
	}

	// No error
	return nil
}

// AssignProperties_From_CustomDomain_STATUS populates our CustomDomain_STATUS from the provided source CustomDomain_STATUS
func (domain *CustomDomain_STATUS) AssignProperties_From_CustomDomain_STATUS(source *storage.CustomDomain_STATUS) error {

	// Name
	domain.Name = genruntime.ClonePointerToString(source.Name)

	// UseSubDomainName
	if source.UseSubDomainName != nil {
		useSubDomainName := *source.UseSubDomainName
		domain.UseSubDomainName = &useSubDomainName
	} else {
		domain.UseSubDomainName = nil
	}

	// No error
	return nil
}

// AssignProperties_To_CustomDomain_STATUS populates the provided destination CustomDomain_STATUS from our CustomDomain_STATUS
func (domain *CustomDomain_STATUS) AssignProperties_To_CustomDomain_STATUS(destination *storage.CustomDomain_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Name
	destination.Name = genruntime.ClonePointerToString(domain.Name)

	// UseSubDomainName
	if domain.UseSubDomainName != nil {
		useSubDomainName := *domain.UseSubDomainName
		destination.UseSubDomainName = &useSubDomainName
	} else {
		destination.UseSubDomainName = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// The encryption settings on the storage account.
type Encryption struct {
	// Identity: The identity to be used with service-side encryption at rest.
	Identity *EncryptionIdentity `json:"identity,omitempty"`

	// +kubebuilder:validation:Required
	// KeySource: The encryption keySource (provider). Possible values (case-insensitive):  Microsoft.Storage,
	// Microsoft.Keyvault
	KeySource *Encryption_KeySource `json:"keySource,omitempty"`

	// Keyvaultproperties: Properties provided by key vault.
	Keyvaultproperties *KeyVaultProperties `json:"keyvaultproperties,omitempty"`

	// RequireInfrastructureEncryption: A boolean indicating whether or not the service applies a secondary layer of encryption
	// with platform managed keys for data at rest.
	RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"`

	// Services: List of services which support encryption.
	Services *EncryptionServices `json:"services,omitempty"`
}

var _ genruntime.ARMTransformer = &Encryption{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (encryption *Encryption) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if encryption == nil {
		return nil, nil
	}
	result := &arm.Encryption{}

	// Set property "Identity":
	if encryption.Identity != nil {
		identity_ARM, err := encryption.Identity.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		identity := *identity_ARM.(*arm.EncryptionIdentity)
		result.Identity = &identity
	}

	// Set property "KeySource":
	if encryption.KeySource != nil {
		var temp string
		temp = string(*encryption.KeySource)
		keySource := arm.Encryption_KeySource(temp)
		result.KeySource = &keySource
	}

	// Set property "Keyvaultproperties":
	if encryption.Keyvaultproperties != nil {
		keyvaultproperties_ARM, err := encryption.Keyvaultproperties.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		keyvaultproperties := *keyvaultproperties_ARM.(*arm.KeyVaultProperties)
		result.Keyvaultproperties = &keyvaultproperties
	}

	// Set property "RequireInfrastructureEncryption":
	if encryption.RequireInfrastructureEncryption != nil {
		requireInfrastructureEncryption := *encryption.RequireInfrastructureEncryption
		result.RequireInfrastructureEncryption = &requireInfrastructureEncryption
	}

	// Set property "Services":
	if encryption.Services != nil {
		services_ARM, err := encryption.Services.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		services := *services_ARM.(*arm.EncryptionServices)
		result.Services = &services
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (encryption *Encryption) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.Encryption{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (encryption *Encryption) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.Encryption)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Encryption, got %T", armInput)
	}

	// Set property "Identity":
	if typedInput.Identity != nil {
		var identity1 EncryptionIdentity
		err := identity1.PopulateFromARM(owner, *typedInput.Identity)
		if err != nil {
			return err
		}
		identity := identity1
		encryption.Identity = &identity
	}

	// Set property "KeySource":
	if typedInput.KeySource != nil {
		var temp string
		temp = string(*typedInput.KeySource)
		keySource := Encryption_KeySource(temp)
		encryption.KeySource = &keySource
	}

	// Set property "Keyvaultproperties":
	if typedInput.Keyvaultproperties != nil {
		var keyvaultproperties1 KeyVaultProperties
		err := keyvaultproperties1.PopulateFromARM(owner, *typedInput.Keyvaultproperties)
		if err != nil {
			return err
		}
		keyvaultproperties := keyvaultproperties1
		encryption.Keyvaultproperties = &keyvaultproperties
	}

	// Set property "RequireInfrastructureEncryption":
	if typedInput.RequireInfrastructureEncryption != nil {
		requireInfrastructureEncryption := *typedInput.RequireInfrastructureEncryption
		encryption.RequireInfrastructureEncryption = &requireInfrastructureEncryption
	}

	// Set property "Services":
	if typedInput.Services != nil {
		var services1 EncryptionServices
		err := services1.PopulateFromARM(owner, *typedInput.Services)
		if err != nil {
			return err
		}
		services := services1
		encryption.Services = &services
	}

	// No error
	return nil
}

// AssignProperties_From_Encryption populates our Encryption from the provided source Encryption
func (encryption *Encryption) AssignProperties_From_Encryption(source *storage.Encryption) error {

	// Identity
	if source.Identity != nil {
		var identity EncryptionIdentity
		err := identity.AssignProperties_From_EncryptionIdentity(source.Identity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EncryptionIdentity() to populate field Identity")
		}
		encryption.Identity = &identity
	} else {
		encryption.Identity = nil
	}

	// KeySource
	if source.KeySource != nil {
		keySource := *source.KeySource
		keySourceTemp := genruntime.ToEnum(keySource, encryption_KeySource_Values)
		encryption.KeySource = &keySourceTemp
	} else {
		encryption.KeySource = nil
	}

	// Keyvaultproperties
	if source.Keyvaultproperties != nil {
		var keyvaultproperty KeyVaultProperties
		err := keyvaultproperty.AssignProperties_From_KeyVaultProperties(source.Keyvaultproperties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_KeyVaultProperties() to populate field Keyvaultproperties")
		}
		encryption.Keyvaultproperties = &keyvaultproperty
	} else {
		encryption.Keyvaultproperties = nil
	}

	// RequireInfrastructureEncryption
	if source.RequireInfrastructureEncryption != nil {
		requireInfrastructureEncryption := *source.RequireInfrastructureEncryption
		encryption.RequireInfrastructureEncryption = &requireInfrastructureEncryption
	} else {
		encryption.RequireInfrastructureEncryption = nil
	}

	// Services
	if source.Services != nil {
		var service EncryptionServices
		err := service.AssignProperties_From_EncryptionServices(source.Services)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EncryptionServices() to populate field Services")
		}
		encryption.Services = &service
	} else {
		encryption.Services = nil
	}

	// No error
	return nil
}

// AssignProperties_To_Encryption populates the provided destination Encryption from our Encryption
func (encryption *Encryption) AssignProperties_To_Encryption(destination *storage.Encryption) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Identity
	if encryption.Identity != nil {
		var identity storage.EncryptionIdentity
		err := encryption.Identity.AssignProperties_To_EncryptionIdentity(&identity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EncryptionIdentity() to populate field Identity")
		}
		destination.Identity = &identity
	} else {
		destination.Identity = nil
	}

	// KeySource
	if encryption.KeySource != nil {
		keySource := string(*encryption.KeySource)
		destination.KeySource = &keySource
	} else {
		destination.KeySource = nil
	}

	// Keyvaultproperties
	if encryption.Keyvaultproperties != nil {
		var keyvaultproperty storage.KeyVaultProperties
		err := encryption.Keyvaultproperties.AssignProperties_To_KeyVaultProperties(&keyvaultproperty)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_KeyVaultProperties() to populate field Keyvaultproperties")
		}
		destination.Keyvaultproperties = &keyvaultproperty
	} else {
		destination.Keyvaultproperties = nil
	}

	// RequireInfrastructureEncryption
	if encryption.RequireInfrastructureEncryption != nil {
		requireInfrastructureEncryption := *encryption.RequireInfrastructureEncryption
		destination.RequireInfrastructureEncryption = &requireInfrastructureEncryption
	} else {
		destination.RequireInfrastructureEncryption = nil
	}

	// Services
	if encryption.Services != nil {
		var service storage.EncryptionServices
		err := encryption.Services.AssignProperties_To_EncryptionServices(&service)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EncryptionServices() to populate field Services")
		}
		destination.Services = &service
	} else {
		destination.Services = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// The encryption settings on the storage account.
type Encryption_STATUS struct {
	// Identity: The identity to be used with service-side encryption at rest.
	Identity *EncryptionIdentity_STATUS `json:"identity,omitempty"`

	// KeySource: The encryption keySource (provider). Possible values (case-insensitive):  Microsoft.Storage,
	// Microsoft.Keyvault
	KeySource *Encryption_KeySource_STATUS `json:"keySource,omitempty"`

	// Keyvaultproperties: Properties provided by key vault.
	Keyvaultproperties *KeyVaultProperties_STATUS `json:"keyvaultproperties,omitempty"`

	// RequireInfrastructureEncryption: A boolean indicating whether or not the service applies a secondary layer of encryption
	// with platform managed keys for data at rest.
	RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"`

	// Services: List of services which support encryption.
	Services *EncryptionServices_STATUS `json:"services,omitempty"`
}

var _ genruntime.FromARMConverter = &Encryption_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (encryption *Encryption_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.Encryption_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (encryption *Encryption_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.Encryption_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Encryption_STATUS, got %T", armInput)
	}

	// Set property "Identity":
	if typedInput.Identity != nil {
		var identity1 EncryptionIdentity_STATUS
		err := identity1.PopulateFromARM(owner, *typedInput.Identity)
		if err != nil {
			return err
		}
		identity := identity1
		encryption.Identity = &identity
	}

	// Set property "KeySource":
	if typedInput.KeySource != nil {
		var temp string
		temp = string(*typedInput.KeySource)
		keySource := Encryption_KeySource_STATUS(temp)
		encryption.KeySource = &keySource
	}

	// Set property "Keyvaultproperties":
	if typedInput.Keyvaultproperties != nil {
		var keyvaultproperties1 KeyVaultProperties_STATUS
		err := keyvaultproperties1.PopulateFromARM(owner, *typedInput.Keyvaultproperties)
		if err != nil {
			return err
		}
		keyvaultproperties := keyvaultproperties1
		encryption.Keyvaultproperties = &keyvaultproperties
	}

	// Set property "RequireInfrastructureEncryption":
	if typedInput.RequireInfrastructureEncryption != nil {
		requireInfrastructureEncryption := *typedInput.RequireInfrastructureEncryption
		encryption.RequireInfrastructureEncryption = &requireInfrastructureEncryption
	}

	// Set property "Services":
	if typedInput.Services != nil {
		var services1 EncryptionServices_STATUS
		err := services1.PopulateFromARM(owner, *typedInput.Services)
		if err != nil {
			return err
		}
		services := services1
		encryption.Services = &services
	}

	// No error
	return nil
}

// AssignProperties_From_Encryption_STATUS populates our Encryption_STATUS from the provided source Encryption_STATUS
func (encryption *Encryption_STATUS) AssignProperties_From_Encryption_STATUS(source *storage.Encryption_STATUS) error {

	// Identity
	if source.Identity != nil {
		var identity EncryptionIdentity_STATUS
		err := identity.AssignProperties_From_EncryptionIdentity_STATUS(source.Identity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EncryptionIdentity_STATUS() to populate field Identity")
		}
		encryption.Identity = &identity
	} else {
		encryption.Identity = nil
	}

	// KeySource
	if source.KeySource != nil {
		keySource := *source.KeySource
		keySourceTemp := genruntime.ToEnum(keySource, encryption_KeySource_STATUS_Values)
		encryption.KeySource = &keySourceTemp
	} else {
		encryption.KeySource = nil
	}

	// Keyvaultproperties
	if source.Keyvaultproperties != nil {
		var keyvaultproperty KeyVaultProperties_STATUS
		err := keyvaultproperty.AssignProperties_From_KeyVaultProperties_STATUS(source.Keyvaultproperties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_KeyVaultProperties_STATUS() to populate field Keyvaultproperties")
		}
		encryption.Keyvaultproperties = &keyvaultproperty
	} else {
		encryption.Keyvaultproperties = nil
	}

	// RequireInfrastructureEncryption
	if source.RequireInfrastructureEncryption != nil {
		requireInfrastructureEncryption := *source.RequireInfrastructureEncryption
		encryption.RequireInfrastructureEncryption = &requireInfrastructureEncryption
	} else {
		encryption.RequireInfrastructureEncryption = nil
	}

	// Services
	if source.Services != nil {
		var service EncryptionServices_STATUS
		err := service.AssignProperties_From_EncryptionServices_STATUS(source.Services)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EncryptionServices_STATUS() to populate field Services")
		}
		encryption.Services = &service
	} else {
		encryption.Services = nil
	}

	// No error
	return nil
}

// AssignProperties_To_Encryption_STATUS populates the provided destination Encryption_STATUS from our Encryption_STATUS
func (encryption *Encryption_STATUS) AssignProperties_To_Encryption_STATUS(destination *storage.Encryption_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Identity
	if encryption.Identity != nil {
		var identity storage.EncryptionIdentity_STATUS
		err := encryption.Identity.AssignProperties_To_EncryptionIdentity_STATUS(&identity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EncryptionIdentity_STATUS() to populate field Identity")
		}
		destination.Identity = &identity
	} else {
		destination.Identity = nil
	}

	// KeySource
	if encryption.KeySource != nil {
		keySource := string(*encryption.KeySource)
		destination.KeySource = &keySource
	} else {
		destination.KeySource = nil
	}

	// Keyvaultproperties
	if encryption.Keyvaultproperties != nil {
		var keyvaultproperty storage.KeyVaultProperties_STATUS
		err := encryption.Keyvaultproperties.AssignProperties_To_KeyVaultProperties_STATUS(&keyvaultproperty)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_KeyVaultProperties_STATUS() to populate field Keyvaultproperties")
		}
		destination.Keyvaultproperties = &keyvaultproperty
	} else {
		destination.Keyvaultproperties = nil
	}

	// RequireInfrastructureEncryption
	if encryption.RequireInfrastructureEncryption != nil {
		requireInfrastructureEncryption := *encryption.RequireInfrastructureEncryption
		destination.RequireInfrastructureEncryption = &requireInfrastructureEncryption
	} else {
		destination.RequireInfrastructureEncryption = nil
	}

	// Services
	if encryption.Services != nil {
		var service storage.EncryptionServices_STATUS
		err := encryption.Services.AssignProperties_To_EncryptionServices_STATUS(&service)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EncryptionServices_STATUS() to populate field Services")
		}
		destination.Services = &service
	} else {
		destination.Services = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object.
type Endpoints_STATUS struct {
	// Blob: Gets the blob endpoint.
	Blob *string `json:"blob,omitempty"`

	// Dfs: Gets the dfs endpoint.
	Dfs *string `json:"dfs,omitempty"`

	// File: Gets the file endpoint.
	File *string `json:"file,omitempty"`

	// InternetEndpoints: Gets the internet routing storage endpoints
	InternetEndpoints *StorageAccountInternetEndpoints_STATUS `json:"internetEndpoints,omitempty"`

	// MicrosoftEndpoints: Gets the microsoft routing storage endpoints.
	MicrosoftEndpoints *StorageAccountMicrosoftEndpoints_STATUS `json:"microsoftEndpoints,omitempty"`

	// Queue: Gets the queue endpoint.
	Queue *string `json:"queue,omitempty"`

	// Table: Gets the table endpoint.
	Table *string `json:"table,omitempty"`

	// Web: Gets the web endpoint.
	Web *string `json:"web,omitempty"`
}

var _ genruntime.FromARMConverter = &Endpoints_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (endpoints *Endpoints_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.Endpoints_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (endpoints *Endpoints_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.Endpoints_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Endpoints_STATUS, got %T", armInput)
	}

	// Set property "Blob":
	if typedInput.Blob != nil {
		blob := *typedInput.Blob
		endpoints.Blob = &blob
	}

	// Set property "Dfs":
	if typedInput.Dfs != nil {
		dfs := *typedInput.Dfs
		endpoints.Dfs = &dfs
	}

	// Set property "File":
	if typedInput.File != nil {
		file := *typedInput.File
		endpoints.File = &file
	}

	// Set property "InternetEndpoints":
	if typedInput.InternetEndpoints != nil {
		var internetEndpoints1 StorageAccountInternetEndpoints_STATUS
		err := internetEndpoints1.PopulateFromARM(owner, *typedInput.InternetEndpoints)
		if err != nil {
			return err
		}
		internetEndpoints := internetEndpoints1
		endpoints.InternetEndpoints = &internetEndpoints
	}

	// Set property "MicrosoftEndpoints":
	if typedInput.MicrosoftEndpoints != nil {
		var microsoftEndpoints1 StorageAccountMicrosoftEndpoints_STATUS
		err := microsoftEndpoints1.PopulateFromARM(owner, *typedInput.MicrosoftEndpoints)
		if err != nil {
			return err
		}
		microsoftEndpoints := microsoftEndpoints1
		endpoints.MicrosoftEndpoints = &microsoftEndpoints
	}

	// Set property "Queue":
	if typedInput.Queue != nil {
		queue := *typedInput.Queue
		endpoints.Queue = &queue
	}

	// Set property "Table":
	if typedInput.Table != nil {
		table := *typedInput.Table
		endpoints.Table = &table
	}

	// Set property "Web":
	if typedInput.Web != nil {
		web := *typedInput.Web
		endpoints.Web = &web
	}

	// No error
	return nil
}

// AssignProperties_From_Endpoints_STATUS populates our Endpoints_STATUS from the provided source Endpoints_STATUS
func (endpoints *Endpoints_STATUS) AssignProperties_From_Endpoints_STATUS(source *storage.Endpoints_STATUS) error {

	// Blob
	endpoints.Blob = genruntime.ClonePointerToString(source.Blob)

	// Dfs
	endpoints.Dfs = genruntime.ClonePointerToString(source.Dfs)

	// File
	endpoints.File = genruntime.ClonePointerToString(source.File)

	// InternetEndpoints
	if source.InternetEndpoints != nil {
		var internetEndpoint StorageAccountInternetEndpoints_STATUS
		err := internetEndpoint.AssignProperties_From_StorageAccountInternetEndpoints_STATUS(source.InternetEndpoints)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StorageAccountInternetEndpoints_STATUS() to populate field InternetEndpoints")
		}
		endpoints.InternetEndpoints = &internetEndpoint
	} else {
		endpoints.InternetEndpoints = nil
	}

	// MicrosoftEndpoints
	if source.MicrosoftEndpoints != nil {
		var microsoftEndpoint StorageAccountMicrosoftEndpoints_STATUS
		err := microsoftEndpoint.AssignProperties_From_StorageAccountMicrosoftEndpoints_STATUS(source.MicrosoftEndpoints)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StorageAccountMicrosoftEndpoints_STATUS() to populate field MicrosoftEndpoints")
		}
		endpoints.MicrosoftEndpoints = &microsoftEndpoint
	} else {
		endpoints.MicrosoftEndpoints = nil
	}

	// Queue
	endpoints.Queue = genruntime.ClonePointerToString(source.Queue)

	// Table
	endpoints.Table = genruntime.ClonePointerToString(source.Table)

	// Web
	endpoints.Web = genruntime.ClonePointerToString(source.Web)

	// No error
	return nil
}

// AssignProperties_To_Endpoints_STATUS populates the provided destination Endpoints_STATUS from our Endpoints_STATUS
func (endpoints *Endpoints_STATUS) AssignProperties_To_Endpoints_STATUS(destination *storage.Endpoints_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Blob
	destination.Blob = genruntime.ClonePointerToString(endpoints.Blob)

	// Dfs
	destination.Dfs = genruntime.ClonePointerToString(endpoints.Dfs)

	// File
	destination.File = genruntime.ClonePointerToString(endpoints.File)

	// InternetEndpoints
	if endpoints.InternetEndpoints != nil {
		var internetEndpoint storage.StorageAccountInternetEndpoints_STATUS
		err := endpoints.InternetEndpoints.AssignProperties_To_StorageAccountInternetEndpoints_STATUS(&internetEndpoint)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StorageAccountInternetEndpoints_STATUS() to populate field InternetEndpoints")
		}
		destination.InternetEndpoints = &internetEndpoint
	} else {
		destination.InternetEndpoints = nil
	}

	// MicrosoftEndpoints
	if endpoints.MicrosoftEndpoints != nil {
		var microsoftEndpoint storage.StorageAccountMicrosoftEndpoints_STATUS
		err := endpoints.MicrosoftEndpoints.AssignProperties_To_StorageAccountMicrosoftEndpoints_STATUS(&microsoftEndpoint)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StorageAccountMicrosoftEndpoints_STATUS() to populate field MicrosoftEndpoints")
		}
		destination.MicrosoftEndpoints = &microsoftEndpoint
	} else {
		destination.MicrosoftEndpoints = nil
	}

	// Queue
	destination.Queue = genruntime.ClonePointerToString(endpoints.Queue)

	// Table
	destination.Table = genruntime.ClonePointerToString(endpoints.Table)

	// Web
	destination.Web = genruntime.ClonePointerToString(endpoints.Web)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// The complex type of the extended location.
type ExtendedLocation struct {
	// Name: The name of the extended location.
	Name *string `json:"name,omitempty"`

	// Type: The type of the extended location.
	Type *ExtendedLocationType `json:"type,omitempty"`
}

var _ genruntime.ARMTransformer = &ExtendedLocation{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (location *ExtendedLocation) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if location == nil {
		return nil, nil
	}
	result := &arm.ExtendedLocation{}

	// Set property "Name":
	if location.Name != nil {
		name := *location.Name
		result.Name = &name
	}

	// Set property "Type":
	if location.Type != nil {
		var temp string
		temp = string(*location.Type)
		typeVar := arm.ExtendedLocationType(temp)
		result.Type = &typeVar
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (location *ExtendedLocation) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ExtendedLocation{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (location *ExtendedLocation) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ExtendedLocation)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ExtendedLocation, got %T", armInput)
	}

	// Set property "Name":
	if typedInput.Name != nil {
		name := *typedInput.Name
		location.Name = &name
	}

	// Set property "Type":
	if typedInput.Type != nil {
		var temp string
		temp = string(*typedInput.Type)
		typeVar := ExtendedLocationType(temp)
		location.Type = &typeVar
	}

	// No error
	return nil
}

// AssignProperties_From_ExtendedLocation populates our ExtendedLocation from the provided source ExtendedLocation
func (location *ExtendedLocation) AssignProperties_From_ExtendedLocation(source *storage.ExtendedLocation) error {

	// Name
	location.Name = genruntime.ClonePointerToString(source.Name)

	// Type
	if source.Type != nil {
		typeVar := *source.Type
		typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_Values)
		location.Type = &typeTemp
	} else {
		location.Type = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ExtendedLocation populates the provided destination ExtendedLocation from our ExtendedLocation
func (location *ExtendedLocation) AssignProperties_To_ExtendedLocation(destination *storage.ExtendedLocation) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Name
	destination.Name = genruntime.ClonePointerToString(location.Name)

	// Type
	if location.Type != nil {
		typeVar := string(*location.Type)
		destination.Type = &typeVar
	} else {
		destination.Type = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// The complex type of the extended location.
type ExtendedLocation_STATUS struct {
	// Name: The name of the extended location.
	Name *string `json:"name,omitempty"`

	// Type: The type of the extended location.
	Type *ExtendedLocationType_STATUS `json:"type,omitempty"`
}

var _ genruntime.FromARMConverter = &ExtendedLocation_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (location *ExtendedLocation_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ExtendedLocation_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (location *ExtendedLocation_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ExtendedLocation_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ExtendedLocation_STATUS, got %T", armInput)
	}

	// Set property "Name":
	if typedInput.Name != nil {
		name := *typedInput.Name
		location.Name = &name
	}

	// Set property "Type":
	if typedInput.Type != nil {
		var temp string
		temp = string(*typedInput.Type)
		typeVar := ExtendedLocationType_STATUS(temp)
		location.Type = &typeVar
	}

	// No error
	return nil
}

// AssignProperties_From_ExtendedLocation_STATUS populates our ExtendedLocation_STATUS from the provided source ExtendedLocation_STATUS
func (location *ExtendedLocation_STATUS) AssignProperties_From_ExtendedLocation_STATUS(source *storage.ExtendedLocation_STATUS) error {

	// Name
	location.Name = genruntime.ClonePointerToString(source.Name)

	// Type
	if source.Type != nil {
		typeVar := *source.Type
		typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_STATUS_Values)
		location.Type = &typeTemp
	} else {
		location.Type = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ExtendedLocation_STATUS populates the provided destination ExtendedLocation_STATUS from our ExtendedLocation_STATUS
func (location *ExtendedLocation_STATUS) AssignProperties_To_ExtendedLocation_STATUS(destination *storage.ExtendedLocation_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Name
	destination.Name = genruntime.ClonePointerToString(location.Name)

	// Type
	if location.Type != nil {
		typeVar := string(*location.Type)
		destination.Type = &typeVar
	} else {
		destination.Type = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// 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: A boolean flag which indicates whether or not account failover is supported for the account.
	CanFailover *bool `json:"canFailover,omitempty"`

	// LastSyncTime: All primary writes preceding this UTC date/time value are guaranteed to be available for read operations.
	// Primary writes following this point in time may or may not be available for reads. Element may be default value if value
	// of LastSyncTime is not available, this can happen if secondary is offline or we are in bootstrap.
	LastSyncTime *string `json:"lastSyncTime,omitempty"`

	// Status: The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is
	// active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary
	// location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the
	// secondary location is temporarily unavailable.
	Status *GeoReplicationStats_Status_STATUS `json:"status,omitempty"`
}

var _ genruntime.FromARMConverter = &GeoReplicationStats_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (stats *GeoReplicationStats_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.GeoReplicationStats_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (stats *GeoReplicationStats_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.GeoReplicationStats_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.GeoReplicationStats_STATUS, got %T", armInput)
	}

	// Set property "CanFailover":
	if typedInput.CanFailover != nil {
		canFailover := *typedInput.CanFailover
		stats.CanFailover = &canFailover
	}

	// Set property "LastSyncTime":
	if typedInput.LastSyncTime != nil {
		lastSyncTime := *typedInput.LastSyncTime
		stats.LastSyncTime = &lastSyncTime
	}

	// Set property "Status":
	if typedInput.Status != nil {
		var temp string
		temp = string(*typedInput.Status)
		status := GeoReplicationStats_Status_STATUS(temp)
		stats.Status = &status
	}

	// No error
	return nil
}

// AssignProperties_From_GeoReplicationStats_STATUS populates our GeoReplicationStats_STATUS from the provided source GeoReplicationStats_STATUS
func (stats *GeoReplicationStats_STATUS) AssignProperties_From_GeoReplicationStats_STATUS(source *storage.GeoReplicationStats_STATUS) error {

	// CanFailover
	if source.CanFailover != nil {
		canFailover := *source.CanFailover
		stats.CanFailover = &canFailover
	} else {
		stats.CanFailover = nil
	}

	// LastSyncTime
	stats.LastSyncTime = genruntime.ClonePointerToString(source.LastSyncTime)

	// Status
	if source.Status != nil {
		status := *source.Status
		statusTemp := genruntime.ToEnum(status, geoReplicationStats_Status_STATUS_Values)
		stats.Status = &statusTemp
	} else {
		stats.Status = nil
	}

	// No error
	return nil
}

// AssignProperties_To_GeoReplicationStats_STATUS populates the provided destination GeoReplicationStats_STATUS from our GeoReplicationStats_STATUS
func (stats *GeoReplicationStats_STATUS) AssignProperties_To_GeoReplicationStats_STATUS(destination *storage.GeoReplicationStats_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// CanFailover
	if stats.CanFailover != nil {
		canFailover := *stats.CanFailover
		destination.CanFailover = &canFailover
	} else {
		destination.CanFailover = nil
	}

	// LastSyncTime
	destination.LastSyncTime = genruntime.ClonePointerToString(stats.LastSyncTime)

	// Status
	if stats.Status != nil {
		status := string(*stats.Status)
		destination.Status = &status
	} else {
		destination.Status = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Identity for the resource.
type Identity struct {
	// +kubebuilder:validation:Required
	// Type: The identity type.
	Type *Identity_Type `json:"type,omitempty"`

	// UserAssignedIdentities: Gets or sets a list of key value pairs that describe the set of User Assigned identities that
	// will be used with this storage account. The key is the ARM resource identifier of the identity. Only 1 User Assigned
	// identity is permitted here.
	UserAssignedIdentities []UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"`
}

var _ genruntime.ARMTransformer = &Identity{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (identity *Identity) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if identity == nil {
		return nil, nil
	}
	result := &arm.Identity{}

	// Set property "Type":
	if identity.Type != nil {
		var temp string
		temp = string(*identity.Type)
		typeVar := arm.Identity_Type(temp)
		result.Type = &typeVar
	}

	// Set property "UserAssignedIdentities":
	result.UserAssignedIdentities = make(map[string]arm.UserAssignedIdentityDetails, len(identity.UserAssignedIdentities))
	for _, ident := range identity.UserAssignedIdentities {
		identARMID, err := resolved.ResolvedReferences.Lookup(ident.Reference)
		if err != nil {
			return nil, err
		}
		key := identARMID
		result.UserAssignedIdentities[key] = arm.UserAssignedIdentityDetails{}
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (identity *Identity) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.Identity{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (identity *Identity) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.Identity)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Identity, got %T", armInput)
	}

	// Set property "Type":
	if typedInput.Type != nil {
		var temp string
		temp = string(*typedInput.Type)
		typeVar := Identity_Type(temp)
		identity.Type = &typeVar
	}

	// no assignment for property "UserAssignedIdentities"

	// No error
	return nil
}

// AssignProperties_From_Identity populates our Identity from the provided source Identity
func (identity *Identity) AssignProperties_From_Identity(source *storage.Identity) error {

	// Type
	if source.Type != nil {
		typeVar := *source.Type
		typeTemp := genruntime.ToEnum(typeVar, identity_Type_Values)
		identity.Type = &typeTemp
	} else {
		identity.Type = nil
	}

	// UserAssignedIdentities
	if source.UserAssignedIdentities != nil {
		userAssignedIdentityList := make([]UserAssignedIdentityDetails, len(source.UserAssignedIdentities))
		for userAssignedIdentityIndex, userAssignedIdentityItem := range source.UserAssignedIdentities {
			var userAssignedIdentity UserAssignedIdentityDetails
			err := userAssignedIdentity.AssignProperties_From_UserAssignedIdentityDetails(&userAssignedIdentityItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_UserAssignedIdentityDetails() to populate field UserAssignedIdentities")
			}
			userAssignedIdentityList[userAssignedIdentityIndex] = userAssignedIdentity
		}
		identity.UserAssignedIdentities = userAssignedIdentityList
	} else {
		identity.UserAssignedIdentities = nil
	}

	// No error
	return nil
}

// AssignProperties_To_Identity populates the provided destination Identity from our Identity
func (identity *Identity) AssignProperties_To_Identity(destination *storage.Identity) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Type
	if identity.Type != nil {
		typeVar := string(*identity.Type)
		destination.Type = &typeVar
	} else {
		destination.Type = nil
	}

	// UserAssignedIdentities
	if identity.UserAssignedIdentities != nil {
		userAssignedIdentityList := make([]storage.UserAssignedIdentityDetails, len(identity.UserAssignedIdentities))
		for userAssignedIdentityIndex, userAssignedIdentityItem := range identity.UserAssignedIdentities {
			var userAssignedIdentity storage.UserAssignedIdentityDetails
			err := userAssignedIdentityItem.AssignProperties_To_UserAssignedIdentityDetails(&userAssignedIdentity)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_UserAssignedIdentityDetails() to populate field UserAssignedIdentities")
			}
			userAssignedIdentityList[userAssignedIdentityIndex] = userAssignedIdentity
		}
		destination.UserAssignedIdentities = userAssignedIdentityList
	} else {
		destination.UserAssignedIdentities = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Identity for the resource.
type Identity_STATUS struct {
	// PrincipalId: The principal ID of resource identity.
	PrincipalId *string `json:"principalId,omitempty"`

	// TenantId: The tenant ID of resource.
	TenantId *string `json:"tenantId,omitempty"`

	// Type: The identity type.
	Type *Identity_Type_STATUS `json:"type,omitempty"`

	// UserAssignedIdentities: Gets or sets a list of key value pairs that describe the set of User Assigned identities that
	// will be used with this storage account. The key is the ARM resource identifier of the identity. Only 1 User Assigned
	// identity is permitted here.
	UserAssignedIdentities map[string]UserAssignedIdentity_STATUS `json:"userAssignedIdentities,omitempty"`
}

var _ genruntime.FromARMConverter = &Identity_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (identity *Identity_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.Identity_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (identity *Identity_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.Identity_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Identity_STATUS, got %T", armInput)
	}

	// Set property "PrincipalId":
	if typedInput.PrincipalId != nil {
		principalId := *typedInput.PrincipalId
		identity.PrincipalId = &principalId
	}

	// Set property "TenantId":
	if typedInput.TenantId != nil {
		tenantId := *typedInput.TenantId
		identity.TenantId = &tenantId
	}

	// Set property "Type":
	if typedInput.Type != nil {
		var temp string
		temp = string(*typedInput.Type)
		typeVar := Identity_Type_STATUS(temp)
		identity.Type = &typeVar
	}

	// Set property "UserAssignedIdentities":
	if typedInput.UserAssignedIdentities != nil {
		identity.UserAssignedIdentities = make(map[string]UserAssignedIdentity_STATUS, len(typedInput.UserAssignedIdentities))
		for key, value := range typedInput.UserAssignedIdentities {
			var value1 UserAssignedIdentity_STATUS
			err := value1.PopulateFromARM(owner, value)
			if err != nil {
				return err
			}
			identity.UserAssignedIdentities[key] = value1
		}
	}

	// No error
	return nil
}

// AssignProperties_From_Identity_STATUS populates our Identity_STATUS from the provided source Identity_STATUS
func (identity *Identity_STATUS) AssignProperties_From_Identity_STATUS(source *storage.Identity_STATUS) error {

	// PrincipalId
	identity.PrincipalId = genruntime.ClonePointerToString(source.PrincipalId)

	// TenantId
	identity.TenantId = genruntime.ClonePointerToString(source.TenantId)

	// Type
	if source.Type != nil {
		typeVar := *source.Type
		typeTemp := genruntime.ToEnum(typeVar, identity_Type_STATUS_Values)
		identity.Type = &typeTemp
	} else {
		identity.Type = nil
	}

	// UserAssignedIdentities
	if source.UserAssignedIdentities != nil {
		userAssignedIdentityMap := make(map[string]UserAssignedIdentity_STATUS, len(source.UserAssignedIdentities))
		for userAssignedIdentityKey, userAssignedIdentityValue := range source.UserAssignedIdentities {
			var userAssignedIdentity UserAssignedIdentity_STATUS
			err := userAssignedIdentity.AssignProperties_From_UserAssignedIdentity_STATUS(&userAssignedIdentityValue)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_UserAssignedIdentity_STATUS() to populate field UserAssignedIdentities")
			}
			userAssignedIdentityMap[userAssignedIdentityKey] = userAssignedIdentity
		}
		identity.UserAssignedIdentities = userAssignedIdentityMap
	} else {
		identity.UserAssignedIdentities = nil
	}

	// No error
	return nil
}

// AssignProperties_To_Identity_STATUS populates the provided destination Identity_STATUS from our Identity_STATUS
func (identity *Identity_STATUS) AssignProperties_To_Identity_STATUS(destination *storage.Identity_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// PrincipalId
	destination.PrincipalId = genruntime.ClonePointerToString(identity.PrincipalId)

	// TenantId
	destination.TenantId = genruntime.ClonePointerToString(identity.TenantId)

	// Type
	if identity.Type != nil {
		typeVar := string(*identity.Type)
		destination.Type = &typeVar
	} else {
		destination.Type = nil
	}

	// UserAssignedIdentities
	if identity.UserAssignedIdentities != nil {
		userAssignedIdentityMap := make(map[string]storage.UserAssignedIdentity_STATUS, len(identity.UserAssignedIdentities))
		for userAssignedIdentityKey, userAssignedIdentityValue := range identity.UserAssignedIdentities {
			var userAssignedIdentity storage.UserAssignedIdentity_STATUS
			err := userAssignedIdentityValue.AssignProperties_To_UserAssignedIdentity_STATUS(&userAssignedIdentity)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_UserAssignedIdentity_STATUS() to populate field UserAssignedIdentities")
			}
			userAssignedIdentityMap[userAssignedIdentityKey] = userAssignedIdentity
		}
		destination.UserAssignedIdentities = userAssignedIdentityMap
	} else {
		destination.UserAssignedIdentities = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Storage account keys creation time.
type KeyCreationTime_STATUS struct {
	Key1 *string `json:"key1,omitempty"`
	Key2 *string `json:"key2,omitempty"`
}

var _ genruntime.FromARMConverter = &KeyCreationTime_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (time *KeyCreationTime_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.KeyCreationTime_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (time *KeyCreationTime_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.KeyCreationTime_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.KeyCreationTime_STATUS, got %T", armInput)
	}

	// Set property "Key1":
	if typedInput.Key1 != nil {
		key1 := *typedInput.Key1
		time.Key1 = &key1
	}

	// Set property "Key2":
	if typedInput.Key2 != nil {
		key2 := *typedInput.Key2
		time.Key2 = &key2
	}

	// No error
	return nil
}

// AssignProperties_From_KeyCreationTime_STATUS populates our KeyCreationTime_STATUS from the provided source KeyCreationTime_STATUS
func (time *KeyCreationTime_STATUS) AssignProperties_From_KeyCreationTime_STATUS(source *storage.KeyCreationTime_STATUS) error {

	// Key1
	time.Key1 = genruntime.ClonePointerToString(source.Key1)

	// Key2
	time.Key2 = genruntime.ClonePointerToString(source.Key2)

	// No error
	return nil
}

// AssignProperties_To_KeyCreationTime_STATUS populates the provided destination KeyCreationTime_STATUS from our KeyCreationTime_STATUS
func (time *KeyCreationTime_STATUS) AssignProperties_To_KeyCreationTime_STATUS(destination *storage.KeyCreationTime_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Key1
	destination.Key1 = genruntime.ClonePointerToString(time.Key1)

	// Key2
	destination.Key2 = genruntime.ClonePointerToString(time.Key2)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// KeyPolicy assigned to the storage account.
type KeyPolicy struct {
	// +kubebuilder:validation:Required
	// KeyExpirationPeriodInDays: The key expiration period in days.
	KeyExpirationPeriodInDays *int `json:"keyExpirationPeriodInDays,omitempty"`
}

var _ genruntime.ARMTransformer = &KeyPolicy{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (policy *KeyPolicy) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if policy == nil {
		return nil, nil
	}
	result := &arm.KeyPolicy{}

	// Set property "KeyExpirationPeriodInDays":
	if policy.KeyExpirationPeriodInDays != nil {
		keyExpirationPeriodInDays := *policy.KeyExpirationPeriodInDays
		result.KeyExpirationPeriodInDays = &keyExpirationPeriodInDays
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (policy *KeyPolicy) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.KeyPolicy{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (policy *KeyPolicy) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.KeyPolicy)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.KeyPolicy, got %T", armInput)
	}

	// Set property "KeyExpirationPeriodInDays":
	if typedInput.KeyExpirationPeriodInDays != nil {
		keyExpirationPeriodInDays := *typedInput.KeyExpirationPeriodInDays
		policy.KeyExpirationPeriodInDays = &keyExpirationPeriodInDays
	}

	// No error
	return nil
}

// AssignProperties_From_KeyPolicy populates our KeyPolicy from the provided source KeyPolicy
func (policy *KeyPolicy) AssignProperties_From_KeyPolicy(source *storage.KeyPolicy) error {

	// KeyExpirationPeriodInDays
	policy.KeyExpirationPeriodInDays = genruntime.ClonePointerToInt(source.KeyExpirationPeriodInDays)

	// No error
	return nil
}

// AssignProperties_To_KeyPolicy populates the provided destination KeyPolicy from our KeyPolicy
func (policy *KeyPolicy) AssignProperties_To_KeyPolicy(destination *storage.KeyPolicy) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// KeyExpirationPeriodInDays
	destination.KeyExpirationPeriodInDays = genruntime.ClonePointerToInt(policy.KeyExpirationPeriodInDays)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// KeyPolicy assigned to the storage account.
type KeyPolicy_STATUS struct {
	// KeyExpirationPeriodInDays: The key expiration period in days.
	KeyExpirationPeriodInDays *int `json:"keyExpirationPeriodInDays,omitempty"`
}

var _ genruntime.FromARMConverter = &KeyPolicy_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (policy *KeyPolicy_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.KeyPolicy_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (policy *KeyPolicy_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.KeyPolicy_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.KeyPolicy_STATUS, got %T", armInput)
	}

	// Set property "KeyExpirationPeriodInDays":
	if typedInput.KeyExpirationPeriodInDays != nil {
		keyExpirationPeriodInDays := *typedInput.KeyExpirationPeriodInDays
		policy.KeyExpirationPeriodInDays = &keyExpirationPeriodInDays
	}

	// No error
	return nil
}

// AssignProperties_From_KeyPolicy_STATUS populates our KeyPolicy_STATUS from the provided source KeyPolicy_STATUS
func (policy *KeyPolicy_STATUS) AssignProperties_From_KeyPolicy_STATUS(source *storage.KeyPolicy_STATUS) error {

	// KeyExpirationPeriodInDays
	policy.KeyExpirationPeriodInDays = genruntime.ClonePointerToInt(source.KeyExpirationPeriodInDays)

	// No error
	return nil
}

// AssignProperties_To_KeyPolicy_STATUS populates the provided destination KeyPolicy_STATUS from our KeyPolicy_STATUS
func (policy *KeyPolicy_STATUS) AssignProperties_To_KeyPolicy_STATUS(destination *storage.KeyPolicy_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// KeyExpirationPeriodInDays
	destination.KeyExpirationPeriodInDays = genruntime.ClonePointerToInt(policy.KeyExpirationPeriodInDays)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Network rule set
type NetworkRuleSet struct {
	// Bypass: Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of
	// Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to bypass none of those traffics.
	Bypass *string `json:"bypass,omitempty"`

	// +kubebuilder:validation:Required
	// DefaultAction: Specifies the default action of allow or deny when no other rules match.
	DefaultAction *NetworkRuleSet_DefaultAction `json:"defaultAction,omitempty"`

	// IpRules: Sets the IP ACL rules
	IpRules []IPRule `json:"ipRules,omitempty"`

	// ResourceAccessRules: Sets the resource access rules
	ResourceAccessRules []ResourceAccessRule `json:"resourceAccessRules,omitempty"`

	// VirtualNetworkRules: Sets the virtual network rules
	VirtualNetworkRules []VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
}

var _ genruntime.ARMTransformer = &NetworkRuleSet{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (ruleSet *NetworkRuleSet) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if ruleSet == nil {
		return nil, nil
	}
	result := &arm.NetworkRuleSet{}

	// Set property "Bypass":
	if ruleSet.Bypass != nil {
		bypass := *ruleSet.Bypass
		result.Bypass = &bypass
	}

	// Set property "DefaultAction":
	if ruleSet.DefaultAction != nil {
		var temp string
		temp = string(*ruleSet.DefaultAction)
		defaultAction := arm.NetworkRuleSet_DefaultAction(temp)
		result.DefaultAction = &defaultAction
	}

	// Set property "IpRules":
	for _, item := range ruleSet.IpRules {
		item_ARM, err := item.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		result.IpRules = append(result.IpRules, *item_ARM.(*arm.IPRule))
	}

	// Set property "ResourceAccessRules":
	for _, item := range ruleSet.ResourceAccessRules {
		item_ARM, err := item.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		result.ResourceAccessRules = append(result.ResourceAccessRules, *item_ARM.(*arm.ResourceAccessRule))
	}

	// Set property "VirtualNetworkRules":
	for _, item := range ruleSet.VirtualNetworkRules {
		item_ARM, err := item.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		result.VirtualNetworkRules = append(result.VirtualNetworkRules, *item_ARM.(*arm.VirtualNetworkRule))
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (ruleSet *NetworkRuleSet) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.NetworkRuleSet{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (ruleSet *NetworkRuleSet) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.NetworkRuleSet)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.NetworkRuleSet, got %T", armInput)
	}

	// Set property "Bypass":
	if typedInput.Bypass != nil {
		bypass := *typedInput.Bypass
		ruleSet.Bypass = &bypass
	}

	// Set property "DefaultAction":
	if typedInput.DefaultAction != nil {
		var temp string
		temp = string(*typedInput.DefaultAction)
		defaultAction := NetworkRuleSet_DefaultAction(temp)
		ruleSet.DefaultAction = &defaultAction
	}

	// Set property "IpRules":
	for _, item := range typedInput.IpRules {
		var item1 IPRule
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		ruleSet.IpRules = append(ruleSet.IpRules, item1)
	}

	// Set property "ResourceAccessRules":
	for _, item := range typedInput.ResourceAccessRules {
		var item1 ResourceAccessRule
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		ruleSet.ResourceAccessRules = append(ruleSet.ResourceAccessRules, item1)
	}

	// Set property "VirtualNetworkRules":
	for _, item := range typedInput.VirtualNetworkRules {
		var item1 VirtualNetworkRule
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		ruleSet.VirtualNetworkRules = append(ruleSet.VirtualNetworkRules, item1)
	}

	// No error
	return nil
}

// AssignProperties_From_NetworkRuleSet populates our NetworkRuleSet from the provided source NetworkRuleSet
func (ruleSet *NetworkRuleSet) AssignProperties_From_NetworkRuleSet(source *storage.NetworkRuleSet) error {

	// Bypass
	ruleSet.Bypass = genruntime.ClonePointerToString(source.Bypass)

	// DefaultAction
	if source.DefaultAction != nil {
		defaultAction := *source.DefaultAction
		defaultActionTemp := genruntime.ToEnum(defaultAction, networkRuleSet_DefaultAction_Values)
		ruleSet.DefaultAction = &defaultActionTemp
	} else {
		ruleSet.DefaultAction = nil
	}

	// IpRules
	if source.IpRules != nil {
		ipRuleList := make([]IPRule, len(source.IpRules))
		for ipRuleIndex, ipRuleItem := range source.IpRules {
			var ipRule IPRule
			err := ipRule.AssignProperties_From_IPRule(&ipRuleItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_IPRule() to populate field IpRules")
			}
			ipRuleList[ipRuleIndex] = ipRule
		}
		ruleSet.IpRules = ipRuleList
	} else {
		ruleSet.IpRules = nil
	}

	// ResourceAccessRules
	if source.ResourceAccessRules != nil {
		resourceAccessRuleList := make([]ResourceAccessRule, len(source.ResourceAccessRules))
		for resourceAccessRuleIndex, resourceAccessRuleItem := range source.ResourceAccessRules {
			var resourceAccessRule ResourceAccessRule
			err := resourceAccessRule.AssignProperties_From_ResourceAccessRule(&resourceAccessRuleItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ResourceAccessRule() to populate field ResourceAccessRules")
			}
			resourceAccessRuleList[resourceAccessRuleIndex] = resourceAccessRule
		}
		ruleSet.ResourceAccessRules = resourceAccessRuleList
	} else {
		ruleSet.ResourceAccessRules = nil
	}

	// VirtualNetworkRules
	if source.VirtualNetworkRules != nil {
		virtualNetworkRuleList := make([]VirtualNetworkRule, len(source.VirtualNetworkRules))
		for virtualNetworkRuleIndex, virtualNetworkRuleItem := range source.VirtualNetworkRules {
			var virtualNetworkRule VirtualNetworkRule
			err := virtualNetworkRule.AssignProperties_From_VirtualNetworkRule(&virtualNetworkRuleItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_VirtualNetworkRule() to populate field VirtualNetworkRules")
			}
			virtualNetworkRuleList[virtualNetworkRuleIndex] = virtualNetworkRule
		}
		ruleSet.VirtualNetworkRules = virtualNetworkRuleList
	} else {
		ruleSet.VirtualNetworkRules = nil
	}

	// No error
	return nil
}

// AssignProperties_To_NetworkRuleSet populates the provided destination NetworkRuleSet from our NetworkRuleSet
func (ruleSet *NetworkRuleSet) AssignProperties_To_NetworkRuleSet(destination *storage.NetworkRuleSet) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Bypass
	destination.Bypass = genruntime.ClonePointerToString(ruleSet.Bypass)

	// DefaultAction
	if ruleSet.DefaultAction != nil {
		defaultAction := string(*ruleSet.DefaultAction)
		destination.DefaultAction = &defaultAction
	} else {
		destination.DefaultAction = nil
	}

	// IpRules
	if ruleSet.IpRules != nil {
		ipRuleList := make([]storage.IPRule, len(ruleSet.IpRules))
		for ipRuleIndex, ipRuleItem := range ruleSet.IpRules {
			var ipRule storage.IPRule
			err := ipRuleItem.AssignProperties_To_IPRule(&ipRule)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_IPRule() to populate field IpRules")
			}
			ipRuleList[ipRuleIndex] = ipRule
		}
		destination.IpRules = ipRuleList
	} else {
		destination.IpRules = nil
	}

	// ResourceAccessRules
	if ruleSet.ResourceAccessRules != nil {
		resourceAccessRuleList := make([]storage.ResourceAccessRule, len(ruleSet.ResourceAccessRules))
		for resourceAccessRuleIndex, resourceAccessRuleItem := range ruleSet.ResourceAccessRules {
			var resourceAccessRule storage.ResourceAccessRule
			err := resourceAccessRuleItem.AssignProperties_To_ResourceAccessRule(&resourceAccessRule)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ResourceAccessRule() to populate field ResourceAccessRules")
			}
			resourceAccessRuleList[resourceAccessRuleIndex] = resourceAccessRule
		}
		destination.ResourceAccessRules = resourceAccessRuleList
	} else {
		destination.ResourceAccessRules = nil
	}

	// VirtualNetworkRules
	if ruleSet.VirtualNetworkRules != nil {
		virtualNetworkRuleList := make([]storage.VirtualNetworkRule, len(ruleSet.VirtualNetworkRules))
		for virtualNetworkRuleIndex, virtualNetworkRuleItem := range ruleSet.VirtualNetworkRules {
			var virtualNetworkRule storage.VirtualNetworkRule
			err := virtualNetworkRuleItem.AssignProperties_To_VirtualNetworkRule(&virtualNetworkRule)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_VirtualNetworkRule() to populate field VirtualNetworkRules")
			}
			virtualNetworkRuleList[virtualNetworkRuleIndex] = virtualNetworkRule
		}
		destination.VirtualNetworkRules = virtualNetworkRuleList
	} else {
		destination.VirtualNetworkRules = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Network rule set
type NetworkRuleSet_STATUS struct {
	// Bypass: Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of
	// Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to bypass none of those traffics.
	Bypass *NetworkRuleSet_Bypass_STATUS `json:"bypass,omitempty"`

	// DefaultAction: Specifies the default action of allow or deny when no other rules match.
	DefaultAction *NetworkRuleSet_DefaultAction_STATUS `json:"defaultAction,omitempty"`

	// IpRules: Sets the IP ACL rules
	IpRules []IPRule_STATUS `json:"ipRules,omitempty"`

	// ResourceAccessRules: Sets the resource access rules
	ResourceAccessRules []ResourceAccessRule_STATUS `json:"resourceAccessRules,omitempty"`

	// VirtualNetworkRules: Sets the virtual network rules
	VirtualNetworkRules []VirtualNetworkRule_STATUS `json:"virtualNetworkRules,omitempty"`
}

var _ genruntime.FromARMConverter = &NetworkRuleSet_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (ruleSet *NetworkRuleSet_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.NetworkRuleSet_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (ruleSet *NetworkRuleSet_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.NetworkRuleSet_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.NetworkRuleSet_STATUS, got %T", armInput)
	}

	// Set property "Bypass":
	if typedInput.Bypass != nil {
		var temp string
		temp = string(*typedInput.Bypass)
		bypass := NetworkRuleSet_Bypass_STATUS(temp)
		ruleSet.Bypass = &bypass
	}

	// Set property "DefaultAction":
	if typedInput.DefaultAction != nil {
		var temp string
		temp = string(*typedInput.DefaultAction)
		defaultAction := NetworkRuleSet_DefaultAction_STATUS(temp)
		ruleSet.DefaultAction = &defaultAction
	}

	// Set property "IpRules":
	for _, item := range typedInput.IpRules {
		var item1 IPRule_STATUS
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		ruleSet.IpRules = append(ruleSet.IpRules, item1)
	}

	// Set property "ResourceAccessRules":
	for _, item := range typedInput.ResourceAccessRules {
		var item1 ResourceAccessRule_STATUS
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		ruleSet.ResourceAccessRules = append(ruleSet.ResourceAccessRules, item1)
	}

	// Set property "VirtualNetworkRules":
	for _, item := range typedInput.VirtualNetworkRules {
		var item1 VirtualNetworkRule_STATUS
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		ruleSet.VirtualNetworkRules = append(ruleSet.VirtualNetworkRules, item1)
	}

	// No error
	return nil
}

// AssignProperties_From_NetworkRuleSet_STATUS populates our NetworkRuleSet_STATUS from the provided source NetworkRuleSet_STATUS
func (ruleSet *NetworkRuleSet_STATUS) AssignProperties_From_NetworkRuleSet_STATUS(source *storage.NetworkRuleSet_STATUS) error {

	// Bypass
	if source.Bypass != nil {
		bypass := *source.Bypass
		bypassTemp := genruntime.ToEnum(bypass, networkRuleSet_Bypass_STATUS_Values)
		ruleSet.Bypass = &bypassTemp
	} else {
		ruleSet.Bypass = nil
	}

	// DefaultAction
	if source.DefaultAction != nil {
		defaultAction := *source.DefaultAction
		defaultActionTemp := genruntime.ToEnum(defaultAction, networkRuleSet_DefaultAction_STATUS_Values)
		ruleSet.DefaultAction = &defaultActionTemp
	} else {
		ruleSet.DefaultAction = nil
	}

	// IpRules
	if source.IpRules != nil {
		ipRuleList := make([]IPRule_STATUS, len(source.IpRules))
		for ipRuleIndex, ipRuleItem := range source.IpRules {
			var ipRule IPRule_STATUS
			err := ipRule.AssignProperties_From_IPRule_STATUS(&ipRuleItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_IPRule_STATUS() to populate field IpRules")
			}
			ipRuleList[ipRuleIndex] = ipRule
		}
		ruleSet.IpRules = ipRuleList
	} else {
		ruleSet.IpRules = nil
	}

	// ResourceAccessRules
	if source.ResourceAccessRules != nil {
		resourceAccessRuleList := make([]ResourceAccessRule_STATUS, len(source.ResourceAccessRules))
		for resourceAccessRuleIndex, resourceAccessRuleItem := range source.ResourceAccessRules {
			var resourceAccessRule ResourceAccessRule_STATUS
			err := resourceAccessRule.AssignProperties_From_ResourceAccessRule_STATUS(&resourceAccessRuleItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ResourceAccessRule_STATUS() to populate field ResourceAccessRules")
			}
			resourceAccessRuleList[resourceAccessRuleIndex] = resourceAccessRule
		}
		ruleSet.ResourceAccessRules = resourceAccessRuleList
	} else {
		ruleSet.ResourceAccessRules = nil
	}

	// VirtualNetworkRules
	if source.VirtualNetworkRules != nil {
		virtualNetworkRuleList := make([]VirtualNetworkRule_STATUS, len(source.VirtualNetworkRules))
		for virtualNetworkRuleIndex, virtualNetworkRuleItem := range source.VirtualNetworkRules {
			var virtualNetworkRule VirtualNetworkRule_STATUS
			err := virtualNetworkRule.AssignProperties_From_VirtualNetworkRule_STATUS(&virtualNetworkRuleItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_VirtualNetworkRule_STATUS() to populate field VirtualNetworkRules")
			}
			virtualNetworkRuleList[virtualNetworkRuleIndex] = virtualNetworkRule
		}
		ruleSet.VirtualNetworkRules = virtualNetworkRuleList
	} else {
		ruleSet.VirtualNetworkRules = nil
	}

	// No error
	return nil
}

// AssignProperties_To_NetworkRuleSet_STATUS populates the provided destination NetworkRuleSet_STATUS from our NetworkRuleSet_STATUS
func (ruleSet *NetworkRuleSet_STATUS) AssignProperties_To_NetworkRuleSet_STATUS(destination *storage.NetworkRuleSet_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Bypass
	if ruleSet.Bypass != nil {
		bypass := string(*ruleSet.Bypass)
		destination.Bypass = &bypass
	} else {
		destination.Bypass = nil
	}

	// DefaultAction
	if ruleSet.DefaultAction != nil {
		defaultAction := string(*ruleSet.DefaultAction)
		destination.DefaultAction = &defaultAction
	} else {
		destination.DefaultAction = nil
	}

	// IpRules
	if ruleSet.IpRules != nil {
		ipRuleList := make([]storage.IPRule_STATUS, len(ruleSet.IpRules))
		for ipRuleIndex, ipRuleItem := range ruleSet.IpRules {
			var ipRule storage.IPRule_STATUS
			err := ipRuleItem.AssignProperties_To_IPRule_STATUS(&ipRule)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_IPRule_STATUS() to populate field IpRules")
			}
			ipRuleList[ipRuleIndex] = ipRule
		}
		destination.IpRules = ipRuleList
	} else {
		destination.IpRules = nil
	}

	// ResourceAccessRules
	if ruleSet.ResourceAccessRules != nil {
		resourceAccessRuleList := make([]storage.ResourceAccessRule_STATUS, len(ruleSet.ResourceAccessRules))
		for resourceAccessRuleIndex, resourceAccessRuleItem := range ruleSet.ResourceAccessRules {
			var resourceAccessRule storage.ResourceAccessRule_STATUS
			err := resourceAccessRuleItem.AssignProperties_To_ResourceAccessRule_STATUS(&resourceAccessRule)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ResourceAccessRule_STATUS() to populate field ResourceAccessRules")
			}
			resourceAccessRuleList[resourceAccessRuleIndex] = resourceAccessRule
		}
		destination.ResourceAccessRules = resourceAccessRuleList
	} else {
		destination.ResourceAccessRules = nil
	}

	// VirtualNetworkRules
	if ruleSet.VirtualNetworkRules != nil {
		virtualNetworkRuleList := make([]storage.VirtualNetworkRule_STATUS, len(ruleSet.VirtualNetworkRules))
		for virtualNetworkRuleIndex, virtualNetworkRuleItem := range ruleSet.VirtualNetworkRules {
			var virtualNetworkRule storage.VirtualNetworkRule_STATUS
			err := virtualNetworkRuleItem.AssignProperties_To_VirtualNetworkRule_STATUS(&virtualNetworkRule)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_VirtualNetworkRule_STATUS() to populate field VirtualNetworkRules")
			}
			virtualNetworkRuleList[virtualNetworkRuleIndex] = virtualNetworkRule
		}
		destination.VirtualNetworkRules = virtualNetworkRuleList
	} else {
		destination.VirtualNetworkRules = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// The Private Endpoint Connection resource.
type PrivateEndpointConnection_STATUS struct {
	// Id: Fully qualified resource ID for the resource. Ex -
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	Id *string `json:"id,omitempty"`
}

var _ genruntime.FromARMConverter = &PrivateEndpointConnection_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (connection *PrivateEndpointConnection_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.PrivateEndpointConnection_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (connection *PrivateEndpointConnection_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.PrivateEndpointConnection_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.PrivateEndpointConnection_STATUS, got %T", armInput)
	}

	// Set property "Id":
	if typedInput.Id != nil {
		id := *typedInput.Id
		connection.Id = &id
	}

	// No error
	return nil
}

// AssignProperties_From_PrivateEndpointConnection_STATUS populates our PrivateEndpointConnection_STATUS from the provided source PrivateEndpointConnection_STATUS
func (connection *PrivateEndpointConnection_STATUS) AssignProperties_From_PrivateEndpointConnection_STATUS(source *storage.PrivateEndpointConnection_STATUS) error {

	// Id
	connection.Id = genruntime.ClonePointerToString(source.Id)

	// No error
	return nil
}

// AssignProperties_To_PrivateEndpointConnection_STATUS populates the provided destination PrivateEndpointConnection_STATUS from our PrivateEndpointConnection_STATUS
func (connection *PrivateEndpointConnection_STATUS) AssignProperties_To_PrivateEndpointConnection_STATUS(destination *storage.PrivateEndpointConnection_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Id
	destination.Id = genruntime.ClonePointerToString(connection.Id)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// 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 {
	// PublishInternetEndpoints: A boolean flag which indicates whether internet routing storage endpoints are to be published
	PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty"`

	// PublishMicrosoftEndpoints: A boolean flag which indicates whether microsoft routing storage endpoints are to be published
	PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty"`

	// RoutingChoice: Routing Choice defines the kind of network routing opted by the user.
	RoutingChoice *RoutingPreference_RoutingChoice `json:"routingChoice,omitempty"`
}

var _ genruntime.ARMTransformer = &RoutingPreference{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (preference *RoutingPreference) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if preference == nil {
		return nil, nil
	}
	result := &arm.RoutingPreference{}

	// Set property "PublishInternetEndpoints":
	if preference.PublishInternetEndpoints != nil {
		publishInternetEndpoints := *preference.PublishInternetEndpoints
		result.PublishInternetEndpoints = &publishInternetEndpoints
	}

	// Set property "PublishMicrosoftEndpoints":
	if preference.PublishMicrosoftEndpoints != nil {
		publishMicrosoftEndpoints := *preference.PublishMicrosoftEndpoints
		result.PublishMicrosoftEndpoints = &publishMicrosoftEndpoints
	}

	// Set property "RoutingChoice":
	if preference.RoutingChoice != nil {
		var temp string
		temp = string(*preference.RoutingChoice)
		routingChoice := arm.RoutingPreference_RoutingChoice(temp)
		result.RoutingChoice = &routingChoice
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (preference *RoutingPreference) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.RoutingPreference{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (preference *RoutingPreference) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.RoutingPreference)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.RoutingPreference, got %T", armInput)
	}

	// Set property "PublishInternetEndpoints":
	if typedInput.PublishInternetEndpoints != nil {
		publishInternetEndpoints := *typedInput.PublishInternetEndpoints
		preference.PublishInternetEndpoints = &publishInternetEndpoints
	}

	// Set property "PublishMicrosoftEndpoints":
	if typedInput.PublishMicrosoftEndpoints != nil {
		publishMicrosoftEndpoints := *typedInput.PublishMicrosoftEndpoints
		preference.PublishMicrosoftEndpoints = &publishMicrosoftEndpoints
	}

	// Set property "RoutingChoice":
	if typedInput.RoutingChoice != nil {
		var temp string
		temp = string(*typedInput.RoutingChoice)
		routingChoice := RoutingPreference_RoutingChoice(temp)
		preference.RoutingChoice = &routingChoice
	}

	// No error
	return nil
}

// AssignProperties_From_RoutingPreference populates our RoutingPreference from the provided source RoutingPreference
func (preference *RoutingPreference) AssignProperties_From_RoutingPreference(source *storage.RoutingPreference) error {

	// PublishInternetEndpoints
	if source.PublishInternetEndpoints != nil {
		publishInternetEndpoint := *source.PublishInternetEndpoints
		preference.PublishInternetEndpoints = &publishInternetEndpoint
	} else {
		preference.PublishInternetEndpoints = nil
	}

	// PublishMicrosoftEndpoints
	if source.PublishMicrosoftEndpoints != nil {
		publishMicrosoftEndpoint := *source.PublishMicrosoftEndpoints
		preference.PublishMicrosoftEndpoints = &publishMicrosoftEndpoint
	} else {
		preference.PublishMicrosoftEndpoints = nil
	}

	// RoutingChoice
	if source.RoutingChoice != nil {
		routingChoice := *source.RoutingChoice
		routingChoiceTemp := genruntime.ToEnum(routingChoice, routingPreference_RoutingChoice_Values)
		preference.RoutingChoice = &routingChoiceTemp
	} else {
		preference.RoutingChoice = nil
	}

	// No error
	return nil
}

// AssignProperties_To_RoutingPreference populates the provided destination RoutingPreference from our RoutingPreference
func (preference *RoutingPreference) AssignProperties_To_RoutingPreference(destination *storage.RoutingPreference) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// PublishInternetEndpoints
	if preference.PublishInternetEndpoints != nil {
		publishInternetEndpoint := *preference.PublishInternetEndpoints
		destination.PublishInternetEndpoints = &publishInternetEndpoint
	} else {
		destination.PublishInternetEndpoints = nil
	}

	// PublishMicrosoftEndpoints
	if preference.PublishMicrosoftEndpoints != nil {
		publishMicrosoftEndpoint := *preference.PublishMicrosoftEndpoints
		destination.PublishMicrosoftEndpoints = &publishMicrosoftEndpoint
	} else {
		destination.PublishMicrosoftEndpoints = nil
	}

	// RoutingChoice
	if preference.RoutingChoice != nil {
		routingChoice := string(*preference.RoutingChoice)
		destination.RoutingChoice = &routingChoice
	} else {
		destination.RoutingChoice = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// 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 {
	// PublishInternetEndpoints: A boolean flag which indicates whether internet routing storage endpoints are to be published
	PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty"`

	// PublishMicrosoftEndpoints: A boolean flag which indicates whether microsoft routing storage endpoints are to be published
	PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty"`

	// RoutingChoice: Routing Choice defines the kind of network routing opted by the user.
	RoutingChoice *RoutingPreference_RoutingChoice_STATUS `json:"routingChoice,omitempty"`
}

var _ genruntime.FromARMConverter = &RoutingPreference_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (preference *RoutingPreference_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.RoutingPreference_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (preference *RoutingPreference_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.RoutingPreference_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.RoutingPreference_STATUS, got %T", armInput)
	}

	// Set property "PublishInternetEndpoints":
	if typedInput.PublishInternetEndpoints != nil {
		publishInternetEndpoints := *typedInput.PublishInternetEndpoints
		preference.PublishInternetEndpoints = &publishInternetEndpoints
	}

	// Set property "PublishMicrosoftEndpoints":
	if typedInput.PublishMicrosoftEndpoints != nil {
		publishMicrosoftEndpoints := *typedInput.PublishMicrosoftEndpoints
		preference.PublishMicrosoftEndpoints = &publishMicrosoftEndpoints
	}

	// Set property "RoutingChoice":
	if typedInput.RoutingChoice != nil {
		var temp string
		temp = string(*typedInput.RoutingChoice)
		routingChoice := RoutingPreference_RoutingChoice_STATUS(temp)
		preference.RoutingChoice = &routingChoice
	}

	// No error
	return nil
}

// AssignProperties_From_RoutingPreference_STATUS populates our RoutingPreference_STATUS from the provided source RoutingPreference_STATUS
func (preference *RoutingPreference_STATUS) AssignProperties_From_RoutingPreference_STATUS(source *storage.RoutingPreference_STATUS) error {

	// PublishInternetEndpoints
	if source.PublishInternetEndpoints != nil {
		publishInternetEndpoint := *source.PublishInternetEndpoints
		preference.PublishInternetEndpoints = &publishInternetEndpoint
	} else {
		preference.PublishInternetEndpoints = nil
	}

	// PublishMicrosoftEndpoints
	if source.PublishMicrosoftEndpoints != nil {
		publishMicrosoftEndpoint := *source.PublishMicrosoftEndpoints
		preference.PublishMicrosoftEndpoints = &publishMicrosoftEndpoint
	} else {
		preference.PublishMicrosoftEndpoints = nil
	}

	// RoutingChoice
	if source.RoutingChoice != nil {
		routingChoice := *source.RoutingChoice
		routingChoiceTemp := genruntime.ToEnum(routingChoice, routingPreference_RoutingChoice_STATUS_Values)
		preference.RoutingChoice = &routingChoiceTemp
	} else {
		preference.RoutingChoice = nil
	}

	// No error
	return nil
}

// AssignProperties_To_RoutingPreference_STATUS populates the provided destination RoutingPreference_STATUS from our RoutingPreference_STATUS
func (preference *RoutingPreference_STATUS) AssignProperties_To_RoutingPreference_STATUS(destination *storage.RoutingPreference_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// PublishInternetEndpoints
	if preference.PublishInternetEndpoints != nil {
		publishInternetEndpoint := *preference.PublishInternetEndpoints
		destination.PublishInternetEndpoints = &publishInternetEndpoint
	} else {
		destination.PublishInternetEndpoints = nil
	}

	// PublishMicrosoftEndpoints
	if preference.PublishMicrosoftEndpoints != nil {
		publishMicrosoftEndpoint := *preference.PublishMicrosoftEndpoints
		destination.PublishMicrosoftEndpoints = &publishMicrosoftEndpoint
	} else {
		destination.PublishMicrosoftEndpoints = nil
	}

	// RoutingChoice
	if preference.RoutingChoice != nil {
		routingChoice := string(*preference.RoutingChoice)
		destination.RoutingChoice = &routingChoice
	} else {
		destination.RoutingChoice = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// SasPolicy assigned to the storage account.
type SasPolicy struct {
	// +kubebuilder:validation:Required
	// ExpirationAction: The SAS expiration action. Can only be Log.
	ExpirationAction *SasPolicy_ExpirationAction `json:"expirationAction,omitempty"`

	// +kubebuilder:validation:Required
	// SasExpirationPeriod: The SAS expiration period, DD.HH:MM:SS.
	SasExpirationPeriod *string `json:"sasExpirationPeriod,omitempty"`
}

var _ genruntime.ARMTransformer = &SasPolicy{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (policy *SasPolicy) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if policy == nil {
		return nil, nil
	}
	result := &arm.SasPolicy{}

	// Set property "ExpirationAction":
	if policy.ExpirationAction != nil {
		var temp string
		temp = string(*policy.ExpirationAction)
		expirationAction := arm.SasPolicy_ExpirationAction(temp)
		result.ExpirationAction = &expirationAction
	}

	// Set property "SasExpirationPeriod":
	if policy.SasExpirationPeriod != nil {
		sasExpirationPeriod := *policy.SasExpirationPeriod
		result.SasExpirationPeriod = &sasExpirationPeriod
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (policy *SasPolicy) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.SasPolicy{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (policy *SasPolicy) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.SasPolicy)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.SasPolicy, got %T", armInput)
	}

	// Set property "ExpirationAction":
	if typedInput.ExpirationAction != nil {
		var temp string
		temp = string(*typedInput.ExpirationAction)
		expirationAction := SasPolicy_ExpirationAction(temp)
		policy.ExpirationAction = &expirationAction
	}

	// Set property "SasExpirationPeriod":
	if typedInput.SasExpirationPeriod != nil {
		sasExpirationPeriod := *typedInput.SasExpirationPeriod
		policy.SasExpirationPeriod = &sasExpirationPeriod
	}

	// No error
	return nil
}

// AssignProperties_From_SasPolicy populates our SasPolicy from the provided source SasPolicy
func (policy *SasPolicy) AssignProperties_From_SasPolicy(source *storage.SasPolicy) error {

	// ExpirationAction
	if source.ExpirationAction != nil {
		expirationAction := *source.ExpirationAction
		expirationActionTemp := genruntime.ToEnum(expirationAction, sasPolicy_ExpirationAction_Values)
		policy.ExpirationAction = &expirationActionTemp
	} else {
		policy.ExpirationAction = nil
	}

	// SasExpirationPeriod
	policy.SasExpirationPeriod = genruntime.ClonePointerToString(source.SasExpirationPeriod)

	// No error
	return nil
}

// AssignProperties_To_SasPolicy populates the provided destination SasPolicy from our SasPolicy
func (policy *SasPolicy) AssignProperties_To_SasPolicy(destination *storage.SasPolicy) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// ExpirationAction
	if policy.ExpirationAction != nil {
		expirationAction := string(*policy.ExpirationAction)
		destination.ExpirationAction = &expirationAction
	} else {
		destination.ExpirationAction = nil
	}

	// SasExpirationPeriod
	destination.SasExpirationPeriod = genruntime.ClonePointerToString(policy.SasExpirationPeriod)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// SasPolicy assigned to the storage account.
type SasPolicy_STATUS struct {
	// ExpirationAction: The SAS expiration action. Can only be Log.
	ExpirationAction *SasPolicy_ExpirationAction_STATUS `json:"expirationAction,omitempty"`

	// SasExpirationPeriod: The SAS expiration period, DD.HH:MM:SS.
	SasExpirationPeriod *string `json:"sasExpirationPeriod,omitempty"`
}

var _ genruntime.FromARMConverter = &SasPolicy_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (policy *SasPolicy_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.SasPolicy_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (policy *SasPolicy_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.SasPolicy_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.SasPolicy_STATUS, got %T", armInput)
	}

	// Set property "ExpirationAction":
	if typedInput.ExpirationAction != nil {
		var temp string
		temp = string(*typedInput.ExpirationAction)
		expirationAction := SasPolicy_ExpirationAction_STATUS(temp)
		policy.ExpirationAction = &expirationAction
	}

	// Set property "SasExpirationPeriod":
	if typedInput.SasExpirationPeriod != nil {
		sasExpirationPeriod := *typedInput.SasExpirationPeriod
		policy.SasExpirationPeriod = &sasExpirationPeriod
	}

	// No error
	return nil
}

// AssignProperties_From_SasPolicy_STATUS populates our SasPolicy_STATUS from the provided source SasPolicy_STATUS
func (policy *SasPolicy_STATUS) AssignProperties_From_SasPolicy_STATUS(source *storage.SasPolicy_STATUS) error {

	// ExpirationAction
	if source.ExpirationAction != nil {
		expirationAction := *source.ExpirationAction
		expirationActionTemp := genruntime.ToEnum(expirationAction, sasPolicy_ExpirationAction_STATUS_Values)
		policy.ExpirationAction = &expirationActionTemp
	} else {
		policy.ExpirationAction = nil
	}

	// SasExpirationPeriod
	policy.SasExpirationPeriod = genruntime.ClonePointerToString(source.SasExpirationPeriod)

	// No error
	return nil
}

// AssignProperties_To_SasPolicy_STATUS populates the provided destination SasPolicy_STATUS from our SasPolicy_STATUS
func (policy *SasPolicy_STATUS) AssignProperties_To_SasPolicy_STATUS(destination *storage.SasPolicy_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// ExpirationAction
	if policy.ExpirationAction != nil {
		expirationAction := string(*policy.ExpirationAction)
		destination.ExpirationAction = &expirationAction
	} else {
		destination.ExpirationAction = nil
	}

	// SasExpirationPeriod
	destination.SasExpirationPeriod = genruntime.ClonePointerToString(policy.SasExpirationPeriod)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// The SKU of the storage account.
type Sku struct {
	// +kubebuilder:validation:Required
	// Name: The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called
	//  accountType.
	Name *SkuName `json:"name,omitempty"`

	// Tier: The SKU tier. This is based on the SKU name.
	Tier *Tier `json:"tier,omitempty"`
}

var _ genruntime.ARMTransformer = &Sku{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (sku *Sku) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if sku == nil {
		return nil, nil
	}
	result := &arm.Sku{}

	// Set property "Name":
	if sku.Name != nil {
		var temp string
		temp = string(*sku.Name)
		name := arm.SkuName(temp)
		result.Name = &name
	}

	// Set property "Tier":
	if sku.Tier != nil {
		var temp string
		temp = string(*sku.Tier)
		tier := arm.Tier(temp)
		result.Tier = &tier
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (sku *Sku) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.Sku{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (sku *Sku) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.Sku)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Sku, got %T", armInput)
	}

	// Set property "Name":
	if typedInput.Name != nil {
		var temp string
		temp = string(*typedInput.Name)
		name := SkuName(temp)
		sku.Name = &name
	}

	// Set property "Tier":
	if typedInput.Tier != nil {
		var temp string
		temp = string(*typedInput.Tier)
		tier := Tier(temp)
		sku.Tier = &tier
	}

	// No error
	return nil
}

// AssignProperties_From_Sku populates our Sku from the provided source Sku
func (sku *Sku) AssignProperties_From_Sku(source *storage.Sku) error {

	// Name
	if source.Name != nil {
		name := *source.Name
		nameTemp := genruntime.ToEnum(name, skuName_Values)
		sku.Name = &nameTemp
	} else {
		sku.Name = nil
	}

	// Tier
	if source.Tier != nil {
		tier := *source.Tier
		tierTemp := genruntime.ToEnum(tier, tier_Values)
		sku.Tier = &tierTemp
	} else {
		sku.Tier = nil
	}

	// No error
	return nil
}

// AssignProperties_To_Sku populates the provided destination Sku from our Sku
func (sku *Sku) AssignProperties_To_Sku(destination *storage.Sku) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Name
	if sku.Name != nil {
		name := string(*sku.Name)
		destination.Name = &name
	} else {
		destination.Name = nil
	}

	// Tier
	if sku.Tier != nil {
		tier := string(*sku.Tier)
		destination.Tier = &tier
	} else {
		destination.Tier = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// The SKU of the storage account.
type Sku_STATUS struct {
	// Name: The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called
	//  accountType.
	Name *SkuName_STATUS `json:"name,omitempty"`

	// Tier: The SKU tier. This is based on the SKU name.
	Tier *Tier_STATUS `json:"tier,omitempty"`
}

var _ genruntime.FromARMConverter = &Sku_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (sku *Sku_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.Sku_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (sku *Sku_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.Sku_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.Sku_STATUS, got %T", armInput)
	}

	// Set property "Name":
	if typedInput.Name != nil {
		var temp string
		temp = string(*typedInput.Name)
		name := SkuName_STATUS(temp)
		sku.Name = &name
	}

	// Set property "Tier":
	if typedInput.Tier != nil {
		var temp string
		temp = string(*typedInput.Tier)
		tier := Tier_STATUS(temp)
		sku.Tier = &tier
	}

	// No error
	return nil
}

// AssignProperties_From_Sku_STATUS populates our Sku_STATUS from the provided source Sku_STATUS
func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *storage.Sku_STATUS) error {

	// Name
	if source.Name != nil {
		name := *source.Name
		nameTemp := genruntime.ToEnum(name, skuName_STATUS_Values)
		sku.Name = &nameTemp
	} else {
		sku.Name = nil
	}

	// Tier
	if source.Tier != nil {
		tier := *source.Tier
		tierTemp := genruntime.ToEnum(tier, tier_STATUS_Values)
		sku.Tier = &tierTemp
	} else {
		sku.Tier = nil
	}

	// No error
	return nil
}

// AssignProperties_To_Sku_STATUS populates the provided destination Sku_STATUS from our Sku_STATUS
func (sku *Sku_STATUS) AssignProperties_To_Sku_STATUS(destination *storage.Sku_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Name
	if sku.Name != nil {
		name := string(*sku.Name)
		destination.Name = &name
	} else {
		destination.Name = nil
	}

	// Tier
	if sku.Tier != nil {
		tier := string(*sku.Tier)
		destination.Tier = &tier
	} else {
		destination.Tier = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"BlobStorage","BlockBlobStorage","FileStorage","Storage","StorageV2"}
type StorageAccount_Kind_Spec string

const (
	StorageAccount_Kind_Spec_BlobStorage      = StorageAccount_Kind_Spec("BlobStorage")
	StorageAccount_Kind_Spec_BlockBlobStorage = StorageAccount_Kind_Spec("BlockBlobStorage")
	StorageAccount_Kind_Spec_FileStorage      = StorageAccount_Kind_Spec("FileStorage")
	StorageAccount_Kind_Spec_Storage          = StorageAccount_Kind_Spec("Storage")
	StorageAccount_Kind_Spec_StorageV2        = StorageAccount_Kind_Spec("StorageV2")
)

// Mapping from string to StorageAccount_Kind_Spec
var storageAccount_Kind_Spec_Values = map[string]StorageAccount_Kind_Spec{
	"blobstorage":      StorageAccount_Kind_Spec_BlobStorage,
	"blockblobstorage": StorageAccount_Kind_Spec_BlockBlobStorage,
	"filestorage":      StorageAccount_Kind_Spec_FileStorage,
	"storage":          StorageAccount_Kind_Spec_Storage,
	"storagev2":        StorageAccount_Kind_Spec_StorageV2,
}

type StorageAccount_Kind_STATUS string

const (
	StorageAccount_Kind_STATUS_BlobStorage      = StorageAccount_Kind_STATUS("BlobStorage")
	StorageAccount_Kind_STATUS_BlockBlobStorage = StorageAccount_Kind_STATUS("BlockBlobStorage")
	StorageAccount_Kind_STATUS_FileStorage      = StorageAccount_Kind_STATUS("FileStorage")
	StorageAccount_Kind_STATUS_Storage          = StorageAccount_Kind_STATUS("Storage")
	StorageAccount_Kind_STATUS_StorageV2        = StorageAccount_Kind_STATUS("StorageV2")
)

// Mapping from string to StorageAccount_Kind_STATUS
var storageAccount_Kind_STATUS_Values = map[string]StorageAccount_Kind_STATUS{
	"blobstorage":      StorageAccount_Kind_STATUS_BlobStorage,
	"blockblobstorage": StorageAccount_Kind_STATUS_BlockBlobStorage,
	"filestorage":      StorageAccount_Kind_STATUS_FileStorage,
	"storage":          StorageAccount_Kind_STATUS_Storage,
	"storagev2":        StorageAccount_Kind_STATUS_StorageV2,
}

// 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: configures where to place operator written dynamic ConfigMaps (created with CEL expressions).
	ConfigMapExpressions []*core.DestinationExpression `json:"configMapExpressions,omitempty"`

	// ConfigMaps: configures where to place operator written ConfigMaps.
	ConfigMaps *StorageAccountOperatorConfigMaps `json:"configMaps,omitempty"`

	// SecretExpressions: configures where to place operator written dynamic secrets (created with CEL expressions).
	SecretExpressions []*core.DestinationExpression `json:"secretExpressions,omitempty"`

	// Secrets: configures where to place Azure generated secrets.
	Secrets *StorageAccountOperatorSecrets `json:"secrets,omitempty"`
}

// AssignProperties_From_StorageAccountOperatorSpec populates our StorageAccountOperatorSpec from the provided source StorageAccountOperatorSpec
func (operator *StorageAccountOperatorSpec) AssignProperties_From_StorageAccountOperatorSpec(source *storage.StorageAccountOperatorSpec) error {

	// ConfigMapExpressions
	if source.ConfigMapExpressions != nil {
		configMapExpressionList := make([]*core.DestinationExpression, len(source.ConfigMapExpressions))
		for configMapExpressionIndex, configMapExpressionItem := range source.ConfigMapExpressions {
			if configMapExpressionItem != nil {
				configMapExpression := *configMapExpressionItem.DeepCopy()
				configMapExpressionList[configMapExpressionIndex] = &configMapExpression
			} else {
				configMapExpressionList[configMapExpressionIndex] = nil
			}
		}
		operator.ConfigMapExpressions = configMapExpressionList
	} else {
		operator.ConfigMapExpressions = nil
	}

	// ConfigMaps
	if source.ConfigMaps != nil {
		var configMap StorageAccountOperatorConfigMaps
		err := configMap.AssignProperties_From_StorageAccountOperatorConfigMaps(source.ConfigMaps)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StorageAccountOperatorConfigMaps() to populate field ConfigMaps")
		}
		operator.ConfigMaps = &configMap
	} else {
		operator.ConfigMaps = nil
	}

	// SecretExpressions
	if source.SecretExpressions != nil {
		secretExpressionList := make([]*core.DestinationExpression, len(source.SecretExpressions))
		for secretExpressionIndex, secretExpressionItem := range source.SecretExpressions {
			if secretExpressionItem != nil {
				secretExpression := *secretExpressionItem.DeepCopy()
				secretExpressionList[secretExpressionIndex] = &secretExpression
			} else {
				secretExpressionList[secretExpressionIndex] = nil
			}
		}
		operator.SecretExpressions = secretExpressionList
	} else {
		operator.SecretExpressions = nil
	}

	// Secrets
	if source.Secrets != nil {
		var secret StorageAccountOperatorSecrets
		err := secret.AssignProperties_From_StorageAccountOperatorSecrets(source.Secrets)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StorageAccountOperatorSecrets() to populate field Secrets")
		}
		operator.Secrets = &secret
	} else {
		operator.Secrets = nil
	}

	// No error
	return nil
}

// AssignProperties_To_StorageAccountOperatorSpec populates the provided destination StorageAccountOperatorSpec from our StorageAccountOperatorSpec
func (operator *StorageAccountOperatorSpec) AssignProperties_To_StorageAccountOperatorSpec(destination *storage.StorageAccountOperatorSpec) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// ConfigMapExpressions
	if operator.ConfigMapExpressions != nil {
		configMapExpressionList := make([]*core.DestinationExpression, len(operator.ConfigMapExpressions))
		for configMapExpressionIndex, configMapExpressionItem := range operator.ConfigMapExpressions {
			if configMapExpressionItem != nil {
				configMapExpression := *configMapExpressionItem.DeepCopy()
				configMapExpressionList[configMapExpressionIndex] = &configMapExpression
			} else {
				configMapExpressionList[configMapExpressionIndex] = nil
			}
		}
		destination.ConfigMapExpressions = configMapExpressionList
	} else {
		destination.ConfigMapExpressions = nil
	}

	// ConfigMaps
	if operator.ConfigMaps != nil {
		var configMap storage.StorageAccountOperatorConfigMaps
		err := operator.ConfigMaps.AssignProperties_To_StorageAccountOperatorConfigMaps(&configMap)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StorageAccountOperatorConfigMaps() to populate field ConfigMaps")
		}
		destination.ConfigMaps = &configMap
	} else {
		destination.ConfigMaps = nil
	}

	// SecretExpressions
	if operator.SecretExpressions != nil {
		secretExpressionList := make([]*core.DestinationExpression, len(operator.SecretExpressions))
		for secretExpressionIndex, secretExpressionItem := range operator.SecretExpressions {
			if secretExpressionItem != nil {
				secretExpression := *secretExpressionItem.DeepCopy()
				secretExpressionList[secretExpressionIndex] = &secretExpression
			} else {
				secretExpressionList[secretExpressionIndex] = nil
			}
		}
		destination.SecretExpressions = secretExpressionList
	} else {
		destination.SecretExpressions = nil
	}

	// Secrets
	if operator.Secrets != nil {
		var secret storage.StorageAccountOperatorSecrets
		err := operator.Secrets.AssignProperties_To_StorageAccountOperatorSecrets(&secret)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StorageAccountOperatorSecrets() to populate field Secrets")
		}
		destination.Secrets = &secret
	} else {
		destination.Secrets = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

type StorageAccountProperties_AccessTier_STATUS string

const (
	StorageAccountProperties_AccessTier_STATUS_Cool = StorageAccountProperties_AccessTier_STATUS("Cool")
	StorageAccountProperties_AccessTier_STATUS_Hot  = StorageAccountProperties_AccessTier_STATUS("Hot")
)

// Mapping from string to StorageAccountProperties_AccessTier_STATUS
var storageAccountProperties_AccessTier_STATUS_Values = map[string]StorageAccountProperties_AccessTier_STATUS{
	"cool": StorageAccountProperties_AccessTier_STATUS_Cool,
	"hot":  StorageAccountProperties_AccessTier_STATUS_Hot,
}

type StorageAccountProperties_LargeFileSharesState_STATUS string

const (
	StorageAccountProperties_LargeFileSharesState_STATUS_Disabled = StorageAccountProperties_LargeFileSharesState_STATUS("Disabled")
	StorageAccountProperties_LargeFileSharesState_STATUS_Enabled  = StorageAccountProperties_LargeFileSharesState_STATUS("Enabled")
)

// Mapping from string to StorageAccountProperties_LargeFileSharesState_STATUS
var storageAccountProperties_LargeFileSharesState_STATUS_Values = map[string]StorageAccountProperties_LargeFileSharesState_STATUS{
	"disabled": StorageAccountProperties_LargeFileSharesState_STATUS_Disabled,
	"enabled":  StorageAccountProperties_LargeFileSharesState_STATUS_Enabled,
}

type StorageAccountProperties_MinimumTlsVersion_STATUS string

const (
	StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_0 = StorageAccountProperties_MinimumTlsVersion_STATUS("TLS1_0")
	StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_1 = StorageAccountProperties_MinimumTlsVersion_STATUS("TLS1_1")
	StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_2 = StorageAccountProperties_MinimumTlsVersion_STATUS("TLS1_2")
)

// Mapping from string to StorageAccountProperties_MinimumTlsVersion_STATUS
var storageAccountProperties_MinimumTlsVersion_STATUS_Values = map[string]StorageAccountProperties_MinimumTlsVersion_STATUS{
	"tls1_0": StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_0,
	"tls1_1": StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_1,
	"tls1_2": StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_2,
}

type StorageAccountProperties_ProvisioningState_STATUS string

const (
	StorageAccountProperties_ProvisioningState_STATUS_Creating     = StorageAccountProperties_ProvisioningState_STATUS("Creating")
	StorageAccountProperties_ProvisioningState_STATUS_ResolvingDNS = StorageAccountProperties_ProvisioningState_STATUS("ResolvingDNS")
	StorageAccountProperties_ProvisioningState_STATUS_Succeeded    = StorageAccountProperties_ProvisioningState_STATUS("Succeeded")
)

// Mapping from string to StorageAccountProperties_ProvisioningState_STATUS
var storageAccountProperties_ProvisioningState_STATUS_Values = map[string]StorageAccountProperties_ProvisioningState_STATUS{
	"creating":     StorageAccountProperties_ProvisioningState_STATUS_Creating,
	"resolvingdns": StorageAccountProperties_ProvisioningState_STATUS_ResolvingDNS,
	"succeeded":    StorageAccountProperties_ProvisioningState_STATUS_Succeeded,
}

type StorageAccountProperties_StatusOfPrimary_STATUS string

const (
	StorageAccountProperties_StatusOfPrimary_STATUS_Available   = StorageAccountProperties_StatusOfPrimary_STATUS("available")
	StorageAccountProperties_StatusOfPrimary_STATUS_Unavailable = StorageAccountProperties_StatusOfPrimary_STATUS("unavailable")
)

// Mapping from string to StorageAccountProperties_StatusOfPrimary_STATUS
var storageAccountProperties_StatusOfPrimary_STATUS_Values = map[string]StorageAccountProperties_StatusOfPrimary_STATUS{
	"available":   StorageAccountProperties_StatusOfPrimary_STATUS_Available,
	"unavailable": StorageAccountProperties_StatusOfPrimary_STATUS_Unavailable,
}

type StorageAccountProperties_StatusOfSecondary_STATUS string

const (
	StorageAccountProperties_StatusOfSecondary_STATUS_Available   = StorageAccountProperties_StatusOfSecondary_STATUS("available")
	StorageAccountProperties_StatusOfSecondary_STATUS_Unavailable = StorageAccountProperties_StatusOfSecondary_STATUS("unavailable")
)

// Mapping from string to StorageAccountProperties_StatusOfSecondary_STATUS
var storageAccountProperties_StatusOfSecondary_STATUS_Values = map[string]StorageAccountProperties_StatusOfSecondary_STATUS{
	"available":   StorageAccountProperties_StatusOfSecondary_STATUS_Available,
	"unavailable": StorageAccountProperties_StatusOfSecondary_STATUS_Unavailable,
}

// +kubebuilder:validation:Enum={"Cool","Hot"}
type StorageAccountPropertiesCreateParameters_AccessTier string

const (
	StorageAccountPropertiesCreateParameters_AccessTier_Cool = StorageAccountPropertiesCreateParameters_AccessTier("Cool")
	StorageAccountPropertiesCreateParameters_AccessTier_Hot  = StorageAccountPropertiesCreateParameters_AccessTier("Hot")
)

// Mapping from string to StorageAccountPropertiesCreateParameters_AccessTier
var storageAccountPropertiesCreateParameters_AccessTier_Values = map[string]StorageAccountPropertiesCreateParameters_AccessTier{
	"cool": StorageAccountPropertiesCreateParameters_AccessTier_Cool,
	"hot":  StorageAccountPropertiesCreateParameters_AccessTier_Hot,
}

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

const (
	StorageAccountPropertiesCreateParameters_LargeFileSharesState_Disabled = StorageAccountPropertiesCreateParameters_LargeFileSharesState("Disabled")
	StorageAccountPropertiesCreateParameters_LargeFileSharesState_Enabled  = StorageAccountPropertiesCreateParameters_LargeFileSharesState("Enabled")
)

// Mapping from string to StorageAccountPropertiesCreateParameters_LargeFileSharesState
var storageAccountPropertiesCreateParameters_LargeFileSharesState_Values = map[string]StorageAccountPropertiesCreateParameters_LargeFileSharesState{
	"disabled": StorageAccountPropertiesCreateParameters_LargeFileSharesState_Disabled,
	"enabled":  StorageAccountPropertiesCreateParameters_LargeFileSharesState_Enabled,
}

// +kubebuilder:validation:Enum={"TLS1_0","TLS1_1","TLS1_2"}
type StorageAccountPropertiesCreateParameters_MinimumTlsVersion string

const (
	StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_0 = StorageAccountPropertiesCreateParameters_MinimumTlsVersion("TLS1_0")
	StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_1 = StorageAccountPropertiesCreateParameters_MinimumTlsVersion("TLS1_1")
	StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_2 = StorageAccountPropertiesCreateParameters_MinimumTlsVersion("TLS1_2")
)

// Mapping from string to StorageAccountPropertiesCreateParameters_MinimumTlsVersion
var storageAccountPropertiesCreateParameters_MinimumTlsVersion_Values = map[string]StorageAccountPropertiesCreateParameters_MinimumTlsVersion{
	"tls1_0": StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_0,
	"tls1_1": StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_1,
	"tls1_2": StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_2,
}

// Settings properties for Active Directory (AD).
type ActiveDirectoryProperties struct {
	// +kubebuilder:validation:Required
	// AzureStorageSid: Specifies the security identifier (SID) for Azure Storage.
	AzureStorageSid *string `json:"azureStorageSid,omitempty"`

	// +kubebuilder:validation:Required
	// DomainGuid: Specifies the domain GUID.
	DomainGuid *string `json:"domainGuid,omitempty"`

	// +kubebuilder:validation:Required
	// DomainName: Specifies the primary domain that the AD DNS server is authoritative for.
	DomainName *string `json:"domainName,omitempty"`

	// +kubebuilder:validation:Required
	// DomainSid: Specifies the security identifier (SID).
	DomainSid *string `json:"domainSid,omitempty"`

	// +kubebuilder:validation:Required
	// ForestName: Specifies the Active Directory forest to get.
	ForestName *string `json:"forestName,omitempty"`

	// +kubebuilder:validation:Required
	// NetBiosDomainName: Specifies the NetBIOS domain name.
	NetBiosDomainName *string `json:"netBiosDomainName,omitempty"`
}

var _ genruntime.ARMTransformer = &ActiveDirectoryProperties{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (properties *ActiveDirectoryProperties) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if properties == nil {
		return nil, nil
	}
	result := &arm.ActiveDirectoryProperties{}

	// Set property "AzureStorageSid":
	if properties.AzureStorageSid != nil {
		azureStorageSid := *properties.AzureStorageSid
		result.AzureStorageSid = &azureStorageSid
	}

	// Set property "DomainGuid":
	if properties.DomainGuid != nil {
		domainGuid := *properties.DomainGuid
		result.DomainGuid = &domainGuid
	}

	// Set property "DomainName":
	if properties.DomainName != nil {
		domainName := *properties.DomainName
		result.DomainName = &domainName
	}

	// Set property "DomainSid":
	if properties.DomainSid != nil {
		domainSid := *properties.DomainSid
		result.DomainSid = &domainSid
	}

	// Set property "ForestName":
	if properties.ForestName != nil {
		forestName := *properties.ForestName
		result.ForestName = &forestName
	}

	// Set property "NetBiosDomainName":
	if properties.NetBiosDomainName != nil {
		netBiosDomainName := *properties.NetBiosDomainName
		result.NetBiosDomainName = &netBiosDomainName
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (properties *ActiveDirectoryProperties) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ActiveDirectoryProperties{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (properties *ActiveDirectoryProperties) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ActiveDirectoryProperties)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ActiveDirectoryProperties, got %T", armInput)
	}

	// Set property "AzureStorageSid":
	if typedInput.AzureStorageSid != nil {
		azureStorageSid := *typedInput.AzureStorageSid
		properties.AzureStorageSid = &azureStorageSid
	}

	// Set property "DomainGuid":
	if typedInput.DomainGuid != nil {
		domainGuid := *typedInput.DomainGuid
		properties.DomainGuid = &domainGuid
	}

	// Set property "DomainName":
	if typedInput.DomainName != nil {
		domainName := *typedInput.DomainName
		properties.DomainName = &domainName
	}

	// Set property "DomainSid":
	if typedInput.DomainSid != nil {
		domainSid := *typedInput.DomainSid
		properties.DomainSid = &domainSid
	}

	// Set property "ForestName":
	if typedInput.ForestName != nil {
		forestName := *typedInput.ForestName
		properties.ForestName = &forestName
	}

	// Set property "NetBiosDomainName":
	if typedInput.NetBiosDomainName != nil {
		netBiosDomainName := *typedInput.NetBiosDomainName
		properties.NetBiosDomainName = &netBiosDomainName
	}

	// No error
	return nil
}

// AssignProperties_From_ActiveDirectoryProperties populates our ActiveDirectoryProperties from the provided source ActiveDirectoryProperties
func (properties *ActiveDirectoryProperties) AssignProperties_From_ActiveDirectoryProperties(source *storage.ActiveDirectoryProperties) error {

	// AzureStorageSid
	properties.AzureStorageSid = genruntime.ClonePointerToString(source.AzureStorageSid)

	// DomainGuid
	properties.DomainGuid = genruntime.ClonePointerToString(source.DomainGuid)

	// DomainName
	properties.DomainName = genruntime.ClonePointerToString(source.DomainName)

	// DomainSid
	properties.DomainSid = genruntime.ClonePointerToString(source.DomainSid)

	// ForestName
	properties.ForestName = genruntime.ClonePointerToString(source.ForestName)

	// NetBiosDomainName
	properties.NetBiosDomainName = genruntime.ClonePointerToString(source.NetBiosDomainName)

	// No error
	return nil
}

// AssignProperties_To_ActiveDirectoryProperties populates the provided destination ActiveDirectoryProperties from our ActiveDirectoryProperties
func (properties *ActiveDirectoryProperties) AssignProperties_To_ActiveDirectoryProperties(destination *storage.ActiveDirectoryProperties) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// AzureStorageSid
	destination.AzureStorageSid = genruntime.ClonePointerToString(properties.AzureStorageSid)

	// DomainGuid
	destination.DomainGuid = genruntime.ClonePointerToString(properties.DomainGuid)

	// DomainName
	destination.DomainName = genruntime.ClonePointerToString(properties.DomainName)

	// DomainSid
	destination.DomainSid = genruntime.ClonePointerToString(properties.DomainSid)

	// ForestName
	destination.ForestName = genruntime.ClonePointerToString(properties.ForestName)

	// NetBiosDomainName
	destination.NetBiosDomainName = genruntime.ClonePointerToString(properties.NetBiosDomainName)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Settings properties for Active Directory (AD).
type ActiveDirectoryProperties_STATUS struct {
	// AzureStorageSid: Specifies the security identifier (SID) for Azure Storage.
	AzureStorageSid *string `json:"azureStorageSid,omitempty"`

	// DomainGuid: Specifies the domain GUID.
	DomainGuid *string `json:"domainGuid,omitempty"`

	// DomainName: Specifies the primary domain that the AD DNS server is authoritative for.
	DomainName *string `json:"domainName,omitempty"`

	// DomainSid: Specifies the security identifier (SID).
	DomainSid *string `json:"domainSid,omitempty"`

	// ForestName: Specifies the Active Directory forest to get.
	ForestName *string `json:"forestName,omitempty"`

	// NetBiosDomainName: Specifies the NetBIOS domain name.
	NetBiosDomainName *string `json:"netBiosDomainName,omitempty"`
}

var _ genruntime.FromARMConverter = &ActiveDirectoryProperties_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (properties *ActiveDirectoryProperties_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ActiveDirectoryProperties_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (properties *ActiveDirectoryProperties_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ActiveDirectoryProperties_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ActiveDirectoryProperties_STATUS, got %T", armInput)
	}

	// Set property "AzureStorageSid":
	if typedInput.AzureStorageSid != nil {
		azureStorageSid := *typedInput.AzureStorageSid
		properties.AzureStorageSid = &azureStorageSid
	}

	// Set property "DomainGuid":
	if typedInput.DomainGuid != nil {
		domainGuid := *typedInput.DomainGuid
		properties.DomainGuid = &domainGuid
	}

	// Set property "DomainName":
	if typedInput.DomainName != nil {
		domainName := *typedInput.DomainName
		properties.DomainName = &domainName
	}

	// Set property "DomainSid":
	if typedInput.DomainSid != nil {
		domainSid := *typedInput.DomainSid
		properties.DomainSid = &domainSid
	}

	// Set property "ForestName":
	if typedInput.ForestName != nil {
		forestName := *typedInput.ForestName
		properties.ForestName = &forestName
	}

	// Set property "NetBiosDomainName":
	if typedInput.NetBiosDomainName != nil {
		netBiosDomainName := *typedInput.NetBiosDomainName
		properties.NetBiosDomainName = &netBiosDomainName
	}

	// No error
	return nil
}

// AssignProperties_From_ActiveDirectoryProperties_STATUS populates our ActiveDirectoryProperties_STATUS from the provided source ActiveDirectoryProperties_STATUS
func (properties *ActiveDirectoryProperties_STATUS) AssignProperties_From_ActiveDirectoryProperties_STATUS(source *storage.ActiveDirectoryProperties_STATUS) error {

	// AzureStorageSid
	properties.AzureStorageSid = genruntime.ClonePointerToString(source.AzureStorageSid)

	// DomainGuid
	properties.DomainGuid = genruntime.ClonePointerToString(source.DomainGuid)

	// DomainName
	properties.DomainName = genruntime.ClonePointerToString(source.DomainName)

	// DomainSid
	properties.DomainSid = genruntime.ClonePointerToString(source.DomainSid)

	// ForestName
	properties.ForestName = genruntime.ClonePointerToString(source.ForestName)

	// NetBiosDomainName
	properties.NetBiosDomainName = genruntime.ClonePointerToString(source.NetBiosDomainName)

	// No error
	return nil
}

// AssignProperties_To_ActiveDirectoryProperties_STATUS populates the provided destination ActiveDirectoryProperties_STATUS from our ActiveDirectoryProperties_STATUS
func (properties *ActiveDirectoryProperties_STATUS) AssignProperties_To_ActiveDirectoryProperties_STATUS(destination *storage.ActiveDirectoryProperties_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// AzureStorageSid
	destination.AzureStorageSid = genruntime.ClonePointerToString(properties.AzureStorageSid)

	// DomainGuid
	destination.DomainGuid = genruntime.ClonePointerToString(properties.DomainGuid)

	// DomainName
	destination.DomainName = genruntime.ClonePointerToString(properties.DomainName)

	// DomainSid
	destination.DomainSid = genruntime.ClonePointerToString(properties.DomainSid)

	// ForestName
	destination.ForestName = genruntime.ClonePointerToString(properties.ForestName)

	// NetBiosDomainName
	destination.NetBiosDomainName = genruntime.ClonePointerToString(properties.NetBiosDomainName)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"None","StorageFileDataSmbShareContributor","StorageFileDataSmbShareElevatedContributor","StorageFileDataSmbShareOwner","StorageFileDataSmbShareReader"}
type AzureFilesIdentityBasedAuthentication_DefaultSharePermission string

const (
	AzureFilesIdentityBasedAuthentication_DefaultSharePermission_None                                       = AzureFilesIdentityBasedAuthentication_DefaultSharePermission("None")
	AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareContributor         = AzureFilesIdentityBasedAuthentication_DefaultSharePermission("StorageFileDataSmbShareContributor")
	AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareElevatedContributor = AzureFilesIdentityBasedAuthentication_DefaultSharePermission("StorageFileDataSmbShareElevatedContributor")
	AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareOwner               = AzureFilesIdentityBasedAuthentication_DefaultSharePermission("StorageFileDataSmbShareOwner")
	AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareReader              = AzureFilesIdentityBasedAuthentication_DefaultSharePermission("StorageFileDataSmbShareReader")
)

// Mapping from string to AzureFilesIdentityBasedAuthentication_DefaultSharePermission
var azureFilesIdentityBasedAuthentication_DefaultSharePermission_Values = map[string]AzureFilesIdentityBasedAuthentication_DefaultSharePermission{
	"none":                               AzureFilesIdentityBasedAuthentication_DefaultSharePermission_None,
	"storagefiledatasmbsharecontributor": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareContributor,
	"storagefiledatasmbshareelevatedcontributor": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareElevatedContributor,
	"storagefiledatasmbshareowner":               AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareOwner,
	"storagefiledatasmbsharereader":              AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareReader,
}

type AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS string

const (
	AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_None                                       = AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS("None")
	AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareContributor         = AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS("StorageFileDataSmbShareContributor")
	AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareElevatedContributor = AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS("StorageFileDataSmbShareElevatedContributor")
	AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareOwner               = AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS("StorageFileDataSmbShareOwner")
	AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareReader              = AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS("StorageFileDataSmbShareReader")
)

// Mapping from string to AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS
var azureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_Values = map[string]AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS{
	"none":                               AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_None,
	"storagefiledatasmbsharecontributor": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareContributor,
	"storagefiledatasmbshareelevatedcontributor": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareElevatedContributor,
	"storagefiledatasmbshareowner":               AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareOwner,
	"storagefiledatasmbsharereader":              AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareReader,
}

// +kubebuilder:validation:Enum={"AADDS","AD","None"}
type AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions string

const (
	AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AADDS = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions("AADDS")
	AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AD    = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions("AD")
	AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_None  = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions("None")
)

// Mapping from string to AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions
var azureFilesIdentityBasedAuthentication_DirectoryServiceOptions_Values = map[string]AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions{
	"aadds": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AADDS,
	"ad":    AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AD,
	"none":  AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_None,
}

type AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS string

const (
	AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AADDS = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS("AADDS")
	AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AD    = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS("AD")
	AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_None  = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS("None")
)

// Mapping from string to AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS
var azureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_Values = map[string]AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS{
	"aadds": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AADDS,
	"ad":    AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AD,
	"none":  AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_None,
}

// Blob restore parameters
type BlobRestoreParameters_STATUS struct {
	// BlobRanges: Blob ranges to restore.
	BlobRanges []BlobRestoreRange_STATUS `json:"blobRanges,omitempty"`

	// TimeToRestore: Restore blob to the specified time.
	TimeToRestore *string `json:"timeToRestore,omitempty"`
}

var _ genruntime.FromARMConverter = &BlobRestoreParameters_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (parameters *BlobRestoreParameters_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.BlobRestoreParameters_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (parameters *BlobRestoreParameters_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.BlobRestoreParameters_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.BlobRestoreParameters_STATUS, got %T", armInput)
	}

	// Set property "BlobRanges":
	for _, item := range typedInput.BlobRanges {
		var item1 BlobRestoreRange_STATUS
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		parameters.BlobRanges = append(parameters.BlobRanges, item1)
	}

	// Set property "TimeToRestore":
	if typedInput.TimeToRestore != nil {
		timeToRestore := *typedInput.TimeToRestore
		parameters.TimeToRestore = &timeToRestore
	}

	// No error
	return nil
}

// AssignProperties_From_BlobRestoreParameters_STATUS populates our BlobRestoreParameters_STATUS from the provided source BlobRestoreParameters_STATUS
func (parameters *BlobRestoreParameters_STATUS) AssignProperties_From_BlobRestoreParameters_STATUS(source *storage.BlobRestoreParameters_STATUS) error {

	// BlobRanges
	if source.BlobRanges != nil {
		blobRangeList := make([]BlobRestoreRange_STATUS, len(source.BlobRanges))
		for blobRangeIndex, blobRangeItem := range source.BlobRanges {
			var blobRange BlobRestoreRange_STATUS
			err := blobRange.AssignProperties_From_BlobRestoreRange_STATUS(&blobRangeItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_BlobRestoreRange_STATUS() to populate field BlobRanges")
			}
			blobRangeList[blobRangeIndex] = blobRange
		}
		parameters.BlobRanges = blobRangeList
	} else {
		parameters.BlobRanges = nil
	}

	// TimeToRestore
	parameters.TimeToRestore = genruntime.ClonePointerToString(source.TimeToRestore)

	// No error
	return nil
}

// AssignProperties_To_BlobRestoreParameters_STATUS populates the provided destination BlobRestoreParameters_STATUS from our BlobRestoreParameters_STATUS
func (parameters *BlobRestoreParameters_STATUS) AssignProperties_To_BlobRestoreParameters_STATUS(destination *storage.BlobRestoreParameters_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// BlobRanges
	if parameters.BlobRanges != nil {
		blobRangeList := make([]storage.BlobRestoreRange_STATUS, len(parameters.BlobRanges))
		for blobRangeIndex, blobRangeItem := range parameters.BlobRanges {
			var blobRange storage.BlobRestoreRange_STATUS
			err := blobRangeItem.AssignProperties_To_BlobRestoreRange_STATUS(&blobRange)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_BlobRestoreRange_STATUS() to populate field BlobRanges")
			}
			blobRangeList[blobRangeIndex] = blobRange
		}
		destination.BlobRanges = blobRangeList
	} else {
		destination.BlobRanges = nil
	}

	// TimeToRestore
	destination.TimeToRestore = genruntime.ClonePointerToString(parameters.TimeToRestore)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

type BlobRestoreStatus_Status_STATUS string

const (
	BlobRestoreStatus_Status_STATUS_Complete   = BlobRestoreStatus_Status_STATUS("Complete")
	BlobRestoreStatus_Status_STATUS_Failed     = BlobRestoreStatus_Status_STATUS("Failed")
	BlobRestoreStatus_Status_STATUS_InProgress = BlobRestoreStatus_Status_STATUS("InProgress")
)

// Mapping from string to BlobRestoreStatus_Status_STATUS
var blobRestoreStatus_Status_STATUS_Values = map[string]BlobRestoreStatus_Status_STATUS{
	"complete":   BlobRestoreStatus_Status_STATUS_Complete,
	"failed":     BlobRestoreStatus_Status_STATUS_Failed,
	"inprogress": BlobRestoreStatus_Status_STATUS_InProgress,
}

// +kubebuilder:validation:Enum={"Microsoft.Keyvault","Microsoft.Storage"}
type Encryption_KeySource string

const (
	Encryption_KeySource_MicrosoftKeyvault = Encryption_KeySource("Microsoft.Keyvault")
	Encryption_KeySource_MicrosoftStorage  = Encryption_KeySource("Microsoft.Storage")
)

// Mapping from string to Encryption_KeySource
var encryption_KeySource_Values = map[string]Encryption_KeySource{
	"microsoft.keyvault": Encryption_KeySource_MicrosoftKeyvault,
	"microsoft.storage":  Encryption_KeySource_MicrosoftStorage,
}

type Encryption_KeySource_STATUS string

const (
	Encryption_KeySource_STATUS_MicrosoftKeyvault = Encryption_KeySource_STATUS("Microsoft.Keyvault")
	Encryption_KeySource_STATUS_MicrosoftStorage  = Encryption_KeySource_STATUS("Microsoft.Storage")
)

// Mapping from string to Encryption_KeySource_STATUS
var encryption_KeySource_STATUS_Values = map[string]Encryption_KeySource_STATUS{
	"microsoft.keyvault": Encryption_KeySource_STATUS_MicrosoftKeyvault,
	"microsoft.storage":  Encryption_KeySource_STATUS_MicrosoftStorage,
}

// Encryption identity for the storage account.
type EncryptionIdentity struct {
	// 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"`
}

var _ genruntime.ARMTransformer = &EncryptionIdentity{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (identity *EncryptionIdentity) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if identity == nil {
		return nil, nil
	}
	result := &arm.EncryptionIdentity{}

	// Set property "UserAssignedIdentity":
	if identity.UserAssignedIdentityReference != nil {
		userAssignedIdentityReferenceARMID, err := resolved.ResolvedReferences.Lookup(*identity.UserAssignedIdentityReference)
		if err != nil {
			return nil, err
		}
		userAssignedIdentityReference := userAssignedIdentityReferenceARMID
		result.UserAssignedIdentity = &userAssignedIdentityReference
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (identity *EncryptionIdentity) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.EncryptionIdentity{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (identity *EncryptionIdentity) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	_, ok := armInput.(arm.EncryptionIdentity)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.EncryptionIdentity, got %T", armInput)
	}

	// no assignment for property "UserAssignedIdentityReference"

	// No error
	return nil
}

// AssignProperties_From_EncryptionIdentity populates our EncryptionIdentity from the provided source EncryptionIdentity
func (identity *EncryptionIdentity) AssignProperties_From_EncryptionIdentity(source *storage.EncryptionIdentity) error {

	// UserAssignedIdentityReference
	if source.UserAssignedIdentityReference != nil {
		userAssignedIdentityReference := source.UserAssignedIdentityReference.Copy()
		identity.UserAssignedIdentityReference = &userAssignedIdentityReference
	} else {
		identity.UserAssignedIdentityReference = nil
	}

	// No error
	return nil
}

// AssignProperties_To_EncryptionIdentity populates the provided destination EncryptionIdentity from our EncryptionIdentity
func (identity *EncryptionIdentity) AssignProperties_To_EncryptionIdentity(destination *storage.EncryptionIdentity) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// UserAssignedIdentityReference
	if identity.UserAssignedIdentityReference != nil {
		userAssignedIdentityReference := identity.UserAssignedIdentityReference.Copy()
		destination.UserAssignedIdentityReference = &userAssignedIdentityReference
	} else {
		destination.UserAssignedIdentityReference = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Encryption identity for the storage account.
type EncryptionIdentity_STATUS struct {
	// UserAssignedIdentity: Resource identifier of the UserAssigned identity to be associated with server-side encryption on
	// the storage account.
	UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"`
}

var _ genruntime.FromARMConverter = &EncryptionIdentity_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (identity *EncryptionIdentity_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.EncryptionIdentity_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (identity *EncryptionIdentity_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.EncryptionIdentity_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.EncryptionIdentity_STATUS, got %T", armInput)
	}

	// Set property "UserAssignedIdentity":
	if typedInput.UserAssignedIdentity != nil {
		userAssignedIdentity := *typedInput.UserAssignedIdentity
		identity.UserAssignedIdentity = &userAssignedIdentity
	}

	// No error
	return nil
}

// AssignProperties_From_EncryptionIdentity_STATUS populates our EncryptionIdentity_STATUS from the provided source EncryptionIdentity_STATUS
func (identity *EncryptionIdentity_STATUS) AssignProperties_From_EncryptionIdentity_STATUS(source *storage.EncryptionIdentity_STATUS) error {

	// UserAssignedIdentity
	identity.UserAssignedIdentity = genruntime.ClonePointerToString(source.UserAssignedIdentity)

	// No error
	return nil
}

// AssignProperties_To_EncryptionIdentity_STATUS populates the provided destination EncryptionIdentity_STATUS from our EncryptionIdentity_STATUS
func (identity *EncryptionIdentity_STATUS) AssignProperties_To_EncryptionIdentity_STATUS(destination *storage.EncryptionIdentity_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// UserAssignedIdentity
	destination.UserAssignedIdentity = genruntime.ClonePointerToString(identity.UserAssignedIdentity)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// A list of services that support encryption.
type EncryptionServices struct {
	// Blob: The encryption function of the blob storage service.
	Blob *EncryptionService `json:"blob,omitempty"`

	// File: The encryption function of the file storage service.
	File *EncryptionService `json:"file,omitempty"`

	// Queue: The encryption function of the queue storage service.
	Queue *EncryptionService `json:"queue,omitempty"`

	// Table: The encryption function of the table storage service.
	Table *EncryptionService `json:"table,omitempty"`
}

var _ genruntime.ARMTransformer = &EncryptionServices{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (services *EncryptionServices) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if services == nil {
		return nil, nil
	}
	result := &arm.EncryptionServices{}

	// Set property "Blob":
	if services.Blob != nil {
		blob_ARM, err := services.Blob.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		blob := *blob_ARM.(*arm.EncryptionService)
		result.Blob = &blob
	}

	// Set property "File":
	if services.File != nil {
		file_ARM, err := services.File.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		file := *file_ARM.(*arm.EncryptionService)
		result.File = &file
	}

	// Set property "Queue":
	if services.Queue != nil {
		queue_ARM, err := services.Queue.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		queue := *queue_ARM.(*arm.EncryptionService)
		result.Queue = &queue
	}

	// Set property "Table":
	if services.Table != nil {
		table_ARM, err := services.Table.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		table := *table_ARM.(*arm.EncryptionService)
		result.Table = &table
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (services *EncryptionServices) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.EncryptionServices{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (services *EncryptionServices) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.EncryptionServices)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.EncryptionServices, got %T", armInput)
	}

	// Set property "Blob":
	if typedInput.Blob != nil {
		var blob1 EncryptionService
		err := blob1.PopulateFromARM(owner, *typedInput.Blob)
		if err != nil {
			return err
		}
		blob := blob1
		services.Blob = &blob
	}

	// Set property "File":
	if typedInput.File != nil {
		var file1 EncryptionService
		err := file1.PopulateFromARM(owner, *typedInput.File)
		if err != nil {
			return err
		}
		file := file1
		services.File = &file
	}

	// Set property "Queue":
	if typedInput.Queue != nil {
		var queue1 EncryptionService
		err := queue1.PopulateFromARM(owner, *typedInput.Queue)
		if err != nil {
			return err
		}
		queue := queue1
		services.Queue = &queue
	}

	// Set property "Table":
	if typedInput.Table != nil {
		var table1 EncryptionService
		err := table1.PopulateFromARM(owner, *typedInput.Table)
		if err != nil {
			return err
		}
		table := table1
		services.Table = &table
	}

	// No error
	return nil
}

// AssignProperties_From_EncryptionServices populates our EncryptionServices from the provided source EncryptionServices
func (services *EncryptionServices) AssignProperties_From_EncryptionServices(source *storage.EncryptionServices) error {

	// Blob
	if source.Blob != nil {
		var blob EncryptionService
		err := blob.AssignProperties_From_EncryptionService(source.Blob)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EncryptionService() to populate field Blob")
		}
		services.Blob = &blob
	} else {
		services.Blob = nil
	}

	// File
	if source.File != nil {
		var file EncryptionService
		err := file.AssignProperties_From_EncryptionService(source.File)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EncryptionService() to populate field File")
		}
		services.File = &file
	} else {
		services.File = nil
	}

	// Queue
	if source.Queue != nil {
		var queue EncryptionService
		err := queue.AssignProperties_From_EncryptionService(source.Queue)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EncryptionService() to populate field Queue")
		}
		services.Queue = &queue
	} else {
		services.Queue = nil
	}

	// Table
	if source.Table != nil {
		var table EncryptionService
		err := table.AssignProperties_From_EncryptionService(source.Table)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EncryptionService() to populate field Table")
		}
		services.Table = &table
	} else {
		services.Table = nil
	}

	// No error
	return nil
}

// AssignProperties_To_EncryptionServices populates the provided destination EncryptionServices from our EncryptionServices
func (services *EncryptionServices) AssignProperties_To_EncryptionServices(destination *storage.EncryptionServices) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Blob
	if services.Blob != nil {
		var blob storage.EncryptionService
		err := services.Blob.AssignProperties_To_EncryptionService(&blob)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EncryptionService() to populate field Blob")
		}
		destination.Blob = &blob
	} else {
		destination.Blob = nil
	}

	// File
	if services.File != nil {
		var file storage.EncryptionService
		err := services.File.AssignProperties_To_EncryptionService(&file)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EncryptionService() to populate field File")
		}
		destination.File = &file
	} else {
		destination.File = nil
	}

	// Queue
	if services.Queue != nil {
		var queue storage.EncryptionService
		err := services.Queue.AssignProperties_To_EncryptionService(&queue)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EncryptionService() to populate field Queue")
		}
		destination.Queue = &queue
	} else {
		destination.Queue = nil
	}

	// Table
	if services.Table != nil {
		var table storage.EncryptionService
		err := services.Table.AssignProperties_To_EncryptionService(&table)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EncryptionService() to populate field Table")
		}
		destination.Table = &table
	} else {
		destination.Table = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// A list of services that support encryption.
type EncryptionServices_STATUS struct {
	// Blob: The encryption function of the blob storage service.
	Blob *EncryptionService_STATUS `json:"blob,omitempty"`

	// File: The encryption function of the file storage service.
	File *EncryptionService_STATUS `json:"file,omitempty"`

	// Queue: The encryption function of the queue storage service.
	Queue *EncryptionService_STATUS `json:"queue,omitempty"`

	// Table: The encryption function of the table storage service.
	Table *EncryptionService_STATUS `json:"table,omitempty"`
}

var _ genruntime.FromARMConverter = &EncryptionServices_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (services *EncryptionServices_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.EncryptionServices_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (services *EncryptionServices_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.EncryptionServices_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.EncryptionServices_STATUS, got %T", armInput)
	}

	// Set property "Blob":
	if typedInput.Blob != nil {
		var blob1 EncryptionService_STATUS
		err := blob1.PopulateFromARM(owner, *typedInput.Blob)
		if err != nil {
			return err
		}
		blob := blob1
		services.Blob = &blob
	}

	// Set property "File":
	if typedInput.File != nil {
		var file1 EncryptionService_STATUS
		err := file1.PopulateFromARM(owner, *typedInput.File)
		if err != nil {
			return err
		}
		file := file1
		services.File = &file
	}

	// Set property "Queue":
	if typedInput.Queue != nil {
		var queue1 EncryptionService_STATUS
		err := queue1.PopulateFromARM(owner, *typedInput.Queue)
		if err != nil {
			return err
		}
		queue := queue1
		services.Queue = &queue
	}

	// Set property "Table":
	if typedInput.Table != nil {
		var table1 EncryptionService_STATUS
		err := table1.PopulateFromARM(owner, *typedInput.Table)
		if err != nil {
			return err
		}
		table := table1
		services.Table = &table
	}

	// No error
	return nil
}

// AssignProperties_From_EncryptionServices_STATUS populates our EncryptionServices_STATUS from the provided source EncryptionServices_STATUS
func (services *EncryptionServices_STATUS) AssignProperties_From_EncryptionServices_STATUS(source *storage.EncryptionServices_STATUS) error {

	// Blob
	if source.Blob != nil {
		var blob EncryptionService_STATUS
		err := blob.AssignProperties_From_EncryptionService_STATUS(source.Blob)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EncryptionService_STATUS() to populate field Blob")
		}
		services.Blob = &blob
	} else {
		services.Blob = nil
	}

	// File
	if source.File != nil {
		var file EncryptionService_STATUS
		err := file.AssignProperties_From_EncryptionService_STATUS(source.File)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EncryptionService_STATUS() to populate field File")
		}
		services.File = &file
	} else {
		services.File = nil
	}

	// Queue
	if source.Queue != nil {
		var queue EncryptionService_STATUS
		err := queue.AssignProperties_From_EncryptionService_STATUS(source.Queue)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EncryptionService_STATUS() to populate field Queue")
		}
		services.Queue = &queue
	} else {
		services.Queue = nil
	}

	// Table
	if source.Table != nil {
		var table EncryptionService_STATUS
		err := table.AssignProperties_From_EncryptionService_STATUS(source.Table)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EncryptionService_STATUS() to populate field Table")
		}
		services.Table = &table
	} else {
		services.Table = nil
	}

	// No error
	return nil
}

// AssignProperties_To_EncryptionServices_STATUS populates the provided destination EncryptionServices_STATUS from our EncryptionServices_STATUS
func (services *EncryptionServices_STATUS) AssignProperties_To_EncryptionServices_STATUS(destination *storage.EncryptionServices_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Blob
	if services.Blob != nil {
		var blob storage.EncryptionService_STATUS
		err := services.Blob.AssignProperties_To_EncryptionService_STATUS(&blob)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EncryptionService_STATUS() to populate field Blob")
		}
		destination.Blob = &blob
	} else {
		destination.Blob = nil
	}

	// File
	if services.File != nil {
		var file storage.EncryptionService_STATUS
		err := services.File.AssignProperties_To_EncryptionService_STATUS(&file)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EncryptionService_STATUS() to populate field File")
		}
		destination.File = &file
	} else {
		destination.File = nil
	}

	// Queue
	if services.Queue != nil {
		var queue storage.EncryptionService_STATUS
		err := services.Queue.AssignProperties_To_EncryptionService_STATUS(&queue)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EncryptionService_STATUS() to populate field Queue")
		}
		destination.Queue = &queue
	} else {
		destination.Queue = nil
	}

	// Table
	if services.Table != nil {
		var table storage.EncryptionService_STATUS
		err := services.Table.AssignProperties_To_EncryptionService_STATUS(&table)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EncryptionService_STATUS() to populate field Table")
		}
		destination.Table = &table
	} else {
		destination.Table = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// The type of extendedLocation.
// +kubebuilder:validation:Enum={"EdgeZone"}
type ExtendedLocationType string

const ExtendedLocationType_EdgeZone = ExtendedLocationType("EdgeZone")

// Mapping from string to ExtendedLocationType
var extendedLocationType_Values = map[string]ExtendedLocationType{
	"edgezone": ExtendedLocationType_EdgeZone,
}

// The type of extendedLocation.
type ExtendedLocationType_STATUS string

const ExtendedLocationType_STATUS_EdgeZone = ExtendedLocationType_STATUS("EdgeZone")

// Mapping from string to ExtendedLocationType_STATUS
var extendedLocationType_STATUS_Values = map[string]ExtendedLocationType_STATUS{
	"edgezone": ExtendedLocationType_STATUS_EdgeZone,
}

type GeoReplicationStats_Status_STATUS string

const (
	GeoReplicationStats_Status_STATUS_Bootstrap   = GeoReplicationStats_Status_STATUS("Bootstrap")
	GeoReplicationStats_Status_STATUS_Live        = GeoReplicationStats_Status_STATUS("Live")
	GeoReplicationStats_Status_STATUS_Unavailable = GeoReplicationStats_Status_STATUS("Unavailable")
)

// Mapping from string to GeoReplicationStats_Status_STATUS
var geoReplicationStats_Status_STATUS_Values = map[string]GeoReplicationStats_Status_STATUS{
	"bootstrap":   GeoReplicationStats_Status_STATUS_Bootstrap,
	"live":        GeoReplicationStats_Status_STATUS_Live,
	"unavailable": GeoReplicationStats_Status_STATUS_Unavailable,
}

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

const (
	Identity_Type_None                       = Identity_Type("None")
	Identity_Type_SystemAssigned             = Identity_Type("SystemAssigned")
	Identity_Type_SystemAssignedUserAssigned = Identity_Type("SystemAssigned,UserAssigned")
	Identity_Type_UserAssigned               = Identity_Type("UserAssigned")
)

// Mapping from string to Identity_Type
var identity_Type_Values = map[string]Identity_Type{
	"none":                        Identity_Type_None,
	"systemassigned":              Identity_Type_SystemAssigned,
	"systemassigned,userassigned": Identity_Type_SystemAssignedUserAssigned,
	"userassigned":                Identity_Type_UserAssigned,
}

type Identity_Type_STATUS string

const (
	Identity_Type_STATUS_None                       = Identity_Type_STATUS("None")
	Identity_Type_STATUS_SystemAssigned             = Identity_Type_STATUS("SystemAssigned")
	Identity_Type_STATUS_SystemAssignedUserAssigned = Identity_Type_STATUS("SystemAssigned,UserAssigned")
	Identity_Type_STATUS_UserAssigned               = Identity_Type_STATUS("UserAssigned")
)

// Mapping from string to Identity_Type_STATUS
var identity_Type_STATUS_Values = map[string]Identity_Type_STATUS{
	"none":                        Identity_Type_STATUS_None,
	"systemassigned":              Identity_Type_STATUS_SystemAssigned,
	"systemassigned,userassigned": Identity_Type_STATUS_SystemAssignedUserAssigned,
	"userassigned":                Identity_Type_STATUS_UserAssigned,
}

// IP rule with specific IP or IP range in CIDR format.
type IPRule struct {
	// Action: The action of IP ACL rule.
	Action *IPRule_Action `json:"action,omitempty"`

	// Value: Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
	Value *string `json:"value,omitempty" optionalConfigMapPair:"Value"`

	// ValueFromConfig: Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
	ValueFromConfig *genruntime.ConfigMapReference `json:"valueFromConfig,omitempty" optionalConfigMapPair:"Value"`
}

var _ genruntime.ARMTransformer = &IPRule{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (rule *IPRule) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if rule == nil {
		return nil, nil
	}
	result := &arm.IPRule{}

	// Set property "Action":
	if rule.Action != nil {
		var temp string
		temp = string(*rule.Action)
		action := arm.IPRule_Action(temp)
		result.Action = &action
	}

	// Set property "Value":
	if rule.Value != nil {
		value := *rule.Value
		result.Value = &value
	}
	if rule.ValueFromConfig != nil {
		valueValue, err := resolved.ResolvedConfigMaps.Lookup(*rule.ValueFromConfig)
		if err != nil {
			return nil, eris.Wrap(err, "looking up configmap for property Value")
		}
		value := valueValue
		result.Value = &value
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (rule *IPRule) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.IPRule{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (rule *IPRule) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.IPRule)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IPRule, got %T", armInput)
	}

	// Set property "Action":
	if typedInput.Action != nil {
		var temp string
		temp = string(*typedInput.Action)
		action := IPRule_Action(temp)
		rule.Action = &action
	}

	// Set property "Value":
	if typedInput.Value != nil {
		value := *typedInput.Value
		rule.Value = &value
	}

	// no assignment for property "ValueFromConfig"

	// No error
	return nil
}

// AssignProperties_From_IPRule populates our IPRule from the provided source IPRule
func (rule *IPRule) AssignProperties_From_IPRule(source *storage.IPRule) error {

	// Action
	if source.Action != nil {
		action := *source.Action
		actionTemp := genruntime.ToEnum(action, iPRule_Action_Values)
		rule.Action = &actionTemp
	} else {
		rule.Action = nil
	}

	// Value
	rule.Value = genruntime.ClonePointerToString(source.Value)

	// ValueFromConfig
	if source.ValueFromConfig != nil {
		valueFromConfig := source.ValueFromConfig.Copy()
		rule.ValueFromConfig = &valueFromConfig
	} else {
		rule.ValueFromConfig = nil
	}

	// No error
	return nil
}

// AssignProperties_To_IPRule populates the provided destination IPRule from our IPRule
func (rule *IPRule) AssignProperties_To_IPRule(destination *storage.IPRule) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Action
	if rule.Action != nil {
		action := string(*rule.Action)
		destination.Action = &action
	} else {
		destination.Action = nil
	}

	// Value
	destination.Value = genruntime.ClonePointerToString(rule.Value)

	// ValueFromConfig
	if rule.ValueFromConfig != nil {
		valueFromConfig := rule.ValueFromConfig.Copy()
		destination.ValueFromConfig = &valueFromConfig
	} else {
		destination.ValueFromConfig = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// IP rule with specific IP or IP range in CIDR format.
type IPRule_STATUS struct {
	// Action: The action of IP ACL rule.
	Action *IPRule_Action_STATUS `json:"action,omitempty"`

	// Value: Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
	Value *string `json:"value,omitempty"`
}

var _ genruntime.FromARMConverter = &IPRule_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (rule *IPRule_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.IPRule_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (rule *IPRule_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.IPRule_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IPRule_STATUS, got %T", armInput)
	}

	// Set property "Action":
	if typedInput.Action != nil {
		var temp string
		temp = string(*typedInput.Action)
		action := IPRule_Action_STATUS(temp)
		rule.Action = &action
	}

	// Set property "Value":
	if typedInput.Value != nil {
		value := *typedInput.Value
		rule.Value = &value
	}

	// No error
	return nil
}

// AssignProperties_From_IPRule_STATUS populates our IPRule_STATUS from the provided source IPRule_STATUS
func (rule *IPRule_STATUS) AssignProperties_From_IPRule_STATUS(source *storage.IPRule_STATUS) error {

	// Action
	if source.Action != nil {
		action := *source.Action
		actionTemp := genruntime.ToEnum(action, iPRule_Action_STATUS_Values)
		rule.Action = &actionTemp
	} else {
		rule.Action = nil
	}

	// Value
	rule.Value = genruntime.ClonePointerToString(source.Value)

	// No error
	return nil
}

// AssignProperties_To_IPRule_STATUS populates the provided destination IPRule_STATUS from our IPRule_STATUS
func (rule *IPRule_STATUS) AssignProperties_To_IPRule_STATUS(destination *storage.IPRule_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Action
	if rule.Action != nil {
		action := string(*rule.Action)
		destination.Action = &action
	} else {
		destination.Action = nil
	}

	// Value
	destination.Value = genruntime.ClonePointerToString(rule.Value)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Properties of key vault.
type KeyVaultProperties struct {
	// Keyname: The name of KeyVault key.
	Keyname *string `json:"keyname,omitempty"`

	// Keyvaulturi: The Uri of KeyVault.
	Keyvaulturi *string `json:"keyvaulturi,omitempty"`

	// Keyversion: The version of KeyVault key.
	Keyversion *string `json:"keyversion,omitempty"`
}

var _ genruntime.ARMTransformer = &KeyVaultProperties{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (properties *KeyVaultProperties) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if properties == nil {
		return nil, nil
	}
	result := &arm.KeyVaultProperties{}

	// Set property "Keyname":
	if properties.Keyname != nil {
		keyname := *properties.Keyname
		result.Keyname = &keyname
	}

	// Set property "Keyvaulturi":
	if properties.Keyvaulturi != nil {
		keyvaulturi := *properties.Keyvaulturi
		result.Keyvaulturi = &keyvaulturi
	}

	// Set property "Keyversion":
	if properties.Keyversion != nil {
		keyversion := *properties.Keyversion
		result.Keyversion = &keyversion
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (properties *KeyVaultProperties) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.KeyVaultProperties{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (properties *KeyVaultProperties) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.KeyVaultProperties)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.KeyVaultProperties, got %T", armInput)
	}

	// Set property "Keyname":
	if typedInput.Keyname != nil {
		keyname := *typedInput.Keyname
		properties.Keyname = &keyname
	}

	// Set property "Keyvaulturi":
	if typedInput.Keyvaulturi != nil {
		keyvaulturi := *typedInput.Keyvaulturi
		properties.Keyvaulturi = &keyvaulturi
	}

	// Set property "Keyversion":
	if typedInput.Keyversion != nil {
		keyversion := *typedInput.Keyversion
		properties.Keyversion = &keyversion
	}

	// No error
	return nil
}

// AssignProperties_From_KeyVaultProperties populates our KeyVaultProperties from the provided source KeyVaultProperties
func (properties *KeyVaultProperties) AssignProperties_From_KeyVaultProperties(source *storage.KeyVaultProperties) error {

	// Keyname
	properties.Keyname = genruntime.ClonePointerToString(source.Keyname)

	// Keyvaulturi
	properties.Keyvaulturi = genruntime.ClonePointerToString(source.Keyvaulturi)

	// Keyversion
	properties.Keyversion = genruntime.ClonePointerToString(source.Keyversion)

	// No error
	return nil
}

// AssignProperties_To_KeyVaultProperties populates the provided destination KeyVaultProperties from our KeyVaultProperties
func (properties *KeyVaultProperties) AssignProperties_To_KeyVaultProperties(destination *storage.KeyVaultProperties) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Keyname
	destination.Keyname = genruntime.ClonePointerToString(properties.Keyname)

	// Keyvaulturi
	destination.Keyvaulturi = genruntime.ClonePointerToString(properties.Keyvaulturi)

	// Keyversion
	destination.Keyversion = genruntime.ClonePointerToString(properties.Keyversion)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Properties of key vault.
type KeyVaultProperties_STATUS struct {
	// CurrentVersionedKeyIdentifier: The object identifier of the current versioned Key Vault Key in use.
	CurrentVersionedKeyIdentifier *string `json:"currentVersionedKeyIdentifier,omitempty"`

	// Keyname: The name of KeyVault key.
	Keyname *string `json:"keyname,omitempty"`

	// Keyvaulturi: The Uri of KeyVault.
	Keyvaulturi *string `json:"keyvaulturi,omitempty"`

	// Keyversion: The version of KeyVault key.
	Keyversion *string `json:"keyversion,omitempty"`

	// LastKeyRotationTimestamp: Timestamp of last rotation of the Key Vault Key.
	LastKeyRotationTimestamp *string `json:"lastKeyRotationTimestamp,omitempty"`
}

var _ genruntime.FromARMConverter = &KeyVaultProperties_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (properties *KeyVaultProperties_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.KeyVaultProperties_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (properties *KeyVaultProperties_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.KeyVaultProperties_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.KeyVaultProperties_STATUS, got %T", armInput)
	}

	// Set property "CurrentVersionedKeyIdentifier":
	if typedInput.CurrentVersionedKeyIdentifier != nil {
		currentVersionedKeyIdentifier := *typedInput.CurrentVersionedKeyIdentifier
		properties.CurrentVersionedKeyIdentifier = &currentVersionedKeyIdentifier
	}

	// Set property "Keyname":
	if typedInput.Keyname != nil {
		keyname := *typedInput.Keyname
		properties.Keyname = &keyname
	}

	// Set property "Keyvaulturi":
	if typedInput.Keyvaulturi != nil {
		keyvaulturi := *typedInput.Keyvaulturi
		properties.Keyvaulturi = &keyvaulturi
	}

	// Set property "Keyversion":
	if typedInput.Keyversion != nil {
		keyversion := *typedInput.Keyversion
		properties.Keyversion = &keyversion
	}

	// Set property "LastKeyRotationTimestamp":
	if typedInput.LastKeyRotationTimestamp != nil {
		lastKeyRotationTimestamp := *typedInput.LastKeyRotationTimestamp
		properties.LastKeyRotationTimestamp = &lastKeyRotationTimestamp
	}

	// No error
	return nil
}

// AssignProperties_From_KeyVaultProperties_STATUS populates our KeyVaultProperties_STATUS from the provided source KeyVaultProperties_STATUS
func (properties *KeyVaultProperties_STATUS) AssignProperties_From_KeyVaultProperties_STATUS(source *storage.KeyVaultProperties_STATUS) error {

	// CurrentVersionedKeyIdentifier
	properties.CurrentVersionedKeyIdentifier = genruntime.ClonePointerToString(source.CurrentVersionedKeyIdentifier)

	// Keyname
	properties.Keyname = genruntime.ClonePointerToString(source.Keyname)

	// Keyvaulturi
	properties.Keyvaulturi = genruntime.ClonePointerToString(source.Keyvaulturi)

	// Keyversion
	properties.Keyversion = genruntime.ClonePointerToString(source.Keyversion)

	// LastKeyRotationTimestamp
	properties.LastKeyRotationTimestamp = genruntime.ClonePointerToString(source.LastKeyRotationTimestamp)

	// No error
	return nil
}

// AssignProperties_To_KeyVaultProperties_STATUS populates the provided destination KeyVaultProperties_STATUS from our KeyVaultProperties_STATUS
func (properties *KeyVaultProperties_STATUS) AssignProperties_To_KeyVaultProperties_STATUS(destination *storage.KeyVaultProperties_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// CurrentVersionedKeyIdentifier
	destination.CurrentVersionedKeyIdentifier = genruntime.ClonePointerToString(properties.CurrentVersionedKeyIdentifier)

	// Keyname
	destination.Keyname = genruntime.ClonePointerToString(properties.Keyname)

	// Keyvaulturi
	destination.Keyvaulturi = genruntime.ClonePointerToString(properties.Keyvaulturi)

	// Keyversion
	destination.Keyversion = genruntime.ClonePointerToString(properties.Keyversion)

	// LastKeyRotationTimestamp
	destination.LastKeyRotationTimestamp = genruntime.ClonePointerToString(properties.LastKeyRotationTimestamp)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

type NetworkRuleSet_Bypass_STATUS string

const (
	NetworkRuleSet_Bypass_STATUS_AzureServices = NetworkRuleSet_Bypass_STATUS("AzureServices")
	NetworkRuleSet_Bypass_STATUS_Logging       = NetworkRuleSet_Bypass_STATUS("Logging")
	NetworkRuleSet_Bypass_STATUS_Metrics       = NetworkRuleSet_Bypass_STATUS("Metrics")
	NetworkRuleSet_Bypass_STATUS_None          = NetworkRuleSet_Bypass_STATUS("None")
)

// Mapping from string to NetworkRuleSet_Bypass_STATUS
var networkRuleSet_Bypass_STATUS_Values = map[string]NetworkRuleSet_Bypass_STATUS{
	"azureservices": NetworkRuleSet_Bypass_STATUS_AzureServices,
	"logging":       NetworkRuleSet_Bypass_STATUS_Logging,
	"metrics":       NetworkRuleSet_Bypass_STATUS_Metrics,
	"none":          NetworkRuleSet_Bypass_STATUS_None,
}

// +kubebuilder:validation:Enum={"Allow","Deny"}
type NetworkRuleSet_DefaultAction string

const (
	NetworkRuleSet_DefaultAction_Allow = NetworkRuleSet_DefaultAction("Allow")
	NetworkRuleSet_DefaultAction_Deny  = NetworkRuleSet_DefaultAction("Deny")
)

// Mapping from string to NetworkRuleSet_DefaultAction
var networkRuleSet_DefaultAction_Values = map[string]NetworkRuleSet_DefaultAction{
	"allow": NetworkRuleSet_DefaultAction_Allow,
	"deny":  NetworkRuleSet_DefaultAction_Deny,
}

type NetworkRuleSet_DefaultAction_STATUS string

const (
	NetworkRuleSet_DefaultAction_STATUS_Allow = NetworkRuleSet_DefaultAction_STATUS("Allow")
	NetworkRuleSet_DefaultAction_STATUS_Deny  = NetworkRuleSet_DefaultAction_STATUS("Deny")
)

// Mapping from string to NetworkRuleSet_DefaultAction_STATUS
var networkRuleSet_DefaultAction_STATUS_Values = map[string]NetworkRuleSet_DefaultAction_STATUS{
	"allow": NetworkRuleSet_DefaultAction_STATUS_Allow,
	"deny":  NetworkRuleSet_DefaultAction_STATUS_Deny,
}

// Resource Access Rule.
type ResourceAccessRule struct {
	// ResourceReference: Resource Id
	ResourceReference *genruntime.ResourceReference `armReference:"ResourceId" json:"resourceReference,omitempty"`

	// TenantId: Tenant Id
	TenantId *string `json:"tenantId,omitempty"`
}

var _ genruntime.ARMTransformer = &ResourceAccessRule{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (rule *ResourceAccessRule) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if rule == nil {
		return nil, nil
	}
	result := &arm.ResourceAccessRule{}

	// Set property "ResourceId":
	if rule.ResourceReference != nil {
		resourceReferenceARMID, err := resolved.ResolvedReferences.Lookup(*rule.ResourceReference)
		if err != nil {
			return nil, err
		}
		resourceReference := resourceReferenceARMID
		result.ResourceId = &resourceReference
	}

	// Set property "TenantId":
	if rule.TenantId != nil {
		tenantId := *rule.TenantId
		result.TenantId = &tenantId
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (rule *ResourceAccessRule) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ResourceAccessRule{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (rule *ResourceAccessRule) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ResourceAccessRule)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ResourceAccessRule, got %T", armInput)
	}

	// no assignment for property "ResourceReference"

	// Set property "TenantId":
	if typedInput.TenantId != nil {
		tenantId := *typedInput.TenantId
		rule.TenantId = &tenantId
	}

	// No error
	return nil
}

// AssignProperties_From_ResourceAccessRule populates our ResourceAccessRule from the provided source ResourceAccessRule
func (rule *ResourceAccessRule) AssignProperties_From_ResourceAccessRule(source *storage.ResourceAccessRule) error {

	// ResourceReference
	if source.ResourceReference != nil {
		resourceReference := source.ResourceReference.Copy()
		rule.ResourceReference = &resourceReference
	} else {
		rule.ResourceReference = nil
	}

	// TenantId
	rule.TenantId = genruntime.ClonePointerToString(source.TenantId)

	// No error
	return nil
}

// AssignProperties_To_ResourceAccessRule populates the provided destination ResourceAccessRule from our ResourceAccessRule
func (rule *ResourceAccessRule) AssignProperties_To_ResourceAccessRule(destination *storage.ResourceAccessRule) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// ResourceReference
	if rule.ResourceReference != nil {
		resourceReference := rule.ResourceReference.Copy()
		destination.ResourceReference = &resourceReference
	} else {
		destination.ResourceReference = nil
	}

	// TenantId
	destination.TenantId = genruntime.ClonePointerToString(rule.TenantId)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Resource Access Rule.
type ResourceAccessRule_STATUS struct {
	// ResourceId: Resource Id
	ResourceId *string `json:"resourceId,omitempty"`

	// TenantId: Tenant Id
	TenantId *string `json:"tenantId,omitempty"`
}

var _ genruntime.FromARMConverter = &ResourceAccessRule_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (rule *ResourceAccessRule_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ResourceAccessRule_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (rule *ResourceAccessRule_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ResourceAccessRule_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ResourceAccessRule_STATUS, got %T", armInput)
	}

	// Set property "ResourceId":
	if typedInput.ResourceId != nil {
		resourceId := *typedInput.ResourceId
		rule.ResourceId = &resourceId
	}

	// Set property "TenantId":
	if typedInput.TenantId != nil {
		tenantId := *typedInput.TenantId
		rule.TenantId = &tenantId
	}

	// No error
	return nil
}

// AssignProperties_From_ResourceAccessRule_STATUS populates our ResourceAccessRule_STATUS from the provided source ResourceAccessRule_STATUS
func (rule *ResourceAccessRule_STATUS) AssignProperties_From_ResourceAccessRule_STATUS(source *storage.ResourceAccessRule_STATUS) error {

	// ResourceId
	rule.ResourceId = genruntime.ClonePointerToString(source.ResourceId)

	// TenantId
	rule.TenantId = genruntime.ClonePointerToString(source.TenantId)

	// No error
	return nil
}

// AssignProperties_To_ResourceAccessRule_STATUS populates the provided destination ResourceAccessRule_STATUS from our ResourceAccessRule_STATUS
func (rule *ResourceAccessRule_STATUS) AssignProperties_To_ResourceAccessRule_STATUS(destination *storage.ResourceAccessRule_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// ResourceId
	destination.ResourceId = genruntime.ClonePointerToString(rule.ResourceId)

	// TenantId
	destination.TenantId = genruntime.ClonePointerToString(rule.TenantId)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"InternetRouting","MicrosoftRouting"}
type RoutingPreference_RoutingChoice string

const (
	RoutingPreference_RoutingChoice_InternetRouting  = RoutingPreference_RoutingChoice("InternetRouting")
	RoutingPreference_RoutingChoice_MicrosoftRouting = RoutingPreference_RoutingChoice("MicrosoftRouting")
)

// Mapping from string to RoutingPreference_RoutingChoice
var routingPreference_RoutingChoice_Values = map[string]RoutingPreference_RoutingChoice{
	"internetrouting":  RoutingPreference_RoutingChoice_InternetRouting,
	"microsoftrouting": RoutingPreference_RoutingChoice_MicrosoftRouting,
}

type RoutingPreference_RoutingChoice_STATUS string

const (
	RoutingPreference_RoutingChoice_STATUS_InternetRouting  = RoutingPreference_RoutingChoice_STATUS("InternetRouting")
	RoutingPreference_RoutingChoice_STATUS_MicrosoftRouting = RoutingPreference_RoutingChoice_STATUS("MicrosoftRouting")
)

// Mapping from string to RoutingPreference_RoutingChoice_STATUS
var routingPreference_RoutingChoice_STATUS_Values = map[string]RoutingPreference_RoutingChoice_STATUS{
	"internetrouting":  RoutingPreference_RoutingChoice_STATUS_InternetRouting,
	"microsoftrouting": RoutingPreference_RoutingChoice_STATUS_MicrosoftRouting,
}

// +kubebuilder:validation:Enum={"Log"}
type SasPolicy_ExpirationAction string

const SasPolicy_ExpirationAction_Log = SasPolicy_ExpirationAction("Log")

// Mapping from string to SasPolicy_ExpirationAction
var sasPolicy_ExpirationAction_Values = map[string]SasPolicy_ExpirationAction{
	"log": SasPolicy_ExpirationAction_Log,
}

type SasPolicy_ExpirationAction_STATUS string

const SasPolicy_ExpirationAction_STATUS_Log = SasPolicy_ExpirationAction_STATUS("Log")

// Mapping from string to SasPolicy_ExpirationAction_STATUS
var sasPolicy_ExpirationAction_STATUS_Values = map[string]SasPolicy_ExpirationAction_STATUS{
	"log": SasPolicy_ExpirationAction_STATUS_Log,
}

// The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called
// accountType.
// +kubebuilder:validation:Enum={"Premium_LRS","Premium_ZRS","Standard_GRS","Standard_GZRS","Standard_LRS","Standard_RAGRS","Standard_RAGZRS","Standard_ZRS"}
type SkuName string

const (
	SkuName_Premium_LRS     = SkuName("Premium_LRS")
	SkuName_Premium_ZRS     = SkuName("Premium_ZRS")
	SkuName_Standard_GRS    = SkuName("Standard_GRS")
	SkuName_Standard_GZRS   = SkuName("Standard_GZRS")
	SkuName_Standard_LRS    = SkuName("Standard_LRS")
	SkuName_Standard_RAGRS  = SkuName("Standard_RAGRS")
	SkuName_Standard_RAGZRS = SkuName("Standard_RAGZRS")
	SkuName_Standard_ZRS    = SkuName("Standard_ZRS")
)

// Mapping from string to SkuName
var skuName_Values = map[string]SkuName{
	"premium_lrs":     SkuName_Premium_LRS,
	"premium_zrs":     SkuName_Premium_ZRS,
	"standard_grs":    SkuName_Standard_GRS,
	"standard_gzrs":   SkuName_Standard_GZRS,
	"standard_lrs":    SkuName_Standard_LRS,
	"standard_ragrs":  SkuName_Standard_RAGRS,
	"standard_ragzrs": SkuName_Standard_RAGZRS,
	"standard_zrs":    SkuName_Standard_ZRS,
}

// The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called
// accountType.
type SkuName_STATUS string

const (
	SkuName_STATUS_Premium_LRS     = SkuName_STATUS("Premium_LRS")
	SkuName_STATUS_Premium_ZRS     = SkuName_STATUS("Premium_ZRS")
	SkuName_STATUS_Standard_GRS    = SkuName_STATUS("Standard_GRS")
	SkuName_STATUS_Standard_GZRS   = SkuName_STATUS("Standard_GZRS")
	SkuName_STATUS_Standard_LRS    = SkuName_STATUS("Standard_LRS")
	SkuName_STATUS_Standard_RAGRS  = SkuName_STATUS("Standard_RAGRS")
	SkuName_STATUS_Standard_RAGZRS = SkuName_STATUS("Standard_RAGZRS")
	SkuName_STATUS_Standard_ZRS    = SkuName_STATUS("Standard_ZRS")
)

// Mapping from string to SkuName_STATUS
var skuName_STATUS_Values = map[string]SkuName_STATUS{
	"premium_lrs":     SkuName_STATUS_Premium_LRS,
	"premium_zrs":     SkuName_STATUS_Premium_ZRS,
	"standard_grs":    SkuName_STATUS_Standard_GRS,
	"standard_gzrs":   SkuName_STATUS_Standard_GZRS,
	"standard_lrs":    SkuName_STATUS_Standard_LRS,
	"standard_ragrs":  SkuName_STATUS_Standard_RAGRS,
	"standard_ragzrs": SkuName_STATUS_Standard_RAGZRS,
	"standard_zrs":    SkuName_STATUS_Standard_ZRS,
}

// 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: Gets the blob endpoint.
	Blob *string `json:"blob,omitempty"`

	// Dfs: Gets the dfs endpoint.
	Dfs *string `json:"dfs,omitempty"`

	// File: Gets the file endpoint.
	File *string `json:"file,omitempty"`

	// Web: Gets the web endpoint.
	Web *string `json:"web,omitempty"`
}

var _ genruntime.FromARMConverter = &StorageAccountInternetEndpoints_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (endpoints *StorageAccountInternetEndpoints_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.StorageAccountInternetEndpoints_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (endpoints *StorageAccountInternetEndpoints_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.StorageAccountInternetEndpoints_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.StorageAccountInternetEndpoints_STATUS, got %T", armInput)
	}

	// Set property "Blob":
	if typedInput.Blob != nil {
		blob := *typedInput.Blob
		endpoints.Blob = &blob
	}

	// Set property "Dfs":
	if typedInput.Dfs != nil {
		dfs := *typedInput.Dfs
		endpoints.Dfs = &dfs
	}

	// Set property "File":
	if typedInput.File != nil {
		file := *typedInput.File
		endpoints.File = &file
	}

	// Set property "Web":
	if typedInput.Web != nil {
		web := *typedInput.Web
		endpoints.Web = &web
	}

	// No error
	return nil
}

// AssignProperties_From_StorageAccountInternetEndpoints_STATUS populates our StorageAccountInternetEndpoints_STATUS from the provided source StorageAccountInternetEndpoints_STATUS
func (endpoints *StorageAccountInternetEndpoints_STATUS) AssignProperties_From_StorageAccountInternetEndpoints_STATUS(source *storage.StorageAccountInternetEndpoints_STATUS) error {

	// Blob
	endpoints.Blob = genruntime.ClonePointerToString(source.Blob)

	// Dfs
	endpoints.Dfs = genruntime.ClonePointerToString(source.Dfs)

	// File
	endpoints.File = genruntime.ClonePointerToString(source.File)

	// Web
	endpoints.Web = genruntime.ClonePointerToString(source.Web)

	// No error
	return nil
}

// AssignProperties_To_StorageAccountInternetEndpoints_STATUS populates the provided destination StorageAccountInternetEndpoints_STATUS from our StorageAccountInternetEndpoints_STATUS
func (endpoints *StorageAccountInternetEndpoints_STATUS) AssignProperties_To_StorageAccountInternetEndpoints_STATUS(destination *storage.StorageAccountInternetEndpoints_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Blob
	destination.Blob = genruntime.ClonePointerToString(endpoints.Blob)

	// Dfs
	destination.Dfs = genruntime.ClonePointerToString(endpoints.Dfs)

	// File
	destination.File = genruntime.ClonePointerToString(endpoints.File)

	// Web
	destination.Web = genruntime.ClonePointerToString(endpoints.Web)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// 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: Gets the blob endpoint.
	Blob *string `json:"blob,omitempty"`

	// Dfs: Gets the dfs endpoint.
	Dfs *string `json:"dfs,omitempty"`

	// File: Gets the file endpoint.
	File *string `json:"file,omitempty"`

	// Queue: Gets the queue endpoint.
	Queue *string `json:"queue,omitempty"`

	// Table: Gets the table endpoint.
	Table *string `json:"table,omitempty"`

	// Web: Gets the web endpoint.
	Web *string `json:"web,omitempty"`
}

var _ genruntime.FromARMConverter = &StorageAccountMicrosoftEndpoints_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (endpoints *StorageAccountMicrosoftEndpoints_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.StorageAccountMicrosoftEndpoints_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (endpoints *StorageAccountMicrosoftEndpoints_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.StorageAccountMicrosoftEndpoints_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.StorageAccountMicrosoftEndpoints_STATUS, got %T", armInput)
	}

	// Set property "Blob":
	if typedInput.Blob != nil {
		blob := *typedInput.Blob
		endpoints.Blob = &blob
	}

	// Set property "Dfs":
	if typedInput.Dfs != nil {
		dfs := *typedInput.Dfs
		endpoints.Dfs = &dfs
	}

	// Set property "File":
	if typedInput.File != nil {
		file := *typedInput.File
		endpoints.File = &file
	}

	// Set property "Queue":
	if typedInput.Queue != nil {
		queue := *typedInput.Queue
		endpoints.Queue = &queue
	}

	// Set property "Table":
	if typedInput.Table != nil {
		table := *typedInput.Table
		endpoints.Table = &table
	}

	// Set property "Web":
	if typedInput.Web != nil {
		web := *typedInput.Web
		endpoints.Web = &web
	}

	// No error
	return nil
}

// AssignProperties_From_StorageAccountMicrosoftEndpoints_STATUS populates our StorageAccountMicrosoftEndpoints_STATUS from the provided source StorageAccountMicrosoftEndpoints_STATUS
func (endpoints *StorageAccountMicrosoftEndpoints_STATUS) AssignProperties_From_StorageAccountMicrosoftEndpoints_STATUS(source *storage.StorageAccountMicrosoftEndpoints_STATUS) error {

	// Blob
	endpoints.Blob = genruntime.ClonePointerToString(source.Blob)

	// Dfs
	endpoints.Dfs = genruntime.ClonePointerToString(source.Dfs)

	// File
	endpoints.File = genruntime.ClonePointerToString(source.File)

	// Queue
	endpoints.Queue = genruntime.ClonePointerToString(source.Queue)

	// Table
	endpoints.Table = genruntime.ClonePointerToString(source.Table)

	// Web
	endpoints.Web = genruntime.ClonePointerToString(source.Web)

	// No error
	return nil
}

// AssignProperties_To_StorageAccountMicrosoftEndpoints_STATUS populates the provided destination StorageAccountMicrosoftEndpoints_STATUS from our StorageAccountMicrosoftEndpoints_STATUS
func (endpoints *StorageAccountMicrosoftEndpoints_STATUS) AssignProperties_To_StorageAccountMicrosoftEndpoints_STATUS(destination *storage.StorageAccountMicrosoftEndpoints_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Blob
	destination.Blob = genruntime.ClonePointerToString(endpoints.Blob)

	// Dfs
	destination.Dfs = genruntime.ClonePointerToString(endpoints.Dfs)

	// File
	destination.File = genruntime.ClonePointerToString(endpoints.File)

	// Queue
	destination.Queue = genruntime.ClonePointerToString(endpoints.Queue)

	// Table
	destination.Table = genruntime.ClonePointerToString(endpoints.Table)

	// Web
	destination.Web = genruntime.ClonePointerToString(endpoints.Web)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

type StorageAccountOperatorConfigMaps struct {
	// BlobEndpoint: indicates where the BlobEndpoint config map should be placed. If omitted, no config map will be created.
	BlobEndpoint *genruntime.ConfigMapDestination `json:"blobEndpoint,omitempty"`

	// DfsEndpoint: indicates where the DfsEndpoint config map should be placed. If omitted, no config map will be created.
	DfsEndpoint *genruntime.ConfigMapDestination `json:"dfsEndpoint,omitempty"`

	// FileEndpoint: indicates where the FileEndpoint config map should be placed. If omitted, no config map will be created.
	FileEndpoint *genruntime.ConfigMapDestination `json:"fileEndpoint,omitempty"`

	// QueueEndpoint: indicates where the QueueEndpoint config map should be placed. If omitted, no config map will be created.
	QueueEndpoint *genruntime.ConfigMapDestination `json:"queueEndpoint,omitempty"`

	// TableEndpoint: indicates where the TableEndpoint config map should be placed. If omitted, no config map will be created.
	TableEndpoint *genruntime.ConfigMapDestination `json:"tableEndpoint,omitempty"`

	// WebEndpoint: indicates where the WebEndpoint config map should be placed. If omitted, no config map will be created.
	WebEndpoint *genruntime.ConfigMapDestination `json:"webEndpoint,omitempty"`
}

// AssignProperties_From_StorageAccountOperatorConfigMaps populates our StorageAccountOperatorConfigMaps from the provided source StorageAccountOperatorConfigMaps
func (maps *StorageAccountOperatorConfigMaps) AssignProperties_From_StorageAccountOperatorConfigMaps(source *storage.StorageAccountOperatorConfigMaps) error {

	// BlobEndpoint
	if source.BlobEndpoint != nil {
		blobEndpoint := source.BlobEndpoint.Copy()
		maps.BlobEndpoint = &blobEndpoint
	} else {
		maps.BlobEndpoint = nil
	}

	// DfsEndpoint
	if source.DfsEndpoint != nil {
		dfsEndpoint := source.DfsEndpoint.Copy()
		maps.DfsEndpoint = &dfsEndpoint
	} else {
		maps.DfsEndpoint = nil
	}

	// FileEndpoint
	if source.FileEndpoint != nil {
		fileEndpoint := source.FileEndpoint.Copy()
		maps.FileEndpoint = &fileEndpoint
	} else {
		maps.FileEndpoint = nil
	}

	// QueueEndpoint
	if source.QueueEndpoint != nil {
		queueEndpoint := source.QueueEndpoint.Copy()
		maps.QueueEndpoint = &queueEndpoint
	} else {
		maps.QueueEndpoint = nil
	}

	// TableEndpoint
	if source.TableEndpoint != nil {
		tableEndpoint := source.TableEndpoint.Copy()
		maps.TableEndpoint = &tableEndpoint
	} else {
		maps.TableEndpoint = nil
	}

	// WebEndpoint
	if source.WebEndpoint != nil {
		webEndpoint := source.WebEndpoint.Copy()
		maps.WebEndpoint = &webEndpoint
	} else {
		maps.WebEndpoint = nil
	}

	// No error
	return nil
}

// AssignProperties_To_StorageAccountOperatorConfigMaps populates the provided destination StorageAccountOperatorConfigMaps from our StorageAccountOperatorConfigMaps
func (maps *StorageAccountOperatorConfigMaps) AssignProperties_To_StorageAccountOperatorConfigMaps(destination *storage.StorageAccountOperatorConfigMaps) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// BlobEndpoint
	if maps.BlobEndpoint != nil {
		blobEndpoint := maps.BlobEndpoint.Copy()
		destination.BlobEndpoint = &blobEndpoint
	} else {
		destination.BlobEndpoint = nil
	}

	// DfsEndpoint
	if maps.DfsEndpoint != nil {
		dfsEndpoint := maps.DfsEndpoint.Copy()
		destination.DfsEndpoint = &dfsEndpoint
	} else {
		destination.DfsEndpoint = nil
	}

	// FileEndpoint
	if maps.FileEndpoint != nil {
		fileEndpoint := maps.FileEndpoint.Copy()
		destination.FileEndpoint = &fileEndpoint
	} else {
		destination.FileEndpoint = nil
	}

	// QueueEndpoint
	if maps.QueueEndpoint != nil {
		queueEndpoint := maps.QueueEndpoint.Copy()
		destination.QueueEndpoint = &queueEndpoint
	} else {
		destination.QueueEndpoint = nil
	}

	// TableEndpoint
	if maps.TableEndpoint != nil {
		tableEndpoint := maps.TableEndpoint.Copy()
		destination.TableEndpoint = &tableEndpoint
	} else {
		destination.TableEndpoint = nil
	}

	// WebEndpoint
	if maps.WebEndpoint != nil {
		webEndpoint := maps.WebEndpoint.Copy()
		destination.WebEndpoint = &webEndpoint
	} else {
		destination.WebEndpoint = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

type StorageAccountOperatorSecrets struct {
	// BlobEndpoint: indicates where the BlobEndpoint secret should be placed. If omitted, the secret will not be retrieved
	// from Azure.
	BlobEndpoint *genruntime.SecretDestination `json:"blobEndpoint,omitempty"`

	// DfsEndpoint: indicates where the DfsEndpoint secret should be placed. If omitted, the secret will not be retrieved from
	// Azure.
	DfsEndpoint *genruntime.SecretDestination `json:"dfsEndpoint,omitempty"`

	// FileEndpoint: indicates where the FileEndpoint secret should be placed. If omitted, the secret will not be retrieved
	// from Azure.
	FileEndpoint *genruntime.SecretDestination `json:"fileEndpoint,omitempty"`

	// Key1: indicates where the Key1 secret should be placed. If omitted, the secret will not be retrieved from Azure.
	Key1 *genruntime.SecretDestination `json:"key1,omitempty"`

	// Key2: indicates where the Key2 secret should be placed. If omitted, the secret will not be retrieved from Azure.
	Key2 *genruntime.SecretDestination `json:"key2,omitempty"`

	// QueueEndpoint: indicates where the QueueEndpoint secret should be placed. If omitted, the secret will not be retrieved
	// from Azure.
	QueueEndpoint *genruntime.SecretDestination `json:"queueEndpoint,omitempty"`

	// TableEndpoint: indicates where the TableEndpoint secret should be placed. If omitted, the secret will not be retrieved
	// from Azure.
	TableEndpoint *genruntime.SecretDestination `json:"tableEndpoint,omitempty"`

	// WebEndpoint: indicates where the WebEndpoint secret should be placed. If omitted, the secret will not be retrieved from
	// Azure.
	WebEndpoint *genruntime.SecretDestination `json:"webEndpoint,omitempty"`
}

// AssignProperties_From_StorageAccountOperatorSecrets populates our StorageAccountOperatorSecrets from the provided source StorageAccountOperatorSecrets
func (secrets *StorageAccountOperatorSecrets) AssignProperties_From_StorageAccountOperatorSecrets(source *storage.StorageAccountOperatorSecrets) error {

	// BlobEndpoint
	if source.BlobEndpoint != nil {
		blobEndpoint := source.BlobEndpoint.Copy()
		secrets.BlobEndpoint = &blobEndpoint
	} else {
		secrets.BlobEndpoint = nil
	}

	// DfsEndpoint
	if source.DfsEndpoint != nil {
		dfsEndpoint := source.DfsEndpoint.Copy()
		secrets.DfsEndpoint = &dfsEndpoint
	} else {
		secrets.DfsEndpoint = nil
	}

	// FileEndpoint
	if source.FileEndpoint != nil {
		fileEndpoint := source.FileEndpoint.Copy()
		secrets.FileEndpoint = &fileEndpoint
	} else {
		secrets.FileEndpoint = nil
	}

	// Key1
	if source.Key1 != nil {
		key1 := source.Key1.Copy()
		secrets.Key1 = &key1
	} else {
		secrets.Key1 = nil
	}

	// Key2
	if source.Key2 != nil {
		key2 := source.Key2.Copy()
		secrets.Key2 = &key2
	} else {
		secrets.Key2 = nil
	}

	// QueueEndpoint
	if source.QueueEndpoint != nil {
		queueEndpoint := source.QueueEndpoint.Copy()
		secrets.QueueEndpoint = &queueEndpoint
	} else {
		secrets.QueueEndpoint = nil
	}

	// TableEndpoint
	if source.TableEndpoint != nil {
		tableEndpoint := source.TableEndpoint.Copy()
		secrets.TableEndpoint = &tableEndpoint
	} else {
		secrets.TableEndpoint = nil
	}

	// WebEndpoint
	if source.WebEndpoint != nil {
		webEndpoint := source.WebEndpoint.Copy()
		secrets.WebEndpoint = &webEndpoint
	} else {
		secrets.WebEndpoint = nil
	}

	// No error
	return nil
}

// AssignProperties_To_StorageAccountOperatorSecrets populates the provided destination StorageAccountOperatorSecrets from our StorageAccountOperatorSecrets
func (secrets *StorageAccountOperatorSecrets) AssignProperties_To_StorageAccountOperatorSecrets(destination *storage.StorageAccountOperatorSecrets) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// BlobEndpoint
	if secrets.BlobEndpoint != nil {
		blobEndpoint := secrets.BlobEndpoint.Copy()
		destination.BlobEndpoint = &blobEndpoint
	} else {
		destination.BlobEndpoint = nil
	}

	// DfsEndpoint
	if secrets.DfsEndpoint != nil {
		dfsEndpoint := secrets.DfsEndpoint.Copy()
		destination.DfsEndpoint = &dfsEndpoint
	} else {
		destination.DfsEndpoint = nil
	}

	// FileEndpoint
	if secrets.FileEndpoint != nil {
		fileEndpoint := secrets.FileEndpoint.Copy()
		destination.FileEndpoint = &fileEndpoint
	} else {
		destination.FileEndpoint = nil
	}

	// Key1
	if secrets.Key1 != nil {
		key1 := secrets.Key1.Copy()
		destination.Key1 = &key1
	} else {
		destination.Key1 = nil
	}

	// Key2
	if secrets.Key2 != nil {
		key2 := secrets.Key2.Copy()
		destination.Key2 = &key2
	} else {
		destination.Key2 = nil
	}

	// QueueEndpoint
	if secrets.QueueEndpoint != nil {
		queueEndpoint := secrets.QueueEndpoint.Copy()
		destination.QueueEndpoint = &queueEndpoint
	} else {
		destination.QueueEndpoint = nil
	}

	// TableEndpoint
	if secrets.TableEndpoint != nil {
		tableEndpoint := secrets.TableEndpoint.Copy()
		destination.TableEndpoint = &tableEndpoint
	} else {
		destination.TableEndpoint = nil
	}

	// WebEndpoint
	if secrets.WebEndpoint != nil {
		webEndpoint := secrets.WebEndpoint.Copy()
		destination.WebEndpoint = &webEndpoint
	} else {
		destination.WebEndpoint = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// The SKU tier. This is based on the SKU name.
// +kubebuilder:validation:Enum={"Premium","Standard"}
type Tier string

const (
	Tier_Premium  = Tier("Premium")
	Tier_Standard = Tier("Standard")
)

// Mapping from string to Tier
var tier_Values = map[string]Tier{
	"premium":  Tier_Premium,
	"standard": Tier_Standard,
}

// The SKU tier. This is based on the SKU name.
type Tier_STATUS string

const (
	Tier_STATUS_Premium  = Tier_STATUS("Premium")
	Tier_STATUS_Standard = Tier_STATUS("Standard")
)

// Mapping from string to Tier_STATUS
var tier_STATUS_Values = map[string]Tier_STATUS{
	"premium":  Tier_STATUS_Premium,
	"standard": Tier_STATUS_Standard,
}

// UserAssignedIdentity for the resource.
type UserAssignedIdentity_STATUS struct {
	// ClientId: The client ID of the identity.
	ClientId *string `json:"clientId,omitempty"`

	// PrincipalId: The principal ID of the identity.
	PrincipalId *string `json:"principalId,omitempty"`
}

var _ genruntime.FromARMConverter = &UserAssignedIdentity_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (identity *UserAssignedIdentity_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.UserAssignedIdentity_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (identity *UserAssignedIdentity_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.UserAssignedIdentity_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.UserAssignedIdentity_STATUS, got %T", armInput)
	}

	// Set property "ClientId":
	if typedInput.ClientId != nil {
		clientId := *typedInput.ClientId
		identity.ClientId = &clientId
	}

	// Set property "PrincipalId":
	if typedInput.PrincipalId != nil {
		principalId := *typedInput.PrincipalId
		identity.PrincipalId = &principalId
	}

	// No error
	return nil
}

// AssignProperties_From_UserAssignedIdentity_STATUS populates our UserAssignedIdentity_STATUS from the provided source UserAssignedIdentity_STATUS
func (identity *UserAssignedIdentity_STATUS) AssignProperties_From_UserAssignedIdentity_STATUS(source *storage.UserAssignedIdentity_STATUS) error {

	// ClientId
	identity.ClientId = genruntime.ClonePointerToString(source.ClientId)

	// PrincipalId
	identity.PrincipalId = genruntime.ClonePointerToString(source.PrincipalId)

	// No error
	return nil
}

// AssignProperties_To_UserAssignedIdentity_STATUS populates the provided destination UserAssignedIdentity_STATUS from our UserAssignedIdentity_STATUS
func (identity *UserAssignedIdentity_STATUS) AssignProperties_To_UserAssignedIdentity_STATUS(destination *storage.UserAssignedIdentity_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// ClientId
	destination.ClientId = genruntime.ClonePointerToString(identity.ClientId)

	// PrincipalId
	destination.PrincipalId = genruntime.ClonePointerToString(identity.PrincipalId)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Information about the user assigned identity for the resource
type UserAssignedIdentityDetails struct {
	Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"`
}

// AssignProperties_From_UserAssignedIdentityDetails populates our UserAssignedIdentityDetails from the provided source UserAssignedIdentityDetails
func (details *UserAssignedIdentityDetails) AssignProperties_From_UserAssignedIdentityDetails(source *storage.UserAssignedIdentityDetails) error {

	// Reference
	details.Reference = source.Reference.Copy()

	// No error
	return nil
}

// AssignProperties_To_UserAssignedIdentityDetails populates the provided destination UserAssignedIdentityDetails from our UserAssignedIdentityDetails
func (details *UserAssignedIdentityDetails) AssignProperties_To_UserAssignedIdentityDetails(destination *storage.UserAssignedIdentityDetails) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Reference
	destination.Reference = details.Reference.Copy()

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Virtual Network rule.
type VirtualNetworkRule struct {
	// Action: The action of virtual network rule.
	Action *VirtualNetworkRule_Action `json:"action,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: Gets the state of virtual network rule.
	State *VirtualNetworkRule_State `json:"state,omitempty"`
}

var _ genruntime.ARMTransformer = &VirtualNetworkRule{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (rule *VirtualNetworkRule) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if rule == nil {
		return nil, nil
	}
	result := &arm.VirtualNetworkRule{}

	// Set property "Action":
	if rule.Action != nil {
		var temp string
		temp = string(*rule.Action)
		action := arm.VirtualNetworkRule_Action(temp)
		result.Action = &action
	}

	// Set property "Id":
	if rule.Reference != nil {
		referenceARMID, err := resolved.ResolvedReferences.Lookup(*rule.Reference)
		if err != nil {
			return nil, err
		}
		reference := referenceARMID
		result.Id = &reference
	}

	// Set property "State":
	if rule.State != nil {
		var temp string
		temp = string(*rule.State)
		state := arm.VirtualNetworkRule_State(temp)
		result.State = &state
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (rule *VirtualNetworkRule) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.VirtualNetworkRule{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (rule *VirtualNetworkRule) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.VirtualNetworkRule)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.VirtualNetworkRule, got %T", armInput)
	}

	// Set property "Action":
	if typedInput.Action != nil {
		var temp string
		temp = string(*typedInput.Action)
		action := VirtualNetworkRule_Action(temp)
		rule.Action = &action
	}

	// no assignment for property "Reference"

	// Set property "State":
	if typedInput.State != nil {
		var temp string
		temp = string(*typedInput.State)
		state := VirtualNetworkRule_State(temp)
		rule.State = &state
	}

	// No error
	return nil
}

// AssignProperties_From_VirtualNetworkRule populates our VirtualNetworkRule from the provided source VirtualNetworkRule
func (rule *VirtualNetworkRule) AssignProperties_From_VirtualNetworkRule(source *storage.VirtualNetworkRule) error {

	// Action
	if source.Action != nil {
		action := *source.Action
		actionTemp := genruntime.ToEnum(action, virtualNetworkRule_Action_Values)
		rule.Action = &actionTemp
	} else {
		rule.Action = nil
	}

	// Reference
	if source.Reference != nil {
		reference := source.Reference.Copy()
		rule.Reference = &reference
	} else {
		rule.Reference = nil
	}

	// State
	if source.State != nil {
		state := *source.State
		stateTemp := genruntime.ToEnum(state, virtualNetworkRule_State_Values)
		rule.State = &stateTemp
	} else {
		rule.State = nil
	}

	// No error
	return nil
}

// AssignProperties_To_VirtualNetworkRule populates the provided destination VirtualNetworkRule from our VirtualNetworkRule
func (rule *VirtualNetworkRule) AssignProperties_To_VirtualNetworkRule(destination *storage.VirtualNetworkRule) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Action
	if rule.Action != nil {
		action := string(*rule.Action)
		destination.Action = &action
	} else {
		destination.Action = nil
	}

	// Reference
	if rule.Reference != nil {
		reference := rule.Reference.Copy()
		destination.Reference = &reference
	} else {
		destination.Reference = nil
	}

	// State
	if rule.State != nil {
		state := string(*rule.State)
		destination.State = &state
	} else {
		destination.State = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Virtual Network rule.
type VirtualNetworkRule_STATUS struct {
	// Action: The action of virtual network rule.
	Action *VirtualNetworkRule_Action_STATUS `json:"action,omitempty"`

	// Id: Resource ID of a subnet, for example:
	// /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
	Id *string `json:"id,omitempty"`

	// State: Gets the state of virtual network rule.
	State *VirtualNetworkRule_State_STATUS `json:"state,omitempty"`
}

var _ genruntime.FromARMConverter = &VirtualNetworkRule_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (rule *VirtualNetworkRule_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.VirtualNetworkRule_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (rule *VirtualNetworkRule_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.VirtualNetworkRule_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.VirtualNetworkRule_STATUS, got %T", armInput)
	}

	// Set property "Action":
	if typedInput.Action != nil {
		var temp string
		temp = string(*typedInput.Action)
		action := VirtualNetworkRule_Action_STATUS(temp)
		rule.Action = &action
	}

	// Set property "Id":
	if typedInput.Id != nil {
		id := *typedInput.Id
		rule.Id = &id
	}

	// Set property "State":
	if typedInput.State != nil {
		var temp string
		temp = string(*typedInput.State)
		state := VirtualNetworkRule_State_STATUS(temp)
		rule.State = &state
	}

	// No error
	return nil
}

// AssignProperties_From_VirtualNetworkRule_STATUS populates our VirtualNetworkRule_STATUS from the provided source VirtualNetworkRule_STATUS
func (rule *VirtualNetworkRule_STATUS) AssignProperties_From_VirtualNetworkRule_STATUS(source *storage.VirtualNetworkRule_STATUS) error {

	// Action
	if source.Action != nil {
		action := *source.Action
		actionTemp := genruntime.ToEnum(action, virtualNetworkRule_Action_STATUS_Values)
		rule.Action = &actionTemp
	} else {
		rule.Action = nil
	}

	// Id
	rule.Id = genruntime.ClonePointerToString(source.Id)

	// State
	if source.State != nil {
		state := *source.State
		stateTemp := genruntime.ToEnum(state, virtualNetworkRule_State_STATUS_Values)
		rule.State = &stateTemp
	} else {
		rule.State = nil
	}

	// No error
	return nil
}

// AssignProperties_To_VirtualNetworkRule_STATUS populates the provided destination VirtualNetworkRule_STATUS from our VirtualNetworkRule_STATUS
func (rule *VirtualNetworkRule_STATUS) AssignProperties_To_VirtualNetworkRule_STATUS(destination *storage.VirtualNetworkRule_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Action
	if rule.Action != nil {
		action := string(*rule.Action)
		destination.Action = &action
	} else {
		destination.Action = nil
	}

	// Id
	destination.Id = genruntime.ClonePointerToString(rule.Id)

	// State
	if rule.State != nil {
		state := string(*rule.State)
		destination.State = &state
	} else {
		destination.State = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Blob range
type BlobRestoreRange_STATUS struct {
	// EndRange: Blob end range. This is exclusive. Empty means account end.
	EndRange *string `json:"endRange,omitempty"`

	// StartRange: Blob start range. This is inclusive. Empty means account start.
	StartRange *string `json:"startRange,omitempty"`
}

var _ genruntime.FromARMConverter = &BlobRestoreRange_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (restoreRange *BlobRestoreRange_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.BlobRestoreRange_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (restoreRange *BlobRestoreRange_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.BlobRestoreRange_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.BlobRestoreRange_STATUS, got %T", armInput)
	}

	// Set property "EndRange":
	if typedInput.EndRange != nil {
		endRange := *typedInput.EndRange
		restoreRange.EndRange = &endRange
	}

	// Set property "StartRange":
	if typedInput.StartRange != nil {
		startRange := *typedInput.StartRange
		restoreRange.StartRange = &startRange
	}

	// No error
	return nil
}

// AssignProperties_From_BlobRestoreRange_STATUS populates our BlobRestoreRange_STATUS from the provided source BlobRestoreRange_STATUS
func (restoreRange *BlobRestoreRange_STATUS) AssignProperties_From_BlobRestoreRange_STATUS(source *storage.BlobRestoreRange_STATUS) error {

	// EndRange
	restoreRange.EndRange = genruntime.ClonePointerToString(source.EndRange)

	// StartRange
	restoreRange.StartRange = genruntime.ClonePointerToString(source.StartRange)

	// No error
	return nil
}

// AssignProperties_To_BlobRestoreRange_STATUS populates the provided destination BlobRestoreRange_STATUS from our BlobRestoreRange_STATUS
func (restoreRange *BlobRestoreRange_STATUS) AssignProperties_To_BlobRestoreRange_STATUS(destination *storage.BlobRestoreRange_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// EndRange
	destination.EndRange = genruntime.ClonePointerToString(restoreRange.EndRange)

	// StartRange
	destination.StartRange = genruntime.ClonePointerToString(restoreRange.StartRange)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// A service that allows server-side encryption to be used.
type EncryptionService struct {
	// Enabled: A boolean indicating whether or not the service encrypts the data as it is stored.
	Enabled *bool `json:"enabled,omitempty"`

	// KeyType: Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped
	// encryption key will be used. 'Service' key type implies that a default service key is used.
	KeyType *EncryptionService_KeyType `json:"keyType,omitempty"`
}

var _ genruntime.ARMTransformer = &EncryptionService{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (service *EncryptionService) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if service == nil {
		return nil, nil
	}
	result := &arm.EncryptionService{}

	// Set property "Enabled":
	if service.Enabled != nil {
		enabled := *service.Enabled
		result.Enabled = &enabled
	}

	// Set property "KeyType":
	if service.KeyType != nil {
		var temp string
		temp = string(*service.KeyType)
		keyType := arm.EncryptionService_KeyType(temp)
		result.KeyType = &keyType
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (service *EncryptionService) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.EncryptionService{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (service *EncryptionService) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.EncryptionService)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.EncryptionService, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		service.Enabled = &enabled
	}

	// Set property "KeyType":
	if typedInput.KeyType != nil {
		var temp string
		temp = string(*typedInput.KeyType)
		keyType := EncryptionService_KeyType(temp)
		service.KeyType = &keyType
	}

	// No error
	return nil
}

// AssignProperties_From_EncryptionService populates our EncryptionService from the provided source EncryptionService
func (service *EncryptionService) AssignProperties_From_EncryptionService(source *storage.EncryptionService) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		service.Enabled = &enabled
	} else {
		service.Enabled = nil
	}

	// KeyType
	if source.KeyType != nil {
		keyType := *source.KeyType
		keyTypeTemp := genruntime.ToEnum(keyType, encryptionService_KeyType_Values)
		service.KeyType = &keyTypeTemp
	} else {
		service.KeyType = nil
	}

	// No error
	return nil
}

// AssignProperties_To_EncryptionService populates the provided destination EncryptionService from our EncryptionService
func (service *EncryptionService) AssignProperties_To_EncryptionService(destination *storage.EncryptionService) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if service.Enabled != nil {
		enabled := *service.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

	// KeyType
	if service.KeyType != nil {
		keyType := string(*service.KeyType)
		destination.KeyType = &keyType
	} else {
		destination.KeyType = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// A service that allows server-side encryption to be used.
type EncryptionService_STATUS struct {
	// Enabled: A boolean indicating whether or not the service encrypts the data as it is stored.
	Enabled *bool `json:"enabled,omitempty"`

	// KeyType: Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped
	// encryption key will be used. 'Service' key type implies that a default service key is used.
	KeyType *EncryptionService_KeyType_STATUS `json:"keyType,omitempty"`

	// LastEnabledTime: Gets a rough estimate of the date/time when the encryption was last enabled by the user. Only returned
	// when encryption is enabled. There might be some unencrypted blobs which were written after this time, as it is just a
	// rough estimate.
	LastEnabledTime *string `json:"lastEnabledTime,omitempty"`
}

var _ genruntime.FromARMConverter = &EncryptionService_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (service *EncryptionService_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.EncryptionService_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (service *EncryptionService_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.EncryptionService_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.EncryptionService_STATUS, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		service.Enabled = &enabled
	}

	// Set property "KeyType":
	if typedInput.KeyType != nil {
		var temp string
		temp = string(*typedInput.KeyType)
		keyType := EncryptionService_KeyType_STATUS(temp)
		service.KeyType = &keyType
	}

	// Set property "LastEnabledTime":
	if typedInput.LastEnabledTime != nil {
		lastEnabledTime := *typedInput.LastEnabledTime
		service.LastEnabledTime = &lastEnabledTime
	}

	// No error
	return nil
}

// AssignProperties_From_EncryptionService_STATUS populates our EncryptionService_STATUS from the provided source EncryptionService_STATUS
func (service *EncryptionService_STATUS) AssignProperties_From_EncryptionService_STATUS(source *storage.EncryptionService_STATUS) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		service.Enabled = &enabled
	} else {
		service.Enabled = nil
	}

	// KeyType
	if source.KeyType != nil {
		keyType := *source.KeyType
		keyTypeTemp := genruntime.ToEnum(keyType, encryptionService_KeyType_STATUS_Values)
		service.KeyType = &keyTypeTemp
	} else {
		service.KeyType = nil
	}

	// LastEnabledTime
	service.LastEnabledTime = genruntime.ClonePointerToString(source.LastEnabledTime)

	// No error
	return nil
}

// AssignProperties_To_EncryptionService_STATUS populates the provided destination EncryptionService_STATUS from our EncryptionService_STATUS
func (service *EncryptionService_STATUS) AssignProperties_To_EncryptionService_STATUS(destination *storage.EncryptionService_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if service.Enabled != nil {
		enabled := *service.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

	// KeyType
	if service.KeyType != nil {
		keyType := string(*service.KeyType)
		destination.KeyType = &keyType
	} else {
		destination.KeyType = nil
	}

	// LastEnabledTime
	destination.LastEnabledTime = genruntime.ClonePointerToString(service.LastEnabledTime)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"Allow"}
type IPRule_Action string

const IPRule_Action_Allow = IPRule_Action("Allow")

// Mapping from string to IPRule_Action
var iPRule_Action_Values = map[string]IPRule_Action{
	"allow": IPRule_Action_Allow,
}

type IPRule_Action_STATUS string

const IPRule_Action_STATUS_Allow = IPRule_Action_STATUS("Allow")

// Mapping from string to IPRule_Action_STATUS
var iPRule_Action_STATUS_Values = map[string]IPRule_Action_STATUS{
	"allow": IPRule_Action_STATUS_Allow,
}

// +kubebuilder:validation:Enum={"Allow"}
type VirtualNetworkRule_Action string

const VirtualNetworkRule_Action_Allow = VirtualNetworkRule_Action("Allow")

// Mapping from string to VirtualNetworkRule_Action
var virtualNetworkRule_Action_Values = map[string]VirtualNetworkRule_Action{
	"allow": VirtualNetworkRule_Action_Allow,
}

type VirtualNetworkRule_Action_STATUS string

const VirtualNetworkRule_Action_STATUS_Allow = VirtualNetworkRule_Action_STATUS("Allow")

// Mapping from string to VirtualNetworkRule_Action_STATUS
var virtualNetworkRule_Action_STATUS_Values = map[string]VirtualNetworkRule_Action_STATUS{
	"allow": VirtualNetworkRule_Action_STATUS_Allow,
}

// +kubebuilder:validation:Enum={"Deprovisioning","Failed","NetworkSourceDeleted","Provisioning","Succeeded"}
type VirtualNetworkRule_State string

const (
	VirtualNetworkRule_State_Deprovisioning       = VirtualNetworkRule_State("Deprovisioning")
	VirtualNetworkRule_State_Failed               = VirtualNetworkRule_State("Failed")
	VirtualNetworkRule_State_NetworkSourceDeleted = VirtualNetworkRule_State("NetworkSourceDeleted")
	VirtualNetworkRule_State_Provisioning         = VirtualNetworkRule_State("Provisioning")
	VirtualNetworkRule_State_Succeeded            = VirtualNetworkRule_State("Succeeded")
)

// Mapping from string to VirtualNetworkRule_State
var virtualNetworkRule_State_Values = map[string]VirtualNetworkRule_State{
	"deprovisioning":       VirtualNetworkRule_State_Deprovisioning,
	"failed":               VirtualNetworkRule_State_Failed,
	"networksourcedeleted": VirtualNetworkRule_State_NetworkSourceDeleted,
	"provisioning":         VirtualNetworkRule_State_Provisioning,
	"succeeded":            VirtualNetworkRule_State_Succeeded,
}

type VirtualNetworkRule_State_STATUS string

const (
	VirtualNetworkRule_State_STATUS_Deprovisioning       = VirtualNetworkRule_State_STATUS("Deprovisioning")
	VirtualNetworkRule_State_STATUS_Failed               = VirtualNetworkRule_State_STATUS("Failed")
	VirtualNetworkRule_State_STATUS_NetworkSourceDeleted = VirtualNetworkRule_State_STATUS("NetworkSourceDeleted")
	VirtualNetworkRule_State_STATUS_Provisioning         = VirtualNetworkRule_State_STATUS("Provisioning")
	VirtualNetworkRule_State_STATUS_Succeeded            = VirtualNetworkRule_State_STATUS("Succeeded")
)

// Mapping from string to VirtualNetworkRule_State_STATUS
var virtualNetworkRule_State_STATUS_Values = map[string]VirtualNetworkRule_State_STATUS{
	"deprovisioning":       VirtualNetworkRule_State_STATUS_Deprovisioning,
	"failed":               VirtualNetworkRule_State_STATUS_Failed,
	"networksourcedeleted": VirtualNetworkRule_State_STATUS_NetworkSourceDeleted,
	"provisioning":         VirtualNetworkRule_State_STATUS_Provisioning,
	"succeeded":            VirtualNetworkRule_State_STATUS_Succeeded,
}

// +kubebuilder:validation:Enum={"Account","Service"}
type EncryptionService_KeyType string

const (
	EncryptionService_KeyType_Account = EncryptionService_KeyType("Account")
	EncryptionService_KeyType_Service = EncryptionService_KeyType("Service")
)

// Mapping from string to EncryptionService_KeyType
var encryptionService_KeyType_Values = map[string]EncryptionService_KeyType{
	"account": EncryptionService_KeyType_Account,
	"service": EncryptionService_KeyType_Service,
}

type EncryptionService_KeyType_STATUS string

const (
	EncryptionService_KeyType_STATUS_Account = EncryptionService_KeyType_STATUS("Account")
	EncryptionService_KeyType_STATUS_Service = EncryptionService_KeyType_STATUS("Service")
)

// Mapping from string to EncryptionService_KeyType_STATUS
var encryptionService_KeyType_STATUS_Values = map[string]EncryptionService_KeyType_STATUS{
	"account": EncryptionService_KeyType_STATUS_Account,
	"service": EncryptionService_KeyType_STATUS_Service,
}

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