// 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/documentdb/v1api20231115/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,documentdb}
// +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 v1api20210515.SqlDatabaseContainer
// Generator information:
// - Generated from: /cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-05-15/cosmos-db.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}
type SqlDatabaseContainer struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              SqlDatabaseContainer_Spec   `json:"spec,omitempty"`
	Status            SqlDatabaseContainer_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &SqlDatabaseContainer{}

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

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

var _ conversion.Convertible = &SqlDatabaseContainer{}

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

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

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

	return nil
}

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

	return nil
}

var _ configmaps.Exporter = &SqlDatabaseContainer{}

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

var _ secrets.Exporter = &SqlDatabaseContainer{}

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

var _ genruntime.KubernetesResource = &SqlDatabaseContainer{}

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

// GetAPIVersion returns the ARM API version of the resource. This is always "2021-05-15"
func (container SqlDatabaseContainer) GetAPIVersion() string {
	return "2021-05-15"
}

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

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

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers"
func (container *SqlDatabaseContainer) GetType() string {
	return "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers"
}

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

// Owner returns the ResourceReference of the owner
func (container *SqlDatabaseContainer) 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 *SqlDatabaseContainer) SetStatus(status genruntime.ConvertibleStatus) error {
	// If we have exactly the right type of status, assign it
	if st, ok := status.(*SqlDatabaseContainer_STATUS); ok {
		container.Status = *st
		return nil
	}

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

	container.Status = st
	return nil
}

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

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

// +kubebuilder:object:root=true
// Storage version of v1api20210515.SqlDatabaseContainer
// Generator information:
// - Generated from: /cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-05-15/cosmos-db.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}
type SqlDatabaseContainerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []SqlDatabaseContainer `json:"items"`
}

type augmentConversionForSqlDatabaseContainer interface {
	AssignPropertiesFrom(src *storage.SqlDatabaseContainer) error
	AssignPropertiesTo(dst *storage.SqlDatabaseContainer) error
}

