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

import (
	"fmt"
	storage "github.com/Azure/azure-service-operator/v2/api/storage/v1api20230101/storage"
	"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/rotisserie/eris"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime/schema"
	"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.StorageAccountsBlobServicesContainer
// Generator information:
// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2022-09-01/blob.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}
type StorageAccountsBlobServicesContainer struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              StorageAccountsBlobServicesContainer_Spec   `json:"spec,omitempty"`
	Status            StorageAccountsBlobServicesContainer_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &StorageAccountsBlobServicesContainer{}

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

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

var _ conversion.Convertible = &StorageAccountsBlobServicesContainer{}

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

	return container.AssignProperties_From_StorageAccountsBlobServicesContainer(source)
}

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

	return container.AssignProperties_To_StorageAccountsBlobServicesContainer(destination)
}

var _ configmaps.Exporter = &StorageAccountsBlobServicesContainer{}

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

var _ secrets.Exporter = &StorageAccountsBlobServicesContainer{}

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

var _ genruntime.KubernetesResource = &StorageAccountsBlobServicesContainer{}

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

// GetAPIVersion returns the ARM API version of the resource. This is always "2022-09-01"
func (container StorageAccountsBlobServicesContainer) GetAPIVersion() string {
	return "2022-09-01"
}

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

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

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

// GetSupportedOperations returns the operations supported by the resource
func (container *StorageAccountsBlobServicesContainer) 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/blobServices/containers"
func (container *StorageAccountsBlobServicesContainer) GetType() string {
	return "Microsoft.Storage/storageAccounts/blobServices/containers"
}

// NewEmptyStatus returns a new empty (blank) status
func (container *StorageAccountsBlobServicesContainer) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &StorageAccountsBlobServicesContainer_STATUS{}
}

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

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

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

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

	container.Status = st
	return nil
}

// AssignProperties_From_StorageAccountsBlobServicesContainer populates our StorageAccountsBlobServicesContainer from the provided source StorageAccountsBlobServicesContainer
func (container *StorageAccountsBlobServicesContainer) AssignProperties_From_StorageAccountsBlobServicesContainer(source *storage.StorageAccountsBlobServicesContainer) error {

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

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

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

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

	// No error
	return nil
}

