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

import (
	"fmt"
	storage "github.com/Azure/azure-service-operator/v2/api/network/v1api20240301/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,network}
// +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 v1api20220701.PrivateEndpoint
// Generator information:
// - Generated from: /network/resource-manager/Microsoft.Network/stable/2022-07-01/privateEndpoint.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}
type PrivateEndpoint struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              PrivateEndpoint_Spec   `json:"spec,omitempty"`
	Status            PrivateEndpoint_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &PrivateEndpoint{}

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

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

var _ conversion.Convertible = &PrivateEndpoint{}

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

	return endpoint.AssignProperties_From_PrivateEndpoint(source)
}

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

	return endpoint.AssignProperties_To_PrivateEndpoint(destination)
}

var _ configmaps.Exporter = &PrivateEndpoint{}

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

var _ secrets.Exporter = &PrivateEndpoint{}

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

var _ genruntime.KubernetesResource = &PrivateEndpoint{}

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

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

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

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

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.Network/privateEndpoints"
func (endpoint *PrivateEndpoint) GetType() string {
	return "Microsoft.Network/privateEndpoints"
}

// NewEmptyStatus returns a new empty (blank) status
func (endpoint *PrivateEndpoint) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &PrivateEndpoint_STATUS{}
}

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

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

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

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

	endpoint.Status = st
	return nil
}

// AssignProperties_From_PrivateEndpoint populates our PrivateEndpoint from the provided source PrivateEndpoint
func (endpoint *PrivateEndpoint) AssignProperties_From_PrivateEndpoint(source *storage.PrivateEndpoint) error {

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

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

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

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

	// No error
	return nil
}

// AssignProperties_To_PrivateEndpoint populates the provided destination PrivateEndpoint from our PrivateEndpoint
func (endpoint *PrivateEndpoint) AssignProperties_To_PrivateEndpoint(destination *storage.PrivateEndpoint) error {

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

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

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

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

// +kubebuilder:object:root=true
// Storage version of v1api20220701.PrivateEndpoint
// Generator information:
// - Generated from: /network/resource-manager/Microsoft.Network/stable/2022-07-01/privateEndpoint.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}
type PrivateEndpointList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PrivateEndpoint `json:"items"`
}

type augmentConversionForPrivateEndpoint interface {
	AssignPropertiesFrom(src *storage.PrivateEndpoint) error
	AssignPropertiesTo(dst *storage.PrivateEndpoint) error
}

// Storage version of v1api20220701.PrivateEndpoint_Spec
type PrivateEndpoint_Spec struct {
	ApplicationSecurityGroups []ApplicationSecurityGroupSpec_PrivateEndpoint_SubResourceEmbedded `json:"applicationSecurityGroups,omitempty"`

	// AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it
	// doesn't have to be.
	AzureName                           string                           `json:"azureName,omitempty"`
	CustomNetworkInterfaceName          *string                          `json:"customNetworkInterfaceName,omitempty"`
	ExtendedLocation                    *ExtendedLocation                `json:"extendedLocation,omitempty"`
	IpConfigurations                    []PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"`
	Location                            *string                          `json:"location,omitempty"`
	ManualPrivateLinkServiceConnections []PrivateLinkServiceConnection   `json:"manualPrivateLinkServiceConnections,omitempty"`
	OperatorSpec                        *PrivateEndpointOperatorSpec     `json:"operatorSpec,omitempty"`
	OriginalVersion                     string                           `json:"originalVersion,omitempty"`

	// +kubebuilder:validation:Required
	// Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also
	// controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a
	// reference to a resources.azure.com/ResourceGroup resource
	Owner                         *genruntime.KnownResourceReference          `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"`
	PrivateLinkServiceConnections []PrivateLinkServiceConnection              `json:"privateLinkServiceConnections,omitempty"`
	PropertyBag                   genruntime.PropertyBag                      `json:"$propertyBag,omitempty"`
	Subnet                        *Subnet_PrivateEndpoint_SubResourceEmbedded `json:"subnet,omitempty"`
	Tags                          map[string]string                           `json:"tags,omitempty"`
}

