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

import (
	"fmt"
	v20230202ps "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230202preview/storage"
	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 v1api20231102preview.ManagedClustersAgentPool
// Generator information:
// - Generated from: /containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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-11-02-preview"
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 v1api20231102preview.ManagedClustersAgentPool
// Generator information:
// - Generated from: /containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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 v1api20231102preview.ManagedClusters_AgentPool_Spec
type ManagedClusters_AgentPool_Spec struct {
	ArtifactStreamingProfile *AgentPoolArtifactStreamingProfile `json:"artifactStreamingProfile,omitempty"`
	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"`

	// CapacityReservationGroupReference: AKS will associate the specified agent pool with the Capacity Reservation Group.
	CapacityReservationGroupReference *genruntime.ResourceReference `armReference:"CapacityReservationGroupID" json:"capacityReservationGroupReference,omitempty"`
	Count                             *int                          `json:"count,omitempty"`
	CreationData                      *CreationData                 `json:"creationData,omitempty"`
	EnableAutoScaling                 *bool                         `json:"enableAutoScaling,omitempty"`
	EnableCustomCATrust               *bool                         `json:"enableCustomCATrust,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"`
	GpuProfile                        *AgentPoolGPUProfile          `json:"gpuProfile,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"`
	MessageOfTheDay          *string                       `json:"messageOfTheDay,omitempty"`
	MinCount                 *int                          `json:"minCount,omitempty"`
	Mode                     *string                       `json:"mode,omitempty"`
	NetworkProfile           *AgentPoolNetworkProfile      `json:"networkProfile,omitempty"`
	NodeInitializationTaints []string                      `json:"nodeInitializationTaints,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"`
	SecurityProfile                  *AgentPoolSecurityProfile     `json:"securityProfile,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"`
	VirtualMachineNodesStatus        []VirtualMachineNodes         `json:"virtualMachineNodesStatus,omitempty"`
	VirtualMachinesProfile           *VirtualMachinesProfile       `json:"virtualMachinesProfile,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"`
	WindowsProfile      *AgentPoolWindowsProfile      `json:"windowsProfile,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)

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

		pool.ArtifactStreamingProfile = &artifactStreamingProfile
	} else {
		pool.ArtifactStreamingProfile = nil
	}

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

	// AzureName
	pool.AzureName = source.AzureName

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

	// 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
	}

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

		pool.EnableCustomCATrust = &enableCustomCATrust
	} else {
		pool.EnableCustomCATrust = 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)

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

		pool.GpuProfile = &gpuProfile
	} else {
		pool.GpuProfile = nil
	}

	// 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)

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

		pool.MessageOfTheDay = &messageOfTheDay
	} else {
		pool.MessageOfTheDay = nil
	}

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

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

	// NetworkProfile
	if source.NetworkProfile != nil {
		var networkProfile AgentPoolNetworkProfile
		err := networkProfile.AssignProperties_From_AgentPoolNetworkProfile(source.NetworkProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_AgentPoolNetworkProfile() to populate field NetworkProfile")
		}
		pool.NetworkProfile = &networkProfile
	} else {
		pool.NetworkProfile = nil
	}

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

		pool.NodeInitializationTaints = nodeInitializationTaint
	} else {
		pool.NodeInitializationTaints = nil
	}

	// 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)

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

		pool.SecurityProfile = &securityProfile
	} else {
		pool.SecurityProfile = nil
	}

	// 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
	}

	// VirtualMachineNodesStatus
	if propertyBag.Contains("VirtualMachineNodesStatus") {
		var virtualMachineNodesStatus []VirtualMachineNodes
		err := propertyBag.Pull("VirtualMachineNodesStatus", &virtualMachineNodesStatus)
		if err != nil {
			return errors.Wrap(err, "pulling 'VirtualMachineNodesStatus' from propertyBag")
		}

		pool.VirtualMachineNodesStatus = virtualMachineNodesStatus
	} else {
		pool.VirtualMachineNodesStatus = nil
	}

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

		pool.VirtualMachinesProfile = &virtualMachinesProfile
	} else {
		pool.VirtualMachinesProfile = nil
	}

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

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

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

		pool.WindowsProfile = &windowsProfile
	} else {
		pool.WindowsProfile = 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)

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

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

	// AzureName
	destination.AzureName = pool.AzureName

	// CapacityReservationGroupReference
	if pool.CapacityReservationGroupReference != nil {
		capacityReservationGroupReference := pool.CapacityReservationGroupReference.Copy()
		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
	}

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

	// 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)

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

	// 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)

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

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

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

	// NetworkProfile
	if pool.NetworkProfile != nil {
		var networkProfile v20231001s.AgentPoolNetworkProfile
		err := pool.NetworkProfile.AssignProperties_To_AgentPoolNetworkProfile(&networkProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_AgentPoolNetworkProfile() to populate field NetworkProfile")
		}
		destination.NetworkProfile = &networkProfile
	} else {
		destination.NetworkProfile = nil
	}

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

	// 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)

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

	// 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
	}

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

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

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

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

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

	// 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 v1api20231102preview.ManagedClusters_AgentPool_STATUS
type ManagedClusters_AgentPool_STATUS struct {
	ArtifactStreamingProfile   *AgentPoolArtifactStreamingProfile_STATUS `json:"artifactStreamingProfile,omitempty"`
	AvailabilityZones          []string                                  `json:"availabilityZones,omitempty"`
	CapacityReservationGroupID *string                                   `json:"capacityReservationGroupID,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"`
	EnableCustomCATrust        *bool                                     `json:"enableCustomCATrust,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"`
	GpuProfile                 *AgentPoolGPUProfile_STATUS               `json:"gpuProfile,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"`
	MessageOfTheDay            *string                                   `json:"messageOfTheDay,omitempty"`
	MinCount                   *int                                      `json:"minCount,omitempty"`
	Mode                       *string                                   `json:"mode,omitempty"`
	Name                       *string                                   `json:"name,omitempty"`
	NetworkProfile             *AgentPoolNetworkProfile_STATUS           `json:"networkProfile,omitempty"`
	NodeImageVersion           *string                                   `json:"nodeImageVersion,omitempty"`
	NodeInitializationTaints   []string                                  `json:"nodeInitializationTaints,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"`
	SecurityProfile            *AgentPoolSecurityProfile_STATUS          `json:"securityProfile,omitempty"`
	SpotMaxPrice               *float64                                  `json:"spotMaxPrice,omitempty"`
	Tags                       map[string]string                         `json:"tags,omitempty"`
	Type                       *string                                   `json:"type,omitempty"`
	UpgradeSettings            *AgentPoolUpgradeSettings_STATUS          `json:"upgradeSettings,omitempty"`
	VirtualMachineNodesStatus  []VirtualMachineNodes_STATUS              `json:"virtualMachineNodesStatus,omitempty"`
	VirtualMachinesProfile     *VirtualMachinesProfile_STATUS            `json:"virtualMachinesProfile,omitempty"`
	VmSize                     *string                                   `json:"vmSize,omitempty"`
	VnetSubnetID               *string                                   `json:"vnetSubnetID,omitempty"`
	WindowsProfile             *AgentPoolWindowsProfile_STATUS           `json:"windowsProfile,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)

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

		pool.ArtifactStreamingProfile = &artifactStreamingProfile
	} else {
		pool.ArtifactStreamingProfile = nil
	}

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

	// CapacityReservationGroupID
	pool.CapacityReservationGroupID = genruntime.ClonePointerToString(source.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
	}

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

		pool.EnableCustomCATrust = &enableCustomCATrust
	} else {
		pool.EnableCustomCATrust = 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)

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

		pool.GpuProfile = &gpuProfile
	} else {
		pool.GpuProfile = nil
	}

	// 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)

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

		pool.MessageOfTheDay = &messageOfTheDay
	} else {
		pool.MessageOfTheDay = nil
	}

	// 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 {
		var networkProfile AgentPoolNetworkProfile_STATUS
		err := networkProfile.AssignProperties_From_AgentPoolNetworkProfile_STATUS(source.NetworkProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_AgentPoolNetworkProfile_STATUS() to populate field NetworkProfile")
		}
		pool.NetworkProfile = &networkProfile
	} else {
		pool.NetworkProfile = nil
	}

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

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

		pool.NodeInitializationTaints = nodeInitializationTaint
	} else {
		pool.NodeInitializationTaints = nil
	}

	// 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)

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

		pool.SecurityProfile = &securityProfile
	} else {
		pool.SecurityProfile = nil
	}

	// 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
	}

	// VirtualMachineNodesStatus
	if propertyBag.Contains("VirtualMachineNodesStatus") {
		var virtualMachineNodesStatus []VirtualMachineNodes_STATUS
		err := propertyBag.Pull("VirtualMachineNodesStatus", &virtualMachineNodesStatus)
		if err != nil {
			return errors.Wrap(err, "pulling 'VirtualMachineNodesStatus' from propertyBag")
		}

		pool.VirtualMachineNodesStatus = virtualMachineNodesStatus
	} else {
		pool.VirtualMachineNodesStatus = nil
	}

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

		pool.VirtualMachinesProfile = &virtualMachinesProfile
	} else {
		pool.VirtualMachinesProfile = nil
	}

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

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

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

		pool.WindowsProfile = &windowsProfile
	} else {
		pool.WindowsProfile = 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_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)

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

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

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

	// 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
	}

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

	// 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)

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

	// 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)

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

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

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

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

	// NetworkProfile
	if pool.NetworkProfile != nil {
		var networkProfile v20231001s.AgentPoolNetworkProfile_STATUS
		err := pool.NetworkProfile.AssignProperties_To_AgentPoolNetworkProfile_STATUS(&networkProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_AgentPoolNetworkProfile_STATUS() to populate field NetworkProfile")
		}
		destination.NetworkProfile = &networkProfile
	} else {
		destination.NetworkProfile = nil
	}

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

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

	// 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)

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

	// 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
	}

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

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

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

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

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

	// 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 v1api20231102preview.AgentPoolArtifactStreamingProfile