// Storage version of v1api20210515.SqlDatabaseContainer_Spec
type SqlDatabaseContainer_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"`
	Location        *string                           `json:"location,omitempty"`
	OperatorSpec    *SqlDatabaseContainerOperatorSpec `json:"operatorSpec,omitempty"`
	Options         *CreateUpdateOptions              `json:"options,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 documentdb.azure.com/SqlDatabase resource
	Owner       *genruntime.KnownResourceReference `group:"documentdb.azure.com" json:"owner,omitempty" kind:"SqlDatabase"`
	PropertyBag genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
	Resource    *SqlContainerResource              `json:"resource,omitempty"`
	Tags        map[string]string                  `json:"tags,omitempty"`
}

var _ genruntime.ConvertibleSpec = &SqlDatabaseContainer_Spec{}

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

	// Convert to an intermediate form
	src = &storage.SqlDatabaseContainer_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_SqlDatabaseContainer_Spec(src)
	if err != nil {
		return eris.Wrap(err, "final step of conversion in ConvertSpecFrom()")
	}

	return nil
}

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

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

	// AzureName
	container.AzureName = source.AzureName

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

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

	// Options
	if source.Options != nil {
		var option CreateUpdateOptions
		err := option.AssignProperties_From_CreateUpdateOptions(source.Options)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_CreateUpdateOptions() to populate field Options")
		}
		container.Options = &option
	} else {
		container.Options = nil
	}

	// OriginalVersion
	container.OriginalVersion = source.OriginalVersion

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

	// Resource
	if source.Resource != nil {
		var resource SqlContainerResource
		err := resource.AssignProperties_From_SqlContainerResource(source.Resource)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SqlContainerResource() to populate field Resource")
		}
		container.Resource = &resource
	} else {
		container.Resource = nil
	}

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

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

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

	// No error
	return nil
}

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

	// AzureName
	destination.AzureName = container.AzureName

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

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

	// Options
	if container.Options != nil {
		var option storage.CreateUpdateOptions
		err := container.Options.AssignProperties_To_CreateUpdateOptions(&option)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_CreateUpdateOptions() to populate field Options")
		}
		destination.Options = &option
	} else {
		destination.Options = nil
	}

	// OriginalVersion
	destination.OriginalVersion = container.OriginalVersion

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

	// Resource
	if container.Resource != nil {
		var resource storage.SqlContainerResource
		err := container.Resource.AssignProperties_To_SqlContainerResource(&resource)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SqlContainerResource() to populate field Resource")
		}
		destination.Resource = &resource
	} else {
		destination.Resource = nil
	}

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

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

	// Invoke the augmentConversionForSqlDatabaseContainer_Spec interface (if implemented) to customize the conversion
	var containerAsAny any = container
	if augmentedContainer, ok := containerAsAny.(augmentConversionForSqlDatabaseContainer_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 v1api20210515.SqlDatabaseContainer_STATUS
type SqlDatabaseContainer_STATUS struct {
	Conditions  []conditions.Condition                     `json:"conditions,omitempty"`
	Id          *string                                    `json:"id,omitempty"`
	Location    *string                                    `json:"location,omitempty"`
	Name        *string                                    `json:"name,omitempty"`
	Options     *OptionsResource_STATUS                    `json:"options,omitempty"`
	PropertyBag genruntime.PropertyBag                     `json:"$propertyBag,omitempty"`
	Resource    *SqlContainerGetProperties_Resource_STATUS `json:"resource,omitempty"`
	Tags        map[string]string                          `json:"tags,omitempty"`
	Type        *string                                    `json:"type,omitempty"`
}

var _ genruntime.ConvertibleStatus = &SqlDatabaseContainer_STATUS{}

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

	// Convert to an intermediate form
	src = &storage.SqlDatabaseContainer_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_SqlDatabaseContainer_STATUS(src)
	if err != nil {
		return eris.Wrap(err, "final step of conversion in ConvertStatusFrom()")
	}

	return nil
}

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

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

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

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

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

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

	// Options
	if source.Options != nil {
		var option OptionsResource_STATUS
		err := option.AssignProperties_From_OptionsResource_STATUS(source.Options)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_OptionsResource_STATUS() to populate field Options")
		}
		container.Options = &option
	} else {
		container.Options = nil
	}

	// Resource
	if source.Resource != nil {
		var resource SqlContainerGetProperties_Resource_STATUS
		err := resource.AssignProperties_From_SqlContainerGetProperties_Resource_STATUS(source.Resource)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SqlContainerGetProperties_Resource_STATUS() to populate field Resource")
		}
		container.Resource = &resource
	} else {
		container.Resource = nil
	}

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

	// Options
	if container.Options != nil {
		var option storage.OptionsResource_STATUS
		err := container.Options.AssignProperties_To_OptionsResource_STATUS(&option)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_OptionsResource_STATUS() to populate field Options")
		}
		destination.Options = &option
	} else {
		destination.Options = nil
	}

	// Resource
	if container.Resource != nil {
		var resource storage.SqlContainerGetProperties_Resource_STATUS
		err := container.Resource.AssignProperties_To_SqlContainerGetProperties_Resource_STATUS(&resource)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SqlContainerGetProperties_Resource_STATUS() to populate field Resource")
		}
		destination.Resource = &resource
	} else {
		destination.Resource = nil
	}

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

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

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

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

	// No error
	return nil
}

type augmentConversionForSqlDatabaseContainer_Spec interface {
	AssignPropertiesFrom(src *storage.SqlDatabaseContainer_Spec) error
	AssignPropertiesTo(dst *storage.SqlDatabaseContainer_Spec) error
}

type augmentConversionForSqlDatabaseContainer_STATUS interface {
	AssignPropertiesFrom(src *storage.SqlDatabaseContainer_STATUS) error
	AssignPropertiesTo(dst *storage.SqlDatabaseContainer_STATUS) error
}

// Storage version of v1api20210515.SqlContainerGetProperties_Resource_STATUS
type SqlContainerGetProperties_Resource_STATUS struct {
	AnalyticalStorageTtl     *int                             `json:"analyticalStorageTtl,omitempty"`
	ConflictResolutionPolicy *ConflictResolutionPolicy_STATUS `json:"conflictResolutionPolicy,omitempty"`
	DefaultTtl               *int                             `json:"defaultTtl,omitempty"`
	Etag                     *string                          `json:"_etag,omitempty"`
	Id                       *string                          `json:"id,omitempty"`
	IndexingPolicy           *IndexingPolicy_STATUS           `json:"indexingPolicy,omitempty"`
	PartitionKey             *ContainerPartitionKey_STATUS    `json:"partitionKey,omitempty"`
	PropertyBag              genruntime.PropertyBag           `json:"$propertyBag,omitempty"`
	Rid                      *string                          `json:"_rid,omitempty"`
	Ts                       *float64                         `json:"_ts,omitempty"`
	UniqueKeyPolicy          *UniqueKeyPolicy_STATUS          `json:"uniqueKeyPolicy,omitempty"`
}

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

	// AnalyticalStorageTtl
	resource.AnalyticalStorageTtl = genruntime.ClonePointerToInt(source.AnalyticalStorageTtl)

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

	// ComputedProperties
	if len(source.ComputedProperties) > 0 {
		propertyBag.Add("ComputedProperties", source.ComputedProperties)
	} else {
		propertyBag.Remove("ComputedProperties")
	}

	// ConflictResolutionPolicy
	if source.ConflictResolutionPolicy != nil {
		var conflictResolutionPolicy ConflictResolutionPolicy_STATUS
		err := conflictResolutionPolicy.AssignProperties_From_ConflictResolutionPolicy_STATUS(source.ConflictResolutionPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ConflictResolutionPolicy_STATUS() to populate field ConflictResolutionPolicy")
		}
		resource.ConflictResolutionPolicy = &conflictResolutionPolicy
	} else {
		resource.ConflictResolutionPolicy = nil
	}

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

	// DefaultTtl
	resource.DefaultTtl = genruntime.ClonePointerToInt(source.DefaultTtl)

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

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

	// IndexingPolicy
	if source.IndexingPolicy != nil {
		var indexingPolicy IndexingPolicy_STATUS
		err := indexingPolicy.AssignProperties_From_IndexingPolicy_STATUS(source.IndexingPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_IndexingPolicy_STATUS() to populate field IndexingPolicy")
		}
		resource.IndexingPolicy = &indexingPolicy
	} else {
		resource.IndexingPolicy = nil
	}

	// PartitionKey
	if source.PartitionKey != nil {
		var partitionKey ContainerPartitionKey_STATUS
		err := partitionKey.AssignProperties_From_ContainerPartitionKey_STATUS(source.PartitionKey)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ContainerPartitionKey_STATUS() to populate field PartitionKey")
		}
		resource.PartitionKey = &partitionKey
	} else {
		resource.PartitionKey = nil
	}

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

	// Rid
	resource.Rid = genruntime.ClonePointerToString(source.Rid)

	// Ts
	if source.Ts != nil {
		t := *source.Ts
		resource.Ts = &t
	} else {
		resource.Ts = nil
	}

	// UniqueKeyPolicy
	if source.UniqueKeyPolicy != nil {
		var uniqueKeyPolicy UniqueKeyPolicy_STATUS
		err := uniqueKeyPolicy.AssignProperties_From_UniqueKeyPolicy_STATUS(source.UniqueKeyPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_UniqueKeyPolicy_STATUS() to populate field UniqueKeyPolicy")
		}
		resource.UniqueKeyPolicy = &uniqueKeyPolicy
	} else {
		resource.UniqueKeyPolicy = nil
	}

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

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

	// No error
	return nil
}

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

	// AnalyticalStorageTtl
	destination.AnalyticalStorageTtl = genruntime.ClonePointerToInt(resource.AnalyticalStorageTtl)

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

		destination.ClientEncryptionPolicy = &clientEncryptionPolicy
	} else {
		destination.ClientEncryptionPolicy = nil
	}

	// ComputedProperties
	if propertyBag.Contains("ComputedProperties") {
		var computedProperty []storage.ComputedProperty_STATUS
		err := propertyBag.Pull("ComputedProperties", &computedProperty)
		if err != nil {
			return eris.Wrap(err, "pulling 'ComputedProperties' from propertyBag")
		}

		destination.ComputedProperties = computedProperty
	} else {
		destination.ComputedProperties = nil
	}

	// ConflictResolutionPolicy
	if resource.ConflictResolutionPolicy != nil {
		var conflictResolutionPolicy storage.ConflictResolutionPolicy_STATUS
		err := resource.ConflictResolutionPolicy.AssignProperties_To_ConflictResolutionPolicy_STATUS(&conflictResolutionPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ConflictResolutionPolicy_STATUS() to populate field ConflictResolutionPolicy")
		}
		destination.ConflictResolutionPolicy = &conflictResolutionPolicy
	} else {
		destination.ConflictResolutionPolicy = nil
	}

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

		destination.CreateMode = &createMode
	} else {
		destination.CreateMode = nil
	}

	// DefaultTtl
	destination.DefaultTtl = genruntime.ClonePointerToInt(resource.DefaultTtl)

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

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

	// IndexingPolicy
	if resource.IndexingPolicy != nil {
		var indexingPolicy storage.IndexingPolicy_STATUS
		err := resource.IndexingPolicy.AssignProperties_To_IndexingPolicy_STATUS(&indexingPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_IndexingPolicy_STATUS() to populate field IndexingPolicy")
		}
		destination.IndexingPolicy = &indexingPolicy
	} else {
		destination.IndexingPolicy = nil
	}

	// PartitionKey
	if resource.PartitionKey != nil {
		var partitionKey storage.ContainerPartitionKey_STATUS
		err := resource.PartitionKey.AssignProperties_To_ContainerPartitionKey_STATUS(&partitionKey)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ContainerPartitionKey_STATUS() to populate field PartitionKey")
		}
		destination.PartitionKey = &partitionKey
	} else {
		destination.PartitionKey = nil
	}

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

		destination.RestoreParameters = &restoreParameter
	} else {
		destination.RestoreParameters = nil
	}

	// Rid
	destination.Rid = genruntime.ClonePointerToString(resource.Rid)

	// Ts
	if resource.Ts != nil {
		t := *resource.Ts
		destination.Ts = &t
	} else {
		destination.Ts = nil
	}

	// UniqueKeyPolicy
	if resource.UniqueKeyPolicy != nil {
		var uniqueKeyPolicy storage.UniqueKeyPolicy_STATUS
		err := resource.UniqueKeyPolicy.AssignProperties_To_UniqueKeyPolicy_STATUS(&uniqueKeyPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_UniqueKeyPolicy_STATUS() to populate field UniqueKeyPolicy")
		}
		destination.UniqueKeyPolicy = &uniqueKeyPolicy
	} else {
		destination.UniqueKeyPolicy = nil
	}

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

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

	// No error
	return nil
}

// Storage version of v1api20210515.SqlContainerResource
// Cosmos DB SQL container resource object
type SqlContainerResource struct {
	AnalyticalStorageTtl     *int                      `json:"analyticalStorageTtl,omitempty"`
	ConflictResolutionPolicy *ConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"`
	DefaultTtl               *int                      `json:"defaultTtl,omitempty"`
	Id                       *string                   `json:"id,omitempty"`
	IndexingPolicy           *IndexingPolicy           `json:"indexingPolicy,omitempty"`
	PartitionKey             *ContainerPartitionKey    `json:"partitionKey,omitempty"`
	PropertyBag              genruntime.PropertyBag    `json:"$propertyBag,omitempty"`
	UniqueKeyPolicy          *UniqueKeyPolicy          `json:"uniqueKeyPolicy,omitempty"`
}

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

	// AnalyticalStorageTtl
	resource.AnalyticalStorageTtl = genruntime.ClonePointerToInt(source.AnalyticalStorageTtl)

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

	// ComputedProperties
	if len(source.ComputedProperties) > 0 {
		propertyBag.Add("ComputedProperties", source.ComputedProperties)
	} else {
		propertyBag.Remove("ComputedProperties")
	}

	// ConflictResolutionPolicy
	if source.ConflictResolutionPolicy != nil {
		var conflictResolutionPolicy ConflictResolutionPolicy
		err := conflictResolutionPolicy.AssignProperties_From_ConflictResolutionPolicy(source.ConflictResolutionPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ConflictResolutionPolicy() to populate field ConflictResolutionPolicy")
		}
		resource.ConflictResolutionPolicy = &conflictResolutionPolicy
	} else {
		resource.ConflictResolutionPolicy = nil
	}

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

	// DefaultTtl
	resource.DefaultTtl = genruntime.ClonePointerToInt(source.DefaultTtl)

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

	// IndexingPolicy
	if source.IndexingPolicy != nil {
		var indexingPolicy IndexingPolicy
		err := indexingPolicy.AssignProperties_From_IndexingPolicy(source.IndexingPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_IndexingPolicy() to populate field IndexingPolicy")
		}
		resource.IndexingPolicy = &indexingPolicy
	} else {
		resource.IndexingPolicy = nil
	}

	// PartitionKey
	if source.PartitionKey != nil {
		var partitionKey ContainerPartitionKey
		err := partitionKey.AssignProperties_From_ContainerPartitionKey(source.PartitionKey)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ContainerPartitionKey() to populate field PartitionKey")
		}
		resource.PartitionKey = &partitionKey
	} else {
		resource.PartitionKey = nil
	}

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

	// UniqueKeyPolicy
	if source.UniqueKeyPolicy != nil {
		var uniqueKeyPolicy UniqueKeyPolicy
		err := uniqueKeyPolicy.AssignProperties_From_UniqueKeyPolicy(source.UniqueKeyPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_UniqueKeyPolicy() to populate field UniqueKeyPolicy")
		}
		resource.UniqueKeyPolicy = &uniqueKeyPolicy
	} else {
		resource.UniqueKeyPolicy = nil
	}

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

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

	// No error
	return nil
}

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

	// AnalyticalStorageTtl
	destination.AnalyticalStorageTtl = genruntime.ClonePointerToInt(resource.AnalyticalStorageTtl)

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

		destination.ClientEncryptionPolicy = &clientEncryptionPolicy
	} else {
		destination.ClientEncryptionPolicy = nil
	}

	// ComputedProperties
	if propertyBag.Contains("ComputedProperties") {
		var computedProperty []storage.ComputedProperty
		err := propertyBag.Pull("ComputedProperties", &computedProperty)
		if err != nil {
			return eris.Wrap(err, "pulling 'ComputedProperties' from propertyBag")
		}

		destination.ComputedProperties = computedProperty
	} else {
		destination.ComputedProperties = nil
	}

	// ConflictResolutionPolicy
	if resource.ConflictResolutionPolicy != nil {
		var conflictResolutionPolicy storage.ConflictResolutionPolicy
		err := resource.ConflictResolutionPolicy.AssignProperties_To_ConflictResolutionPolicy(&conflictResolutionPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ConflictResolutionPolicy() to populate field ConflictResolutionPolicy")
		}
		destination.ConflictResolutionPolicy = &conflictResolutionPolicy
	} else {
		destination.ConflictResolutionPolicy = nil
	}

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

		destination.CreateMode = &createMode
	} else {
		destination.CreateMode = nil
	}

	// DefaultTtl
	destination.DefaultTtl = genruntime.ClonePointerToInt(resource.DefaultTtl)

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

	// IndexingPolicy
	if resource.IndexingPolicy != nil {
		var indexingPolicy storage.IndexingPolicy
		err := resource.IndexingPolicy.AssignProperties_To_IndexingPolicy(&indexingPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_IndexingPolicy() to populate field IndexingPolicy")
		}
		destination.IndexingPolicy = &indexingPolicy
	} else {
		destination.IndexingPolicy = nil
	}

	// PartitionKey
	if resource.PartitionKey != nil {
		var partitionKey storage.ContainerPartitionKey
		err := resource.PartitionKey.AssignProperties_To_ContainerPartitionKey(&partitionKey)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ContainerPartitionKey() to populate field PartitionKey")
		}
		destination.PartitionKey = &partitionKey
	} else {
		destination.PartitionKey = nil
	}

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

		destination.RestoreParameters = &restoreParameter
	} else {
		destination.RestoreParameters = nil
	}

	// UniqueKeyPolicy
	if resource.UniqueKeyPolicy != nil {
		var uniqueKeyPolicy storage.UniqueKeyPolicy
		err := resource.UniqueKeyPolicy.AssignProperties_To_UniqueKeyPolicy(&uniqueKeyPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_UniqueKeyPolicy() to populate field UniqueKeyPolicy")
		}
		destination.UniqueKeyPolicy = &uniqueKeyPolicy
	} else {
		destination.UniqueKeyPolicy = nil
	}

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

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

	// No error
	return nil
}

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

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

	// No error
	return nil
}

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

	// No error
	return nil
}

