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

import (
	"fmt"
	v20220701s "github.com/Azure/azure-service-operator/v2/api/network/v1api20220701/storage"
	v20240101s "github.com/Azure/azure-service-operator/v2/api/network/v1api20240101/storage"
	v20240301s "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 v1api20201101.PublicIPAddress
// Generator information:
// - Generated from: /network/resource-manager/Microsoft.Network/stable/2020-11-01/publicIpAddress.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}
type PublicIPAddress struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              PublicIPAddress_Spec   `json:"spec,omitempty"`
	Status            PublicIPAddress_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &PublicIPAddress{}

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

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

var _ conversion.Convertible = &PublicIPAddress{}

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

	return address.AssignProperties_From_PublicIPAddress(source)
}

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

	return address.AssignProperties_To_PublicIPAddress(destination)
}

var _ configmaps.Exporter = &PublicIPAddress{}

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

var _ secrets.Exporter = &PublicIPAddress{}

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

var _ genruntime.KubernetesResource = &PublicIPAddress{}

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

// GetAPIVersion returns the ARM API version of the resource. This is always "2020-11-01"
func (address PublicIPAddress) GetAPIVersion() string {
	return "2020-11-01"
}

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

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

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

// GetSupportedOperations returns the operations supported by the resource
func (address *PublicIPAddress) 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/publicIPAddresses"
func (address *PublicIPAddress) GetType() string {
	return "Microsoft.Network/publicIPAddresses"
}

// NewEmptyStatus returns a new empty (blank) status
func (address *PublicIPAddress) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &PublicIPAddress_STATUS{}
}

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

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

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

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

	address.Status = st
	return nil
}

// AssignProperties_From_PublicIPAddress populates our PublicIPAddress from the provided source PublicIPAddress
func (address *PublicIPAddress) AssignProperties_From_PublicIPAddress(source *v20240301s.PublicIPAddress) error {

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

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

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

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

	// No error
	return nil
}

// AssignProperties_To_PublicIPAddress populates the provided destination PublicIPAddress from our PublicIPAddress
func (address *PublicIPAddress) AssignProperties_To_PublicIPAddress(destination *v20240301s.PublicIPAddress) error {

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

	// Spec
	var spec v20240301s.PublicIPAddress_Spec
	err := address.Spec.AssignProperties_To_PublicIPAddress_Spec(&spec)
	if err != nil {
		return eris.Wrap(err, "calling AssignProperties_To_PublicIPAddress_Spec() to populate field Spec")
	}
	destination.Spec = spec

	// Status
	var status v20240301s.PublicIPAddress_STATUS
	err = address.Status.AssignProperties_To_PublicIPAddress_STATUS(&status)
	if err != nil {
		return eris.Wrap(err, "calling AssignProperties_To_PublicIPAddress_STATUS() to populate field Status")
	}
	destination.Status = status

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

// +kubebuilder:object:root=true
// Storage version of v1api20201101.PublicIPAddress
// Generator information:
// - Generated from: /network/resource-manager/Microsoft.Network/stable/2020-11-01/publicIpAddress.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}
type PublicIPAddressList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PublicIPAddress `json:"items"`
}

type augmentConversionForPublicIPAddress interface {
	AssignPropertiesFrom(src *v20240301s.PublicIPAddress) error
	AssignPropertiesTo(dst *v20240301s.PublicIPAddress) error
}

// Storage version of v1api20201101.PublicIPAddress_Spec
type PublicIPAddress_Spec struct {
	// AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it
	// doesn't have to be.
	AzureName             string                                                   `json:"azureName,omitempty"`
	DdosSettings          *DdosSettings                                            `json:"ddosSettings,omitempty"`
	DnsSettings           *PublicIPAddressDnsSettings                              `json:"dnsSettings,omitempty"`
	ExtendedLocation      *ExtendedLocation                                        `json:"extendedLocation,omitempty"`
	IdleTimeoutInMinutes  *int                                                     `json:"idleTimeoutInMinutes,omitempty"`
	IpAddress             *string                                                  `json:"ipAddress,omitempty"`
	IpTags                []IpTag                                                  `json:"ipTags,omitempty"`
	LinkedPublicIPAddress *PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded `json:"linkedPublicIPAddress,omitempty"`
	Location              *string                                                  `json:"location,omitempty"`
	NatGateway            *NatGatewaySpec_PublicIPAddress_SubResourceEmbedded      `json:"natGateway,omitempty"`
	OperatorSpec          *PublicIPAddressOperatorSpec                             `json:"operatorSpec,omitempty"`
	OriginalVersion       string                                                   `json:"originalVersion,omitempty"`

	// +kubebuilder:validation:Required
	// Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also
	// controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a
	// reference to a resources.azure.com/ResourceGroup resource
	Owner                    *genruntime.KnownResourceReference                       `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"`
	PropertyBag              genruntime.PropertyBag                                   `json:"$propertyBag,omitempty"`
	PublicIPAddressVersion   *string                                                  `json:"publicIPAddressVersion,omitempty"`
	PublicIPAllocationMethod *string                                                  `json:"publicIPAllocationMethod,omitempty"`
	PublicIPPrefix           *SubResource                                             `json:"publicIPPrefix,omitempty"`
	ServicePublicIPAddress   *PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded `json:"servicePublicIPAddress,omitempty"`
	Sku                      *PublicIPAddressSku                                      `json:"sku,omitempty"`
	Tags                     map[string]string                                        `json:"tags,omitempty"`
	Zones                    []string                                                 `json:"zones,omitempty"`
}

var _ genruntime.ConvertibleSpec = &PublicIPAddress_Spec{}