var _ genruntime.ConvertibleSpec = &PrivateEndpoint_Spec{}

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

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

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

	return nil
}

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

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

	// ApplicationSecurityGroups
	if source.ApplicationSecurityGroups != nil {
		applicationSecurityGroupList := make([]ApplicationSecurityGroupSpec_PrivateEndpoint_SubResourceEmbedded, len(source.ApplicationSecurityGroups))
		for applicationSecurityGroupIndex, applicationSecurityGroupItem := range source.ApplicationSecurityGroups {
			var applicationSecurityGroup ApplicationSecurityGroupSpec_PrivateEndpoint_SubResourceEmbedded
			err := applicationSecurityGroup.AssignProperties_From_ApplicationSecurityGroupSpec_PrivateEndpoint_SubResourceEmbedded(&applicationSecurityGroupItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ApplicationSecurityGroupSpec_PrivateEndpoint_SubResourceEmbedded() to populate field ApplicationSecurityGroups")
			}
			applicationSecurityGroupList[applicationSecurityGroupIndex] = applicationSecurityGroup
		}
		endpoint.ApplicationSecurityGroups = applicationSecurityGroupList
	} else {
		endpoint.ApplicationSecurityGroups = nil
	}

	// AzureName
	endpoint.AzureName = source.AzureName

	// CustomNetworkInterfaceName
	endpoint.CustomNetworkInterfaceName = genruntime.ClonePointerToString(source.CustomNetworkInterfaceName)

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

	// IpConfigurations
	if source.IpConfigurations != nil {
		ipConfigurationList := make([]PrivateEndpointIPConfiguration, len(source.IpConfigurations))
		for ipConfigurationIndex, ipConfigurationItem := range source.IpConfigurations {
			var ipConfiguration PrivateEndpointIPConfiguration
			err := ipConfiguration.AssignProperties_From_PrivateEndpointIPConfiguration(&ipConfigurationItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_PrivateEndpointIPConfiguration() to populate field IpConfigurations")
			}
			ipConfigurationList[ipConfigurationIndex] = ipConfiguration
		}
		endpoint.IpConfigurations = ipConfigurationList
	} else {
		endpoint.IpConfigurations = nil
	}

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

	// ManualPrivateLinkServiceConnections
	if source.ManualPrivateLinkServiceConnections != nil {
		manualPrivateLinkServiceConnectionList := make([]PrivateLinkServiceConnection, len(source.ManualPrivateLinkServiceConnections))
		for manualPrivateLinkServiceConnectionIndex, manualPrivateLinkServiceConnectionItem := range source.ManualPrivateLinkServiceConnections {
			var manualPrivateLinkServiceConnection PrivateLinkServiceConnection
			err := manualPrivateLinkServiceConnection.AssignProperties_From_PrivateLinkServiceConnection(&manualPrivateLinkServiceConnectionItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_PrivateLinkServiceConnection() to populate field ManualPrivateLinkServiceConnections")
			}
			manualPrivateLinkServiceConnectionList[manualPrivateLinkServiceConnectionIndex] = manualPrivateLinkServiceConnection
		}
		endpoint.ManualPrivateLinkServiceConnections = manualPrivateLinkServiceConnectionList
	} else {
		endpoint.ManualPrivateLinkServiceConnections = nil
	}

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

	// OriginalVersion
	endpoint.OriginalVersion = source.OriginalVersion

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

	// PrivateLinkServiceConnections
	if source.PrivateLinkServiceConnections != nil {
		privateLinkServiceConnectionList := make([]PrivateLinkServiceConnection, len(source.PrivateLinkServiceConnections))
		for privateLinkServiceConnectionIndex, privateLinkServiceConnectionItem := range source.PrivateLinkServiceConnections {
			var privateLinkServiceConnection PrivateLinkServiceConnection
			err := privateLinkServiceConnection.AssignProperties_From_PrivateLinkServiceConnection(&privateLinkServiceConnectionItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_PrivateLinkServiceConnection() to populate field PrivateLinkServiceConnections")
			}
			privateLinkServiceConnectionList[privateLinkServiceConnectionIndex] = privateLinkServiceConnection
		}
		endpoint.PrivateLinkServiceConnections = privateLinkServiceConnectionList
	} else {
		endpoint.PrivateLinkServiceConnections = nil
	}

	// Subnet
	if source.Subnet != nil {
		var subnet Subnet_PrivateEndpoint_SubResourceEmbedded
		err := subnet.AssignProperties_From_Subnet_PrivateEndpoint_SubResourceEmbedded(source.Subnet)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_Subnet_PrivateEndpoint_SubResourceEmbedded() to populate field Subnet")
		}
		endpoint.Subnet = &subnet
	} else {
		endpoint.Subnet = nil
	}

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

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

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

	// No error
	return nil
}

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

	// ApplicationSecurityGroups
	if endpoint.ApplicationSecurityGroups != nil {
		applicationSecurityGroupList := make([]storage.ApplicationSecurityGroupSpec_PrivateEndpoint_SubResourceEmbedded, len(endpoint.ApplicationSecurityGroups))
		for applicationSecurityGroupIndex, applicationSecurityGroupItem := range endpoint.ApplicationSecurityGroups {
			var applicationSecurityGroup storage.ApplicationSecurityGroupSpec_PrivateEndpoint_SubResourceEmbedded
			err := applicationSecurityGroupItem.AssignProperties_To_ApplicationSecurityGroupSpec_PrivateEndpoint_SubResourceEmbedded(&applicationSecurityGroup)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ApplicationSecurityGroupSpec_PrivateEndpoint_SubResourceEmbedded() to populate field ApplicationSecurityGroups")
			}
			applicationSecurityGroupList[applicationSecurityGroupIndex] = applicationSecurityGroup
		}
		destination.ApplicationSecurityGroups = applicationSecurityGroupList
	} else {
		destination.ApplicationSecurityGroups = nil
	}

	// AzureName
	destination.AzureName = endpoint.AzureName

	// CustomNetworkInterfaceName
	destination.CustomNetworkInterfaceName = genruntime.ClonePointerToString(endpoint.CustomNetworkInterfaceName)

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

	// IpConfigurations
	if endpoint.IpConfigurations != nil {
		ipConfigurationList := make([]storage.PrivateEndpointIPConfiguration, len(endpoint.IpConfigurations))
		for ipConfigurationIndex, ipConfigurationItem := range endpoint.IpConfigurations {
			var ipConfiguration storage.PrivateEndpointIPConfiguration
			err := ipConfigurationItem.AssignProperties_To_PrivateEndpointIPConfiguration(&ipConfiguration)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_PrivateEndpointIPConfiguration() to populate field IpConfigurations")
			}
			ipConfigurationList[ipConfigurationIndex] = ipConfiguration
		}
		destination.IpConfigurations = ipConfigurationList
	} else {
		destination.IpConfigurations = nil
	}

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

	// ManualPrivateLinkServiceConnections
	if endpoint.ManualPrivateLinkServiceConnections != nil {
		manualPrivateLinkServiceConnectionList := make([]storage.PrivateLinkServiceConnection, len(endpoint.ManualPrivateLinkServiceConnections))
		for manualPrivateLinkServiceConnectionIndex, manualPrivateLinkServiceConnectionItem := range endpoint.ManualPrivateLinkServiceConnections {
			var manualPrivateLinkServiceConnection storage.PrivateLinkServiceConnection
			err := manualPrivateLinkServiceConnectionItem.AssignProperties_To_PrivateLinkServiceConnection(&manualPrivateLinkServiceConnection)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_PrivateLinkServiceConnection() to populate field ManualPrivateLinkServiceConnections")
			}
			manualPrivateLinkServiceConnectionList[manualPrivateLinkServiceConnectionIndex] = manualPrivateLinkServiceConnection
		}
		destination.ManualPrivateLinkServiceConnections = manualPrivateLinkServiceConnectionList
	} else {
		destination.ManualPrivateLinkServiceConnections = nil
	}

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

	// OriginalVersion
	destination.OriginalVersion = endpoint.OriginalVersion

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

	// PrivateLinkServiceConnections
	if endpoint.PrivateLinkServiceConnections != nil {
		privateLinkServiceConnectionList := make([]storage.PrivateLinkServiceConnection, len(endpoint.PrivateLinkServiceConnections))
		for privateLinkServiceConnectionIndex, privateLinkServiceConnectionItem := range endpoint.PrivateLinkServiceConnections {
			var privateLinkServiceConnection storage.PrivateLinkServiceConnection
			err := privateLinkServiceConnectionItem.AssignProperties_To_PrivateLinkServiceConnection(&privateLinkServiceConnection)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_PrivateLinkServiceConnection() to populate field PrivateLinkServiceConnections")
			}
			privateLinkServiceConnectionList[privateLinkServiceConnectionIndex] = privateLinkServiceConnection
		}
		destination.PrivateLinkServiceConnections = privateLinkServiceConnectionList
	} else {
		destination.PrivateLinkServiceConnections = nil
	}

	// Subnet
	if endpoint.Subnet != nil {
		var subnet storage.Subnet_PrivateEndpoint_SubResourceEmbedded
		err := endpoint.Subnet.AssignProperties_To_Subnet_PrivateEndpoint_SubResourceEmbedded(&subnet)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_Subnet_PrivateEndpoint_SubResourceEmbedded() to populate field Subnet")
		}
		destination.Subnet = &subnet
	} else {
		destination.Subnet = nil
	}

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

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

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

	// No error
	return nil
}