type AgentPoolArtifactStreamingProfile struct {
	Enabled     *bool                  `json:"enabled,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231102preview.AgentPoolArtifactStreamingProfile_STATUS
type AgentPoolArtifactStreamingProfile_STATUS struct {
	Enabled     *bool                  `json:"enabled,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231102preview.AgentPoolGPUProfile
type AgentPoolGPUProfile struct {
	InstallGPUDriver *bool                  `json:"installGPUDriver,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231102preview.AgentPoolGPUProfile_STATUS
type AgentPoolGPUProfile_STATUS struct {
	InstallGPUDriver *bool                  `json:"installGPUDriver,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231102preview.AgentPoolNetworkProfile
// Network settings of an agent pool.
type AgentPoolNetworkProfile struct {
	AllowedHostPorts                    []PortRange                    `json:"allowedHostPorts,omitempty"`
	ApplicationSecurityGroupsReferences []genruntime.ResourceReference `armReference:"ApplicationSecurityGroups" json:"applicationSecurityGroupsReferences,omitempty"`
	NodePublicIPTags                    []IPTag                        `json:"nodePublicIPTags,omitempty"`
	PropertyBag                         genruntime.PropertyBag         `json:"$propertyBag,omitempty"`
}

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

	// AllowedHostPorts
	if source.AllowedHostPorts != nil {
		allowedHostPortList := make([]PortRange, len(source.AllowedHostPorts))
		for allowedHostPortIndex, allowedHostPortItem := range source.AllowedHostPorts {
			// Shadow the loop variable to avoid aliasing
			allowedHostPortItem := allowedHostPortItem
			var allowedHostPort PortRange
			err := allowedHostPort.AssignProperties_From_PortRange(&allowedHostPortItem)
			if err != nil {
				return errors.Wrap(err, "calling AssignProperties_From_PortRange() to populate field AllowedHostPorts")
			}
			allowedHostPortList[allowedHostPortIndex] = allowedHostPort
		}
		profile.AllowedHostPorts = allowedHostPortList
	} else {
		profile.AllowedHostPorts = nil
	}

	// ApplicationSecurityGroupsReferences
	if source.ApplicationSecurityGroupsReferences != nil {
		applicationSecurityGroupsReferenceList := make([]genruntime.ResourceReference, len(source.ApplicationSecurityGroupsReferences))
		for applicationSecurityGroupsReferenceIndex, applicationSecurityGroupsReferenceItem := range source.ApplicationSecurityGroupsReferences {
			// Shadow the loop variable to avoid aliasing
			applicationSecurityGroupsReferenceItem := applicationSecurityGroupsReferenceItem
			applicationSecurityGroupsReferenceList[applicationSecurityGroupsReferenceIndex] = applicationSecurityGroupsReferenceItem.Copy()
		}
		profile.ApplicationSecurityGroupsReferences = applicationSecurityGroupsReferenceList
	} else {
		profile.ApplicationSecurityGroupsReferences = nil
	}

	// NodePublicIPTags
	if source.NodePublicIPTags != nil {
		nodePublicIPTagList := make([]IPTag, len(source.NodePublicIPTags))
		for nodePublicIPTagIndex, nodePublicIPTagItem := range source.NodePublicIPTags {
			// Shadow the loop variable to avoid aliasing
			nodePublicIPTagItem := nodePublicIPTagItem
			var nodePublicIPTag IPTag
			err := nodePublicIPTag.AssignProperties_From_IPTag(&nodePublicIPTagItem)
			if err != nil {
				return errors.Wrap(err, "calling AssignProperties_From_IPTag() to populate field NodePublicIPTags")
			}
			nodePublicIPTagList[nodePublicIPTagIndex] = nodePublicIPTag
		}
		profile.NodePublicIPTags = nodePublicIPTagList
	} else {
		profile.NodePublicIPTags = nil
	}

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

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

	// No error
	return nil
}

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

	// AllowedHostPorts
	if profile.AllowedHostPorts != nil {
		allowedHostPortList := make([]v20231001s.PortRange, len(profile.AllowedHostPorts))
		for allowedHostPortIndex, allowedHostPortItem := range profile.AllowedHostPorts {
			// Shadow the loop variable to avoid aliasing
			allowedHostPortItem := allowedHostPortItem
			var allowedHostPort v20231001s.PortRange
			err := allowedHostPortItem.AssignProperties_To_PortRange(&allowedHostPort)
			if err != nil {
				return errors.Wrap(err, "calling AssignProperties_To_PortRange() to populate field AllowedHostPorts")
			}
			allowedHostPortList[allowedHostPortIndex] = allowedHostPort
		}
		destination.AllowedHostPorts = allowedHostPortList
	} else {
		destination.AllowedHostPorts = nil
	}

	// ApplicationSecurityGroupsReferences
	if profile.ApplicationSecurityGroupsReferences != nil {
		applicationSecurityGroupsReferenceList := make([]genruntime.ResourceReference, len(profile.ApplicationSecurityGroupsReferences))
		for applicationSecurityGroupsReferenceIndex, applicationSecurityGroupsReferenceItem := range profile.ApplicationSecurityGroupsReferences {
			// Shadow the loop variable to avoid aliasing
			applicationSecurityGroupsReferenceItem := applicationSecurityGroupsReferenceItem
			applicationSecurityGroupsReferenceList[applicationSecurityGroupsReferenceIndex] = applicationSecurityGroupsReferenceItem.Copy()
		}
		destination.ApplicationSecurityGroupsReferences = applicationSecurityGroupsReferenceList
	} else {
		destination.ApplicationSecurityGroupsReferences = nil
	}

	// NodePublicIPTags
	if profile.NodePublicIPTags != nil {
		nodePublicIPTagList := make([]v20231001s.IPTag, len(profile.NodePublicIPTags))
		for nodePublicIPTagIndex, nodePublicIPTagItem := range profile.NodePublicIPTags {
			// Shadow the loop variable to avoid aliasing
			nodePublicIPTagItem := nodePublicIPTagItem
			var nodePublicIPTag v20231001s.IPTag
			err := nodePublicIPTagItem.AssignProperties_To_IPTag(&nodePublicIPTag)
			if err != nil {
				return errors.Wrap(err, "calling AssignProperties_To_IPTag() to populate field NodePublicIPTags")
			}
			nodePublicIPTagList[nodePublicIPTagIndex] = nodePublicIPTag
		}
		destination.NodePublicIPTags = nodePublicIPTagList
	} else {
		destination.NodePublicIPTags = nil
	}

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

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

	// No error
	return nil
}