// ConvertSpecFrom populates our PublicIPAddress_Spec from the provided source
func (address *PublicIPAddress_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error {
	src, ok := source.(*v20240301s.PublicIPAddress_Spec)
	if ok {
		// Populate our instance from source
		return address.AssignProperties_From_PublicIPAddress_Spec(src)
	}

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

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

	return nil
}

// ConvertSpecTo populates the provided destination from our PublicIPAddress_Spec
func (address *PublicIPAddress_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error {
	dst, ok := destination.(*v20240301s.PublicIPAddress_Spec)
	if ok {
		// Populate destination from our instance
		return address.AssignProperties_To_PublicIPAddress_Spec(dst)
	}

	// Convert to an intermediate form
	dst = &v20240301s.PublicIPAddress_Spec{}
	err := address.AssignProperties_To_PublicIPAddress_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_PublicIPAddress_Spec populates our PublicIPAddress_Spec from the provided source PublicIPAddress_Spec
func (address *PublicIPAddress_Spec) AssignProperties_From_PublicIPAddress_Spec(source *v20240301s.PublicIPAddress_Spec) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// AzureName
	address.AzureName = source.AzureName

	// DdosSettings
	if source.DdosSettings != nil {
		var ddosSetting DdosSettings
		err := ddosSetting.AssignProperties_From_DdosSettings(source.DdosSettings)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_DdosSettings() to populate field DdosSettings")
		}
		address.DdosSettings = &ddosSetting
	} else {
		address.DdosSettings = nil
	}

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

	// DnsSettings
	if source.DnsSettings != nil {
		var dnsSetting PublicIPAddressDnsSettings
		err := dnsSetting.AssignProperties_From_PublicIPAddressDnsSettings(source.DnsSettings)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_PublicIPAddressDnsSettings() to populate field DnsSettings")
		}
		address.DnsSettings = &dnsSetting
	} else {
		address.DnsSettings = nil
	}

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

	// IdleTimeoutInMinutes
	address.IdleTimeoutInMinutes = genruntime.ClonePointerToInt(source.IdleTimeoutInMinutes)

	// IpAddress
	address.IpAddress = genruntime.ClonePointerToString(source.IpAddress)

	// IpTags
	if source.IpTags != nil {
		ipTagList := make([]IpTag, len(source.IpTags))
		for ipTagIndex, ipTagItem := range source.IpTags {
			var ipTagStash v20220701s.IpTag
			err := ipTagStash.AssignProperties_From_IpTag(&ipTagItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_IpTag() to populate field IpTagStash from IpTags")
			}
			var ipTag IpTag
			err = ipTag.AssignProperties_From_IpTag(&ipTagStash)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_IpTag() to populate field IpTags from IpTagStash")
			}
			ipTagList[ipTagIndex] = ipTag
		}
		address.IpTags = ipTagList
	} else {
		address.IpTags = nil
	}

	// LinkedPublicIPAddress
	if source.LinkedPublicIPAddress != nil {
		var linkedPublicIPAddress PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded
		err := linkedPublicIPAddress.AssignProperties_From_PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded(source.LinkedPublicIPAddress)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded() to populate field LinkedPublicIPAddress")
		}
		address.LinkedPublicIPAddress = &linkedPublicIPAddress
	} else {
		address.LinkedPublicIPAddress = nil
	}

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

	// NatGateway
	if source.NatGateway != nil {
		var natGateway NatGatewaySpec_PublicIPAddress_SubResourceEmbedded
		err := natGateway.AssignProperties_From_NatGatewaySpec_PublicIPAddress_SubResourceEmbedded(source.NatGateway)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NatGatewaySpec_PublicIPAddress_SubResourceEmbedded() to populate field NatGateway")
		}
		address.NatGateway = &natGateway
	} else {
		address.NatGateway = nil
	}

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

	// OriginalVersion
	address.OriginalVersion = source.OriginalVersion

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

	// PublicIPAddressVersion
	address.PublicIPAddressVersion = genruntime.ClonePointerToString(source.PublicIPAddressVersion)

	// PublicIPAllocationMethod
	address.PublicIPAllocationMethod = genruntime.ClonePointerToString(source.PublicIPAllocationMethod)

	// PublicIPPrefix
	if source.PublicIPPrefix != nil {
		var subResourceStash v20220701s.SubResource
		err := subResourceStash.AssignProperties_From_SubResource(source.PublicIPPrefix)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SubResource() to populate field SubResourceStash from PublicIPPrefix")
		}
		var publicIPPrefix SubResource
		err = publicIPPrefix.AssignProperties_From_SubResource(&subResourceStash)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SubResource() to populate field PublicIPPrefix from SubResourceStash")
		}
		address.PublicIPPrefix = &publicIPPrefix
	} else {
		address.PublicIPPrefix = nil
	}

	// ServicePublicIPAddress
	if source.ServicePublicIPAddress != nil {
		var servicePublicIPAddress PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded
		err := servicePublicIPAddress.AssignProperties_From_PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded(source.ServicePublicIPAddress)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded() to populate field ServicePublicIPAddress")
		}
		address.ServicePublicIPAddress = &servicePublicIPAddress
	} else {
		address.ServicePublicIPAddress = nil
	}

	// Sku
	if source.Sku != nil {
		var sku PublicIPAddressSku
		err := sku.AssignProperties_From_PublicIPAddressSku(source.Sku)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_PublicIPAddressSku() to populate field Sku")
		}
		address.Sku = &sku
	} else {
		address.Sku = nil
	}

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

	// Zones
	address.Zones = genruntime.CloneSliceOfString(source.Zones)

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

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

	// No error
	return nil
}