// AssignProperties_To_StorageAccountsBlobServicesContainer populates the provided destination StorageAccountsBlobServicesContainer from our StorageAccountsBlobServicesContainer
func (container *StorageAccountsBlobServicesContainer) AssignProperties_To_StorageAccountsBlobServicesContainer(destination *storage.StorageAccountsBlobServicesContainer) error {

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

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

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

	// Invoke the augmentConversionForStorageAccountsBlobServicesContainer interface (if implemented) to customize the conversion
	var containerAsAny any = container
	if augmentedContainer, ok := containerAsAny.(augmentConversionForStorageAccountsBlobServicesContainer); ok {
		err := augmentedContainer.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 (container *StorageAccountsBlobServicesContainer) OriginalGVK() *schema.GroupVersionKind {
	return &schema.GroupVersionKind{
		Group:   GroupVersion.Group,
		Version: container.Spec.OriginalVersion,
		Kind:    "StorageAccountsBlobServicesContainer",
	}
}

// +kubebuilder:object:root=true
// Storage version of v1api20220901.StorageAccountsBlobServicesContainer
// Generator information:
// - Generated from: /storage/resource-manager/Microsoft.Storage/stable/2022-09-01/blob.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}
type StorageAccountsBlobServicesContainerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []StorageAccountsBlobServicesContainer `json:"items"`
}

type augmentConversionForStorageAccountsBlobServicesContainer interface {
	AssignPropertiesFrom(src *storage.StorageAccountsBlobServicesContainer) error
	AssignPropertiesTo(dst *storage.StorageAccountsBlobServicesContainer) error
}

// Storage version of v1api20220901.StorageAccountsBlobServicesContainer_Spec
type StorageAccountsBlobServicesContainer_Spec struct {
	// 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"`
	DefaultEncryptionScope         *string                                           `json:"defaultEncryptionScope,omitempty"`
	DenyEncryptionScopeOverride    *bool                                             `json:"denyEncryptionScopeOverride,omitempty"`
	EnableNfsV3AllSquash           *bool                                             `json:"enableNfsV3AllSquash,omitempty"`
	EnableNfsV3RootSquash          *bool                                             `json:"enableNfsV3RootSquash,omitempty"`
	ImmutableStorageWithVersioning *ImmutableStorageWithVersioning                   `json:"immutableStorageWithVersioning,omitempty"`
	Metadata                       map[string]string                                 `json:"metadata,omitempty"`
	OperatorSpec                   *StorageAccountsBlobServicesContainerOperatorSpec `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 storage.azure.com/StorageAccountsBlobService resource
	Owner        *genruntime.KnownResourceReference `group:"storage.azure.com" json:"owner,omitempty" kind:"StorageAccountsBlobService"`
	PropertyBag  genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
	PublicAccess *string                            `json:"publicAccess,omitempty"`
}

var _ genruntime.ConvertibleSpec = &StorageAccountsBlobServicesContainer_Spec{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.StorageAccountsBlobServicesContainer_Spec{}
	err := container.AssignProperties_To_StorageAccountsBlobServicesContainer_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_StorageAccountsBlobServicesContainer_Spec populates our StorageAccountsBlobServicesContainer_Spec from the provided source StorageAccountsBlobServicesContainer_Spec
func (container *StorageAccountsBlobServicesContainer_Spec) AssignProperties_From_StorageAccountsBlobServicesContainer_Spec(source *storage.StorageAccountsBlobServicesContainer_Spec) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// AzureName
	container.AzureName = source.AzureName

	// DefaultEncryptionScope
	container.DefaultEncryptionScope = genruntime.ClonePointerToString(source.DefaultEncryptionScope)

	// DenyEncryptionScopeOverride
	if source.DenyEncryptionScopeOverride != nil {
		denyEncryptionScopeOverride := *source.DenyEncryptionScopeOverride
		container.DenyEncryptionScopeOverride = &denyEncryptionScopeOverride
	} else {
		container.DenyEncryptionScopeOverride = nil
	}

	// EnableNfsV3AllSquash
	if source.EnableNfsV3AllSquash != nil {
		enableNfsV3AllSquash := *source.EnableNfsV3AllSquash
		container.EnableNfsV3AllSquash = &enableNfsV3AllSquash
	} else {
		container.EnableNfsV3AllSquash = nil
	}

	// EnableNfsV3RootSquash
	if source.EnableNfsV3RootSquash != nil {
		enableNfsV3RootSquash := *source.EnableNfsV3RootSquash
		container.EnableNfsV3RootSquash = &enableNfsV3RootSquash
	} else {
		container.EnableNfsV3RootSquash = nil
	}

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

	// Metadata
	container.Metadata = genruntime.CloneMapOfStringToString(source.Metadata)

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

	// OriginalVersion
	container.OriginalVersion = source.OriginalVersion

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

	// PublicAccess
	container.PublicAccess = genruntime.ClonePointerToString(source.PublicAccess)

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

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

	// No error
	return nil
}

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

	// AzureName
	destination.AzureName = container.AzureName

	// DefaultEncryptionScope
	destination.DefaultEncryptionScope = genruntime.ClonePointerToString(container.DefaultEncryptionScope)

	// DenyEncryptionScopeOverride
	if container.DenyEncryptionScopeOverride != nil {
		denyEncryptionScopeOverride := *container.DenyEncryptionScopeOverride
		destination.DenyEncryptionScopeOverride = &denyEncryptionScopeOverride
	} else {
		destination.DenyEncryptionScopeOverride = nil
	}

	// EnableNfsV3AllSquash
	if container.EnableNfsV3AllSquash != nil {
		enableNfsV3AllSquash := *container.EnableNfsV3AllSquash
		destination.EnableNfsV3AllSquash = &enableNfsV3AllSquash
	} else {
		destination.EnableNfsV3AllSquash = nil
	}

	// EnableNfsV3RootSquash
	if container.EnableNfsV3RootSquash != nil {
		enableNfsV3RootSquash := *container.EnableNfsV3RootSquash
		destination.EnableNfsV3RootSquash = &enableNfsV3RootSquash
	} else {
		destination.EnableNfsV3RootSquash = nil
	}

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

	// Metadata
	destination.Metadata = genruntime.CloneMapOfStringToString(container.Metadata)

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

	// OriginalVersion
	destination.OriginalVersion = container.OriginalVersion

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

	// PublicAccess
	destination.PublicAccess = genruntime.ClonePointerToString(container.PublicAccess)

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

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

	// No error
	return nil
}

// Storage version of v1api20220901.StorageAccountsBlobServicesContainer_STATUS
type StorageAccountsBlobServicesContainer_STATUS struct {
	Conditions                     []conditions.Condition                 `json:"conditions,omitempty"`
	DefaultEncryptionScope         *string                                `json:"defaultEncryptionScope,omitempty"`
	Deleted                        *bool                                  `json:"deleted,omitempty"`
	DeletedTime                    *string                                `json:"deletedTime,omitempty"`
	DenyEncryptionScopeOverride    *bool                                  `json:"denyEncryptionScopeOverride,omitempty"`
	EnableNfsV3AllSquash           *bool                                  `json:"enableNfsV3AllSquash,omitempty"`
	EnableNfsV3RootSquash          *bool                                  `json:"enableNfsV3RootSquash,omitempty"`
	Etag                           *string                                `json:"etag,omitempty"`
	HasImmutabilityPolicy          *bool                                  `json:"hasImmutabilityPolicy,omitempty"`
	HasLegalHold                   *bool                                  `json:"hasLegalHold,omitempty"`
	Id                             *string                                `json:"id,omitempty"`
	ImmutabilityPolicy             *ImmutabilityPolicyProperties_STATUS   `json:"immutabilityPolicy,omitempty"`
	ImmutableStorageWithVersioning *ImmutableStorageWithVersioning_STATUS `json:"immutableStorageWithVersioning,omitempty"`
	LastModifiedTime               *string                                `json:"lastModifiedTime,omitempty"`
	LeaseDuration                  *string                                `json:"leaseDuration,omitempty"`
	LeaseState                     *string                                `json:"leaseState,omitempty"`
	LeaseStatus                    *string                                `json:"leaseStatus,omitempty"`
	LegalHold                      *LegalHoldProperties_STATUS            `json:"legalHold,omitempty"`
	Metadata                       map[string]string                      `json:"metadata,omitempty"`
	Name                           *string                                `json:"name,omitempty"`
	PropertyBag                    genruntime.PropertyBag                 `json:"$propertyBag,omitempty"`
	PublicAccess                   *string                                `json:"publicAccess,omitempty"`
	RemainingRetentionDays         *int                                   `json:"remainingRetentionDays,omitempty"`
	Type                           *string                                `json:"type,omitempty"`
	Version                        *string                                `json:"version,omitempty"`
}

var _ genruntime.ConvertibleStatus = &StorageAccountsBlobServicesContainer_STATUS{}

// ConvertStatusFrom populates our StorageAccountsBlobServicesContainer_STATUS from the provided source
func (container *StorageAccountsBlobServicesContainer_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error {
	src, ok := source.(*storage.StorageAccountsBlobServicesContainer_STATUS)
	if ok {
		// Populate our instance from source
		return container.AssignProperties_From_StorageAccountsBlobServicesContainer_STATUS(src)
	}

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.StorageAccountsBlobServicesContainer_STATUS{}
	err := container.AssignProperties_To_StorageAccountsBlobServicesContainer_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_StorageAccountsBlobServicesContainer_STATUS populates our StorageAccountsBlobServicesContainer_STATUS from the provided source StorageAccountsBlobServicesContainer_STATUS
func (container *StorageAccountsBlobServicesContainer_STATUS) AssignProperties_From_StorageAccountsBlobServicesContainer_STATUS(source *storage.StorageAccountsBlobServicesContainer_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

	// DefaultEncryptionScope
	container.DefaultEncryptionScope = genruntime.ClonePointerToString(source.DefaultEncryptionScope)

	// Deleted
	if source.Deleted != nil {
		deleted := *source.Deleted
		container.Deleted = &deleted
	} else {
		container.Deleted = nil
	}

	// DeletedTime
	container.DeletedTime = genruntime.ClonePointerToString(source.DeletedTime)

	// DenyEncryptionScopeOverride
	if source.DenyEncryptionScopeOverride != nil {
		denyEncryptionScopeOverride := *source.DenyEncryptionScopeOverride
		container.DenyEncryptionScopeOverride = &denyEncryptionScopeOverride
	} else {
		container.DenyEncryptionScopeOverride = nil
	}

	// EnableNfsV3AllSquash
	if source.EnableNfsV3AllSquash != nil {
		enableNfsV3AllSquash := *source.EnableNfsV3AllSquash
		container.EnableNfsV3AllSquash = &enableNfsV3AllSquash
	} else {
		container.EnableNfsV3AllSquash = nil
	}

	// EnableNfsV3RootSquash
	if source.EnableNfsV3RootSquash != nil {
		enableNfsV3RootSquash := *source.EnableNfsV3RootSquash
		container.EnableNfsV3RootSquash = &enableNfsV3RootSquash
	} else {
		container.EnableNfsV3RootSquash = nil
	}

	// Etag
	container.Etag = genruntime.ClonePointerToString(source.Etag)

	// HasImmutabilityPolicy
	if source.HasImmutabilityPolicy != nil {
		hasImmutabilityPolicy := *source.HasImmutabilityPolicy
		container.HasImmutabilityPolicy = &hasImmutabilityPolicy
	} else {
		container.HasImmutabilityPolicy = nil
	}

	// HasLegalHold
	if source.HasLegalHold != nil {
		hasLegalHold := *source.HasLegalHold
		container.HasLegalHold = &hasLegalHold
	} else {
		container.HasLegalHold = nil
	}

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

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

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

	// LastModifiedTime
	container.LastModifiedTime = genruntime.ClonePointerToString(source.LastModifiedTime)

	// LeaseDuration
	container.LeaseDuration = genruntime.ClonePointerToString(source.LeaseDuration)

	// LeaseState
	container.LeaseState = genruntime.ClonePointerToString(source.LeaseState)

	// LeaseStatus
	container.LeaseStatus = genruntime.ClonePointerToString(source.LeaseStatus)

	// LegalHold
	if source.LegalHold != nil {
		var legalHold LegalHoldProperties_STATUS
		err := legalHold.AssignProperties_From_LegalHoldProperties_STATUS(source.LegalHold)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_LegalHoldProperties_STATUS() to populate field LegalHold")
		}
		container.LegalHold = &legalHold
	} else {
		container.LegalHold = nil
	}

	// Metadata
	container.Metadata = genruntime.CloneMapOfStringToString(source.Metadata)

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

	// PublicAccess
	container.PublicAccess = genruntime.ClonePointerToString(source.PublicAccess)

	// RemainingRetentionDays
	container.RemainingRetentionDays = genruntime.ClonePointerToInt(source.RemainingRetentionDays)

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

	// Version
	container.Version = genruntime.ClonePointerToString(source.Version)

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

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

	// No error
	return nil
}

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

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

	// DefaultEncryptionScope
	destination.DefaultEncryptionScope = genruntime.ClonePointerToString(container.DefaultEncryptionScope)

	// Deleted
	if container.Deleted != nil {
		deleted := *container.Deleted
		destination.Deleted = &deleted
	} else {
		destination.Deleted = nil
	}

	// DeletedTime
	destination.DeletedTime = genruntime.ClonePointerToString(container.DeletedTime)

	// DenyEncryptionScopeOverride
	if container.DenyEncryptionScopeOverride != nil {
		denyEncryptionScopeOverride := *container.DenyEncryptionScopeOverride
		destination.DenyEncryptionScopeOverride = &denyEncryptionScopeOverride
	} else {
		destination.DenyEncryptionScopeOverride = nil
	}

	// EnableNfsV3AllSquash
	if container.EnableNfsV3AllSquash != nil {
		enableNfsV3AllSquash := *container.EnableNfsV3AllSquash
		destination.EnableNfsV3AllSquash = &enableNfsV3AllSquash
	} else {
		destination.EnableNfsV3AllSquash = nil
	}

	// EnableNfsV3RootSquash
	if container.EnableNfsV3RootSquash != nil {
		enableNfsV3RootSquash := *container.EnableNfsV3RootSquash
		destination.EnableNfsV3RootSquash = &enableNfsV3RootSquash
	} else {
		destination.EnableNfsV3RootSquash = nil
	}

	// Etag
	destination.Etag = genruntime.ClonePointerToString(container.Etag)

	// HasImmutabilityPolicy
	if container.HasImmutabilityPolicy != nil {
		hasImmutabilityPolicy := *container.HasImmutabilityPolicy
		destination.HasImmutabilityPolicy = &hasImmutabilityPolicy
	} else {
		destination.HasImmutabilityPolicy = nil
	}

	// HasLegalHold
	if container.HasLegalHold != nil {
		hasLegalHold := *container.HasLegalHold
		destination.HasLegalHold = &hasLegalHold
	} else {
		destination.HasLegalHold = nil
	}

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

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

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

	// LastModifiedTime
	destination.LastModifiedTime = genruntime.ClonePointerToString(container.LastModifiedTime)

	// LeaseDuration
	destination.LeaseDuration = genruntime.ClonePointerToString(container.LeaseDuration)

	// LeaseState
	destination.LeaseState = genruntime.ClonePointerToString(container.LeaseState)

	// LeaseStatus
	destination.LeaseStatus = genruntime.ClonePointerToString(container.LeaseStatus)

	// LegalHold
	if container.LegalHold != nil {
		var legalHold storage.LegalHoldProperties_STATUS
		err := container.LegalHold.AssignProperties_To_LegalHoldProperties_STATUS(&legalHold)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_LegalHoldProperties_STATUS() to populate field LegalHold")
		}
		destination.LegalHold = &legalHold
	} else {
		destination.LegalHold = nil
	}

	// Metadata
	destination.Metadata = genruntime.CloneMapOfStringToString(container.Metadata)

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

	// PublicAccess
	destination.PublicAccess = genruntime.ClonePointerToString(container.PublicAccess)

	// RemainingRetentionDays
	destination.RemainingRetentionDays = genruntime.ClonePointerToInt(container.RemainingRetentionDays)

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

	// Version
	destination.Version = genruntime.ClonePointerToString(container.Version)

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

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

	// No error
	return nil
}

type augmentConversionForStorageAccountsBlobServicesContainer_Spec interface {
	AssignPropertiesFrom(src *storage.StorageAccountsBlobServicesContainer_Spec) error
	AssignPropertiesTo(dst *storage.StorageAccountsBlobServicesContainer_Spec) error
}

type augmentConversionForStorageAccountsBlobServicesContainer_STATUS interface {
	AssignPropertiesFrom(src *storage.StorageAccountsBlobServicesContainer_STATUS) error
	AssignPropertiesTo(dst *storage.StorageAccountsBlobServicesContainer_STATUS) error
}

// Storage version of v1api20220901.ImmutabilityPolicyProperties_STATUS
// The properties of an ImmutabilityPolicy of a blob container.
type ImmutabilityPolicyProperties_STATUS struct {
	AllowProtectedAppendWrites            *bool                          `json:"allowProtectedAppendWrites,omitempty"`
	AllowProtectedAppendWritesAll         *bool                          `json:"allowProtectedAppendWritesAll,omitempty"`
	Etag                                  *string                        `json:"etag,omitempty"`
	ImmutabilityPeriodSinceCreationInDays *int                           `json:"immutabilityPeriodSinceCreationInDays,omitempty"`
	PropertyBag                           genruntime.PropertyBag         `json:"$propertyBag,omitempty"`
	State                                 *string                        `json:"state,omitempty"`
	UpdateHistory                         []UpdateHistoryProperty_STATUS `json:"updateHistory,omitempty"`
}

// AssignProperties_From_ImmutabilityPolicyProperties_STATUS populates our ImmutabilityPolicyProperties_STATUS from the provided source ImmutabilityPolicyProperties_STATUS
func (properties *ImmutabilityPolicyProperties_STATUS) AssignProperties_From_ImmutabilityPolicyProperties_STATUS(source *storage.ImmutabilityPolicyProperties_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
	}

	// AllowProtectedAppendWritesAll
	if source.AllowProtectedAppendWritesAll != nil {
		allowProtectedAppendWritesAll := *source.AllowProtectedAppendWritesAll
		properties.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll
	} else {
		properties.AllowProtectedAppendWritesAll = nil
	}

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

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

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

	// UpdateHistory
	if source.UpdateHistory != nil {
		updateHistoryList := make([]UpdateHistoryProperty_STATUS, len(source.UpdateHistory))
		for updateHistoryIndex, updateHistoryItem := range source.UpdateHistory {
			var updateHistory UpdateHistoryProperty_STATUS
			err := updateHistory.AssignProperties_From_UpdateHistoryProperty_STATUS(&updateHistoryItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_UpdateHistoryProperty_STATUS() to populate field UpdateHistory")
			}
			updateHistoryList[updateHistoryIndex] = updateHistory
		}
		properties.UpdateHistory = updateHistoryList
	} else {
		properties.UpdateHistory = nil
	}

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

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

	// No error
	return nil
}

// AssignProperties_To_ImmutabilityPolicyProperties_STATUS populates the provided destination ImmutabilityPolicyProperties_STATUS from our ImmutabilityPolicyProperties_STATUS
func (properties *ImmutabilityPolicyProperties_STATUS) AssignProperties_To_ImmutabilityPolicyProperties_STATUS(destination *storage.ImmutabilityPolicyProperties_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
	}

	// AllowProtectedAppendWritesAll
	if properties.AllowProtectedAppendWritesAll != nil {
		allowProtectedAppendWritesAll := *properties.AllowProtectedAppendWritesAll
		destination.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll
	} else {
		destination.AllowProtectedAppendWritesAll = nil
	}

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

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

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

	// UpdateHistory
	if properties.UpdateHistory != nil {
		updateHistoryList := make([]storage.UpdateHistoryProperty_STATUS, len(properties.UpdateHistory))
		for updateHistoryIndex, updateHistoryItem := range properties.UpdateHistory {
			var updateHistory storage.UpdateHistoryProperty_STATUS
			err := updateHistoryItem.AssignProperties_To_UpdateHistoryProperty_STATUS(&updateHistory)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_UpdateHistoryProperty_STATUS() to populate field UpdateHistory")
			}
			updateHistoryList[updateHistoryIndex] = updateHistory
		}
		destination.UpdateHistory = updateHistoryList
	} else {
		destination.UpdateHistory = nil
	}

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

	// Invoke the augmentConversionForImmutabilityPolicyProperties_STATUS interface (if implemented) to customize the conversion
	var propertiesAsAny any = properties
	if augmentedProperties, ok := propertiesAsAny.(augmentConversionForImmutabilityPolicyProperties_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.ImmutableStorageWithVersioning
// Object level immutability properties of the container.
type ImmutableStorageWithVersioning struct {
	Enabled     *bool                  `json:"enabled,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

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

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

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

	// No error
	return nil
}

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

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

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

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

	// No error
	return nil
}