type augmentConversionForSqlContainerGetProperties_Resource_STATUS interface {
	AssignPropertiesFrom(src *storage.SqlContainerGetProperties_Resource_STATUS) error
	AssignPropertiesTo(dst *storage.SqlContainerGetProperties_Resource_STATUS) error
}

type augmentConversionForSqlContainerResource interface {
	AssignPropertiesFrom(src *storage.SqlContainerResource) error
	AssignPropertiesTo(dst *storage.SqlContainerResource) error
}

type augmentConversionForSqlDatabaseContainerOperatorSpec interface {
	AssignPropertiesFrom(src *storage.SqlDatabaseContainerOperatorSpec) error
	AssignPropertiesTo(dst *storage.SqlDatabaseContainerOperatorSpec) error
}

// Storage version of v1api20210515.ConflictResolutionPolicy
// The conflict resolution policy for the container.
type ConflictResolutionPolicy struct {
	ConflictResolutionPath      *string                `json:"conflictResolutionPath,omitempty"`
	ConflictResolutionProcedure *string                `json:"conflictResolutionProcedure,omitempty"`
	Mode                        *string                `json:"mode,omitempty"`
	PropertyBag                 genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

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

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

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

	// No error
	return nil
}

// Storage version of v1api20210515.ConflictResolutionPolicy_STATUS
// The conflict resolution policy for the container.
type ConflictResolutionPolicy_STATUS struct {
	ConflictResolutionPath      *string                `json:"conflictResolutionPath,omitempty"`
	ConflictResolutionProcedure *string                `json:"conflictResolutionProcedure,omitempty"`
	Mode                        *string                `json:"mode,omitempty"`
	PropertyBag                 genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

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

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

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

	// No error
	return nil
}