// AssignProperties_To_PublicIPAddress_Spec populates the provided destination PublicIPAddress_Spec from our PublicIPAddress_Spec
func (address *PublicIPAddress_Spec) AssignProperties_To_PublicIPAddress_Spec(destination *v20240301s.PublicIPAddress_Spec) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(address.PropertyBag)

	// AzureName
	destination.AzureName = address.AzureName

	// DdosSettings
	if address.DdosSettings != nil {
		var ddosSetting v20240301s.DdosSettings
		err := address.DdosSettings.AssignProperties_To_DdosSettings(&ddosSetting)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_DdosSettings() to populate field DdosSettings")
		}
		destination.DdosSettings = &ddosSetting
	} else {
		destination.DdosSettings = nil
	}

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

		destination.DeleteOption = &deleteOption
	} else {
		destination.DeleteOption = nil
	}

	// DnsSettings
	if address.DnsSettings != nil {
		var dnsSetting v20240301s.PublicIPAddressDnsSettings
		err := address.DnsSettings.AssignProperties_To_PublicIPAddressDnsSettings(&dnsSetting)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_PublicIPAddressDnsSettings() to populate field DnsSettings")
		}
		destination.DnsSettings = &dnsSetting
	} else {
		destination.DnsSettings = nil
	}

	// ExtendedLocation
	if address.ExtendedLocation != nil {
		var extendedLocationStash v20220701s.ExtendedLocation
		err := address.ExtendedLocation.AssignProperties_To_ExtendedLocation(&extendedLocationStash)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ExtendedLocation() to populate field ExtendedLocationStash from ExtendedLocation")
		}
		var extendedLocation v20240301s.ExtendedLocation
		err = extendedLocationStash.AssignProperties_To_ExtendedLocation(&extendedLocation)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ExtendedLocation() to populate field ExtendedLocation from ExtendedLocationStash")
		}
		destination.ExtendedLocation = &extendedLocation
	} else {
		destination.ExtendedLocation = nil
	}

	// IdleTimeoutInMinutes
	destination.IdleTimeoutInMinutes = genruntime.ClonePointerToInt(address.IdleTimeoutInMinutes)

	// IpAddress
	destination.IpAddress = genruntime.ClonePointerToString(address.IpAddress)

	// IpTags
	if address.IpTags != nil {
		ipTagList := make([]v20240301s.IpTag, len(address.IpTags))
		for ipTagIndex, ipTagItem := range address.IpTags {
			var ipTagStash v20220701s.IpTag
			err := ipTagItem.AssignProperties_To_IpTag(&ipTagStash)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_IpTag() to populate field IpTagStash from IpTags")
			}
			var ipTag v20240301s.IpTag
			err = ipTagStash.AssignProperties_To_IpTag(&ipTag)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_IpTag() to populate field IpTags from IpTagStash")
			}
			ipTagList[ipTagIndex] = ipTag
		}
		destination.IpTags = ipTagList
	} else {
		destination.IpTags = nil
	}

	// LinkedPublicIPAddress
	if address.LinkedPublicIPAddress != nil {
		var linkedPublicIPAddress v20240301s.PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded
		err := address.LinkedPublicIPAddress.AssignProperties_To_PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded(&linkedPublicIPAddress)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded() to populate field LinkedPublicIPAddress")
		}
		destination.LinkedPublicIPAddress = &linkedPublicIPAddress
	} else {
		destination.LinkedPublicIPAddress = nil
	}

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

	// NatGateway
	if address.NatGateway != nil {
		var natGateway v20240301s.NatGatewaySpec_PublicIPAddress_SubResourceEmbedded
		err := address.NatGateway.AssignProperties_To_NatGatewaySpec_PublicIPAddress_SubResourceEmbedded(&natGateway)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NatGatewaySpec_PublicIPAddress_SubResourceEmbedded() to populate field NatGateway")
		}
		destination.NatGateway = &natGateway
	} else {
		destination.NatGateway = nil
	}

	// OperatorSpec
	if address.OperatorSpec != nil {
		var operatorSpec v20240301s.PublicIPAddressOperatorSpec
		err := address.OperatorSpec.AssignProperties_To_PublicIPAddressOperatorSpec(&operatorSpec)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_PublicIPAddressOperatorSpec() to populate field OperatorSpec")
		}
		destination.OperatorSpec = &operatorSpec
	} else {
		destination.OperatorSpec = nil
	}

	// OriginalVersion
	destination.OriginalVersion = address.OriginalVersion

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

	// PublicIPAddressVersion
	destination.PublicIPAddressVersion = genruntime.ClonePointerToString(address.PublicIPAddressVersion)

	// PublicIPAllocationMethod
	destination.PublicIPAllocationMethod = genruntime.ClonePointerToString(address.PublicIPAllocationMethod)

	// PublicIPPrefix
	if address.PublicIPPrefix != nil {
		var subResourceStash v20220701s.SubResource
		err := address.PublicIPPrefix.AssignProperties_To_SubResource(&subResourceStash)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SubResource() to populate field SubResourceStash from PublicIPPrefix")
		}
		var publicIPPrefix v20240301s.SubResource
		err = subResourceStash.AssignProperties_To_SubResource(&publicIPPrefix)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SubResource() to populate field PublicIPPrefix from SubResourceStash")
		}
		destination.PublicIPPrefix = &publicIPPrefix
	} else {
		destination.PublicIPPrefix = nil
	}

	// ServicePublicIPAddress
	if address.ServicePublicIPAddress != nil {
		var servicePublicIPAddress v20240301s.PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded
		err := address.ServicePublicIPAddress.AssignProperties_To_PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded(&servicePublicIPAddress)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded() to populate field ServicePublicIPAddress")
		}
		destination.ServicePublicIPAddress = &servicePublicIPAddress
	} else {
		destination.ServicePublicIPAddress = nil
	}

	// Sku
	if address.Sku != nil {
		var sku v20240301s.PublicIPAddressSku
		err := address.Sku.AssignProperties_To_PublicIPAddressSku(&sku)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_PublicIPAddressSku() to populate field Sku")
		}
		destination.Sku = &sku
	} else {
		destination.Sku = nil
	}

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

	// Zones
	destination.Zones = genruntime.CloneSliceOfString(address.Zones)

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

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

	// No error
	return nil
}

// Storage version of v1api20201101.PublicIPAddress_STATUS
// Public IP address resource.
type PublicIPAddress_STATUS struct {
	Conditions               []conditions.Condition                                      `json:"conditions,omitempty"`
	DdosSettings             *DdosSettings_STATUS                                        `json:"ddosSettings,omitempty"`
	DnsSettings              *PublicIPAddressDnsSettings_STATUS                          `json:"dnsSettings,omitempty"`
	Etag                     *string                                                     `json:"etag,omitempty"`
	ExtendedLocation         *ExtendedLocation_STATUS                                    `json:"extendedLocation,omitempty"`
	Id                       *string                                                     `json:"id,omitempty"`
	IdleTimeoutInMinutes     *int                                                        `json:"idleTimeoutInMinutes,omitempty"`
	IpAddress                *string                                                     `json:"ipAddress,omitempty"`
	IpConfiguration          *IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded `json:"ipConfiguration,omitempty"`
	IpTags                   []IpTag_STATUS                                              `json:"ipTags,omitempty"`
	Location                 *string                                                     `json:"location,omitempty"`
	MigrationPhase           *string                                                     `json:"migrationPhase,omitempty"`
	Name                     *string                                                     `json:"name,omitempty"`
	NatGateway               *NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded      `json:"natGateway,omitempty"`
	PropertyBag              genruntime.PropertyBag                                      `json:"$propertyBag,omitempty"`
	ProvisioningState        *string                                                     `json:"provisioningState,omitempty"`
	PublicIPAddressVersion   *string                                                     `json:"publicIPAddressVersion,omitempty"`
	PublicIPAllocationMethod *string                                                     `json:"publicIPAllocationMethod,omitempty"`
	PublicIPPrefix           *SubResource_STATUS                                         `json:"publicIPPrefix,omitempty"`
	ResourceGuid             *string                                                     `json:"resourceGuid,omitempty"`
	Sku                      *PublicIPAddressSku_STATUS                                  `json:"sku,omitempty"`
	Tags                     map[string]string                                           `json:"tags,omitempty"`
	Type                     *string                                                     `json:"type,omitempty"`
	Zones                    []string                                                    `json:"zones,omitempty"`
}