// Storage version of v1api20220701.PrivateEndpoint_STATUS
// Private endpoint resource.
type PrivateEndpoint_STATUS struct {
	ApplicationSecurityGroups           []ApplicationSecurityGroup_STATUS_PrivateEndpoint_SubResourceEmbedded `json:"applicationSecurityGroups,omitempty"`
	Conditions                          []conditions.Condition                                                `json:"conditions,omitempty"`
	CustomDnsConfigs                    []CustomDnsConfigPropertiesFormat_STATUS                              `json:"customDnsConfigs,omitempty"`
	CustomNetworkInterfaceName          *string                                                               `json:"customNetworkInterfaceName,omitempty"`
	Etag                                *string                                                               `json:"etag,omitempty"`
	ExtendedLocation                    *ExtendedLocation_STATUS                                              `json:"extendedLocation,omitempty"`
	Id                                  *string                                                               `json:"id,omitempty"`
	IpConfigurations                    []PrivateEndpointIPConfiguration_STATUS                               `json:"ipConfigurations,omitempty"`
	Location                            *string                                                               `json:"location,omitempty"`
	ManualPrivateLinkServiceConnections []PrivateLinkServiceConnection_STATUS                                 `json:"manualPrivateLinkServiceConnections,omitempty"`
	Name                                *string                                                               `json:"name,omitempty"`
	NetworkInterfaces                   []NetworkInterface_STATUS_PrivateEndpoint_SubResourceEmbedded         `json:"networkInterfaces,omitempty"`
	PrivateLinkServiceConnections       []PrivateLinkServiceConnection_STATUS                                 `json:"privateLinkServiceConnections,omitempty"`
	PropertyBag                         genruntime.PropertyBag                                                `json:"$propertyBag,omitempty"`
	ProvisioningState                   *string                                                               `json:"provisioningState,omitempty"`
	Subnet                              *Subnet_STATUS_PrivateEndpoint_SubResourceEmbedded                    `json:"subnet,omitempty"`
	Tags                                map[string]string                                                     `json:"tags,omitempty"`
	Type                                *string                                                               `json:"type,omitempty"`
}