// Storage version of v1api20210515.ContainerPartitionKey
// The configuration of the partition key to be used for partitioning data into multiple partitions
type ContainerPartitionKey struct {
	Kind        *string                `json:"kind,omitempty"`
	Paths       []string               `json:"paths,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Version     *int                   `json:"version,omitempty"`
}

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

	// Kind
	partitionKey.Kind = genruntime.ClonePointerToString(source.Kind)

	// Paths
	partitionKey.Paths = genruntime.CloneSliceOfString(source.Paths)

	// Version
	partitionKey.Version = genruntime.ClonePointerToInt(source.Version)

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

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

	// No error
	return nil
}

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

	// Kind
	destination.Kind = genruntime.ClonePointerToString(partitionKey.Kind)

	// Paths
	destination.Paths = genruntime.CloneSliceOfString(partitionKey.Paths)

	// Version
	destination.Version = genruntime.ClonePointerToInt(partitionKey.Version)

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

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

	// No error
	return nil
}

// Storage version of v1api20210515.ContainerPartitionKey_STATUS
// The configuration of the partition key to be used for partitioning data into multiple partitions
type ContainerPartitionKey_STATUS struct {
	Kind        *string                `json:"kind,omitempty"`
	Paths       []string               `json:"paths,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SystemKey   *bool                  `json:"systemKey,omitempty"`
	Version     *int                   `json:"version,omitempty"`
}

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

	// Kind
	partitionKey.Kind = genruntime.ClonePointerToString(source.Kind)

	// Paths
	partitionKey.Paths = genruntime.CloneSliceOfString(source.Paths)

	// SystemKey
	if source.SystemKey != nil {
		systemKey := *source.SystemKey
		partitionKey.SystemKey = &systemKey
	} else {
		partitionKey.SystemKey = nil
	}

	// Version
	partitionKey.Version = genruntime.ClonePointerToInt(source.Version)

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

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

	// No error
	return nil
}

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

	// Kind
	destination.Kind = genruntime.ClonePointerToString(partitionKey.Kind)

	// Paths
	destination.Paths = genruntime.CloneSliceOfString(partitionKey.Paths)

	// SystemKey
	if partitionKey.SystemKey != nil {
		systemKey := *partitionKey.SystemKey
		destination.SystemKey = &systemKey
	} else {
		destination.SystemKey = nil
	}

	// Version
	destination.Version = genruntime.ClonePointerToInt(partitionKey.Version)

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

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

	// No error
	return nil
}

