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

import (
	storage "github.com/Azure/azure-service-operator/v2/api/cache/v1api20230701/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,cache}
// +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 v1api20210301.RedisEnterpriseDatabase
// Generator information:
// - Generated from: /redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2021-03-01/redisenterprise.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}
type RedisEnterpriseDatabase struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              RedisEnterpriseDatabase_Spec   `json:"spec,omitempty"`
	Status            RedisEnterpriseDatabase_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &RedisEnterpriseDatabase{}

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

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

var _ conversion.Convertible = &RedisEnterpriseDatabase{}

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

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

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

	return nil
}

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

	return nil
}

var _ configmaps.Exporter = &RedisEnterpriseDatabase{}

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

var _ secrets.Exporter = &RedisEnterpriseDatabase{}

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

var _ genruntime.KubernetesResource = &RedisEnterpriseDatabase{}

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

// GetAPIVersion returns the ARM API version of the resource. This is always "2021-03-01"
func (database RedisEnterpriseDatabase) GetAPIVersion() string {
	return "2021-03-01"
}

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

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

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.Cache/redisEnterprise/databases"
func (database *RedisEnterpriseDatabase) GetType() string {
	return "Microsoft.Cache/redisEnterprise/databases"
}

// NewEmptyStatus returns a new empty (blank) status
func (database *RedisEnterpriseDatabase) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &RedisEnterpriseDatabase_STATUS{}
}

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

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

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

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

	database.Status = st
	return nil
}

// AssignProperties_From_RedisEnterpriseDatabase populates our RedisEnterpriseDatabase from the provided source RedisEnterpriseDatabase
func (database *RedisEnterpriseDatabase) AssignProperties_From_RedisEnterpriseDatabase(source *storage.RedisEnterpriseDatabase) error {

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

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

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

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

	// No error
	return nil
}

// AssignProperties_To_RedisEnterpriseDatabase populates the provided destination RedisEnterpriseDatabase from our RedisEnterpriseDatabase
func (database *RedisEnterpriseDatabase) AssignProperties_To_RedisEnterpriseDatabase(destination *storage.RedisEnterpriseDatabase) error {

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

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

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

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

// +kubebuilder:object:root=true
// Storage version of v1api20210301.RedisEnterpriseDatabase
// Generator information:
// - Generated from: /redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2021-03-01/redisenterprise.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}
type RedisEnterpriseDatabaseList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []RedisEnterpriseDatabase `json:"items"`
}

type augmentConversionForRedisEnterpriseDatabase interface {
	AssignPropertiesFrom(src *storage.RedisEnterpriseDatabase) error
	AssignPropertiesTo(dst *storage.RedisEnterpriseDatabase) error
}