// Storage version of v1api20220901.ImmutableStorageWithVersioning_STATUS
// Object level immutability properties of the container.
type ImmutableStorageWithVersioning_STATUS struct {
	Enabled        *bool                  `json:"enabled,omitempty"`
	MigrationState *string                `json:"migrationState,omitempty"`
	PropertyBag    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TimeStamp      *string                `json:"timeStamp,omitempty"`
}

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

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

	// MigrationState
	versioning.MigrationState = genruntime.ClonePointerToString(source.MigrationState)

	// TimeStamp
	versioning.TimeStamp = genruntime.ClonePointerToString(source.TimeStamp)

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

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

	// No error
	return nil
}

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

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

	// MigrationState
	destination.MigrationState = genruntime.ClonePointerToString(versioning.MigrationState)

	// TimeStamp
	destination.TimeStamp = genruntime.ClonePointerToString(versioning.TimeStamp)

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

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

	// No error
	return nil
}

// Storage version of v1api20220901.LegalHoldProperties_STATUS
// The LegalHold property of a blob container.
type LegalHoldProperties_STATUS struct {
	HasLegalHold                 *bool                                `json:"hasLegalHold,omitempty"`
	PropertyBag                  genruntime.PropertyBag               `json:"$propertyBag,omitempty"`
	ProtectedAppendWritesHistory *ProtectedAppendWritesHistory_STATUS `json:"protectedAppendWritesHistory,omitempty"`
	Tags                         []TagProperty_STATUS                 `json:"tags,omitempty"`
}

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

	// HasLegalHold
	if source.HasLegalHold != nil {
		hasLegalHold := *source.HasLegalHold
		properties.HasLegalHold = &hasLegalHold
	} else {
		properties.HasLegalHold = nil
	}

	// ProtectedAppendWritesHistory
	if source.ProtectedAppendWritesHistory != nil {
		var protectedAppendWritesHistory ProtectedAppendWritesHistory_STATUS
		err := protectedAppendWritesHistory.AssignProperties_From_ProtectedAppendWritesHistory_STATUS(source.ProtectedAppendWritesHistory)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ProtectedAppendWritesHistory_STATUS() to populate field ProtectedAppendWritesHistory")
		}
		properties.ProtectedAppendWritesHistory = &protectedAppendWritesHistory
	} else {
		properties.ProtectedAppendWritesHistory = nil
	}

	// Tags
	if source.Tags != nil {
		tagList := make([]TagProperty_STATUS, len(source.Tags))
		for tagIndex, tagItem := range source.Tags {
			var tag TagProperty_STATUS
			err := tag.AssignProperties_From_TagProperty_STATUS(&tagItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_TagProperty_STATUS() to populate field Tags")
			}
			tagList[tagIndex] = tag
		}
		properties.Tags = tagList
	} else {
		properties.Tags = nil
	}

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

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

	// No error
	return nil
}

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

	// HasLegalHold
	if properties.HasLegalHold != nil {
		hasLegalHold := *properties.HasLegalHold
		destination.HasLegalHold = &hasLegalHold
	} else {
		destination.HasLegalHold = nil
	}

	// ProtectedAppendWritesHistory
	if properties.ProtectedAppendWritesHistory != nil {
		var protectedAppendWritesHistory storage.ProtectedAppendWritesHistory_STATUS
		err := properties.ProtectedAppendWritesHistory.AssignProperties_To_ProtectedAppendWritesHistory_STATUS(&protectedAppendWritesHistory)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ProtectedAppendWritesHistory_STATUS() to populate field ProtectedAppendWritesHistory")
		}
		destination.ProtectedAppendWritesHistory = &protectedAppendWritesHistory
	} else {
		destination.ProtectedAppendWritesHistory = nil
	}

	// Tags
	if properties.Tags != nil {
		tagList := make([]storage.TagProperty_STATUS, len(properties.Tags))
		for tagIndex, tagItem := range properties.Tags {
			var tag storage.TagProperty_STATUS
			err := tagItem.AssignProperties_To_TagProperty_STATUS(&tag)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_TagProperty_STATUS() to populate field Tags")
			}
			tagList[tagIndex] = tag
		}
		destination.Tags = tagList
	} else {
		destination.Tags = nil
	}

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

	// Invoke the augmentConversionForLegalHoldProperties_STATUS interface (if implemented) to customize the conversion
	var propertiesAsAny any = properties
	if augmentedProperties, ok := propertiesAsAny.(augmentConversionForLegalHoldProperties_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.StorageAccountsBlobServicesContainerOperatorSpec
// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure
type StorageAccountsBlobServicesContainerOperatorSpec struct {
	ConfigMapExpressions []*core.DestinationExpression `json:"configMapExpressions,omitempty"`
	PropertyBag          genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	SecretExpressions    []*core.DestinationExpression `json:"secretExpressions,omitempty"`
}

// AssignProperties_From_StorageAccountsBlobServicesContainerOperatorSpec populates our StorageAccountsBlobServicesContainerOperatorSpec from the provided source StorageAccountsBlobServicesContainerOperatorSpec
func (operator *StorageAccountsBlobServicesContainerOperatorSpec) AssignProperties_From_StorageAccountsBlobServicesContainerOperatorSpec(source *storage.StorageAccountsBlobServicesContainerOperatorSpec) 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
	}

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

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

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

	// No error
	return nil
}