// Storage version of v1api20210515.IndexingPolicy
// Cosmos DB indexing policy
type IndexingPolicy struct {
	Automatic        *bool                  `json:"automatic,omitempty"`
	CompositeIndexes [][]CompositePath      `json:"compositeIndexes,omitempty"`
	ExcludedPaths    []ExcludedPath         `json:"excludedPaths,omitempty"`
	IncludedPaths    []IncludedPath         `json:"includedPaths,omitempty"`
	IndexingMode     *string                `json:"indexingMode,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SpatialIndexes   []SpatialSpec          `json:"spatialIndexes,omitempty"`
}

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

	// Automatic
	if source.Automatic != nil {
		automatic := *source.Automatic
		policy.Automatic = &automatic
	} else {
		policy.Automatic = nil
	}

	// CompositeIndexes
	if source.CompositeIndexes != nil {
		compositeIndexList := make([][]CompositePath, len(source.CompositeIndexes))
		for compositeIndex, compositeIndexItem := range source.CompositeIndexes {
			if compositeIndexItem != nil {
				compositeIndexList1 := make([]CompositePath, len(compositeIndexItem))
				for compositeIndex1, compositeIndexItem1 := range compositeIndexItem {
					var compositeIndexLocal CompositePath
					err := compositeIndexLocal.AssignProperties_From_CompositePath(&compositeIndexItem1)
					if err != nil {
						return eris.Wrap(err, "calling AssignProperties_From_CompositePath() to populate field CompositeIndexes")
					}
					compositeIndexList1[compositeIndex1] = compositeIndexLocal
				}
				compositeIndexList[compositeIndex] = compositeIndexList1
			} else {
				compositeIndexList[compositeIndex] = nil
			}
		}
		policy.CompositeIndexes = compositeIndexList
	} else {
		policy.CompositeIndexes = nil
	}

	// ExcludedPaths
	if source.ExcludedPaths != nil {
		excludedPathList := make([]ExcludedPath, len(source.ExcludedPaths))
		for excludedPathIndex, excludedPathItem := range source.ExcludedPaths {
			var excludedPath ExcludedPath
			err := excludedPath.AssignProperties_From_ExcludedPath(&excludedPathItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ExcludedPath() to populate field ExcludedPaths")
			}
			excludedPathList[excludedPathIndex] = excludedPath
		}
		policy.ExcludedPaths = excludedPathList
	} else {
		policy.ExcludedPaths = nil
	}

	// IncludedPaths
	if source.IncludedPaths != nil {
		includedPathList := make([]IncludedPath, len(source.IncludedPaths))
		for includedPathIndex, includedPathItem := range source.IncludedPaths {
			var includedPath IncludedPath
			err := includedPath.AssignProperties_From_IncludedPath(&includedPathItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_IncludedPath() to populate field IncludedPaths")
			}
			includedPathList[includedPathIndex] = includedPath
		}
		policy.IncludedPaths = includedPathList
	} else {
		policy.IncludedPaths = nil
	}

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

	// SpatialIndexes
	if source.SpatialIndexes != nil {
		spatialIndexList := make([]SpatialSpec, len(source.SpatialIndexes))
		for spatialIndex, spatialIndexItem := range source.SpatialIndexes {
			var spatialIndexLocal SpatialSpec
			err := spatialIndexLocal.AssignProperties_From_SpatialSpec(&spatialIndexItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_SpatialSpec() to populate field SpatialIndexes")
			}
			spatialIndexList[spatialIndex] = spatialIndexLocal
		}
		policy.SpatialIndexes = spatialIndexList
	} else {
		policy.SpatialIndexes = nil
	}

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

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

	// No error
	return nil
}

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

	// Automatic
	if policy.Automatic != nil {
		automatic := *policy.Automatic
		destination.Automatic = &automatic
	} else {
		destination.Automatic = nil
	}

	// CompositeIndexes
	if policy.CompositeIndexes != nil {
		compositeIndexList := make([][]storage.CompositePath, len(policy.CompositeIndexes))
		for compositeIndex, compositeIndexItem := range policy.CompositeIndexes {
			if compositeIndexItem != nil {
				compositeIndexList1 := make([]storage.CompositePath, len(compositeIndexItem))
				for compositeIndex1, compositeIndexItem1 := range compositeIndexItem {
					var compositeIndexLocal storage.CompositePath
					err := compositeIndexItem1.AssignProperties_To_CompositePath(&compositeIndexLocal)
					if err != nil {
						return eris.Wrap(err, "calling AssignProperties_To_CompositePath() to populate field CompositeIndexes")
					}
					compositeIndexList1[compositeIndex1] = compositeIndexLocal
				}
				compositeIndexList[compositeIndex] = compositeIndexList1
			} else {
				compositeIndexList[compositeIndex] = nil
			}
		}
		destination.CompositeIndexes = compositeIndexList
	} else {
		destination.CompositeIndexes = nil
	}

	// ExcludedPaths
	if policy.ExcludedPaths != nil {
		excludedPathList := make([]storage.ExcludedPath, len(policy.ExcludedPaths))
		for excludedPathIndex, excludedPathItem := range policy.ExcludedPaths {
			var excludedPath storage.ExcludedPath
			err := excludedPathItem.AssignProperties_To_ExcludedPath(&excludedPath)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ExcludedPath() to populate field ExcludedPaths")
			}
			excludedPathList[excludedPathIndex] = excludedPath
		}
		destination.ExcludedPaths = excludedPathList
	} else {
		destination.ExcludedPaths = nil
	}

	// IncludedPaths
	if policy.IncludedPaths != nil {
		includedPathList := make([]storage.IncludedPath, len(policy.IncludedPaths))
		for includedPathIndex, includedPathItem := range policy.IncludedPaths {
			var includedPath storage.IncludedPath
			err := includedPathItem.AssignProperties_To_IncludedPath(&includedPath)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_IncludedPath() to populate field IncludedPaths")
			}
			includedPathList[includedPathIndex] = includedPath
		}
		destination.IncludedPaths = includedPathList
	} else {
		destination.IncludedPaths = nil
	}

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

	// SpatialIndexes
	if policy.SpatialIndexes != nil {
		spatialIndexList := make([]storage.SpatialSpec, len(policy.SpatialIndexes))
		for spatialIndex, spatialIndexItem := range policy.SpatialIndexes {
			var spatialIndexLocal storage.SpatialSpec
			err := spatialIndexItem.AssignProperties_To_SpatialSpec(&spatialIndexLocal)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_SpatialSpec() to populate field SpatialIndexes")
			}
			spatialIndexList[spatialIndex] = spatialIndexLocal
		}
		destination.SpatialIndexes = spatialIndexList
	} else {
		destination.SpatialIndexes = nil
	}

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

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

	// No error
	return nil
}

// Storage version of v1api20210515.IndexingPolicy_STATUS
// Cosmos DB indexing policy
type IndexingPolicy_STATUS struct {
	Automatic        *bool                    `json:"automatic,omitempty"`
	CompositeIndexes [][]CompositePath_STATUS `json:"compositeIndexes,omitempty"`
	ExcludedPaths    []ExcludedPath_STATUS    `json:"excludedPaths,omitempty"`
	IncludedPaths    []IncludedPath_STATUS    `json:"includedPaths,omitempty"`
	IndexingMode     *string                  `json:"indexingMode,omitempty"`
	PropertyBag      genruntime.PropertyBag   `json:"$propertyBag,omitempty"`
	SpatialIndexes   []SpatialSpec_STATUS     `json:"spatialIndexes,omitempty"`
}

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

	// Automatic
	if source.Automatic != nil {
		automatic := *source.Automatic
		policy.Automatic = &automatic
	} else {
		policy.Automatic = nil
	}

	// CompositeIndexes
	if source.CompositeIndexes != nil {
		compositeIndexList := make([][]CompositePath_STATUS, len(source.CompositeIndexes))
		for compositeIndex, compositeIndexItem := range source.CompositeIndexes {
			if compositeIndexItem != nil {
				compositeIndexList1 := make([]CompositePath_STATUS, len(compositeIndexItem))
				for compositeIndex1, compositeIndexItem1 := range compositeIndexItem {
					var compositeIndexLocal CompositePath_STATUS
					err := compositeIndexLocal.AssignProperties_From_CompositePath_STATUS(&compositeIndexItem1)
					if err != nil {
						return eris.Wrap(err, "calling AssignProperties_From_CompositePath_STATUS() to populate field CompositeIndexes")
					}
					compositeIndexList1[compositeIndex1] = compositeIndexLocal
				}
				compositeIndexList[compositeIndex] = compositeIndexList1
			} else {
				compositeIndexList[compositeIndex] = nil
			}
		}
		policy.CompositeIndexes = compositeIndexList
	} else {
		policy.CompositeIndexes = nil
	}

	// ExcludedPaths
	if source.ExcludedPaths != nil {
		excludedPathList := make([]ExcludedPath_STATUS, len(source.ExcludedPaths))
		for excludedPathIndex, excludedPathItem := range source.ExcludedPaths {
			var excludedPath ExcludedPath_STATUS
			err := excludedPath.AssignProperties_From_ExcludedPath_STATUS(&excludedPathItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ExcludedPath_STATUS() to populate field ExcludedPaths")
			}
			excludedPathList[excludedPathIndex] = excludedPath
		}
		policy.ExcludedPaths = excludedPathList
	} else {
		policy.ExcludedPaths = nil
	}

	// IncludedPaths
	if source.IncludedPaths != nil {
		includedPathList := make([]IncludedPath_STATUS, len(source.IncludedPaths))
		for includedPathIndex, includedPathItem := range source.IncludedPaths {
			var includedPath IncludedPath_STATUS
			err := includedPath.AssignProperties_From_IncludedPath_STATUS(&includedPathItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_IncludedPath_STATUS() to populate field IncludedPaths")
			}
			includedPathList[includedPathIndex] = includedPath
		}
		policy.IncludedPaths = includedPathList
	} else {
		policy.IncludedPaths = nil
	}

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

	// SpatialIndexes
	if source.SpatialIndexes != nil {
		spatialIndexList := make([]SpatialSpec_STATUS, len(source.SpatialIndexes))
		for spatialIndex, spatialIndexItem := range source.SpatialIndexes {
			var spatialIndexLocal SpatialSpec_STATUS
			err := spatialIndexLocal.AssignProperties_From_SpatialSpec_STATUS(&spatialIndexItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_SpatialSpec_STATUS() to populate field SpatialIndexes")
			}
			spatialIndexList[spatialIndex] = spatialIndexLocal
		}
		policy.SpatialIndexes = spatialIndexList
	} else {
		policy.SpatialIndexes = nil
	}

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

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

	// No error
	return nil
}

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

	// Automatic
	if policy.Automatic != nil {
		automatic := *policy.Automatic
		destination.Automatic = &automatic
	} else {
		destination.Automatic = nil
	}

	// CompositeIndexes
	if policy.CompositeIndexes != nil {
		compositeIndexList := make([][]storage.CompositePath_STATUS, len(policy.CompositeIndexes))
		for compositeIndex, compositeIndexItem := range policy.CompositeIndexes {
			if compositeIndexItem != nil {
				compositeIndexList1 := make([]storage.CompositePath_STATUS, len(compositeIndexItem))
				for compositeIndex1, compositeIndexItem1 := range compositeIndexItem {
					var compositeIndexLocal storage.CompositePath_STATUS
					err := compositeIndexItem1.AssignProperties_To_CompositePath_STATUS(&compositeIndexLocal)
					if err != nil {
						return eris.Wrap(err, "calling AssignProperties_To_CompositePath_STATUS() to populate field CompositeIndexes")
					}
					compositeIndexList1[compositeIndex1] = compositeIndexLocal
				}
				compositeIndexList[compositeIndex] = compositeIndexList1
			} else {
				compositeIndexList[compositeIndex] = nil
			}
		}
		destination.CompositeIndexes = compositeIndexList
	} else {
		destination.CompositeIndexes = nil
	}

	// ExcludedPaths
	if policy.ExcludedPaths != nil {
		excludedPathList := make([]storage.ExcludedPath_STATUS, len(policy.ExcludedPaths))
		for excludedPathIndex, excludedPathItem := range policy.ExcludedPaths {
			var excludedPath storage.ExcludedPath_STATUS
			err := excludedPathItem.AssignProperties_To_ExcludedPath_STATUS(&excludedPath)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ExcludedPath_STATUS() to populate field ExcludedPaths")
			}
			excludedPathList[excludedPathIndex] = excludedPath
		}
		destination.ExcludedPaths = excludedPathList
	} else {
		destination.ExcludedPaths = nil
	}

	// IncludedPaths
	if policy.IncludedPaths != nil {
		includedPathList := make([]storage.IncludedPath_STATUS, len(policy.IncludedPaths))
		for includedPathIndex, includedPathItem := range policy.IncludedPaths {
			var includedPath storage.IncludedPath_STATUS
			err := includedPathItem.AssignProperties_To_IncludedPath_STATUS(&includedPath)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_IncludedPath_STATUS() to populate field IncludedPaths")
			}
			includedPathList[includedPathIndex] = includedPath
		}
		destination.IncludedPaths = includedPathList
	} else {
		destination.IncludedPaths = nil
	}

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

	// SpatialIndexes
	if policy.SpatialIndexes != nil {
		spatialIndexList := make([]storage.SpatialSpec_STATUS, len(policy.SpatialIndexes))
		for spatialIndex, spatialIndexItem := range policy.SpatialIndexes {
			var spatialIndexLocal storage.SpatialSpec_STATUS
			err := spatialIndexItem.AssignProperties_To_SpatialSpec_STATUS(&spatialIndexLocal)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_SpatialSpec_STATUS() to populate field SpatialIndexes")
			}
			spatialIndexList[spatialIndex] = spatialIndexLocal
		}
		destination.SpatialIndexes = spatialIndexList
	} else {
		destination.SpatialIndexes = nil
	}

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

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

	// No error
	return nil
}

// Storage version of v1api20210515.UniqueKeyPolicy
// The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure
// Cosmos DB service.
type UniqueKeyPolicy struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	UniqueKeys  []UniqueKey            `json:"uniqueKeys,omitempty"`
}

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

	// UniqueKeys
	if source.UniqueKeys != nil {
		uniqueKeyList := make([]UniqueKey, len(source.UniqueKeys))
		for uniqueKeyIndex, uniqueKeyItem := range source.UniqueKeys {
			var uniqueKey UniqueKey
			err := uniqueKey.AssignProperties_From_UniqueKey(&uniqueKeyItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_UniqueKey() to populate field UniqueKeys")
			}
			uniqueKeyList[uniqueKeyIndex] = uniqueKey
		}
		policy.UniqueKeys = uniqueKeyList
	} else {
		policy.UniqueKeys = nil
	}

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

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

	// No error
	return nil
}

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

	// UniqueKeys
	if policy.UniqueKeys != nil {
		uniqueKeyList := make([]storage.UniqueKey, len(policy.UniqueKeys))
		for uniqueKeyIndex, uniqueKeyItem := range policy.UniqueKeys {
			var uniqueKey storage.UniqueKey
			err := uniqueKeyItem.AssignProperties_To_UniqueKey(&uniqueKey)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_UniqueKey() to populate field UniqueKeys")
			}
			uniqueKeyList[uniqueKeyIndex] = uniqueKey
		}
		destination.UniqueKeys = uniqueKeyList
	} else {
		destination.UniqueKeys = nil
	}

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

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

	// No error
	return nil
}

// Storage version of v1api20210515.UniqueKeyPolicy_STATUS
// The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure
// Cosmos DB service.
type UniqueKeyPolicy_STATUS struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	UniqueKeys  []UniqueKey_STATUS     `json:"uniqueKeys,omitempty"`
}

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

	// UniqueKeys
	if source.UniqueKeys != nil {
		uniqueKeyList := make([]UniqueKey_STATUS, len(source.UniqueKeys))
		for uniqueKeyIndex, uniqueKeyItem := range source.UniqueKeys {
			var uniqueKey UniqueKey_STATUS
			err := uniqueKey.AssignProperties_From_UniqueKey_STATUS(&uniqueKeyItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_UniqueKey_STATUS() to populate field UniqueKeys")
			}
			uniqueKeyList[uniqueKeyIndex] = uniqueKey
		}
		policy.UniqueKeys = uniqueKeyList
	} else {
		policy.UniqueKeys = nil
	}

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

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

	// No error
	return nil
}

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

	// UniqueKeys
	if policy.UniqueKeys != nil {
		uniqueKeyList := make([]storage.UniqueKey_STATUS, len(policy.UniqueKeys))
		for uniqueKeyIndex, uniqueKeyItem := range policy.UniqueKeys {
			var uniqueKey storage.UniqueKey_STATUS
			err := uniqueKeyItem.AssignProperties_To_UniqueKey_STATUS(&uniqueKey)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_UniqueKey_STATUS() to populate field UniqueKeys")
			}
			uniqueKeyList[uniqueKeyIndex] = uniqueKey
		}
		destination.UniqueKeys = uniqueKeyList
	} else {
		destination.UniqueKeys = nil
	}

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

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

	// No error
	return nil
}

type augmentConversionForConflictResolutionPolicy interface {
	AssignPropertiesFrom(src *storage.ConflictResolutionPolicy) error
	AssignPropertiesTo(dst *storage.ConflictResolutionPolicy) error
}

type augmentConversionForConflictResolutionPolicy_STATUS interface {
	AssignPropertiesFrom(src *storage.ConflictResolutionPolicy_STATUS) error
	AssignPropertiesTo(dst *storage.ConflictResolutionPolicy_STATUS) error
}

type augmentConversionForContainerPartitionKey interface {
	AssignPropertiesFrom(src *storage.ContainerPartitionKey) error
	AssignPropertiesTo(dst *storage.ContainerPartitionKey) error
}

type augmentConversionForContainerPartitionKey_STATUS interface {
	AssignPropertiesFrom(src *storage.ContainerPartitionKey_STATUS) error
	AssignPropertiesTo(dst *storage.ContainerPartitionKey_STATUS) error
}

type augmentConversionForIndexingPolicy interface {
	AssignPropertiesFrom(src *storage.IndexingPolicy) error
	AssignPropertiesTo(dst *storage.IndexingPolicy) error
}

type augmentConversionForIndexingPolicy_STATUS interface {
	AssignPropertiesFrom(src *storage.IndexingPolicy_STATUS) error
	AssignPropertiesTo(dst *storage.IndexingPolicy_STATUS) error
}

type augmentConversionForUniqueKeyPolicy interface {
	AssignPropertiesFrom(src *storage.UniqueKeyPolicy) error
	AssignPropertiesTo(dst *storage.UniqueKeyPolicy) error
}

type augmentConversionForUniqueKeyPolicy_STATUS interface {
	AssignPropertiesFrom(src *storage.UniqueKeyPolicy_STATUS) error
	AssignPropertiesTo(dst *storage.UniqueKeyPolicy_STATUS) error
}

// Storage version of v1api20210515.CompositePath
type CompositePath struct {
	Order       *string                `json:"order,omitempty"`
	Path        *string                `json:"path,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

	// Order
	path.Order = genruntime.ClonePointerToString(source.Order)

	// Path
	path.Path = genruntime.ClonePointerToString(source.Path)

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

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

	// No error
	return nil
}

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

	// Order
	destination.Order = genruntime.ClonePointerToString(path.Order)

	// Path
	destination.Path = genruntime.ClonePointerToString(path.Path)

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

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

	// No error
	return nil
}