// Storage version of v1api20231102preview.AgentPoolNetworkProfile_STATUS
// Network settings of an agent pool.
type AgentPoolNetworkProfile_STATUS struct {
	AllowedHostPorts          []PortRange_STATUS     `json:"allowedHostPorts,omitempty"`
	ApplicationSecurityGroups []string               `json:"applicationSecurityGroups,omitempty"`
	NodePublicIPTags          []IPTag_STATUS         `json:"nodePublicIPTags,omitempty"`
	PropertyBag               genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

	// AllowedHostPorts
	if source.AllowedHostPorts != nil {
		allowedHostPortList := make([]PortRange_STATUS, len(source.AllowedHostPorts))
		for allowedHostPortIndex, allowedHostPortItem := range source.AllowedHostPorts {
			// Shadow the loop variable to avoid aliasing
			allowedHostPortItem := allowedHostPortItem
			var allowedHostPort PortRange_STATUS
			err := allowedHostPort.AssignProperties_From_PortRange_STATUS(&allowedHostPortItem)
			if err != nil {
				return errors.Wrap(err, "calling AssignProperties_From_PortRange_STATUS() to populate field AllowedHostPorts")
			}
			allowedHostPortList[allowedHostPortIndex] = allowedHostPort
		}
		profile.AllowedHostPorts = allowedHostPortList
	} else {
		profile.AllowedHostPorts = nil
	}

	// ApplicationSecurityGroups
	profile.ApplicationSecurityGroups = genruntime.CloneSliceOfString(source.ApplicationSecurityGroups)

	// NodePublicIPTags
	if source.NodePublicIPTags != nil {
		nodePublicIPTagList := make([]IPTag_STATUS, len(source.NodePublicIPTags))
		for nodePublicIPTagIndex, nodePublicIPTagItem := range source.NodePublicIPTags {
			// Shadow the loop variable to avoid aliasing
			nodePublicIPTagItem := nodePublicIPTagItem
			var nodePublicIPTag IPTag_STATUS
			err := nodePublicIPTag.AssignProperties_From_IPTag_STATUS(&nodePublicIPTagItem)
			if err != nil {
				return errors.Wrap(err, "calling AssignProperties_From_IPTag_STATUS() to populate field NodePublicIPTags")
			}
			nodePublicIPTagList[nodePublicIPTagIndex] = nodePublicIPTag
		}
		profile.NodePublicIPTags = nodePublicIPTagList
	} else {
		profile.NodePublicIPTags = nil
	}

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

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

	// No error
	return nil
}

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

	// AllowedHostPorts
	if profile.AllowedHostPorts != nil {
		allowedHostPortList := make([]v20231001s.PortRange_STATUS, len(profile.AllowedHostPorts))
		for allowedHostPortIndex, allowedHostPortItem := range profile.AllowedHostPorts {
			// Shadow the loop variable to avoid aliasing
			allowedHostPortItem := allowedHostPortItem
			var allowedHostPort v20231001s.PortRange_STATUS
			err := allowedHostPortItem.AssignProperties_To_PortRange_STATUS(&allowedHostPort)
			if err != nil {
				return errors.Wrap(err, "calling AssignProperties_To_PortRange_STATUS() to populate field AllowedHostPorts")
			}
			allowedHostPortList[allowedHostPortIndex] = allowedHostPort
		}
		destination.AllowedHostPorts = allowedHostPortList
	} else {
		destination.AllowedHostPorts = nil
	}

	// ApplicationSecurityGroups
	destination.ApplicationSecurityGroups = genruntime.CloneSliceOfString(profile.ApplicationSecurityGroups)

	// NodePublicIPTags
	if profile.NodePublicIPTags != nil {
		nodePublicIPTagList := make([]v20231001s.IPTag_STATUS, len(profile.NodePublicIPTags))
		for nodePublicIPTagIndex, nodePublicIPTagItem := range profile.NodePublicIPTags {
			// Shadow the loop variable to avoid aliasing
			nodePublicIPTagItem := nodePublicIPTagItem
			var nodePublicIPTag v20231001s.IPTag_STATUS
			err := nodePublicIPTagItem.AssignProperties_To_IPTag_STATUS(&nodePublicIPTag)
			if err != nil {
				return errors.Wrap(err, "calling AssignProperties_To_IPTag_STATUS() to populate field NodePublicIPTags")
			}
			nodePublicIPTagList[nodePublicIPTagIndex] = nodePublicIPTag
		}
		destination.NodePublicIPTags = nodePublicIPTagList
	} else {
		destination.NodePublicIPTags = nil
	}

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

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

	// No error
	return nil
}