// Storage version of v1api20210301.RedisEnterpriseDatabase_Spec
type RedisEnterpriseDatabase_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"`
	ClientProtocol   *string                              `json:"clientProtocol,omitempty"`
	ClusteringPolicy *string                              `json:"clusteringPolicy,omitempty"`
	EvictionPolicy   *string                              `json:"evictionPolicy,omitempty"`
	Modules          []Module                             `json:"modules,omitempty"`
	OperatorSpec     *RedisEnterpriseDatabaseOperatorSpec `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 cache.azure.com/RedisEnterprise resource
	Owner       *genruntime.KnownResourceReference `group:"cache.azure.com" json:"owner,omitempty" kind:"RedisEnterprise"`
	Persistence *Persistence                       `json:"persistence,omitempty"`
	Port        *int                               `json:"port,omitempty"`
	PropertyBag genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
}

var _ genruntime.ConvertibleSpec = &RedisEnterpriseDatabase_Spec{}

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

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

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

	return nil
}

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

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

	// AzureName
	database.AzureName = source.AzureName

	// ClientProtocol
	database.ClientProtocol = genruntime.ClonePointerToString(source.ClientProtocol)

	// ClusteringPolicy
	database.ClusteringPolicy = genruntime.ClonePointerToString(source.ClusteringPolicy)

	// EvictionPolicy
	database.EvictionPolicy = genruntime.ClonePointerToString(source.EvictionPolicy)

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

	// Modules
	if source.Modules != nil {
		moduleList := make([]Module, len(source.Modules))
		for moduleIndex, moduleItem := range source.Modules {
			var module Module
			err := module.AssignProperties_From_Module(&moduleItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_Module() to populate field Modules")
			}
			moduleList[moduleIndex] = module
		}
		database.Modules = moduleList
	} else {
		database.Modules = nil
	}

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

	// OriginalVersion
	database.OriginalVersion = source.OriginalVersion

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

	// Persistence
	if source.Persistence != nil {
		var persistence Persistence
		err := persistence.AssignProperties_From_Persistence(source.Persistence)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_Persistence() to populate field Persistence")
		}
		database.Persistence = &persistence
	} else {
		database.Persistence = nil
	}

	// Port
	database.Port = genruntime.ClonePointerToInt(source.Port)

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

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

	// No error
	return nil
}

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

	// AzureName
	destination.AzureName = database.AzureName

	// ClientProtocol
	destination.ClientProtocol = genruntime.ClonePointerToString(database.ClientProtocol)

	// ClusteringPolicy
	destination.ClusteringPolicy = genruntime.ClonePointerToString(database.ClusteringPolicy)

	// EvictionPolicy
	destination.EvictionPolicy = genruntime.ClonePointerToString(database.EvictionPolicy)

	// GeoReplication
	if propertyBag.Contains("GeoReplication") {
		var geoReplication storage.DatabaseProperties_GeoReplication
		err := propertyBag.Pull("GeoReplication", &geoReplication)
		if err != nil {
			return eris.Wrap(err, "pulling 'GeoReplication' from propertyBag")
		}

		destination.GeoReplication = &geoReplication
	} else {
		destination.GeoReplication = nil
	}

	// Modules
	if database.Modules != nil {
		moduleList := make([]storage.Module, len(database.Modules))
		for moduleIndex, moduleItem := range database.Modules {
			var module storage.Module
			err := moduleItem.AssignProperties_To_Module(&module)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_Module() to populate field Modules")
			}
			moduleList[moduleIndex] = module
		}
		destination.Modules = moduleList
	} else {
		destination.Modules = nil
	}

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

	// OriginalVersion
	destination.OriginalVersion = database.OriginalVersion

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

	// Persistence
	if database.Persistence != nil {
		var persistence storage.Persistence
		err := database.Persistence.AssignProperties_To_Persistence(&persistence)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_Persistence() to populate field Persistence")
		}
		destination.Persistence = &persistence
	} else {
		destination.Persistence = nil
	}

	// Port
	destination.Port = genruntime.ClonePointerToInt(database.Port)

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

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

	// No error
	return nil
}

// Storage version of v1api20210301.RedisEnterpriseDatabase_STATUS
type RedisEnterpriseDatabase_STATUS struct {
	ClientProtocol    *string                `json:"clientProtocol,omitempty"`
	ClusteringPolicy  *string                `json:"clusteringPolicy,omitempty"`
	Conditions        []conditions.Condition `json:"conditions,omitempty"`
	EvictionPolicy    *string                `json:"evictionPolicy,omitempty"`
	Id                *string                `json:"id,omitempty"`
	Modules           []Module_STATUS        `json:"modules,omitempty"`
	Name              *string                `json:"name,omitempty"`
	Persistence       *Persistence_STATUS    `json:"persistence,omitempty"`
	Port              *int                   `json:"port,omitempty"`
	PropertyBag       genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ProvisioningState *string                `json:"provisioningState,omitempty"`
	ResourceState     *string                `json:"resourceState,omitempty"`
	Type              *string                `json:"type,omitempty"`
}

var _ genruntime.ConvertibleStatus = &RedisEnterpriseDatabase_STATUS{}

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

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

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

	return nil
}

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

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

	// ClientProtocol
	database.ClientProtocol = genruntime.ClonePointerToString(source.ClientProtocol)

	// ClusteringPolicy
	database.ClusteringPolicy = genruntime.ClonePointerToString(source.ClusteringPolicy)

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

	// EvictionPolicy
	database.EvictionPolicy = genruntime.ClonePointerToString(source.EvictionPolicy)

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

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

	// Modules
	if source.Modules != nil {
		moduleList := make([]Module_STATUS, len(source.Modules))
		for moduleIndex, moduleItem := range source.Modules {
			var module Module_STATUS
			err := module.AssignProperties_From_Module_STATUS(&moduleItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_Module_STATUS() to populate field Modules")
			}
			moduleList[moduleIndex] = module
		}
		database.Modules = moduleList
	} else {
		database.Modules = nil
	}

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

	// Persistence
	if source.Persistence != nil {
		var persistence Persistence_STATUS
		err := persistence.AssignProperties_From_Persistence_STATUS(source.Persistence)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_Persistence_STATUS() to populate field Persistence")
		}
		database.Persistence = &persistence
	} else {
		database.Persistence = nil
	}

	// Port
	database.Port = genruntime.ClonePointerToInt(source.Port)

	// ProvisioningState
	database.ProvisioningState = genruntime.ClonePointerToString(source.ProvisioningState)

	// ResourceState
	database.ResourceState = genruntime.ClonePointerToString(source.ResourceState)

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

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

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

	// No error
	return nil
}

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

	// ClientProtocol
	destination.ClientProtocol = genruntime.ClonePointerToString(database.ClientProtocol)

	// ClusteringPolicy
	destination.ClusteringPolicy = genruntime.ClonePointerToString(database.ClusteringPolicy)

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

	// EvictionPolicy
	destination.EvictionPolicy = genruntime.ClonePointerToString(database.EvictionPolicy)

	// GeoReplication
	if propertyBag.Contains("GeoReplication") {
		var geoReplication storage.DatabaseProperties_GeoReplication_STATUS
		err := propertyBag.Pull("GeoReplication", &geoReplication)
		if err != nil {
			return eris.Wrap(err, "pulling 'GeoReplication' from propertyBag")
		}

		destination.GeoReplication = &geoReplication
	} else {
		destination.GeoReplication = nil
	}

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

	// Modules
	if database.Modules != nil {
		moduleList := make([]storage.Module_STATUS, len(database.Modules))
		for moduleIndex, moduleItem := range database.Modules {
			var module storage.Module_STATUS
			err := moduleItem.AssignProperties_To_Module_STATUS(&module)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_Module_STATUS() to populate field Modules")
			}
			moduleList[moduleIndex] = module
		}
		destination.Modules = moduleList
	} else {
		destination.Modules = nil
	}

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

	// Persistence
	if database.Persistence != nil {
		var persistence storage.Persistence_STATUS
		err := database.Persistence.AssignProperties_To_Persistence_STATUS(&persistence)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_Persistence_STATUS() to populate field Persistence")
		}
		destination.Persistence = &persistence
	} else {
		destination.Persistence = nil
	}

	// Port
	destination.Port = genruntime.ClonePointerToInt(database.Port)

	// ProvisioningState
	destination.ProvisioningState = genruntime.ClonePointerToString(database.ProvisioningState)

	// ResourceState
	destination.ResourceState = genruntime.ClonePointerToString(database.ResourceState)

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

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

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

	// No error
	return nil
}

type augmentConversionForRedisEnterpriseDatabase_Spec interface {
	AssignPropertiesFrom(src *storage.RedisEnterpriseDatabase_Spec) error
	AssignPropertiesTo(dst *storage.RedisEnterpriseDatabase_Spec) error
}

type augmentConversionForRedisEnterpriseDatabase_STATUS interface {
	AssignPropertiesFrom(src *storage.RedisEnterpriseDatabase_STATUS) error
	AssignPropertiesTo(dst *storage.RedisEnterpriseDatabase_STATUS) error
}

// Storage version of v1api20210301.Module
// Specifies configuration of a redis module
type Module struct {
	Args        *string                `json:"args,omitempty"`
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

	// Args
	module.Args = genruntime.ClonePointerToString(source.Args)

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

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

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

	// No error
	return nil
}

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

	// Args
	destination.Args = genruntime.ClonePointerToString(module.Args)

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

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

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

	// No error
	return nil
}

// Storage version of v1api20210301.Module_STATUS
// Specifies configuration of a redis module
type Module_STATUS struct {
	Args        *string                `json:"args,omitempty"`
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Version     *string                `json:"version,omitempty"`
}

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

	// Args
	module.Args = genruntime.ClonePointerToString(source.Args)

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

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

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

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

	// No error
	return nil
}

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

	// Args
	destination.Args = genruntime.ClonePointerToString(module.Args)

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

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

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

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

	// No error
	return nil
}

// Storage version of v1api20210301.Persistence
// Persistence-related configuration for the RedisEnterprise database
type Persistence struct {
	AofEnabled   *bool                  `json:"aofEnabled,omitempty"`
	AofFrequency *string                `json:"aofFrequency,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	RdbEnabled   *bool                  `json:"rdbEnabled,omitempty"`
	RdbFrequency *string                `json:"rdbFrequency,omitempty"`
}

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

	// AofEnabled
	if source.AofEnabled != nil {
		aofEnabled := *source.AofEnabled
		persistence.AofEnabled = &aofEnabled
	} else {
		persistence.AofEnabled = nil
	}

	// AofFrequency
	persistence.AofFrequency = genruntime.ClonePointerToString(source.AofFrequency)

	// RdbEnabled
	if source.RdbEnabled != nil {
		rdbEnabled := *source.RdbEnabled
		persistence.RdbEnabled = &rdbEnabled
	} else {
		persistence.RdbEnabled = nil
	}

	// RdbFrequency
	persistence.RdbFrequency = genruntime.ClonePointerToString(source.RdbFrequency)

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

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

	// No error
	return nil
}

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

	// AofEnabled
	if persistence.AofEnabled != nil {
		aofEnabled := *persistence.AofEnabled
		destination.AofEnabled = &aofEnabled
	} else {
		destination.AofEnabled = nil
	}

	// AofFrequency
	destination.AofFrequency = genruntime.ClonePointerToString(persistence.AofFrequency)

	// RdbEnabled
	if persistence.RdbEnabled != nil {
		rdbEnabled := *persistence.RdbEnabled
		destination.RdbEnabled = &rdbEnabled
	} else {
		destination.RdbEnabled = nil
	}

	// RdbFrequency
	destination.RdbFrequency = genruntime.ClonePointerToString(persistence.RdbFrequency)

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

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

	// No error
	return nil
}

