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

import (
	storage "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230201/storage"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/configmaps"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/core"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/secrets"
	"github.com/rotisserie/eris"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime/schema"
	"sigs.k8s.io/controller-runtime/pkg/conversion"
)

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories={azure,containerservice}
// +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 v1api20210501.ManagedClustersAgentPool
// Generator information:
// - Generated from: /containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2021-05-01/managedClusters.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}
type ManagedClustersAgentPool struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ManagedClustersAgentPool_Spec   `json:"spec,omitempty"`
	Status            ManagedClustersAgentPool_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 {
	// intermediate variable for conversion
	var source storage.ManagedClustersAgentPool

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

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

	return nil
}

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

	return nil
}

var _ configmaps.Exporter = &ManagedClustersAgentPool{}

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

var _ secrets.Exporter = &ManagedClustersAgentPool{}

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

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 "2021-05-01"
func (pool ManagedClustersAgentPool) GetAPIVersion() string {
	return "2021-05-01"
}

// 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 &ManagedClustersAgentPool_STATUS{}
}

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

	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.(*ManagedClustersAgentPool_STATUS); ok {
		pool.Status = *st
		return nil
	}

	// Convert status to required version
	var st ManagedClustersAgentPool_STATUS
	err := status.ConvertStatusTo(&st)
	if err != nil {
		return eris.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 *storage.ManagedClustersAgentPool) error {

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

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

	// Status
	var status ManagedClustersAgentPool_STATUS
	err = status.AssignProperties_From_ManagedClustersAgentPool_STATUS(&source.Status)
	if err != nil {
		return eris.Wrap(err, "calling AssignProperties_From_ManagedClustersAgentPool_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 eris.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 *storage.ManagedClustersAgentPool) error {

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

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

	// Status
	var status storage.ManagedClustersAgentPool_STATUS
	err = pool.Status.AssignProperties_To_ManagedClustersAgentPool_STATUS(&status)
	if err != nil {
		return eris.Wrap(err, "calling AssignProperties_To_ManagedClustersAgentPool_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 eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// OriginalGVK returns a GroupValueKind for the original API version used to create the resource
func (pool *ManagedClustersAgentPool) OriginalGVK() *schema.GroupVersionKind {
	return &schema.GroupVersionKind{
		Group:   GroupVersion.Group,
		Version: pool.Spec.OriginalVersion,
		Kind:    "ManagedClustersAgentPool",
	}
}

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

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

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

	// AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it
	// doesn't have to be.
	AzureName              string            `json:"azureName,omitempty"`
	Count                  *int              `json:"count,omitempty"`
	EnableAutoScaling      *bool             `json:"enableAutoScaling,omitempty"`
	EnableEncryptionAtHost *bool             `json:"enableEncryptionAtHost,omitempty"`
	EnableFIPS             *bool             `json:"enableFIPS,omitempty"`
	EnableNodePublicIP     *bool             `json:"enableNodePublicIP,omitempty"`
	EnableUltraSSD         *bool             `json:"enableUltraSSD,omitempty"`
	GpuInstanceProfile     *string           `json:"gpuInstanceProfile,omitempty"`
	KubeletConfig          *KubeletConfig    `json:"kubeletConfig,omitempty"`
	KubeletDiskType        *string           `json:"kubeletDiskType,omitempty"`
	LinuxOSConfig          *LinuxOSConfig    `json:"linuxOSConfig,omitempty"`
	MaxCount               *int              `json:"maxCount,omitempty"`
	MaxPods                *int              `json:"maxPods,omitempty"`
	MinCount               *int              `json:"minCount,omitempty"`
	Mode                   *string           `json:"mode,omitempty"`
	NodeLabels             map[string]string `json:"nodeLabels,omitempty" serializationType:"explicitEmptyCollection"`

	// NodePublicIPPrefixIDReference: This is of the form:
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}
	NodePublicIPPrefixIDReference *genruntime.ResourceReference         `armReference:"NodePublicIPPrefixID" json:"nodePublicIPPrefixIDReference,omitempty"`
	NodeTaints                    []string                              `json:"nodeTaints,omitempty" serializationType:"explicitEmptyCollection"`
	OperatorSpec                  *ManagedClustersAgentPoolOperatorSpec `json:"operatorSpec,omitempty"`
	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"`

	// PodSubnetIDReference: 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}
	PodSubnetIDReference      *genruntime.ResourceReference `armReference:"PodSubnetID" json:"podSubnetIDReference,omitempty"`
	PropertyBag               genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	ProximityPlacementGroupID *string                       `json:"proximityPlacementGroupID,omitempty"`
	ScaleSetEvictionPolicy    *string                       `json:"scaleSetEvictionPolicy,omitempty"`
	ScaleSetPriority          *string                       `json:"scaleSetPriority,omitempty"`
	SpotMaxPrice              *float64                      `json:"spotMaxPrice,omitempty"`
	Tags                      map[string]string             `json:"tags,omitempty" serializationType:"explicitEmptyCollection"`
	Type                      *string                       `json:"type,omitempty"`
	UpgradeSettings           *AgentPoolUpgradeSettings     `json:"upgradeSettings,omitempty"`
	VmSize                    *string                       `json:"vmSize,omitempty"`

	// VnetSubnetIDReference: 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}
	VnetSubnetIDReference *genruntime.ResourceReference `armReference:"VnetSubnetID" json:"vnetSubnetIDReference,omitempty"`
}

var _ genruntime.ConvertibleSpec = &ManagedClustersAgentPool_Spec{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.ManagedClustersAgentPool_Spec{}
	err := pool.AssignProperties_To_ManagedClustersAgentPool_Spec(dst)
	if err != nil {
		return eris.Wrap(err, "initial step of conversion in ConvertSpecTo()")
	}

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

	return nil
}

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

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

	// AzureName
	pool.AzureName = source.AzureName

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

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

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

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

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

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

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

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

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

	// KubeletConfig
	if source.KubeletConfig != nil {
		var kubeletConfig KubeletConfig
		err := kubeletConfig.AssignProperties_From_KubeletConfig(source.KubeletConfig)
		if err != nil {
			return eris.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 eris.Wrap(err, "calling AssignProperties_From_LinuxOSConfig() to populate field LinuxOSConfig")
		}
		pool.LinuxOSConfig = &linuxOSConfig
	} else {
		pool.LinuxOSConfig = nil
	}

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

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

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

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

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

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

		pool.NodePublicIPPrefixIDReference = &nodePublicIPPrefixIDReference
	} else {
		pool.NodePublicIPPrefixIDReference = nil
	}

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

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

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

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

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

		pool.PodSubnetIDReference = &podSubnetIDReference
	} else {
		pool.PodSubnetIDReference = nil
	}

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

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

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

		pool.ProximityPlacementGroupID = &proximityPlacementGroupID
	} else {
		pool.ProximityPlacementGroupID = nil
	}

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

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

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

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

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

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

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

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

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

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

		pool.VnetSubnetIDReference = &vnetSubnetIDReference
	} else {
		pool.VnetSubnetIDReference = nil
	}

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

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

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

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

	// No error
	return nil
}

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

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

	// AzureName
	destination.AzureName = pool.AzureName

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

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

		destination.CreationData = &creationDatum
	} else {
		destination.CreationData = nil
	}

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

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

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

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

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

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

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

		destination.HostGroupReference = &hostGroupReference
	} else {
		destination.HostGroupReference = nil
	}

	// KubeletConfig
	if pool.KubeletConfig != nil {
		var kubeletConfig storage.KubeletConfig
		err := pool.KubeletConfig.AssignProperties_To_KubeletConfig(&kubeletConfig)
		if err != nil {
			return eris.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 storage.LinuxOSConfig
		err := pool.LinuxOSConfig.AssignProperties_To_LinuxOSConfig(&linuxOSConfig)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_LinuxOSConfig() to populate field LinuxOSConfig")
		}
		destination.LinuxOSConfig = &linuxOSConfig
	} else {
		destination.LinuxOSConfig = nil
	}

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

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

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

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

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

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

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

		destination.NodePublicIPPrefixReference = &nodePublicIPPrefixReference
	} else {
		destination.NodePublicIPPrefixReference = nil
	}

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

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

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

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

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

		destination.PodSubnetReference = &podSubnetReference
	} else {
		destination.PodSubnetReference = nil
	}

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

		destination.PowerState = &powerState
	} else {
		destination.PowerState = nil
	}

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

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

		destination.ProximityPlacementGroupReference = &proximityPlacementGroupReference
	} else {
		destination.ProximityPlacementGroupReference = nil
	}

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

		destination.ScaleDownMode = &scaleDownMode
	} else {
		destination.ScaleDownMode = nil
	}

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

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

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

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

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

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

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

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

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

		destination.VnetSubnetReference = &vnetSubnetReference
	} else {
		destination.VnetSubnetReference = nil
	}

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

		destination.WorkloadRuntime = &workloadRuntime
	} else {
		destination.WorkloadRuntime = nil
	}

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

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

	// No error
	return nil
}

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