// Storage version of v1api20231102preview.AgentPoolSecurityProfile
// The security settings of an agent pool.
type AgentPoolSecurityProfile struct {
	EnableSecureBoot *bool                  `json:"enableSecureBoot,omitempty"`
	EnableVTPM       *bool                  `json:"enableVTPM,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SshAccess        *string                `json:"sshAccess,omitempty"`
}

// Storage version of v1api20231102preview.AgentPoolSecurityProfile_STATUS
// The security settings of an agent pool.
type AgentPoolSecurityProfile_STATUS struct {
	EnableSecureBoot *bool                  `json:"enableSecureBoot,omitempty"`
	EnableVTPM       *bool                  `json:"enableVTPM,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SshAccess        *string                `json:"sshAccess,omitempty"`
}

// Storage version of v1api20231102preview.AgentPoolUpgradeSettings
// Settings for upgrading an agentpool
type AgentPoolUpgradeSettings struct {
	DrainTimeoutInMinutes     *int                   `json:"drainTimeoutInMinutes,omitempty"`
	MaxSurge                  *string                `json:"maxSurge,omitempty"`
	NodeSoakDurationInMinutes *int                   `json:"nodeSoakDurationInMinutes,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
	settings.DrainTimeoutInMinutes = genruntime.ClonePointerToInt(source.DrainTimeoutInMinutes)

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

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

		settings.NodeSoakDurationInMinutes = &nodeSoakDurationInMinute
	} else {
		settings.NodeSoakDurationInMinutes = nil
	}

	// 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
	destination.DrainTimeoutInMinutes = genruntime.ClonePointerToInt(settings.DrainTimeoutInMinutes)

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

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

	// 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 v1api20231102preview.AgentPoolUpgradeSettings_STATUS
// Settings for upgrading an agentpool
type AgentPoolUpgradeSettings_STATUS struct {
	DrainTimeoutInMinutes     *int                   `json:"drainTimeoutInMinutes,omitempty"`
	MaxSurge                  *string                `json:"maxSurge,omitempty"`
	NodeSoakDurationInMinutes *int                   `json:"nodeSoakDurationInMinutes,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
	settings.DrainTimeoutInMinutes = genruntime.ClonePointerToInt(source.DrainTimeoutInMinutes)

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

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

		settings.NodeSoakDurationInMinutes = &nodeSoakDurationInMinute
	} else {
		settings.NodeSoakDurationInMinutes = nil
	}

	// 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
	destination.DrainTimeoutInMinutes = genruntime.ClonePointerToInt(settings.DrainTimeoutInMinutes)

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

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

	// 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
}