var _ genruntime.ConvertibleStatus = &PublicIPAddress_STATUS{}

// ConvertStatusFrom populates our PublicIPAddress_STATUS from the provided source
func (address *PublicIPAddress_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error {
	src, ok := source.(*v20240301s.PublicIPAddress_STATUS)
	if ok {
		// Populate our instance from source
		return address.AssignProperties_From_PublicIPAddress_STATUS(src)
	}

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

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

	return nil
}

// ConvertStatusTo populates the provided destination from our PublicIPAddress_STATUS
func (address *PublicIPAddress_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error {
	dst, ok := destination.(*v20240301s.PublicIPAddress_STATUS)
	if ok {
		// Populate destination from our instance
		return address.AssignProperties_To_PublicIPAddress_STATUS(dst)
	}

	// Convert to an intermediate form
	dst = &v20240301s.PublicIPAddress_STATUS{}
	err := address.AssignProperties_To_PublicIPAddress_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_PublicIPAddress_STATUS populates our PublicIPAddress_STATUS from the provided source PublicIPAddress_STATUS
func (address *PublicIPAddress_STATUS) AssignProperties_From_PublicIPAddress_STATUS(source *v20240301s.PublicIPAddress_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

	// DdosSettings
	if source.DdosSettings != nil {
		var ddosSetting DdosSettings_STATUS
		err := ddosSetting.AssignProperties_From_DdosSettings_STATUS(source.DdosSettings)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_DdosSettings_STATUS() to populate field DdosSettings")
		}
		address.DdosSettings = &ddosSetting
	} else {
		address.DdosSettings = nil
	}

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

	// DnsSettings
	if source.DnsSettings != nil {
		var dnsSetting PublicIPAddressDnsSettings_STATUS
		err := dnsSetting.AssignProperties_From_PublicIPAddressDnsSettings_STATUS(source.DnsSettings)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_PublicIPAddressDnsSettings_STATUS() to populate field DnsSettings")
		}
		address.DnsSettings = &dnsSetting
	} else {
		address.DnsSettings = nil
	}

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

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

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

	// IdleTimeoutInMinutes
	address.IdleTimeoutInMinutes = genruntime.ClonePointerToInt(source.IdleTimeoutInMinutes)

	// IpAddress
	address.IpAddress = genruntime.ClonePointerToString(source.IpAddress)

	// IpConfiguration
	if source.IpConfiguration != nil {
		var ipConfiguration IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded
		err := ipConfiguration.AssignProperties_From_IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded(source.IpConfiguration)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded() to populate field IpConfiguration")
		}
		address.IpConfiguration = &ipConfiguration
	} else {
		address.IpConfiguration = nil
	}

	// IpTags
	if source.IpTags != nil {
		ipTagList := make([]IpTag_STATUS, len(source.IpTags))
		for ipTagIndex, ipTagItem := range source.IpTags {
			var ipTagSTATUSStash v20220701s.IpTag_STATUS
			err := ipTagSTATUSStash.AssignProperties_From_IpTag_STATUS(&ipTagItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_IpTag_STATUS() to populate field IpTag_STATUSStash from IpTags")
			}
			var ipTag IpTag_STATUS
			err = ipTag.AssignProperties_From_IpTag_STATUS(&ipTagSTATUSStash)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_IpTag_STATUS() to populate field IpTags from IpTag_STATUSStash")
			}
			ipTagList[ipTagIndex] = ipTag
		}
		address.IpTags = ipTagList
	} else {
		address.IpTags = nil
	}

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

	// MigrationPhase
	address.MigrationPhase = genruntime.ClonePointerToString(source.MigrationPhase)

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

	// NatGateway
	if source.NatGateway != nil {
		var natGateway NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded
		err := natGateway.AssignProperties_From_NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded(source.NatGateway)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded() to populate field NatGateway")
		}
		address.NatGateway = &natGateway
	} else {
		address.NatGateway = nil
	}

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

	// PublicIPAddressVersion
	address.PublicIPAddressVersion = genruntime.ClonePointerToString(source.PublicIPAddressVersion)

	// PublicIPAllocationMethod
	address.PublicIPAllocationMethod = genruntime.ClonePointerToString(source.PublicIPAllocationMethod)

	// PublicIPPrefix
	if source.PublicIPPrefix != nil {
		var subResourceSTATUSStash v20240101s.SubResource_STATUS
		err := subResourceSTATUSStash.AssignProperties_From_SubResource_STATUS(source.PublicIPPrefix)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SubResource_STATUS() to populate field SubResource_STATUSStash from PublicIPPrefix")
		}
		var subResourceSTATUSStashLocal v20220701s.SubResource_STATUS
		err = subResourceSTATUSStashLocal.AssignProperties_From_SubResource_STATUS(&subResourceSTATUSStash)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SubResource_STATUS() to populate field SubResource_STATUSStash")
		}
		var publicIPPrefix SubResource_STATUS
		err = publicIPPrefix.AssignProperties_From_SubResource_STATUS(&subResourceSTATUSStashLocal)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SubResource_STATUS() to populate field PublicIPPrefix from SubResource_STATUSStash")
		}
		address.PublicIPPrefix = &publicIPPrefix
	} else {
		address.PublicIPPrefix = nil
	}

	// ResourceGuid
	address.ResourceGuid = genruntime.ClonePointerToString(source.ResourceGuid)

	// Sku
	if source.Sku != nil {
		var sku PublicIPAddressSku_STATUS
		err := sku.AssignProperties_From_PublicIPAddressSku_STATUS(source.Sku)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_PublicIPAddressSku_STATUS() to populate field Sku")
		}
		address.Sku = &sku
	} else {
		address.Sku = nil
	}

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

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

	// Zones
	address.Zones = genruntime.CloneSliceOfString(source.Zones)

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

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

	// No error
	return nil
}

