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

import (
	"fmt"
	v20231001s "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20231001/storage"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions"
	"github.com/pkg/errors"
	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: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 v1api20230201.ManagedClustersAgentPool
// Generator information:
// - Generated from: /containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-02-01/managedClusters.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}
type ManagedClustersAgentPool struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ManagedClusters_AgentPool_Spec   `json:"spec,omitempty"`
	Status            ManagedClusters_AgentPool_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &ManagedClustersAgentPool{}

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

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

var _ conversion.Convertible = &ManagedClustersAgentPool{}

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

	return pool.AssignProperties_From_ManagedClustersAgentPool(source)
}

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

	return pool.AssignProperties_To_ManagedClustersAgentPool(destination)
}

var _ genruntime.KubernetesResource = &ManagedClustersAgentPool{}

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

// GetAPIVersion returns the ARM API version of the resource. This is always "2023-02-01"
func (pool ManagedClustersAgentPool) GetAPIVersion() string {
	return string(APIVersion_Value)
}

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

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

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.ContainerService/managedClusters/agentPools"
func (pool *ManagedClustersAgentPool) GetType() string {
	return "Microsoft.ContainerService/managedClusters/agentPools"
}

// NewEmptyStatus returns a new empty (blank) status
func (pool *ManagedClustersAgentPool) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &ManagedClusters_AgentPool_STATUS{}
}

// Owner returns the ResourceReference of the owner
func (pool *ManagedClustersAgentPool) Owner() *genruntime.ResourceReference {
	group, kind := genruntime.LookupOwnerGroupKind(pool.Spec)
	return pool.Spec.Owner.AsResourceReference(group, kind)
}

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

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

	pool.Status = st
	return nil
}