// Storage version of v1api20231102preview.AgentPoolWindowsProfile
// The Windows agent pool's specific profile.
type AgentPoolWindowsProfile struct {
	DisableOutboundNat *bool                  `json:"disableOutboundNat,omitempty"`
	PropertyBag        genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// AssignProperties_From_AgentPoolWindowsProfile populates our AgentPoolWindowsProfile from the provided source AgentPoolWindowsProfile
func (profile *AgentPoolWindowsProfile) AssignProperties_From_AgentPoolWindowsProfile(source *v20230202ps.AgentPoolWindowsProfile) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// DisableOutboundNat
	if source.DisableOutboundNat != nil {
		disableOutboundNat := *source.DisableOutboundNat
		profile.DisableOutboundNat = &disableOutboundNat
	} else {
		profile.DisableOutboundNat = nil
	}

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

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

	// No error
	return nil
}

// AssignProperties_To_AgentPoolWindowsProfile populates the provided destination AgentPoolWindowsProfile from our AgentPoolWindowsProfile
func (profile *AgentPoolWindowsProfile) AssignProperties_To_AgentPoolWindowsProfile(destination *v20230202ps.AgentPoolWindowsProfile) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(profile.PropertyBag)

	// DisableOutboundNat
	if profile.DisableOutboundNat != nil {
		disableOutboundNat := *profile.DisableOutboundNat
		destination.DisableOutboundNat = &disableOutboundNat
	} else {
		destination.DisableOutboundNat = nil
	}

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

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

	// No error
	return nil
}