// AssignProperties_To_PublicIPAddress_STATUS populates the provided destination PublicIPAddress_STATUS from our PublicIPAddress_STATUS
func (address *PublicIPAddress_STATUS) AssignProperties_To_PublicIPAddress_STATUS(destination *v20240301s.PublicIPAddress_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(address.PropertyBag)

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

	// DdosSettings
	if address.DdosSettings != nil {
		var ddosSetting v20240301s.DdosSettings_STATUS
		err := address.DdosSettings.AssignProperties_To_DdosSettings_STATUS(&ddosSetting)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_DdosSettings_STATUS() to populate field DdosSettings")
		}
		destination.DdosSettings = &ddosSetting
	} else {
		destination.DdosSettings = nil
	}

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

		destination.DeleteOption = &deleteOption
	} else {
		destination.DeleteOption = nil
	}

	// DnsSettings
	if address.DnsSettings != nil {
		var dnsSetting v20240301s.PublicIPAddressDnsSettings_STATUS
		err := address.DnsSettings.AssignProperties_To_PublicIPAddressDnsSettings_STATUS(&dnsSetting)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_PublicIPAddressDnsSettings_STATUS() to populate field DnsSettings")
		}
		destination.DnsSettings = &dnsSetting
	} else {
		destination.DnsSettings = nil
	}

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

	// ExtendedLocation
	if address.ExtendedLocation != nil {
		var extendedLocationSTATUSStash v20220701s.ExtendedLocation_STATUS
		err := address.ExtendedLocation.AssignProperties_To_ExtendedLocation_STATUS(&extendedLocationSTATUSStash)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ExtendedLocation_STATUS() to populate field ExtendedLocation_STATUSStash from ExtendedLocation")
		}
		var extendedLocation v20240301s.ExtendedLocation_STATUS
		err = extendedLocationSTATUSStash.AssignProperties_To_ExtendedLocation_STATUS(&extendedLocation)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ExtendedLocation_STATUS() to populate field ExtendedLocation from ExtendedLocation_STATUSStash")
		}
		destination.ExtendedLocation = &extendedLocation
	} else {
		destination.ExtendedLocation = nil
	}

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

	// IdleTimeoutInMinutes
	destination.IdleTimeoutInMinutes = genruntime.ClonePointerToInt(address.IdleTimeoutInMinutes)

	// IpAddress
	destination.IpAddress = genruntime.ClonePointerToString(address.IpAddress)

	// IpConfiguration
	if address.IpConfiguration != nil {
		var ipConfiguration v20240301s.IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded
		err := address.IpConfiguration.AssignProperties_To_IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded(&ipConfiguration)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded() to populate field IpConfiguration")
		}
		destination.IpConfiguration = &ipConfiguration
	} else {
		destination.IpConfiguration = nil
	}

	// IpTags
	if address.IpTags != nil {
		ipTagList := make([]v20240301s.IpTag_STATUS, len(address.IpTags))
		for ipTagIndex, ipTagItem := range address.IpTags {
			var ipTagSTATUSStash v20220701s.IpTag_STATUS
			err := ipTagItem.AssignProperties_To_IpTag_STATUS(&ipTagSTATUSStash)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_IpTag_STATUS() to populate field IpTag_STATUSStash from IpTags")
			}
			var ipTag v20240301s.IpTag_STATUS
			err = ipTagSTATUSStash.AssignProperties_To_IpTag_STATUS(&ipTag)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_IpTag_STATUS() to populate field IpTags from IpTag_STATUSStash")
			}
			ipTagList[ipTagIndex] = ipTag
		}
		destination.IpTags = ipTagList
	} else {
		destination.IpTags = nil
	}

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

	// MigrationPhase
	destination.MigrationPhase = genruntime.ClonePointerToString(address.MigrationPhase)

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

	// NatGateway
	if address.NatGateway != nil {
		var natGateway v20240301s.NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded
		err := address.NatGateway.AssignProperties_To_NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded(&natGateway)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded() to populate field NatGateway")
		}
		destination.NatGateway = &natGateway
	} else {
		destination.NatGateway = nil
	}

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

	// PublicIPAddressVersion
	destination.PublicIPAddressVersion = genruntime.ClonePointerToString(address.PublicIPAddressVersion)

	// PublicIPAllocationMethod
	destination.PublicIPAllocationMethod = genruntime.ClonePointerToString(address.PublicIPAllocationMethod)

	// PublicIPPrefix
	if address.PublicIPPrefix != nil {
		var subResourceSTATUSStash v20220701s.SubResource_STATUS
		err := address.PublicIPPrefix.AssignProperties_To_SubResource_STATUS(&subResourceSTATUSStash)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SubResource_STATUS() to populate field SubResource_STATUSStash from PublicIPPrefix")
		}
		var subResourceSTATUSStashLocal v20240101s.SubResource_STATUS
		err = subResourceSTATUSStash.AssignProperties_To_SubResource_STATUS(&subResourceSTATUSStashLocal)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SubResource_STATUS() to populate field SubResource_STATUSStash")
		}
		var publicIPPrefix v20240301s.SubResource_STATUS
		err = subResourceSTATUSStashLocal.AssignProperties_To_SubResource_STATUS(&publicIPPrefix)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SubResource_STATUS() to populate field PublicIPPrefix from SubResource_STATUSStash")
		}
		destination.PublicIPPrefix = &publicIPPrefix
	} else {
		destination.PublicIPPrefix = nil
	}

	// ResourceGuid
	destination.ResourceGuid = genruntime.ClonePointerToString(address.ResourceGuid)

	// Sku
	if address.Sku != nil {
		var sku v20240301s.PublicIPAddressSku_STATUS
		err := address.Sku.AssignProperties_To_PublicIPAddressSku_STATUS(&sku)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_PublicIPAddressSku_STATUS() to populate field Sku")
		}
		destination.Sku = &sku
	} else {
		destination.Sku = nil
	}

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

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

	// Zones
	destination.Zones = genruntime.CloneSliceOfString(address.Zones)

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

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

	// No error
	return nil
}

type augmentConversionForPublicIPAddress_Spec interface {
	AssignPropertiesFrom(src *v20240301s.PublicIPAddress_Spec) error
	AssignPropertiesTo(dst *v20240301s.PublicIPAddress_Spec) error
}

type augmentConversionForPublicIPAddress_STATUS interface {
	AssignPropertiesFrom(src *v20240301s.PublicIPAddress_STATUS) error
	AssignPropertiesTo(dst *v20240301s.PublicIPAddress_STATUS) error
}

// Storage version of v1api20201101.DdosSettings
// Contains the DDoS protection settings of the public IP.
type DdosSettings struct {
	DdosCustomPolicy   *SubResource           `json:"ddosCustomPolicy,omitempty"`
	PropertyBag        genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ProtectedIP        *bool                  `json:"protectedIP,omitempty"`
	ProtectionCoverage *string                `json:"protectionCoverage,omitempty"`
}