var _ genruntime.ConvertibleStatus = &PrivateEndpoint_STATUS{}

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

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

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

	return nil
}

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

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

	// ApplicationSecurityGroups
	if source.ApplicationSecurityGroups != nil {
		applicationSecurityGroupList := make([]ApplicationSecurityGroup_STATUS_PrivateEndpoint_SubResourceEmbedded, len(source.ApplicationSecurityGroups))
		for applicationSecurityGroupIndex, applicationSecurityGroupItem := range source.ApplicationSecurityGroups {
			var applicationSecurityGroup ApplicationSecurityGroup_STATUS_PrivateEndpoint_SubResourceEmbedded
			err := applicationSecurityGroup.AssignProperties_From_ApplicationSecurityGroup_STATUS_PrivateEndpoint_SubResourceEmbedded(&applicationSecurityGroupItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ApplicationSecurityGroup_STATUS_PrivateEndpoint_SubResourceEmbedded() to populate field ApplicationSecurityGroups")
			}
			applicationSecurityGroupList[applicationSecurityGroupIndex] = applicationSecurityGroup
		}
		endpoint.ApplicationSecurityGroups = applicationSecurityGroupList
	} else {
		endpoint.ApplicationSecurityGroups = nil
	}

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

	// CustomDnsConfigs
	if source.CustomDnsConfigs != nil {
		customDnsConfigList := make([]CustomDnsConfigPropertiesFormat_STATUS, len(source.CustomDnsConfigs))
		for customDnsConfigIndex, customDnsConfigItem := range source.CustomDnsConfigs {
			var customDnsConfig CustomDnsConfigPropertiesFormat_STATUS
			err := customDnsConfig.AssignProperties_From_CustomDnsConfigPropertiesFormat_STATUS(&customDnsConfigItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_CustomDnsConfigPropertiesFormat_STATUS() to populate field CustomDnsConfigs")
			}
			customDnsConfigList[customDnsConfigIndex] = customDnsConfig
		}
		endpoint.CustomDnsConfigs = customDnsConfigList
	} else {
		endpoint.CustomDnsConfigs = nil
	}

	// CustomNetworkInterfaceName
	endpoint.CustomNetworkInterfaceName = genruntime.ClonePointerToString(source.CustomNetworkInterfaceName)

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

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

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

	// IpConfigurations
	if source.IpConfigurations != nil {
		ipConfigurationList := make([]PrivateEndpointIPConfiguration_STATUS, len(source.IpConfigurations))
		for ipConfigurationIndex, ipConfigurationItem := range source.IpConfigurations {
			var ipConfiguration PrivateEndpointIPConfiguration_STATUS
			err := ipConfiguration.AssignProperties_From_PrivateEndpointIPConfiguration_STATUS(&ipConfigurationItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_PrivateEndpointIPConfiguration_STATUS() to populate field IpConfigurations")
			}
			ipConfigurationList[ipConfigurationIndex] = ipConfiguration
		}
		endpoint.IpConfigurations = ipConfigurationList
	} else {
		endpoint.IpConfigurations = nil
	}

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

	// ManualPrivateLinkServiceConnections
	if source.ManualPrivateLinkServiceConnections != nil {
		manualPrivateLinkServiceConnectionList := make([]PrivateLinkServiceConnection_STATUS, len(source.ManualPrivateLinkServiceConnections))
		for manualPrivateLinkServiceConnectionIndex, manualPrivateLinkServiceConnectionItem := range source.ManualPrivateLinkServiceConnections {
			var manualPrivateLinkServiceConnection PrivateLinkServiceConnection_STATUS
			err := manualPrivateLinkServiceConnection.AssignProperties_From_PrivateLinkServiceConnection_STATUS(&manualPrivateLinkServiceConnectionItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_PrivateLinkServiceConnection_STATUS() to populate field ManualPrivateLinkServiceConnections")
			}
			manualPrivateLinkServiceConnectionList[manualPrivateLinkServiceConnectionIndex] = manualPrivateLinkServiceConnection
		}
		endpoint.ManualPrivateLinkServiceConnections = manualPrivateLinkServiceConnectionList
	} else {
		endpoint.ManualPrivateLinkServiceConnections = nil
	}

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

	// NetworkInterfaces
	if source.NetworkInterfaces != nil {
		networkInterfaceList := make([]NetworkInterface_STATUS_PrivateEndpoint_SubResourceEmbedded, len(source.NetworkInterfaces))
		for networkInterfaceIndex, networkInterfaceItem := range source.NetworkInterfaces {
			var networkInterface NetworkInterface_STATUS_PrivateEndpoint_SubResourceEmbedded
			err := networkInterface.AssignProperties_From_NetworkInterface_STATUS_PrivateEndpoint_SubResourceEmbedded(&networkInterfaceItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_NetworkInterface_STATUS_PrivateEndpoint_SubResourceEmbedded() to populate field NetworkInterfaces")
			}
			networkInterfaceList[networkInterfaceIndex] = networkInterface
		}
		endpoint.NetworkInterfaces = networkInterfaceList
	} else {
		endpoint.NetworkInterfaces = nil
	}

	// PrivateLinkServiceConnections
	if source.PrivateLinkServiceConnections != nil {
		privateLinkServiceConnectionList := make([]PrivateLinkServiceConnection_STATUS, len(source.PrivateLinkServiceConnections))
		for privateLinkServiceConnectionIndex, privateLinkServiceConnectionItem := range source.PrivateLinkServiceConnections {
			var privateLinkServiceConnection PrivateLinkServiceConnection_STATUS
			err := privateLinkServiceConnection.AssignProperties_From_PrivateLinkServiceConnection_STATUS(&privateLinkServiceConnectionItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_PrivateLinkServiceConnection_STATUS() to populate field PrivateLinkServiceConnections")
			}
			privateLinkServiceConnectionList[privateLinkServiceConnectionIndex] = privateLinkServiceConnection
		}
		endpoint.PrivateLinkServiceConnections = privateLinkServiceConnectionList
	} else {
		endpoint.PrivateLinkServiceConnections = nil
	}

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

	// Subnet
	if source.Subnet != nil {
		var subnet Subnet_STATUS_PrivateEndpoint_SubResourceEmbedded
		err := subnet.AssignProperties_From_Subnet_STATUS_PrivateEndpoint_SubResourceEmbedded(source.Subnet)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_Subnet_STATUS_PrivateEndpoint_SubResourceEmbedded() to populate field Subnet")
		}
		endpoint.Subnet = &subnet
	} else {
		endpoint.Subnet = nil
	}

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

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

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

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

	// No error
	return nil
}

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

	// ApplicationSecurityGroups
	if endpoint.ApplicationSecurityGroups != nil {
		applicationSecurityGroupList := make([]storage.ApplicationSecurityGroup_STATUS_PrivateEndpoint_SubResourceEmbedded, len(endpoint.ApplicationSecurityGroups))
		for applicationSecurityGroupIndex, applicationSecurityGroupItem := range endpoint.ApplicationSecurityGroups {
			var applicationSecurityGroup storage.ApplicationSecurityGroup_STATUS_PrivateEndpoint_SubResourceEmbedded
			err := applicationSecurityGroupItem.AssignProperties_To_ApplicationSecurityGroup_STATUS_PrivateEndpoint_SubResourceEmbedded(&applicationSecurityGroup)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ApplicationSecurityGroup_STATUS_PrivateEndpoint_SubResourceEmbedded() to populate field ApplicationSecurityGroups")
			}
			applicationSecurityGroupList[applicationSecurityGroupIndex] = applicationSecurityGroup
		}
		destination.ApplicationSecurityGroups = applicationSecurityGroupList
	} else {
		destination.ApplicationSecurityGroups = nil
	}

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

	// CustomDnsConfigs
	if endpoint.CustomDnsConfigs != nil {
		customDnsConfigList := make([]storage.CustomDnsConfigPropertiesFormat_STATUS, len(endpoint.CustomDnsConfigs))
		for customDnsConfigIndex, customDnsConfigItem := range endpoint.CustomDnsConfigs {
			var customDnsConfig storage.CustomDnsConfigPropertiesFormat_STATUS
			err := customDnsConfigItem.AssignProperties_To_CustomDnsConfigPropertiesFormat_STATUS(&customDnsConfig)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_CustomDnsConfigPropertiesFormat_STATUS() to populate field CustomDnsConfigs")
			}
			customDnsConfigList[customDnsConfigIndex] = customDnsConfig
		}
		destination.CustomDnsConfigs = customDnsConfigList
	} else {
		destination.CustomDnsConfigs = nil
	}

	// CustomNetworkInterfaceName
	destination.CustomNetworkInterfaceName = genruntime.ClonePointerToString(endpoint.CustomNetworkInterfaceName)

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

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

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

	// IpConfigurations
	if endpoint.IpConfigurations != nil {
		ipConfigurationList := make([]storage.PrivateEndpointIPConfiguration_STATUS, len(endpoint.IpConfigurations))
		for ipConfigurationIndex, ipConfigurationItem := range endpoint.IpConfigurations {
			var ipConfiguration storage.PrivateEndpointIPConfiguration_STATUS
			err := ipConfigurationItem.AssignProperties_To_PrivateEndpointIPConfiguration_STATUS(&ipConfiguration)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_PrivateEndpointIPConfiguration_STATUS() to populate field IpConfigurations")
			}
			ipConfigurationList[ipConfigurationIndex] = ipConfiguration
		}
		destination.IpConfigurations = ipConfigurationList
	} else {
		destination.IpConfigurations = nil
	}

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

	// ManualPrivateLinkServiceConnections
	if endpoint.ManualPrivateLinkServiceConnections != nil {
		manualPrivateLinkServiceConnectionList := make([]storage.PrivateLinkServiceConnection_STATUS, len(endpoint.ManualPrivateLinkServiceConnections))
		for manualPrivateLinkServiceConnectionIndex, manualPrivateLinkServiceConnectionItem := range endpoint.ManualPrivateLinkServiceConnections {
			var manualPrivateLinkServiceConnection storage.PrivateLinkServiceConnection_STATUS
			err := manualPrivateLinkServiceConnectionItem.AssignProperties_To_PrivateLinkServiceConnection_STATUS(&manualPrivateLinkServiceConnection)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_PrivateLinkServiceConnection_STATUS() to populate field ManualPrivateLinkServiceConnections")
			}
			manualPrivateLinkServiceConnectionList[manualPrivateLinkServiceConnectionIndex] = manualPrivateLinkServiceConnection
		}
		destination.ManualPrivateLinkServiceConnections = manualPrivateLinkServiceConnectionList
	} else {
		destination.ManualPrivateLinkServiceConnections = nil
	}

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

	// NetworkInterfaces
	if endpoint.NetworkInterfaces != nil {
		networkInterfaceList := make([]storage.NetworkInterface_STATUS_PrivateEndpoint_SubResourceEmbedded, len(endpoint.NetworkInterfaces))
		for networkInterfaceIndex, networkInterfaceItem := range endpoint.NetworkInterfaces {
			var networkInterface storage.NetworkInterface_STATUS_PrivateEndpoint_SubResourceEmbedded
			err := networkInterfaceItem.AssignProperties_To_NetworkInterface_STATUS_PrivateEndpoint_SubResourceEmbedded(&networkInterface)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_NetworkInterface_STATUS_PrivateEndpoint_SubResourceEmbedded() to populate field NetworkInterfaces")
			}
			networkInterfaceList[networkInterfaceIndex] = networkInterface
		}
		destination.NetworkInterfaces = networkInterfaceList
	} else {
		destination.NetworkInterfaces = nil
	}

	// PrivateLinkServiceConnections
	if endpoint.PrivateLinkServiceConnections != nil {
		privateLinkServiceConnectionList := make([]storage.PrivateLinkServiceConnection_STATUS, len(endpoint.PrivateLinkServiceConnections))
		for privateLinkServiceConnectionIndex, privateLinkServiceConnectionItem := range endpoint.PrivateLinkServiceConnections {
			var privateLinkServiceConnection storage.PrivateLinkServiceConnection_STATUS
			err := privateLinkServiceConnectionItem.AssignProperties_To_PrivateLinkServiceConnection_STATUS(&privateLinkServiceConnection)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_PrivateLinkServiceConnection_STATUS() to populate field PrivateLinkServiceConnections")
			}
			privateLinkServiceConnectionList[privateLinkServiceConnectionIndex] = privateLinkServiceConnection
		}
		destination.PrivateLinkServiceConnections = privateLinkServiceConnectionList
	} else {
		destination.PrivateLinkServiceConnections = nil
	}

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

	// Subnet
	if endpoint.Subnet != nil {
		var subnet storage.Subnet_STATUS_PrivateEndpoint_SubResourceEmbedded
		err := endpoint.Subnet.AssignProperties_To_Subnet_STATUS_PrivateEndpoint_SubResourceEmbedded(&subnet)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_Subnet_STATUS_PrivateEndpoint_SubResourceEmbedded() to populate field Subnet")
		}
		destination.Subnet = &subnet
	} else {
		destination.Subnet = nil
	}

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

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

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

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

	// No error
	return nil
}