// Storage version of v1api20231102preview.AgentPoolWindowsProfile_STATUS
// The Windows agent pool's specific profile.
type AgentPoolWindowsProfile_STATUS struct {
	DisableOutboundNat *bool                  `json:"disableOutboundNat,omitempty"`
	PropertyBag        genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// AssignProperties_From_AgentPoolWindowsProfile_STATUS populates our AgentPoolWindowsProfile_STATUS from the provided source AgentPoolWindowsProfile_STATUS
func (profile *AgentPoolWindowsProfile_STATUS) AssignProperties_From_AgentPoolWindowsProfile_STATUS(source *v20230202ps.AgentPoolWindowsProfile_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// DisableOutboundNat
	if source.DisableOutboundNat != nil {
		disableOutboundNat := *source.DisableOutboundNat
		profile.DisableOutboundNat = &disableOutboundNat
	} else {
		profile.DisableOutboundNat = nil
	}

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

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

	// No error
	return nil
}

// AssignProperties_To_AgentPoolWindowsProfile_STATUS populates the provided destination AgentPoolWindowsProfile_STATUS from our AgentPoolWindowsProfile_STATUS
func (profile *AgentPoolWindowsProfile_STATUS) AssignProperties_To_AgentPoolWindowsProfile_STATUS(destination *v20230202ps.AgentPoolWindowsProfile_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(profile.PropertyBag)

	// DisableOutboundNat
	if profile.DisableOutboundNat != nil {
		disableOutboundNat := *profile.DisableOutboundNat
		destination.DisableOutboundNat = &disableOutboundNat
	} else {
		destination.DisableOutboundNat = nil
	}

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

	// Invoke the augmentConversionForAgentPoolWindowsProfile_STATUS interface (if implemented) to customize the conversion
	var profileAsAny any = profile
	if augmentedProfile, ok := profileAsAny.(augmentConversionForAgentPoolWindowsProfile_STATUS); ok {
		err := augmentedProfile.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 v1api20231102preview.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 v1api20231102preview.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 v1api20231102preview.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 v1api20231102preview.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 v1api20231102preview.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
}

// Storage version of v1api20231102preview.VirtualMachineNodes
// Current status on a group of nodes of the same vm size.
type VirtualMachineNodes struct {
	Count       *int                   `json:"count,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Size        *string                `json:"size,omitempty"`
}

// Storage version of v1api20231102preview.VirtualMachineNodes_STATUS
// Current status on a group of nodes of the same vm size.
type VirtualMachineNodes_STATUS struct {
	Count       *int                   `json:"count,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Size        *string                `json:"size,omitempty"`
}

// Storage version of v1api20231102preview.VirtualMachinesProfile
// Specifications on VirtualMachines agent pool.
type VirtualMachinesProfile struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Scale       *ScaleProfile          `json:"scale,omitempty"`
}

// Storage version of v1api20231102preview.VirtualMachinesProfile_STATUS
// Specifications on VirtualMachines agent pool.
type VirtualMachinesProfile_STATUS struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Scale       *ScaleProfile_STATUS   `json:"scale,omitempty"`
}