// Storage version of v1api20210301.Persistence_STATUS
// Persistence-related configuration for the RedisEnterprise database
type Persistence_STATUS struct {
	AofEnabled   *bool                  `json:"aofEnabled,omitempty"`
	AofFrequency *string                `json:"aofFrequency,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	RdbEnabled   *bool                  `json:"rdbEnabled,omitempty"`
	RdbFrequency *string                `json:"rdbFrequency,omitempty"`
}

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

	// AofEnabled
	if source.AofEnabled != nil {
		aofEnabled := *source.AofEnabled
		persistence.AofEnabled = &aofEnabled
	} else {
		persistence.AofEnabled = nil
	}

	// AofFrequency
	persistence.AofFrequency = genruntime.ClonePointerToString(source.AofFrequency)

	// RdbEnabled
	if source.RdbEnabled != nil {
		rdbEnabled := *source.RdbEnabled
		persistence.RdbEnabled = &rdbEnabled
	} else {
		persistence.RdbEnabled = nil
	}

	// RdbFrequency
	persistence.RdbFrequency = genruntime.ClonePointerToString(source.RdbFrequency)

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

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

	// No error
	return nil
}

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

	// AofEnabled
	if persistence.AofEnabled != nil {
		aofEnabled := *persistence.AofEnabled
		destination.AofEnabled = &aofEnabled
	} else {
		destination.AofEnabled = nil
	}

	// AofFrequency
	destination.AofFrequency = genruntime.ClonePointerToString(persistence.AofFrequency)

	// RdbEnabled
	if persistence.RdbEnabled != nil {
		rdbEnabled := *persistence.RdbEnabled
		destination.RdbEnabled = &rdbEnabled
	} else {
		destination.RdbEnabled = nil
	}

	// RdbFrequency
	destination.RdbFrequency = genruntime.ClonePointerToString(persistence.RdbFrequency)

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

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

	// No error
	return nil
}

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

// AssignProperties_From_RedisEnterpriseDatabaseOperatorSpec populates our RedisEnterpriseDatabaseOperatorSpec from the provided source RedisEnterpriseDatabaseOperatorSpec
func (operator *RedisEnterpriseDatabaseOperatorSpec) AssignProperties_From_RedisEnterpriseDatabaseOperatorSpec(source *storage.RedisEnterpriseDatabaseOperatorSpec) 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 augmentConversionForRedisEnterpriseDatabaseOperatorSpec interface (if implemented) to customize the conversion
	var operatorAsAny any = operator
	if augmentedOperator, ok := operatorAsAny.(augmentConversionForRedisEnterpriseDatabaseOperatorSpec); ok {
		err := augmentedOperator.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_RedisEnterpriseDatabaseOperatorSpec populates the provided destination RedisEnterpriseDatabaseOperatorSpec from our RedisEnterpriseDatabaseOperatorSpec
func (operator *RedisEnterpriseDatabaseOperatorSpec) AssignProperties_To_RedisEnterpriseDatabaseOperatorSpec(destination *storage.RedisEnterpriseDatabaseOperatorSpec) 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 augmentConversionForRedisEnterpriseDatabaseOperatorSpec interface (if implemented) to customize the conversion
	var operatorAsAny any = operator
	if augmentedOperator, ok := operatorAsAny.(augmentConversionForRedisEnterpriseDatabaseOperatorSpec); ok {
		err := augmentedOperator.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

type augmentConversionForModule interface {
	AssignPropertiesFrom(src *storage.Module) error
	AssignPropertiesTo(dst *storage.Module) error
}

type augmentConversionForModule_STATUS interface {
	AssignPropertiesFrom(src *storage.Module_STATUS) error
	AssignPropertiesTo(dst *storage.Module_STATUS) error
}

type augmentConversionForPersistence interface {
	AssignPropertiesFrom(src *storage.Persistence) error
	AssignPropertiesTo(dst *storage.Persistence) error
}

type augmentConversionForPersistence_STATUS interface {
	AssignPropertiesFrom(src *storage.Persistence_STATUS) error
	AssignPropertiesTo(dst *storage.Persistence_STATUS) error
}

type augmentConversionForRedisEnterpriseDatabaseOperatorSpec interface {
	AssignPropertiesFrom(src *storage.RedisEnterpriseDatabaseOperatorSpec) error
	AssignPropertiesTo(dst *storage.RedisEnterpriseDatabaseOperatorSpec) error
}

func init() {
	SchemeBuilder.Register(&RedisEnterpriseDatabase{}, &RedisEnterpriseDatabaseList{})
}
