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

import (
	"context"
	"fmt"
	storage "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/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"
// Storage version of v1api20220901.StorageAccount
// Generator information:
// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2022-09-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 {
	source, ok := hub.(*storage.StorageAccount)
	if !ok {
		return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccount but received %T instead", hub)
	}

	return account.AssignProperties_From_StorageAccount(source)
}

// ConvertTo populates the provided hub StorageAccount from our StorageAccount
func (account *StorageAccount) ConvertTo(hub conversion.Hub) error {
	destination, ok := hub.(*storage.StorageAccount)
	if !ok {
		return fmt.Errorf("expected storage/v1api20230101/storage/StorageAccount but received %T instead", hub)
	}

	return account.AssignProperties_To_StorageAccount(destination)
}

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 "2022-09-01"
func (account StorageAccount) GetAPIVersion() string {
	return "2022-09-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

	// Invoke the augmentConversionForStorageAccount interface (if implemented) to customize the conversion
	var accountAsAny any = account
	if augmentedAccount, ok := accountAsAny.(augmentConversionForStorageAccount); ok {
		err := augmentedAccount.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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

	// Invoke the augmentConversionForStorageAccount interface (if implemented) to customize the conversion
	var accountAsAny any = account
	if augmentedAccount, ok := accountAsAny.(augmentConversionForStorageAccount); ok {
		err := augmentedAccount.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// 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
// Storage version of v1api20220901.StorageAccount
// Generator information:
// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2022-09-01/storage.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}
type StorageAccountList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []StorageAccount `json:"items"`
}

// Storage version of v1api20220901.APIVersion
// +kubebuilder:validation:Enum={"2022-09-01"}
type APIVersion string

const APIVersion_Value = APIVersion("2022-09-01")

type augmentConversionForStorageAccount interface {
	AssignPropertiesFrom(src *storage.StorageAccount) error
	AssignPropertiesTo(dst *storage.StorageAccount) error
}

// Storage version of v1api20220901.StorageAccount_Spec
type StorageAccount_Spec struct {
	AccessTier                            *string                                `json:"accessTier,omitempty"`
	AllowBlobPublicAccess                 *bool                                  `json:"allowBlobPublicAccess,omitempty"`
	AllowCrossTenantReplication           *bool                                  `json:"allowCrossTenantReplication,omitempty"`
	AllowSharedKeyAccess                  *bool                                  `json:"allowSharedKeyAccess,omitempty"`
	AllowedCopyScope                      *string                                `json:"allowedCopyScope,omitempty"`
	AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"`

	// AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it
	// doesn't have to be.
	AzureName                      string                      `json:"azureName,omitempty"`
	CustomDomain                   *CustomDomain               `json:"customDomain,omitempty"`
	DefaultToOAuthAuthentication   *bool                       `json:"defaultToOAuthAuthentication,omitempty"`
	DnsEndpointType                *string                     `json:"dnsEndpointType,omitempty"`
	Encryption                     *Encryption                 `json:"encryption,omitempty"`
	ExtendedLocation               *ExtendedLocation           `json:"extendedLocation,omitempty"`
	Identity                       *Identity                   `json:"identity,omitempty"`
	ImmutableStorageWithVersioning *ImmutableStorageAccount    `json:"immutableStorageWithVersioning,omitempty"`
	IsHnsEnabled                   *bool                       `json:"isHnsEnabled,omitempty"`
	IsLocalUserEnabled             *bool                       `json:"isLocalUserEnabled,omitempty"`
	IsNfsV3Enabled                 *bool                       `json:"isNfsV3Enabled,omitempty"`
	IsSftpEnabled                  *bool                       `json:"isSftpEnabled,omitempty"`
	KeyPolicy                      *KeyPolicy                  `json:"keyPolicy,omitempty"`
	Kind                           *string                     `json:"kind,omitempty"`
	LargeFileSharesState           *string                     `json:"largeFileSharesState,omitempty"`
	Location                       *string                     `json:"location,omitempty"`
	MinimumTlsVersion              *string                     `json:"minimumTlsVersion,omitempty"`
	NetworkAcls                    *NetworkRuleSet             `json:"networkAcls,omitempty"`
	OperatorSpec                   *StorageAccountOperatorSpec `json:"operatorSpec,omitempty"`
	OriginalVersion                string                      `json:"originalVersion,omitempty"`

	// +kubebuilder:validation:Required
	// Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also
	// controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a
	// reference to a resources.azure.com/ResourceGroup resource
	Owner                    *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"`
	PropertyBag              genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
	PublicNetworkAccess      *string                            `json:"publicNetworkAccess,omitempty"`
	RoutingPreference        *RoutingPreference                 `json:"routingPreference,omitempty"`
	SasPolicy                *SasPolicy                         `json:"sasPolicy,omitempty"`
	Sku                      *Sku                               `json:"sku,omitempty"`
	SupportsHttpsTrafficOnly *bool                              `json:"supportsHttpsTrafficOnly,omitempty"`
	Tags                     map[string]string                  `json:"tags,omitempty"`
}

var _ genruntime.ConvertibleSpec = &StorageAccount_Spec{}

// ConvertSpecFrom populates our StorageAccount_Spec from the provided source
func (account *StorageAccount_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error {
	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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

	// 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
	}

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

	// 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
	}

	// DefaultToOAuthAuthentication
	if source.DefaultToOAuthAuthentication != nil {
		defaultToOAuthAuthentication := *source.DefaultToOAuthAuthentication
		account.DefaultToOAuthAuthentication = &defaultToOAuthAuthentication
	} else {
		account.DefaultToOAuthAuthentication = nil
	}

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

	// 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
	}

	// ImmutableStorageWithVersioning
	if source.ImmutableStorageWithVersioning != nil {
		var immutableStorageWithVersioning ImmutableStorageAccount
		err := immutableStorageWithVersioning.AssignProperties_From_ImmutableStorageAccount(source.ImmutableStorageWithVersioning)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ImmutableStorageAccount() to populate field ImmutableStorageWithVersioning")
		}
		account.ImmutableStorageWithVersioning = &immutableStorageWithVersioning
	} else {
		account.ImmutableStorageWithVersioning = nil
	}

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

	// IsLocalUserEnabled
	if source.IsLocalUserEnabled != nil {
		isLocalUserEnabled := *source.IsLocalUserEnabled
		account.IsLocalUserEnabled = &isLocalUserEnabled
	} else {
		account.IsLocalUserEnabled = nil
	}

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

	// IsSftpEnabled
	if source.IsSftpEnabled != nil {
		isSftpEnabled := *source.IsSftpEnabled
		account.IsSftpEnabled = &isSftpEnabled
	} else {
		account.IsSftpEnabled = 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
	account.Kind = genruntime.ClonePointerToString(source.Kind)

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

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

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

	// 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
	}

	// OriginalVersion
	account.OriginalVersion = source.OriginalVersion

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

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

	// 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)

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

	// Invoke the augmentConversionForStorageAccount_Spec interface (if implemented) to customize the conversion
	var accountAsAny any = account
	if augmentedAccount, ok := accountAsAny.(augmentConversionForStorageAccount_Spec); ok {
		err := augmentedAccount.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(account.PropertyBag)

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

	// 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
	}

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

	// 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
	}

	// DefaultToOAuthAuthentication
	if account.DefaultToOAuthAuthentication != nil {
		defaultToOAuthAuthentication := *account.DefaultToOAuthAuthentication
		destination.DefaultToOAuthAuthentication = &defaultToOAuthAuthentication
	} else {
		destination.DefaultToOAuthAuthentication = nil
	}

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

	// 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
	}

	// ImmutableStorageWithVersioning
	if account.ImmutableStorageWithVersioning != nil {
		var immutableStorageWithVersioning storage.ImmutableStorageAccount
		err := account.ImmutableStorageWithVersioning.AssignProperties_To_ImmutableStorageAccount(&immutableStorageWithVersioning)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ImmutableStorageAccount() to populate field ImmutableStorageWithVersioning")
		}
		destination.ImmutableStorageWithVersioning = &immutableStorageWithVersioning
	} else {
		destination.ImmutableStorageWithVersioning = nil
	}

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

	// IsLocalUserEnabled
	if account.IsLocalUserEnabled != nil {
		isLocalUserEnabled := *account.IsLocalUserEnabled
		destination.IsLocalUserEnabled = &isLocalUserEnabled
	} else {
		destination.IsLocalUserEnabled = nil
	}

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

	// IsSftpEnabled
	if account.IsSftpEnabled != nil {
		isSftpEnabled := *account.IsSftpEnabled
		destination.IsSftpEnabled = &isSftpEnabled
	} else {
		destination.IsSftpEnabled = 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
	destination.Kind = genruntime.ClonePointerToString(account.Kind)

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

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

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

	// 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
	}

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

	// 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
	}

	// Invoke the augmentConversionForStorageAccount_Spec interface (if implemented) to customize the conversion
	var accountAsAny any = account
	if augmentedAccount, ok := accountAsAny.(augmentConversionForStorageAccount_Spec); ok {
		err := augmentedAccount.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

var _ genruntime.ConvertibleStatus = &StorageAccount_STATUS{}

// ConvertStatusFrom populates our StorageAccount_STATUS from the provided source
func (account *StorageAccount_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error {
	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
}

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

	// AccountMigrationInProgress
	if source.AccountMigrationInProgress != nil {
		propertyBag.Add("AccountMigrationInProgress", *source.AccountMigrationInProgress)
	} else {
		propertyBag.Remove("AccountMigrationInProgress")
	}

	// 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
	}

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

	// 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
	}

	// DefaultToOAuthAuthentication
	if source.DefaultToOAuthAuthentication != nil {
		defaultToOAuthAuthentication := *source.DefaultToOAuthAuthentication
		account.DefaultToOAuthAuthentication = &defaultToOAuthAuthentication
	} else {
		account.DefaultToOAuthAuthentication = nil
	}

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

	// 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
	}

	// ImmutableStorageWithVersioning
	if source.ImmutableStorageWithVersioning != nil {
		var immutableStorageWithVersioning ImmutableStorageAccount_STATUS
		err := immutableStorageWithVersioning.AssignProperties_From_ImmutableStorageAccount_STATUS(source.ImmutableStorageWithVersioning)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ImmutableStorageAccount_STATUS() to populate field ImmutableStorageWithVersioning")
		}
		account.ImmutableStorageWithVersioning = &immutableStorageWithVersioning
	} else {
		account.ImmutableStorageWithVersioning = nil
	}

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

	// IsLocalUserEnabled
	if source.IsLocalUserEnabled != nil {
		isLocalUserEnabled := *source.IsLocalUserEnabled
		account.IsLocalUserEnabled = &isLocalUserEnabled
	} else {
		account.IsLocalUserEnabled = nil
	}

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

	// IsSftpEnabled
	if source.IsSftpEnabled != nil {
		isSftpEnabled := *source.IsSftpEnabled
		account.IsSftpEnabled = &isSftpEnabled
	} else {
		account.IsSftpEnabled = nil
	}

	// IsSkuConversionBlocked
	if source.IsSkuConversionBlocked != nil {
		propertyBag.Add("IsSkuConversionBlocked", *source.IsSkuConversionBlocked)
	} else {
		propertyBag.Remove("IsSkuConversionBlocked")
	}

	// 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
	account.Kind = genruntime.ClonePointerToString(source.Kind)

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

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

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

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

	// 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
	account.ProvisioningState = genruntime.ClonePointerToString(source.ProvisioningState)

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

	// 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
	account.StatusOfPrimary = genruntime.ClonePointerToString(source.StatusOfPrimary)

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

	// StorageAccountSkuConversionStatus
	if source.StorageAccountSkuConversionStatus != nil {
		var storageAccountSkuConversionStatus StorageAccountSkuConversionStatus_STATUS
		err := storageAccountSkuConversionStatus.AssignProperties_From_StorageAccountSkuConversionStatus_STATUS(source.StorageAccountSkuConversionStatus)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StorageAccountSkuConversionStatus_STATUS() to populate field StorageAccountSkuConversionStatus")
		}
		account.StorageAccountSkuConversionStatus = &storageAccountSkuConversionStatus
	} else {
		account.StorageAccountSkuConversionStatus = 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)

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

	// Invoke the augmentConversionForStorageAccount_STATUS interface (if implemented) to customize the conversion
	var accountAsAny any = account
	if augmentedAccount, ok := accountAsAny.(augmentConversionForStorageAccount_STATUS); ok {
		err := augmentedAccount.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(account.PropertyBag)

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

	// AccountMigrationInProgress
	if propertyBag.Contains("AccountMigrationInProgress") {
		var accountMigrationInProgress bool
		err := propertyBag.Pull("AccountMigrationInProgress", &accountMigrationInProgress)
		if err != nil {
			return eris.Wrap(err, "pulling 'AccountMigrationInProgress' from propertyBag")
		}

		destination.AccountMigrationInProgress = &accountMigrationInProgress
	} else {
		destination.AccountMigrationInProgress = 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
	}

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

	// 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
	}

	// DefaultToOAuthAuthentication
	if account.DefaultToOAuthAuthentication != nil {
		defaultToOAuthAuthentication := *account.DefaultToOAuthAuthentication
		destination.DefaultToOAuthAuthentication = &defaultToOAuthAuthentication
	} else {
		destination.DefaultToOAuthAuthentication = nil
	}

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

	// 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
	}

	// ImmutableStorageWithVersioning
	if account.ImmutableStorageWithVersioning != nil {
		var immutableStorageWithVersioning storage.ImmutableStorageAccount_STATUS
		err := account.ImmutableStorageWithVersioning.AssignProperties_To_ImmutableStorageAccount_STATUS(&immutableStorageWithVersioning)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ImmutableStorageAccount_STATUS() to populate field ImmutableStorageWithVersioning")
		}
		destination.ImmutableStorageWithVersioning = &immutableStorageWithVersioning
	} else {
		destination.ImmutableStorageWithVersioning = nil
	}

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

	// IsLocalUserEnabled
	if account.IsLocalUserEnabled != nil {
		isLocalUserEnabled := *account.IsLocalUserEnabled
		destination.IsLocalUserEnabled = &isLocalUserEnabled
	} else {
		destination.IsLocalUserEnabled = nil
	}

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

	// IsSftpEnabled
	if account.IsSftpEnabled != nil {
		isSftpEnabled := *account.IsSftpEnabled
		destination.IsSftpEnabled = &isSftpEnabled
	} else {
		destination.IsSftpEnabled = nil
	}

	// IsSkuConversionBlocked
	if propertyBag.Contains("IsSkuConversionBlocked") {
		var isSkuConversionBlocked bool
		err := propertyBag.Pull("IsSkuConversionBlocked", &isSkuConversionBlocked)
		if err != nil {
			return eris.Wrap(err, "pulling 'IsSkuConversionBlocked' from propertyBag")
		}

		destination.IsSkuConversionBlocked = &isSkuConversionBlocked
	} else {
		destination.IsSkuConversionBlocked = 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
	destination.Kind = genruntime.ClonePointerToString(account.Kind)

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

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

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

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

	// 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
	destination.ProvisioningState = genruntime.ClonePointerToString(account.ProvisioningState)

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

	// 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
	destination.StatusOfPrimary = genruntime.ClonePointerToString(account.StatusOfPrimary)

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

	// StorageAccountSkuConversionStatus
	if account.StorageAccountSkuConversionStatus != nil {
		var storageAccountSkuConversionStatus storage.StorageAccountSkuConversionStatus_STATUS
		err := account.StorageAccountSkuConversionStatus.AssignProperties_To_StorageAccountSkuConversionStatus_STATUS(&storageAccountSkuConversionStatus)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StorageAccountSkuConversionStatus_STATUS() to populate field StorageAccountSkuConversionStatus")
		}
		destination.StorageAccountSkuConversionStatus = &storageAccountSkuConversionStatus
	} else {
		destination.StorageAccountSkuConversionStatus = 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
	}

	// Invoke the augmentConversionForStorageAccount_STATUS interface (if implemented) to customize the conversion
	var accountAsAny any = account
	if augmentedAccount, ok := accountAsAny.(augmentConversionForStorageAccount_STATUS); ok {
		err := augmentedAccount.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

type augmentConversionForStorageAccount_Spec interface {
	AssignPropertiesFrom(src *storage.StorageAccount_Spec) error
	AssignPropertiesTo(dst *storage.StorageAccount_Spec) error
}

type augmentConversionForStorageAccount_STATUS interface {
	AssignPropertiesFrom(src *storage.StorageAccount_STATUS) error
	AssignPropertiesTo(dst *storage.StorageAccount_STATUS) error
}

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

// AssignProperties_From_AzureFilesIdentityBasedAuthentication populates our AzureFilesIdentityBasedAuthentication from the provided source AzureFilesIdentityBasedAuthentication
func (authentication *AzureFilesIdentityBasedAuthentication) AssignProperties_From_AzureFilesIdentityBasedAuthentication(source *storage.AzureFilesIdentityBasedAuthentication) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// 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
	authentication.DefaultSharePermission = genruntime.ClonePointerToString(source.DefaultSharePermission)

	// DirectoryServiceOptions
	authentication.DirectoryServiceOptions = genruntime.ClonePointerToString(source.DirectoryServiceOptions)

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

	// Invoke the augmentConversionForAzureFilesIdentityBasedAuthentication interface (if implemented) to customize the conversion
	var authenticationAsAny any = authentication
	if augmentedAuthentication, ok := authenticationAsAny.(augmentConversionForAzureFilesIdentityBasedAuthentication); ok {
		err := augmentedAuthentication.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(authentication.PropertyBag)

	// 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
	destination.DefaultSharePermission = genruntime.ClonePointerToString(authentication.DefaultSharePermission)

	// DirectoryServiceOptions
	destination.DirectoryServiceOptions = genruntime.ClonePointerToString(authentication.DirectoryServiceOptions)

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

	// Invoke the augmentConversionForAzureFilesIdentityBasedAuthentication interface (if implemented) to customize the conversion
	var authenticationAsAny any = authentication
	if augmentedAuthentication, ok := authenticationAsAny.(augmentConversionForAzureFilesIdentityBasedAuthentication); ok {
		err := augmentedAuthentication.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// 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
	authentication.DefaultSharePermission = genruntime.ClonePointerToString(source.DefaultSharePermission)

	// DirectoryServiceOptions
	authentication.DirectoryServiceOptions = genruntime.ClonePointerToString(source.DirectoryServiceOptions)

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

	// Invoke the augmentConversionForAzureFilesIdentityBasedAuthentication_STATUS interface (if implemented) to customize the conversion
	var authenticationAsAny any = authentication
	if augmentedAuthentication, ok := authenticationAsAny.(augmentConversionForAzureFilesIdentityBasedAuthentication_STATUS); ok {
		err := augmentedAuthentication.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(authentication.PropertyBag)

	// 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
	destination.DefaultSharePermission = genruntime.ClonePointerToString(authentication.DefaultSharePermission)

	// DirectoryServiceOptions
	destination.DirectoryServiceOptions = genruntime.ClonePointerToString(authentication.DirectoryServiceOptions)

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

	// Invoke the augmentConversionForAzureFilesIdentityBasedAuthentication_STATUS interface (if implemented) to customize the conversion
	var authenticationAsAny any = authentication
	if augmentedAuthentication, ok := authenticationAsAny.(augmentConversionForAzureFilesIdentityBasedAuthentication_STATUS); ok {
		err := augmentedAuthentication.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// 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
	status.Status = genruntime.ClonePointerToString(source.Status)

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

	// Invoke the augmentConversionForBlobRestoreStatus_STATUS interface (if implemented) to customize the conversion
	var statusAsAny any = status
	if augmentedStatus, ok := statusAsAny.(augmentConversionForBlobRestoreStatus_STATUS); ok {
		err := augmentedStatus.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(status.PropertyBag)

	// 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
	destination.Status = genruntime.ClonePointerToString(status.Status)

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

	// Invoke the augmentConversionForBlobRestoreStatus_STATUS interface (if implemented) to customize the conversion
	var statusAsAny any = status
	if augmentedStatus, ok := statusAsAny.(augmentConversionForBlobRestoreStatus_STATUS); ok {
		err := augmentedStatus.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_CustomDomain populates our CustomDomain from the provided source CustomDomain
func (domain *CustomDomain) AssignProperties_From_CustomDomain(source *storage.CustomDomain) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

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

	// Invoke the augmentConversionForCustomDomain interface (if implemented) to customize the conversion
	var domainAsAny any = domain
	if augmentedDomain, ok := domainAsAny.(augmentConversionForCustomDomain); ok {
		err := augmentedDomain.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(domain.PropertyBag)

	// 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
	}

	// Invoke the augmentConversionForCustomDomain interface (if implemented) to customize the conversion
	var domainAsAny any = domain
	if augmentedDomain, ok := domainAsAny.(augmentConversionForCustomDomain); ok {
		err := augmentedDomain.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

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

	// Invoke the augmentConversionForCustomDomain_STATUS interface (if implemented) to customize the conversion
	var domainAsAny any = domain
	if augmentedDomain, ok := domainAsAny.(augmentConversionForCustomDomain_STATUS); ok {
		err := augmentedDomain.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(domain.PropertyBag)

	// 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
	}

	// Invoke the augmentConversionForCustomDomain_STATUS interface (if implemented) to customize the conversion
	var domainAsAny any = domain
	if augmentedDomain, ok := domainAsAny.(augmentConversionForCustomDomain_STATUS); ok {
		err := augmentedDomain.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_Encryption populates our Encryption from the provided source Encryption
func (encryption *Encryption) AssignProperties_From_Encryption(source *storage.Encryption) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// 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
	encryption.KeySource = genruntime.ClonePointerToString(source.KeySource)

	// 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
	}

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

	// Invoke the augmentConversionForEncryption interface (if implemented) to customize the conversion
	var encryptionAsAny any = encryption
	if augmentedEncryption, ok := encryptionAsAny.(augmentConversionForEncryption); ok {
		err := augmentedEncryption.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(encryption.PropertyBag)

	// 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
	destination.KeySource = genruntime.ClonePointerToString(encryption.KeySource)

	// 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
	}

	// Invoke the augmentConversionForEncryption interface (if implemented) to customize the conversion
	var encryptionAsAny any = encryption
	if augmentedEncryption, ok := encryptionAsAny.(augmentConversionForEncryption); ok {
		err := augmentedEncryption.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// 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
	encryption.KeySource = genruntime.ClonePointerToString(source.KeySource)

	// 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
	}

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

	// Invoke the augmentConversionForEncryption_STATUS interface (if implemented) to customize the conversion
	var encryptionAsAny any = encryption
	if augmentedEncryption, ok := encryptionAsAny.(augmentConversionForEncryption_STATUS); ok {
		err := augmentedEncryption.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(encryption.PropertyBag)

	// 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
	destination.KeySource = genruntime.ClonePointerToString(encryption.KeySource)

	// 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
	}

	// Invoke the augmentConversionForEncryption_STATUS interface (if implemented) to customize the conversion
	var encryptionAsAny any = encryption
	if augmentedEncryption, ok := encryptionAsAny.(augmentConversionForEncryption_STATUS); ok {
		err := augmentedEncryption.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// 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)

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

	// Invoke the augmentConversionForEndpoints_STATUS interface (if implemented) to customize the conversion
	var endpointsAsAny any = endpoints
	if augmentedEndpoints, ok := endpointsAsAny.(augmentConversionForEndpoints_STATUS); ok {
		err := augmentedEndpoints.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(endpoints.PropertyBag)

	// 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
	}

	// Invoke the augmentConversionForEndpoints_STATUS interface (if implemented) to customize the conversion
	var endpointsAsAny any = endpoints
	if augmentedEndpoints, ok := endpointsAsAny.(augmentConversionForEndpoints_STATUS); ok {
		err := augmentedEndpoints.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_ExtendedLocation populates our ExtendedLocation from the provided source ExtendedLocation
func (location *ExtendedLocation) AssignProperties_From_ExtendedLocation(source *storage.ExtendedLocation) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

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

	// Invoke the augmentConversionForExtendedLocation interface (if implemented) to customize the conversion
	var locationAsAny any = location
	if augmentedLocation, ok := locationAsAny.(augmentConversionForExtendedLocation); ok {
		err := augmentedLocation.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(location.PropertyBag)

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

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

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

	// Invoke the augmentConversionForExtendedLocation interface (if implemented) to customize the conversion
	var locationAsAny any = location
	if augmentedLocation, ok := locationAsAny.(augmentConversionForExtendedLocation); ok {
		err := augmentedLocation.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

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

	// Invoke the augmentConversionForExtendedLocation_STATUS interface (if implemented) to customize the conversion
	var locationAsAny any = location
	if augmentedLocation, ok := locationAsAny.(augmentConversionForExtendedLocation_STATUS); ok {
		err := augmentedLocation.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(location.PropertyBag)

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

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

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

	// Invoke the augmentConversionForExtendedLocation_STATUS interface (if implemented) to customize the conversion
	var locationAsAny any = location
	if augmentedLocation, ok := locationAsAny.(augmentConversionForExtendedLocation_STATUS); ok {
		err := augmentedLocation.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

	// CanPlannedFailover
	if source.CanPlannedFailover != nil {
		propertyBag.Add("CanPlannedFailover", *source.CanPlannedFailover)
	} else {
		propertyBag.Remove("CanPlannedFailover")
	}

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

	// PostFailoverRedundancy
	if source.PostFailoverRedundancy != nil {
		propertyBag.Add("PostFailoverRedundancy", *source.PostFailoverRedundancy)
	} else {
		propertyBag.Remove("PostFailoverRedundancy")
	}

	// PostPlannedFailoverRedundancy
	if source.PostPlannedFailoverRedundancy != nil {
		propertyBag.Add("PostPlannedFailoverRedundancy", *source.PostPlannedFailoverRedundancy)
	} else {
		propertyBag.Remove("PostPlannedFailoverRedundancy")
	}

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

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

	// Invoke the augmentConversionForGeoReplicationStats_STATUS interface (if implemented) to customize the conversion
	var statsAsAny any = stats
	if augmentedStats, ok := statsAsAny.(augmentConversionForGeoReplicationStats_STATUS); ok {
		err := augmentedStats.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(stats.PropertyBag)

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

	// CanPlannedFailover
	if propertyBag.Contains("CanPlannedFailover") {
		var canPlannedFailover bool
		err := propertyBag.Pull("CanPlannedFailover", &canPlannedFailover)
		if err != nil {
			return eris.Wrap(err, "pulling 'CanPlannedFailover' from propertyBag")
		}

		destination.CanPlannedFailover = &canPlannedFailover
	} else {
		destination.CanPlannedFailover = nil
	}

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

	// PostFailoverRedundancy
	if propertyBag.Contains("PostFailoverRedundancy") {
		var postFailoverRedundancy string
		err := propertyBag.Pull("PostFailoverRedundancy", &postFailoverRedundancy)
		if err != nil {
			return eris.Wrap(err, "pulling 'PostFailoverRedundancy' from propertyBag")
		}

		destination.PostFailoverRedundancy = &postFailoverRedundancy
	} else {
		destination.PostFailoverRedundancy = nil
	}

	// PostPlannedFailoverRedundancy
	if propertyBag.Contains("PostPlannedFailoverRedundancy") {
		var postPlannedFailoverRedundancy string
		err := propertyBag.Pull("PostPlannedFailoverRedundancy", &postPlannedFailoverRedundancy)
		if err != nil {
			return eris.Wrap(err, "pulling 'PostPlannedFailoverRedundancy' from propertyBag")
		}

		destination.PostPlannedFailoverRedundancy = &postPlannedFailoverRedundancy
	} else {
		destination.PostPlannedFailoverRedundancy = nil
	}

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

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

	// Invoke the augmentConversionForGeoReplicationStats_STATUS interface (if implemented) to customize the conversion
	var statsAsAny any = stats
	if augmentedStats, ok := statsAsAny.(augmentConversionForGeoReplicationStats_STATUS); ok {
		err := augmentedStats.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_Identity populates our Identity from the provided source Identity
func (identity *Identity) AssignProperties_From_Identity(source *storage.Identity) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

	// 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
	}

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

	// Invoke the augmentConversionForIdentity interface (if implemented) to customize the conversion
	var identityAsAny any = identity
	if augmentedIdentity, ok := identityAsAny.(augmentConversionForIdentity); ok {
		err := augmentedIdentity.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(identity.PropertyBag)

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

	// 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
	}

	// Invoke the augmentConversionForIdentity interface (if implemented) to customize the conversion
	var identityAsAny any = identity
	if augmentedIdentity, ok := identityAsAny.(augmentConversionForIdentity); ok {
		err := augmentedIdentity.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20220901.Identity_STATUS
// Identity for the resource.
type Identity_STATUS struct {
	PrincipalId            *string                                `json:"principalId,omitempty"`
	PropertyBag            genruntime.PropertyBag                 `json:"$propertyBag,omitempty"`
	TenantId               *string                                `json:"tenantId,omitempty"`
	Type                   *string                                `json:"type,omitempty"`
	UserAssignedIdentities map[string]UserAssignedIdentity_STATUS `json:"userAssignedIdentities,omitempty"`
}

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

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

	// 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
	}

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

	// Invoke the augmentConversionForIdentity_STATUS interface (if implemented) to customize the conversion
	var identityAsAny any = identity
	if augmentedIdentity, ok := identityAsAny.(augmentConversionForIdentity_STATUS); ok {
		err := augmentedIdentity.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(identity.PropertyBag)

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

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

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

	// 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
	}

	// Invoke the augmentConversionForIdentity_STATUS interface (if implemented) to customize the conversion
	var identityAsAny any = identity
	if augmentedIdentity, ok := identityAsAny.(augmentConversionForIdentity_STATUS); ok {
		err := augmentedIdentity.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_ImmutableStorageAccount populates our ImmutableStorageAccount from the provided source ImmutableStorageAccount
func (account *ImmutableStorageAccount) AssignProperties_From_ImmutableStorageAccount(source *storage.ImmutableStorageAccount) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		account.Enabled = &enabled
	} else {
		account.Enabled = nil
	}

	// ImmutabilityPolicy
	if source.ImmutabilityPolicy != nil {
		var immutabilityPolicy AccountImmutabilityPolicyProperties
		err := immutabilityPolicy.AssignProperties_From_AccountImmutabilityPolicyProperties(source.ImmutabilityPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_AccountImmutabilityPolicyProperties() to populate field ImmutabilityPolicy")
		}
		account.ImmutabilityPolicy = &immutabilityPolicy
	} else {
		account.ImmutabilityPolicy = nil
	}

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

	// Invoke the augmentConversionForImmutableStorageAccount interface (if implemented) to customize the conversion
	var accountAsAny any = account
	if augmentedAccount, ok := accountAsAny.(augmentConversionForImmutableStorageAccount); ok {
		err := augmentedAccount.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_ImmutableStorageAccount populates the provided destination ImmutableStorageAccount from our ImmutableStorageAccount
func (account *ImmutableStorageAccount) AssignProperties_To_ImmutableStorageAccount(destination *storage.ImmutableStorageAccount) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(account.PropertyBag)

	// Enabled
	if account.Enabled != nil {
		enabled := *account.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

	// ImmutabilityPolicy
	if account.ImmutabilityPolicy != nil {
		var immutabilityPolicy storage.AccountImmutabilityPolicyProperties
		err := account.ImmutabilityPolicy.AssignProperties_To_AccountImmutabilityPolicyProperties(&immutabilityPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_AccountImmutabilityPolicyProperties() to populate field ImmutabilityPolicy")
		}
		destination.ImmutabilityPolicy = &immutabilityPolicy
	} else {
		destination.ImmutabilityPolicy = nil
	}

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

	// Invoke the augmentConversionForImmutableStorageAccount interface (if implemented) to customize the conversion
	var accountAsAny any = account
	if augmentedAccount, ok := accountAsAny.(augmentConversionForImmutableStorageAccount); ok {
		err := augmentedAccount.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_ImmutableStorageAccount_STATUS populates our ImmutableStorageAccount_STATUS from the provided source ImmutableStorageAccount_STATUS
func (account *ImmutableStorageAccount_STATUS) AssignProperties_From_ImmutableStorageAccount_STATUS(source *storage.ImmutableStorageAccount_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		account.Enabled = &enabled
	} else {
		account.Enabled = nil
	}

	// ImmutabilityPolicy
	if source.ImmutabilityPolicy != nil {
		var immutabilityPolicy AccountImmutabilityPolicyProperties_STATUS
		err := immutabilityPolicy.AssignProperties_From_AccountImmutabilityPolicyProperties_STATUS(source.ImmutabilityPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_AccountImmutabilityPolicyProperties_STATUS() to populate field ImmutabilityPolicy")
		}
		account.ImmutabilityPolicy = &immutabilityPolicy
	} else {
		account.ImmutabilityPolicy = nil
	}

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

	// Invoke the augmentConversionForImmutableStorageAccount_STATUS interface (if implemented) to customize the conversion
	var accountAsAny any = account
	if augmentedAccount, ok := accountAsAny.(augmentConversionForImmutableStorageAccount_STATUS); ok {
		err := augmentedAccount.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_ImmutableStorageAccount_STATUS populates the provided destination ImmutableStorageAccount_STATUS from our ImmutableStorageAccount_STATUS
func (account *ImmutableStorageAccount_STATUS) AssignProperties_To_ImmutableStorageAccount_STATUS(destination *storage.ImmutableStorageAccount_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(account.PropertyBag)

	// Enabled
	if account.Enabled != nil {
		enabled := *account.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

	// ImmutabilityPolicy
	if account.ImmutabilityPolicy != nil {
		var immutabilityPolicy storage.AccountImmutabilityPolicyProperties_STATUS
		err := account.ImmutabilityPolicy.AssignProperties_To_AccountImmutabilityPolicyProperties_STATUS(&immutabilityPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_AccountImmutabilityPolicyProperties_STATUS() to populate field ImmutabilityPolicy")
		}
		destination.ImmutabilityPolicy = &immutabilityPolicy
	} else {
		destination.ImmutabilityPolicy = nil
	}

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

	// Invoke the augmentConversionForImmutableStorageAccount_STATUS interface (if implemented) to customize the conversion
	var accountAsAny any = account
	if augmentedAccount, ok := accountAsAny.(augmentConversionForImmutableStorageAccount_STATUS); ok {
		err := augmentedAccount.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

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

	// Invoke the augmentConversionForKeyCreationTime_STATUS interface (if implemented) to customize the conversion
	var timeAsAny any = time
	if augmentedTime, ok := timeAsAny.(augmentConversionForKeyCreationTime_STATUS); ok {
		err := augmentedTime.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(time.PropertyBag)

	// 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
	}

	// Invoke the augmentConversionForKeyCreationTime_STATUS interface (if implemented) to customize the conversion
	var timeAsAny any = time
	if augmentedTime, ok := timeAsAny.(augmentConversionForKeyCreationTime_STATUS); ok {
		err := augmentedTime.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_KeyPolicy populates our KeyPolicy from the provided source KeyPolicy
func (policy *KeyPolicy) AssignProperties_From_KeyPolicy(source *storage.KeyPolicy) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

	// Invoke the augmentConversionForKeyPolicy interface (if implemented) to customize the conversion
	var policyAsAny any = policy
	if augmentedPolicy, ok := policyAsAny.(augmentConversionForKeyPolicy); ok {
		err := augmentedPolicy.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(policy.PropertyBag)

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

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

	// Invoke the augmentConversionForKeyPolicy interface (if implemented) to customize the conversion
	var policyAsAny any = policy
	if augmentedPolicy, ok := policyAsAny.(augmentConversionForKeyPolicy); ok {
		err := augmentedPolicy.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

	// Invoke the augmentConversionForKeyPolicy_STATUS interface (if implemented) to customize the conversion
	var policyAsAny any = policy
	if augmentedPolicy, ok := policyAsAny.(augmentConversionForKeyPolicy_STATUS); ok {
		err := augmentedPolicy.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(policy.PropertyBag)

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

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

	// Invoke the augmentConversionForKeyPolicy_STATUS interface (if implemented) to customize the conversion
	var policyAsAny any = policy
	if augmentedPolicy, ok := policyAsAny.(augmentConversionForKeyPolicy_STATUS); ok {
		err := augmentedPolicy.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_NetworkRuleSet populates our NetworkRuleSet from the provided source NetworkRuleSet
func (ruleSet *NetworkRuleSet) AssignProperties_From_NetworkRuleSet(source *storage.NetworkRuleSet) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

	// 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
	}

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

	// Invoke the augmentConversionForNetworkRuleSet interface (if implemented) to customize the conversion
	var ruleSetAsAny any = ruleSet
	if augmentedRuleSet, ok := ruleSetAsAny.(augmentConversionForNetworkRuleSet); ok {
		err := augmentedRuleSet.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(ruleSet.PropertyBag)

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

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

	// 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
	}

	// Invoke the augmentConversionForNetworkRuleSet interface (if implemented) to customize the conversion
	var ruleSetAsAny any = ruleSet
	if augmentedRuleSet, ok := ruleSetAsAny.(augmentConversionForNetworkRuleSet); ok {
		err := augmentedRuleSet.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

	// 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
	}

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

	// Invoke the augmentConversionForNetworkRuleSet_STATUS interface (if implemented) to customize the conversion
	var ruleSetAsAny any = ruleSet
	if augmentedRuleSet, ok := ruleSetAsAny.(augmentConversionForNetworkRuleSet_STATUS); ok {
		err := augmentedRuleSet.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(ruleSet.PropertyBag)

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

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

	// 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
	}

	// Invoke the augmentConversionForNetworkRuleSet_STATUS interface (if implemented) to customize the conversion
	var ruleSetAsAny any = ruleSet
	if augmentedRuleSet, ok := ruleSetAsAny.(augmentConversionForNetworkRuleSet_STATUS); ok {
		err := augmentedRuleSet.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20220901.PrivateEndpointConnection_STATUS
// The Private Endpoint Connection resource.
type PrivateEndpointConnection_STATUS struct {
	Id          *string                `json:"id,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

	// Invoke the augmentConversionForPrivateEndpointConnection_STATUS interface (if implemented) to customize the conversion
	var connectionAsAny any = connection
	if augmentedConnection, ok := connectionAsAny.(augmentConversionForPrivateEndpointConnection_STATUS); ok {
		err := augmentedConnection.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(connection.PropertyBag)

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

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

	// Invoke the augmentConversionForPrivateEndpointConnection_STATUS interface (if implemented) to customize the conversion
	var connectionAsAny any = connection
	if augmentedConnection, ok := connectionAsAny.(augmentConversionForPrivateEndpointConnection_STATUS); ok {
		err := augmentedConnection.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_RoutingPreference populates our RoutingPreference from the provided source RoutingPreference
func (preference *RoutingPreference) AssignProperties_From_RoutingPreference(source *storage.RoutingPreference) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// 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
	preference.RoutingChoice = genruntime.ClonePointerToString(source.RoutingChoice)

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

	// Invoke the augmentConversionForRoutingPreference interface (if implemented) to customize the conversion
	var preferenceAsAny any = preference
	if augmentedPreference, ok := preferenceAsAny.(augmentConversionForRoutingPreference); ok {
		err := augmentedPreference.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(preference.PropertyBag)

	// 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
	destination.RoutingChoice = genruntime.ClonePointerToString(preference.RoutingChoice)

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

	// Invoke the augmentConversionForRoutingPreference interface (if implemented) to customize the conversion
	var preferenceAsAny any = preference
	if augmentedPreference, ok := preferenceAsAny.(augmentConversionForRoutingPreference); ok {
		err := augmentedPreference.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// 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
	preference.RoutingChoice = genruntime.ClonePointerToString(source.RoutingChoice)

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

	// Invoke the augmentConversionForRoutingPreference_STATUS interface (if implemented) to customize the conversion
	var preferenceAsAny any = preference
	if augmentedPreference, ok := preferenceAsAny.(augmentConversionForRoutingPreference_STATUS); ok {
		err := augmentedPreference.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(preference.PropertyBag)

	// 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
	destination.RoutingChoice = genruntime.ClonePointerToString(preference.RoutingChoice)

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

	// Invoke the augmentConversionForRoutingPreference_STATUS interface (if implemented) to customize the conversion
	var preferenceAsAny any = preference
	if augmentedPreference, ok := preferenceAsAny.(augmentConversionForRoutingPreference_STATUS); ok {
		err := augmentedPreference.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_SasPolicy populates our SasPolicy from the provided source SasPolicy
func (policy *SasPolicy) AssignProperties_From_SasPolicy(source *storage.SasPolicy) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

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

	// Invoke the augmentConversionForSasPolicy interface (if implemented) to customize the conversion
	var policyAsAny any = policy
	if augmentedPolicy, ok := policyAsAny.(augmentConversionForSasPolicy); ok {
		err := augmentedPolicy.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(policy.PropertyBag)

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

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

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

	// Invoke the augmentConversionForSasPolicy interface (if implemented) to customize the conversion
	var policyAsAny any = policy
	if augmentedPolicy, ok := policyAsAny.(augmentConversionForSasPolicy); ok {
		err := augmentedPolicy.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

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

	// Invoke the augmentConversionForSasPolicy_STATUS interface (if implemented) to customize the conversion
	var policyAsAny any = policy
	if augmentedPolicy, ok := policyAsAny.(augmentConversionForSasPolicy_STATUS); ok {
		err := augmentedPolicy.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(policy.PropertyBag)

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

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

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

	// Invoke the augmentConversionForSasPolicy_STATUS interface (if implemented) to customize the conversion
	var policyAsAny any = policy
	if augmentedPolicy, ok := policyAsAny.(augmentConversionForSasPolicy_STATUS); ok {
		err := augmentedPolicy.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_Sku populates our Sku from the provided source Sku
func (sku *Sku) AssignProperties_From_Sku(source *storage.Sku) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

	// Tier
	sku.Tier = genruntime.ClonePointerToString(source.Tier)

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

	// Invoke the augmentConversionForSku interface (if implemented) to customize the conversion
	var skuAsAny any = sku
	if augmentedSku, ok := skuAsAny.(augmentConversionForSku); ok {
		err := augmentedSku.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(sku.PropertyBag)

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

	// Tier
	destination.Tier = genruntime.ClonePointerToString(sku.Tier)

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

	// Invoke the augmentConversionForSku interface (if implemented) to customize the conversion
	var skuAsAny any = sku
	if augmentedSku, ok := skuAsAny.(augmentConversionForSku); ok {
		err := augmentedSku.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

	// Tier
	sku.Tier = genruntime.ClonePointerToString(source.Tier)

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

	// Invoke the augmentConversionForSku_STATUS interface (if implemented) to customize the conversion
	var skuAsAny any = sku
	if augmentedSku, ok := skuAsAny.(augmentConversionForSku_STATUS); ok {
		err := augmentedSku.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(sku.PropertyBag)

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

	// Tier
	destination.Tier = genruntime.ClonePointerToString(sku.Tier)

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

	// Invoke the augmentConversionForSku_STATUS interface (if implemented) to customize the conversion
	var skuAsAny any = sku
	if augmentedSku, ok := skuAsAny.(augmentConversionForSku_STATUS); ok {
		err := augmentedSku.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_StorageAccountOperatorSpec populates our StorageAccountOperatorSpec from the provided source StorageAccountOperatorSpec
func (operator *StorageAccountOperatorSpec) AssignProperties_From_StorageAccountOperatorSpec(source *storage.StorageAccountOperatorSpec) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// 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
	}

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

	// Invoke the augmentConversionForStorageAccountOperatorSpec interface (if implemented) to customize the conversion
	var operatorAsAny any = operator
	if augmentedOperator, ok := operatorAsAny.(augmentConversionForStorageAccountOperatorSpec); ok {
		err := augmentedOperator.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(operator.PropertyBag)

	// 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
	}

	// Invoke the augmentConversionForStorageAccountOperatorSpec interface (if implemented) to customize the conversion
	var operatorAsAny any = operator
	if augmentedOperator, ok := operatorAsAny.(augmentConversionForStorageAccountOperatorSpec); ok {
		err := augmentedOperator.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_StorageAccountSkuConversionStatus_STATUS populates our StorageAccountSkuConversionStatus_STATUS from the provided source StorageAccountSkuConversionStatus_STATUS
func (status *StorageAccountSkuConversionStatus_STATUS) AssignProperties_From_StorageAccountSkuConversionStatus_STATUS(source *storage.StorageAccountSkuConversionStatus_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

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

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

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

	// Invoke the augmentConversionForStorageAccountSkuConversionStatus_STATUS interface (if implemented) to customize the conversion
	var statusAsAny any = status
	if augmentedStatus, ok := statusAsAny.(augmentConversionForStorageAccountSkuConversionStatus_STATUS); ok {
		err := augmentedStatus.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_StorageAccountSkuConversionStatus_STATUS populates the provided destination StorageAccountSkuConversionStatus_STATUS from our StorageAccountSkuConversionStatus_STATUS
func (status *StorageAccountSkuConversionStatus_STATUS) AssignProperties_To_StorageAccountSkuConversionStatus_STATUS(destination *storage.StorageAccountSkuConversionStatus_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(status.PropertyBag)

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

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

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

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

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

	// Invoke the augmentConversionForStorageAccountSkuConversionStatus_STATUS interface (if implemented) to customize the conversion
	var statusAsAny any = status
	if augmentedStatus, ok := statusAsAny.(augmentConversionForStorageAccountSkuConversionStatus_STATUS); ok {
		err := augmentedStatus.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_AccountImmutabilityPolicyProperties populates our AccountImmutabilityPolicyProperties from the provided source AccountImmutabilityPolicyProperties
func (properties *AccountImmutabilityPolicyProperties) AssignProperties_From_AccountImmutabilityPolicyProperties(source *storage.AccountImmutabilityPolicyProperties) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// AllowProtectedAppendWrites
	if source.AllowProtectedAppendWrites != nil {
		allowProtectedAppendWrite := *source.AllowProtectedAppendWrites
		properties.AllowProtectedAppendWrites = &allowProtectedAppendWrite
	} else {
		properties.AllowProtectedAppendWrites = nil
	}

	// ImmutabilityPeriodSinceCreationInDays
	properties.ImmutabilityPeriodSinceCreationInDays = genruntime.ClonePointerToInt(source.ImmutabilityPeriodSinceCreationInDays)

	// State
	properties.State = genruntime.ClonePointerToString(source.State)

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

	// Invoke the augmentConversionForAccountImmutabilityPolicyProperties interface (if implemented) to customize the conversion
	var propertiesAsAny any = properties
	if augmentedProperties, ok := propertiesAsAny.(augmentConversionForAccountImmutabilityPolicyProperties); ok {
		err := augmentedProperties.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_AccountImmutabilityPolicyProperties populates the provided destination AccountImmutabilityPolicyProperties from our AccountImmutabilityPolicyProperties
func (properties *AccountImmutabilityPolicyProperties) AssignProperties_To_AccountImmutabilityPolicyProperties(destination *storage.AccountImmutabilityPolicyProperties) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(properties.PropertyBag)

	// AllowProtectedAppendWrites
	if properties.AllowProtectedAppendWrites != nil {
		allowProtectedAppendWrite := *properties.AllowProtectedAppendWrites
		destination.AllowProtectedAppendWrites = &allowProtectedAppendWrite
	} else {
		destination.AllowProtectedAppendWrites = nil
	}

	// ImmutabilityPeriodSinceCreationInDays
	destination.ImmutabilityPeriodSinceCreationInDays = genruntime.ClonePointerToInt(properties.ImmutabilityPeriodSinceCreationInDays)

	// State
	destination.State = genruntime.ClonePointerToString(properties.State)

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

	// Invoke the augmentConversionForAccountImmutabilityPolicyProperties interface (if implemented) to customize the conversion
	var propertiesAsAny any = properties
	if augmentedProperties, ok := propertiesAsAny.(augmentConversionForAccountImmutabilityPolicyProperties); ok {
		err := augmentedProperties.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_AccountImmutabilityPolicyProperties_STATUS populates our AccountImmutabilityPolicyProperties_STATUS from the provided source AccountImmutabilityPolicyProperties_STATUS
func (properties *AccountImmutabilityPolicyProperties_STATUS) AssignProperties_From_AccountImmutabilityPolicyProperties_STATUS(source *storage.AccountImmutabilityPolicyProperties_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// AllowProtectedAppendWrites
	if source.AllowProtectedAppendWrites != nil {
		allowProtectedAppendWrite := *source.AllowProtectedAppendWrites
		properties.AllowProtectedAppendWrites = &allowProtectedAppendWrite
	} else {
		properties.AllowProtectedAppendWrites = nil
	}

	// ImmutabilityPeriodSinceCreationInDays
	properties.ImmutabilityPeriodSinceCreationInDays = genruntime.ClonePointerToInt(source.ImmutabilityPeriodSinceCreationInDays)

	// State
	properties.State = genruntime.ClonePointerToString(source.State)

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

	// Invoke the augmentConversionForAccountImmutabilityPolicyProperties_STATUS interface (if implemented) to customize the conversion
	var propertiesAsAny any = properties
	if augmentedProperties, ok := propertiesAsAny.(augmentConversionForAccountImmutabilityPolicyProperties_STATUS); ok {
		err := augmentedProperties.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_AccountImmutabilityPolicyProperties_STATUS populates the provided destination AccountImmutabilityPolicyProperties_STATUS from our AccountImmutabilityPolicyProperties_STATUS
func (properties *AccountImmutabilityPolicyProperties_STATUS) AssignProperties_To_AccountImmutabilityPolicyProperties_STATUS(destination *storage.AccountImmutabilityPolicyProperties_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(properties.PropertyBag)

	// AllowProtectedAppendWrites
	if properties.AllowProtectedAppendWrites != nil {
		allowProtectedAppendWrite := *properties.AllowProtectedAppendWrites
		destination.AllowProtectedAppendWrites = &allowProtectedAppendWrite
	} else {
		destination.AllowProtectedAppendWrites = nil
	}

	// ImmutabilityPeriodSinceCreationInDays
	destination.ImmutabilityPeriodSinceCreationInDays = genruntime.ClonePointerToInt(properties.ImmutabilityPeriodSinceCreationInDays)

	// State
	destination.State = genruntime.ClonePointerToString(properties.State)

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

	// Invoke the augmentConversionForAccountImmutabilityPolicyProperties_STATUS interface (if implemented) to customize the conversion
	var propertiesAsAny any = properties
	if augmentedProperties, ok := propertiesAsAny.(augmentConversionForAccountImmutabilityPolicyProperties_STATUS); ok {
		err := augmentedProperties.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_ActiveDirectoryProperties populates our ActiveDirectoryProperties from the provided source ActiveDirectoryProperties
func (properties *ActiveDirectoryProperties) AssignProperties_From_ActiveDirectoryProperties(source *storage.ActiveDirectoryProperties) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// AccountType
	properties.AccountType = genruntime.ClonePointerToString(source.AccountType)

	// 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)

	// SamAccountName
	properties.SamAccountName = genruntime.ClonePointerToString(source.SamAccountName)

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

	// Invoke the augmentConversionForActiveDirectoryProperties interface (if implemented) to customize the conversion
	var propertiesAsAny any = properties
	if augmentedProperties, ok := propertiesAsAny.(augmentConversionForActiveDirectoryProperties); ok {
		err := augmentedProperties.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(properties.PropertyBag)

	// AccountType
	destination.AccountType = genruntime.ClonePointerToString(properties.AccountType)

	// 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)

	// SamAccountName
	destination.SamAccountName = genruntime.ClonePointerToString(properties.SamAccountName)

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

	// Invoke the augmentConversionForActiveDirectoryProperties interface (if implemented) to customize the conversion
	var propertiesAsAny any = properties
	if augmentedProperties, ok := propertiesAsAny.(augmentConversionForActiveDirectoryProperties); ok {
		err := augmentedProperties.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// AccountType
	properties.AccountType = genruntime.ClonePointerToString(source.AccountType)

	// 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)

	// SamAccountName
	properties.SamAccountName = genruntime.ClonePointerToString(source.SamAccountName)

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

	// Invoke the augmentConversionForActiveDirectoryProperties_STATUS interface (if implemented) to customize the conversion
	var propertiesAsAny any = properties
	if augmentedProperties, ok := propertiesAsAny.(augmentConversionForActiveDirectoryProperties_STATUS); ok {
		err := augmentedProperties.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(properties.PropertyBag)

	// AccountType
	destination.AccountType = genruntime.ClonePointerToString(properties.AccountType)

	// 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)

	// SamAccountName
	destination.SamAccountName = genruntime.ClonePointerToString(properties.SamAccountName)

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

	// Invoke the augmentConversionForActiveDirectoryProperties_STATUS interface (if implemented) to customize the conversion
	var propertiesAsAny any = properties
	if augmentedProperties, ok := propertiesAsAny.(augmentConversionForActiveDirectoryProperties_STATUS); ok {
		err := augmentedProperties.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

type augmentConversionForAzureFilesIdentityBasedAuthentication interface {
	AssignPropertiesFrom(src *storage.AzureFilesIdentityBasedAuthentication) error
	AssignPropertiesTo(dst *storage.AzureFilesIdentityBasedAuthentication) error
}

type augmentConversionForAzureFilesIdentityBasedAuthentication_STATUS interface {
	AssignPropertiesFrom(src *storage.AzureFilesIdentityBasedAuthentication_STATUS) error
	AssignPropertiesTo(dst *storage.AzureFilesIdentityBasedAuthentication_STATUS) error
}

type augmentConversionForBlobRestoreStatus_STATUS interface {
	AssignPropertiesFrom(src *storage.BlobRestoreStatus_STATUS) error
	AssignPropertiesTo(dst *storage.BlobRestoreStatus_STATUS) error
}

type augmentConversionForCustomDomain interface {
	AssignPropertiesFrom(src *storage.CustomDomain) error
	AssignPropertiesTo(dst *storage.CustomDomain) error
}

type augmentConversionForCustomDomain_STATUS interface {
	AssignPropertiesFrom(src *storage.CustomDomain_STATUS) error
	AssignPropertiesTo(dst *storage.CustomDomain_STATUS) error
}

type augmentConversionForEncryption interface {
	AssignPropertiesFrom(src *storage.Encryption) error
	AssignPropertiesTo(dst *storage.Encryption) error
}

type augmentConversionForEncryption_STATUS interface {
	AssignPropertiesFrom(src *storage.Encryption_STATUS) error
	AssignPropertiesTo(dst *storage.Encryption_STATUS) error
}

type augmentConversionForEndpoints_STATUS interface {
	AssignPropertiesFrom(src *storage.Endpoints_STATUS) error
	AssignPropertiesTo(dst *storage.Endpoints_STATUS) error
}

type augmentConversionForExtendedLocation interface {
	AssignPropertiesFrom(src *storage.ExtendedLocation) error
	AssignPropertiesTo(dst *storage.ExtendedLocation) error
}

type augmentConversionForExtendedLocation_STATUS interface {
	AssignPropertiesFrom(src *storage.ExtendedLocation_STATUS) error
	AssignPropertiesTo(dst *storage.ExtendedLocation_STATUS) error
}

type augmentConversionForGeoReplicationStats_STATUS interface {
	AssignPropertiesFrom(src *storage.GeoReplicationStats_STATUS) error
	AssignPropertiesTo(dst *storage.GeoReplicationStats_STATUS) error
}

type augmentConversionForIdentity interface {
	AssignPropertiesFrom(src *storage.Identity) error
	AssignPropertiesTo(dst *storage.Identity) error
}

type augmentConversionForIdentity_STATUS interface {
	AssignPropertiesFrom(src *storage.Identity_STATUS) error
	AssignPropertiesTo(dst *storage.Identity_STATUS) error
}

type augmentConversionForImmutableStorageAccount interface {
	AssignPropertiesFrom(src *storage.ImmutableStorageAccount) error
	AssignPropertiesTo(dst *storage.ImmutableStorageAccount) error
}

type augmentConversionForImmutableStorageAccount_STATUS interface {
	AssignPropertiesFrom(src *storage.ImmutableStorageAccount_STATUS) error
	AssignPropertiesTo(dst *storage.ImmutableStorageAccount_STATUS) error
}

type augmentConversionForKeyCreationTime_STATUS interface {
	AssignPropertiesFrom(src *storage.KeyCreationTime_STATUS) error
	AssignPropertiesTo(dst *storage.KeyCreationTime_STATUS) error
}

type augmentConversionForKeyPolicy interface {
	AssignPropertiesFrom(src *storage.KeyPolicy) error
	AssignPropertiesTo(dst *storage.KeyPolicy) error
}

type augmentConversionForKeyPolicy_STATUS interface {
	AssignPropertiesFrom(src *storage.KeyPolicy_STATUS) error
	AssignPropertiesTo(dst *storage.KeyPolicy_STATUS) error
}

type augmentConversionForNetworkRuleSet interface {
	AssignPropertiesFrom(src *storage.NetworkRuleSet) error
	AssignPropertiesTo(dst *storage.NetworkRuleSet) error
}

type augmentConversionForNetworkRuleSet_STATUS interface {
	AssignPropertiesFrom(src *storage.NetworkRuleSet_STATUS) error
	AssignPropertiesTo(dst *storage.NetworkRuleSet_STATUS) error
}

type augmentConversionForPrivateEndpointConnection_STATUS interface {
	AssignPropertiesFrom(src *storage.PrivateEndpointConnection_STATUS) error
	AssignPropertiesTo(dst *storage.PrivateEndpointConnection_STATUS) error
}

type augmentConversionForRoutingPreference interface {
	AssignPropertiesFrom(src *storage.RoutingPreference) error
	AssignPropertiesTo(dst *storage.RoutingPreference) error
}

type augmentConversionForRoutingPreference_STATUS interface {
	AssignPropertiesFrom(src *storage.RoutingPreference_STATUS) error
	AssignPropertiesTo(dst *storage.RoutingPreference_STATUS) error
}

type augmentConversionForSasPolicy interface {
	AssignPropertiesFrom(src *storage.SasPolicy) error
	AssignPropertiesTo(dst *storage.SasPolicy) error
}

type augmentConversionForSasPolicy_STATUS interface {
	AssignPropertiesFrom(src *storage.SasPolicy_STATUS) error
	AssignPropertiesTo(dst *storage.SasPolicy_STATUS) error
}

type augmentConversionForSku interface {
	AssignPropertiesFrom(src *storage.Sku) error
	AssignPropertiesTo(dst *storage.Sku) error
}

type augmentConversionForSku_STATUS interface {
	AssignPropertiesFrom(src *storage.Sku_STATUS) error
	AssignPropertiesTo(dst *storage.Sku_STATUS) error
}

type augmentConversionForStorageAccountOperatorSpec interface {
	AssignPropertiesFrom(src *storage.StorageAccountOperatorSpec) error
	AssignPropertiesTo(dst *storage.StorageAccountOperatorSpec) error
}

type augmentConversionForStorageAccountSkuConversionStatus_STATUS interface {
	AssignPropertiesFrom(src *storage.StorageAccountSkuConversionStatus_STATUS) error
	AssignPropertiesTo(dst *storage.StorageAccountSkuConversionStatus_STATUS) error
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// 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)

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

	// Invoke the augmentConversionForBlobRestoreParameters_STATUS interface (if implemented) to customize the conversion
	var parametersAsAny any = parameters
	if augmentedParameters, ok := parametersAsAny.(augmentConversionForBlobRestoreParameters_STATUS); ok {
		err := augmentedParameters.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(parameters.PropertyBag)

	// 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
	}

	// Invoke the augmentConversionForBlobRestoreParameters_STATUS interface (if implemented) to customize the conversion
	var parametersAsAny any = parameters
	if augmentedParameters, ok := parametersAsAny.(augmentConversionForBlobRestoreParameters_STATUS); ok {
		err := augmentedParameters.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

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

// AssignProperties_From_EncryptionIdentity populates our EncryptionIdentity from the provided source EncryptionIdentity
func (identity *EncryptionIdentity) AssignProperties_From_EncryptionIdentity(source *storage.EncryptionIdentity) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

	// UserAssignedIdentityReference
	if source.UserAssignedIdentityReference != nil {
		userAssignedIdentityReference := source.UserAssignedIdentityReference.Copy()
		identity.UserAssignedIdentityReference = &userAssignedIdentityReference
	} else {
		identity.UserAssignedIdentityReference = nil
	}

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

	// Invoke the augmentConversionForEncryptionIdentity interface (if implemented) to customize the conversion
	var identityAsAny any = identity
	if augmentedIdentity, ok := identityAsAny.(augmentConversionForEncryptionIdentity); ok {
		err := augmentedIdentity.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(identity.PropertyBag)

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

	// 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
	}

	// Invoke the augmentConversionForEncryptionIdentity interface (if implemented) to customize the conversion
	var identityAsAny any = identity
	if augmentedIdentity, ok := identityAsAny.(augmentConversionForEncryptionIdentity); ok {
		err := augmentedIdentity.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

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

	// Invoke the augmentConversionForEncryptionIdentity_STATUS interface (if implemented) to customize the conversion
	var identityAsAny any = identity
	if augmentedIdentity, ok := identityAsAny.(augmentConversionForEncryptionIdentity_STATUS); ok {
		err := augmentedIdentity.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(identity.PropertyBag)

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

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

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

	// Invoke the augmentConversionForEncryptionIdentity_STATUS interface (if implemented) to customize the conversion
	var identityAsAny any = identity
	if augmentedIdentity, ok := identityAsAny.(augmentConversionForEncryptionIdentity_STATUS); ok {
		err := augmentedIdentity.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_EncryptionServices populates our EncryptionServices from the provided source EncryptionServices
func (services *EncryptionServices) AssignProperties_From_EncryptionServices(source *storage.EncryptionServices) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// 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
	}

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

	// Invoke the augmentConversionForEncryptionServices interface (if implemented) to customize the conversion
	var servicesAsAny any = services
	if augmentedServices, ok := servicesAsAny.(augmentConversionForEncryptionServices); ok {
		err := augmentedServices.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(services.PropertyBag)

	// 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
	}

	// Invoke the augmentConversionForEncryptionServices interface (if implemented) to customize the conversion
	var servicesAsAny any = services
	if augmentedServices, ok := servicesAsAny.(augmentConversionForEncryptionServices); ok {
		err := augmentedServices.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// 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
	}

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

	// Invoke the augmentConversionForEncryptionServices_STATUS interface (if implemented) to customize the conversion
	var servicesAsAny any = services
	if augmentedServices, ok := servicesAsAny.(augmentConversionForEncryptionServices_STATUS); ok {
		err := augmentedServices.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(services.PropertyBag)

	// 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
	}

	// Invoke the augmentConversionForEncryptionServices_STATUS interface (if implemented) to customize the conversion
	var servicesAsAny any = services
	if augmentedServices, ok := servicesAsAny.(augmentConversionForEncryptionServices_STATUS); ok {
		err := augmentedServices.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_IPRule populates our IPRule from the provided source IPRule
func (rule *IPRule) AssignProperties_From_IPRule(source *storage.IPRule) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Action
	rule.Action = genruntime.ClonePointerToString(source.Action)

	// Value
	rule.Value = genruntime.ClonePointerToString(source.Value)

	// ValueFromConfig
	if source.ValueFromConfig != nil {
		valueFromConfig := source.ValueFromConfig.Copy()
		rule.ValueFromConfig = &valueFromConfig
	} else {
		rule.ValueFromConfig = nil
	}

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

	// Invoke the augmentConversionForIPRule interface (if implemented) to customize the conversion
	var ruleAsAny any = rule
	if augmentedRule, ok := ruleAsAny.(augmentConversionForIPRule); ok {
		err := augmentedRule.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(rule.PropertyBag)

	// Action
	destination.Action = genruntime.ClonePointerToString(rule.Action)

	// 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
	}

	// Invoke the augmentConversionForIPRule interface (if implemented) to customize the conversion
	var ruleAsAny any = rule
	if augmentedRule, ok := ruleAsAny.(augmentConversionForIPRule); ok {
		err := augmentedRule.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Action
	rule.Action = genruntime.ClonePointerToString(source.Action)

	// Value
	rule.Value = genruntime.ClonePointerToString(source.Value)

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

	// Invoke the augmentConversionForIPRule_STATUS interface (if implemented) to customize the conversion
	var ruleAsAny any = rule
	if augmentedRule, ok := ruleAsAny.(augmentConversionForIPRule_STATUS); ok {
		err := augmentedRule.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(rule.PropertyBag)

	// Action
	destination.Action = genruntime.ClonePointerToString(rule.Action)

	// Value
	destination.Value = genruntime.ClonePointerToString(rule.Value)

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

	// Invoke the augmentConversionForIPRule_STATUS interface (if implemented) to customize the conversion
	var ruleAsAny any = rule
	if augmentedRule, ok := ruleAsAny.(augmentConversionForIPRule_STATUS); ok {
		err := augmentedRule.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_KeyVaultProperties populates our KeyVaultProperties from the provided source KeyVaultProperties
func (properties *KeyVaultProperties) AssignProperties_From_KeyVaultProperties(source *storage.KeyVaultProperties) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Keyname
	properties.Keyname = genruntime.ClonePointerToString(source.Keyname)

	// Keyvaulturi
	properties.Keyvaulturi = genruntime.ClonePointerToString(source.Keyvaulturi)

	// Keyversion
	properties.Keyversion = genruntime.ClonePointerToString(source.Keyversion)

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

	// Invoke the augmentConversionForKeyVaultProperties interface (if implemented) to customize the conversion
	var propertiesAsAny any = properties
	if augmentedProperties, ok := propertiesAsAny.(augmentConversionForKeyVaultProperties); ok {
		err := augmentedProperties.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(properties.PropertyBag)

	// 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
	}

	// Invoke the augmentConversionForKeyVaultProperties interface (if implemented) to customize the conversion
	var propertiesAsAny any = properties
	if augmentedProperties, ok := propertiesAsAny.(augmentConversionForKeyVaultProperties); ok {
		err := augmentedProperties.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// CurrentVersionedKeyExpirationTimestamp
	properties.CurrentVersionedKeyExpirationTimestamp = genruntime.ClonePointerToString(source.CurrentVersionedKeyExpirationTimestamp)

	// 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)

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

	// Invoke the augmentConversionForKeyVaultProperties_STATUS interface (if implemented) to customize the conversion
	var propertiesAsAny any = properties
	if augmentedProperties, ok := propertiesAsAny.(augmentConversionForKeyVaultProperties_STATUS); ok {
		err := augmentedProperties.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(properties.PropertyBag)

	// CurrentVersionedKeyExpirationTimestamp
	destination.CurrentVersionedKeyExpirationTimestamp = genruntime.ClonePointerToString(properties.CurrentVersionedKeyExpirationTimestamp)

	// 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
	}

	// Invoke the augmentConversionForKeyVaultProperties_STATUS interface (if implemented) to customize the conversion
	var propertiesAsAny any = properties
	if augmentedProperties, ok := propertiesAsAny.(augmentConversionForKeyVaultProperties_STATUS); ok {
		err := augmentedProperties.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

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

// AssignProperties_From_ResourceAccessRule populates our ResourceAccessRule from the provided source ResourceAccessRule
func (rule *ResourceAccessRule) AssignProperties_From_ResourceAccessRule(source *storage.ResourceAccessRule) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// ResourceReference
	if source.ResourceReference != nil {
		resourceReference := source.ResourceReference.Copy()
		rule.ResourceReference = &resourceReference
	} else {
		rule.ResourceReference = nil
	}

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

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

	// Invoke the augmentConversionForResourceAccessRule interface (if implemented) to customize the conversion
	var ruleAsAny any = rule
	if augmentedRule, ok := ruleAsAny.(augmentConversionForResourceAccessRule); ok {
		err := augmentedRule.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(rule.PropertyBag)

	// 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
	}

	// Invoke the augmentConversionForResourceAccessRule interface (if implemented) to customize the conversion
	var ruleAsAny any = rule
	if augmentedRule, ok := ruleAsAny.(augmentConversionForResourceAccessRule); ok {
		err := augmentedRule.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// ResourceId
	rule.ResourceId = genruntime.ClonePointerToString(source.ResourceId)

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

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

	// Invoke the augmentConversionForResourceAccessRule_STATUS interface (if implemented) to customize the conversion
	var ruleAsAny any = rule
	if augmentedRule, ok := ruleAsAny.(augmentConversionForResourceAccessRule_STATUS); ok {
		err := augmentedRule.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(rule.PropertyBag)

	// 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
	}

	// Invoke the augmentConversionForResourceAccessRule_STATUS interface (if implemented) to customize the conversion
	var ruleAsAny any = rule
	if augmentedRule, ok := ruleAsAny.(augmentConversionForResourceAccessRule_STATUS); ok {
		err := augmentedRule.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// 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)

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

	// Invoke the augmentConversionForStorageAccountInternetEndpoints_STATUS interface (if implemented) to customize the conversion
	var endpointsAsAny any = endpoints
	if augmentedEndpoints, ok := endpointsAsAny.(augmentConversionForStorageAccountInternetEndpoints_STATUS); ok {
		err := augmentedEndpoints.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(endpoints.PropertyBag)

	// 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
	}

	// Invoke the augmentConversionForStorageAccountInternetEndpoints_STATUS interface (if implemented) to customize the conversion
	var endpointsAsAny any = endpoints
	if augmentedEndpoints, ok := endpointsAsAny.(augmentConversionForStorageAccountInternetEndpoints_STATUS); ok {
		err := augmentedEndpoints.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// 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)

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

	// Invoke the augmentConversionForStorageAccountMicrosoftEndpoints_STATUS interface (if implemented) to customize the conversion
	var endpointsAsAny any = endpoints
	if augmentedEndpoints, ok := endpointsAsAny.(augmentConversionForStorageAccountMicrosoftEndpoints_STATUS); ok {
		err := augmentedEndpoints.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(endpoints.PropertyBag)

	// 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
	}

	// Invoke the augmentConversionForStorageAccountMicrosoftEndpoints_STATUS interface (if implemented) to customize the conversion
	var endpointsAsAny any = endpoints
	if augmentedEndpoints, ok := endpointsAsAny.(augmentConversionForStorageAccountMicrosoftEndpoints_STATUS); ok {
		err := augmentedEndpoints.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_StorageAccountOperatorConfigMaps populates our StorageAccountOperatorConfigMaps from the provided source StorageAccountOperatorConfigMaps
func (maps *StorageAccountOperatorConfigMaps) AssignProperties_From_StorageAccountOperatorConfigMaps(source *storage.StorageAccountOperatorConfigMaps) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// 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
	}

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

	// Invoke the augmentConversionForStorageAccountOperatorConfigMaps interface (if implemented) to customize the conversion
	var mapsAsAny any = maps
	if augmentedMaps, ok := mapsAsAny.(augmentConversionForStorageAccountOperatorConfigMaps); ok {
		err := augmentedMaps.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(maps.PropertyBag)

	// 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
	}

	// Invoke the augmentConversionForStorageAccountOperatorConfigMaps interface (if implemented) to customize the conversion
	var mapsAsAny any = maps
	if augmentedMaps, ok := mapsAsAny.(augmentConversionForStorageAccountOperatorConfigMaps); ok {
		err := augmentedMaps.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_StorageAccountOperatorSecrets populates our StorageAccountOperatorSecrets from the provided source StorageAccountOperatorSecrets
func (secrets *StorageAccountOperatorSecrets) AssignProperties_From_StorageAccountOperatorSecrets(source *storage.StorageAccountOperatorSecrets) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// 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
	}

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

	// Invoke the augmentConversionForStorageAccountOperatorSecrets interface (if implemented) to customize the conversion
	var secretsAsAny any = secrets
	if augmentedSecrets, ok := secretsAsAny.(augmentConversionForStorageAccountOperatorSecrets); ok {
		err := augmentedSecrets.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(secrets.PropertyBag)

	// 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
	}

	// Invoke the augmentConversionForStorageAccountOperatorSecrets interface (if implemented) to customize the conversion
	var secretsAsAny any = secrets
	if augmentedSecrets, ok := secretsAsAny.(augmentConversionForStorageAccountOperatorSecrets); ok {
		err := augmentedSecrets.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

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

	// Invoke the augmentConversionForUserAssignedIdentity_STATUS interface (if implemented) to customize the conversion
	var identityAsAny any = identity
	if augmentedIdentity, ok := identityAsAny.(augmentConversionForUserAssignedIdentity_STATUS); ok {
		err := augmentedIdentity.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(identity.PropertyBag)

	// 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
	}

	// Invoke the augmentConversionForUserAssignedIdentity_STATUS interface (if implemented) to customize the conversion
	var identityAsAny any = identity
	if augmentedIdentity, ok := identityAsAny.(augmentConversionForUserAssignedIdentity_STATUS); ok {
		err := augmentedIdentity.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_UserAssignedIdentityDetails populates our UserAssignedIdentityDetails from the provided source UserAssignedIdentityDetails
func (details *UserAssignedIdentityDetails) AssignProperties_From_UserAssignedIdentityDetails(source *storage.UserAssignedIdentityDetails) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Reference
	details.Reference = source.Reference.Copy()

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

	// Invoke the augmentConversionForUserAssignedIdentityDetails interface (if implemented) to customize the conversion
	var detailsAsAny any = details
	if augmentedDetails, ok := detailsAsAny.(augmentConversionForUserAssignedIdentityDetails); ok {
		err := augmentedDetails.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(details.PropertyBag)

	// Reference
	destination.Reference = details.Reference.Copy()

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

	// Invoke the augmentConversionForUserAssignedIdentityDetails interface (if implemented) to customize the conversion
	var detailsAsAny any = details
	if augmentedDetails, ok := detailsAsAny.(augmentConversionForUserAssignedIdentityDetails); ok {
		err := augmentedDetails.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20220901.VirtualNetworkRule
// Virtual Network rule.
type VirtualNetworkRule struct {
	Action      *string                `json:"action,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`

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

// AssignProperties_From_VirtualNetworkRule populates our VirtualNetworkRule from the provided source VirtualNetworkRule
func (rule *VirtualNetworkRule) AssignProperties_From_VirtualNetworkRule(source *storage.VirtualNetworkRule) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Action
	rule.Action = genruntime.ClonePointerToString(source.Action)

	// Reference
	if source.Reference != nil {
		reference := source.Reference.Copy()
		rule.Reference = &reference
	} else {
		rule.Reference = nil
	}

	// State
	rule.State = genruntime.ClonePointerToString(source.State)

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

	// Invoke the augmentConversionForVirtualNetworkRule interface (if implemented) to customize the conversion
	var ruleAsAny any = rule
	if augmentedRule, ok := ruleAsAny.(augmentConversionForVirtualNetworkRule); ok {
		err := augmentedRule.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(rule.PropertyBag)

	// Action
	destination.Action = genruntime.ClonePointerToString(rule.Action)

	// Reference
	if rule.Reference != nil {
		reference := rule.Reference.Copy()
		destination.Reference = &reference
	} else {
		destination.Reference = nil
	}

	// State
	destination.State = genruntime.ClonePointerToString(rule.State)

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

	// Invoke the augmentConversionForVirtualNetworkRule interface (if implemented) to customize the conversion
	var ruleAsAny any = rule
	if augmentedRule, ok := ruleAsAny.(augmentConversionForVirtualNetworkRule); ok {
		err := augmentedRule.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Action
	rule.Action = genruntime.ClonePointerToString(source.Action)

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

	// State
	rule.State = genruntime.ClonePointerToString(source.State)

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

	// Invoke the augmentConversionForVirtualNetworkRule_STATUS interface (if implemented) to customize the conversion
	var ruleAsAny any = rule
	if augmentedRule, ok := ruleAsAny.(augmentConversionForVirtualNetworkRule_STATUS); ok {
		err := augmentedRule.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(rule.PropertyBag)

	// Action
	destination.Action = genruntime.ClonePointerToString(rule.Action)

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

	// State
	destination.State = genruntime.ClonePointerToString(rule.State)

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

	// Invoke the augmentConversionForVirtualNetworkRule_STATUS interface (if implemented) to customize the conversion
	var ruleAsAny any = rule
	if augmentedRule, ok := ruleAsAny.(augmentConversionForVirtualNetworkRule_STATUS); ok {
		err := augmentedRule.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

type augmentConversionForAccountImmutabilityPolicyProperties interface {
	AssignPropertiesFrom(src *storage.AccountImmutabilityPolicyProperties) error
	AssignPropertiesTo(dst *storage.AccountImmutabilityPolicyProperties) error
}

type augmentConversionForAccountImmutabilityPolicyProperties_STATUS interface {
	AssignPropertiesFrom(src *storage.AccountImmutabilityPolicyProperties_STATUS) error
	AssignPropertiesTo(dst *storage.AccountImmutabilityPolicyProperties_STATUS) error
}

type augmentConversionForActiveDirectoryProperties interface {
	AssignPropertiesFrom(src *storage.ActiveDirectoryProperties) error
	AssignPropertiesTo(dst *storage.ActiveDirectoryProperties) error
}

type augmentConversionForActiveDirectoryProperties_STATUS interface {
	AssignPropertiesFrom(src *storage.ActiveDirectoryProperties_STATUS) error
	AssignPropertiesTo(dst *storage.ActiveDirectoryProperties_STATUS) error
}

type augmentConversionForBlobRestoreParameters_STATUS interface {
	AssignPropertiesFrom(src *storage.BlobRestoreParameters_STATUS) error
	AssignPropertiesTo(dst *storage.BlobRestoreParameters_STATUS) error
}

type augmentConversionForEncryptionIdentity interface {
	AssignPropertiesFrom(src *storage.EncryptionIdentity) error
	AssignPropertiesTo(dst *storage.EncryptionIdentity) error
}

type augmentConversionForEncryptionIdentity_STATUS interface {
	AssignPropertiesFrom(src *storage.EncryptionIdentity_STATUS) error
	AssignPropertiesTo(dst *storage.EncryptionIdentity_STATUS) error
}

type augmentConversionForEncryptionServices interface {
	AssignPropertiesFrom(src *storage.EncryptionServices) error
	AssignPropertiesTo(dst *storage.EncryptionServices) error
}

type augmentConversionForEncryptionServices_STATUS interface {
	AssignPropertiesFrom(src *storage.EncryptionServices_STATUS) error
	AssignPropertiesTo(dst *storage.EncryptionServices_STATUS) error
}

type augmentConversionForIPRule interface {
	AssignPropertiesFrom(src *storage.IPRule) error
	AssignPropertiesTo(dst *storage.IPRule) error
}

type augmentConversionForIPRule_STATUS interface {
	AssignPropertiesFrom(src *storage.IPRule_STATUS) error
	AssignPropertiesTo(dst *storage.IPRule_STATUS) error
}

type augmentConversionForKeyVaultProperties interface {
	AssignPropertiesFrom(src *storage.KeyVaultProperties) error
	AssignPropertiesTo(dst *storage.KeyVaultProperties) error
}

type augmentConversionForKeyVaultProperties_STATUS interface {
	AssignPropertiesFrom(src *storage.KeyVaultProperties_STATUS) error
	AssignPropertiesTo(dst *storage.KeyVaultProperties_STATUS) error
}

type augmentConversionForResourceAccessRule interface {
	AssignPropertiesFrom(src *storage.ResourceAccessRule) error
	AssignPropertiesTo(dst *storage.ResourceAccessRule) error
}

type augmentConversionForResourceAccessRule_STATUS interface {
	AssignPropertiesFrom(src *storage.ResourceAccessRule_STATUS) error
	AssignPropertiesTo(dst *storage.ResourceAccessRule_STATUS) error
}

type augmentConversionForStorageAccountInternetEndpoints_STATUS interface {
	AssignPropertiesFrom(src *storage.StorageAccountInternetEndpoints_STATUS) error
	AssignPropertiesTo(dst *storage.StorageAccountInternetEndpoints_STATUS) error
}

type augmentConversionForStorageAccountMicrosoftEndpoints_STATUS interface {
	AssignPropertiesFrom(src *storage.StorageAccountMicrosoftEndpoints_STATUS) error
	AssignPropertiesTo(dst *storage.StorageAccountMicrosoftEndpoints_STATUS) error
}

type augmentConversionForStorageAccountOperatorConfigMaps interface {
	AssignPropertiesFrom(src *storage.StorageAccountOperatorConfigMaps) error
	AssignPropertiesTo(dst *storage.StorageAccountOperatorConfigMaps) error
}

type augmentConversionForStorageAccountOperatorSecrets interface {
	AssignPropertiesFrom(src *storage.StorageAccountOperatorSecrets) error
	AssignPropertiesTo(dst *storage.StorageAccountOperatorSecrets) error
}

type augmentConversionForUserAssignedIdentity_STATUS interface {
	AssignPropertiesFrom(src *storage.UserAssignedIdentity_STATUS) error
	AssignPropertiesTo(dst *storage.UserAssignedIdentity_STATUS) error
}

type augmentConversionForUserAssignedIdentityDetails interface {
	AssignPropertiesFrom(src *storage.UserAssignedIdentityDetails) error
	AssignPropertiesTo(dst *storage.UserAssignedIdentityDetails) error
}

type augmentConversionForVirtualNetworkRule interface {
	AssignPropertiesFrom(src *storage.VirtualNetworkRule) error
	AssignPropertiesTo(dst *storage.VirtualNetworkRule) error
}

type augmentConversionForVirtualNetworkRule_STATUS interface {
	AssignPropertiesFrom(src *storage.VirtualNetworkRule_STATUS) error
	AssignPropertiesTo(dst *storage.VirtualNetworkRule_STATUS) error
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// EndRange
	restoreRange.EndRange = genruntime.ClonePointerToString(source.EndRange)

	// StartRange
	restoreRange.StartRange = genruntime.ClonePointerToString(source.StartRange)

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

	// Invoke the augmentConversionForBlobRestoreRange_STATUS interface (if implemented) to customize the conversion
	var restoreRangeAsAny any = restoreRange
	if augmentedRestoreRange, ok := restoreRangeAsAny.(augmentConversionForBlobRestoreRange_STATUS); ok {
		err := augmentedRestoreRange.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(restoreRange.PropertyBag)

	// 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
	}

	// Invoke the augmentConversionForBlobRestoreRange_STATUS interface (if implemented) to customize the conversion
	var restoreRangeAsAny any = restoreRange
	if augmentedRestoreRange, ok := restoreRangeAsAny.(augmentConversionForBlobRestoreRange_STATUS); ok {
		err := augmentedRestoreRange.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// AssignProperties_From_EncryptionService populates our EncryptionService from the provided source EncryptionService
func (service *EncryptionService) AssignProperties_From_EncryptionService(source *storage.EncryptionService) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		service.Enabled = &enabled
	} else {
		service.Enabled = nil
	}

	// KeyType
	service.KeyType = genruntime.ClonePointerToString(source.KeyType)

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

	// Invoke the augmentConversionForEncryptionService interface (if implemented) to customize the conversion
	var serviceAsAny any = service
	if augmentedService, ok := serviceAsAny.(augmentConversionForEncryptionService); ok {
		err := augmentedService.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(service.PropertyBag)

	// Enabled
	if service.Enabled != nil {
		enabled := *service.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

	// KeyType
	destination.KeyType = genruntime.ClonePointerToString(service.KeyType)

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

	// Invoke the augmentConversionForEncryptionService interface (if implemented) to customize the conversion
	var serviceAsAny any = service
	if augmentedService, ok := serviceAsAny.(augmentConversionForEncryptionService); ok {
		err := augmentedService.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		service.Enabled = &enabled
	} else {
		service.Enabled = nil
	}

	// KeyType
	service.KeyType = genruntime.ClonePointerToString(source.KeyType)

	// LastEnabledTime
	service.LastEnabledTime = genruntime.ClonePointerToString(source.LastEnabledTime)

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

	// Invoke the augmentConversionForEncryptionService_STATUS interface (if implemented) to customize the conversion
	var serviceAsAny any = service
	if augmentedService, ok := serviceAsAny.(augmentConversionForEncryptionService_STATUS); ok {
		err := augmentedService.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(service.PropertyBag)

	// Enabled
	if service.Enabled != nil {
		enabled := *service.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

	// KeyType
	destination.KeyType = genruntime.ClonePointerToString(service.KeyType)

	// LastEnabledTime
	destination.LastEnabledTime = genruntime.ClonePointerToString(service.LastEnabledTime)

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

	// Invoke the augmentConversionForEncryptionService_STATUS interface (if implemented) to customize the conversion
	var serviceAsAny any = service
	if augmentedService, ok := serviceAsAny.(augmentConversionForEncryptionService_STATUS); ok {
		err := augmentedService.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

type augmentConversionForBlobRestoreRange_STATUS interface {
	AssignPropertiesFrom(src *storage.BlobRestoreRange_STATUS) error
	AssignPropertiesTo(dst *storage.BlobRestoreRange_STATUS) error
}

type augmentConversionForEncryptionService interface {
	AssignPropertiesFrom(src *storage.EncryptionService) error
	AssignPropertiesTo(dst *storage.EncryptionService) error
}

type augmentConversionForEncryptionService_STATUS interface {
	AssignPropertiesFrom(src *storage.EncryptionService_STATUS) error
	AssignPropertiesTo(dst *storage.EncryptionService_STATUS) error
}

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