// AssignProperties_From_DdosSettings populates our DdosSettings from the provided source DdosSettings
func (settings *DdosSettings) AssignProperties_From_DdosSettings(source *v20240301s.DdosSettings) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

		settings.DdosCustomPolicy = &ddosCustomPolicy
	} else {
		settings.DdosCustomPolicy = nil
	}

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

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

		settings.ProtectedIP = &protectedIP
	} else {
		settings.ProtectedIP = nil
	}

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

		settings.ProtectionCoverage = &protectionCoverage
	} else {
		settings.ProtectionCoverage = nil
	}

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

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

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

	// No error
	return nil
}

// AssignProperties_To_DdosSettings populates the provided destination DdosSettings from our DdosSettings
func (settings *DdosSettings) AssignProperties_To_DdosSettings(destination *v20240301s.DdosSettings) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(settings.PropertyBag)

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

	// DdosProtectionPlan
	if propertyBag.Contains("DdosProtectionPlan") {
		var ddosProtectionPlan v20240301s.SubResource
		err := propertyBag.Pull("DdosProtectionPlan", &ddosProtectionPlan)
		if err != nil {
			return eris.Wrap(err, "pulling 'DdosProtectionPlan' from propertyBag")
		}

		destination.DdosProtectionPlan = &ddosProtectionPlan
	} else {
		destination.DdosProtectionPlan = nil
	}

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

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

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

		destination.ProtectionMode = &protectionMode
	} else {
		destination.ProtectionMode = nil
	}

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

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

	// No error
	return nil
}

// Storage version of v1api20201101.DdosSettings_STATUS
// Contains the DDoS protection settings of the public IP.
type DdosSettings_STATUS struct {
	DdosCustomPolicy   *SubResource_STATUS    `json:"ddosCustomPolicy,omitempty"`
	PropertyBag        genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ProtectedIP        *bool                  `json:"protectedIP,omitempty"`
	ProtectionCoverage *string                `json:"protectionCoverage,omitempty"`
}

// AssignProperties_From_DdosSettings_STATUS populates our DdosSettings_STATUS from the provided source DdosSettings_STATUS
func (settings *DdosSettings_STATUS) AssignProperties_From_DdosSettings_STATUS(source *v20240301s.DdosSettings_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

		settings.DdosCustomPolicy = &ddosCustomPolicy
	} else {
		settings.DdosCustomPolicy = nil
	}

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

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

		settings.ProtectedIP = &protectedIP
	} else {
		settings.ProtectedIP = nil
	}

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

		settings.ProtectionCoverage = &protectionCoverage
	} else {
		settings.ProtectionCoverage = nil
	}

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

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

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

	// No error
	return nil
}

// AssignProperties_To_DdosSettings_STATUS populates the provided destination DdosSettings_STATUS from our DdosSettings_STATUS
func (settings *DdosSettings_STATUS) AssignProperties_To_DdosSettings_STATUS(destination *v20240301s.DdosSettings_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(settings.PropertyBag)

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

	// DdosProtectionPlan
	if propertyBag.Contains("DdosProtectionPlan") {
		var ddosProtectionPlan v20240301s.SubResource_STATUS
		err := propertyBag.Pull("DdosProtectionPlan", &ddosProtectionPlan)
		if err != nil {
			return eris.Wrap(err, "pulling 'DdosProtectionPlan' from propertyBag")
		}

		destination.DdosProtectionPlan = &ddosProtectionPlan
	} else {
		destination.DdosProtectionPlan = nil
	}

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

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

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

		destination.ProtectionMode = &protectionMode
	} else {
		destination.ProtectionMode = nil
	}

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

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

	// No error
	return nil
}

// Storage version of v1api20201101.IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded
// IP configuration.
type IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded struct {
	Id          *string                `json:"id,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// AssignProperties_From_IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded populates our IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded from the provided source IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded
func (embedded *IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded) AssignProperties_From_IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded(source *v20240301s.IPConfiguration_STATUS_PublicIPAddress_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 augmentConversionForIPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded interface (if implemented) to customize the conversion
	var embeddedAsAny any = embedded
	if augmentedEmbedded, ok := embeddedAsAny.(augmentConversionForIPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded); ok {
		err := augmentedEmbedded.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded populates the provided destination IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded from our IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded
func (embedded *IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded) AssignProperties_To_IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded(destination *v20240301s.IPConfiguration_STATUS_PublicIPAddress_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 augmentConversionForIPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded interface (if implemented) to customize the conversion
	var embeddedAsAny any = embedded
	if augmentedEmbedded, ok := embeddedAsAny.(augmentConversionForIPConfiguration_STATUS_PublicIPAddress_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 v1api20201101.IpTag
// Contains the IpTag associated with the object.
type IpTag struct {
	IpTagType   *string                `json:"ipTagType,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tag         *string                `json:"tag,omitempty"`
}

// AssignProperties_From_IpTag populates our IpTag from the provided source IpTag
func (ipTag *IpTag) AssignProperties_From_IpTag(source *v20220701s.IpTag) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// IpTagType
	ipTag.IpTagType = genruntime.ClonePointerToString(source.IpTagType)

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

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

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

	// No error
	return nil
}

// AssignProperties_To_IpTag populates the provided destination IpTag from our IpTag
func (ipTag *IpTag) AssignProperties_To_IpTag(destination *v20220701s.IpTag) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(ipTag.PropertyBag)

	// IpTagType
	destination.IpTagType = genruntime.ClonePointerToString(ipTag.IpTagType)

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

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

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

	// No error
	return nil
}