// AssignProperties_From_ManagedClustersAgentPool populates our ManagedClustersAgentPool from the provided source ManagedClustersAgentPool
func (pool *ManagedClustersAgentPool) AssignProperties_From_ManagedClustersAgentPool(source *v20231001s.ManagedClustersAgentPool) error {

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

	// Spec
	var spec ManagedClusters_AgentPool_Spec
	err := spec.AssignProperties_From_ManagedClusters_AgentPool_Spec(&source.Spec)
	if err != nil {
		return errors.Wrap(err, "calling AssignProperties_From_ManagedClusters_AgentPool_Spec() to populate field Spec")
	}
	pool.Spec = spec

	// Status
	var status ManagedClusters_AgentPool_STATUS
	err = status.AssignProperties_From_ManagedClusters_AgentPool_STATUS(&source.Status)
	if err != nil {
		return errors.Wrap(err, "calling AssignProperties_From_ManagedClusters_AgentPool_STATUS() to populate field Status")
	}
	pool.Status = status

	// Invoke the augmentConversionForManagedClustersAgentPool interface (if implemented) to customize the conversion
	var poolAsAny any = pool
	if augmentedPool, ok := poolAsAny.(augmentConversionForManagedClustersAgentPool); ok {
		err := augmentedPool.AssignPropertiesFrom(source)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClustersAgentPool populates the provided destination ManagedClustersAgentPool from our ManagedClustersAgentPool
func (pool *ManagedClustersAgentPool) AssignProperties_To_ManagedClustersAgentPool(destination *v20231001s.ManagedClustersAgentPool) error {

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

	// Spec
	var spec v20231001s.ManagedClusters_AgentPool_Spec
	err := pool.Spec.AssignProperties_To_ManagedClusters_AgentPool_Spec(&spec)
	if err != nil {
		return errors.Wrap(err, "calling AssignProperties_To_ManagedClusters_AgentPool_Spec() to populate field Spec")
	}
	destination.Spec = spec

	// Status
	var status v20231001s.ManagedClusters_AgentPool_STATUS
	err = pool.Status.AssignProperties_To_ManagedClusters_AgentPool_STATUS(&status)
	if err != nil {
		return errors.Wrap(err, "calling AssignProperties_To_ManagedClusters_AgentPool_STATUS() to populate field Status")
	}
	destination.Status = status

	// Invoke the augmentConversionForManagedClustersAgentPool interface (if implemented) to customize the conversion
	var poolAsAny any = pool
	if augmentedPool, ok := poolAsAny.(augmentConversionForManagedClustersAgentPool); ok {
		err := augmentedPool.AssignPropertiesTo(destination)
		if err != nil {
			return errors.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 (pool *ManagedClustersAgentPool) OriginalGVK() *schema.GroupVersionKind {
	return &schema.GroupVersionKind{
		Group:   GroupVersion.Group,
		Version: pool.Spec.OriginalVersion,
		Kind:    "ManagedClustersAgentPool",
	}
}

// +kubebuilder:object:root=true
// Storage version of v1api20230201.ManagedClustersAgentPool
// Generator information:
// - Generated from: /containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-02-01/managedClusters.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}
type ManagedClustersAgentPoolList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ManagedClustersAgentPool `json:"items"`
}

type augmentConversionForManagedClustersAgentPool interface {
	AssignPropertiesFrom(src *v20231001s.ManagedClustersAgentPool) error
	AssignPropertiesTo(dst *v20231001s.ManagedClustersAgentPool) error
}

// Storage version of v1api20230201.ManagedClusters_AgentPool_Spec
type ManagedClusters_AgentPool_Spec struct {
	AvailabilityZones []string `json:"availabilityZones,omitempty"`

	// AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it
	// doesn't have to be.
	AzureName              string        `json:"azureName,omitempty"`
	Count                  *int          `json:"count,omitempty"`
	CreationData           *CreationData `json:"creationData,omitempty"`
	EnableAutoScaling      *bool         `json:"enableAutoScaling,omitempty"`
	EnableEncryptionAtHost *bool         `json:"enableEncryptionAtHost,omitempty"`
	EnableFIPS             *bool         `json:"enableFIPS,omitempty"`
	EnableNodePublicIP     *bool         `json:"enableNodePublicIP,omitempty"`
	EnableUltraSSD         *bool         `json:"enableUltraSSD,omitempty"`
	GpuInstanceProfile     *string       `json:"gpuInstanceProfile,omitempty"`

	// HostGroupReference: This is of the form:
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}.
	// For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts).
	HostGroupReference *genruntime.ResourceReference `armReference:"HostGroupID" json:"hostGroupReference,omitempty"`
	KubeletConfig      *KubeletConfig                `json:"kubeletConfig,omitempty"`
	KubeletDiskType    *string                       `json:"kubeletDiskType,omitempty"`
	LinuxOSConfig      *LinuxOSConfig                `json:"linuxOSConfig,omitempty"`
	MaxCount           *int                          `json:"maxCount,omitempty"`
	MaxPods            *int                          `json:"maxPods,omitempty"`
	MinCount           *int                          `json:"minCount,omitempty"`
	Mode               *string                       `json:"mode,omitempty"`
	NodeLabels         map[string]string             `json:"nodeLabels,omitempty" serializationType:"explicitEmptyCollection"`

	// NodePublicIPPrefixReference: This is of the form:
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}
	NodePublicIPPrefixReference *genruntime.ResourceReference `armReference:"NodePublicIPPrefixID" json:"nodePublicIPPrefixReference,omitempty"`
	NodeTaints                  []string                      `json:"nodeTaints,omitempty" serializationType:"explicitEmptyCollection"`
	OrchestratorVersion         *string                       `json:"orchestratorVersion,omitempty"`
	OriginalVersion             string                        `json:"originalVersion,omitempty"`
	OsDiskSizeGB                *int                          `json:"osDiskSizeGB,omitempty"`
	OsDiskType                  *string                       `json:"osDiskType,omitempty"`
	OsSKU                       *string                       `json:"osSKU,omitempty"`
	OsType                      *string                       `json:"osType,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 containerservice.azure.com/ManagedCluster resource
	Owner *genruntime.KnownResourceReference `group:"containerservice.azure.com" json:"owner,omitempty" kind:"ManagedCluster"`

	// PodSubnetReference: If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details).
	// This is of the form:
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}
	PodSubnetReference *genruntime.ResourceReference `armReference:"PodSubnetID" json:"podSubnetReference,omitempty"`
	PowerState         *PowerState                   `json:"powerState,omitempty"`
	PropertyBag        genruntime.PropertyBag        `json:"$propertyBag,omitempty"`

	// ProximityPlacementGroupReference: The ID for Proximity Placement Group.
	ProximityPlacementGroupReference *genruntime.ResourceReference `armReference:"ProximityPlacementGroupID" json:"proximityPlacementGroupReference,omitempty"`
	ScaleDownMode                    *string                       `json:"scaleDownMode,omitempty"`
	ScaleSetEvictionPolicy           *string                       `json:"scaleSetEvictionPolicy,omitempty"`
	ScaleSetPriority                 *string                       `json:"scaleSetPriority,omitempty"`
	SpotMaxPrice                     *float64                      `json:"spotMaxPrice,omitempty"`
	Tags                             map[string]string             `json:"tags,omitempty" serializationType:"explicitEmptyCollection"`
	Type                             *string                       `json:"type,omitempty"`
	UpgradeSettings                  *AgentPoolUpgradeSettings     `json:"upgradeSettings,omitempty"`
	VmSize                           *string                       `json:"vmSize,omitempty"`

	// VnetSubnetReference: If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is
	// specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form:
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}
	VnetSubnetReference *genruntime.ResourceReference `armReference:"VnetSubnetID" json:"vnetSubnetReference,omitempty"`
	WorkloadRuntime     *string                       `json:"workloadRuntime,omitempty"`
}

var _ genruntime.ConvertibleSpec = &ManagedClusters_AgentPool_Spec{}

// ConvertSpecFrom populates our ManagedClusters_AgentPool_Spec from the provided source
func (pool *ManagedClusters_AgentPool_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error {
	src, ok := source.(*v20231001s.ManagedClusters_AgentPool_Spec)
	if ok {
		// Populate our instance from source
		return pool.AssignProperties_From_ManagedClusters_AgentPool_Spec(src)
	}

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

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

	return nil
}

// ConvertSpecTo populates the provided destination from our ManagedClusters_AgentPool_Spec
func (pool *ManagedClusters_AgentPool_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error {
	dst, ok := destination.(*v20231001s.ManagedClusters_AgentPool_Spec)
	if ok {
		// Populate destination from our instance
		return pool.AssignProperties_To_ManagedClusters_AgentPool_Spec(dst)
	}

	// Convert to an intermediate form
	dst = &v20231001s.ManagedClusters_AgentPool_Spec{}
	err := pool.AssignProperties_To_ManagedClusters_AgentPool_Spec(dst)
	if err != nil {
		return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()")
	}

	// Update dst from our instance
	err = dst.ConvertSpecTo(destination)
	if err != nil {
		return errors.Wrap(err, "final step of conversion in ConvertSpecTo()")
	}

	return nil
}

// AssignProperties_From_ManagedClusters_AgentPool_Spec populates our ManagedClusters_AgentPool_Spec from the provided source ManagedClusters_AgentPool_Spec
func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedClusters_AgentPool_Spec(source *v20231001s.ManagedClusters_AgentPool_Spec) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// AvailabilityZones
	pool.AvailabilityZones = genruntime.CloneSliceOfString(source.AvailabilityZones)

	// AzureName
	pool.AzureName = source.AzureName

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

	// Count
	pool.Count = genruntime.ClonePointerToInt(source.Count)

	// CreationData
	if source.CreationData != nil {
		var creationDatum CreationData
		err := creationDatum.AssignProperties_From_CreationData(source.CreationData)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_CreationData() to populate field CreationData")
		}
		pool.CreationData = &creationDatum
	} else {
		pool.CreationData = nil
	}

	// EnableAutoScaling
	if source.EnableAutoScaling != nil {
		enableAutoScaling := *source.EnableAutoScaling
		pool.EnableAutoScaling = &enableAutoScaling
	} else {
		pool.EnableAutoScaling = nil
	}

	// EnableEncryptionAtHost
	if source.EnableEncryptionAtHost != nil {
		enableEncryptionAtHost := *source.EnableEncryptionAtHost
		pool.EnableEncryptionAtHost = &enableEncryptionAtHost
	} else {
		pool.EnableEncryptionAtHost = nil
	}

	// EnableFIPS
	if source.EnableFIPS != nil {
		enableFIPS := *source.EnableFIPS
		pool.EnableFIPS = &enableFIPS
	} else {
		pool.EnableFIPS = nil
	}

	// EnableNodePublicIP
	if source.EnableNodePublicIP != nil {
		enableNodePublicIP := *source.EnableNodePublicIP
		pool.EnableNodePublicIP = &enableNodePublicIP
	} else {
		pool.EnableNodePublicIP = nil
	}

	// EnableUltraSSD
	if source.EnableUltraSSD != nil {
		enableUltraSSD := *source.EnableUltraSSD
		pool.EnableUltraSSD = &enableUltraSSD
	} else {
		pool.EnableUltraSSD = nil
	}

	// GpuInstanceProfile
	pool.GpuInstanceProfile = genruntime.ClonePointerToString(source.GpuInstanceProfile)

	// HostGroupReference
	if source.HostGroupReference != nil {
		hostGroupReference := source.HostGroupReference.Copy()
		pool.HostGroupReference = &hostGroupReference
	} else {
		pool.HostGroupReference = nil
	}

	// KubeletConfig
	if source.KubeletConfig != nil {
		var kubeletConfig KubeletConfig
		err := kubeletConfig.AssignProperties_From_KubeletConfig(source.KubeletConfig)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_KubeletConfig() to populate field KubeletConfig")
		}
		pool.KubeletConfig = &kubeletConfig
	} else {
		pool.KubeletConfig = nil
	}

	// KubeletDiskType
	pool.KubeletDiskType = genruntime.ClonePointerToString(source.KubeletDiskType)

	// LinuxOSConfig
	if source.LinuxOSConfig != nil {
		var linuxOSConfig LinuxOSConfig
		err := linuxOSConfig.AssignProperties_From_LinuxOSConfig(source.LinuxOSConfig)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_LinuxOSConfig() to populate field LinuxOSConfig")
		}
		pool.LinuxOSConfig = &linuxOSConfig
	} else {
		pool.LinuxOSConfig = nil
	}

	// MaxCount
	pool.MaxCount = genruntime.ClonePointerToInt(source.MaxCount)

	// MaxPods
	pool.MaxPods = genruntime.ClonePointerToInt(source.MaxPods)

	// MinCount
	pool.MinCount = genruntime.ClonePointerToInt(source.MinCount)

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

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

	// NodeLabels
	pool.NodeLabels = genruntime.CloneMapOfStringToString(source.NodeLabels)

	// NodePublicIPPrefixReference
	if source.NodePublicIPPrefixReference != nil {
		nodePublicIPPrefixReference := source.NodePublicIPPrefixReference.Copy()
		pool.NodePublicIPPrefixReference = &nodePublicIPPrefixReference
	} else {
		pool.NodePublicIPPrefixReference = nil
	}

	// NodeTaints
	pool.NodeTaints = genruntime.CloneSliceOfString(source.NodeTaints)

	// OrchestratorVersion
	pool.OrchestratorVersion = genruntime.ClonePointerToString(source.OrchestratorVersion)

	// OriginalVersion
	pool.OriginalVersion = source.OriginalVersion

	// OsDiskSizeGB
	pool.OsDiskSizeGB = genruntime.ClonePointerToInt(source.OsDiskSizeGB)

	// OsDiskType
	pool.OsDiskType = genruntime.ClonePointerToString(source.OsDiskType)

	// OsSKU
	pool.OsSKU = genruntime.ClonePointerToString(source.OsSKU)

	// OsType
	pool.OsType = genruntime.ClonePointerToString(source.OsType)

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

	// PodSubnetReference
	if source.PodSubnetReference != nil {
		podSubnetReference := source.PodSubnetReference.Copy()
		pool.PodSubnetReference = &podSubnetReference
	} else {
		pool.PodSubnetReference = nil
	}

	// PowerState
	if source.PowerState != nil {
		var powerState PowerState
		err := powerState.AssignProperties_From_PowerState(source.PowerState)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_PowerState() to populate field PowerState")
		}
		pool.PowerState = &powerState
	} else {
		pool.PowerState = nil
	}

	// ProximityPlacementGroupReference
	if source.ProximityPlacementGroupReference != nil {
		proximityPlacementGroupReference := source.ProximityPlacementGroupReference.Copy()
		pool.ProximityPlacementGroupReference = &proximityPlacementGroupReference
	} else {
		pool.ProximityPlacementGroupReference = nil
	}

	// ScaleDownMode
	pool.ScaleDownMode = genruntime.ClonePointerToString(source.ScaleDownMode)

	// ScaleSetEvictionPolicy
	pool.ScaleSetEvictionPolicy = genruntime.ClonePointerToString(source.ScaleSetEvictionPolicy)

	// ScaleSetPriority
	pool.ScaleSetPriority = genruntime.ClonePointerToString(source.ScaleSetPriority)

	// SpotMaxPrice
	if source.SpotMaxPrice != nil {
		spotMaxPrice := *source.SpotMaxPrice
		pool.SpotMaxPrice = &spotMaxPrice
	} else {
		pool.SpotMaxPrice = nil
	}

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

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

	// UpgradeSettings
	if source.UpgradeSettings != nil {
		var upgradeSetting AgentPoolUpgradeSettings
		err := upgradeSetting.AssignProperties_From_AgentPoolUpgradeSettings(source.UpgradeSettings)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_AgentPoolUpgradeSettings() to populate field UpgradeSettings")
		}
		pool.UpgradeSettings = &upgradeSetting
	} else {
		pool.UpgradeSettings = nil
	}

	// VmSize
	pool.VmSize = genruntime.ClonePointerToString(source.VmSize)

	// VnetSubnetReference
	if source.VnetSubnetReference != nil {
		vnetSubnetReference := source.VnetSubnetReference.Copy()
		pool.VnetSubnetReference = &vnetSubnetReference
	} else {
		pool.VnetSubnetReference = nil
	}

	// WorkloadRuntime
	pool.WorkloadRuntime = genruntime.ClonePointerToString(source.WorkloadRuntime)

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

	// Invoke the augmentConversionForManagedClusters_AgentPool_Spec interface (if implemented) to customize the conversion
	var poolAsAny any = pool
	if augmentedPool, ok := poolAsAny.(augmentConversionForManagedClusters_AgentPool_Spec); ok {
		err := augmentedPool.AssignPropertiesFrom(source)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusters_AgentPool_Spec populates the provided destination ManagedClusters_AgentPool_Spec from our ManagedClusters_AgentPool_Spec
func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_To_ManagedClusters_AgentPool_Spec(destination *v20231001s.ManagedClusters_AgentPool_Spec) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(pool.PropertyBag)

	// AvailabilityZones
	destination.AvailabilityZones = genruntime.CloneSliceOfString(pool.AvailabilityZones)

	// AzureName
	destination.AzureName = pool.AzureName

	// CapacityReservationGroupReference
	if propertyBag.Contains("CapacityReservationGroupReference") {
		var capacityReservationGroupReference genruntime.ResourceReference
		err := propertyBag.Pull("CapacityReservationGroupReference", &capacityReservationGroupReference)
		if err != nil {
			return errors.Wrap(err, "pulling 'CapacityReservationGroupReference' from propertyBag")
		}

		destination.CapacityReservationGroupReference = &capacityReservationGroupReference
	} else {
		destination.CapacityReservationGroupReference = nil
	}

	// Count
	destination.Count = genruntime.ClonePointerToInt(pool.Count)

	// CreationData
	if pool.CreationData != nil {
		var creationDatum v20231001s.CreationData
		err := pool.CreationData.AssignProperties_To_CreationData(&creationDatum)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_CreationData() to populate field CreationData")
		}
		destination.CreationData = &creationDatum
	} else {
		destination.CreationData = nil
	}

	// EnableAutoScaling
	if pool.EnableAutoScaling != nil {
		enableAutoScaling := *pool.EnableAutoScaling
		destination.EnableAutoScaling = &enableAutoScaling
	} else {
		destination.EnableAutoScaling = nil
	}

	// EnableEncryptionAtHost
	if pool.EnableEncryptionAtHost != nil {
		enableEncryptionAtHost := *pool.EnableEncryptionAtHost
		destination.EnableEncryptionAtHost = &enableEncryptionAtHost
	} else {
		destination.EnableEncryptionAtHost = nil
	}

	// EnableFIPS
	if pool.EnableFIPS != nil {
		enableFIPS := *pool.EnableFIPS
		destination.EnableFIPS = &enableFIPS
	} else {
		destination.EnableFIPS = nil
	}

	// EnableNodePublicIP
	if pool.EnableNodePublicIP != nil {
		enableNodePublicIP := *pool.EnableNodePublicIP
		destination.EnableNodePublicIP = &enableNodePublicIP
	} else {
		destination.EnableNodePublicIP = nil
	}

	// EnableUltraSSD
	if pool.EnableUltraSSD != nil {
		enableUltraSSD := *pool.EnableUltraSSD
		destination.EnableUltraSSD = &enableUltraSSD
	} else {
		destination.EnableUltraSSD = nil
	}

	// GpuInstanceProfile
	destination.GpuInstanceProfile = genruntime.ClonePointerToString(pool.GpuInstanceProfile)

	// HostGroupReference
	if pool.HostGroupReference != nil {
		hostGroupReference := pool.HostGroupReference.Copy()
		destination.HostGroupReference = &hostGroupReference
	} else {
		destination.HostGroupReference = nil
	}

	// KubeletConfig
	if pool.KubeletConfig != nil {
		var kubeletConfig v20231001s.KubeletConfig
		err := pool.KubeletConfig.AssignProperties_To_KubeletConfig(&kubeletConfig)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_KubeletConfig() to populate field KubeletConfig")
		}
		destination.KubeletConfig = &kubeletConfig
	} else {
		destination.KubeletConfig = nil
	}

	// KubeletDiskType
	destination.KubeletDiskType = genruntime.ClonePointerToString(pool.KubeletDiskType)

	// LinuxOSConfig
	if pool.LinuxOSConfig != nil {
		var linuxOSConfig v20231001s.LinuxOSConfig
		err := pool.LinuxOSConfig.AssignProperties_To_LinuxOSConfig(&linuxOSConfig)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_LinuxOSConfig() to populate field LinuxOSConfig")
		}
		destination.LinuxOSConfig = &linuxOSConfig
	} else {
		destination.LinuxOSConfig = nil
	}

	// MaxCount
	destination.MaxCount = genruntime.ClonePointerToInt(pool.MaxCount)

	// MaxPods
	destination.MaxPods = genruntime.ClonePointerToInt(pool.MaxPods)

	// MinCount
	destination.MinCount = genruntime.ClonePointerToInt(pool.MinCount)

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

	// NetworkProfile
	if propertyBag.Contains("NetworkProfile") {
		var networkProfile v20231001s.AgentPoolNetworkProfile
		err := propertyBag.Pull("NetworkProfile", &networkProfile)
		if err != nil {
			return errors.Wrap(err, "pulling 'NetworkProfile' from propertyBag")
		}

		destination.NetworkProfile = &networkProfile
	} else {
		destination.NetworkProfile = nil
	}

	// NodeLabels
	destination.NodeLabels = genruntime.CloneMapOfStringToString(pool.NodeLabels)

	// NodePublicIPPrefixReference
	if pool.NodePublicIPPrefixReference != nil {
		nodePublicIPPrefixReference := pool.NodePublicIPPrefixReference.Copy()
		destination.NodePublicIPPrefixReference = &nodePublicIPPrefixReference
	} else {
		destination.NodePublicIPPrefixReference = nil
	}

	// NodeTaints
	destination.NodeTaints = genruntime.CloneSliceOfString(pool.NodeTaints)

	// OrchestratorVersion
	destination.OrchestratorVersion = genruntime.ClonePointerToString(pool.OrchestratorVersion)

	// OriginalVersion
	destination.OriginalVersion = pool.OriginalVersion

	// OsDiskSizeGB
	destination.OsDiskSizeGB = genruntime.ClonePointerToInt(pool.OsDiskSizeGB)

	// OsDiskType
	destination.OsDiskType = genruntime.ClonePointerToString(pool.OsDiskType)

	// OsSKU
	destination.OsSKU = genruntime.ClonePointerToString(pool.OsSKU)

	// OsType
	destination.OsType = genruntime.ClonePointerToString(pool.OsType)

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

	// PodSubnetReference
	if pool.PodSubnetReference != nil {
		podSubnetReference := pool.PodSubnetReference.Copy()
		destination.PodSubnetReference = &podSubnetReference
	} else {
		destination.PodSubnetReference = nil
	}

	// PowerState
	if pool.PowerState != nil {
		var powerState v20231001s.PowerState
		err := pool.PowerState.AssignProperties_To_PowerState(&powerState)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_PowerState() to populate field PowerState")
		}
		destination.PowerState = &powerState
	} else {
		destination.PowerState = nil
	}

	// ProximityPlacementGroupReference
	if pool.ProximityPlacementGroupReference != nil {
		proximityPlacementGroupReference := pool.ProximityPlacementGroupReference.Copy()
		destination.ProximityPlacementGroupReference = &proximityPlacementGroupReference
	} else {
		destination.ProximityPlacementGroupReference = nil
	}

	// ScaleDownMode
	destination.ScaleDownMode = genruntime.ClonePointerToString(pool.ScaleDownMode)

	// ScaleSetEvictionPolicy
	destination.ScaleSetEvictionPolicy = genruntime.ClonePointerToString(pool.ScaleSetEvictionPolicy)

	// ScaleSetPriority
	destination.ScaleSetPriority = genruntime.ClonePointerToString(pool.ScaleSetPriority)

	// SpotMaxPrice
	if pool.SpotMaxPrice != nil {
		spotMaxPrice := *pool.SpotMaxPrice
		destination.SpotMaxPrice = &spotMaxPrice
	} else {
		destination.SpotMaxPrice = nil
	}

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

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

	// UpgradeSettings
	if pool.UpgradeSettings != nil {
		var upgradeSetting v20231001s.AgentPoolUpgradeSettings
		err := pool.UpgradeSettings.AssignProperties_To_AgentPoolUpgradeSettings(&upgradeSetting)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_AgentPoolUpgradeSettings() to populate field UpgradeSettings")
		}
		destination.UpgradeSettings = &upgradeSetting
	} else {
		destination.UpgradeSettings = nil
	}

	// VmSize
	destination.VmSize = genruntime.ClonePointerToString(pool.VmSize)

	// VnetSubnetReference
	if pool.VnetSubnetReference != nil {
		vnetSubnetReference := pool.VnetSubnetReference.Copy()
		destination.VnetSubnetReference = &vnetSubnetReference
	} else {
		destination.VnetSubnetReference = nil
	}

	// WorkloadRuntime
	destination.WorkloadRuntime = genruntime.ClonePointerToString(pool.WorkloadRuntime)

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

	// Invoke the augmentConversionForManagedClusters_AgentPool_Spec interface (if implemented) to customize the conversion
	var poolAsAny any = pool
	if augmentedPool, ok := poolAsAny.(augmentConversionForManagedClusters_AgentPool_Spec); ok {
		err := augmentedPool.AssignPropertiesTo(destination)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20230201.ManagedClusters_AgentPool_STATUS
type ManagedClusters_AgentPool_STATUS struct {
	AvailabilityZones          []string                         `json:"availabilityZones,omitempty"`
	Conditions                 []conditions.Condition           `json:"conditions,omitempty"`
	Count                      *int                             `json:"count,omitempty"`
	CreationData               *CreationData_STATUS             `json:"creationData,omitempty"`
	CurrentOrchestratorVersion *string                          `json:"currentOrchestratorVersion,omitempty"`
	EnableAutoScaling          *bool                            `json:"enableAutoScaling,omitempty"`
	EnableEncryptionAtHost     *bool                            `json:"enableEncryptionAtHost,omitempty"`
	EnableFIPS                 *bool                            `json:"enableFIPS,omitempty"`
	EnableNodePublicIP         *bool                            `json:"enableNodePublicIP,omitempty"`
	EnableUltraSSD             *bool                            `json:"enableUltraSSD,omitempty"`
	GpuInstanceProfile         *string                          `json:"gpuInstanceProfile,omitempty"`
	HostGroupID                *string                          `json:"hostGroupID,omitempty"`
	Id                         *string                          `json:"id,omitempty"`
	KubeletConfig              *KubeletConfig_STATUS            `json:"kubeletConfig,omitempty"`
	KubeletDiskType            *string                          `json:"kubeletDiskType,omitempty"`
	LinuxOSConfig              *LinuxOSConfig_STATUS            `json:"linuxOSConfig,omitempty"`
	MaxCount                   *int                             `json:"maxCount,omitempty"`
	MaxPods                    *int                             `json:"maxPods,omitempty"`
	MinCount                   *int                             `json:"minCount,omitempty"`
	Mode                       *string                          `json:"mode,omitempty"`
	Name                       *string                          `json:"name,omitempty"`
	NodeImageVersion           *string                          `json:"nodeImageVersion,omitempty"`
	NodeLabels                 map[string]string                `json:"nodeLabels,omitempty"`
	NodePublicIPPrefixID       *string                          `json:"nodePublicIPPrefixID,omitempty"`
	NodeTaints                 []string                         `json:"nodeTaints,omitempty"`
	OrchestratorVersion        *string                          `json:"orchestratorVersion,omitempty"`
	OsDiskSizeGB               *int                             `json:"osDiskSizeGB,omitempty"`
	OsDiskType                 *string                          `json:"osDiskType,omitempty"`
	OsSKU                      *string                          `json:"osSKU,omitempty"`
	OsType                     *string                          `json:"osType,omitempty"`
	PodSubnetID                *string                          `json:"podSubnetID,omitempty"`
	PowerState                 *PowerState_STATUS               `json:"powerState,omitempty"`
	PropertiesType             *string                          `json:"properties_type,omitempty"`
	PropertyBag                genruntime.PropertyBag           `json:"$propertyBag,omitempty"`
	ProvisioningState          *string                          `json:"provisioningState,omitempty"`
	ProximityPlacementGroupID  *string                          `json:"proximityPlacementGroupID,omitempty"`
	ScaleDownMode              *string                          `json:"scaleDownMode,omitempty"`
	ScaleSetEvictionPolicy     *string                          `json:"scaleSetEvictionPolicy,omitempty"`
	ScaleSetPriority           *string                          `json:"scaleSetPriority,omitempty"`
	SpotMaxPrice               *float64                         `json:"spotMaxPrice,omitempty"`
	Tags                       map[string]string                `json:"tags,omitempty"`
	Type                       *string                          `json:"type,omitempty"`
	UpgradeSettings            *AgentPoolUpgradeSettings_STATUS `json:"upgradeSettings,omitempty"`
	VmSize                     *string                          `json:"vmSize,omitempty"`
	VnetSubnetID               *string                          `json:"vnetSubnetID,omitempty"`
	WorkloadRuntime            *string                          `json:"workloadRuntime,omitempty"`
}

var _ genruntime.ConvertibleStatus = &ManagedClusters_AgentPool_STATUS{}

// ConvertStatusFrom populates our ManagedClusters_AgentPool_STATUS from the provided source
func (pool *ManagedClusters_AgentPool_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error {
	src, ok := source.(*v20231001s.ManagedClusters_AgentPool_STATUS)
	if ok {
		// Populate our instance from source
		return pool.AssignProperties_From_ManagedClusters_AgentPool_STATUS(src)
	}

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

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

	return nil
}

// ConvertStatusTo populates the provided destination from our ManagedClusters_AgentPool_STATUS
func (pool *ManagedClusters_AgentPool_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error {
	dst, ok := destination.(*v20231001s.ManagedClusters_AgentPool_STATUS)
	if ok {
		// Populate destination from our instance
		return pool.AssignProperties_To_ManagedClusters_AgentPool_STATUS(dst)
	}

	// Convert to an intermediate form
	dst = &v20231001s.ManagedClusters_AgentPool_STATUS{}
	err := pool.AssignProperties_To_ManagedClusters_AgentPool_STATUS(dst)
	if err != nil {
		return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()")
	}

	// Update dst from our instance
	err = dst.ConvertStatusTo(destination)
	if err != nil {
		return errors.Wrap(err, "final step of conversion in ConvertStatusTo()")
	}

	return nil
}

// AssignProperties_From_ManagedClusters_AgentPool_STATUS populates our ManagedClusters_AgentPool_STATUS from the provided source ManagedClusters_AgentPool_STATUS
func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClusters_AgentPool_STATUS(source *v20231001s.ManagedClusters_AgentPool_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// AvailabilityZones
	pool.AvailabilityZones = genruntime.CloneSliceOfString(source.AvailabilityZones)

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

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

	// Count
	pool.Count = genruntime.ClonePointerToInt(source.Count)

	// CreationData
	if source.CreationData != nil {
		var creationDatum CreationData_STATUS
		err := creationDatum.AssignProperties_From_CreationData_STATUS(source.CreationData)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_CreationData_STATUS() to populate field CreationData")
		}
		pool.CreationData = &creationDatum
	} else {
		pool.CreationData = nil
	}

	// CurrentOrchestratorVersion
	pool.CurrentOrchestratorVersion = genruntime.ClonePointerToString(source.CurrentOrchestratorVersion)

	// EnableAutoScaling
	if source.EnableAutoScaling != nil {
		enableAutoScaling := *source.EnableAutoScaling
		pool.EnableAutoScaling = &enableAutoScaling
	} else {
		pool.EnableAutoScaling = nil
	}

	// EnableEncryptionAtHost
	if source.EnableEncryptionAtHost != nil {
		enableEncryptionAtHost := *source.EnableEncryptionAtHost
		pool.EnableEncryptionAtHost = &enableEncryptionAtHost
	} else {
		pool.EnableEncryptionAtHost = nil
	}

	// EnableFIPS
	if source.EnableFIPS != nil {
		enableFIPS := *source.EnableFIPS
		pool.EnableFIPS = &enableFIPS
	} else {
		pool.EnableFIPS = nil
	}

	// EnableNodePublicIP
	if source.EnableNodePublicIP != nil {
		enableNodePublicIP := *source.EnableNodePublicIP
		pool.EnableNodePublicIP = &enableNodePublicIP
	} else {
		pool.EnableNodePublicIP = nil
	}

	// EnableUltraSSD
	if source.EnableUltraSSD != nil {
		enableUltraSSD := *source.EnableUltraSSD
		pool.EnableUltraSSD = &enableUltraSSD
	} else {
		pool.EnableUltraSSD = nil
	}

	// GpuInstanceProfile
	pool.GpuInstanceProfile = genruntime.ClonePointerToString(source.GpuInstanceProfile)

	// HostGroupID
	pool.HostGroupID = genruntime.ClonePointerToString(source.HostGroupID)

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

	// KubeletConfig
	if source.KubeletConfig != nil {
		var kubeletConfig KubeletConfig_STATUS
		err := kubeletConfig.AssignProperties_From_KubeletConfig_STATUS(source.KubeletConfig)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_KubeletConfig_STATUS() to populate field KubeletConfig")
		}
		pool.KubeletConfig = &kubeletConfig
	} else {
		pool.KubeletConfig = nil
	}

	// KubeletDiskType
	pool.KubeletDiskType = genruntime.ClonePointerToString(source.KubeletDiskType)

	// LinuxOSConfig
	if source.LinuxOSConfig != nil {
		var linuxOSConfig LinuxOSConfig_STATUS
		err := linuxOSConfig.AssignProperties_From_LinuxOSConfig_STATUS(source.LinuxOSConfig)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_LinuxOSConfig_STATUS() to populate field LinuxOSConfig")
		}
		pool.LinuxOSConfig = &linuxOSConfig
	} else {
		pool.LinuxOSConfig = nil
	}

	// MaxCount
	pool.MaxCount = genruntime.ClonePointerToInt(source.MaxCount)

	// MaxPods
	pool.MaxPods = genruntime.ClonePointerToInt(source.MaxPods)

	// MinCount
	pool.MinCount = genruntime.ClonePointerToInt(source.MinCount)

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

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

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

	// NodeImageVersion
	pool.NodeImageVersion = genruntime.ClonePointerToString(source.NodeImageVersion)

	// NodeLabels
	pool.NodeLabels = genruntime.CloneMapOfStringToString(source.NodeLabels)

	// NodePublicIPPrefixID
	pool.NodePublicIPPrefixID = genruntime.ClonePointerToString(source.NodePublicIPPrefixID)

	// NodeTaints
	pool.NodeTaints = genruntime.CloneSliceOfString(source.NodeTaints)

	// OrchestratorVersion
	pool.OrchestratorVersion = genruntime.ClonePointerToString(source.OrchestratorVersion)

	// OsDiskSizeGB
	pool.OsDiskSizeGB = genruntime.ClonePointerToInt(source.OsDiskSizeGB)

	// OsDiskType
	pool.OsDiskType = genruntime.ClonePointerToString(source.OsDiskType)

	// OsSKU
	pool.OsSKU = genruntime.ClonePointerToString(source.OsSKU)

	// OsType
	pool.OsType = genruntime.ClonePointerToString(source.OsType)

	// PodSubnetID
	pool.PodSubnetID = genruntime.ClonePointerToString(source.PodSubnetID)

	// PowerState
	if source.PowerState != nil {
		var powerState PowerState_STATUS
		err := powerState.AssignProperties_From_PowerState_STATUS(source.PowerState)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_PowerState_STATUS() to populate field PowerState")
		}
		pool.PowerState = &powerState
	} else {
		pool.PowerState = nil
	}

	// PropertiesType
	pool.PropertiesType = genruntime.ClonePointerToString(source.PropertiesType)

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

	// ProximityPlacementGroupID
	pool.ProximityPlacementGroupID = genruntime.ClonePointerToString(source.ProximityPlacementGroupID)

	// ScaleDownMode
	pool.ScaleDownMode = genruntime.ClonePointerToString(source.ScaleDownMode)

	// ScaleSetEvictionPolicy
	pool.ScaleSetEvictionPolicy = genruntime.ClonePointerToString(source.ScaleSetEvictionPolicy)

	// ScaleSetPriority
	pool.ScaleSetPriority = genruntime.ClonePointerToString(source.ScaleSetPriority)

	// SpotMaxPrice
	if source.SpotMaxPrice != nil {
		spotMaxPrice := *source.SpotMaxPrice
		pool.SpotMaxPrice = &spotMaxPrice
	} else {
		pool.SpotMaxPrice = nil
	}

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

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

	// UpgradeSettings
	if source.UpgradeSettings != nil {
		var upgradeSetting AgentPoolUpgradeSettings_STATUS
		err := upgradeSetting.AssignProperties_From_AgentPoolUpgradeSettings_STATUS(source.UpgradeSettings)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_AgentPoolUpgradeSettings_STATUS() to populate field UpgradeSettings")
		}
		pool.UpgradeSettings = &upgradeSetting
	} else {
		pool.UpgradeSettings = nil
	}

	// VmSize
	pool.VmSize = genruntime.ClonePointerToString(source.VmSize)

	// VnetSubnetID
	pool.VnetSubnetID = genruntime.ClonePointerToString(source.VnetSubnetID)

	// WorkloadRuntime
	pool.WorkloadRuntime = genruntime.ClonePointerToString(source.WorkloadRuntime)

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

	// Invoke the augmentConversionForManagedClusters_AgentPool_STATUS interface (if implemented) to customize the conversion
	var poolAsAny any = pool
	if augmentedPool, ok := poolAsAny.(augmentConversionForManagedClusters_AgentPool_STATUS); ok {
		err := augmentedPool.AssignPropertiesFrom(source)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusters_AgentPool_STATUS populates the provided destination ManagedClusters_AgentPool_STATUS from our ManagedClusters_AgentPool_STATUS
func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_To_ManagedClusters_AgentPool_STATUS(destination *v20231001s.ManagedClusters_AgentPool_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(pool.PropertyBag)

	// AvailabilityZones
	destination.AvailabilityZones = genruntime.CloneSliceOfString(pool.AvailabilityZones)

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

		destination.CapacityReservationGroupID = &capacityReservationGroupID
	} else {
		destination.CapacityReservationGroupID = nil
	}

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

	// Count
	destination.Count = genruntime.ClonePointerToInt(pool.Count)

	// CreationData
	if pool.CreationData != nil {
		var creationDatum v20231001s.CreationData_STATUS
		err := pool.CreationData.AssignProperties_To_CreationData_STATUS(&creationDatum)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_CreationData_STATUS() to populate field CreationData")
		}
		destination.CreationData = &creationDatum
	} else {
		destination.CreationData = nil
	}

	// CurrentOrchestratorVersion
	destination.CurrentOrchestratorVersion = genruntime.ClonePointerToString(pool.CurrentOrchestratorVersion)

	// EnableAutoScaling
	if pool.EnableAutoScaling != nil {
		enableAutoScaling := *pool.EnableAutoScaling
		destination.EnableAutoScaling = &enableAutoScaling
	} else {
		destination.EnableAutoScaling = nil
	}

	// EnableEncryptionAtHost
	if pool.EnableEncryptionAtHost != nil {
		enableEncryptionAtHost := *pool.EnableEncryptionAtHost
		destination.EnableEncryptionAtHost = &enableEncryptionAtHost
	} else {
		destination.EnableEncryptionAtHost = nil
	}

	// EnableFIPS
	if pool.EnableFIPS != nil {
		enableFIPS := *pool.EnableFIPS
		destination.EnableFIPS = &enableFIPS
	} else {
		destination.EnableFIPS = nil
	}

	// EnableNodePublicIP
	if pool.EnableNodePublicIP != nil {
		enableNodePublicIP := *pool.EnableNodePublicIP
		destination.EnableNodePublicIP = &enableNodePublicIP
	} else {
		destination.EnableNodePublicIP = nil
	}

	// EnableUltraSSD
	if pool.EnableUltraSSD != nil {
		enableUltraSSD := *pool.EnableUltraSSD
		destination.EnableUltraSSD = &enableUltraSSD
	} else {
		destination.EnableUltraSSD = nil
	}

	// GpuInstanceProfile
	destination.GpuInstanceProfile = genruntime.ClonePointerToString(pool.GpuInstanceProfile)

	// HostGroupID
	destination.HostGroupID = genruntime.ClonePointerToString(pool.HostGroupID)

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

	// KubeletConfig
	if pool.KubeletConfig != nil {
		var kubeletConfig v20231001s.KubeletConfig_STATUS
		err := pool.KubeletConfig.AssignProperties_To_KubeletConfig_STATUS(&kubeletConfig)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_KubeletConfig_STATUS() to populate field KubeletConfig")
		}
		destination.KubeletConfig = &kubeletConfig
	} else {
		destination.KubeletConfig = nil
	}

	// KubeletDiskType
	destination.KubeletDiskType = genruntime.ClonePointerToString(pool.KubeletDiskType)

	// LinuxOSConfig
	if pool.LinuxOSConfig != nil {
		var linuxOSConfig v20231001s.LinuxOSConfig_STATUS
		err := pool.LinuxOSConfig.AssignProperties_To_LinuxOSConfig_STATUS(&linuxOSConfig)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_LinuxOSConfig_STATUS() to populate field LinuxOSConfig")
		}
		destination.LinuxOSConfig = &linuxOSConfig
	} else {
		destination.LinuxOSConfig = nil
	}

	// MaxCount
	destination.MaxCount = genruntime.ClonePointerToInt(pool.MaxCount)

	// MaxPods
	destination.MaxPods = genruntime.ClonePointerToInt(pool.MaxPods)

	// MinCount
	destination.MinCount = genruntime.ClonePointerToInt(pool.MinCount)

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

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

	// NetworkProfile
	if propertyBag.Contains("NetworkProfile") {
		var networkProfile v20231001s.AgentPoolNetworkProfile_STATUS
		err := propertyBag.Pull("NetworkProfile", &networkProfile)
		if err != nil {
			return errors.Wrap(err, "pulling 'NetworkProfile' from propertyBag")
		}

		destination.NetworkProfile = &networkProfile
	} else {
		destination.NetworkProfile = nil
	}

	// NodeImageVersion
	destination.NodeImageVersion = genruntime.ClonePointerToString(pool.NodeImageVersion)

	// NodeLabels
	destination.NodeLabels = genruntime.CloneMapOfStringToString(pool.NodeLabels)

	// NodePublicIPPrefixID
	destination.NodePublicIPPrefixID = genruntime.ClonePointerToString(pool.NodePublicIPPrefixID)

	// NodeTaints
	destination.NodeTaints = genruntime.CloneSliceOfString(pool.NodeTaints)

	// OrchestratorVersion
	destination.OrchestratorVersion = genruntime.ClonePointerToString(pool.OrchestratorVersion)

	// OsDiskSizeGB
	destination.OsDiskSizeGB = genruntime.ClonePointerToInt(pool.OsDiskSizeGB)

	// OsDiskType
	destination.OsDiskType = genruntime.ClonePointerToString(pool.OsDiskType)

	// OsSKU
	destination.OsSKU = genruntime.ClonePointerToString(pool.OsSKU)

	// OsType
	destination.OsType = genruntime.ClonePointerToString(pool.OsType)

	// PodSubnetID
	destination.PodSubnetID = genruntime.ClonePointerToString(pool.PodSubnetID)

	// PowerState
	if pool.PowerState != nil {
		var powerState v20231001s.PowerState_STATUS
		err := pool.PowerState.AssignProperties_To_PowerState_STATUS(&powerState)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_PowerState_STATUS() to populate field PowerState")
		}
		destination.PowerState = &powerState
	} else {
		destination.PowerState = nil
	}

	// PropertiesType
	destination.PropertiesType = genruntime.ClonePointerToString(pool.PropertiesType)

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

	// ProximityPlacementGroupID
	destination.ProximityPlacementGroupID = genruntime.ClonePointerToString(pool.ProximityPlacementGroupID)

	// ScaleDownMode
	destination.ScaleDownMode = genruntime.ClonePointerToString(pool.ScaleDownMode)

	// ScaleSetEvictionPolicy
	destination.ScaleSetEvictionPolicy = genruntime.ClonePointerToString(pool.ScaleSetEvictionPolicy)

	// ScaleSetPriority
	destination.ScaleSetPriority = genruntime.ClonePointerToString(pool.ScaleSetPriority)

	// SpotMaxPrice
	if pool.SpotMaxPrice != nil {
		spotMaxPrice := *pool.SpotMaxPrice
		destination.SpotMaxPrice = &spotMaxPrice
	} else {
		destination.SpotMaxPrice = nil
	}

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

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

	// UpgradeSettings
	if pool.UpgradeSettings != nil {
		var upgradeSetting v20231001s.AgentPoolUpgradeSettings_STATUS
		err := pool.UpgradeSettings.AssignProperties_To_AgentPoolUpgradeSettings_STATUS(&upgradeSetting)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_AgentPoolUpgradeSettings_STATUS() to populate field UpgradeSettings")
		}
		destination.UpgradeSettings = &upgradeSetting
	} else {
		destination.UpgradeSettings = nil
	}

	// VmSize
	destination.VmSize = genruntime.ClonePointerToString(pool.VmSize)

	// VnetSubnetID
	destination.VnetSubnetID = genruntime.ClonePointerToString(pool.VnetSubnetID)

	// WorkloadRuntime
	destination.WorkloadRuntime = genruntime.ClonePointerToString(pool.WorkloadRuntime)

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

	// Invoke the augmentConversionForManagedClusters_AgentPool_STATUS interface (if implemented) to customize the conversion
	var poolAsAny any = pool
	if augmentedPool, ok := poolAsAny.(augmentConversionForManagedClusters_AgentPool_STATUS); ok {
		err := augmentedPool.AssignPropertiesTo(destination)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20230201.AgentPoolUpgradeSettings
// Settings for upgrading an agentpool
type AgentPoolUpgradeSettings struct {
	MaxSurge    *string                `json:"maxSurge,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

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

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

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

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

	// No error
	return nil
}

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

	// DrainTimeoutInMinutes
	if propertyBag.Contains("DrainTimeoutInMinutes") {
		var drainTimeoutInMinute int
		err := propertyBag.Pull("DrainTimeoutInMinutes", &drainTimeoutInMinute)
		if err != nil {
			return errors.Wrap(err, "pulling 'DrainTimeoutInMinutes' from propertyBag")
		}

		destination.DrainTimeoutInMinutes = &drainTimeoutInMinute
	} else {
		destination.DrainTimeoutInMinutes = nil
	}

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

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

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

	// No error
	return nil
}

// Storage version of v1api20230201.AgentPoolUpgradeSettings_STATUS
// Settings for upgrading an agentpool
type AgentPoolUpgradeSettings_STATUS struct {
	MaxSurge    *string                `json:"maxSurge,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

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

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

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

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

	// No error
	return nil
}

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

	// DrainTimeoutInMinutes
	if propertyBag.Contains("DrainTimeoutInMinutes") {
		var drainTimeoutInMinute int
		err := propertyBag.Pull("DrainTimeoutInMinutes", &drainTimeoutInMinute)
		if err != nil {
			return errors.Wrap(err, "pulling 'DrainTimeoutInMinutes' from propertyBag")
		}

		destination.DrainTimeoutInMinutes = &drainTimeoutInMinute
	} else {
		destination.DrainTimeoutInMinutes = nil
	}

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

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

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

	// No error
	return nil
}

type augmentConversionForManagedClusters_AgentPool_Spec interface {
	AssignPropertiesFrom(src *v20231001s.ManagedClusters_AgentPool_Spec) error
	AssignPropertiesTo(dst *v20231001s.ManagedClusters_AgentPool_Spec) error
}

type augmentConversionForManagedClusters_AgentPool_STATUS interface {
	AssignPropertiesFrom(src *v20231001s.ManagedClusters_AgentPool_STATUS) error
	AssignPropertiesTo(dst *v20231001s.ManagedClusters_AgentPool_STATUS) error
}

// Storage version of v1api20230201.CreationData
// Data used when creating a target resource from a source resource.
type CreationData struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`

	// SourceResourceReference: This is the ARM ID of the source object to be used to create the target object.
	SourceResourceReference *genruntime.ResourceReference `armReference:"SourceResourceId" json:"sourceResourceReference,omitempty"`
}

// AssignProperties_From_CreationData populates our CreationData from the provided source CreationData
func (data *CreationData) AssignProperties_From_CreationData(source *v20231001s.CreationData) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// SourceResourceReference
	if source.SourceResourceReference != nil {
		sourceResourceReference := source.SourceResourceReference.Copy()
		data.SourceResourceReference = &sourceResourceReference
	} else {
		data.SourceResourceReference = nil
	}

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

	// Invoke the augmentConversionForCreationData interface (if implemented) to customize the conversion
	var dataAsAny any = data
	if augmentedData, ok := dataAsAny.(augmentConversionForCreationData); ok {
		err := augmentedData.AssignPropertiesFrom(source)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_CreationData populates the provided destination CreationData from our CreationData
func (data *CreationData) AssignProperties_To_CreationData(destination *v20231001s.CreationData) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(data.PropertyBag)

	// SourceResourceReference
	if data.SourceResourceReference != nil {
		sourceResourceReference := data.SourceResourceReference.Copy()
		destination.SourceResourceReference = &sourceResourceReference
	} else {
		destination.SourceResourceReference = nil
	}

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

	// Invoke the augmentConversionForCreationData interface (if implemented) to customize the conversion
	var dataAsAny any = data
	if augmentedData, ok := dataAsAny.(augmentConversionForCreationData); ok {
		err := augmentedData.AssignPropertiesTo(destination)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20230201.CreationData_STATUS
// Data used when creating a target resource from a source resource.
type CreationData_STATUS struct {
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SourceResourceId *string                `json:"sourceResourceId,omitempty"`
}

// AssignProperties_From_CreationData_STATUS populates our CreationData_STATUS from the provided source CreationData_STATUS
func (data *CreationData_STATUS) AssignProperties_From_CreationData_STATUS(source *v20231001s.CreationData_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// SourceResourceId
	data.SourceResourceId = genruntime.ClonePointerToString(source.SourceResourceId)

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

	// Invoke the augmentConversionForCreationData_STATUS interface (if implemented) to customize the conversion
	var dataAsAny any = data
	if augmentedData, ok := dataAsAny.(augmentConversionForCreationData_STATUS); ok {
		err := augmentedData.AssignPropertiesFrom(source)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_CreationData_STATUS populates the provided destination CreationData_STATUS from our CreationData_STATUS
func (data *CreationData_STATUS) AssignProperties_To_CreationData_STATUS(destination *v20231001s.CreationData_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(data.PropertyBag)

	// SourceResourceId
	destination.SourceResourceId = genruntime.ClonePointerToString(data.SourceResourceId)

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

	// Invoke the augmentConversionForCreationData_STATUS interface (if implemented) to customize the conversion
	var dataAsAny any = data
	if augmentedData, ok := dataAsAny.(augmentConversionForCreationData_STATUS); ok {
		err := augmentedData.AssignPropertiesTo(destination)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20230201.KubeletConfig
// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details.
type KubeletConfig struct {
	AllowedUnsafeSysctls  []string               `json:"allowedUnsafeSysctls,omitempty"`
	ContainerLogMaxFiles  *int                   `json:"containerLogMaxFiles,omitempty"`
	ContainerLogMaxSizeMB *int                   `json:"containerLogMaxSizeMB,omitempty"`
	CpuCfsQuota           *bool                  `json:"cpuCfsQuota,omitempty"`
	CpuCfsQuotaPeriod     *string                `json:"cpuCfsQuotaPeriod,omitempty"`
	CpuManagerPolicy      *string                `json:"cpuManagerPolicy,omitempty"`
	FailSwapOn            *bool                  `json:"failSwapOn,omitempty"`
	ImageGcHighThreshold  *int                   `json:"imageGcHighThreshold,omitempty"`
	ImageGcLowThreshold   *int                   `json:"imageGcLowThreshold,omitempty"`
	PodMaxPids            *int                   `json:"podMaxPids,omitempty"`
	PropertyBag           genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TopologyManagerPolicy *string                `json:"topologyManagerPolicy,omitempty"`
}

// AssignProperties_From_KubeletConfig populates our KubeletConfig from the provided source KubeletConfig
func (config *KubeletConfig) AssignProperties_From_KubeletConfig(source *v20231001s.KubeletConfig) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// AllowedUnsafeSysctls
	config.AllowedUnsafeSysctls = genruntime.CloneSliceOfString(source.AllowedUnsafeSysctls)

	// ContainerLogMaxFiles
	config.ContainerLogMaxFiles = genruntime.ClonePointerToInt(source.ContainerLogMaxFiles)

	// ContainerLogMaxSizeMB
	config.ContainerLogMaxSizeMB = genruntime.ClonePointerToInt(source.ContainerLogMaxSizeMB)

	// CpuCfsQuota
	if source.CpuCfsQuota != nil {
		cpuCfsQuota := *source.CpuCfsQuota
		config.CpuCfsQuota = &cpuCfsQuota
	} else {
		config.CpuCfsQuota = nil
	}

	// CpuCfsQuotaPeriod
	config.CpuCfsQuotaPeriod = genruntime.ClonePointerToString(source.CpuCfsQuotaPeriod)

	// CpuManagerPolicy
	config.CpuManagerPolicy = genruntime.ClonePointerToString(source.CpuManagerPolicy)

	// FailSwapOn
	if source.FailSwapOn != nil {
		failSwapOn := *source.FailSwapOn
		config.FailSwapOn = &failSwapOn
	} else {
		config.FailSwapOn = nil
	}

	// ImageGcHighThreshold
	config.ImageGcHighThreshold = genruntime.ClonePointerToInt(source.ImageGcHighThreshold)

	// ImageGcLowThreshold
	config.ImageGcLowThreshold = genruntime.ClonePointerToInt(source.ImageGcLowThreshold)

	// PodMaxPids
	config.PodMaxPids = genruntime.ClonePointerToInt(source.PodMaxPids)

	// TopologyManagerPolicy
	config.TopologyManagerPolicy = genruntime.ClonePointerToString(source.TopologyManagerPolicy)

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

	// Invoke the augmentConversionForKubeletConfig interface (if implemented) to customize the conversion
	var configAsAny any = config
	if augmentedConfig, ok := configAsAny.(augmentConversionForKubeletConfig); ok {
		err := augmentedConfig.AssignPropertiesFrom(source)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_KubeletConfig populates the provided destination KubeletConfig from our KubeletConfig
func (config *KubeletConfig) AssignProperties_To_KubeletConfig(destination *v20231001s.KubeletConfig) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(config.PropertyBag)

	// AllowedUnsafeSysctls
	destination.AllowedUnsafeSysctls = genruntime.CloneSliceOfString(config.AllowedUnsafeSysctls)

	// ContainerLogMaxFiles
	destination.ContainerLogMaxFiles = genruntime.ClonePointerToInt(config.ContainerLogMaxFiles)

	// ContainerLogMaxSizeMB
	destination.ContainerLogMaxSizeMB = genruntime.ClonePointerToInt(config.ContainerLogMaxSizeMB)

	// CpuCfsQuota
	if config.CpuCfsQuota != nil {
		cpuCfsQuota := *config.CpuCfsQuota
		destination.CpuCfsQuota = &cpuCfsQuota
	} else {
		destination.CpuCfsQuota = nil
	}

	// CpuCfsQuotaPeriod
	destination.CpuCfsQuotaPeriod = genruntime.ClonePointerToString(config.CpuCfsQuotaPeriod)

	// CpuManagerPolicy
	destination.CpuManagerPolicy = genruntime.ClonePointerToString(config.CpuManagerPolicy)

	// FailSwapOn
	if config.FailSwapOn != nil {
		failSwapOn := *config.FailSwapOn
		destination.FailSwapOn = &failSwapOn
	} else {
		destination.FailSwapOn = nil
	}

	// ImageGcHighThreshold
	destination.ImageGcHighThreshold = genruntime.ClonePointerToInt(config.ImageGcHighThreshold)

	// ImageGcLowThreshold
	destination.ImageGcLowThreshold = genruntime.ClonePointerToInt(config.ImageGcLowThreshold)

	// PodMaxPids
	destination.PodMaxPids = genruntime.ClonePointerToInt(config.PodMaxPids)

	// TopologyManagerPolicy
	destination.TopologyManagerPolicy = genruntime.ClonePointerToString(config.TopologyManagerPolicy)

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

	// Invoke the augmentConversionForKubeletConfig interface (if implemented) to customize the conversion
	var configAsAny any = config
	if augmentedConfig, ok := configAsAny.(augmentConversionForKubeletConfig); ok {
		err := augmentedConfig.AssignPropertiesTo(destination)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20230201.KubeletConfig_STATUS
// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details.
type KubeletConfig_STATUS struct {
	AllowedUnsafeSysctls  []string               `json:"allowedUnsafeSysctls,omitempty"`
	ContainerLogMaxFiles  *int                   `json:"containerLogMaxFiles,omitempty"`
	ContainerLogMaxSizeMB *int                   `json:"containerLogMaxSizeMB,omitempty"`
	CpuCfsQuota           *bool                  `json:"cpuCfsQuota,omitempty"`
	CpuCfsQuotaPeriod     *string                `json:"cpuCfsQuotaPeriod,omitempty"`
	CpuManagerPolicy      *string                `json:"cpuManagerPolicy,omitempty"`
	FailSwapOn            *bool                  `json:"failSwapOn,omitempty"`
	ImageGcHighThreshold  *int                   `json:"imageGcHighThreshold,omitempty"`
	ImageGcLowThreshold   *int                   `json:"imageGcLowThreshold,omitempty"`
	PodMaxPids            *int                   `json:"podMaxPids,omitempty"`
	PropertyBag           genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TopologyManagerPolicy *string                `json:"topologyManagerPolicy,omitempty"`
}

// AssignProperties_From_KubeletConfig_STATUS populates our KubeletConfig_STATUS from the provided source KubeletConfig_STATUS
func (config *KubeletConfig_STATUS) AssignProperties_From_KubeletConfig_STATUS(source *v20231001s.KubeletConfig_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// AllowedUnsafeSysctls
	config.AllowedUnsafeSysctls = genruntime.CloneSliceOfString(source.AllowedUnsafeSysctls)

	// ContainerLogMaxFiles
	config.ContainerLogMaxFiles = genruntime.ClonePointerToInt(source.ContainerLogMaxFiles)

	// ContainerLogMaxSizeMB
	config.ContainerLogMaxSizeMB = genruntime.ClonePointerToInt(source.ContainerLogMaxSizeMB)

	// CpuCfsQuota
	if source.CpuCfsQuota != nil {
		cpuCfsQuota := *source.CpuCfsQuota
		config.CpuCfsQuota = &cpuCfsQuota
	} else {
		config.CpuCfsQuota = nil
	}

	// CpuCfsQuotaPeriod
	config.CpuCfsQuotaPeriod = genruntime.ClonePointerToString(source.CpuCfsQuotaPeriod)

	// CpuManagerPolicy
	config.CpuManagerPolicy = genruntime.ClonePointerToString(source.CpuManagerPolicy)

	// FailSwapOn
	if source.FailSwapOn != nil {
		failSwapOn := *source.FailSwapOn
		config.FailSwapOn = &failSwapOn
	} else {
		config.FailSwapOn = nil
	}

	// ImageGcHighThreshold
	config.ImageGcHighThreshold = genruntime.ClonePointerToInt(source.ImageGcHighThreshold)

	// ImageGcLowThreshold
	config.ImageGcLowThreshold = genruntime.ClonePointerToInt(source.ImageGcLowThreshold)

	// PodMaxPids
	config.PodMaxPids = genruntime.ClonePointerToInt(source.PodMaxPids)

	// TopologyManagerPolicy
	config.TopologyManagerPolicy = genruntime.ClonePointerToString(source.TopologyManagerPolicy)

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

	// Invoke the augmentConversionForKubeletConfig_STATUS interface (if implemented) to customize the conversion
	var configAsAny any = config
	if augmentedConfig, ok := configAsAny.(augmentConversionForKubeletConfig_STATUS); ok {
		err := augmentedConfig.AssignPropertiesFrom(source)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_KubeletConfig_STATUS populates the provided destination KubeletConfig_STATUS from our KubeletConfig_STATUS
func (config *KubeletConfig_STATUS) AssignProperties_To_KubeletConfig_STATUS(destination *v20231001s.KubeletConfig_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(config.PropertyBag)

	// AllowedUnsafeSysctls
	destination.AllowedUnsafeSysctls = genruntime.CloneSliceOfString(config.AllowedUnsafeSysctls)

	// ContainerLogMaxFiles
	destination.ContainerLogMaxFiles = genruntime.ClonePointerToInt(config.ContainerLogMaxFiles)

	// ContainerLogMaxSizeMB
	destination.ContainerLogMaxSizeMB = genruntime.ClonePointerToInt(config.ContainerLogMaxSizeMB)

	// CpuCfsQuota
	if config.CpuCfsQuota != nil {
		cpuCfsQuota := *config.CpuCfsQuota
		destination.CpuCfsQuota = &cpuCfsQuota
	} else {
		destination.CpuCfsQuota = nil
	}

	// CpuCfsQuotaPeriod
	destination.CpuCfsQuotaPeriod = genruntime.ClonePointerToString(config.CpuCfsQuotaPeriod)

	// CpuManagerPolicy
	destination.CpuManagerPolicy = genruntime.ClonePointerToString(config.CpuManagerPolicy)

	// FailSwapOn
	if config.FailSwapOn != nil {
		failSwapOn := *config.FailSwapOn
		destination.FailSwapOn = &failSwapOn
	} else {
		destination.FailSwapOn = nil
	}

	// ImageGcHighThreshold
	destination.ImageGcHighThreshold = genruntime.ClonePointerToInt(config.ImageGcHighThreshold)

	// ImageGcLowThreshold
	destination.ImageGcLowThreshold = genruntime.ClonePointerToInt(config.ImageGcLowThreshold)

	// PodMaxPids
	destination.PodMaxPids = genruntime.ClonePointerToInt(config.PodMaxPids)

	// TopologyManagerPolicy
	destination.TopologyManagerPolicy = genruntime.ClonePointerToString(config.TopologyManagerPolicy)

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

	// Invoke the augmentConversionForKubeletConfig_STATUS interface (if implemented) to customize the conversion
	var configAsAny any = config
	if augmentedConfig, ok := configAsAny.(augmentConversionForKubeletConfig_STATUS); ok {
		err := augmentedConfig.AssignPropertiesTo(destination)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20230201.LinuxOSConfig
// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details.
type LinuxOSConfig struct {
	PropertyBag                genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SwapFileSizeMB             *int                   `json:"swapFileSizeMB,omitempty"`
	Sysctls                    *SysctlConfig          `json:"sysctls,omitempty"`
	TransparentHugePageDefrag  *string                `json:"transparentHugePageDefrag,omitempty"`
	TransparentHugePageEnabled *string                `json:"transparentHugePageEnabled,omitempty"`
}

// AssignProperties_From_LinuxOSConfig populates our LinuxOSConfig from the provided source LinuxOSConfig
func (config *LinuxOSConfig) AssignProperties_From_LinuxOSConfig(source *v20231001s.LinuxOSConfig) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// SwapFileSizeMB
	config.SwapFileSizeMB = genruntime.ClonePointerToInt(source.SwapFileSizeMB)

	// Sysctls
	if source.Sysctls != nil {
		var sysctl SysctlConfig
		err := sysctl.AssignProperties_From_SysctlConfig(source.Sysctls)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_SysctlConfig() to populate field Sysctls")
		}
		config.Sysctls = &sysctl
	} else {
		config.Sysctls = nil
	}

	// TransparentHugePageDefrag
	config.TransparentHugePageDefrag = genruntime.ClonePointerToString(source.TransparentHugePageDefrag)

	// TransparentHugePageEnabled
	config.TransparentHugePageEnabled = genruntime.ClonePointerToString(source.TransparentHugePageEnabled)

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

	// Invoke the augmentConversionForLinuxOSConfig interface (if implemented) to customize the conversion
	var configAsAny any = config
	if augmentedConfig, ok := configAsAny.(augmentConversionForLinuxOSConfig); ok {
		err := augmentedConfig.AssignPropertiesFrom(source)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_LinuxOSConfig populates the provided destination LinuxOSConfig from our LinuxOSConfig
func (config *LinuxOSConfig) AssignProperties_To_LinuxOSConfig(destination *v20231001s.LinuxOSConfig) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(config.PropertyBag)

	// SwapFileSizeMB
	destination.SwapFileSizeMB = genruntime.ClonePointerToInt(config.SwapFileSizeMB)

	// Sysctls
	if config.Sysctls != nil {
		var sysctl v20231001s.SysctlConfig
		err := config.Sysctls.AssignProperties_To_SysctlConfig(&sysctl)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_SysctlConfig() to populate field Sysctls")
		}
		destination.Sysctls = &sysctl
	} else {
		destination.Sysctls = nil
	}

	// TransparentHugePageDefrag
	destination.TransparentHugePageDefrag = genruntime.ClonePointerToString(config.TransparentHugePageDefrag)

	// TransparentHugePageEnabled
	destination.TransparentHugePageEnabled = genruntime.ClonePointerToString(config.TransparentHugePageEnabled)

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

	// Invoke the augmentConversionForLinuxOSConfig interface (if implemented) to customize the conversion
	var configAsAny any = config
	if augmentedConfig, ok := configAsAny.(augmentConversionForLinuxOSConfig); ok {
		err := augmentedConfig.AssignPropertiesTo(destination)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20230201.LinuxOSConfig_STATUS
// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details.
type LinuxOSConfig_STATUS struct {
	PropertyBag                genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SwapFileSizeMB             *int                   `json:"swapFileSizeMB,omitempty"`
	Sysctls                    *SysctlConfig_STATUS   `json:"sysctls,omitempty"`
	TransparentHugePageDefrag  *string                `json:"transparentHugePageDefrag,omitempty"`
	TransparentHugePageEnabled *string                `json:"transparentHugePageEnabled,omitempty"`
}

// AssignProperties_From_LinuxOSConfig_STATUS populates our LinuxOSConfig_STATUS from the provided source LinuxOSConfig_STATUS
func (config *LinuxOSConfig_STATUS) AssignProperties_From_LinuxOSConfig_STATUS(source *v20231001s.LinuxOSConfig_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// SwapFileSizeMB
	config.SwapFileSizeMB = genruntime.ClonePointerToInt(source.SwapFileSizeMB)

	// Sysctls
	if source.Sysctls != nil {
		var sysctl SysctlConfig_STATUS
		err := sysctl.AssignProperties_From_SysctlConfig_STATUS(source.Sysctls)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_SysctlConfig_STATUS() to populate field Sysctls")
		}
		config.Sysctls = &sysctl
	} else {
		config.Sysctls = nil
	}

	// TransparentHugePageDefrag
	config.TransparentHugePageDefrag = genruntime.ClonePointerToString(source.TransparentHugePageDefrag)

	// TransparentHugePageEnabled
	config.TransparentHugePageEnabled = genruntime.ClonePointerToString(source.TransparentHugePageEnabled)

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

	// Invoke the augmentConversionForLinuxOSConfig_STATUS interface (if implemented) to customize the conversion
	var configAsAny any = config
	if augmentedConfig, ok := configAsAny.(augmentConversionForLinuxOSConfig_STATUS); ok {
		err := augmentedConfig.AssignPropertiesFrom(source)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_LinuxOSConfig_STATUS populates the provided destination LinuxOSConfig_STATUS from our LinuxOSConfig_STATUS
func (config *LinuxOSConfig_STATUS) AssignProperties_To_LinuxOSConfig_STATUS(destination *v20231001s.LinuxOSConfig_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(config.PropertyBag)

	// SwapFileSizeMB
	destination.SwapFileSizeMB = genruntime.ClonePointerToInt(config.SwapFileSizeMB)

	// Sysctls
	if config.Sysctls != nil {
		var sysctl v20231001s.SysctlConfig_STATUS
		err := config.Sysctls.AssignProperties_To_SysctlConfig_STATUS(&sysctl)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_SysctlConfig_STATUS() to populate field Sysctls")
		}
		destination.Sysctls = &sysctl
	} else {
		destination.Sysctls = nil
	}

	// TransparentHugePageDefrag
	destination.TransparentHugePageDefrag = genruntime.ClonePointerToString(config.TransparentHugePageDefrag)

	// TransparentHugePageEnabled
	destination.TransparentHugePageEnabled = genruntime.ClonePointerToString(config.TransparentHugePageEnabled)

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

	// Invoke the augmentConversionForLinuxOSConfig_STATUS interface (if implemented) to customize the conversion
	var configAsAny any = config
	if augmentedConfig, ok := configAsAny.(augmentConversionForLinuxOSConfig_STATUS); ok {
		err := augmentedConfig.AssignPropertiesTo(destination)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20230201.PowerState
// Describes the Power State of the cluster
type PowerState struct {
	Code        *string                `json:"code,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

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

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

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

	// No error
	return nil
}

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

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

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

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

	// No error
	return nil
}

type augmentConversionForAgentPoolUpgradeSettings interface {
	AssignPropertiesFrom(src *v20231001s.AgentPoolUpgradeSettings) error
	AssignPropertiesTo(dst *v20231001s.AgentPoolUpgradeSettings) error
}

type augmentConversionForAgentPoolUpgradeSettings_STATUS interface {
	AssignPropertiesFrom(src *v20231001s.AgentPoolUpgradeSettings_STATUS) error
	AssignPropertiesTo(dst *v20231001s.AgentPoolUpgradeSettings_STATUS) error
}

type augmentConversionForCreationData interface {
	AssignPropertiesFrom(src *v20231001s.CreationData) error
	AssignPropertiesTo(dst *v20231001s.CreationData) error
}

type augmentConversionForCreationData_STATUS interface {
	AssignPropertiesFrom(src *v20231001s.CreationData_STATUS) error
	AssignPropertiesTo(dst *v20231001s.CreationData_STATUS) error
}

type augmentConversionForKubeletConfig interface {
	AssignPropertiesFrom(src *v20231001s.KubeletConfig) error
	AssignPropertiesTo(dst *v20231001s.KubeletConfig) error
}

type augmentConversionForKubeletConfig_STATUS interface {
	AssignPropertiesFrom(src *v20231001s.KubeletConfig_STATUS) error
	AssignPropertiesTo(dst *v20231001s.KubeletConfig_STATUS) error
}

type augmentConversionForLinuxOSConfig interface {
	AssignPropertiesFrom(src *v20231001s.LinuxOSConfig) error
	AssignPropertiesTo(dst *v20231001s.LinuxOSConfig) error
}

type augmentConversionForLinuxOSConfig_STATUS interface {
	AssignPropertiesFrom(src *v20231001s.LinuxOSConfig_STATUS) error
	AssignPropertiesTo(dst *v20231001s.LinuxOSConfig_STATUS) error
}

type augmentConversionForPowerState interface {
	AssignPropertiesFrom(src *v20231001s.PowerState) error
	AssignPropertiesTo(dst *v20231001s.PowerState) error
}

// Storage version of v1api20230201.SysctlConfig
// Sysctl settings for Linux agent nodes.
type SysctlConfig struct {
	FsAioMaxNr                     *int                   `json:"fsAioMaxNr,omitempty"`
	FsFileMax                      *int                   `json:"fsFileMax,omitempty"`
	FsInotifyMaxUserWatches        *int                   `json:"fsInotifyMaxUserWatches,omitempty"`
	FsNrOpen                       *int                   `json:"fsNrOpen,omitempty"`
	KernelThreadsMax               *int                   `json:"kernelThreadsMax,omitempty"`
	NetCoreNetdevMaxBacklog        *int                   `json:"netCoreNetdevMaxBacklog,omitempty"`
	NetCoreOptmemMax               *int                   `json:"netCoreOptmemMax,omitempty"`
	NetCoreRmemDefault             *int                   `json:"netCoreRmemDefault,omitempty"`
	NetCoreRmemMax                 *int                   `json:"netCoreRmemMax,omitempty"`
	NetCoreSomaxconn               *int                   `json:"netCoreSomaxconn,omitempty"`
	NetCoreWmemDefault             *int                   `json:"netCoreWmemDefault,omitempty"`
	NetCoreWmemMax                 *int                   `json:"netCoreWmemMax,omitempty"`
	NetIpv4IpLocalPortRange        *string                `json:"netIpv4IpLocalPortRange,omitempty"`
	NetIpv4NeighDefaultGcThresh1   *int                   `json:"netIpv4NeighDefaultGcThresh1,omitempty"`
	NetIpv4NeighDefaultGcThresh2   *int                   `json:"netIpv4NeighDefaultGcThresh2,omitempty"`
	NetIpv4NeighDefaultGcThresh3   *int                   `json:"netIpv4NeighDefaultGcThresh3,omitempty"`
	NetIpv4TcpFinTimeout           *int                   `json:"netIpv4TcpFinTimeout,omitempty"`
	NetIpv4TcpKeepaliveProbes      *int                   `json:"netIpv4TcpKeepaliveProbes,omitempty"`
	NetIpv4TcpKeepaliveTime        *int                   `json:"netIpv4TcpKeepaliveTime,omitempty"`
	NetIpv4TcpMaxSynBacklog        *int                   `json:"netIpv4TcpMaxSynBacklog,omitempty"`
	NetIpv4TcpMaxTwBuckets         *int                   `json:"netIpv4TcpMaxTwBuckets,omitempty"`
	NetIpv4TcpTwReuse              *bool                  `json:"netIpv4TcpTwReuse,omitempty"`
	NetIpv4TcpkeepaliveIntvl       *int                   `json:"netIpv4TcpkeepaliveIntvl,omitempty"`
	NetNetfilterNfConntrackBuckets *int                   `json:"netNetfilterNfConntrackBuckets,omitempty"`
	NetNetfilterNfConntrackMax     *int                   `json:"netNetfilterNfConntrackMax,omitempty"`
	PropertyBag                    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	VmMaxMapCount                  *int                   `json:"vmMaxMapCount,omitempty"`
	VmSwappiness                   *int                   `json:"vmSwappiness,omitempty"`
	VmVfsCachePressure             *int                   `json:"vmVfsCachePressure,omitempty"`
}

// AssignProperties_From_SysctlConfig populates our SysctlConfig from the provided source SysctlConfig
func (config *SysctlConfig) AssignProperties_From_SysctlConfig(source *v20231001s.SysctlConfig) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// FsAioMaxNr
	config.FsAioMaxNr = genruntime.ClonePointerToInt(source.FsAioMaxNr)

	// FsFileMax
	config.FsFileMax = genruntime.ClonePointerToInt(source.FsFileMax)

	// FsInotifyMaxUserWatches
	config.FsInotifyMaxUserWatches = genruntime.ClonePointerToInt(source.FsInotifyMaxUserWatches)

	// FsNrOpen
	config.FsNrOpen = genruntime.ClonePointerToInt(source.FsNrOpen)

	// KernelThreadsMax
	config.KernelThreadsMax = genruntime.ClonePointerToInt(source.KernelThreadsMax)

	// NetCoreNetdevMaxBacklog
	config.NetCoreNetdevMaxBacklog = genruntime.ClonePointerToInt(source.NetCoreNetdevMaxBacklog)

	// NetCoreOptmemMax
	config.NetCoreOptmemMax = genruntime.ClonePointerToInt(source.NetCoreOptmemMax)

	// NetCoreRmemDefault
	config.NetCoreRmemDefault = genruntime.ClonePointerToInt(source.NetCoreRmemDefault)

	// NetCoreRmemMax
	config.NetCoreRmemMax = genruntime.ClonePointerToInt(source.NetCoreRmemMax)

	// NetCoreSomaxconn
	config.NetCoreSomaxconn = genruntime.ClonePointerToInt(source.NetCoreSomaxconn)

	// NetCoreWmemDefault
	config.NetCoreWmemDefault = genruntime.ClonePointerToInt(source.NetCoreWmemDefault)

	// NetCoreWmemMax
	config.NetCoreWmemMax = genruntime.ClonePointerToInt(source.NetCoreWmemMax)

	// NetIpv4IpLocalPortRange
	config.NetIpv4IpLocalPortRange = genruntime.ClonePointerToString(source.NetIpv4IpLocalPortRange)

	// NetIpv4NeighDefaultGcThresh1
	config.NetIpv4NeighDefaultGcThresh1 = genruntime.ClonePointerToInt(source.NetIpv4NeighDefaultGcThresh1)

	// NetIpv4NeighDefaultGcThresh2
	config.NetIpv4NeighDefaultGcThresh2 = genruntime.ClonePointerToInt(source.NetIpv4NeighDefaultGcThresh2)

	// NetIpv4NeighDefaultGcThresh3
	config.NetIpv4NeighDefaultGcThresh3 = genruntime.ClonePointerToInt(source.NetIpv4NeighDefaultGcThresh3)

	// NetIpv4TcpFinTimeout
	config.NetIpv4TcpFinTimeout = genruntime.ClonePointerToInt(source.NetIpv4TcpFinTimeout)

	// NetIpv4TcpKeepaliveProbes
	config.NetIpv4TcpKeepaliveProbes = genruntime.ClonePointerToInt(source.NetIpv4TcpKeepaliveProbes)

	// NetIpv4TcpKeepaliveTime
	config.NetIpv4TcpKeepaliveTime = genruntime.ClonePointerToInt(source.NetIpv4TcpKeepaliveTime)

	// NetIpv4TcpMaxSynBacklog
	config.NetIpv4TcpMaxSynBacklog = genruntime.ClonePointerToInt(source.NetIpv4TcpMaxSynBacklog)

	// NetIpv4TcpMaxTwBuckets
	config.NetIpv4TcpMaxTwBuckets = genruntime.ClonePointerToInt(source.NetIpv4TcpMaxTwBuckets)

	// NetIpv4TcpTwReuse
	if source.NetIpv4TcpTwReuse != nil {
		netIpv4TcpTwReuse := *source.NetIpv4TcpTwReuse
		config.NetIpv4TcpTwReuse = &netIpv4TcpTwReuse
	} else {
		config.NetIpv4TcpTwReuse = nil
	}

	// NetIpv4TcpkeepaliveIntvl
	config.NetIpv4TcpkeepaliveIntvl = genruntime.ClonePointerToInt(source.NetIpv4TcpkeepaliveIntvl)

	// NetNetfilterNfConntrackBuckets
	config.NetNetfilterNfConntrackBuckets = genruntime.ClonePointerToInt(source.NetNetfilterNfConntrackBuckets)

	// NetNetfilterNfConntrackMax
	config.NetNetfilterNfConntrackMax = genruntime.ClonePointerToInt(source.NetNetfilterNfConntrackMax)

	// VmMaxMapCount
	config.VmMaxMapCount = genruntime.ClonePointerToInt(source.VmMaxMapCount)

	// VmSwappiness
	config.VmSwappiness = genruntime.ClonePointerToInt(source.VmSwappiness)

	// VmVfsCachePressure
	config.VmVfsCachePressure = genruntime.ClonePointerToInt(source.VmVfsCachePressure)

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

	// Invoke the augmentConversionForSysctlConfig interface (if implemented) to customize the conversion
	var configAsAny any = config
	if augmentedConfig, ok := configAsAny.(augmentConversionForSysctlConfig); ok {
		err := augmentedConfig.AssignPropertiesFrom(source)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_SysctlConfig populates the provided destination SysctlConfig from our SysctlConfig
func (config *SysctlConfig) AssignProperties_To_SysctlConfig(destination *v20231001s.SysctlConfig) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(config.PropertyBag)

	// FsAioMaxNr
	destination.FsAioMaxNr = genruntime.ClonePointerToInt(config.FsAioMaxNr)

	// FsFileMax
	destination.FsFileMax = genruntime.ClonePointerToInt(config.FsFileMax)

	// FsInotifyMaxUserWatches
	destination.FsInotifyMaxUserWatches = genruntime.ClonePointerToInt(config.FsInotifyMaxUserWatches)

	// FsNrOpen
	destination.FsNrOpen = genruntime.ClonePointerToInt(config.FsNrOpen)

	// KernelThreadsMax
	destination.KernelThreadsMax = genruntime.ClonePointerToInt(config.KernelThreadsMax)

	// NetCoreNetdevMaxBacklog
	destination.NetCoreNetdevMaxBacklog = genruntime.ClonePointerToInt(config.NetCoreNetdevMaxBacklog)

	// NetCoreOptmemMax
	destination.NetCoreOptmemMax = genruntime.ClonePointerToInt(config.NetCoreOptmemMax)

	// NetCoreRmemDefault
	destination.NetCoreRmemDefault = genruntime.ClonePointerToInt(config.NetCoreRmemDefault)

	// NetCoreRmemMax
	destination.NetCoreRmemMax = genruntime.ClonePointerToInt(config.NetCoreRmemMax)

	// NetCoreSomaxconn
	destination.NetCoreSomaxconn = genruntime.ClonePointerToInt(config.NetCoreSomaxconn)

	// NetCoreWmemDefault
	destination.NetCoreWmemDefault = genruntime.ClonePointerToInt(config.NetCoreWmemDefault)

	// NetCoreWmemMax
	destination.NetCoreWmemMax = genruntime.ClonePointerToInt(config.NetCoreWmemMax)

	// NetIpv4IpLocalPortRange
	destination.NetIpv4IpLocalPortRange = genruntime.ClonePointerToString(config.NetIpv4IpLocalPortRange)

	// NetIpv4NeighDefaultGcThresh1
	destination.NetIpv4NeighDefaultGcThresh1 = genruntime.ClonePointerToInt(config.NetIpv4NeighDefaultGcThresh1)

	// NetIpv4NeighDefaultGcThresh2
	destination.NetIpv4NeighDefaultGcThresh2 = genruntime.ClonePointerToInt(config.NetIpv4NeighDefaultGcThresh2)

	// NetIpv4NeighDefaultGcThresh3
	destination.NetIpv4NeighDefaultGcThresh3 = genruntime.ClonePointerToInt(config.NetIpv4NeighDefaultGcThresh3)

	// NetIpv4TcpFinTimeout
	destination.NetIpv4TcpFinTimeout = genruntime.ClonePointerToInt(config.NetIpv4TcpFinTimeout)

	// NetIpv4TcpKeepaliveProbes
	destination.NetIpv4TcpKeepaliveProbes = genruntime.ClonePointerToInt(config.NetIpv4TcpKeepaliveProbes)

	// NetIpv4TcpKeepaliveTime
	destination.NetIpv4TcpKeepaliveTime = genruntime.ClonePointerToInt(config.NetIpv4TcpKeepaliveTime)

	// NetIpv4TcpMaxSynBacklog
	destination.NetIpv4TcpMaxSynBacklog = genruntime.ClonePointerToInt(config.NetIpv4TcpMaxSynBacklog)

	// NetIpv4TcpMaxTwBuckets
	destination.NetIpv4TcpMaxTwBuckets = genruntime.ClonePointerToInt(config.NetIpv4TcpMaxTwBuckets)

	// NetIpv4TcpTwReuse
	if config.NetIpv4TcpTwReuse != nil {
		netIpv4TcpTwReuse := *config.NetIpv4TcpTwReuse
		destination.NetIpv4TcpTwReuse = &netIpv4TcpTwReuse
	} else {
		destination.NetIpv4TcpTwReuse = nil
	}

	// NetIpv4TcpkeepaliveIntvl
	destination.NetIpv4TcpkeepaliveIntvl = genruntime.ClonePointerToInt(config.NetIpv4TcpkeepaliveIntvl)

	// NetNetfilterNfConntrackBuckets
	destination.NetNetfilterNfConntrackBuckets = genruntime.ClonePointerToInt(config.NetNetfilterNfConntrackBuckets)

	// NetNetfilterNfConntrackMax
	destination.NetNetfilterNfConntrackMax = genruntime.ClonePointerToInt(config.NetNetfilterNfConntrackMax)

	// VmMaxMapCount
	destination.VmMaxMapCount = genruntime.ClonePointerToInt(config.VmMaxMapCount)

	// VmSwappiness
	destination.VmSwappiness = genruntime.ClonePointerToInt(config.VmSwappiness)

	// VmVfsCachePressure
	destination.VmVfsCachePressure = genruntime.ClonePointerToInt(config.VmVfsCachePressure)

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

	// Invoke the augmentConversionForSysctlConfig interface (if implemented) to customize the conversion
	var configAsAny any = config
	if augmentedConfig, ok := configAsAny.(augmentConversionForSysctlConfig); ok {
		err := augmentedConfig.AssignPropertiesTo(destination)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20230201.SysctlConfig_STATUS
// Sysctl settings for Linux agent nodes.
type SysctlConfig_STATUS struct {
	FsAioMaxNr                     *int                   `json:"fsAioMaxNr,omitempty"`
	FsFileMax                      *int                   `json:"fsFileMax,omitempty"`
	FsInotifyMaxUserWatches        *int                   `json:"fsInotifyMaxUserWatches,omitempty"`
	FsNrOpen                       *int                   `json:"fsNrOpen,omitempty"`
	KernelThreadsMax               *int                   `json:"kernelThreadsMax,omitempty"`
	NetCoreNetdevMaxBacklog        *int                   `json:"netCoreNetdevMaxBacklog,omitempty"`
	NetCoreOptmemMax               *int                   `json:"netCoreOptmemMax,omitempty"`
	NetCoreRmemDefault             *int                   `json:"netCoreRmemDefault,omitempty"`
	NetCoreRmemMax                 *int                   `json:"netCoreRmemMax,omitempty"`
	NetCoreSomaxconn               *int                   `json:"netCoreSomaxconn,omitempty"`
	NetCoreWmemDefault             *int                   `json:"netCoreWmemDefault,omitempty"`
	NetCoreWmemMax                 *int                   `json:"netCoreWmemMax,omitempty"`
	NetIpv4IpLocalPortRange        *string                `json:"netIpv4IpLocalPortRange,omitempty"`
	NetIpv4NeighDefaultGcThresh1   *int                   `json:"netIpv4NeighDefaultGcThresh1,omitempty"`
	NetIpv4NeighDefaultGcThresh2   *int                   `json:"netIpv4NeighDefaultGcThresh2,omitempty"`
	NetIpv4NeighDefaultGcThresh3   *int                   `json:"netIpv4NeighDefaultGcThresh3,omitempty"`
	NetIpv4TcpFinTimeout           *int                   `json:"netIpv4TcpFinTimeout,omitempty"`
	NetIpv4TcpKeepaliveProbes      *int                   `json:"netIpv4TcpKeepaliveProbes,omitempty"`
	NetIpv4TcpKeepaliveTime        *int                   `json:"netIpv4TcpKeepaliveTime,omitempty"`
	NetIpv4TcpMaxSynBacklog        *int                   `json:"netIpv4TcpMaxSynBacklog,omitempty"`
	NetIpv4TcpMaxTwBuckets         *int                   `json:"netIpv4TcpMaxTwBuckets,omitempty"`
	NetIpv4TcpTwReuse              *bool                  `json:"netIpv4TcpTwReuse,omitempty"`
	NetIpv4TcpkeepaliveIntvl       *int                   `json:"netIpv4TcpkeepaliveIntvl,omitempty"`
	NetNetfilterNfConntrackBuckets *int                   `json:"netNetfilterNfConntrackBuckets,omitempty"`
	NetNetfilterNfConntrackMax     *int                   `json:"netNetfilterNfConntrackMax,omitempty"`
	PropertyBag                    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	VmMaxMapCount                  *int                   `json:"vmMaxMapCount,omitempty"`
	VmSwappiness                   *int                   `json:"vmSwappiness,omitempty"`
	VmVfsCachePressure             *int                   `json:"vmVfsCachePressure,omitempty"`
}

// AssignProperties_From_SysctlConfig_STATUS populates our SysctlConfig_STATUS from the provided source SysctlConfig_STATUS
func (config *SysctlConfig_STATUS) AssignProperties_From_SysctlConfig_STATUS(source *v20231001s.SysctlConfig_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// FsAioMaxNr
	config.FsAioMaxNr = genruntime.ClonePointerToInt(source.FsAioMaxNr)

	// FsFileMax
	config.FsFileMax = genruntime.ClonePointerToInt(source.FsFileMax)

	// FsInotifyMaxUserWatches
	config.FsInotifyMaxUserWatches = genruntime.ClonePointerToInt(source.FsInotifyMaxUserWatches)

	// FsNrOpen
	config.FsNrOpen = genruntime.ClonePointerToInt(source.FsNrOpen)

	// KernelThreadsMax
	config.KernelThreadsMax = genruntime.ClonePointerToInt(source.KernelThreadsMax)

	// NetCoreNetdevMaxBacklog
	config.NetCoreNetdevMaxBacklog = genruntime.ClonePointerToInt(source.NetCoreNetdevMaxBacklog)

	// NetCoreOptmemMax
	config.NetCoreOptmemMax = genruntime.ClonePointerToInt(source.NetCoreOptmemMax)

	// NetCoreRmemDefault
	config.NetCoreRmemDefault = genruntime.ClonePointerToInt(source.NetCoreRmemDefault)

	// NetCoreRmemMax
	config.NetCoreRmemMax = genruntime.ClonePointerToInt(source.NetCoreRmemMax)

	// NetCoreSomaxconn
	config.NetCoreSomaxconn = genruntime.ClonePointerToInt(source.NetCoreSomaxconn)

	// NetCoreWmemDefault
	config.NetCoreWmemDefault = genruntime.ClonePointerToInt(source.NetCoreWmemDefault)

	// NetCoreWmemMax
	config.NetCoreWmemMax = genruntime.ClonePointerToInt(source.NetCoreWmemMax)

	// NetIpv4IpLocalPortRange
	config.NetIpv4IpLocalPortRange = genruntime.ClonePointerToString(source.NetIpv4IpLocalPortRange)

	// NetIpv4NeighDefaultGcThresh1
	config.NetIpv4NeighDefaultGcThresh1 = genruntime.ClonePointerToInt(source.NetIpv4NeighDefaultGcThresh1)

	// NetIpv4NeighDefaultGcThresh2
	config.NetIpv4NeighDefaultGcThresh2 = genruntime.ClonePointerToInt(source.NetIpv4NeighDefaultGcThresh2)

	// NetIpv4NeighDefaultGcThresh3
	config.NetIpv4NeighDefaultGcThresh3 = genruntime.ClonePointerToInt(source.NetIpv4NeighDefaultGcThresh3)

	// NetIpv4TcpFinTimeout
	config.NetIpv4TcpFinTimeout = genruntime.ClonePointerToInt(source.NetIpv4TcpFinTimeout)

	// NetIpv4TcpKeepaliveProbes
	config.NetIpv4TcpKeepaliveProbes = genruntime.ClonePointerToInt(source.NetIpv4TcpKeepaliveProbes)

	// NetIpv4TcpKeepaliveTime
	config.NetIpv4TcpKeepaliveTime = genruntime.ClonePointerToInt(source.NetIpv4TcpKeepaliveTime)

	// NetIpv4TcpMaxSynBacklog
	config.NetIpv4TcpMaxSynBacklog = genruntime.ClonePointerToInt(source.NetIpv4TcpMaxSynBacklog)

	// NetIpv4TcpMaxTwBuckets
	config.NetIpv4TcpMaxTwBuckets = genruntime.ClonePointerToInt(source.NetIpv4TcpMaxTwBuckets)

	// NetIpv4TcpTwReuse
	if source.NetIpv4TcpTwReuse != nil {
		netIpv4TcpTwReuse := *source.NetIpv4TcpTwReuse
		config.NetIpv4TcpTwReuse = &netIpv4TcpTwReuse
	} else {
		config.NetIpv4TcpTwReuse = nil
	}

	// NetIpv4TcpkeepaliveIntvl
	config.NetIpv4TcpkeepaliveIntvl = genruntime.ClonePointerToInt(source.NetIpv4TcpkeepaliveIntvl)

	// NetNetfilterNfConntrackBuckets
	config.NetNetfilterNfConntrackBuckets = genruntime.ClonePointerToInt(source.NetNetfilterNfConntrackBuckets)

	// NetNetfilterNfConntrackMax
	config.NetNetfilterNfConntrackMax = genruntime.ClonePointerToInt(source.NetNetfilterNfConntrackMax)

	// VmMaxMapCount
	config.VmMaxMapCount = genruntime.ClonePointerToInt(source.VmMaxMapCount)

	// VmSwappiness
	config.VmSwappiness = genruntime.ClonePointerToInt(source.VmSwappiness)

	// VmVfsCachePressure
	config.VmVfsCachePressure = genruntime.ClonePointerToInt(source.VmVfsCachePressure)

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

	// Invoke the augmentConversionForSysctlConfig_STATUS interface (if implemented) to customize the conversion
	var configAsAny any = config
	if augmentedConfig, ok := configAsAny.(augmentConversionForSysctlConfig_STATUS); ok {
		err := augmentedConfig.AssignPropertiesFrom(source)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_SysctlConfig_STATUS populates the provided destination SysctlConfig_STATUS from our SysctlConfig_STATUS
func (config *SysctlConfig_STATUS) AssignProperties_To_SysctlConfig_STATUS(destination *v20231001s.SysctlConfig_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(config.PropertyBag)

	// FsAioMaxNr
	destination.FsAioMaxNr = genruntime.ClonePointerToInt(config.FsAioMaxNr)

	// FsFileMax
	destination.FsFileMax = genruntime.ClonePointerToInt(config.FsFileMax)

	// FsInotifyMaxUserWatches
	destination.FsInotifyMaxUserWatches = genruntime.ClonePointerToInt(config.FsInotifyMaxUserWatches)

	// FsNrOpen
	destination.FsNrOpen = genruntime.ClonePointerToInt(config.FsNrOpen)

	// KernelThreadsMax
	destination.KernelThreadsMax = genruntime.ClonePointerToInt(config.KernelThreadsMax)

	// NetCoreNetdevMaxBacklog
	destination.NetCoreNetdevMaxBacklog = genruntime.ClonePointerToInt(config.NetCoreNetdevMaxBacklog)

	// NetCoreOptmemMax
	destination.NetCoreOptmemMax = genruntime.ClonePointerToInt(config.NetCoreOptmemMax)

	// NetCoreRmemDefault
	destination.NetCoreRmemDefault = genruntime.ClonePointerToInt(config.NetCoreRmemDefault)

	// NetCoreRmemMax
	destination.NetCoreRmemMax = genruntime.ClonePointerToInt(config.NetCoreRmemMax)

	// NetCoreSomaxconn
	destination.NetCoreSomaxconn = genruntime.ClonePointerToInt(config.NetCoreSomaxconn)

	// NetCoreWmemDefault
	destination.NetCoreWmemDefault = genruntime.ClonePointerToInt(config.NetCoreWmemDefault)

	// NetCoreWmemMax
	destination.NetCoreWmemMax = genruntime.ClonePointerToInt(config.NetCoreWmemMax)

	// NetIpv4IpLocalPortRange
	destination.NetIpv4IpLocalPortRange = genruntime.ClonePointerToString(config.NetIpv4IpLocalPortRange)

	// NetIpv4NeighDefaultGcThresh1
	destination.NetIpv4NeighDefaultGcThresh1 = genruntime.ClonePointerToInt(config.NetIpv4NeighDefaultGcThresh1)

	// NetIpv4NeighDefaultGcThresh2
	destination.NetIpv4NeighDefaultGcThresh2 = genruntime.ClonePointerToInt(config.NetIpv4NeighDefaultGcThresh2)

	// NetIpv4NeighDefaultGcThresh3
	destination.NetIpv4NeighDefaultGcThresh3 = genruntime.ClonePointerToInt(config.NetIpv4NeighDefaultGcThresh3)

	// NetIpv4TcpFinTimeout
	destination.NetIpv4TcpFinTimeout = genruntime.ClonePointerToInt(config.NetIpv4TcpFinTimeout)

	// NetIpv4TcpKeepaliveProbes
	destination.NetIpv4TcpKeepaliveProbes = genruntime.ClonePointerToInt(config.NetIpv4TcpKeepaliveProbes)

	// NetIpv4TcpKeepaliveTime
	destination.NetIpv4TcpKeepaliveTime = genruntime.ClonePointerToInt(config.NetIpv4TcpKeepaliveTime)

	// NetIpv4TcpMaxSynBacklog
	destination.NetIpv4TcpMaxSynBacklog = genruntime.ClonePointerToInt(config.NetIpv4TcpMaxSynBacklog)

	// NetIpv4TcpMaxTwBuckets
	destination.NetIpv4TcpMaxTwBuckets = genruntime.ClonePointerToInt(config.NetIpv4TcpMaxTwBuckets)

	// NetIpv4TcpTwReuse
	if config.NetIpv4TcpTwReuse != nil {
		netIpv4TcpTwReuse := *config.NetIpv4TcpTwReuse
		destination.NetIpv4TcpTwReuse = &netIpv4TcpTwReuse
	} else {
		destination.NetIpv4TcpTwReuse = nil
	}

	// NetIpv4TcpkeepaliveIntvl
	destination.NetIpv4TcpkeepaliveIntvl = genruntime.ClonePointerToInt(config.NetIpv4TcpkeepaliveIntvl)

	// NetNetfilterNfConntrackBuckets
	destination.NetNetfilterNfConntrackBuckets = genruntime.ClonePointerToInt(config.NetNetfilterNfConntrackBuckets)

	// NetNetfilterNfConntrackMax
	destination.NetNetfilterNfConntrackMax = genruntime.ClonePointerToInt(config.NetNetfilterNfConntrackMax)

	// VmMaxMapCount
	destination.VmMaxMapCount = genruntime.ClonePointerToInt(config.VmMaxMapCount)

	// VmSwappiness
	destination.VmSwappiness = genruntime.ClonePointerToInt(config.VmSwappiness)

	// VmVfsCachePressure
	destination.VmVfsCachePressure = genruntime.ClonePointerToInt(config.VmVfsCachePressure)

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

	// Invoke the augmentConversionForSysctlConfig_STATUS interface (if implemented) to customize the conversion
	var configAsAny any = config
	if augmentedConfig, ok := configAsAny.(augmentConversionForSysctlConfig_STATUS); ok {
		err := augmentedConfig.AssignPropertiesTo(destination)
		if err != nil {
			return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

type augmentConversionForSysctlConfig interface {
	AssignPropertiesFrom(src *v20231001s.SysctlConfig) error
	AssignPropertiesTo(dst *v20231001s.SysctlConfig) error
}

type augmentConversionForSysctlConfig_STATUS interface {
	AssignPropertiesFrom(src *v20231001s.SysctlConfig_STATUS) error
	AssignPropertiesTo(dst *v20231001s.SysctlConfig_STATUS) error
}

func init() {
	SchemeBuilder.Register(&ManagedClustersAgentPool{}, &ManagedClustersAgentPoolList{})
}