// Storage version of v1api20210515.CompositePath_STATUS
type CompositePath_STATUS struct {
	Order       *string                `json:"order,omitempty"`
	Path        *string                `json:"path,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

	// Order
	path.Order = genruntime.ClonePointerToString(source.Order)

	// Path
	path.Path = genruntime.ClonePointerToString(source.Path)

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

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

	// No error
	return nil
}

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

	// Order
	destination.Order = genruntime.ClonePointerToString(path.Order)

	// Path
	destination.Path = genruntime.ClonePointerToString(path.Path)

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

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

	// No error
	return nil
}

// Storage version of v1api20210515.ExcludedPath
type ExcludedPath struct {
	Path        *string                `json:"path,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

	// Path
	path.Path = genruntime.ClonePointerToString(source.Path)

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

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

	// No error
	return nil
}

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

	// Path
	destination.Path = genruntime.ClonePointerToString(path.Path)

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

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

	// No error
	return nil
}

// Storage version of v1api20210515.ExcludedPath_STATUS
type ExcludedPath_STATUS struct {
	Path        *string                `json:"path,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

	// Path
	path.Path = genruntime.ClonePointerToString(source.Path)

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

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

	// No error
	return nil
}

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

	// Path
	destination.Path = genruntime.ClonePointerToString(path.Path)

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

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

	// No error
	return nil
}

// Storage version of v1api20210515.IncludedPath
// The paths that are included in indexing
type IncludedPath struct {
	Indexes     []Indexes              `json:"indexes,omitempty"`
	Path        *string                `json:"path,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

	// Indexes
	if source.Indexes != nil {
		indexList := make([]Indexes, len(source.Indexes))
		for index, indexItem := range source.Indexes {
			var indexLocal Indexes
			err := indexLocal.AssignProperties_From_Indexes(&indexItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_Indexes() to populate field Indexes")
			}
			indexList[index] = indexLocal
		}
		path.Indexes = indexList
	} else {
		path.Indexes = nil
	}

	// Path
	path.Path = genruntime.ClonePointerToString(source.Path)

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

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

	// No error
	return nil
}

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

	// Indexes
	if path.Indexes != nil {
		indexList := make([]storage.Indexes, len(path.Indexes))
		for index, indexItem := range path.Indexes {
			var indexLocal storage.Indexes
			err := indexItem.AssignProperties_To_Indexes(&indexLocal)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_Indexes() to populate field Indexes")
			}
			indexList[index] = indexLocal
		}
		destination.Indexes = indexList
	} else {
		destination.Indexes = nil
	}

	// Path
	destination.Path = genruntime.ClonePointerToString(path.Path)

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

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

	// No error
	return nil
}