type augmentConversionForAgentPoolNetworkProfile interface {
	AssignPropertiesFrom(src *v20231001s.AgentPoolNetworkProfile) error
	AssignPropertiesTo(dst *v20231001s.AgentPoolNetworkProfile) error
}

type augmentConversionForAgentPoolNetworkProfile_STATUS interface {
	AssignPropertiesFrom(src *v20231001s.AgentPoolNetworkProfile_STATUS) error
	AssignPropertiesTo(dst *v20231001s.AgentPoolNetworkProfile_STATUS) error
}

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 augmentConversionForAgentPoolWindowsProfile interface {
	AssignPropertiesFrom(src *v20230202ps.AgentPoolWindowsProfile) error
	AssignPropertiesTo(dst *v20230202ps.AgentPoolWindowsProfile) error
}

type augmentConversionForAgentPoolWindowsProfile_STATUS interface {
	AssignPropertiesFrom(src *v20230202ps.AgentPoolWindowsProfile_STATUS) error
	AssignPropertiesTo(dst *v20230202ps.AgentPoolWindowsProfile_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 v1api20231102preview.IPTag
// Contains the IPTag associated with the object.
type IPTag struct {
	IpTagType   *string                `json:"ipTagType,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tag         *string                `json:"tag,omitempty"`
}

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

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

	// No error
	return nil
}

// Storage version of v1api20231102preview.PortRange
// The port range.
type PortRange struct {
	PortEnd     *int                   `json:"portEnd,omitempty"`
	PortStart   *int                   `json:"portStart,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Protocol    *string                `json:"protocol,omitempty"`
}

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

	// PortEnd
	portRange.PortEnd = genruntime.ClonePointerToInt(source.PortEnd)

	// PortStart
	portRange.PortStart = genruntime.ClonePointerToInt(source.PortStart)

	// Protocol
	portRange.Protocol = genruntime.ClonePointerToString(source.Protocol)

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

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

	// No error
	return nil
}

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

	// PortEnd
	destination.PortEnd = genruntime.ClonePointerToInt(portRange.PortEnd)

	// PortStart
	destination.PortStart = genruntime.ClonePointerToInt(portRange.PortStart)

	// Protocol
	destination.Protocol = genruntime.ClonePointerToString(portRange.Protocol)

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

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

	// No error
	return nil
}