// Storage version of v1api20220701.ApplicationSecurityGroup_STATUS_PrivateEndpoint_SubResourceEmbedded
// An application security group in a resource group.
type ApplicationSecurityGroup_STATUS_PrivateEndpoint_SubResourceEmbedded struct {
	Id          *string                `json:"id,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

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

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

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

	// No error
	return nil
}

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

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

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

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

	// No error
	return nil
}

// Storage version of v1api20220701.ApplicationSecurityGroupSpec_PrivateEndpoint_SubResourceEmbedded
// An application security group in a resource group.
type ApplicationSecurityGroupSpec_PrivateEndpoint_SubResourceEmbedded struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`

	// Reference: Resource ID.
	Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"`
}

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

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

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

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

	// No error
	return nil
}

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

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

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

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

	// No error
	return nil
}

type augmentConversionForPrivateEndpoint_Spec interface {
	AssignPropertiesFrom(src *storage.PrivateEndpoint_Spec) error
	AssignPropertiesTo(dst *storage.PrivateEndpoint_Spec) error
}

type augmentConversionForPrivateEndpoint_STATUS interface {
	AssignPropertiesFrom(src *storage.PrivateEndpoint_STATUS) error
	AssignPropertiesTo(dst *storage.PrivateEndpoint_STATUS) error
}