// Storage version of v1api20210515.IncludedPath_STATUS
// The paths that are included in indexing
type IncludedPath_STATUS struct {
	Indexes     []Indexes_STATUS       `json:"indexes,omitempty"`
	Path        *string                `json:"path,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

	// Indexes
	if source.Indexes != nil {
		indexList := make([]Indexes_STATUS, len(source.Indexes))
		for index, indexItem := range source.Indexes {
			var indexLocal Indexes_STATUS
			err := indexLocal.AssignProperties_From_Indexes_STATUS(&indexItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_Indexes_STATUS() to populate field Indexes")
			}
			indexList[index] = indexLocal
		}
		path.Indexes = indexList
	} else {
		path.Indexes = nil
	}

	// Path
	path.Path = genruntime.ClonePointerToString(source.Path)

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

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

	// No error
	return nil
}

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

	// Indexes
	if path.Indexes != nil {
		indexList := make([]storage.Indexes_STATUS, len(path.Indexes))
		for index, indexItem := range path.Indexes {
			var indexLocal storage.Indexes_STATUS
			err := indexItem.AssignProperties_To_Indexes_STATUS(&indexLocal)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_Indexes_STATUS() to populate field Indexes")
			}
			indexList[index] = indexLocal
		}
		destination.Indexes = indexList
	} else {
		destination.Indexes = nil
	}

	// Path
	destination.Path = genruntime.ClonePointerToString(path.Path)

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

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

	// No error
	return nil
}

// Storage version of v1api20210515.SpatialSpec
type SpatialSpec struct {
	Path        *string                `json:"path,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Types       []string               `json:"types,omitempty"`
}

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

	// Path
	spatial.Path = genruntime.ClonePointerToString(source.Path)

	// Types
	spatial.Types = genruntime.CloneSliceOfString(source.Types)

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

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

	// No error
	return nil
}

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

	// Path
	destination.Path = genruntime.ClonePointerToString(spatial.Path)

	// Types
	destination.Types = genruntime.CloneSliceOfString(spatial.Types)

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

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

	// No error
	return nil
}