// AssignProperties_To_StorageAccountsBlobServicesContainerOperatorSpec populates the provided destination StorageAccountsBlobServicesContainerOperatorSpec from our StorageAccountsBlobServicesContainerOperatorSpec
func (operator *StorageAccountsBlobServicesContainerOperatorSpec) AssignProperties_To_StorageAccountsBlobServicesContainerOperatorSpec(destination *storage.StorageAccountsBlobServicesContainerOperatorSpec) 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
	}

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

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

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

	// No error
	return nil
}

type augmentConversionForImmutabilityPolicyProperties_STATUS interface {
	AssignPropertiesFrom(src *storage.ImmutabilityPolicyProperties_STATUS) error
	AssignPropertiesTo(dst *storage.ImmutabilityPolicyProperties_STATUS) error
}

type augmentConversionForImmutableStorageWithVersioning interface {
	AssignPropertiesFrom(src *storage.ImmutableStorageWithVersioning) error
	AssignPropertiesTo(dst *storage.ImmutableStorageWithVersioning) error
}

type augmentConversionForImmutableStorageWithVersioning_STATUS interface {
	AssignPropertiesFrom(src *storage.ImmutableStorageWithVersioning_STATUS) error
	AssignPropertiesTo(dst *storage.ImmutableStorageWithVersioning_STATUS) error
}