// Storage version of v1api20220701.CustomDnsConfigPropertiesFormat_STATUS
// Contains custom Dns resolution configuration from customer.
type CustomDnsConfigPropertiesFormat_STATUS struct {
	Fqdn        *string                `json:"fqdn,omitempty"`
	IpAddresses []string               `json:"ipAddresses,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

	// Fqdn
	format.Fqdn = genruntime.ClonePointerToString(source.Fqdn)

	// IpAddresses
	format.IpAddresses = genruntime.CloneSliceOfString(source.IpAddresses)

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

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

	// No error
	return nil
}

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

	// Fqdn
	destination.Fqdn = genruntime.ClonePointerToString(format.Fqdn)

	// IpAddresses
	destination.IpAddresses = genruntime.CloneSliceOfString(format.IpAddresses)

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

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

	// No error
	return nil
}

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

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

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

	// No error
	return nil
}

// Storage version of v1api20220701.ExtendedLocation_STATUS
// ExtendedLocation complex type.
type ExtendedLocation_STATUS struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Type        *string                `json:"type,omitempty"`
}

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

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

	// No error
	return nil
}

// Storage version of v1api20220701.NetworkInterface_STATUS_PrivateEndpoint_SubResourceEmbedded
// A network interface in a resource group.
type NetworkInterface_STATUS_PrivateEndpoint_SubResourceEmbedded struct {
	Id          *string                `json:"id,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

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

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

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

	// No error
	return nil
}

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

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

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

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

	// No error
	return nil
}

// Storage version of v1api20220701.PrivateEndpointIPConfiguration
// An IP Configuration of the private endpoint.
type PrivateEndpointIPConfiguration struct {
	GroupId          *string                `json:"groupId,omitempty"`
	MemberName       *string                `json:"memberName,omitempty"`
	Name             *string                `json:"name,omitempty"`
	PrivateIPAddress *string                `json:"privateIPAddress,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

	// GroupId
	configuration.GroupId = genruntime.ClonePointerToString(source.GroupId)

	// MemberName
	configuration.MemberName = genruntime.ClonePointerToString(source.MemberName)

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

	// PrivateIPAddress
	configuration.PrivateIPAddress = genruntime.ClonePointerToString(source.PrivateIPAddress)

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

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

	// No error
	return nil
}

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

	// GroupId
	destination.GroupId = genruntime.ClonePointerToString(configuration.GroupId)

	// MemberName
	destination.MemberName = genruntime.ClonePointerToString(configuration.MemberName)

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

	// PrivateIPAddress
	destination.PrivateIPAddress = genruntime.ClonePointerToString(configuration.PrivateIPAddress)

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

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

	// No error
	return nil
}

// Storage version of v1api20220701.PrivateEndpointIPConfiguration_STATUS
// An IP Configuration of the private endpoint.
type PrivateEndpointIPConfiguration_STATUS struct {
	Etag             *string                `json:"etag,omitempty"`
	GroupId          *string                `json:"groupId,omitempty"`
	MemberName       *string                `json:"memberName,omitempty"`
	Name             *string                `json:"name,omitempty"`
	PrivateIPAddress *string                `json:"privateIPAddress,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Type             *string                `json:"type,omitempty"`
}

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

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

	// GroupId
	configuration.GroupId = genruntime.ClonePointerToString(source.GroupId)

	// MemberName
	configuration.MemberName = genruntime.ClonePointerToString(source.MemberName)

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

	// PrivateIPAddress
	configuration.PrivateIPAddress = genruntime.ClonePointerToString(source.PrivateIPAddress)

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

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

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

	// No error
	return nil
}

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

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

	// GroupId
	destination.GroupId = genruntime.ClonePointerToString(configuration.GroupId)

	// MemberName
	destination.MemberName = genruntime.ClonePointerToString(configuration.MemberName)

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

	// PrivateIPAddress
	destination.PrivateIPAddress = genruntime.ClonePointerToString(configuration.PrivateIPAddress)

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

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

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

	// No error
	return nil
}

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

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

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

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

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

	// No error
	return nil
}