// Storage version of v1api20201101.IpTag_STATUS
// Contains the IpTag associated with the object.
type IpTag_STATUS struct {
	IpTagType   *string                `json:"ipTagType,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tag         *string                `json:"tag,omitempty"`
}

// AssignProperties_From_IpTag_STATUS populates our IpTag_STATUS from the provided source IpTag_STATUS
func (ipTag *IpTag_STATUS) AssignProperties_From_IpTag_STATUS(source *v20220701s.IpTag_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// IpTagType
	ipTag.IpTagType = genruntime.ClonePointerToString(source.IpTagType)

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

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

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

	// No error
	return nil
}

// AssignProperties_To_IpTag_STATUS populates the provided destination IpTag_STATUS from our IpTag_STATUS
func (ipTag *IpTag_STATUS) AssignProperties_To_IpTag_STATUS(destination *v20220701s.IpTag_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(ipTag.PropertyBag)

	// IpTagType
	destination.IpTagType = genruntime.ClonePointerToString(ipTag.IpTagType)

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

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

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

	// No error
	return nil
}

// Storage version of v1api20201101.NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded
// Nat Gateway resource.
type NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded struct {
	Id          *string                `json:"id,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// AssignProperties_From_NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded populates our NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded from the provided source NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded
func (embedded *NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded) AssignProperties_From_NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded(source *v20240301s.NatGateway_STATUS_PublicIPAddress_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 augmentConversionForNatGateway_STATUS_PublicIPAddress_SubResourceEmbedded interface (if implemented) to customize the conversion
	var embeddedAsAny any = embedded
	if augmentedEmbedded, ok := embeddedAsAny.(augmentConversionForNatGateway_STATUS_PublicIPAddress_SubResourceEmbedded); ok {
		err := augmentedEmbedded.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded populates the provided destination NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded from our NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded
func (embedded *NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded) AssignProperties_To_NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded(destination *v20240301s.NatGateway_STATUS_PublicIPAddress_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 augmentConversionForNatGateway_STATUS_PublicIPAddress_SubResourceEmbedded interface (if implemented) to customize the conversion
	var embeddedAsAny any = embedded
	if augmentedEmbedded, ok := embeddedAsAny.(augmentConversionForNatGateway_STATUS_PublicIPAddress_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 v1api20201101.NatGatewaySpec_PublicIPAddress_SubResourceEmbedded
// Nat Gateway resource.
type NatGatewaySpec_PublicIPAddress_SubResourceEmbedded struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`

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

// AssignProperties_From_NatGatewaySpec_PublicIPAddress_SubResourceEmbedded populates our NatGatewaySpec_PublicIPAddress_SubResourceEmbedded from the provided source NatGatewaySpec_PublicIPAddress_SubResourceEmbedded
func (embedded *NatGatewaySpec_PublicIPAddress_SubResourceEmbedded) AssignProperties_From_NatGatewaySpec_PublicIPAddress_SubResourceEmbedded(source *v20240301s.NatGatewaySpec_PublicIPAddress_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 augmentConversionForNatGatewaySpec_PublicIPAddress_SubResourceEmbedded interface (if implemented) to customize the conversion
	var embeddedAsAny any = embedded
	if augmentedEmbedded, ok := embeddedAsAny.(augmentConversionForNatGatewaySpec_PublicIPAddress_SubResourceEmbedded); ok {
		err := augmentedEmbedded.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_NatGatewaySpec_PublicIPAddress_SubResourceEmbedded populates the provided destination NatGatewaySpec_PublicIPAddress_SubResourceEmbedded from our NatGatewaySpec_PublicIPAddress_SubResourceEmbedded
func (embedded *NatGatewaySpec_PublicIPAddress_SubResourceEmbedded) AssignProperties_To_NatGatewaySpec_PublicIPAddress_SubResourceEmbedded(destination *v20240301s.NatGatewaySpec_PublicIPAddress_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 augmentConversionForNatGatewaySpec_PublicIPAddress_SubResourceEmbedded interface (if implemented) to customize the conversion
	var embeddedAsAny any = embedded
	if augmentedEmbedded, ok := embeddedAsAny.(augmentConversionForNatGatewaySpec_PublicIPAddress_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 v1api20201101.PublicIPAddressDnsSettings
// Contains FQDN of the DNS record associated with the public IP address.
type PublicIPAddressDnsSettings struct {
	DomainNameLabel *string                `json:"domainNameLabel,omitempty"`
	Fqdn            *string                `json:"fqdn,omitempty"`
	PropertyBag     genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ReverseFqdn     *string                `json:"reverseFqdn,omitempty"`
}

// AssignProperties_From_PublicIPAddressDnsSettings populates our PublicIPAddressDnsSettings from the provided source PublicIPAddressDnsSettings
func (settings *PublicIPAddressDnsSettings) AssignProperties_From_PublicIPAddressDnsSettings(source *v20240301s.PublicIPAddressDnsSettings) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// DomainNameLabel
	settings.DomainNameLabel = genruntime.ClonePointerToString(source.DomainNameLabel)

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

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

	// ReverseFqdn
	settings.ReverseFqdn = genruntime.ClonePointerToString(source.ReverseFqdn)

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

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

	// No error
	return nil
}

// AssignProperties_To_PublicIPAddressDnsSettings populates the provided destination PublicIPAddressDnsSettings from our PublicIPAddressDnsSettings
func (settings *PublicIPAddressDnsSettings) AssignProperties_To_PublicIPAddressDnsSettings(destination *v20240301s.PublicIPAddressDnsSettings) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(settings.PropertyBag)

	// DomainNameLabel
	destination.DomainNameLabel = genruntime.ClonePointerToString(settings.DomainNameLabel)

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

		destination.DomainNameLabelScope = &domainNameLabelScope
	} else {
		destination.DomainNameLabelScope = nil
	}

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

	// ReverseFqdn
	destination.ReverseFqdn = genruntime.ClonePointerToString(settings.ReverseFqdn)

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

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

	// No error
	return nil
}

// Storage version of v1api20201101.PublicIPAddressDnsSettings_STATUS
// Contains FQDN of the DNS record associated with the public IP address.
type PublicIPAddressDnsSettings_STATUS struct {
	DomainNameLabel *string                `json:"domainNameLabel,omitempty"`
	Fqdn            *string                `json:"fqdn,omitempty"`
	PropertyBag     genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ReverseFqdn     *string                `json:"reverseFqdn,omitempty"`
}

// AssignProperties_From_PublicIPAddressDnsSettings_STATUS populates our PublicIPAddressDnsSettings_STATUS from the provided source PublicIPAddressDnsSettings_STATUS
func (settings *PublicIPAddressDnsSettings_STATUS) AssignProperties_From_PublicIPAddressDnsSettings_STATUS(source *v20240301s.PublicIPAddressDnsSettings_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// DomainNameLabel
	settings.DomainNameLabel = genruntime.ClonePointerToString(source.DomainNameLabel)

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

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

	// ReverseFqdn
	settings.ReverseFqdn = genruntime.ClonePointerToString(source.ReverseFqdn)

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

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

	// No error
	return nil
}

// AssignProperties_To_PublicIPAddressDnsSettings_STATUS populates the provided destination PublicIPAddressDnsSettings_STATUS from our PublicIPAddressDnsSettings_STATUS
func (settings *PublicIPAddressDnsSettings_STATUS) AssignProperties_To_PublicIPAddressDnsSettings_STATUS(destination *v20240301s.PublicIPAddressDnsSettings_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(settings.PropertyBag)

	// DomainNameLabel
	destination.DomainNameLabel = genruntime.ClonePointerToString(settings.DomainNameLabel)

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

		destination.DomainNameLabelScope = &domainNameLabelScope
	} else {
		destination.DomainNameLabelScope = nil
	}

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

	// ReverseFqdn
	destination.ReverseFqdn = genruntime.ClonePointerToString(settings.ReverseFqdn)

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

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

	// No error
	return nil
}

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

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

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

	// No error
	return nil
}

// Storage version of v1api20201101.PublicIPAddressSku
// SKU of a public IP address.
type PublicIPAddressSku struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tier        *string                `json:"tier,omitempty"`
}

// AssignProperties_From_PublicIPAddressSku populates our PublicIPAddressSku from the provided source PublicIPAddressSku
func (addressSku *PublicIPAddressSku) AssignProperties_From_PublicIPAddressSku(source *v20240301s.PublicIPAddressSku) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

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

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

	// No error
	return nil
}

// AssignProperties_To_PublicIPAddressSku populates the provided destination PublicIPAddressSku from our PublicIPAddressSku
func (addressSku *PublicIPAddressSku) AssignProperties_To_PublicIPAddressSku(destination *v20240301s.PublicIPAddressSku) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(addressSku.PropertyBag)

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

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

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

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

	// No error
	return nil
}

// Storage version of v1api20201101.PublicIPAddressSku_STATUS
// SKU of a public IP address.
type PublicIPAddressSku_STATUS struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tier        *string                `json:"tier,omitempty"`
}

// AssignProperties_From_PublicIPAddressSku_STATUS populates our PublicIPAddressSku_STATUS from the provided source PublicIPAddressSku_STATUS
func (addressSku *PublicIPAddressSku_STATUS) AssignProperties_From_PublicIPAddressSku_STATUS(source *v20240301s.PublicIPAddressSku_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

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

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

	// No error
	return nil
}

// AssignProperties_To_PublicIPAddressSku_STATUS populates the provided destination PublicIPAddressSku_STATUS from our PublicIPAddressSku_STATUS
func (addressSku *PublicIPAddressSku_STATUS) AssignProperties_To_PublicIPAddressSku_STATUS(destination *v20240301s.PublicIPAddressSku_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(addressSku.PropertyBag)

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

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

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

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

	// No error
	return nil
}

// Storage version of v1api20201101.PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded
// Public IP address resource.
type PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`

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

// AssignProperties_From_PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded populates our PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded from the provided source PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded
func (embedded *PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded) AssignProperties_From_PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded(source *v20240301s.PublicIPAddressSpec_PublicIPAddress_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 augmentConversionForPublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded interface (if implemented) to customize the conversion
	var embeddedAsAny any = embedded
	if augmentedEmbedded, ok := embeddedAsAny.(augmentConversionForPublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded); ok {
		err := augmentedEmbedded.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded populates the provided destination PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded from our PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded
func (embedded *PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded) AssignProperties_To_PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded(destination *v20240301s.PublicIPAddressSpec_PublicIPAddress_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 augmentConversionForPublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded interface (if implemented) to customize the conversion
	var embeddedAsAny any = embedded
	if augmentedEmbedded, ok := embeddedAsAny.(augmentConversionForPublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded); ok {
		err := augmentedEmbedded.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

type augmentConversionForDdosSettings interface {
	AssignPropertiesFrom(src *v20240301s.DdosSettings) error
	AssignPropertiesTo(dst *v20240301s.DdosSettings) error
}

type augmentConversionForDdosSettings_STATUS interface {
	AssignPropertiesFrom(src *v20240301s.DdosSettings_STATUS) error
	AssignPropertiesTo(dst *v20240301s.DdosSettings_STATUS) error
}

type augmentConversionForIPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded interface {
	AssignPropertiesFrom(src *v20240301s.IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded) error
	AssignPropertiesTo(dst *v20240301s.IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded) error
}

type augmentConversionForIpTag interface {
	AssignPropertiesFrom(src *v20220701s.IpTag) error
	AssignPropertiesTo(dst *v20220701s.IpTag) error
}

type augmentConversionForIpTag_STATUS interface {
	AssignPropertiesFrom(src *v20220701s.IpTag_STATUS) error
	AssignPropertiesTo(dst *v20220701s.IpTag_STATUS) error
}

type augmentConversionForNatGateway_STATUS_PublicIPAddress_SubResourceEmbedded interface {
	AssignPropertiesFrom(src *v20240301s.NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded) error
	AssignPropertiesTo(dst *v20240301s.NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded) error
}

type augmentConversionForNatGatewaySpec_PublicIPAddress_SubResourceEmbedded interface {
	AssignPropertiesFrom(src *v20240301s.NatGatewaySpec_PublicIPAddress_SubResourceEmbedded) error
	AssignPropertiesTo(dst *v20240301s.NatGatewaySpec_PublicIPAddress_SubResourceEmbedded) error
}

type augmentConversionForPublicIPAddressDnsSettings interface {
	AssignPropertiesFrom(src *v20240301s.PublicIPAddressDnsSettings) error
	AssignPropertiesTo(dst *v20240301s.PublicIPAddressDnsSettings) error
}

type augmentConversionForPublicIPAddressDnsSettings_STATUS interface {
	AssignPropertiesFrom(src *v20240301s.PublicIPAddressDnsSettings_STATUS) error
	AssignPropertiesTo(dst *v20240301s.PublicIPAddressDnsSettings_STATUS) error
}

type augmentConversionForPublicIPAddressOperatorSpec interface {
	AssignPropertiesFrom(src *v20240301s.PublicIPAddressOperatorSpec) error
	AssignPropertiesTo(dst *v20240301s.PublicIPAddressOperatorSpec) error
}

type augmentConversionForPublicIPAddressSku interface {
	AssignPropertiesFrom(src *v20240301s.PublicIPAddressSku) error
	AssignPropertiesTo(dst *v20240301s.PublicIPAddressSku) error
}

type augmentConversionForPublicIPAddressSku_STATUS interface {
	AssignPropertiesFrom(src *v20240301s.PublicIPAddressSku_STATUS) error
	AssignPropertiesTo(dst *v20240301s.PublicIPAddressSku_STATUS) error
}

type augmentConversionForPublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded interface {
	AssignPropertiesFrom(src *v20240301s.PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded) error
	AssignPropertiesTo(dst *v20240301s.PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded) error
}

func init() {
	SchemeBuilder.Register(&PublicIPAddress{}, &PublicIPAddressList{})
}