type augmentConversionForLegalHoldProperties_STATUS interface {
	AssignPropertiesFrom(src *storage.LegalHoldProperties_STATUS) error
	AssignPropertiesTo(dst *storage.LegalHoldProperties_STATUS) error
}

type augmentConversionForStorageAccountsBlobServicesContainerOperatorSpec interface {
	AssignPropertiesFrom(src *storage.StorageAccountsBlobServicesContainerOperatorSpec) error
	AssignPropertiesTo(dst *storage.StorageAccountsBlobServicesContainerOperatorSpec) error
}

// Storage version of v1api20220901.ProtectedAppendWritesHistory_STATUS
// Protected append writes history setting for the blob container with Legal holds.
type ProtectedAppendWritesHistory_STATUS struct {
	AllowProtectedAppendWritesAll *bool                  `json:"allowProtectedAppendWritesAll,omitempty"`
	PropertyBag                   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Timestamp                     *string                `json:"timestamp,omitempty"`
}

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

	// AllowProtectedAppendWritesAll
	if source.AllowProtectedAppendWritesAll != nil {
		allowProtectedAppendWritesAll := *source.AllowProtectedAppendWritesAll
		history.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll
	} else {
		history.AllowProtectedAppendWritesAll = nil
	}

	// Timestamp
	history.Timestamp = genruntime.ClonePointerToString(source.Timestamp)

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

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

	// No error
	return nil
}

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

	// AllowProtectedAppendWritesAll
	if history.AllowProtectedAppendWritesAll != nil {
		allowProtectedAppendWritesAll := *history.AllowProtectedAppendWritesAll
		destination.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll
	} else {
		destination.AllowProtectedAppendWritesAll = nil
	}

	// Timestamp
	destination.Timestamp = genruntime.ClonePointerToString(history.Timestamp)

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

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

	// No error
	return nil
}