// Storage version of v1api20220701.PrivateLinkServiceConnection
// PrivateLinkServiceConnection resource.
type PrivateLinkServiceConnection struct {
	GroupIds                          []string                           `json:"groupIds,omitempty"`
	Name                              *string                            `json:"name,omitempty"`
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`

	// PrivateLinkServiceReference: The resource id of private link service.
	PrivateLinkServiceReference *genruntime.ResourceReference `armReference:"PrivateLinkServiceId" json:"privateLinkServiceReference,omitempty"`
	PropertyBag                 genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	RequestMessage              *string                       `json:"requestMessage,omitempty"`
}

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

	// GroupIds
	connection.GroupIds = genruntime.CloneSliceOfString(source.GroupIds)

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

	// PrivateLinkServiceConnectionState
	if source.PrivateLinkServiceConnectionState != nil {
		var privateLinkServiceConnectionState PrivateLinkServiceConnectionState
		err := privateLinkServiceConnectionState.AssignProperties_From_PrivateLinkServiceConnectionState(source.PrivateLinkServiceConnectionState)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_PrivateLinkServiceConnectionState() to populate field PrivateLinkServiceConnectionState")
		}
		connection.PrivateLinkServiceConnectionState = &privateLinkServiceConnectionState
	} else {
		connection.PrivateLinkServiceConnectionState = nil
	}

	// PrivateLinkServiceReference
	if source.PrivateLinkServiceReference != nil {
		privateLinkServiceReference := source.PrivateLinkServiceReference.Copy()
		connection.PrivateLinkServiceReference = &privateLinkServiceReference
	} else {
		connection.PrivateLinkServiceReference = nil
	}

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

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

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

	// No error
	return nil
}

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

	// GroupIds
	destination.GroupIds = genruntime.CloneSliceOfString(connection.GroupIds)

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

	// PrivateLinkServiceConnectionState
	if connection.PrivateLinkServiceConnectionState != nil {
		var privateLinkServiceConnectionState storage.PrivateLinkServiceConnectionState
		err := connection.PrivateLinkServiceConnectionState.AssignProperties_To_PrivateLinkServiceConnectionState(&privateLinkServiceConnectionState)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_PrivateLinkServiceConnectionState() to populate field PrivateLinkServiceConnectionState")
		}
		destination.PrivateLinkServiceConnectionState = &privateLinkServiceConnectionState
	} else {
		destination.PrivateLinkServiceConnectionState = nil
	}

	// PrivateLinkServiceReference
	if connection.PrivateLinkServiceReference != nil {
		privateLinkServiceReference := connection.PrivateLinkServiceReference.Copy()
		destination.PrivateLinkServiceReference = &privateLinkServiceReference
	} else {
		destination.PrivateLinkServiceReference = nil
	}

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

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

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

	// No error
	return nil
}

// Storage version of v1api20220701.PrivateLinkServiceConnection_STATUS
// PrivateLinkServiceConnection resource.
type PrivateLinkServiceConnection_STATUS struct {
	Etag                              *string                                   `json:"etag,omitempty"`
	GroupIds                          []string                                  `json:"groupIds,omitempty"`
	Id                                *string                                   `json:"id,omitempty"`
	Name                              *string                                   `json:"name,omitempty"`
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState_STATUS `json:"privateLinkServiceConnectionState,omitempty"`
	PrivateLinkServiceId              *string                                   `json:"privateLinkServiceId,omitempty"`
	PropertyBag                       genruntime.PropertyBag                    `json:"$propertyBag,omitempty"`
	ProvisioningState                 *string                                   `json:"provisioningState,omitempty"`
	RequestMessage                    *string                                   `json:"requestMessage,omitempty"`
	Type                              *string                                   `json:"type,omitempty"`
}

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

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

	// GroupIds
	connection.GroupIds = genruntime.CloneSliceOfString(source.GroupIds)

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

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

	// PrivateLinkServiceConnectionState
	if source.PrivateLinkServiceConnectionState != nil {
		var privateLinkServiceConnectionState PrivateLinkServiceConnectionState_STATUS
		err := privateLinkServiceConnectionState.AssignProperties_From_PrivateLinkServiceConnectionState_STATUS(source.PrivateLinkServiceConnectionState)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_PrivateLinkServiceConnectionState_STATUS() to populate field PrivateLinkServiceConnectionState")
		}
		connection.PrivateLinkServiceConnectionState = &privateLinkServiceConnectionState
	} else {
		connection.PrivateLinkServiceConnectionState = nil
	}

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

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

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

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

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

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

	// No error
	return nil
}

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

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

	// GroupIds
	destination.GroupIds = genruntime.CloneSliceOfString(connection.GroupIds)

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

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

	// PrivateLinkServiceConnectionState
	if connection.PrivateLinkServiceConnectionState != nil {
		var privateLinkServiceConnectionState storage.PrivateLinkServiceConnectionState_STATUS
		err := connection.PrivateLinkServiceConnectionState.AssignProperties_To_PrivateLinkServiceConnectionState_STATUS(&privateLinkServiceConnectionState)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_PrivateLinkServiceConnectionState_STATUS() to populate field PrivateLinkServiceConnectionState")
		}
		destination.PrivateLinkServiceConnectionState = &privateLinkServiceConnectionState
	} else {
		destination.PrivateLinkServiceConnectionState = nil
	}

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

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

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

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

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

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

	// No error
	return nil
}

// Storage version of v1api20220701.Subnet_PrivateEndpoint_SubResourceEmbedded
// Subnet in a virtual network resource.
type Subnet_PrivateEndpoint_SubResourceEmbedded struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`

	// Reference: Resource ID.
	Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"`
}

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

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

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

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

	// No error
	return nil
}

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

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

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

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

	// No error
	return nil
}