// Storage version of v1api20231102preview.PortRange_STATUS
// The port range.
type PortRange_STATUS struct {
	PortEnd     *int                   `json:"portEnd,omitempty"`
	PortStart   *int                   `json:"portStart,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Protocol    *string                `json:"protocol,omitempty"`
}

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

	// PortEnd
	portRange.PortEnd = genruntime.ClonePointerToInt(source.PortEnd)

	// PortStart
	portRange.PortStart = genruntime.ClonePointerToInt(source.PortStart)

	// Protocol
	portRange.Protocol = genruntime.ClonePointerToString(source.Protocol)

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

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

	// No error
	return nil
}

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

	// PortEnd
	destination.PortEnd = genruntime.ClonePointerToInt(portRange.PortEnd)

	// PortStart
	destination.PortStart = genruntime.ClonePointerToInt(portRange.PortStart)

	// Protocol
	destination.Protocol = genruntime.ClonePointerToString(portRange.Protocol)

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

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

	// No error
	return nil
}

// Storage version of v1api20231102preview.ScaleProfile
// Specifications on how to scale a VirtualMachines agent pool.
type ScaleProfile struct {
	Manual      []ManualScaleProfile   `json:"manual,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231102preview.ScaleProfile_STATUS
// Specifications on how to scale a VirtualMachines agent pool.
type ScaleProfile_STATUS struct {
	Manual      []ManualScaleProfile_STATUS `json:"manual,omitempty"`
	PropertyBag genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20231102preview.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 v1api20231102preview.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 augmentConversionForIPTag interface {
	AssignPropertiesFrom(src *v20231001s.IPTag) error
	AssignPropertiesTo(dst *v20231001s.IPTag) error
}

type augmentConversionForIPTag_STATUS interface {
	AssignPropertiesFrom(src *v20231001s.IPTag_STATUS) error
	AssignPropertiesTo(dst *v20231001s.IPTag_STATUS) error
}

type augmentConversionForPortRange interface {
	AssignPropertiesFrom(src *v20231001s.PortRange) error
	AssignPropertiesTo(dst *v20231001s.PortRange) error
}

type augmentConversionForPortRange_STATUS interface {
	AssignPropertiesFrom(src *v20231001s.PortRange_STATUS) error
	AssignPropertiesTo(dst *v20231001s.PortRange_STATUS) error
}

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
}

// Storage version of v1api20231102preview.ManualScaleProfile
// Specifications on number of machines.
type ManualScaleProfile struct {
	Count       *int                   `json:"count,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Sizes       []string               `json:"sizes,omitempty"`
}

// Storage version of v1api20231102preview.ManualScaleProfile_STATUS
// Specifications on number of machines.
type ManualScaleProfile_STATUS struct {
	Count       *int                   `json:"count,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Sizes       []string               `json:"sizes,omitempty"`
}

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