// Storage version of v1api20210515.SpatialSpec_STATUS
type SpatialSpec_STATUS struct {
	Path        *string                `json:"path,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Types       []string               `json:"types,omitempty"`
}

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

	// Path
	spatial.Path = genruntime.ClonePointerToString(source.Path)

	// Types
	spatial.Types = genruntime.CloneSliceOfString(source.Types)

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

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

	// No error
	return nil
}

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

	// Path
	destination.Path = genruntime.ClonePointerToString(spatial.Path)

	// Types
	destination.Types = genruntime.CloneSliceOfString(spatial.Types)

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

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

	// No error
	return nil
}

// Storage version of v1api20210515.UniqueKey
// The unique key on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service.
type UniqueKey struct {
	Paths       []string               `json:"paths,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

	// Paths
	uniqueKey.Paths = genruntime.CloneSliceOfString(source.Paths)

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

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

	// No error
	return nil
}

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

	// Paths
	destination.Paths = genruntime.CloneSliceOfString(uniqueKey.Paths)

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

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

	// No error
	return nil
}

// Storage version of v1api20210515.UniqueKey_STATUS
// The unique key on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service.
type UniqueKey_STATUS struct {
	Paths       []string               `json:"paths,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

	// Paths
	uniqueKey.Paths = genruntime.CloneSliceOfString(source.Paths)

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

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

	// No error
	return nil
}

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

	// Paths
	destination.Paths = genruntime.CloneSliceOfString(uniqueKey.Paths)

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

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

	// No error
	return nil
}

type augmentConversionForCompositePath interface {
	AssignPropertiesFrom(src *storage.CompositePath) error
	AssignPropertiesTo(dst *storage.CompositePath) error
}

type augmentConversionForCompositePath_STATUS interface {
	AssignPropertiesFrom(src *storage.CompositePath_STATUS) error
	AssignPropertiesTo(dst *storage.CompositePath_STATUS) error
}

type augmentConversionForExcludedPath interface {
	AssignPropertiesFrom(src *storage.ExcludedPath) error
	AssignPropertiesTo(dst *storage.ExcludedPath) error
}

type augmentConversionForExcludedPath_STATUS interface {
	AssignPropertiesFrom(src *storage.ExcludedPath_STATUS) error
	AssignPropertiesTo(dst *storage.ExcludedPath_STATUS) error
}

type augmentConversionForIncludedPath interface {
	AssignPropertiesFrom(src *storage.IncludedPath) error
	AssignPropertiesTo(dst *storage.IncludedPath) error
}

type augmentConversionForIncludedPath_STATUS interface {
	AssignPropertiesFrom(src *storage.IncludedPath_STATUS) error
	AssignPropertiesTo(dst *storage.IncludedPath_STATUS) error
}

type augmentConversionForSpatialSpec interface {
	AssignPropertiesFrom(src *storage.SpatialSpec) error
	AssignPropertiesTo(dst *storage.SpatialSpec) error
}

type augmentConversionForSpatialSpec_STATUS interface {
	AssignPropertiesFrom(src *storage.SpatialSpec_STATUS) error
	AssignPropertiesTo(dst *storage.SpatialSpec_STATUS) error
}

type augmentConversionForUniqueKey interface {
	AssignPropertiesFrom(src *storage.UniqueKey) error
	AssignPropertiesTo(dst *storage.UniqueKey) error
}

type augmentConversionForUniqueKey_STATUS interface {
	AssignPropertiesFrom(src *storage.UniqueKey_STATUS) error
	AssignPropertiesTo(dst *storage.UniqueKey_STATUS) error
}

// Storage version of v1api20210515.Indexes
// The indexes for the path.
type Indexes struct {
	DataType    *string                `json:"dataType,omitempty"`
	Kind        *string                `json:"kind,omitempty"`
	Precision   *int                   `json:"precision,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

	// DataType
	indexes.DataType = genruntime.ClonePointerToString(source.DataType)

	// Kind
	indexes.Kind = genruntime.ClonePointerToString(source.Kind)

	// Precision
	indexes.Precision = genruntime.ClonePointerToInt(source.Precision)

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

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

	// No error
	return nil
}

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

	// DataType
	destination.DataType = genruntime.ClonePointerToString(indexes.DataType)

	// Kind
	destination.Kind = genruntime.ClonePointerToString(indexes.Kind)

	// Precision
	destination.Precision = genruntime.ClonePointerToInt(indexes.Precision)

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

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

	// No error
	return nil
}

// Storage version of v1api20210515.Indexes_STATUS
// The indexes for the path.
type Indexes_STATUS struct {
	DataType    *string                `json:"dataType,omitempty"`
	Kind        *string                `json:"kind,omitempty"`
	Precision   *int                   `json:"precision,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

	// DataType
	indexes.DataType = genruntime.ClonePointerToString(source.DataType)

	// Kind
	indexes.Kind = genruntime.ClonePointerToString(source.Kind)

	// Precision
	indexes.Precision = genruntime.ClonePointerToInt(source.Precision)

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

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

	// No error
	return nil
}

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

	// DataType
	destination.DataType = genruntime.ClonePointerToString(indexes.DataType)

	// Kind
	destination.Kind = genruntime.ClonePointerToString(indexes.Kind)

	// Precision
	destination.Precision = genruntime.ClonePointerToInt(indexes.Precision)

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

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

	// No error
	return nil
}

type augmentConversionForIndexes interface {
	AssignPropertiesFrom(src *storage.Indexes) error
	AssignPropertiesTo(dst *storage.Indexes) error
}

type augmentConversionForIndexes_STATUS interface {
	AssignPropertiesFrom(src *storage.Indexes_STATUS) error
	AssignPropertiesTo(dst *storage.Indexes_STATUS) error
}

func init() {
	SchemeBuilder.Register(&SqlDatabaseContainer{}, &SqlDatabaseContainerList{})
}