// Storage version of v1api20220701.Subnet_STATUS_PrivateEndpoint_SubResourceEmbedded
// Subnet in a virtual network resource.
type Subnet_STATUS_PrivateEndpoint_SubResourceEmbedded struct {
	Id          *string                `json:"id,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

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

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

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

	// No error
	return nil
}

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

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

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

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

	// No error
	return nil
}

type augmentConversionForApplicationSecurityGroup_STATUS_PrivateEndpoint_SubResourceEmbedded interface {
	AssignPropertiesFrom(src *storage.ApplicationSecurityGroup_STATUS_PrivateEndpoint_SubResourceEmbedded) error
	AssignPropertiesTo(dst *storage.ApplicationSecurityGroup_STATUS_PrivateEndpoint_SubResourceEmbedded) error
}

type augmentConversionForApplicationSecurityGroupSpec_PrivateEndpoint_SubResourceEmbedded interface {
	AssignPropertiesFrom(src *storage.ApplicationSecurityGroupSpec_PrivateEndpoint_SubResourceEmbedded) error
	AssignPropertiesTo(dst *storage.ApplicationSecurityGroupSpec_PrivateEndpoint_SubResourceEmbedded) error
}

type augmentConversionForCustomDnsConfigPropertiesFormat_STATUS interface {
	AssignPropertiesFrom(src *storage.CustomDnsConfigPropertiesFormat_STATUS) error
	AssignPropertiesTo(dst *storage.CustomDnsConfigPropertiesFormat_STATUS) error
}

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

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

type augmentConversionForNetworkInterface_STATUS_PrivateEndpoint_SubResourceEmbedded interface {
	AssignPropertiesFrom(src *storage.NetworkInterface_STATUS_PrivateEndpoint_SubResourceEmbedded) error
	AssignPropertiesTo(dst *storage.NetworkInterface_STATUS_PrivateEndpoint_SubResourceEmbedded) error
}

type augmentConversionForPrivateEndpointIPConfiguration interface {
	AssignPropertiesFrom(src *storage.PrivateEndpointIPConfiguration) error
	AssignPropertiesTo(dst *storage.PrivateEndpointIPConfiguration) error
}

type augmentConversionForPrivateEndpointIPConfiguration_STATUS interface {
	AssignPropertiesFrom(src *storage.PrivateEndpointIPConfiguration_STATUS) error
	AssignPropertiesTo(dst *storage.PrivateEndpointIPConfiguration_STATUS) error
}

type augmentConversionForPrivateEndpointOperatorSpec interface {
	AssignPropertiesFrom(src *storage.PrivateEndpointOperatorSpec) error
	AssignPropertiesTo(dst *storage.PrivateEndpointOperatorSpec) error
}

type augmentConversionForPrivateLinkServiceConnection interface {
	AssignPropertiesFrom(src *storage.PrivateLinkServiceConnection) error
	AssignPropertiesTo(dst *storage.PrivateLinkServiceConnection) error
}

type augmentConversionForPrivateLinkServiceConnection_STATUS interface {
	AssignPropertiesFrom(src *storage.PrivateLinkServiceConnection_STATUS) error
	AssignPropertiesTo(dst *storage.PrivateLinkServiceConnection_STATUS) error
}

type augmentConversionForSubnet_PrivateEndpoint_SubResourceEmbedded interface {
	AssignPropertiesFrom(src *storage.Subnet_PrivateEndpoint_SubResourceEmbedded) error
	AssignPropertiesTo(dst *storage.Subnet_PrivateEndpoint_SubResourceEmbedded) error
}

type augmentConversionForSubnet_STATUS_PrivateEndpoint_SubResourceEmbedded interface {
	AssignPropertiesFrom(src *storage.Subnet_STATUS_PrivateEndpoint_SubResourceEmbedded) error
	AssignPropertiesTo(dst *storage.Subnet_STATUS_PrivateEndpoint_SubResourceEmbedded) error
}

// Storage version of v1api20220701.PrivateEndpointOperatorConfigMaps
type PrivateEndpointOperatorConfigMaps struct {
	PrimaryNicPrivateIpAddress *genruntime.ConfigMapDestination `json:"primaryNicPrivateIpAddress,omitempty"`
	PropertyBag                genruntime.PropertyBag           `json:"$propertyBag,omitempty"`
}

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

	// PrimaryNicPrivateIpAddress
	if source.PrimaryNicPrivateIpAddress != nil {
		primaryNicPrivateIpAddress := source.PrimaryNicPrivateIpAddress.Copy()
		maps.PrimaryNicPrivateIpAddress = &primaryNicPrivateIpAddress
	} else {
		maps.PrimaryNicPrivateIpAddress = nil
	}

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

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

	// No error
	return nil
}

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

	// PrimaryNicPrivateIpAddress
	if maps.PrimaryNicPrivateIpAddress != nil {
		primaryNicPrivateIpAddress := maps.PrimaryNicPrivateIpAddress.Copy()
		destination.PrimaryNicPrivateIpAddress = &primaryNicPrivateIpAddress
	} else {
		destination.PrimaryNicPrivateIpAddress = nil
	}

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

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

	// No error
	return nil
}

// Storage version of v1api20220701.PrivateLinkServiceConnectionState
// A collection of information about the state of the connection between service consumer and provider.
type PrivateLinkServiceConnectionState struct {
	ActionsRequired *string                `json:"actionsRequired,omitempty"`
	Description     *string                `json:"description,omitempty"`
	PropertyBag     genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Status          *string                `json:"status,omitempty"`
}

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

	// ActionsRequired
	state.ActionsRequired = genruntime.ClonePointerToString(source.ActionsRequired)

	// Description
	state.Description = genruntime.ClonePointerToString(source.Description)

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

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

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

	// No error
	return nil
}

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

	// ActionsRequired
	destination.ActionsRequired = genruntime.ClonePointerToString(state.ActionsRequired)

	// Description
	destination.Description = genruntime.ClonePointerToString(state.Description)

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

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

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

	// No error
	return nil
}

// Storage version of v1api20220701.PrivateLinkServiceConnectionState_STATUS
// A collection of information about the state of the connection between service consumer and provider.
type PrivateLinkServiceConnectionState_STATUS struct {
	ActionsRequired *string                `json:"actionsRequired,omitempty"`
	Description     *string                `json:"description,omitempty"`
	PropertyBag     genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Status          *string                `json:"status,omitempty"`
}

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

	// ActionsRequired
	state.ActionsRequired = genruntime.ClonePointerToString(source.ActionsRequired)

	// Description
	state.Description = genruntime.ClonePointerToString(source.Description)

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

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

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

	// No error
	return nil
}

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

	// ActionsRequired
	destination.ActionsRequired = genruntime.ClonePointerToString(state.ActionsRequired)

	// Description
	destination.Description = genruntime.ClonePointerToString(state.Description)

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

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

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

	// No error
	return nil
}

type augmentConversionForPrivateEndpointOperatorConfigMaps interface {
	AssignPropertiesFrom(src *storage.PrivateEndpointOperatorConfigMaps) error
	AssignPropertiesTo(dst *storage.PrivateEndpointOperatorConfigMaps) error
}

type augmentConversionForPrivateLinkServiceConnectionState interface {
	AssignPropertiesFrom(src *storage.PrivateLinkServiceConnectionState) error
	AssignPropertiesTo(dst *storage.PrivateLinkServiceConnectionState) error
}

type augmentConversionForPrivateLinkServiceConnectionState_STATUS interface {
	AssignPropertiesFrom(src *storage.PrivateLinkServiceConnectionState_STATUS) error
	AssignPropertiesTo(dst *storage.PrivateLinkServiceConnectionState_STATUS) error
}

func init() {
	SchemeBuilder.Register(&PrivateEndpoint{}, &PrivateEndpointList{})
}