// Storage version of v1api20220901.TagProperty_STATUS
// A tag of the LegalHold of a blob container.
type TagProperty_STATUS struct {
	ObjectIdentifier *string                `json:"objectIdentifier,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tag              *string                `json:"tag,omitempty"`
	TenantId         *string                `json:"tenantId,omitempty"`
	Timestamp        *string                `json:"timestamp,omitempty"`
	Upn              *string                `json:"upn,omitempty"`
}

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

	// ObjectIdentifier
	property.ObjectIdentifier = genruntime.ClonePointerToString(source.ObjectIdentifier)

	// Tag
	property.Tag = genruntime.ClonePointerToString(source.Tag)

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

	// Timestamp
	property.Timestamp = genruntime.ClonePointerToString(source.Timestamp)

	// Upn
	property.Upn = genruntime.ClonePointerToString(source.Upn)

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

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

	// No error
	return nil
}

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

	// ObjectIdentifier
	destination.ObjectIdentifier = genruntime.ClonePointerToString(property.ObjectIdentifier)

	// Tag
	destination.Tag = genruntime.ClonePointerToString(property.Tag)

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

	// Timestamp
	destination.Timestamp = genruntime.ClonePointerToString(property.Timestamp)

	// Upn
	destination.Upn = genruntime.ClonePointerToString(property.Upn)

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

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

	// No error
	return nil
}

// Storage version of v1api20220901.UpdateHistoryProperty_STATUS
// An update history of the ImmutabilityPolicy of a blob container.
type UpdateHistoryProperty_STATUS struct {
	AllowProtectedAppendWrites            *bool                  `json:"allowProtectedAppendWrites,omitempty"`
	AllowProtectedAppendWritesAll         *bool                  `json:"allowProtectedAppendWritesAll,omitempty"`
	ImmutabilityPeriodSinceCreationInDays *int                   `json:"immutabilityPeriodSinceCreationInDays,omitempty"`
	ObjectIdentifier                      *string                `json:"objectIdentifier,omitempty"`
	PropertyBag                           genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TenantId                              *string                `json:"tenantId,omitempty"`
	Timestamp                             *string                `json:"timestamp,omitempty"`
	Update                                *string                `json:"update,omitempty"`
	Upn                                   *string                `json:"upn,omitempty"`
}

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

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

	// AllowProtectedAppendWritesAll
	if source.AllowProtectedAppendWritesAll != nil {
		allowProtectedAppendWritesAll := *source.AllowProtectedAppendWritesAll
		property.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll
	} else {
		property.AllowProtectedAppendWritesAll = nil
	}

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

	// ObjectIdentifier
	property.ObjectIdentifier = genruntime.ClonePointerToString(source.ObjectIdentifier)

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

	// Timestamp
	property.Timestamp = genruntime.ClonePointerToString(source.Timestamp)

	// Update
	property.Update = genruntime.ClonePointerToString(source.Update)

	// Upn
	property.Upn = genruntime.ClonePointerToString(source.Upn)

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

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

	// No error
	return nil
}

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

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

	// AllowProtectedAppendWritesAll
	if property.AllowProtectedAppendWritesAll != nil {
		allowProtectedAppendWritesAll := *property.AllowProtectedAppendWritesAll
		destination.AllowProtectedAppendWritesAll = &allowProtectedAppendWritesAll
	} else {
		destination.AllowProtectedAppendWritesAll = nil
	}

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

	// ObjectIdentifier
	destination.ObjectIdentifier = genruntime.ClonePointerToString(property.ObjectIdentifier)

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

	// Timestamp
	destination.Timestamp = genruntime.ClonePointerToString(property.Timestamp)

	// Update
	destination.Update = genruntime.ClonePointerToString(property.Update)

	// Upn
	destination.Upn = genruntime.ClonePointerToString(property.Upn)

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

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

	// No error
	return nil
}

type augmentConversionForProtectedAppendWritesHistory_STATUS interface {
	AssignPropertiesFrom(src *storage.ProtectedAppendWritesHistory_STATUS) error
	AssignPropertiesTo(dst *storage.ProtectedAppendWritesHistory_STATUS) error
}

type augmentConversionForTagProperty_STATUS interface {
	AssignPropertiesFrom(src *storage.TagProperty_STATUS) error
	AssignPropertiesTo(dst *storage.TagProperty_STATUS) error
}

type augmentConversionForUpdateHistoryProperty_STATUS interface {
	AssignPropertiesFrom(src *storage.UpdateHistoryProperty_STATUS) error
	AssignPropertiesTo(dst *storage.UpdateHistoryProperty_STATUS) error
}

func init() {
	SchemeBuilder.Register(&StorageAccountsBlobServicesContainer{}, &StorageAccountsBlobServicesContainerList{})
}