var _ genruntime.ConvertibleStatus = &ManagedClustersAgentPool_STATUS{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.ManagedClustersAgentPool_STATUS{}
	err := pool.AssignProperties_To_ManagedClustersAgentPool_STATUS(dst)
	if err != nil {
		return eris.Wrap(err, "initial step of conversion in ConvertStatusTo()")
	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

	// HostGroupID
	if source.HostGroupID != nil {
		propertyBag.Add("HostGroupID", *source.HostGroupID)
	} else {
		propertyBag.Remove("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 eris.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 eris.Wrap(err, "calling AssignProperties_From_LinuxOSConfig_STATUS() to populate field LinuxOSConfig")
		}
		pool.LinuxOSConfig = &linuxOSConfig
	} else {
		pool.LinuxOSConfig = nil
	}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	// PowerState
	if source.PowerState != nil {
		var powerState PowerState_STATUS
		err := powerState.AssignProperties_From_PowerState_STATUS(source.PowerState)
		if err != nil {
			return eris.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
	if source.ScaleDownMode != nil {
		propertyBag.Add("ScaleDownMode", *source.ScaleDownMode)
	} else {
		propertyBag.Remove("ScaleDownMode")
	}

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

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

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

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

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

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

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

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

		destination.CreationData = &creationDatum
	} else {
		destination.CreationData = nil
	}

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

		destination.CurrentOrchestratorVersion = &currentOrchestratorVersion
	} else {
		destination.CurrentOrchestratorVersion = nil
	}

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

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

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

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

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

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

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

		destination.HostGroupID = &hostGroupID
	} else {
		destination.HostGroupID = nil
	}

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

	// KubeletConfig
	if pool.KubeletConfig != nil {
		var kubeletConfig storage.KubeletConfig_STATUS
		err := pool.KubeletConfig.AssignProperties_To_KubeletConfig_STATUS(&kubeletConfig)
		if err != nil {
			return eris.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 storage.LinuxOSConfig_STATUS
		err := pool.LinuxOSConfig.AssignProperties_To_LinuxOSConfig_STATUS(&linuxOSConfig)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_LinuxOSConfig_STATUS() to populate field LinuxOSConfig")
		}
		destination.LinuxOSConfig = &linuxOSConfig
	} else {
		destination.LinuxOSConfig = nil
	}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	// PowerState
	if pool.PowerState != nil {
		var powerState storage.PowerState_STATUS
		err := pool.PowerState.AssignProperties_To_PowerState_STATUS(&powerState)
		if err != nil {
			return eris.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
	if propertyBag.Contains("ScaleDownMode") {
		var scaleDownMode string
		err := propertyBag.Pull("ScaleDownMode", &scaleDownMode)
		if err != nil {
			return eris.Wrap(err, "pulling 'ScaleDownMode' from propertyBag")
		}

		destination.ScaleDownMode = &scaleDownMode
	} else {
		destination.ScaleDownMode = nil
	}

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

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

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

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

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

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

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

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

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

		destination.WorkloadRuntime = &workloadRuntime
	} else {
		destination.WorkloadRuntime = nil
	}

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

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

	// No error
	return nil
}

// Storage version of v1api20210501.AgentPoolUpgradeSettings
type AgentPoolUpgradeSettings struct {
	MaxSurge    *string                `json:"maxSurge,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

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

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

	// Invoke the augmentConversionForAgentPoolUpgradeSettings interface (if implemented) to customize the conversion
	var settingsAsAny any = settings
	if augmentedSettings, ok := settingsAsAny.(augmentConversionForAgentPoolUpgradeSettings); ok {
		err := augmentedSettings.AssignPropertiesFrom(source)
		if err != nil {
			return eris.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 *storage.AgentPoolUpgradeSettings) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(settings.PropertyBag)

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

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

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

	// No error
	return nil
}

// Storage version of v1api20210501.AgentPoolUpgradeSettings_STATUS
type AgentPoolUpgradeSettings_STATUS struct {
	MaxSurge    *string                `json:"maxSurge,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

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

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

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

	// Invoke the augmentConversionForAgentPoolUpgradeSettings_STATUS interface (if implemented) to customize the conversion
	var settingsAsAny any = settings
	if augmentedSettings, ok := settingsAsAny.(augmentConversionForAgentPoolUpgradeSettings_STATUS); ok {
		err := augmentedSettings.AssignPropertiesFrom(source)
		if err != nil {
			return eris.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 *storage.AgentPoolUpgradeSettings_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(settings.PropertyBag)

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

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

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

	// No error
	return nil
}

type augmentConversionForManagedClustersAgentPool_Spec interface {
	AssignPropertiesFrom(src *storage.ManagedClustersAgentPool_Spec) error
	AssignPropertiesTo(dst *storage.ManagedClustersAgentPool_Spec) error
}

type augmentConversionForManagedClustersAgentPool_STATUS interface {
	AssignPropertiesFrom(src *storage.ManagedClustersAgentPool_STATUS) error
	AssignPropertiesTo(dst *storage.ManagedClustersAgentPool_STATUS) error
}

// Storage version of v1api20210501.KubeletConfig
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 *storage.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 eris.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 *storage.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 eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20210501.KubeletConfig_STATUS
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 *storage.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 eris.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 *storage.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 eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20210501.LinuxOSConfig
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 *storage.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 eris.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 eris.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 *storage.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 storage.SysctlConfig
		err := config.Sysctls.AssignProperties_To_SysctlConfig(&sysctl)
		if err != nil {
			return eris.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 eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20210501.LinuxOSConfig_STATUS
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 *storage.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 eris.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 eris.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 *storage.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 storage.SysctlConfig_STATUS
		err := config.Sysctls.AssignProperties_To_SysctlConfig_STATUS(&sysctl)
		if err != nil {
			return eris.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 eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

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

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

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

type augmentConversionForManagedClustersAgentPoolOperatorSpec interface {
	AssignPropertiesFrom(src *storage.ManagedClustersAgentPoolOperatorSpec) error
	AssignPropertiesTo(dst *storage.ManagedClustersAgentPoolOperatorSpec) error
}

// Storage version of v1api20210501.SysctlConfig
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 *storage.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 eris.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 *storage.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 eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20210501.SysctlConfig_STATUS
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 *storage.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 eris.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 *storage.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 eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

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

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

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