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

import (
	"fmt"
	v20231102ps "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20231102preview/storage"
	"github.com/Azure/azure-service-operator/v2/internal/reflecthelpers"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions"
	"github.com/pkg/errors"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/runtime/schema"
	"sigs.k8s.io/controller-runtime/pkg/conversion"
	"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
)

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity"
// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason"
// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message"
// Generator information:
// - Generated from: /containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/managedClusters.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}
type ManagedClustersAgentPool struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ManagedClusters_AgentPool_Spec   `json:"spec,omitempty"`
	Status            ManagedClusters_AgentPool_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &ManagedClustersAgentPool{}

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

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

var _ conversion.Convertible = &ManagedClustersAgentPool{}

// ConvertFrom populates our ManagedClustersAgentPool from the provided hub ManagedClustersAgentPool
func (pool *ManagedClustersAgentPool) ConvertFrom(hub conversion.Hub) error {
	// intermediate variable for conversion
	var source v20231102ps.ManagedClustersAgentPool

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

	err = pool.AssignProperties_From_ManagedClustersAgentPool(&source)
	if err != nil {
		return errors.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 v20231102ps.ManagedClustersAgentPool
	err := pool.AssignProperties_To_ManagedClustersAgentPool(&destination)
	if err != nil {
		return errors.Wrap(err, "converting to destination from pool")
	}
	err = destination.ConvertTo(hub)
	if err != nil {
		return errors.Wrap(err, "converting from destination to hub")
	}

	return nil
}

// +kubebuilder:webhook:path=/mutate-containerservice-azure-com-v1api20231102preview-managedclustersagentpool,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=containerservice.azure.com,resources=managedclustersagentpools,verbs=create;update,versions=v1api20231102preview,name=default.v1api20231102preview.managedclustersagentpools.containerservice.azure.com,admissionReviewVersions=v1

var _ admission.Defaulter = &ManagedClustersAgentPool{}

// Default applies defaults to the ManagedClustersAgentPool resource
func (pool *ManagedClustersAgentPool) Default() {
	pool.defaultImpl()
	var temp any = pool
	if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok {
		runtimeDefaulter.CustomDefault()
	}
}

// defaultAzureName defaults the Azure name of the resource to the Kubernetes name
func (pool *ManagedClustersAgentPool) defaultAzureName() {
	if pool.Spec.AzureName == "" {
		pool.Spec.AzureName = pool.Name
	}
}

// defaultImpl applies the code generated defaults to the ManagedClustersAgentPool resource
func (pool *ManagedClustersAgentPool) defaultImpl() { pool.defaultAzureName() }

var _ genruntime.KubernetesResource = &ManagedClustersAgentPool{}

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

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

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

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

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

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

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

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

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

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

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

	pool.Status = st
	return nil
}

// +kubebuilder:webhook:path=/validate-containerservice-azure-com-v1api20231102preview-managedclustersagentpool,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=containerservice.azure.com,resources=managedclustersagentpools,verbs=create;update,versions=v1api20231102preview,name=validate.v1api20231102preview.managedclustersagentpools.containerservice.azure.com,admissionReviewVersions=v1

var _ admission.Validator = &ManagedClustersAgentPool{}

// ValidateCreate validates the creation of the resource
func (pool *ManagedClustersAgentPool) ValidateCreate() (admission.Warnings, error) {
	validations := pool.createValidations()
	var temp any = pool
	if runtimeValidator, ok := temp.(genruntime.Validator); ok {
		validations = append(validations, runtimeValidator.CreateValidations()...)
	}
	return genruntime.ValidateCreate(validations)
}

// ValidateDelete validates the deletion of the resource
func (pool *ManagedClustersAgentPool) ValidateDelete() (admission.Warnings, error) {
	validations := pool.deleteValidations()
	var temp any = pool
	if runtimeValidator, ok := temp.(genruntime.Validator); ok {
		validations = append(validations, runtimeValidator.DeleteValidations()...)
	}
	return genruntime.ValidateDelete(validations)
}

// ValidateUpdate validates an update of the resource
func (pool *ManagedClustersAgentPool) ValidateUpdate(old runtime.Object) (admission.Warnings, error) {
	validations := pool.updateValidations()
	var temp any = pool
	if runtimeValidator, ok := temp.(genruntime.Validator); ok {
		validations = append(validations, runtimeValidator.UpdateValidations()...)
	}
	return genruntime.ValidateUpdate(old, validations)
}

// createValidations validates the creation of the resource
func (pool *ManagedClustersAgentPool) createValidations() []func() (admission.Warnings, error) {
	return []func() (admission.Warnings, error){pool.validateResourceReferences, pool.validateOwnerReference}
}

// deleteValidations validates the deletion of the resource
func (pool *ManagedClustersAgentPool) deleteValidations() []func() (admission.Warnings, error) {
	return nil
}

// updateValidations validates the update of the resource
func (pool *ManagedClustersAgentPool) updateValidations() []func(old runtime.Object) (admission.Warnings, error) {
	return []func(old runtime.Object) (admission.Warnings, error){
		func(old runtime.Object) (admission.Warnings, error) {
			return pool.validateResourceReferences()
		},
		pool.validateWriteOnceProperties,
		func(old runtime.Object) (admission.Warnings, error) {
			return pool.validateOwnerReference()
		},
	}
}

// validateOwnerReference validates the owner field
func (pool *ManagedClustersAgentPool) validateOwnerReference() (admission.Warnings, error) {
	return genruntime.ValidateOwner(pool)
}

// validateResourceReferences validates all resource references
func (pool *ManagedClustersAgentPool) validateResourceReferences() (admission.Warnings, error) {
	refs, err := reflecthelpers.FindResourceReferences(&pool.Spec)
	if err != nil {
		return nil, err
	}
	return genruntime.ValidateResourceReferences(refs)
}

// validateWriteOnceProperties validates all WriteOnce properties
func (pool *ManagedClustersAgentPool) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) {
	oldObj, ok := old.(*ManagedClustersAgentPool)
	if !ok {
		return nil, nil
	}

	return genruntime.ValidateWriteOnceProperties(oldObj, pool)
}

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

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

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

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

	// No error
	return nil
}

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

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

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

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

	// 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
// Generator information:
// - Generated from: /containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/managedClusters.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}
type ManagedClustersAgentPoolList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ManagedClustersAgentPool `json:"items"`
}

type ManagedClusters_AgentPool_Spec struct {
	// ArtifactStreamingProfile: Configuration for using artifact streaming on AKS.
	ArtifactStreamingProfile *AgentPoolArtifactStreamingProfile `json:"artifactStreamingProfile,omitempty"`

	// AvailabilityZones: The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType
	// property is 'VirtualMachineScaleSets'.
	AvailabilityZones []string `json:"availabilityZones,omitempty"`

	// +kubebuilder:validation:MaxLength=12
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:Pattern="^[a-z][a-z0-9]{0,11}$"
	// AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it
	// doesn't have to be.
	AzureName string `json:"azureName,omitempty"`

	// CapacityReservationGroupReference: AKS will associate the specified agent pool with the Capacity Reservation Group.
	CapacityReservationGroupReference *genruntime.ResourceReference `armReference:"CapacityReservationGroupID" json:"capacityReservationGroupReference,omitempty"`

	// Count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive)
	// for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1.
	Count *int `json:"count,omitempty"`

	// CreationData: CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using
	// a snapshot.
	CreationData *CreationData `json:"creationData,omitempty"`

	// EnableAutoScaling: Whether to enable auto-scaler
	EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"`

	// EnableCustomCATrust: When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a
	// daemonset along with host services to sync custom certificate authorities from user-provided list of base64 encoded
	// certificates into node trust stores. Defaults to false.
	EnableCustomCATrust *bool `json:"enableCustomCATrust,omitempty"`

	// EnableEncryptionAtHost: This is only supported on certain VM sizes and in certain Azure regions. For more information,
	// see: https://docs.microsoft.com/azure/aks/enable-host-encryption
	EnableEncryptionAtHost *bool `json:"enableEncryptionAtHost,omitempty"`

	// EnableFIPS: See [Add a FIPS-enabled node
	// pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more
	// details.
	EnableFIPS *bool `json:"enableFIPS,omitempty"`

	// EnableNodePublicIP: Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses.
	// A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine
	// to minimize hops. For more information see [assigning a public IP per
	// node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). The
	// default is false.
	EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"`

	// EnableUltraSSD: Whether to enable UltraSSD
	EnableUltraSSD *bool `json:"enableUltraSSD,omitempty"`

	// GpuInstanceProfile: GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.
	GpuInstanceProfile *GPUInstanceProfile `json:"gpuInstanceProfile,omitempty"`

	// GpuProfile: The GPU settings of an agent pool.
	GpuProfile *AgentPoolGPUProfile `json:"gpuProfile,omitempty"`

	// HostGroupReference: This is of the form:
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}.
	// For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts).
	HostGroupReference *genruntime.ResourceReference `armReference:"HostGroupID" json:"hostGroupReference,omitempty"`

	// KubeletConfig: The Kubelet configuration on the agent pool nodes.
	KubeletConfig *KubeletConfig `json:"kubeletConfig,omitempty"`

	// KubeletDiskType: Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral
	// storage.
	KubeletDiskType *KubeletDiskType `json:"kubeletDiskType,omitempty"`

	// LinuxOSConfig: The OS configuration of Linux agent nodes.
	LinuxOSConfig *LinuxOSConfig `json:"linuxOSConfig,omitempty"`

	// MaxCount: The maximum number of nodes for auto-scaling
	MaxCount *int `json:"maxCount,omitempty"`

	// MaxPods: The maximum number of pods that can run on a node.
	MaxPods *int `json:"maxPods,omitempty"`

	// MessageOfTheDay: A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of
	// the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e.,
	// will be printed raw and not be executed as a script).
	MessageOfTheDay *string `json:"messageOfTheDay,omitempty"`

	// MinCount: The minimum number of nodes for auto-scaling
	MinCount *int `json:"minCount,omitempty"`

	// Mode: A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool
	// restrictions  and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools
	Mode *AgentPoolMode `json:"mode,omitempty"`

	// NetworkProfile: Network-related settings of an agent pool.
	NetworkProfile *AgentPoolNetworkProfile `json:"networkProfile,omitempty"`

	// NodeInitializationTaints: These taints will not be reconciled by AKS and can be removed with a kubectl call. This field
	// can be modified after node pool is created, but nodes will not be recreated with new taints until another operation that
	// requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run before the
	// node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with `kubectl taint
	// nodes node1 key1=value1:NoSchedule-`
	NodeInitializationTaints []string `json:"nodeInitializationTaints,omitempty"`

	// NodeLabels: The node labels to be persisted across all nodes in agent pool.
	NodeLabels map[string]string `json:"nodeLabels,omitempty" serializationType:"explicitEmptyCollection"`

	// NodePublicIPPrefixReference: This is of the form:
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}
	NodePublicIPPrefixReference *genruntime.ResourceReference `armReference:"NodePublicIPPrefixID" json:"nodePublicIPPrefixReference,omitempty"`

	// NodeTaints: The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
	NodeTaints []string `json:"nodeTaints,omitempty" serializationType:"explicitEmptyCollection"`

	// OrchestratorVersion: Both patch version <major.minor.patch> and <major.minor> are supported. When <major.minor> is
	// specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same
	// <major.minor> once it has been created will not trigger an upgrade, even if a newer patch version is available. As a
	// best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version
	// must have the same major version as the control plane. The node pool minor version must be within two minor versions of
	// the control plane version. The node pool version cannot be greater than the control plane version. For more information
	// see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool).
	OrchestratorVersion *string                 `json:"orchestratorVersion,omitempty"`
	OsDiskSizeGB        *ContainerServiceOSDisk `json:"osDiskSizeGB,omitempty"`

	// OsDiskType: The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested
	// OSDiskSizeGB. Otherwise,  defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral
	// OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os).
	OsDiskType *OSDiskType `json:"osDiskType,omitempty"`

	// OsSKU: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or
	// Windows2019 if  OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is
	// deprecated.
	OsSKU *OSSKU `json:"osSKU,omitempty"`

	// OsType: The operating system type. The default is Linux.
	OsType *OSType `json:"osType,omitempty"`

	// +kubebuilder:validation:Required
	// Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also
	// controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a
	// reference to a containerservice.azure.com/ManagedCluster resource
	Owner *genruntime.KnownResourceReference `group:"containerservice.azure.com" json:"owner,omitempty" kind:"ManagedCluster"`

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

	// PowerState: When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this
	// field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only
	// be stopped if it is Running and provisioning state is Succeeded
	PowerState *PowerState `json:"powerState,omitempty"`

	// ProximityPlacementGroupReference: The ID for Proximity Placement Group.
	ProximityPlacementGroupReference *genruntime.ResourceReference `armReference:"ProximityPlacementGroupID" json:"proximityPlacementGroupReference,omitempty"`

	// ScaleDownMode: This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.
	ScaleDownMode *ScaleDownMode `json:"scaleDownMode,omitempty"`

	// ScaleSetEvictionPolicy: This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is
	// 'Delete'.
	ScaleSetEvictionPolicy *ScaleSetEvictionPolicy `json:"scaleSetEvictionPolicy,omitempty"`

	// ScaleSetPriority: The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'.
	ScaleSetPriority *ScaleSetPriority `json:"scaleSetPriority,omitempty"`

	// SecurityProfile: The security settings of an agent pool.
	SecurityProfile *AgentPoolSecurityProfile `json:"securityProfile,omitempty"`

	// SpotMaxPrice: Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any
	// on-demand price. For more details on spot pricing, see [spot VMs
	// pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing)
	SpotMaxPrice *float64 `json:"spotMaxPrice,omitempty"`

	// Tags: The tags to be persisted on the agent pool virtual machine scale set.
	Tags map[string]string `json:"tags,omitempty" serializationType:"explicitEmptyCollection"`

	// Type: The type of Agent Pool.
	Type *AgentPoolType `json:"type,omitempty"`

	// UpgradeSettings: Settings for upgrading the agentpool
	UpgradeSettings           *AgentPoolUpgradeSettings `json:"upgradeSettings,omitempty"`
	VirtualMachineNodesStatus []VirtualMachineNodes     `json:"virtualMachineNodesStatus,omitempty"`

	// VirtualMachinesProfile: Specifications on VirtualMachines agent pool.
	VirtualMachinesProfile *VirtualMachinesProfile `json:"virtualMachinesProfile,omitempty"`

	// VmSize: VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods
	// might fail to run correctly. For more details on restricted VM sizes, see:
	// https://docs.microsoft.com/azure/aks/quotas-skus-regions
	VmSize *string `json:"vmSize,omitempty"`

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

	// WindowsProfile: The Windows agent pool's specific profile.
	WindowsProfile *AgentPoolWindowsProfile `json:"windowsProfile,omitempty"`

	// WorkloadRuntime: Determines the type of workload a node can run.
	WorkloadRuntime *WorkloadRuntime `json:"workloadRuntime,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusters_AgentPool_Spec{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (pool *ManagedClusters_AgentPool_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if pool == nil {
		return nil, nil
	}
	result := &ManagedClusters_AgentPool_Spec_ARM{}

	// Set property "Name":
	result.Name = resolved.Name

	// Set property "Properties":
	if pool.ArtifactStreamingProfile != nil ||
		pool.AvailabilityZones != nil ||
		pool.CapacityReservationGroupReference != nil ||
		pool.Count != nil ||
		pool.CreationData != nil ||
		pool.EnableAutoScaling != nil ||
		pool.EnableCustomCATrust != nil ||
		pool.EnableEncryptionAtHost != nil ||
		pool.EnableFIPS != nil ||
		pool.EnableNodePublicIP != nil ||
		pool.EnableUltraSSD != nil ||
		pool.GpuInstanceProfile != nil ||
		pool.GpuProfile != nil ||
		pool.HostGroupReference != nil ||
		pool.KubeletConfig != nil ||
		pool.KubeletDiskType != nil ||
		pool.LinuxOSConfig != nil ||
		pool.MaxCount != nil ||
		pool.MaxPods != nil ||
		pool.MessageOfTheDay != nil ||
		pool.MinCount != nil ||
		pool.Mode != nil ||
		pool.NetworkProfile != nil ||
		pool.NodeInitializationTaints != nil ||
		pool.NodeLabels != nil ||
		pool.NodePublicIPPrefixReference != nil ||
		pool.NodeTaints != nil ||
		pool.OrchestratorVersion != nil ||
		pool.OsDiskSizeGB != nil ||
		pool.OsDiskType != nil ||
		pool.OsSKU != nil ||
		pool.OsType != nil ||
		pool.PodSubnetReference != nil ||
		pool.PowerState != nil ||
		pool.ProximityPlacementGroupReference != nil ||
		pool.ScaleDownMode != nil ||
		pool.ScaleSetEvictionPolicy != nil ||
		pool.ScaleSetPriority != nil ||
		pool.SecurityProfile != nil ||
		pool.SpotMaxPrice != nil ||
		pool.Tags != nil ||
		pool.Type != nil ||
		pool.UpgradeSettings != nil ||
		pool.VirtualMachineNodesStatus != nil ||
		pool.VirtualMachinesProfile != nil ||
		pool.VmSize != nil ||
		pool.VnetSubnetReference != nil ||
		pool.WindowsProfile != nil ||
		pool.WorkloadRuntime != nil {
		result.Properties = &ManagedClusterAgentPoolProfileProperties_ARM{}
	}
	if pool.ArtifactStreamingProfile != nil {
		artifactStreamingProfile_ARM, err := (*pool.ArtifactStreamingProfile).ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		artifactStreamingProfile := *artifactStreamingProfile_ARM.(*AgentPoolArtifactStreamingProfile_ARM)
		result.Properties.ArtifactStreamingProfile = &artifactStreamingProfile
	}
	for _, item := range pool.AvailabilityZones {
		result.Properties.AvailabilityZones = append(result.Properties.AvailabilityZones, item)
	}
	if pool.CapacityReservationGroupReference != nil {
		capacityReservationGroupIDARMID, err := resolved.ResolvedReferences.Lookup(*pool.CapacityReservationGroupReference)
		if err != nil {
			return nil, err
		}
		capacityReservationGroupID := capacityReservationGroupIDARMID
		result.Properties.CapacityReservationGroupID = &capacityReservationGroupID
	}
	if pool.Count != nil {
		count := *pool.Count
		result.Properties.Count = &count
	}
	if pool.CreationData != nil {
		creationData_ARM, err := (*pool.CreationData).ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		creationData := *creationData_ARM.(*CreationData_ARM)
		result.Properties.CreationData = &creationData
	}
	if pool.EnableAutoScaling != nil {
		enableAutoScaling := *pool.EnableAutoScaling
		result.Properties.EnableAutoScaling = &enableAutoScaling
	}
	if pool.EnableCustomCATrust != nil {
		enableCustomCATrust := *pool.EnableCustomCATrust
		result.Properties.EnableCustomCATrust = &enableCustomCATrust
	}
	if pool.EnableEncryptionAtHost != nil {
		enableEncryptionAtHost := *pool.EnableEncryptionAtHost
		result.Properties.EnableEncryptionAtHost = &enableEncryptionAtHost
	}
	if pool.EnableFIPS != nil {
		enableFIPS := *pool.EnableFIPS
		result.Properties.EnableFIPS = &enableFIPS
	}
	if pool.EnableNodePublicIP != nil {
		enableNodePublicIP := *pool.EnableNodePublicIP
		result.Properties.EnableNodePublicIP = &enableNodePublicIP
	}
	if pool.EnableUltraSSD != nil {
		enableUltraSSD := *pool.EnableUltraSSD
		result.Properties.EnableUltraSSD = &enableUltraSSD
	}
	if pool.GpuInstanceProfile != nil {
		gpuInstanceProfile := *pool.GpuInstanceProfile
		result.Properties.GpuInstanceProfile = &gpuInstanceProfile
	}
	if pool.GpuProfile != nil {
		gpuProfile_ARM, err := (*pool.GpuProfile).ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		gpuProfile := *gpuProfile_ARM.(*AgentPoolGPUProfile_ARM)
		result.Properties.GpuProfile = &gpuProfile
	}
	if pool.HostGroupReference != nil {
		hostGroupIDARMID, err := resolved.ResolvedReferences.Lookup(*pool.HostGroupReference)
		if err != nil {
			return nil, err
		}
		hostGroupID := hostGroupIDARMID
		result.Properties.HostGroupID = &hostGroupID
	}
	if pool.KubeletConfig != nil {
		kubeletConfig_ARM, err := (*pool.KubeletConfig).ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		kubeletConfig := *kubeletConfig_ARM.(*KubeletConfig_ARM)
		result.Properties.KubeletConfig = &kubeletConfig
	}
	if pool.KubeletDiskType != nil {
		kubeletDiskType := *pool.KubeletDiskType
		result.Properties.KubeletDiskType = &kubeletDiskType
	}
	if pool.LinuxOSConfig != nil {
		linuxOSConfig_ARM, err := (*pool.LinuxOSConfig).ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		linuxOSConfig := *linuxOSConfig_ARM.(*LinuxOSConfig_ARM)
		result.Properties.LinuxOSConfig = &linuxOSConfig
	}
	if pool.MaxCount != nil {
		maxCount := *pool.MaxCount
		result.Properties.MaxCount = &maxCount
	}
	if pool.MaxPods != nil {
		maxPods := *pool.MaxPods
		result.Properties.MaxPods = &maxPods
	}
	if pool.MessageOfTheDay != nil {
		messageOfTheDay := *pool.MessageOfTheDay
		result.Properties.MessageOfTheDay = &messageOfTheDay
	}
	if pool.MinCount != nil {
		minCount := *pool.MinCount
		result.Properties.MinCount = &minCount
	}
	if pool.Mode != nil {
		mode := *pool.Mode
		result.Properties.Mode = &mode
	}
	if pool.NetworkProfile != nil {
		networkProfile_ARM, err := (*pool.NetworkProfile).ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		networkProfile := *networkProfile_ARM.(*AgentPoolNetworkProfile_ARM)
		result.Properties.NetworkProfile = &networkProfile
	}
	for _, item := range pool.NodeInitializationTaints {
		result.Properties.NodeInitializationTaints = append(result.Properties.NodeInitializationTaints, item)
	}
	if pool.NodeLabels != nil {
		result.Properties.NodeLabels = make(map[string]string, len(pool.NodeLabels))
		for key, value := range pool.NodeLabels {
			result.Properties.NodeLabels[key] = value
		}
	} else {
		// Set property to empty map, as this resource is set to serialize all collections explicitly
		result.Properties.NodeLabels = make(map[string]string)
	}
	if pool.NodePublicIPPrefixReference != nil {
		nodePublicIPPrefixIDARMID, err := resolved.ResolvedReferences.Lookup(*pool.NodePublicIPPrefixReference)
		if err != nil {
			return nil, err
		}
		nodePublicIPPrefixID := nodePublicIPPrefixIDARMID
		result.Properties.NodePublicIPPrefixID = &nodePublicIPPrefixID
	}
	for _, item := range pool.NodeTaints {
		result.Properties.NodeTaints = append(result.Properties.NodeTaints, item)
	}
	if result.Properties.NodeTaints == nil {
		// Set property to empty map, as this resource is set to serialize all collections explicitly
		result.Properties.NodeTaints = []string{}
	}
	if pool.OrchestratorVersion != nil {
		orchestratorVersion := *pool.OrchestratorVersion
		result.Properties.OrchestratorVersion = &orchestratorVersion
	}
	if pool.OsDiskSizeGB != nil {
		osDiskSizeGB := *pool.OsDiskSizeGB
		result.Properties.OsDiskSizeGB = &osDiskSizeGB
	}
	if pool.OsDiskType != nil {
		osDiskType := *pool.OsDiskType
		result.Properties.OsDiskType = &osDiskType
	}
	if pool.OsSKU != nil {
		osSKU := *pool.OsSKU
		result.Properties.OsSKU = &osSKU
	}
	if pool.OsType != nil {
		osType := *pool.OsType
		result.Properties.OsType = &osType
	}
	if pool.PodSubnetReference != nil {
		podSubnetIDARMID, err := resolved.ResolvedReferences.Lookup(*pool.PodSubnetReference)
		if err != nil {
			return nil, err
		}
		podSubnetID := podSubnetIDARMID
		result.Properties.PodSubnetID = &podSubnetID
	}
	if pool.PowerState != nil {
		powerState_ARM, err := (*pool.PowerState).ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		powerState := *powerState_ARM.(*PowerState_ARM)
		result.Properties.PowerState = &powerState
	}
	if pool.ProximityPlacementGroupReference != nil {
		proximityPlacementGroupIDARMID, err := resolved.ResolvedReferences.Lookup(*pool.ProximityPlacementGroupReference)
		if err != nil {
			return nil, err
		}
		proximityPlacementGroupID := proximityPlacementGroupIDARMID
		result.Properties.ProximityPlacementGroupID = &proximityPlacementGroupID
	}
	if pool.ScaleDownMode != nil {
		scaleDownMode := *pool.ScaleDownMode
		result.Properties.ScaleDownMode = &scaleDownMode
	}
	if pool.ScaleSetEvictionPolicy != nil {
		scaleSetEvictionPolicy := *pool.ScaleSetEvictionPolicy
		result.Properties.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy
	}
	if pool.ScaleSetPriority != nil {
		scaleSetPriority := *pool.ScaleSetPriority
		result.Properties.ScaleSetPriority = &scaleSetPriority
	}
	if pool.SecurityProfile != nil {
		securityProfile_ARM, err := (*pool.SecurityProfile).ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		securityProfile := *securityProfile_ARM.(*AgentPoolSecurityProfile_ARM)
		result.Properties.SecurityProfile = &securityProfile
	}
	if pool.SpotMaxPrice != nil {
		spotMaxPrice := *pool.SpotMaxPrice
		result.Properties.SpotMaxPrice = &spotMaxPrice
	}
	if pool.Tags != nil {
		result.Properties.Tags = make(map[string]string, len(pool.Tags))
		for key, value := range pool.Tags {
			result.Properties.Tags[key] = value
		}
	} else {
		// Set property to empty map, as this resource is set to serialize all collections explicitly
		result.Properties.Tags = make(map[string]string)
	}
	if pool.Type != nil {
		typeVar := *pool.Type
		result.Properties.Type = &typeVar
	}
	if pool.UpgradeSettings != nil {
		upgradeSettings_ARM, err := (*pool.UpgradeSettings).ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		upgradeSettings := *upgradeSettings_ARM.(*AgentPoolUpgradeSettings_ARM)
		result.Properties.UpgradeSettings = &upgradeSettings
	}
	for _, item := range pool.VirtualMachineNodesStatus {
		item_ARM, err := item.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		result.Properties.VirtualMachineNodesStatus = append(result.Properties.VirtualMachineNodesStatus, *item_ARM.(*VirtualMachineNodes_ARM))
	}
	if pool.VirtualMachinesProfile != nil {
		virtualMachinesProfile_ARM, err := (*pool.VirtualMachinesProfile).ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		virtualMachinesProfile := *virtualMachinesProfile_ARM.(*VirtualMachinesProfile_ARM)
		result.Properties.VirtualMachinesProfile = &virtualMachinesProfile
	}
	if pool.VmSize != nil {
		vmSize := *pool.VmSize
		result.Properties.VmSize = &vmSize
	}
	if pool.VnetSubnetReference != nil {
		vnetSubnetIDARMID, err := resolved.ResolvedReferences.Lookup(*pool.VnetSubnetReference)
		if err != nil {
			return nil, err
		}
		vnetSubnetID := vnetSubnetIDARMID
		result.Properties.VnetSubnetID = &vnetSubnetID
	}
	if pool.WindowsProfile != nil {
		windowsProfile_ARM, err := (*pool.WindowsProfile).ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		windowsProfile := *windowsProfile_ARM.(*AgentPoolWindowsProfile_ARM)
		result.Properties.WindowsProfile = &windowsProfile
	}
	if pool.WorkloadRuntime != nil {
		workloadRuntime := *pool.WorkloadRuntime
		result.Properties.WorkloadRuntime = &workloadRuntime
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (pool *ManagedClusters_AgentPool_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &ManagedClusters_AgentPool_Spec_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (pool *ManagedClusters_AgentPool_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(ManagedClusters_AgentPool_Spec_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagedClusters_AgentPool_Spec_ARM, got %T", armInput)
	}

	// Set property "ArtifactStreamingProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ArtifactStreamingProfile != nil {
			var artifactStreamingProfile1 AgentPoolArtifactStreamingProfile
			err := artifactStreamingProfile1.PopulateFromARM(owner, *typedInput.Properties.ArtifactStreamingProfile)
			if err != nil {
				return err
			}
			artifactStreamingProfile := artifactStreamingProfile1
			pool.ArtifactStreamingProfile = &artifactStreamingProfile
		}
	}

	// Set property "AvailabilityZones":
	// copying flattened property:
	if typedInput.Properties != nil {
		for _, item := range typedInput.Properties.AvailabilityZones {
			pool.AvailabilityZones = append(pool.AvailabilityZones, item)
		}
	}

	// Set property "AzureName":
	pool.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name))

	// no assignment for property "CapacityReservationGroupReference"

	// Set property "Count":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Count != nil {
			count := *typedInput.Properties.Count
			pool.Count = &count
		}
	}

	// Set property "CreationData":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.CreationData != nil {
			var creationData1 CreationData
			err := creationData1.PopulateFromARM(owner, *typedInput.Properties.CreationData)
			if err != nil {
				return err
			}
			creationData := creationData1
			pool.CreationData = &creationData
		}
	}

	// Set property "EnableAutoScaling":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EnableAutoScaling != nil {
			enableAutoScaling := *typedInput.Properties.EnableAutoScaling
			pool.EnableAutoScaling = &enableAutoScaling
		}
	}

	// Set property "EnableCustomCATrust":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EnableCustomCATrust != nil {
			enableCustomCATrust := *typedInput.Properties.EnableCustomCATrust
			pool.EnableCustomCATrust = &enableCustomCATrust
		}
	}

	// Set property "EnableEncryptionAtHost":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EnableEncryptionAtHost != nil {
			enableEncryptionAtHost := *typedInput.Properties.EnableEncryptionAtHost
			pool.EnableEncryptionAtHost = &enableEncryptionAtHost
		}
	}

	// Set property "EnableFIPS":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EnableFIPS != nil {
			enableFIPS := *typedInput.Properties.EnableFIPS
			pool.EnableFIPS = &enableFIPS
		}
	}

	// Set property "EnableNodePublicIP":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EnableNodePublicIP != nil {
			enableNodePublicIP := *typedInput.Properties.EnableNodePublicIP
			pool.EnableNodePublicIP = &enableNodePublicIP
		}
	}

	// Set property "EnableUltraSSD":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EnableUltraSSD != nil {
			enableUltraSSD := *typedInput.Properties.EnableUltraSSD
			pool.EnableUltraSSD = &enableUltraSSD
		}
	}

	// Set property "GpuInstanceProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.GpuInstanceProfile != nil {
			gpuInstanceProfile := *typedInput.Properties.GpuInstanceProfile
			pool.GpuInstanceProfile = &gpuInstanceProfile
		}
	}

	// Set property "GpuProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.GpuProfile != nil {
			var gpuProfile1 AgentPoolGPUProfile
			err := gpuProfile1.PopulateFromARM(owner, *typedInput.Properties.GpuProfile)
			if err != nil {
				return err
			}
			gpuProfile := gpuProfile1
			pool.GpuProfile = &gpuProfile
		}
	}

	// no assignment for property "HostGroupReference"

	// Set property "KubeletConfig":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.KubeletConfig != nil {
			var kubeletConfig1 KubeletConfig
			err := kubeletConfig1.PopulateFromARM(owner, *typedInput.Properties.KubeletConfig)
			if err != nil {
				return err
			}
			kubeletConfig := kubeletConfig1
			pool.KubeletConfig = &kubeletConfig
		}
	}

	// Set property "KubeletDiskType":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.KubeletDiskType != nil {
			kubeletDiskType := *typedInput.Properties.KubeletDiskType
			pool.KubeletDiskType = &kubeletDiskType
		}
	}

	// Set property "LinuxOSConfig":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.LinuxOSConfig != nil {
			var linuxOSConfig1 LinuxOSConfig
			err := linuxOSConfig1.PopulateFromARM(owner, *typedInput.Properties.LinuxOSConfig)
			if err != nil {
				return err
			}
			linuxOSConfig := linuxOSConfig1
			pool.LinuxOSConfig = &linuxOSConfig
		}
	}

	// Set property "MaxCount":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.MaxCount != nil {
			maxCount := *typedInput.Properties.MaxCount
			pool.MaxCount = &maxCount
		}
	}

	// Set property "MaxPods":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.MaxPods != nil {
			maxPods := *typedInput.Properties.MaxPods
			pool.MaxPods = &maxPods
		}
	}

	// Set property "MessageOfTheDay":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.MessageOfTheDay != nil {
			messageOfTheDay := *typedInput.Properties.MessageOfTheDay
			pool.MessageOfTheDay = &messageOfTheDay
		}
	}

	// Set property "MinCount":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.MinCount != nil {
			minCount := *typedInput.Properties.MinCount
			pool.MinCount = &minCount
		}
	}

	// Set property "Mode":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Mode != nil {
			mode := *typedInput.Properties.Mode
			pool.Mode = &mode
		}
	}

	// Set property "NetworkProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.NetworkProfile != nil {
			var networkProfile1 AgentPoolNetworkProfile
			err := networkProfile1.PopulateFromARM(owner, *typedInput.Properties.NetworkProfile)
			if err != nil {
				return err
			}
			networkProfile := networkProfile1
			pool.NetworkProfile = &networkProfile
		}
	}

	// Set property "NodeInitializationTaints":
	// copying flattened property:
	if typedInput.Properties != nil {
		for _, item := range typedInput.Properties.NodeInitializationTaints {
			pool.NodeInitializationTaints = append(pool.NodeInitializationTaints, item)
		}
	}

	// Set property "NodeLabels":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.NodeLabels != nil {
			pool.NodeLabels = make(map[string]string, len(typedInput.Properties.NodeLabels))
			for key, value := range typedInput.Properties.NodeLabels {
				pool.NodeLabels[key] = value
			}
		}
	}

	// no assignment for property "NodePublicIPPrefixReference"

	// Set property "NodeTaints":
	// copying flattened property:
	if typedInput.Properties != nil {
		for _, item := range typedInput.Properties.NodeTaints {
			pool.NodeTaints = append(pool.NodeTaints, item)
		}
	}

	// Set property "OrchestratorVersion":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.OrchestratorVersion != nil {
			orchestratorVersion := *typedInput.Properties.OrchestratorVersion
			pool.OrchestratorVersion = &orchestratorVersion
		}
	}

	// Set property "OsDiskSizeGB":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.OsDiskSizeGB != nil {
			osDiskSizeGB := *typedInput.Properties.OsDiskSizeGB
			pool.OsDiskSizeGB = &osDiskSizeGB
		}
	}

	// Set property "OsDiskType":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.OsDiskType != nil {
			osDiskType := *typedInput.Properties.OsDiskType
			pool.OsDiskType = &osDiskType
		}
	}

	// Set property "OsSKU":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.OsSKU != nil {
			osSKU := *typedInput.Properties.OsSKU
			pool.OsSKU = &osSKU
		}
	}

	// Set property "OsType":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.OsType != nil {
			osType := *typedInput.Properties.OsType
			pool.OsType = &osType
		}
	}

	// Set property "Owner":
	pool.Owner = &genruntime.KnownResourceReference{
		Name:  owner.Name,
		ARMID: owner.ARMID,
	}

	// no assignment for property "PodSubnetReference"

	// Set property "PowerState":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PowerState != nil {
			var powerState1 PowerState
			err := powerState1.PopulateFromARM(owner, *typedInput.Properties.PowerState)
			if err != nil {
				return err
			}
			powerState := powerState1
			pool.PowerState = &powerState
		}
	}

	// no assignment for property "ProximityPlacementGroupReference"

	// Set property "ScaleDownMode":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ScaleDownMode != nil {
			scaleDownMode := *typedInput.Properties.ScaleDownMode
			pool.ScaleDownMode = &scaleDownMode
		}
	}

	// Set property "ScaleSetEvictionPolicy":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ScaleSetEvictionPolicy != nil {
			scaleSetEvictionPolicy := *typedInput.Properties.ScaleSetEvictionPolicy
			pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy
		}
	}

	// Set property "ScaleSetPriority":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ScaleSetPriority != nil {
			scaleSetPriority := *typedInput.Properties.ScaleSetPriority
			pool.ScaleSetPriority = &scaleSetPriority
		}
	}

	// Set property "SecurityProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.SecurityProfile != nil {
			var securityProfile1 AgentPoolSecurityProfile
			err := securityProfile1.PopulateFromARM(owner, *typedInput.Properties.SecurityProfile)
			if err != nil {
				return err
			}
			securityProfile := securityProfile1
			pool.SecurityProfile = &securityProfile
		}
	}

	// Set property "SpotMaxPrice":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.SpotMaxPrice != nil {
			spotMaxPrice := *typedInput.Properties.SpotMaxPrice
			pool.SpotMaxPrice = &spotMaxPrice
		}
	}

	// Set property "Tags":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Tags != nil {
			pool.Tags = make(map[string]string, len(typedInput.Properties.Tags))
			for key, value := range typedInput.Properties.Tags {
				pool.Tags[key] = value
			}
		}
	}

	// Set property "Type":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Type != nil {
			typeVar := *typedInput.Properties.Type
			pool.Type = &typeVar
		}
	}

	// Set property "UpgradeSettings":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.UpgradeSettings != nil {
			var upgradeSettings1 AgentPoolUpgradeSettings
			err := upgradeSettings1.PopulateFromARM(owner, *typedInput.Properties.UpgradeSettings)
			if err != nil {
				return err
			}
			upgradeSettings := upgradeSettings1
			pool.UpgradeSettings = &upgradeSettings
		}
	}

	// Set property "VirtualMachineNodesStatus":
	// copying flattened property:
	if typedInput.Properties != nil {
		for _, item := range typedInput.Properties.VirtualMachineNodesStatus {
			var item1 VirtualMachineNodes
			err := item1.PopulateFromARM(owner, item)
			if err != nil {
				return err
			}
			pool.VirtualMachineNodesStatus = append(pool.VirtualMachineNodesStatus, item1)
		}
	}

	// Set property "VirtualMachinesProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.VirtualMachinesProfile != nil {
			var virtualMachinesProfile1 VirtualMachinesProfile
			err := virtualMachinesProfile1.PopulateFromARM(owner, *typedInput.Properties.VirtualMachinesProfile)
			if err != nil {
				return err
			}
			virtualMachinesProfile := virtualMachinesProfile1
			pool.VirtualMachinesProfile = &virtualMachinesProfile
		}
	}

	// Set property "VmSize":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.VmSize != nil {
			vmSize := *typedInput.Properties.VmSize
			pool.VmSize = &vmSize
		}
	}

	// no assignment for property "VnetSubnetReference"

	// Set property "WindowsProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.WindowsProfile != nil {
			var windowsProfile1 AgentPoolWindowsProfile
			err := windowsProfile1.PopulateFromARM(owner, *typedInput.Properties.WindowsProfile)
			if err != nil {
				return err
			}
			windowsProfile := windowsProfile1
			pool.WindowsProfile = &windowsProfile
		}
	}

	// Set property "WorkloadRuntime":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.WorkloadRuntime != nil {
			workloadRuntime := *typedInput.Properties.WorkloadRuntime
			pool.WorkloadRuntime = &workloadRuntime
		}
	}

	// No error
	return nil
}

var _ genruntime.ConvertibleSpec = &ManagedClusters_AgentPool_Spec{}

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

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

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

	return nil
}

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

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

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

	return nil
}

// AssignProperties_From_ManagedClusters_AgentPool_Spec populates our ManagedClusters_AgentPool_Spec from the provided source ManagedClusters_AgentPool_Spec
func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedClusters_AgentPool_Spec(source *v20231102ps.ManagedClusters_AgentPool_Spec) error {

	// ArtifactStreamingProfile
	if source.ArtifactStreamingProfile != nil {
		var artifactStreamingProfile AgentPoolArtifactStreamingProfile
		err := artifactStreamingProfile.AssignProperties_From_AgentPoolArtifactStreamingProfile(source.ArtifactStreamingProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_AgentPoolArtifactStreamingProfile() to populate field ArtifactStreamingProfile")
		}
		pool.ArtifactStreamingProfile = &artifactStreamingProfile
	} else {
		pool.ArtifactStreamingProfile = nil
	}

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

	// AzureName
	pool.AzureName = source.AzureName

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

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

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

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

	// EnableCustomCATrust
	if source.EnableCustomCATrust != nil {
		enableCustomCATrust := *source.EnableCustomCATrust
		pool.EnableCustomCATrust = &enableCustomCATrust
	} else {
		pool.EnableCustomCATrust = nil
	}

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

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

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

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

	// GpuInstanceProfile
	if source.GpuInstanceProfile != nil {
		gpuInstanceProfile := GPUInstanceProfile(*source.GpuInstanceProfile)
		pool.GpuInstanceProfile = &gpuInstanceProfile
	} else {
		pool.GpuInstanceProfile = nil
	}

	// GpuProfile
	if source.GpuProfile != nil {
		var gpuProfile AgentPoolGPUProfile
		err := gpuProfile.AssignProperties_From_AgentPoolGPUProfile(source.GpuProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_AgentPoolGPUProfile() to populate field GpuProfile")
		}
		pool.GpuProfile = &gpuProfile
	} else {
		pool.GpuProfile = nil
	}

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

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

	// KubeletDiskType
	if source.KubeletDiskType != nil {
		kubeletDiskType := KubeletDiskType(*source.KubeletDiskType)
		pool.KubeletDiskType = &kubeletDiskType
	} else {
		pool.KubeletDiskType = nil
	}

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

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

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

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

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

	// Mode
	if source.Mode != nil {
		mode := AgentPoolMode(*source.Mode)
		pool.Mode = &mode
	} else {
		pool.Mode = nil
	}

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

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

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

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

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

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

	// OsDiskSizeGB
	if source.OsDiskSizeGB != nil {
		osDiskSizeGB := ContainerServiceOSDisk(*source.OsDiskSizeGB)
		pool.OsDiskSizeGB = &osDiskSizeGB
	} else {
		pool.OsDiskSizeGB = nil
	}

	// OsDiskType
	if source.OsDiskType != nil {
		osDiskType := OSDiskType(*source.OsDiskType)
		pool.OsDiskType = &osDiskType
	} else {
		pool.OsDiskType = nil
	}

	// OsSKU
	if source.OsSKU != nil {
		osSKU := OSSKU(*source.OsSKU)
		pool.OsSKU = &osSKU
	} else {
		pool.OsSKU = nil
	}

	// OsType
	if source.OsType != nil {
		osType := OSType(*source.OsType)
		pool.OsType = &osType
	} else {
		pool.OsType = nil
	}

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

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

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

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

	// ScaleDownMode
	if source.ScaleDownMode != nil {
		scaleDownMode := ScaleDownMode(*source.ScaleDownMode)
		pool.ScaleDownMode = &scaleDownMode
	} else {
		pool.ScaleDownMode = nil
	}

	// ScaleSetEvictionPolicy
	if source.ScaleSetEvictionPolicy != nil {
		scaleSetEvictionPolicy := ScaleSetEvictionPolicy(*source.ScaleSetEvictionPolicy)
		pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy
	} else {
		pool.ScaleSetEvictionPolicy = nil
	}

	// ScaleSetPriority
	if source.ScaleSetPriority != nil {
		scaleSetPriority := ScaleSetPriority(*source.ScaleSetPriority)
		pool.ScaleSetPriority = &scaleSetPriority
	} else {
		pool.ScaleSetPriority = nil
	}

	// SecurityProfile
	if source.SecurityProfile != nil {
		var securityProfile AgentPoolSecurityProfile
		err := securityProfile.AssignProperties_From_AgentPoolSecurityProfile(source.SecurityProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_AgentPoolSecurityProfile() to populate field SecurityProfile")
		}
		pool.SecurityProfile = &securityProfile
	} else {
		pool.SecurityProfile = nil
	}

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

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

	// Type
	if source.Type != nil {
		typeVar := AgentPoolType(*source.Type)
		pool.Type = &typeVar
	} else {
		pool.Type = nil
	}

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

	// VirtualMachineNodesStatus
	if source.VirtualMachineNodesStatus != nil {
		virtualMachineNodesStatusList := make([]VirtualMachineNodes, len(source.VirtualMachineNodesStatus))
		for virtualMachineNodesStatusIndex, virtualMachineNodesStatusItem := range source.VirtualMachineNodesStatus {
			// Shadow the loop variable to avoid aliasing
			virtualMachineNodesStatusItem := virtualMachineNodesStatusItem
			var virtualMachineNodesStatus VirtualMachineNodes
			err := virtualMachineNodesStatus.AssignProperties_From_VirtualMachineNodes(&virtualMachineNodesStatusItem)
			if err != nil {
				return errors.Wrap(err, "calling AssignProperties_From_VirtualMachineNodes() to populate field VirtualMachineNodesStatus")
			}
			virtualMachineNodesStatusList[virtualMachineNodesStatusIndex] = virtualMachineNodesStatus
		}
		pool.VirtualMachineNodesStatus = virtualMachineNodesStatusList
	} else {
		pool.VirtualMachineNodesStatus = nil
	}

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

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

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

	// WindowsProfile
	if source.WindowsProfile != nil {
		var windowsProfile AgentPoolWindowsProfile
		err := windowsProfile.AssignProperties_From_AgentPoolWindowsProfile(source.WindowsProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_AgentPoolWindowsProfile() to populate field WindowsProfile")
		}
		pool.WindowsProfile = &windowsProfile
	} else {
		pool.WindowsProfile = nil
	}

	// WorkloadRuntime
	if source.WorkloadRuntime != nil {
		workloadRuntime := WorkloadRuntime(*source.WorkloadRuntime)
		pool.WorkloadRuntime = &workloadRuntime
	} else {
		pool.WorkloadRuntime = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusters_AgentPool_Spec populates the provided destination ManagedClusters_AgentPool_Spec from our ManagedClusters_AgentPool_Spec
func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_To_ManagedClusters_AgentPool_Spec(destination *v20231102ps.ManagedClusters_AgentPool_Spec) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// ArtifactStreamingProfile
	if pool.ArtifactStreamingProfile != nil {
		var artifactStreamingProfile v20231102ps.AgentPoolArtifactStreamingProfile
		err := pool.ArtifactStreamingProfile.AssignProperties_To_AgentPoolArtifactStreamingProfile(&artifactStreamingProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_AgentPoolArtifactStreamingProfile() to populate field ArtifactStreamingProfile")
		}
		destination.ArtifactStreamingProfile = &artifactStreamingProfile
	} else {
		destination.ArtifactStreamingProfile = nil
	}

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

	// AzureName
	destination.AzureName = pool.AzureName

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

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

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

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

	// EnableCustomCATrust
	if pool.EnableCustomCATrust != nil {
		enableCustomCATrust := *pool.EnableCustomCATrust
		destination.EnableCustomCATrust = &enableCustomCATrust
	} else {
		destination.EnableCustomCATrust = 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
	if pool.GpuInstanceProfile != nil {
		gpuInstanceProfile := string(*pool.GpuInstanceProfile)
		destination.GpuInstanceProfile = &gpuInstanceProfile
	} else {
		destination.GpuInstanceProfile = nil
	}

	// GpuProfile
	if pool.GpuProfile != nil {
		var gpuProfile v20231102ps.AgentPoolGPUProfile
		err := pool.GpuProfile.AssignProperties_To_AgentPoolGPUProfile(&gpuProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_AgentPoolGPUProfile() to populate field GpuProfile")
		}
		destination.GpuProfile = &gpuProfile
	} else {
		destination.GpuProfile = nil
	}

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

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

	// KubeletDiskType
	if pool.KubeletDiskType != nil {
		kubeletDiskType := string(*pool.KubeletDiskType)
		destination.KubeletDiskType = &kubeletDiskType
	} else {
		destination.KubeletDiskType = nil
	}

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

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

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

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

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

	// Mode
	if pool.Mode != nil {
		mode := string(*pool.Mode)
		destination.Mode = &mode
	} else {
		destination.Mode = nil
	}

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

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

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

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

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

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

	// OriginalVersion
	destination.OriginalVersion = pool.OriginalVersion()

	// OsDiskSizeGB
	if pool.OsDiskSizeGB != nil {
		osDiskSizeGB := int(*pool.OsDiskSizeGB)
		destination.OsDiskSizeGB = &osDiskSizeGB
	} else {
		destination.OsDiskSizeGB = nil
	}

	// OsDiskType
	if pool.OsDiskType != nil {
		osDiskType := string(*pool.OsDiskType)
		destination.OsDiskType = &osDiskType
	} else {
		destination.OsDiskType = nil
	}

	// OsSKU
	if pool.OsSKU != nil {
		osSKU := string(*pool.OsSKU)
		destination.OsSKU = &osSKU
	} else {
		destination.OsSKU = nil
	}

	// OsType
	if pool.OsType != nil {
		osType := string(*pool.OsType)
		destination.OsType = &osType
	} else {
		destination.OsType = nil
	}

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

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

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

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

	// ScaleDownMode
	if pool.ScaleDownMode != nil {
		scaleDownMode := string(*pool.ScaleDownMode)
		destination.ScaleDownMode = &scaleDownMode
	} else {
		destination.ScaleDownMode = nil
	}

	// ScaleSetEvictionPolicy
	if pool.ScaleSetEvictionPolicy != nil {
		scaleSetEvictionPolicy := string(*pool.ScaleSetEvictionPolicy)
		destination.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy
	} else {
		destination.ScaleSetEvictionPolicy = nil
	}

	// ScaleSetPriority
	if pool.ScaleSetPriority != nil {
		scaleSetPriority := string(*pool.ScaleSetPriority)
		destination.ScaleSetPriority = &scaleSetPriority
	} else {
		destination.ScaleSetPriority = nil
	}

	// SecurityProfile
	if pool.SecurityProfile != nil {
		var securityProfile v20231102ps.AgentPoolSecurityProfile
		err := pool.SecurityProfile.AssignProperties_To_AgentPoolSecurityProfile(&securityProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_AgentPoolSecurityProfile() to populate field SecurityProfile")
		}
		destination.SecurityProfile = &securityProfile
	} else {
		destination.SecurityProfile = nil
	}

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

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

	// Type
	if pool.Type != nil {
		typeVar := string(*pool.Type)
		destination.Type = &typeVar
	} else {
		destination.Type = nil
	}

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

	// VirtualMachineNodesStatus
	if pool.VirtualMachineNodesStatus != nil {
		virtualMachineNodesStatusList := make([]v20231102ps.VirtualMachineNodes, len(pool.VirtualMachineNodesStatus))
		for virtualMachineNodesStatusIndex, virtualMachineNodesStatusItem := range pool.VirtualMachineNodesStatus {
			// Shadow the loop variable to avoid aliasing
			virtualMachineNodesStatusItem := virtualMachineNodesStatusItem
			var virtualMachineNodesStatus v20231102ps.VirtualMachineNodes
			err := virtualMachineNodesStatusItem.AssignProperties_To_VirtualMachineNodes(&virtualMachineNodesStatus)
			if err != nil {
				return errors.Wrap(err, "calling AssignProperties_To_VirtualMachineNodes() to populate field VirtualMachineNodesStatus")
			}
			virtualMachineNodesStatusList[virtualMachineNodesStatusIndex] = virtualMachineNodesStatus
		}
		destination.VirtualMachineNodesStatus = virtualMachineNodesStatusList
	} else {
		destination.VirtualMachineNodesStatus = nil
	}

	// VirtualMachinesProfile
	if pool.VirtualMachinesProfile != nil {
		var virtualMachinesProfile v20231102ps.VirtualMachinesProfile
		err := pool.VirtualMachinesProfile.AssignProperties_To_VirtualMachinesProfile(&virtualMachinesProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_VirtualMachinesProfile() to populate field VirtualMachinesProfile")
		}
		destination.VirtualMachinesProfile = &virtualMachinesProfile
	} else {
		destination.VirtualMachinesProfile = nil
	}

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

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

	// WindowsProfile
	if pool.WindowsProfile != nil {
		var windowsProfile v20231102ps.AgentPoolWindowsProfile
		err := pool.WindowsProfile.AssignProperties_To_AgentPoolWindowsProfile(&windowsProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_AgentPoolWindowsProfile() to populate field WindowsProfile")
		}
		destination.WindowsProfile = &windowsProfile
	} else {
		destination.WindowsProfile = nil
	}

	// WorkloadRuntime
	if pool.WorkloadRuntime != nil {
		workloadRuntime := string(*pool.WorkloadRuntime)
		destination.WorkloadRuntime = &workloadRuntime
	} else {
		destination.WorkloadRuntime = nil
	}

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

	// No error
	return nil
}

// OriginalVersion returns the original API version used to create the resource.
func (pool *ManagedClusters_AgentPool_Spec) OriginalVersion() string {
	return GroupVersion.Version
}

// SetAzureName sets the Azure name of the resource
func (pool *ManagedClusters_AgentPool_Spec) SetAzureName(azureName string) {
	pool.AzureName = azureName
}

type ManagedClusters_AgentPool_STATUS struct {
	// ArtifactStreamingProfile: Configuration for using artifact streaming on AKS.
	ArtifactStreamingProfile *AgentPoolArtifactStreamingProfile_STATUS `json:"artifactStreamingProfile,omitempty"`

	// AvailabilityZones: The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType
	// property is 'VirtualMachineScaleSets'.
	AvailabilityZones []string `json:"availabilityZones,omitempty"`

	// CapacityReservationGroupID: AKS will associate the specified agent pool with the Capacity Reservation Group.
	CapacityReservationGroupID *string `json:"capacityReservationGroupID,omitempty"`

	// Conditions: The observed state of the resource
	Conditions []conditions.Condition `json:"conditions,omitempty"`

	// Count: Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive)
	// for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1.
	Count *int `json:"count,omitempty"`

	// CreationData: CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using
	// a snapshot.
	CreationData *CreationData_STATUS `json:"creationData,omitempty"`

	// CurrentOrchestratorVersion: If orchestratorVersion was a fully specified version <major.minor.patch>, this field will be
	// exactly equal to it. If orchestratorVersion was <major.minor>, this field will contain the full <major.minor.patch>
	// version being used.
	CurrentOrchestratorVersion *string `json:"currentOrchestratorVersion,omitempty"`

	// EnableAutoScaling: Whether to enable auto-scaler
	EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"`

	// EnableCustomCATrust: When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a
	// daemonset along with host services to sync custom certificate authorities from user-provided list of base64 encoded
	// certificates into node trust stores. Defaults to false.
	EnableCustomCATrust *bool `json:"enableCustomCATrust,omitempty"`

	// EnableEncryptionAtHost: This is only supported on certain VM sizes and in certain Azure regions. For more information,
	// see: https://docs.microsoft.com/azure/aks/enable-host-encryption
	EnableEncryptionAtHost *bool `json:"enableEncryptionAtHost,omitempty"`

	// EnableFIPS: See [Add a FIPS-enabled node
	// pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more
	// details.
	EnableFIPS *bool `json:"enableFIPS,omitempty"`

	// EnableNodePublicIP: Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses.
	// A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine
	// to minimize hops. For more information see [assigning a public IP per
	// node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). The
	// default is false.
	EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"`

	// EnableUltraSSD: Whether to enable UltraSSD
	EnableUltraSSD *bool `json:"enableUltraSSD,omitempty"`

	// GpuInstanceProfile: GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.
	GpuInstanceProfile *GPUInstanceProfile_STATUS `json:"gpuInstanceProfile,omitempty"`

	// GpuProfile: The GPU settings of an agent pool.
	GpuProfile *AgentPoolGPUProfile_STATUS `json:"gpuProfile,omitempty"`

	// HostGroupID: This is of the form:
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}.
	// For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts).
	HostGroupID *string `json:"hostGroupID,omitempty"`

	// Id: Resource ID.
	Id *string `json:"id,omitempty"`

	// KubeletConfig: The Kubelet configuration on the agent pool nodes.
	KubeletConfig *KubeletConfig_STATUS `json:"kubeletConfig,omitempty"`

	// KubeletDiskType: Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral
	// storage.
	KubeletDiskType *KubeletDiskType_STATUS `json:"kubeletDiskType,omitempty"`

	// LinuxOSConfig: The OS configuration of Linux agent nodes.
	LinuxOSConfig *LinuxOSConfig_STATUS `json:"linuxOSConfig,omitempty"`

	// MaxCount: The maximum number of nodes for auto-scaling
	MaxCount *int `json:"maxCount,omitempty"`

	// MaxPods: The maximum number of pods that can run on a node.
	MaxPods *int `json:"maxPods,omitempty"`

	// MessageOfTheDay: A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of
	// the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e.,
	// will be printed raw and not be executed as a script).
	MessageOfTheDay *string `json:"messageOfTheDay,omitempty"`

	// MinCount: The minimum number of nodes for auto-scaling
	MinCount *int `json:"minCount,omitempty"`

	// Mode: A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool
	// restrictions  and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools
	Mode *AgentPoolMode_STATUS `json:"mode,omitempty"`

	// Name: The name of the resource that is unique within a resource group. This name can be used to access the resource.
	Name *string `json:"name,omitempty"`

	// NetworkProfile: Network-related settings of an agent pool.
	NetworkProfile *AgentPoolNetworkProfile_STATUS `json:"networkProfile,omitempty"`

	// NodeImageVersion: The version of node image
	NodeImageVersion *string `json:"nodeImageVersion,omitempty"`

	// NodeInitializationTaints: These taints will not be reconciled by AKS and can be removed with a kubectl call. This field
	// can be modified after node pool is created, but nodes will not be recreated with new taints until another operation that
	// requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run before the
	// node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with `kubectl taint
	// nodes node1 key1=value1:NoSchedule-`
	NodeInitializationTaints []string `json:"nodeInitializationTaints,omitempty"`

	// NodeLabels: The node labels to be persisted across all nodes in agent pool.
	NodeLabels map[string]string `json:"nodeLabels,omitempty"`

	// NodePublicIPPrefixID: This is of the form:
	// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}
	NodePublicIPPrefixID *string `json:"nodePublicIPPrefixID,omitempty"`

	// NodeTaints: The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
	NodeTaints []string `json:"nodeTaints,omitempty"`

	// OrchestratorVersion: Both patch version <major.minor.patch> and <major.minor> are supported. When <major.minor> is
	// specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same
	// <major.minor> once it has been created will not trigger an upgrade, even if a newer patch version is available. As a
	// best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version
	// must have the same major version as the control plane. The node pool minor version must be within two minor versions of
	// the control plane version. The node pool version cannot be greater than the control plane version. For more information
	// see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool).
	OrchestratorVersion *string `json:"orchestratorVersion,omitempty"`
	OsDiskSizeGB        *int    `json:"osDiskSizeGB,omitempty"`

	// OsDiskType: The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested
	// OSDiskSizeGB. Otherwise,  defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral
	// OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os).
	OsDiskType *OSDiskType_STATUS `json:"osDiskType,omitempty"`

	// OsSKU: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or
	// Windows2019 if  OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is
	// deprecated.
	OsSKU *OSSKU_STATUS `json:"osSKU,omitempty"`

	// OsType: The operating system type. The default is Linux.
	OsType *OSType_STATUS `json:"osType,omitempty"`

	// PodSubnetID: 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}
	PodSubnetID *string `json:"podSubnetID,omitempty"`

	// PowerState: When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this
	// field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only
	// be stopped if it is Running and provisioning state is Succeeded
	PowerState *PowerState_STATUS `json:"powerState,omitempty"`

	// PropertiesType: The type of Agent Pool.
	PropertiesType *AgentPoolType_STATUS `json:"properties_type,omitempty"`

	// ProvisioningState: The current deployment or provisioning state.
	ProvisioningState *string `json:"provisioningState,omitempty"`

	// ProximityPlacementGroupID: The ID for Proximity Placement Group.
	ProximityPlacementGroupID *string `json:"proximityPlacementGroupID,omitempty"`

	// ScaleDownMode: This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.
	ScaleDownMode *ScaleDownMode_STATUS `json:"scaleDownMode,omitempty"`

	// ScaleSetEvictionPolicy: This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is
	// 'Delete'.
	ScaleSetEvictionPolicy *ScaleSetEvictionPolicy_STATUS `json:"scaleSetEvictionPolicy,omitempty"`

	// ScaleSetPriority: The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'.
	ScaleSetPriority *ScaleSetPriority_STATUS `json:"scaleSetPriority,omitempty"`

	// SecurityProfile: The security settings of an agent pool.
	SecurityProfile *AgentPoolSecurityProfile_STATUS `json:"securityProfile,omitempty"`

	// SpotMaxPrice: Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any
	// on-demand price. For more details on spot pricing, see [spot VMs
	// pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing)
	SpotMaxPrice *float64 `json:"spotMaxPrice,omitempty"`

	// Tags: The tags to be persisted on the agent pool virtual machine scale set.
	Tags map[string]string `json:"tags,omitempty"`

	// Type: Resource type
	Type *string `json:"type,omitempty"`

	// UpgradeSettings: Settings for upgrading the agentpool
	UpgradeSettings           *AgentPoolUpgradeSettings_STATUS `json:"upgradeSettings,omitempty"`
	VirtualMachineNodesStatus []VirtualMachineNodes_STATUS     `json:"virtualMachineNodesStatus,omitempty"`

	// VirtualMachinesProfile: Specifications on VirtualMachines agent pool.
	VirtualMachinesProfile *VirtualMachinesProfile_STATUS `json:"virtualMachinesProfile,omitempty"`

	// VmSize: VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods
	// might fail to run correctly. For more details on restricted VM sizes, see:
	// https://docs.microsoft.com/azure/aks/quotas-skus-regions
	VmSize *string `json:"vmSize,omitempty"`

	// VnetSubnetID: 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}
	VnetSubnetID *string `json:"vnetSubnetID,omitempty"`

	// WindowsProfile: The Windows agent pool's specific profile.
	WindowsProfile *AgentPoolWindowsProfile_STATUS `json:"windowsProfile,omitempty"`

	// WorkloadRuntime: Determines the type of workload a node can run.
	WorkloadRuntime *WorkloadRuntime_STATUS `json:"workloadRuntime,omitempty"`
}

var _ genruntime.ConvertibleStatus = &ManagedClusters_AgentPool_STATUS{}

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

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

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

	return nil
}

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

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

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

	return nil
}

var _ genruntime.FromARMConverter = &ManagedClusters_AgentPool_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (pool *ManagedClusters_AgentPool_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &ManagedClusters_AgentPool_STATUS_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (pool *ManagedClusters_AgentPool_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(ManagedClusters_AgentPool_STATUS_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagedClusters_AgentPool_STATUS_ARM, got %T", armInput)
	}

	// Set property "ArtifactStreamingProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ArtifactStreamingProfile != nil {
			var artifactStreamingProfile1 AgentPoolArtifactStreamingProfile_STATUS
			err := artifactStreamingProfile1.PopulateFromARM(owner, *typedInput.Properties.ArtifactStreamingProfile)
			if err != nil {
				return err
			}
			artifactStreamingProfile := artifactStreamingProfile1
			pool.ArtifactStreamingProfile = &artifactStreamingProfile
		}
	}

	// Set property "AvailabilityZones":
	// copying flattened property:
	if typedInput.Properties != nil {
		for _, item := range typedInput.Properties.AvailabilityZones {
			pool.AvailabilityZones = append(pool.AvailabilityZones, item)
		}
	}

	// Set property "CapacityReservationGroupID":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.CapacityReservationGroupID != nil {
			capacityReservationGroupID := *typedInput.Properties.CapacityReservationGroupID
			pool.CapacityReservationGroupID = &capacityReservationGroupID
		}
	}

	// no assignment for property "Conditions"

	// Set property "Count":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Count != nil {
			count := *typedInput.Properties.Count
			pool.Count = &count
		}
	}

	// Set property "CreationData":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.CreationData != nil {
			var creationData1 CreationData_STATUS
			err := creationData1.PopulateFromARM(owner, *typedInput.Properties.CreationData)
			if err != nil {
				return err
			}
			creationData := creationData1
			pool.CreationData = &creationData
		}
	}

	// Set property "CurrentOrchestratorVersion":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.CurrentOrchestratorVersion != nil {
			currentOrchestratorVersion := *typedInput.Properties.CurrentOrchestratorVersion
			pool.CurrentOrchestratorVersion = &currentOrchestratorVersion
		}
	}

	// Set property "EnableAutoScaling":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EnableAutoScaling != nil {
			enableAutoScaling := *typedInput.Properties.EnableAutoScaling
			pool.EnableAutoScaling = &enableAutoScaling
		}
	}

	// Set property "EnableCustomCATrust":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EnableCustomCATrust != nil {
			enableCustomCATrust := *typedInput.Properties.EnableCustomCATrust
			pool.EnableCustomCATrust = &enableCustomCATrust
		}
	}

	// Set property "EnableEncryptionAtHost":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EnableEncryptionAtHost != nil {
			enableEncryptionAtHost := *typedInput.Properties.EnableEncryptionAtHost
			pool.EnableEncryptionAtHost = &enableEncryptionAtHost
		}
	}

	// Set property "EnableFIPS":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EnableFIPS != nil {
			enableFIPS := *typedInput.Properties.EnableFIPS
			pool.EnableFIPS = &enableFIPS
		}
	}

	// Set property "EnableNodePublicIP":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EnableNodePublicIP != nil {
			enableNodePublicIP := *typedInput.Properties.EnableNodePublicIP
			pool.EnableNodePublicIP = &enableNodePublicIP
		}
	}

	// Set property "EnableUltraSSD":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EnableUltraSSD != nil {
			enableUltraSSD := *typedInput.Properties.EnableUltraSSD
			pool.EnableUltraSSD = &enableUltraSSD
		}
	}

	// Set property "GpuInstanceProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.GpuInstanceProfile != nil {
			gpuInstanceProfile := *typedInput.Properties.GpuInstanceProfile
			pool.GpuInstanceProfile = &gpuInstanceProfile
		}
	}

	// Set property "GpuProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.GpuProfile != nil {
			var gpuProfile1 AgentPoolGPUProfile_STATUS
			err := gpuProfile1.PopulateFromARM(owner, *typedInput.Properties.GpuProfile)
			if err != nil {
				return err
			}
			gpuProfile := gpuProfile1
			pool.GpuProfile = &gpuProfile
		}
	}

	// Set property "HostGroupID":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.HostGroupID != nil {
			hostGroupID := *typedInput.Properties.HostGroupID
			pool.HostGroupID = &hostGroupID
		}
	}

	// Set property "Id":
	if typedInput.Id != nil {
		id := *typedInput.Id
		pool.Id = &id
	}

	// Set property "KubeletConfig":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.KubeletConfig != nil {
			var kubeletConfig1 KubeletConfig_STATUS
			err := kubeletConfig1.PopulateFromARM(owner, *typedInput.Properties.KubeletConfig)
			if err != nil {
				return err
			}
			kubeletConfig := kubeletConfig1
			pool.KubeletConfig = &kubeletConfig
		}
	}

	// Set property "KubeletDiskType":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.KubeletDiskType != nil {
			kubeletDiskType := *typedInput.Properties.KubeletDiskType
			pool.KubeletDiskType = &kubeletDiskType
		}
	}

	// Set property "LinuxOSConfig":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.LinuxOSConfig != nil {
			var linuxOSConfig1 LinuxOSConfig_STATUS
			err := linuxOSConfig1.PopulateFromARM(owner, *typedInput.Properties.LinuxOSConfig)
			if err != nil {
				return err
			}
			linuxOSConfig := linuxOSConfig1
			pool.LinuxOSConfig = &linuxOSConfig
		}
	}

	// Set property "MaxCount":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.MaxCount != nil {
			maxCount := *typedInput.Properties.MaxCount
			pool.MaxCount = &maxCount
		}
	}

	// Set property "MaxPods":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.MaxPods != nil {
			maxPods := *typedInput.Properties.MaxPods
			pool.MaxPods = &maxPods
		}
	}

	// Set property "MessageOfTheDay":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.MessageOfTheDay != nil {
			messageOfTheDay := *typedInput.Properties.MessageOfTheDay
			pool.MessageOfTheDay = &messageOfTheDay
		}
	}

	// Set property "MinCount":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.MinCount != nil {
			minCount := *typedInput.Properties.MinCount
			pool.MinCount = &minCount
		}
	}

	// Set property "Mode":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Mode != nil {
			mode := *typedInput.Properties.Mode
			pool.Mode = &mode
		}
	}

	// Set property "Name":
	if typedInput.Name != nil {
		name := *typedInput.Name
		pool.Name = &name
	}

	// Set property "NetworkProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.NetworkProfile != nil {
			var networkProfile1 AgentPoolNetworkProfile_STATUS
			err := networkProfile1.PopulateFromARM(owner, *typedInput.Properties.NetworkProfile)
			if err != nil {
				return err
			}
			networkProfile := networkProfile1
			pool.NetworkProfile = &networkProfile
		}
	}

	// Set property "NodeImageVersion":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.NodeImageVersion != nil {
			nodeImageVersion := *typedInput.Properties.NodeImageVersion
			pool.NodeImageVersion = &nodeImageVersion
		}
	}

	// Set property "NodeInitializationTaints":
	// copying flattened property:
	if typedInput.Properties != nil {
		for _, item := range typedInput.Properties.NodeInitializationTaints {
			pool.NodeInitializationTaints = append(pool.NodeInitializationTaints, item)
		}
	}

	// Set property "NodeLabels":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.NodeLabels != nil {
			pool.NodeLabels = make(map[string]string, len(typedInput.Properties.NodeLabels))
			for key, value := range typedInput.Properties.NodeLabels {
				pool.NodeLabels[key] = value
			}
		}
	}

	// Set property "NodePublicIPPrefixID":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.NodePublicIPPrefixID != nil {
			nodePublicIPPrefixID := *typedInput.Properties.NodePublicIPPrefixID
			pool.NodePublicIPPrefixID = &nodePublicIPPrefixID
		}
	}

	// Set property "NodeTaints":
	// copying flattened property:
	if typedInput.Properties != nil {
		for _, item := range typedInput.Properties.NodeTaints {
			pool.NodeTaints = append(pool.NodeTaints, item)
		}
	}

	// Set property "OrchestratorVersion":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.OrchestratorVersion != nil {
			orchestratorVersion := *typedInput.Properties.OrchestratorVersion
			pool.OrchestratorVersion = &orchestratorVersion
		}
	}

	// Set property "OsDiskSizeGB":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.OsDiskSizeGB != nil {
			osDiskSizeGB := *typedInput.Properties.OsDiskSizeGB
			pool.OsDiskSizeGB = &osDiskSizeGB
		}
	}

	// Set property "OsDiskType":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.OsDiskType != nil {
			osDiskType := *typedInput.Properties.OsDiskType
			pool.OsDiskType = &osDiskType
		}
	}

	// Set property "OsSKU":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.OsSKU != nil {
			osSKU := *typedInput.Properties.OsSKU
			pool.OsSKU = &osSKU
		}
	}

	// Set property "OsType":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.OsType != nil {
			osType := *typedInput.Properties.OsType
			pool.OsType = &osType
		}
	}

	// Set property "PodSubnetID":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PodSubnetID != nil {
			podSubnetID := *typedInput.Properties.PodSubnetID
			pool.PodSubnetID = &podSubnetID
		}
	}

	// Set property "PowerState":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PowerState != nil {
			var powerState1 PowerState_STATUS
			err := powerState1.PopulateFromARM(owner, *typedInput.Properties.PowerState)
			if err != nil {
				return err
			}
			powerState := powerState1
			pool.PowerState = &powerState
		}
	}

	// Set property "PropertiesType":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Type != nil {
			propertiesType := *typedInput.Properties.Type
			pool.PropertiesType = &propertiesType
		}
	}

	// Set property "ProvisioningState":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ProvisioningState != nil {
			provisioningState := *typedInput.Properties.ProvisioningState
			pool.ProvisioningState = &provisioningState
		}
	}

	// Set property "ProximityPlacementGroupID":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ProximityPlacementGroupID != nil {
			proximityPlacementGroupID := *typedInput.Properties.ProximityPlacementGroupID
			pool.ProximityPlacementGroupID = &proximityPlacementGroupID
		}
	}

	// Set property "ScaleDownMode":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ScaleDownMode != nil {
			scaleDownMode := *typedInput.Properties.ScaleDownMode
			pool.ScaleDownMode = &scaleDownMode
		}
	}

	// Set property "ScaleSetEvictionPolicy":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ScaleSetEvictionPolicy != nil {
			scaleSetEvictionPolicy := *typedInput.Properties.ScaleSetEvictionPolicy
			pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy
		}
	}

	// Set property "ScaleSetPriority":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ScaleSetPriority != nil {
			scaleSetPriority := *typedInput.Properties.ScaleSetPriority
			pool.ScaleSetPriority = &scaleSetPriority
		}
	}

	// Set property "SecurityProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.SecurityProfile != nil {
			var securityProfile1 AgentPoolSecurityProfile_STATUS
			err := securityProfile1.PopulateFromARM(owner, *typedInput.Properties.SecurityProfile)
			if err != nil {
				return err
			}
			securityProfile := securityProfile1
			pool.SecurityProfile = &securityProfile
		}
	}

	// Set property "SpotMaxPrice":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.SpotMaxPrice != nil {
			spotMaxPrice := *typedInput.Properties.SpotMaxPrice
			pool.SpotMaxPrice = &spotMaxPrice
		}
	}

	// Set property "Tags":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Tags != nil {
			pool.Tags = make(map[string]string, len(typedInput.Properties.Tags))
			for key, value := range typedInput.Properties.Tags {
				pool.Tags[key] = value
			}
		}
	}

	// Set property "Type":
	if typedInput.Type != nil {
		typeVar := *typedInput.Type
		pool.Type = &typeVar
	}

	// Set property "UpgradeSettings":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.UpgradeSettings != nil {
			var upgradeSettings1 AgentPoolUpgradeSettings_STATUS
			err := upgradeSettings1.PopulateFromARM(owner, *typedInput.Properties.UpgradeSettings)
			if err != nil {
				return err
			}
			upgradeSettings := upgradeSettings1
			pool.UpgradeSettings = &upgradeSettings
		}
	}

	// Set property "VirtualMachineNodesStatus":
	// copying flattened property:
	if typedInput.Properties != nil {
		for _, item := range typedInput.Properties.VirtualMachineNodesStatus {
			var item1 VirtualMachineNodes_STATUS
			err := item1.PopulateFromARM(owner, item)
			if err != nil {
				return err
			}
			pool.VirtualMachineNodesStatus = append(pool.VirtualMachineNodesStatus, item1)
		}
	}

	// Set property "VirtualMachinesProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.VirtualMachinesProfile != nil {
			var virtualMachinesProfile1 VirtualMachinesProfile_STATUS
			err := virtualMachinesProfile1.PopulateFromARM(owner, *typedInput.Properties.VirtualMachinesProfile)
			if err != nil {
				return err
			}
			virtualMachinesProfile := virtualMachinesProfile1
			pool.VirtualMachinesProfile = &virtualMachinesProfile
		}
	}

	// Set property "VmSize":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.VmSize != nil {
			vmSize := *typedInput.Properties.VmSize
			pool.VmSize = &vmSize
		}
	}

	// Set property "VnetSubnetID":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.VnetSubnetID != nil {
			vnetSubnetID := *typedInput.Properties.VnetSubnetID
			pool.VnetSubnetID = &vnetSubnetID
		}
	}

	// Set property "WindowsProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.WindowsProfile != nil {
			var windowsProfile1 AgentPoolWindowsProfile_STATUS
			err := windowsProfile1.PopulateFromARM(owner, *typedInput.Properties.WindowsProfile)
			if err != nil {
				return err
			}
			windowsProfile := windowsProfile1
			pool.WindowsProfile = &windowsProfile
		}
	}

	// Set property "WorkloadRuntime":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.WorkloadRuntime != nil {
			workloadRuntime := *typedInput.Properties.WorkloadRuntime
			pool.WorkloadRuntime = &workloadRuntime
		}
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusters_AgentPool_STATUS populates our ManagedClusters_AgentPool_STATUS from the provided source ManagedClusters_AgentPool_STATUS
func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClusters_AgentPool_STATUS(source *v20231102ps.ManagedClusters_AgentPool_STATUS) error {

	// ArtifactStreamingProfile
	if source.ArtifactStreamingProfile != nil {
		var artifactStreamingProfile AgentPoolArtifactStreamingProfile_STATUS
		err := artifactStreamingProfile.AssignProperties_From_AgentPoolArtifactStreamingProfile_STATUS(source.ArtifactStreamingProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_AgentPoolArtifactStreamingProfile_STATUS() to populate field ArtifactStreamingProfile")
		}
		pool.ArtifactStreamingProfile = &artifactStreamingProfile
	} else {
		pool.ArtifactStreamingProfile = nil
	}

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

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

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

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

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

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

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

	// EnableCustomCATrust
	if source.EnableCustomCATrust != nil {
		enableCustomCATrust := *source.EnableCustomCATrust
		pool.EnableCustomCATrust = &enableCustomCATrust
	} else {
		pool.EnableCustomCATrust = nil
	}

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

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

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

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

	// GpuInstanceProfile
	if source.GpuInstanceProfile != nil {
		gpuInstanceProfile := GPUInstanceProfile_STATUS(*source.GpuInstanceProfile)
		pool.GpuInstanceProfile = &gpuInstanceProfile
	} else {
		pool.GpuInstanceProfile = nil
	}

	// GpuProfile
	if source.GpuProfile != nil {
		var gpuProfile AgentPoolGPUProfile_STATUS
		err := gpuProfile.AssignProperties_From_AgentPoolGPUProfile_STATUS(source.GpuProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_AgentPoolGPUProfile_STATUS() to populate field GpuProfile")
		}
		pool.GpuProfile = &gpuProfile
	} else {
		pool.GpuProfile = nil
	}

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

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

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

	// KubeletDiskType
	if source.KubeletDiskType != nil {
		kubeletDiskType := KubeletDiskType_STATUS(*source.KubeletDiskType)
		pool.KubeletDiskType = &kubeletDiskType
	} else {
		pool.KubeletDiskType = nil
	}

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

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

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

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

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

	// Mode
	if source.Mode != nil {
		mode := AgentPoolMode_STATUS(*source.Mode)
		pool.Mode = &mode
	} else {
		pool.Mode = nil
	}

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

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

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

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

	// 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
	if source.OsDiskType != nil {
		osDiskType := OSDiskType_STATUS(*source.OsDiskType)
		pool.OsDiskType = &osDiskType
	} else {
		pool.OsDiskType = nil
	}

	// OsSKU
	if source.OsSKU != nil {
		osSKU := OSSKU_STATUS(*source.OsSKU)
		pool.OsSKU = &osSKU
	} else {
		pool.OsSKU = nil
	}

	// OsType
	if source.OsType != nil {
		osType := OSType_STATUS(*source.OsType)
		pool.OsType = &osType
	} else {
		pool.OsType = nil
	}

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

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

	// PropertiesType
	if source.PropertiesType != nil {
		propertiesType := AgentPoolType_STATUS(*source.PropertiesType)
		pool.PropertiesType = &propertiesType
	} else {
		pool.PropertiesType = nil
	}

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

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

	// ScaleDownMode
	if source.ScaleDownMode != nil {
		scaleDownMode := ScaleDownMode_STATUS(*source.ScaleDownMode)
		pool.ScaleDownMode = &scaleDownMode
	} else {
		pool.ScaleDownMode = nil
	}

	// ScaleSetEvictionPolicy
	if source.ScaleSetEvictionPolicy != nil {
		scaleSetEvictionPolicy := ScaleSetEvictionPolicy_STATUS(*source.ScaleSetEvictionPolicy)
		pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy
	} else {
		pool.ScaleSetEvictionPolicy = nil
	}

	// ScaleSetPriority
	if source.ScaleSetPriority != nil {
		scaleSetPriority := ScaleSetPriority_STATUS(*source.ScaleSetPriority)
		pool.ScaleSetPriority = &scaleSetPriority
	} else {
		pool.ScaleSetPriority = nil
	}

	// SecurityProfile
	if source.SecurityProfile != nil {
		var securityProfile AgentPoolSecurityProfile_STATUS
		err := securityProfile.AssignProperties_From_AgentPoolSecurityProfile_STATUS(source.SecurityProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_AgentPoolSecurityProfile_STATUS() to populate field SecurityProfile")
		}
		pool.SecurityProfile = &securityProfile
	} else {
		pool.SecurityProfile = nil
	}

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

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

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

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

	// VirtualMachineNodesStatus
	if source.VirtualMachineNodesStatus != nil {
		virtualMachineNodesStatusList := make([]VirtualMachineNodes_STATUS, len(source.VirtualMachineNodesStatus))
		for virtualMachineNodesStatusIndex, virtualMachineNodesStatusItem := range source.VirtualMachineNodesStatus {
			// Shadow the loop variable to avoid aliasing
			virtualMachineNodesStatusItem := virtualMachineNodesStatusItem
			var virtualMachineNodesStatus VirtualMachineNodes_STATUS
			err := virtualMachineNodesStatus.AssignProperties_From_VirtualMachineNodes_STATUS(&virtualMachineNodesStatusItem)
			if err != nil {
				return errors.Wrap(err, "calling AssignProperties_From_VirtualMachineNodes_STATUS() to populate field VirtualMachineNodesStatus")
			}
			virtualMachineNodesStatusList[virtualMachineNodesStatusIndex] = virtualMachineNodesStatus
		}
		pool.VirtualMachineNodesStatus = virtualMachineNodesStatusList
	} else {
		pool.VirtualMachineNodesStatus = nil
	}

	// VirtualMachinesProfile
	if source.VirtualMachinesProfile != nil {
		var virtualMachinesProfile VirtualMachinesProfile_STATUS
		err := virtualMachinesProfile.AssignProperties_From_VirtualMachinesProfile_STATUS(source.VirtualMachinesProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_VirtualMachinesProfile_STATUS() to populate field VirtualMachinesProfile")
		}
		pool.VirtualMachinesProfile = &virtualMachinesProfile
	} else {
		pool.VirtualMachinesProfile = nil
	}

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

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

	// WindowsProfile
	if source.WindowsProfile != nil {
		var windowsProfile AgentPoolWindowsProfile_STATUS
		err := windowsProfile.AssignProperties_From_AgentPoolWindowsProfile_STATUS(source.WindowsProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_AgentPoolWindowsProfile_STATUS() to populate field WindowsProfile")
		}
		pool.WindowsProfile = &windowsProfile
	} else {
		pool.WindowsProfile = nil
	}

	// WorkloadRuntime
	if source.WorkloadRuntime != nil {
		workloadRuntime := WorkloadRuntime_STATUS(*source.WorkloadRuntime)
		pool.WorkloadRuntime = &workloadRuntime
	} else {
		pool.WorkloadRuntime = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusters_AgentPool_STATUS populates the provided destination ManagedClusters_AgentPool_STATUS from our ManagedClusters_AgentPool_STATUS
func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_To_ManagedClusters_AgentPool_STATUS(destination *v20231102ps.ManagedClusters_AgentPool_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// ArtifactStreamingProfile
	if pool.ArtifactStreamingProfile != nil {
		var artifactStreamingProfile v20231102ps.AgentPoolArtifactStreamingProfile_STATUS
		err := pool.ArtifactStreamingProfile.AssignProperties_To_AgentPoolArtifactStreamingProfile_STATUS(&artifactStreamingProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_AgentPoolArtifactStreamingProfile_STATUS() to populate field ArtifactStreamingProfile")
		}
		destination.ArtifactStreamingProfile = &artifactStreamingProfile
	} else {
		destination.ArtifactStreamingProfile = nil
	}

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

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

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

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

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

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

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

	// EnableCustomCATrust
	if pool.EnableCustomCATrust != nil {
		enableCustomCATrust := *pool.EnableCustomCATrust
		destination.EnableCustomCATrust = &enableCustomCATrust
	} else {
		destination.EnableCustomCATrust = 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
	if pool.GpuInstanceProfile != nil {
		gpuInstanceProfile := string(*pool.GpuInstanceProfile)
		destination.GpuInstanceProfile = &gpuInstanceProfile
	} else {
		destination.GpuInstanceProfile = nil
	}

	// GpuProfile
	if pool.GpuProfile != nil {
		var gpuProfile v20231102ps.AgentPoolGPUProfile_STATUS
		err := pool.GpuProfile.AssignProperties_To_AgentPoolGPUProfile_STATUS(&gpuProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_AgentPoolGPUProfile_STATUS() to populate field GpuProfile")
		}
		destination.GpuProfile = &gpuProfile
	} else {
		destination.GpuProfile = nil
	}

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

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

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

	// KubeletDiskType
	if pool.KubeletDiskType != nil {
		kubeletDiskType := string(*pool.KubeletDiskType)
		destination.KubeletDiskType = &kubeletDiskType
	} else {
		destination.KubeletDiskType = nil
	}

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

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

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

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

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

	// Mode
	if pool.Mode != nil {
		mode := string(*pool.Mode)
		destination.Mode = &mode
	} else {
		destination.Mode = nil
	}

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

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

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

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

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

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

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

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

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

	// OsDiskType
	if pool.OsDiskType != nil {
		osDiskType := string(*pool.OsDiskType)
		destination.OsDiskType = &osDiskType
	} else {
		destination.OsDiskType = nil
	}

	// OsSKU
	if pool.OsSKU != nil {
		osSKU := string(*pool.OsSKU)
		destination.OsSKU = &osSKU
	} else {
		destination.OsSKU = nil
	}

	// OsType
	if pool.OsType != nil {
		osType := string(*pool.OsType)
		destination.OsType = &osType
	} else {
		destination.OsType = nil
	}

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

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

	// PropertiesType
	if pool.PropertiesType != nil {
		propertiesType := string(*pool.PropertiesType)
		destination.PropertiesType = &propertiesType
	} else {
		destination.PropertiesType = nil
	}

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

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

	// ScaleDownMode
	if pool.ScaleDownMode != nil {
		scaleDownMode := string(*pool.ScaleDownMode)
		destination.ScaleDownMode = &scaleDownMode
	} else {
		destination.ScaleDownMode = nil
	}

	// ScaleSetEvictionPolicy
	if pool.ScaleSetEvictionPolicy != nil {
		scaleSetEvictionPolicy := string(*pool.ScaleSetEvictionPolicy)
		destination.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy
	} else {
		destination.ScaleSetEvictionPolicy = nil
	}

	// ScaleSetPriority
	if pool.ScaleSetPriority != nil {
		scaleSetPriority := string(*pool.ScaleSetPriority)
		destination.ScaleSetPriority = &scaleSetPriority
	} else {
		destination.ScaleSetPriority = nil
	}

	// SecurityProfile
	if pool.SecurityProfile != nil {
		var securityProfile v20231102ps.AgentPoolSecurityProfile_STATUS
		err := pool.SecurityProfile.AssignProperties_To_AgentPoolSecurityProfile_STATUS(&securityProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_AgentPoolSecurityProfile_STATUS() to populate field SecurityProfile")
		}
		destination.SecurityProfile = &securityProfile
	} else {
		destination.SecurityProfile = nil
	}

	// 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 v20231102ps.AgentPoolUpgradeSettings_STATUS
		err := pool.UpgradeSettings.AssignProperties_To_AgentPoolUpgradeSettings_STATUS(&upgradeSetting)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_AgentPoolUpgradeSettings_STATUS() to populate field UpgradeSettings")
		}
		destination.UpgradeSettings = &upgradeSetting
	} else {
		destination.UpgradeSettings = nil
	}

	// VirtualMachineNodesStatus
	if pool.VirtualMachineNodesStatus != nil {
		virtualMachineNodesStatusList := make([]v20231102ps.VirtualMachineNodes_STATUS, len(pool.VirtualMachineNodesStatus))
		for virtualMachineNodesStatusIndex, virtualMachineNodesStatusItem := range pool.VirtualMachineNodesStatus {
			// Shadow the loop variable to avoid aliasing
			virtualMachineNodesStatusItem := virtualMachineNodesStatusItem
			var virtualMachineNodesStatus v20231102ps.VirtualMachineNodes_STATUS
			err := virtualMachineNodesStatusItem.AssignProperties_To_VirtualMachineNodes_STATUS(&virtualMachineNodesStatus)
			if err != nil {
				return errors.Wrap(err, "calling AssignProperties_To_VirtualMachineNodes_STATUS() to populate field VirtualMachineNodesStatus")
			}
			virtualMachineNodesStatusList[virtualMachineNodesStatusIndex] = virtualMachineNodesStatus
		}
		destination.VirtualMachineNodesStatus = virtualMachineNodesStatusList
	} else {
		destination.VirtualMachineNodesStatus = nil
	}

	// VirtualMachinesProfile
	if pool.VirtualMachinesProfile != nil {
		var virtualMachinesProfile v20231102ps.VirtualMachinesProfile_STATUS
		err := pool.VirtualMachinesProfile.AssignProperties_To_VirtualMachinesProfile_STATUS(&virtualMachinesProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_VirtualMachinesProfile_STATUS() to populate field VirtualMachinesProfile")
		}
		destination.VirtualMachinesProfile = &virtualMachinesProfile
	} else {
		destination.VirtualMachinesProfile = nil
	}

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

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

	// WindowsProfile
	if pool.WindowsProfile != nil {
		var windowsProfile v20231102ps.AgentPoolWindowsProfile_STATUS
		err := pool.WindowsProfile.AssignProperties_To_AgentPoolWindowsProfile_STATUS(&windowsProfile)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_AgentPoolWindowsProfile_STATUS() to populate field WindowsProfile")
		}
		destination.WindowsProfile = &windowsProfile
	} else {
		destination.WindowsProfile = nil
	}

	// WorkloadRuntime
	if pool.WorkloadRuntime != nil {
		workloadRuntime := string(*pool.WorkloadRuntime)
		destination.WorkloadRuntime = &workloadRuntime
	} else {
		destination.WorkloadRuntime = nil
	}

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

	// No error
	return nil
}

type AgentPoolArtifactStreamingProfile struct {
	// Enabled: Artifact streaming speeds up the cold-start of containers on a node through on-demand image loading. To use
	// this feature, container images must also enable artifact streaming on ACR. If not specified, the default is false.
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.ARMTransformer = &AgentPoolArtifactStreamingProfile{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (profile *AgentPoolArtifactStreamingProfile) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if profile == nil {
		return nil, nil
	}
	result := &AgentPoolArtifactStreamingProfile_ARM{}

	// Set property "Enabled":
	if profile.Enabled != nil {
		enabled := *profile.Enabled
		result.Enabled = &enabled
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *AgentPoolArtifactStreamingProfile) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &AgentPoolArtifactStreamingProfile_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *AgentPoolArtifactStreamingProfile) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(AgentPoolArtifactStreamingProfile_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AgentPoolArtifactStreamingProfile_ARM, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		profile.Enabled = &enabled
	}

	// No error
	return nil
}

// AssignProperties_From_AgentPoolArtifactStreamingProfile populates our AgentPoolArtifactStreamingProfile from the provided source AgentPoolArtifactStreamingProfile
func (profile *AgentPoolArtifactStreamingProfile) AssignProperties_From_AgentPoolArtifactStreamingProfile(source *v20231102ps.AgentPoolArtifactStreamingProfile) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		profile.Enabled = &enabled
	} else {
		profile.Enabled = nil
	}

	// No error
	return nil
}

// AssignProperties_To_AgentPoolArtifactStreamingProfile populates the provided destination AgentPoolArtifactStreamingProfile from our AgentPoolArtifactStreamingProfile
func (profile *AgentPoolArtifactStreamingProfile) AssignProperties_To_AgentPoolArtifactStreamingProfile(destination *v20231102ps.AgentPoolArtifactStreamingProfile) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if profile.Enabled != nil {
		enabled := *profile.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

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

	// No error
	return nil
}

type AgentPoolArtifactStreamingProfile_STATUS struct {
	// Enabled: Artifact streaming speeds up the cold-start of containers on a node through on-demand image loading. To use
	// this feature, container images must also enable artifact streaming on ACR. If not specified, the default is false.
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.FromARMConverter = &AgentPoolArtifactStreamingProfile_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *AgentPoolArtifactStreamingProfile_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &AgentPoolArtifactStreamingProfile_STATUS_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *AgentPoolArtifactStreamingProfile_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(AgentPoolArtifactStreamingProfile_STATUS_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AgentPoolArtifactStreamingProfile_STATUS_ARM, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		profile.Enabled = &enabled
	}

	// No error
	return nil
}

// AssignProperties_From_AgentPoolArtifactStreamingProfile_STATUS populates our AgentPoolArtifactStreamingProfile_STATUS from the provided source AgentPoolArtifactStreamingProfile_STATUS
func (profile *AgentPoolArtifactStreamingProfile_STATUS) AssignProperties_From_AgentPoolArtifactStreamingProfile_STATUS(source *v20231102ps.AgentPoolArtifactStreamingProfile_STATUS) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		profile.Enabled = &enabled
	} else {
		profile.Enabled = nil
	}

	// No error
	return nil
}

// AssignProperties_To_AgentPoolArtifactStreamingProfile_STATUS populates the provided destination AgentPoolArtifactStreamingProfile_STATUS from our AgentPoolArtifactStreamingProfile_STATUS
func (profile *AgentPoolArtifactStreamingProfile_STATUS) AssignProperties_To_AgentPoolArtifactStreamingProfile_STATUS(destination *v20231102ps.AgentPoolArtifactStreamingProfile_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if profile.Enabled != nil {
		enabled := *profile.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

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

	// No error
	return nil
}

type AgentPoolGPUProfile struct {
	// InstallGPUDriver: The default value is true when the vmSize of the agent pool contains a GPU, false otherwise. GPU
	// Driver Installation can only be set true when VM has an associated GPU resource. Setting this field to false prevents
	// automatic GPU driver installation. In that case, in order for the GPU to be usable, the user must perform GPU driver
	// installation themselves.
	InstallGPUDriver *bool `json:"installGPUDriver,omitempty"`
}

var _ genruntime.ARMTransformer = &AgentPoolGPUProfile{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (profile *AgentPoolGPUProfile) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if profile == nil {
		return nil, nil
	}
	result := &AgentPoolGPUProfile_ARM{}

	// Set property "InstallGPUDriver":
	if profile.InstallGPUDriver != nil {
		installGPUDriver := *profile.InstallGPUDriver
		result.InstallGPUDriver = &installGPUDriver
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *AgentPoolGPUProfile) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &AgentPoolGPUProfile_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *AgentPoolGPUProfile) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(AgentPoolGPUProfile_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AgentPoolGPUProfile_ARM, got %T", armInput)
	}

	// Set property "InstallGPUDriver":
	if typedInput.InstallGPUDriver != nil {
		installGPUDriver := *typedInput.InstallGPUDriver
		profile.InstallGPUDriver = &installGPUDriver
	}

	// No error
	return nil
}

// AssignProperties_From_AgentPoolGPUProfile populates our AgentPoolGPUProfile from the provided source AgentPoolGPUProfile
func (profile *AgentPoolGPUProfile) AssignProperties_From_AgentPoolGPUProfile(source *v20231102ps.AgentPoolGPUProfile) error {

	// InstallGPUDriver
	if source.InstallGPUDriver != nil {
		installGPUDriver := *source.InstallGPUDriver
		profile.InstallGPUDriver = &installGPUDriver
	} else {
		profile.InstallGPUDriver = nil
	}

	// No error
	return nil
}

// AssignProperties_To_AgentPoolGPUProfile populates the provided destination AgentPoolGPUProfile from our AgentPoolGPUProfile
func (profile *AgentPoolGPUProfile) AssignProperties_To_AgentPoolGPUProfile(destination *v20231102ps.AgentPoolGPUProfile) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// InstallGPUDriver
	if profile.InstallGPUDriver != nil {
		installGPUDriver := *profile.InstallGPUDriver
		destination.InstallGPUDriver = &installGPUDriver
	} else {
		destination.InstallGPUDriver = nil
	}

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

	// No error
	return nil
}

type AgentPoolGPUProfile_STATUS struct {
	// InstallGPUDriver: The default value is true when the vmSize of the agent pool contains a GPU, false otherwise. GPU
	// Driver Installation can only be set true when VM has an associated GPU resource. Setting this field to false prevents
	// automatic GPU driver installation. In that case, in order for the GPU to be usable, the user must perform GPU driver
	// installation themselves.
	InstallGPUDriver *bool `json:"installGPUDriver,omitempty"`
}

var _ genruntime.FromARMConverter = &AgentPoolGPUProfile_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *AgentPoolGPUProfile_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &AgentPoolGPUProfile_STATUS_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *AgentPoolGPUProfile_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(AgentPoolGPUProfile_STATUS_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AgentPoolGPUProfile_STATUS_ARM, got %T", armInput)
	}

	// Set property "InstallGPUDriver":
	if typedInput.InstallGPUDriver != nil {
		installGPUDriver := *typedInput.InstallGPUDriver
		profile.InstallGPUDriver = &installGPUDriver
	}

	// No error
	return nil
}

// AssignProperties_From_AgentPoolGPUProfile_STATUS populates our AgentPoolGPUProfile_STATUS from the provided source AgentPoolGPUProfile_STATUS
func (profile *AgentPoolGPUProfile_STATUS) AssignProperties_From_AgentPoolGPUProfile_STATUS(source *v20231102ps.AgentPoolGPUProfile_STATUS) error {

	// InstallGPUDriver
	if source.InstallGPUDriver != nil {
		installGPUDriver := *source.InstallGPUDriver
		profile.InstallGPUDriver = &installGPUDriver
	} else {
		profile.InstallGPUDriver = nil
	}

	// No error
	return nil
}

// AssignProperties_To_AgentPoolGPUProfile_STATUS populates the provided destination AgentPoolGPUProfile_STATUS from our AgentPoolGPUProfile_STATUS
func (profile *AgentPoolGPUProfile_STATUS) AssignProperties_To_AgentPoolGPUProfile_STATUS(destination *v20231102ps.AgentPoolGPUProfile_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// InstallGPUDriver
	if profile.InstallGPUDriver != nil {
		installGPUDriver := *profile.InstallGPUDriver
		destination.InstallGPUDriver = &installGPUDriver
	} else {
		destination.InstallGPUDriver = nil
	}

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

	// No error
	return nil
}

// A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions
// and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools
// +kubebuilder:validation:Enum={"System","User"}
type AgentPoolMode string

const (
	AgentPoolMode_System = AgentPoolMode("System")
	AgentPoolMode_User   = AgentPoolMode("User")
)

// A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions
// and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools
type AgentPoolMode_STATUS string

const (
	AgentPoolMode_STATUS_System = AgentPoolMode_STATUS("System")
	AgentPoolMode_STATUS_User   = AgentPoolMode_STATUS("User")
)

// Network settings of an agent pool.
type AgentPoolNetworkProfile struct {
	// AllowedHostPorts: The port ranges that are allowed to access. The specified ranges are allowed to overlap.
	AllowedHostPorts []PortRange `json:"allowedHostPorts,omitempty"`

	// ApplicationSecurityGroupsReferences: The IDs of the application security groups which agent pool will associate when
	// created.
	ApplicationSecurityGroupsReferences []genruntime.ResourceReference `armReference:"ApplicationSecurityGroups" json:"applicationSecurityGroupsReferences,omitempty"`

	// NodePublicIPTags: IPTags of instance-level public IPs.
	NodePublicIPTags []IPTag `json:"nodePublicIPTags,omitempty"`
}

var _ genruntime.ARMTransformer = &AgentPoolNetworkProfile{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (profile *AgentPoolNetworkProfile) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if profile == nil {
		return nil, nil
	}
	result := &AgentPoolNetworkProfile_ARM{}

	// Set property "AllowedHostPorts":
	for _, item := range profile.AllowedHostPorts {
		item_ARM, err := item.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		result.AllowedHostPorts = append(result.AllowedHostPorts, *item_ARM.(*PortRange_ARM))
	}

	// Set property "ApplicationSecurityGroups":
	for _, item := range profile.ApplicationSecurityGroupsReferences {
		itemARMID, err := resolved.ResolvedReferences.Lookup(item)
		if err != nil {
			return nil, err
		}
		result.ApplicationSecurityGroups = append(result.ApplicationSecurityGroups, itemARMID)
	}

	// Set property "NodePublicIPTags":
	for _, item := range profile.NodePublicIPTags {
		item_ARM, err := item.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		result.NodePublicIPTags = append(result.NodePublicIPTags, *item_ARM.(*IPTag_ARM))
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *AgentPoolNetworkProfile) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &AgentPoolNetworkProfile_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *AgentPoolNetworkProfile) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(AgentPoolNetworkProfile_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AgentPoolNetworkProfile_ARM, got %T", armInput)
	}

	// Set property "AllowedHostPorts":
	for _, item := range typedInput.AllowedHostPorts {
		var item1 PortRange
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		profile.AllowedHostPorts = append(profile.AllowedHostPorts, item1)
	}

	// no assignment for property "ApplicationSecurityGroupsReferences"

	// Set property "NodePublicIPTags":
	for _, item := range typedInput.NodePublicIPTags {
		var item1 IPTag
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		profile.NodePublicIPTags = append(profile.NodePublicIPTags, item1)
	}

	// No error
	return nil
}

// AssignProperties_From_AgentPoolNetworkProfile populates our AgentPoolNetworkProfile from the provided source AgentPoolNetworkProfile
func (profile *AgentPoolNetworkProfile) AssignProperties_From_AgentPoolNetworkProfile(source *v20231102ps.AgentPoolNetworkProfile) error {

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

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

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

	// No error
	return nil
}

// AssignProperties_To_AgentPoolNetworkProfile populates the provided destination AgentPoolNetworkProfile from our AgentPoolNetworkProfile
func (profile *AgentPoolNetworkProfile) AssignProperties_To_AgentPoolNetworkProfile(destination *v20231102ps.AgentPoolNetworkProfile) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

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

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

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

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

	// No error
	return nil
}

// Network settings of an agent pool.
type AgentPoolNetworkProfile_STATUS struct {
	// AllowedHostPorts: The port ranges that are allowed to access. The specified ranges are allowed to overlap.
	AllowedHostPorts []PortRange_STATUS `json:"allowedHostPorts,omitempty"`

	// ApplicationSecurityGroups: The IDs of the application security groups which agent pool will associate when created.
	ApplicationSecurityGroups []string `json:"applicationSecurityGroups,omitempty"`

	// NodePublicIPTags: IPTags of instance-level public IPs.
	NodePublicIPTags []IPTag_STATUS `json:"nodePublicIPTags,omitempty"`
}

var _ genruntime.FromARMConverter = &AgentPoolNetworkProfile_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *AgentPoolNetworkProfile_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &AgentPoolNetworkProfile_STATUS_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *AgentPoolNetworkProfile_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(AgentPoolNetworkProfile_STATUS_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AgentPoolNetworkProfile_STATUS_ARM, got %T", armInput)
	}

	// Set property "AllowedHostPorts":
	for _, item := range typedInput.AllowedHostPorts {
		var item1 PortRange_STATUS
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		profile.AllowedHostPorts = append(profile.AllowedHostPorts, item1)
	}

	// Set property "ApplicationSecurityGroups":
	for _, item := range typedInput.ApplicationSecurityGroups {
		profile.ApplicationSecurityGroups = append(profile.ApplicationSecurityGroups, item)
	}

	// Set property "NodePublicIPTags":
	for _, item := range typedInput.NodePublicIPTags {
		var item1 IPTag_STATUS
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		profile.NodePublicIPTags = append(profile.NodePublicIPTags, item1)
	}

	// No error
	return nil
}

// AssignProperties_From_AgentPoolNetworkProfile_STATUS populates our AgentPoolNetworkProfile_STATUS from the provided source AgentPoolNetworkProfile_STATUS
func (profile *AgentPoolNetworkProfile_STATUS) AssignProperties_From_AgentPoolNetworkProfile_STATUS(source *v20231102ps.AgentPoolNetworkProfile_STATUS) error {

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

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

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

	// No error
	return nil
}

// AssignProperties_To_AgentPoolNetworkProfile_STATUS populates the provided destination AgentPoolNetworkProfile_STATUS from our AgentPoolNetworkProfile_STATUS
func (profile *AgentPoolNetworkProfile_STATUS) AssignProperties_To_AgentPoolNetworkProfile_STATUS(destination *v20231102ps.AgentPoolNetworkProfile_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

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

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

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

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

	// No error
	return nil
}

// The security settings of an agent pool.
type AgentPoolSecurityProfile struct {
	// EnableSecureBoot: Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and
	// drivers can boot. For more details, see aka.ms/aks/trustedlaunch.  If not specified, the default is false.
	EnableSecureBoot *bool `json:"enableSecureBoot,omitempty"`

	// EnableVTPM: vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held
	// locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false.
	EnableVTPM *bool `json:"enableVTPM,omitempty"`

	// SshAccess: SSH access method of an agent pool.
	SshAccess *AgentPoolSSHAccess `json:"sshAccess,omitempty"`
}

var _ genruntime.ARMTransformer = &AgentPoolSecurityProfile{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (profile *AgentPoolSecurityProfile) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if profile == nil {
		return nil, nil
	}
	result := &AgentPoolSecurityProfile_ARM{}

	// Set property "EnableSecureBoot":
	if profile.EnableSecureBoot != nil {
		enableSecureBoot := *profile.EnableSecureBoot
		result.EnableSecureBoot = &enableSecureBoot
	}

	// Set property "EnableVTPM":
	if profile.EnableVTPM != nil {
		enableVTPM := *profile.EnableVTPM
		result.EnableVTPM = &enableVTPM
	}

	// Set property "SshAccess":
	if profile.SshAccess != nil {
		sshAccess := *profile.SshAccess
		result.SshAccess = &sshAccess
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *AgentPoolSecurityProfile) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &AgentPoolSecurityProfile_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *AgentPoolSecurityProfile) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(AgentPoolSecurityProfile_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AgentPoolSecurityProfile_ARM, got %T", armInput)
	}

	// Set property "EnableSecureBoot":
	if typedInput.EnableSecureBoot != nil {
		enableSecureBoot := *typedInput.EnableSecureBoot
		profile.EnableSecureBoot = &enableSecureBoot
	}

	// Set property "EnableVTPM":
	if typedInput.EnableVTPM != nil {
		enableVTPM := *typedInput.EnableVTPM
		profile.EnableVTPM = &enableVTPM
	}

	// Set property "SshAccess":
	if typedInput.SshAccess != nil {
		sshAccess := *typedInput.SshAccess
		profile.SshAccess = &sshAccess
	}

	// No error
	return nil
}

// AssignProperties_From_AgentPoolSecurityProfile populates our AgentPoolSecurityProfile from the provided source AgentPoolSecurityProfile
func (profile *AgentPoolSecurityProfile) AssignProperties_From_AgentPoolSecurityProfile(source *v20231102ps.AgentPoolSecurityProfile) error {

	// EnableSecureBoot
	if source.EnableSecureBoot != nil {
		enableSecureBoot := *source.EnableSecureBoot
		profile.EnableSecureBoot = &enableSecureBoot
	} else {
		profile.EnableSecureBoot = nil
	}

	// EnableVTPM
	if source.EnableVTPM != nil {
		enableVTPM := *source.EnableVTPM
		profile.EnableVTPM = &enableVTPM
	} else {
		profile.EnableVTPM = nil
	}

	// SshAccess
	if source.SshAccess != nil {
		sshAccess := AgentPoolSSHAccess(*source.SshAccess)
		profile.SshAccess = &sshAccess
	} else {
		profile.SshAccess = nil
	}

	// No error
	return nil
}

// AssignProperties_To_AgentPoolSecurityProfile populates the provided destination AgentPoolSecurityProfile from our AgentPoolSecurityProfile
func (profile *AgentPoolSecurityProfile) AssignProperties_To_AgentPoolSecurityProfile(destination *v20231102ps.AgentPoolSecurityProfile) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// EnableSecureBoot
	if profile.EnableSecureBoot != nil {
		enableSecureBoot := *profile.EnableSecureBoot
		destination.EnableSecureBoot = &enableSecureBoot
	} else {
		destination.EnableSecureBoot = nil
	}

	// EnableVTPM
	if profile.EnableVTPM != nil {
		enableVTPM := *profile.EnableVTPM
		destination.EnableVTPM = &enableVTPM
	} else {
		destination.EnableVTPM = nil
	}

	// SshAccess
	if profile.SshAccess != nil {
		sshAccess := string(*profile.SshAccess)
		destination.SshAccess = &sshAccess
	} else {
		destination.SshAccess = nil
	}

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

	// No error
	return nil
}

// The security settings of an agent pool.
type AgentPoolSecurityProfile_STATUS struct {
	// EnableSecureBoot: Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and
	// drivers can boot. For more details, see aka.ms/aks/trustedlaunch.  If not specified, the default is false.
	EnableSecureBoot *bool `json:"enableSecureBoot,omitempty"`

	// EnableVTPM: vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held
	// locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false.
	EnableVTPM *bool `json:"enableVTPM,omitempty"`

	// SshAccess: SSH access method of an agent pool.
	SshAccess *AgentPoolSSHAccess_STATUS `json:"sshAccess,omitempty"`
}

var _ genruntime.FromARMConverter = &AgentPoolSecurityProfile_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *AgentPoolSecurityProfile_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &AgentPoolSecurityProfile_STATUS_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *AgentPoolSecurityProfile_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(AgentPoolSecurityProfile_STATUS_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AgentPoolSecurityProfile_STATUS_ARM, got %T", armInput)
	}

	// Set property "EnableSecureBoot":
	if typedInput.EnableSecureBoot != nil {
		enableSecureBoot := *typedInput.EnableSecureBoot
		profile.EnableSecureBoot = &enableSecureBoot
	}

	// Set property "EnableVTPM":
	if typedInput.EnableVTPM != nil {
		enableVTPM := *typedInput.EnableVTPM
		profile.EnableVTPM = &enableVTPM
	}

	// Set property "SshAccess":
	if typedInput.SshAccess != nil {
		sshAccess := *typedInput.SshAccess
		profile.SshAccess = &sshAccess
	}

	// No error
	return nil
}

// AssignProperties_From_AgentPoolSecurityProfile_STATUS populates our AgentPoolSecurityProfile_STATUS from the provided source AgentPoolSecurityProfile_STATUS
func (profile *AgentPoolSecurityProfile_STATUS) AssignProperties_From_AgentPoolSecurityProfile_STATUS(source *v20231102ps.AgentPoolSecurityProfile_STATUS) error {

	// EnableSecureBoot
	if source.EnableSecureBoot != nil {
		enableSecureBoot := *source.EnableSecureBoot
		profile.EnableSecureBoot = &enableSecureBoot
	} else {
		profile.EnableSecureBoot = nil
	}

	// EnableVTPM
	if source.EnableVTPM != nil {
		enableVTPM := *source.EnableVTPM
		profile.EnableVTPM = &enableVTPM
	} else {
		profile.EnableVTPM = nil
	}

	// SshAccess
	if source.SshAccess != nil {
		sshAccess := AgentPoolSSHAccess_STATUS(*source.SshAccess)
		profile.SshAccess = &sshAccess
	} else {
		profile.SshAccess = nil
	}

	// No error
	return nil
}

// AssignProperties_To_AgentPoolSecurityProfile_STATUS populates the provided destination AgentPoolSecurityProfile_STATUS from our AgentPoolSecurityProfile_STATUS
func (profile *AgentPoolSecurityProfile_STATUS) AssignProperties_To_AgentPoolSecurityProfile_STATUS(destination *v20231102ps.AgentPoolSecurityProfile_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// EnableSecureBoot
	if profile.EnableSecureBoot != nil {
		enableSecureBoot := *profile.EnableSecureBoot
		destination.EnableSecureBoot = &enableSecureBoot
	} else {
		destination.EnableSecureBoot = nil
	}

	// EnableVTPM
	if profile.EnableVTPM != nil {
		enableVTPM := *profile.EnableVTPM
		destination.EnableVTPM = &enableVTPM
	} else {
		destination.EnableVTPM = nil
	}

	// SshAccess
	if profile.SshAccess != nil {
		sshAccess := string(*profile.SshAccess)
		destination.SshAccess = &sshAccess
	} else {
		destination.SshAccess = nil
	}

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

	// No error
	return nil
}

// The type of Agent Pool.
// +kubebuilder:validation:Enum={"AvailabilitySet","VirtualMachineScaleSets","VirtualMachines"}
type AgentPoolType string

const (
	AgentPoolType_AvailabilitySet         = AgentPoolType("AvailabilitySet")
	AgentPoolType_VirtualMachineScaleSets = AgentPoolType("VirtualMachineScaleSets")
	AgentPoolType_VirtualMachines         = AgentPoolType("VirtualMachines")
)

// The type of Agent Pool.
type AgentPoolType_STATUS string

const (
	AgentPoolType_STATUS_AvailabilitySet         = AgentPoolType_STATUS("AvailabilitySet")
	AgentPoolType_STATUS_VirtualMachineScaleSets = AgentPoolType_STATUS("VirtualMachineScaleSets")
	AgentPoolType_STATUS_VirtualMachines         = AgentPoolType_STATUS("VirtualMachines")
)

// Settings for upgrading an agentpool
type AgentPoolUpgradeSettings struct {
	// +kubebuilder:validation:Maximum=1440
	// +kubebuilder:validation:Minimum=1
	// DrainTimeoutInMinutes: The amount of time (in minutes) to wait on eviction of pods and graceful termination per node.
	// This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not
	// specified, the default is 30 minutes.
	DrainTimeoutInMinutes *int `json:"drainTimeoutInMinutes,omitempty"`

	// MaxSurge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it
	// is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded
	// up. If not specified, the default is 1. For more information, including best practices, see:
	// https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade
	MaxSurge *string `json:"maxSurge,omitempty"`

	// +kubebuilder:validation:Maximum=30
	// +kubebuilder:validation:Minimum=0
	// NodeSoakDurationInMinutes: The amount of time (in minutes) to wait after draining a node and before reimaging it and
	// moving on to next node. If not specified, the default is 0 minutes.
	NodeSoakDurationInMinutes *int `json:"nodeSoakDurationInMinutes,omitempty"`
}

var _ genruntime.ARMTransformer = &AgentPoolUpgradeSettings{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (settings *AgentPoolUpgradeSettings) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if settings == nil {
		return nil, nil
	}
	result := &AgentPoolUpgradeSettings_ARM{}

	// Set property "DrainTimeoutInMinutes":
	if settings.DrainTimeoutInMinutes != nil {
		drainTimeoutInMinutes := *settings.DrainTimeoutInMinutes
		result.DrainTimeoutInMinutes = &drainTimeoutInMinutes
	}

	// Set property "MaxSurge":
	if settings.MaxSurge != nil {
		maxSurge := *settings.MaxSurge
		result.MaxSurge = &maxSurge
	}

	// Set property "NodeSoakDurationInMinutes":
	if settings.NodeSoakDurationInMinutes != nil {
		nodeSoakDurationInMinutes := *settings.NodeSoakDurationInMinutes
		result.NodeSoakDurationInMinutes = &nodeSoakDurationInMinutes
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (settings *AgentPoolUpgradeSettings) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &AgentPoolUpgradeSettings_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (settings *AgentPoolUpgradeSettings) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(AgentPoolUpgradeSettings_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AgentPoolUpgradeSettings_ARM, got %T", armInput)
	}

	// Set property "DrainTimeoutInMinutes":
	if typedInput.DrainTimeoutInMinutes != nil {
		drainTimeoutInMinutes := *typedInput.DrainTimeoutInMinutes
		settings.DrainTimeoutInMinutes = &drainTimeoutInMinutes
	}

	// Set property "MaxSurge":
	if typedInput.MaxSurge != nil {
		maxSurge := *typedInput.MaxSurge
		settings.MaxSurge = &maxSurge
	}

	// Set property "NodeSoakDurationInMinutes":
	if typedInput.NodeSoakDurationInMinutes != nil {
		nodeSoakDurationInMinutes := *typedInput.NodeSoakDurationInMinutes
		settings.NodeSoakDurationInMinutes = &nodeSoakDurationInMinutes
	}

	// No error
	return nil
}

// AssignProperties_From_AgentPoolUpgradeSettings populates our AgentPoolUpgradeSettings from the provided source AgentPoolUpgradeSettings
func (settings *AgentPoolUpgradeSettings) AssignProperties_From_AgentPoolUpgradeSettings(source *v20231102ps.AgentPoolUpgradeSettings) error {

	// DrainTimeoutInMinutes
	if source.DrainTimeoutInMinutes != nil {
		drainTimeoutInMinute := *source.DrainTimeoutInMinutes
		settings.DrainTimeoutInMinutes = &drainTimeoutInMinute
	} else {
		settings.DrainTimeoutInMinutes = nil
	}

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

	// NodeSoakDurationInMinutes
	if source.NodeSoakDurationInMinutes != nil {
		nodeSoakDurationInMinute := *source.NodeSoakDurationInMinutes
		settings.NodeSoakDurationInMinutes = &nodeSoakDurationInMinute
	} else {
		settings.NodeSoakDurationInMinutes = nil
	}

	// No error
	return nil
}

// AssignProperties_To_AgentPoolUpgradeSettings populates the provided destination AgentPoolUpgradeSettings from our AgentPoolUpgradeSettings
func (settings *AgentPoolUpgradeSettings) AssignProperties_To_AgentPoolUpgradeSettings(destination *v20231102ps.AgentPoolUpgradeSettings) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// DrainTimeoutInMinutes
	if settings.DrainTimeoutInMinutes != nil {
		drainTimeoutInMinute := *settings.DrainTimeoutInMinutes
		destination.DrainTimeoutInMinutes = &drainTimeoutInMinute
	} else {
		destination.DrainTimeoutInMinutes = nil
	}

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

	// NodeSoakDurationInMinutes
	if settings.NodeSoakDurationInMinutes != nil {
		nodeSoakDurationInMinute := *settings.NodeSoakDurationInMinutes
		destination.NodeSoakDurationInMinutes = &nodeSoakDurationInMinute
	} else {
		destination.NodeSoakDurationInMinutes = nil
	}

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

	// No error
	return nil
}

// Settings for upgrading an agentpool
type AgentPoolUpgradeSettings_STATUS struct {
	// DrainTimeoutInMinutes: The amount of time (in minutes) to wait on eviction of pods and graceful termination per node.
	// This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not
	// specified, the default is 30 minutes.
	DrainTimeoutInMinutes *int `json:"drainTimeoutInMinutes,omitempty"`

	// MaxSurge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it
	// is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded
	// up. If not specified, the default is 1. For more information, including best practices, see:
	// https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade
	MaxSurge *string `json:"maxSurge,omitempty"`

	// NodeSoakDurationInMinutes: The amount of time (in minutes) to wait after draining a node and before reimaging it and
	// moving on to next node. If not specified, the default is 0 minutes.
	NodeSoakDurationInMinutes *int `json:"nodeSoakDurationInMinutes,omitempty"`
}

var _ genruntime.FromARMConverter = &AgentPoolUpgradeSettings_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (settings *AgentPoolUpgradeSettings_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &AgentPoolUpgradeSettings_STATUS_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (settings *AgentPoolUpgradeSettings_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(AgentPoolUpgradeSettings_STATUS_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AgentPoolUpgradeSettings_STATUS_ARM, got %T", armInput)
	}

	// Set property "DrainTimeoutInMinutes":
	if typedInput.DrainTimeoutInMinutes != nil {
		drainTimeoutInMinutes := *typedInput.DrainTimeoutInMinutes
		settings.DrainTimeoutInMinutes = &drainTimeoutInMinutes
	}

	// Set property "MaxSurge":
	if typedInput.MaxSurge != nil {
		maxSurge := *typedInput.MaxSurge
		settings.MaxSurge = &maxSurge
	}

	// Set property "NodeSoakDurationInMinutes":
	if typedInput.NodeSoakDurationInMinutes != nil {
		nodeSoakDurationInMinutes := *typedInput.NodeSoakDurationInMinutes
		settings.NodeSoakDurationInMinutes = &nodeSoakDurationInMinutes
	}

	// No error
	return nil
}

// AssignProperties_From_AgentPoolUpgradeSettings_STATUS populates our AgentPoolUpgradeSettings_STATUS from the provided source AgentPoolUpgradeSettings_STATUS
func (settings *AgentPoolUpgradeSettings_STATUS) AssignProperties_From_AgentPoolUpgradeSettings_STATUS(source *v20231102ps.AgentPoolUpgradeSettings_STATUS) error {

	// DrainTimeoutInMinutes
	settings.DrainTimeoutInMinutes = genruntime.ClonePointerToInt(source.DrainTimeoutInMinutes)

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

	// NodeSoakDurationInMinutes
	settings.NodeSoakDurationInMinutes = genruntime.ClonePointerToInt(source.NodeSoakDurationInMinutes)

	// 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 *v20231102ps.AgentPoolUpgradeSettings_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// DrainTimeoutInMinutes
	destination.DrainTimeoutInMinutes = genruntime.ClonePointerToInt(settings.DrainTimeoutInMinutes)

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

	// NodeSoakDurationInMinutes
	destination.NodeSoakDurationInMinutes = genruntime.ClonePointerToInt(settings.NodeSoakDurationInMinutes)

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

	// No error
	return nil
}

// The Windows agent pool's specific profile.
type AgentPoolWindowsProfile struct {
	// DisableOutboundNat: The default value is false. Outbound NAT can only be disabled if the cluster outboundType is NAT
	// Gateway and the Windows agent pool does not have node public IP enabled.
	DisableOutboundNat *bool `json:"disableOutboundNat,omitempty"`
}

var _ genruntime.ARMTransformer = &AgentPoolWindowsProfile{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (profile *AgentPoolWindowsProfile) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if profile == nil {
		return nil, nil
	}
	result := &AgentPoolWindowsProfile_ARM{}

	// Set property "DisableOutboundNat":
	if profile.DisableOutboundNat != nil {
		disableOutboundNat := *profile.DisableOutboundNat
		result.DisableOutboundNat = &disableOutboundNat
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *AgentPoolWindowsProfile) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &AgentPoolWindowsProfile_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *AgentPoolWindowsProfile) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(AgentPoolWindowsProfile_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AgentPoolWindowsProfile_ARM, got %T", armInput)
	}

	// Set property "DisableOutboundNat":
	if typedInput.DisableOutboundNat != nil {
		disableOutboundNat := *typedInput.DisableOutboundNat
		profile.DisableOutboundNat = &disableOutboundNat
	}

	// No error
	return nil
}

// AssignProperties_From_AgentPoolWindowsProfile populates our AgentPoolWindowsProfile from the provided source AgentPoolWindowsProfile
func (profile *AgentPoolWindowsProfile) AssignProperties_From_AgentPoolWindowsProfile(source *v20231102ps.AgentPoolWindowsProfile) error {

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

	// No error
	return nil
}

// AssignProperties_To_AgentPoolWindowsProfile populates the provided destination AgentPoolWindowsProfile from our AgentPoolWindowsProfile
func (profile *AgentPoolWindowsProfile) AssignProperties_To_AgentPoolWindowsProfile(destination *v20231102ps.AgentPoolWindowsProfile) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

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

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

	// No error
	return nil
}

// The Windows agent pool's specific profile.
type AgentPoolWindowsProfile_STATUS struct {
	// DisableOutboundNat: The default value is false. Outbound NAT can only be disabled if the cluster outboundType is NAT
	// Gateway and the Windows agent pool does not have node public IP enabled.
	DisableOutboundNat *bool `json:"disableOutboundNat,omitempty"`
}

var _ genruntime.FromARMConverter = &AgentPoolWindowsProfile_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *AgentPoolWindowsProfile_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &AgentPoolWindowsProfile_STATUS_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *AgentPoolWindowsProfile_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(AgentPoolWindowsProfile_STATUS_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AgentPoolWindowsProfile_STATUS_ARM, got %T", armInput)
	}

	// Set property "DisableOutboundNat":
	if typedInput.DisableOutboundNat != nil {
		disableOutboundNat := *typedInput.DisableOutboundNat
		profile.DisableOutboundNat = &disableOutboundNat
	}

	// No error
	return nil
}

// AssignProperties_From_AgentPoolWindowsProfile_STATUS populates our AgentPoolWindowsProfile_STATUS from the provided source AgentPoolWindowsProfile_STATUS
func (profile *AgentPoolWindowsProfile_STATUS) AssignProperties_From_AgentPoolWindowsProfile_STATUS(source *v20231102ps.AgentPoolWindowsProfile_STATUS) error {

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

	// No error
	return nil
}

// AssignProperties_To_AgentPoolWindowsProfile_STATUS populates the provided destination AgentPoolWindowsProfile_STATUS from our AgentPoolWindowsProfile_STATUS
func (profile *AgentPoolWindowsProfile_STATUS) AssignProperties_To_AgentPoolWindowsProfile_STATUS(destination *v20231102ps.AgentPoolWindowsProfile_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

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

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

	// No error
	return nil
}

// +kubebuilder:validation:Maximum=2048
// +kubebuilder:validation:Minimum=0
type ContainerServiceOSDisk int

// GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.
// +kubebuilder:validation:Enum={"MIG1g","MIG2g","MIG3g","MIG4g","MIG7g"}
type GPUInstanceProfile string

const (
	GPUInstanceProfile_MIG1G = GPUInstanceProfile("MIG1g")
	GPUInstanceProfile_MIG2G = GPUInstanceProfile("MIG2g")
	GPUInstanceProfile_MIG3G = GPUInstanceProfile("MIG3g")
	GPUInstanceProfile_MIG4G = GPUInstanceProfile("MIG4g")
	GPUInstanceProfile_MIG7G = GPUInstanceProfile("MIG7g")
)

// GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.
type GPUInstanceProfile_STATUS string

const (
	GPUInstanceProfile_STATUS_MIG1G = GPUInstanceProfile_STATUS("MIG1g")
	GPUInstanceProfile_STATUS_MIG2G = GPUInstanceProfile_STATUS("MIG2g")
	GPUInstanceProfile_STATUS_MIG3G = GPUInstanceProfile_STATUS("MIG3g")
	GPUInstanceProfile_STATUS_MIG4G = GPUInstanceProfile_STATUS("MIG4g")
	GPUInstanceProfile_STATUS_MIG7G = GPUInstanceProfile_STATUS("MIG7g")
)

// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details.
type KubeletConfig struct {
	// AllowedUnsafeSysctls: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`).
	AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty"`

	// +kubebuilder:validation:Minimum=2
	// ContainerLogMaxFiles: The maximum number of container log files that can be present for a container. The number must be
	// ≥ 2.
	ContainerLogMaxFiles *int `json:"containerLogMaxFiles,omitempty"`

	// ContainerLogMaxSizeMB: The maximum size (e.g. 10Mi) of container log file before it is rotated.
	ContainerLogMaxSizeMB *int `json:"containerLogMaxSizeMB,omitempty"`

	// CpuCfsQuota: The default is true.
	CpuCfsQuota *bool `json:"cpuCfsQuota,omitempty"`

	// CpuCfsQuotaPeriod: The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and
	// a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'.
	CpuCfsQuotaPeriod *string `json:"cpuCfsQuotaPeriod,omitempty"`

	// CpuManagerPolicy: The default is 'none'. See [Kubernetes CPU management
	// policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) for more
	// information. Allowed values are 'none' and 'static'.
	CpuManagerPolicy *string `json:"cpuManagerPolicy,omitempty"`

	// FailSwapOn: If set to true it will make the Kubelet fail to start if swap is enabled on the node.
	FailSwapOn *bool `json:"failSwapOn,omitempty"`

	// ImageGcHighThreshold: To disable image garbage collection, set to 100. The default is 85%
	ImageGcHighThreshold *int `json:"imageGcHighThreshold,omitempty"`

	// ImageGcLowThreshold: This cannot be set higher than imageGcHighThreshold. The default is 80%
	ImageGcLowThreshold *int `json:"imageGcLowThreshold,omitempty"`

	// PodMaxPids: The maximum number of processes per pod.
	PodMaxPids *int `json:"podMaxPids,omitempty"`

	// TopologyManagerPolicy: For more information see [Kubernetes Topology
	// Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. Allowed values
	// are 'none', 'best-effort', 'restricted', and 'single-numa-node'.
	TopologyManagerPolicy *string `json:"topologyManagerPolicy,omitempty"`
}

var _ genruntime.ARMTransformer = &KubeletConfig{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (config *KubeletConfig) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if config == nil {
		return nil, nil
	}
	result := &KubeletConfig_ARM{}

	// Set property "AllowedUnsafeSysctls":
	for _, item := range config.AllowedUnsafeSysctls {
		result.AllowedUnsafeSysctls = append(result.AllowedUnsafeSysctls, item)
	}

	// Set property "ContainerLogMaxFiles":
	if config.ContainerLogMaxFiles != nil {
		containerLogMaxFiles := *config.ContainerLogMaxFiles
		result.ContainerLogMaxFiles = &containerLogMaxFiles
	}

	// Set property "ContainerLogMaxSizeMB":
	if config.ContainerLogMaxSizeMB != nil {
		containerLogMaxSizeMB := *config.ContainerLogMaxSizeMB
		result.ContainerLogMaxSizeMB = &containerLogMaxSizeMB
	}

	// Set property "CpuCfsQuota":
	if config.CpuCfsQuota != nil {
		cpuCfsQuota := *config.CpuCfsQuota
		result.CpuCfsQuota = &cpuCfsQuota
	}

	// Set property "CpuCfsQuotaPeriod":
	if config.CpuCfsQuotaPeriod != nil {
		cpuCfsQuotaPeriod := *config.CpuCfsQuotaPeriod
		result.CpuCfsQuotaPeriod = &cpuCfsQuotaPeriod
	}

	// Set property "CpuManagerPolicy":
	if config.CpuManagerPolicy != nil {
		cpuManagerPolicy := *config.CpuManagerPolicy
		result.CpuManagerPolicy = &cpuManagerPolicy
	}

	// Set property "FailSwapOn":
	if config.FailSwapOn != nil {
		failSwapOn := *config.FailSwapOn
		result.FailSwapOn = &failSwapOn
	}

	// Set property "ImageGcHighThreshold":
	if config.ImageGcHighThreshold != nil {
		imageGcHighThreshold := *config.ImageGcHighThreshold
		result.ImageGcHighThreshold = &imageGcHighThreshold
	}

	// Set property "ImageGcLowThreshold":
	if config.ImageGcLowThreshold != nil {
		imageGcLowThreshold := *config.ImageGcLowThreshold
		result.ImageGcLowThreshold = &imageGcLowThreshold
	}

	// Set property "PodMaxPids":
	if config.PodMaxPids != nil {
		podMaxPids := *config.PodMaxPids
		result.PodMaxPids = &podMaxPids
	}

	// Set property "TopologyManagerPolicy":
	if config.TopologyManagerPolicy != nil {
		topologyManagerPolicy := *config.TopologyManagerPolicy
		result.TopologyManagerPolicy = &topologyManagerPolicy
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (config *KubeletConfig) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &KubeletConfig_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (config *KubeletConfig) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(KubeletConfig_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected KubeletConfig_ARM, got %T", armInput)
	}

	// Set property "AllowedUnsafeSysctls":
	for _, item := range typedInput.AllowedUnsafeSysctls {
		config.AllowedUnsafeSysctls = append(config.AllowedUnsafeSysctls, item)
	}

	// Set property "ContainerLogMaxFiles":
	if typedInput.ContainerLogMaxFiles != nil {
		containerLogMaxFiles := *typedInput.ContainerLogMaxFiles
		config.ContainerLogMaxFiles = &containerLogMaxFiles
	}

	// Set property "ContainerLogMaxSizeMB":
	if typedInput.ContainerLogMaxSizeMB != nil {
		containerLogMaxSizeMB := *typedInput.ContainerLogMaxSizeMB
		config.ContainerLogMaxSizeMB = &containerLogMaxSizeMB
	}

	// Set property "CpuCfsQuota":
	if typedInput.CpuCfsQuota != nil {
		cpuCfsQuota := *typedInput.CpuCfsQuota
		config.CpuCfsQuota = &cpuCfsQuota
	}

	// Set property "CpuCfsQuotaPeriod":
	if typedInput.CpuCfsQuotaPeriod != nil {
		cpuCfsQuotaPeriod := *typedInput.CpuCfsQuotaPeriod
		config.CpuCfsQuotaPeriod = &cpuCfsQuotaPeriod
	}

	// Set property "CpuManagerPolicy":
	if typedInput.CpuManagerPolicy != nil {
		cpuManagerPolicy := *typedInput.CpuManagerPolicy
		config.CpuManagerPolicy = &cpuManagerPolicy
	}

	// Set property "FailSwapOn":
	if typedInput.FailSwapOn != nil {
		failSwapOn := *typedInput.FailSwapOn
		config.FailSwapOn = &failSwapOn
	}

	// Set property "ImageGcHighThreshold":
	if typedInput.ImageGcHighThreshold != nil {
		imageGcHighThreshold := *typedInput.ImageGcHighThreshold
		config.ImageGcHighThreshold = &imageGcHighThreshold
	}

	// Set property "ImageGcLowThreshold":
	if typedInput.ImageGcLowThreshold != nil {
		imageGcLowThreshold := *typedInput.ImageGcLowThreshold
		config.ImageGcLowThreshold = &imageGcLowThreshold
	}

	// Set property "PodMaxPids":
	if typedInput.PodMaxPids != nil {
		podMaxPids := *typedInput.PodMaxPids
		config.PodMaxPids = &podMaxPids
	}

	// Set property "TopologyManagerPolicy":
	if typedInput.TopologyManagerPolicy != nil {
		topologyManagerPolicy := *typedInput.TopologyManagerPolicy
		config.TopologyManagerPolicy = &topologyManagerPolicy
	}

	// No error
	return nil
}

// AssignProperties_From_KubeletConfig populates our KubeletConfig from the provided source KubeletConfig
func (config *KubeletConfig) AssignProperties_From_KubeletConfig(source *v20231102ps.KubeletConfig) error {

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

	// ContainerLogMaxFiles
	if source.ContainerLogMaxFiles != nil {
		containerLogMaxFile := *source.ContainerLogMaxFiles
		config.ContainerLogMaxFiles = &containerLogMaxFile
	} else {
		config.ContainerLogMaxFiles = nil
	}

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

	// No error
	return nil
}

// AssignProperties_To_KubeletConfig populates the provided destination KubeletConfig from our KubeletConfig
func (config *KubeletConfig) AssignProperties_To_KubeletConfig(destination *v20231102ps.KubeletConfig) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

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

	// ContainerLogMaxFiles
	if config.ContainerLogMaxFiles != nil {
		containerLogMaxFile := *config.ContainerLogMaxFiles
		destination.ContainerLogMaxFiles = &containerLogMaxFile
	} else {
		destination.ContainerLogMaxFiles = nil
	}

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

	// No error
	return nil
}

// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details.
type KubeletConfig_STATUS struct {
	// AllowedUnsafeSysctls: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`).
	AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty"`

	// ContainerLogMaxFiles: The maximum number of container log files that can be present for a container. The number must be
	// ≥ 2.
	ContainerLogMaxFiles *int `json:"containerLogMaxFiles,omitempty"`

	// ContainerLogMaxSizeMB: The maximum size (e.g. 10Mi) of container log file before it is rotated.
	ContainerLogMaxSizeMB *int `json:"containerLogMaxSizeMB,omitempty"`

	// CpuCfsQuota: The default is true.
	CpuCfsQuota *bool `json:"cpuCfsQuota,omitempty"`

	// CpuCfsQuotaPeriod: The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and
	// a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'.
	CpuCfsQuotaPeriod *string `json:"cpuCfsQuotaPeriod,omitempty"`

	// CpuManagerPolicy: The default is 'none'. See [Kubernetes CPU management
	// policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) for more
	// information. Allowed values are 'none' and 'static'.
	CpuManagerPolicy *string `json:"cpuManagerPolicy,omitempty"`

	// FailSwapOn: If set to true it will make the Kubelet fail to start if swap is enabled on the node.
	FailSwapOn *bool `json:"failSwapOn,omitempty"`

	// ImageGcHighThreshold: To disable image garbage collection, set to 100. The default is 85%
	ImageGcHighThreshold *int `json:"imageGcHighThreshold,omitempty"`

	// ImageGcLowThreshold: This cannot be set higher than imageGcHighThreshold. The default is 80%
	ImageGcLowThreshold *int `json:"imageGcLowThreshold,omitempty"`

	// PodMaxPids: The maximum number of processes per pod.
	PodMaxPids *int `json:"podMaxPids,omitempty"`

	// TopologyManagerPolicy: For more information see [Kubernetes Topology
	// Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. Allowed values
	// are 'none', 'best-effort', 'restricted', and 'single-numa-node'.
	TopologyManagerPolicy *string `json:"topologyManagerPolicy,omitempty"`
}

var _ genruntime.FromARMConverter = &KubeletConfig_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (config *KubeletConfig_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &KubeletConfig_STATUS_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (config *KubeletConfig_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(KubeletConfig_STATUS_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected KubeletConfig_STATUS_ARM, got %T", armInput)
	}

	// Set property "AllowedUnsafeSysctls":
	for _, item := range typedInput.AllowedUnsafeSysctls {
		config.AllowedUnsafeSysctls = append(config.AllowedUnsafeSysctls, item)
	}

	// Set property "ContainerLogMaxFiles":
	if typedInput.ContainerLogMaxFiles != nil {
		containerLogMaxFiles := *typedInput.ContainerLogMaxFiles
		config.ContainerLogMaxFiles = &containerLogMaxFiles
	}

	// Set property "ContainerLogMaxSizeMB":
	if typedInput.ContainerLogMaxSizeMB != nil {
		containerLogMaxSizeMB := *typedInput.ContainerLogMaxSizeMB
		config.ContainerLogMaxSizeMB = &containerLogMaxSizeMB
	}

	// Set property "CpuCfsQuota":
	if typedInput.CpuCfsQuota != nil {
		cpuCfsQuota := *typedInput.CpuCfsQuota
		config.CpuCfsQuota = &cpuCfsQuota
	}

	// Set property "CpuCfsQuotaPeriod":
	if typedInput.CpuCfsQuotaPeriod != nil {
		cpuCfsQuotaPeriod := *typedInput.CpuCfsQuotaPeriod
		config.CpuCfsQuotaPeriod = &cpuCfsQuotaPeriod
	}

	// Set property "CpuManagerPolicy":
	if typedInput.CpuManagerPolicy != nil {
		cpuManagerPolicy := *typedInput.CpuManagerPolicy
		config.CpuManagerPolicy = &cpuManagerPolicy
	}

	// Set property "FailSwapOn":
	if typedInput.FailSwapOn != nil {
		failSwapOn := *typedInput.FailSwapOn
		config.FailSwapOn = &failSwapOn
	}

	// Set property "ImageGcHighThreshold":
	if typedInput.ImageGcHighThreshold != nil {
		imageGcHighThreshold := *typedInput.ImageGcHighThreshold
		config.ImageGcHighThreshold = &imageGcHighThreshold
	}

	// Set property "ImageGcLowThreshold":
	if typedInput.ImageGcLowThreshold != nil {
		imageGcLowThreshold := *typedInput.ImageGcLowThreshold
		config.ImageGcLowThreshold = &imageGcLowThreshold
	}

	// Set property "PodMaxPids":
	if typedInput.PodMaxPids != nil {
		podMaxPids := *typedInput.PodMaxPids
		config.PodMaxPids = &podMaxPids
	}

	// Set property "TopologyManagerPolicy":
	if typedInput.TopologyManagerPolicy != nil {
		topologyManagerPolicy := *typedInput.TopologyManagerPolicy
		config.TopologyManagerPolicy = &topologyManagerPolicy
	}

	// No error
	return nil
}

// AssignProperties_From_KubeletConfig_STATUS populates our KubeletConfig_STATUS from the provided source KubeletConfig_STATUS
func (config *KubeletConfig_STATUS) AssignProperties_From_KubeletConfig_STATUS(source *v20231102ps.KubeletConfig_STATUS) error {

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

	// 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 *v20231102ps.KubeletConfig_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

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

	// No error
	return nil
}

// Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.
// +kubebuilder:validation:Enum={"OS","Temporary"}
type KubeletDiskType string

const (
	KubeletDiskType_OS        = KubeletDiskType("OS")
	KubeletDiskType_Temporary = KubeletDiskType("Temporary")
)

// Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.
type KubeletDiskType_STATUS string

const (
	KubeletDiskType_STATUS_OS        = KubeletDiskType_STATUS("OS")
	KubeletDiskType_STATUS_Temporary = KubeletDiskType_STATUS("Temporary")
)

// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details.
type LinuxOSConfig struct {
	// SwapFileSizeMB: The size in MB of a swap file that will be created on each node.
	SwapFileSizeMB *int `json:"swapFileSizeMB,omitempty"`

	// Sysctls: Sysctl settings for Linux agent nodes.
	Sysctls *SysctlConfig `json:"sysctls,omitempty"`

	// TransparentHugePageDefrag: Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is
	// 'madvise'. For more information see [Transparent
	// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).
	TransparentHugePageDefrag *string `json:"transparentHugePageDefrag,omitempty"`

	// TransparentHugePageEnabled: Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more
	// information see [Transparent
	// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).
	TransparentHugePageEnabled *string `json:"transparentHugePageEnabled,omitempty"`
}

var _ genruntime.ARMTransformer = &LinuxOSConfig{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (config *LinuxOSConfig) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if config == nil {
		return nil, nil
	}
	result := &LinuxOSConfig_ARM{}

	// Set property "SwapFileSizeMB":
	if config.SwapFileSizeMB != nil {
		swapFileSizeMB := *config.SwapFileSizeMB
		result.SwapFileSizeMB = &swapFileSizeMB
	}

	// Set property "Sysctls":
	if config.Sysctls != nil {
		sysctls_ARM, err := (*config.Sysctls).ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		sysctls := *sysctls_ARM.(*SysctlConfig_ARM)
		result.Sysctls = &sysctls
	}

	// Set property "TransparentHugePageDefrag":
	if config.TransparentHugePageDefrag != nil {
		transparentHugePageDefrag := *config.TransparentHugePageDefrag
		result.TransparentHugePageDefrag = &transparentHugePageDefrag
	}

	// Set property "TransparentHugePageEnabled":
	if config.TransparentHugePageEnabled != nil {
		transparentHugePageEnabled := *config.TransparentHugePageEnabled
		result.TransparentHugePageEnabled = &transparentHugePageEnabled
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (config *LinuxOSConfig) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &LinuxOSConfig_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (config *LinuxOSConfig) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(LinuxOSConfig_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected LinuxOSConfig_ARM, got %T", armInput)
	}

	// Set property "SwapFileSizeMB":
	if typedInput.SwapFileSizeMB != nil {
		swapFileSizeMB := *typedInput.SwapFileSizeMB
		config.SwapFileSizeMB = &swapFileSizeMB
	}

	// Set property "Sysctls":
	if typedInput.Sysctls != nil {
		var sysctls1 SysctlConfig
		err := sysctls1.PopulateFromARM(owner, *typedInput.Sysctls)
		if err != nil {
			return err
		}
		sysctls := sysctls1
		config.Sysctls = &sysctls
	}

	// Set property "TransparentHugePageDefrag":
	if typedInput.TransparentHugePageDefrag != nil {
		transparentHugePageDefrag := *typedInput.TransparentHugePageDefrag
		config.TransparentHugePageDefrag = &transparentHugePageDefrag
	}

	// Set property "TransparentHugePageEnabled":
	if typedInput.TransparentHugePageEnabled != nil {
		transparentHugePageEnabled := *typedInput.TransparentHugePageEnabled
		config.TransparentHugePageEnabled = &transparentHugePageEnabled
	}

	// No error
	return nil
}

// AssignProperties_From_LinuxOSConfig populates our LinuxOSConfig from the provided source LinuxOSConfig
func (config *LinuxOSConfig) AssignProperties_From_LinuxOSConfig(source *v20231102ps.LinuxOSConfig) error {

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

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

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

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

	// No error
	return nil
}

// AssignProperties_To_LinuxOSConfig populates the provided destination LinuxOSConfig from our LinuxOSConfig
func (config *LinuxOSConfig) AssignProperties_To_LinuxOSConfig(destination *v20231102ps.LinuxOSConfig) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

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

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

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

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

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

	// No error
	return nil
}

// See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details.
type LinuxOSConfig_STATUS struct {
	// SwapFileSizeMB: The size in MB of a swap file that will be created on each node.
	SwapFileSizeMB *int `json:"swapFileSizeMB,omitempty"`

	// Sysctls: Sysctl settings for Linux agent nodes.
	Sysctls *SysctlConfig_STATUS `json:"sysctls,omitempty"`

	// TransparentHugePageDefrag: Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is
	// 'madvise'. For more information see [Transparent
	// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).
	TransparentHugePageDefrag *string `json:"transparentHugePageDefrag,omitempty"`

	// TransparentHugePageEnabled: Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more
	// information see [Transparent
	// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).
	TransparentHugePageEnabled *string `json:"transparentHugePageEnabled,omitempty"`
}

var _ genruntime.FromARMConverter = &LinuxOSConfig_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (config *LinuxOSConfig_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &LinuxOSConfig_STATUS_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (config *LinuxOSConfig_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(LinuxOSConfig_STATUS_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected LinuxOSConfig_STATUS_ARM, got %T", armInput)
	}

	// Set property "SwapFileSizeMB":
	if typedInput.SwapFileSizeMB != nil {
		swapFileSizeMB := *typedInput.SwapFileSizeMB
		config.SwapFileSizeMB = &swapFileSizeMB
	}

	// Set property "Sysctls":
	if typedInput.Sysctls != nil {
		var sysctls1 SysctlConfig_STATUS
		err := sysctls1.PopulateFromARM(owner, *typedInput.Sysctls)
		if err != nil {
			return err
		}
		sysctls := sysctls1
		config.Sysctls = &sysctls
	}

	// Set property "TransparentHugePageDefrag":
	if typedInput.TransparentHugePageDefrag != nil {
		transparentHugePageDefrag := *typedInput.TransparentHugePageDefrag
		config.TransparentHugePageDefrag = &transparentHugePageDefrag
	}

	// Set property "TransparentHugePageEnabled":
	if typedInput.TransparentHugePageEnabled != nil {
		transparentHugePageEnabled := *typedInput.TransparentHugePageEnabled
		config.TransparentHugePageEnabled = &transparentHugePageEnabled
	}

	// No error
	return nil
}

// AssignProperties_From_LinuxOSConfig_STATUS populates our LinuxOSConfig_STATUS from the provided source LinuxOSConfig_STATUS
func (config *LinuxOSConfig_STATUS) AssignProperties_From_LinuxOSConfig_STATUS(source *v20231102ps.LinuxOSConfig_STATUS) error {

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

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

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

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

	// 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 *v20231102ps.LinuxOSConfig_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

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

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

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

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

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

	// No error
	return nil
}

// The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise,
// defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral
// OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os).
// +kubebuilder:validation:Enum={"Ephemeral","Managed"}
type OSDiskType string

const (
	OSDiskType_Ephemeral = OSDiskType("Ephemeral")
	OSDiskType_Managed   = OSDiskType("Managed")
)

// The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise,
// defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral
// OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os).
type OSDiskType_STATUS string

const (
	OSDiskType_STATUS_Ephemeral = OSDiskType_STATUS("Ephemeral")
	OSDiskType_STATUS_Managed   = OSDiskType_STATUS("Managed")
)

// Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if
// OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated.
// +kubebuilder:validation:Enum={"AzureLinux","CBLMariner","Mariner","Ubuntu","Windows2019","Windows2022","WindowsAnnual"}
type OSSKU string

const (
	OSSKU_AzureLinux    = OSSKU("AzureLinux")
	OSSKU_CBLMariner    = OSSKU("CBLMariner")
	OSSKU_Mariner       = OSSKU("Mariner")
	OSSKU_Ubuntu        = OSSKU("Ubuntu")
	OSSKU_Windows2019   = OSSKU("Windows2019")
	OSSKU_Windows2022   = OSSKU("Windows2022")
	OSSKU_WindowsAnnual = OSSKU("WindowsAnnual")
)

// Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if
// OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated.
type OSSKU_STATUS string

const (
	OSSKU_STATUS_AzureLinux    = OSSKU_STATUS("AzureLinux")
	OSSKU_STATUS_CBLMariner    = OSSKU_STATUS("CBLMariner")
	OSSKU_STATUS_Mariner       = OSSKU_STATUS("Mariner")
	OSSKU_STATUS_Ubuntu        = OSSKU_STATUS("Ubuntu")
	OSSKU_STATUS_Windows2019   = OSSKU_STATUS("Windows2019")
	OSSKU_STATUS_Windows2022   = OSSKU_STATUS("Windows2022")
	OSSKU_STATUS_WindowsAnnual = OSSKU_STATUS("WindowsAnnual")
)

// The operating system type. The default is Linux.
// +kubebuilder:validation:Enum={"Linux","Windows"}
type OSType string

const (
	OSType_Linux   = OSType("Linux")
	OSType_Windows = OSType("Windows")
)

// The operating system type. The default is Linux.
type OSType_STATUS string

const (
	OSType_STATUS_Linux   = OSType_STATUS("Linux")
	OSType_STATUS_Windows = OSType_STATUS("Windows")
)

// Describes the Power State of the cluster
type PowerState struct {
	// Code: Tells whether the cluster is Running or Stopped
	Code *PowerState_Code `json:"code,omitempty"`
}

var _ genruntime.ARMTransformer = &PowerState{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (state *PowerState) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if state == nil {
		return nil, nil
	}
	result := &PowerState_ARM{}

	// Set property "Code":
	if state.Code != nil {
		code := *state.Code
		result.Code = &code
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (state *PowerState) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &PowerState_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (state *PowerState) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(PowerState_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected PowerState_ARM, got %T", armInput)
	}

	// Set property "Code":
	if typedInput.Code != nil {
		code := *typedInput.Code
		state.Code = &code
	}

	// No error
	return nil
}

// AssignProperties_From_PowerState populates our PowerState from the provided source PowerState
func (state *PowerState) AssignProperties_From_PowerState(source *v20231102ps.PowerState) error {

	// Code
	if source.Code != nil {
		code := PowerState_Code(*source.Code)
		state.Code = &code
	} else {
		state.Code = nil
	}

	// No error
	return nil
}

// AssignProperties_To_PowerState populates the provided destination PowerState from our PowerState
func (state *PowerState) AssignProperties_To_PowerState(destination *v20231102ps.PowerState) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Code
	if state.Code != nil {
		code := string(*state.Code)
		destination.Code = &code
	} else {
		destination.Code = nil
	}

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

	// No error
	return nil
}

// Describes how VMs are added to or removed from Agent Pools. See [billing
// states](https://docs.microsoft.com/azure/virtual-machines/states-billing).
// +kubebuilder:validation:Enum={"Deallocate","Delete"}
type ScaleDownMode string

const (
	ScaleDownMode_Deallocate = ScaleDownMode("Deallocate")
	ScaleDownMode_Delete     = ScaleDownMode("Delete")
)

// Describes how VMs are added to or removed from Agent Pools. See [billing
// states](https://docs.microsoft.com/azure/virtual-machines/states-billing).
type ScaleDownMode_STATUS string

const (
	ScaleDownMode_STATUS_Deallocate = ScaleDownMode_STATUS("Deallocate")
	ScaleDownMode_STATUS_Delete     = ScaleDownMode_STATUS("Delete")
)

// The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information
// about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms)
// +kubebuilder:validation:Enum={"Deallocate","Delete"}
type ScaleSetEvictionPolicy string

const (
	ScaleSetEvictionPolicy_Deallocate = ScaleSetEvictionPolicy("Deallocate")
	ScaleSetEvictionPolicy_Delete     = ScaleSetEvictionPolicy("Delete")
)

// The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information
// about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms)
type ScaleSetEvictionPolicy_STATUS string

const (
	ScaleSetEvictionPolicy_STATUS_Deallocate = ScaleSetEvictionPolicy_STATUS("Deallocate")
	ScaleSetEvictionPolicy_STATUS_Delete     = ScaleSetEvictionPolicy_STATUS("Delete")
)

// The Virtual Machine Scale Set priority.
// +kubebuilder:validation:Enum={"Regular","Spot"}
type ScaleSetPriority string

const (
	ScaleSetPriority_Regular = ScaleSetPriority("Regular")
	ScaleSetPriority_Spot    = ScaleSetPriority("Spot")
)

// The Virtual Machine Scale Set priority.
type ScaleSetPriority_STATUS string

const (
	ScaleSetPriority_STATUS_Regular = ScaleSetPriority_STATUS("Regular")
	ScaleSetPriority_STATUS_Spot    = ScaleSetPriority_STATUS("Spot")
)

// Current status on a group of nodes of the same vm size.
type VirtualMachineNodes struct {
	// Count: Number of nodes.
	Count *int `json:"count,omitempty"`

	// Size: The VM size of the agents used to host this group of nodes.
	Size *string `json:"size,omitempty"`
}

var _ genruntime.ARMTransformer = &VirtualMachineNodes{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (nodes *VirtualMachineNodes) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if nodes == nil {
		return nil, nil
	}
	result := &VirtualMachineNodes_ARM{}

	// Set property "Count":
	if nodes.Count != nil {
		count := *nodes.Count
		result.Count = &count
	}

	// Set property "Size":
	if nodes.Size != nil {
		size := *nodes.Size
		result.Size = &size
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (nodes *VirtualMachineNodes) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &VirtualMachineNodes_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (nodes *VirtualMachineNodes) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(VirtualMachineNodes_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected VirtualMachineNodes_ARM, got %T", armInput)
	}

	// Set property "Count":
	if typedInput.Count != nil {
		count := *typedInput.Count
		nodes.Count = &count
	}

	// Set property "Size":
	if typedInput.Size != nil {
		size := *typedInput.Size
		nodes.Size = &size
	}

	// No error
	return nil
}

// AssignProperties_From_VirtualMachineNodes populates our VirtualMachineNodes from the provided source VirtualMachineNodes
func (nodes *VirtualMachineNodes) AssignProperties_From_VirtualMachineNodes(source *v20231102ps.VirtualMachineNodes) error {

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

	// Size
	nodes.Size = genruntime.ClonePointerToString(source.Size)

	// No error
	return nil
}

// AssignProperties_To_VirtualMachineNodes populates the provided destination VirtualMachineNodes from our VirtualMachineNodes
func (nodes *VirtualMachineNodes) AssignProperties_To_VirtualMachineNodes(destination *v20231102ps.VirtualMachineNodes) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

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

	// Size
	destination.Size = genruntime.ClonePointerToString(nodes.Size)

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

	// No error
	return nil
}

// Current status on a group of nodes of the same vm size.
type VirtualMachineNodes_STATUS struct {
	// Count: Number of nodes.
	Count *int `json:"count,omitempty"`

	// Size: The VM size of the agents used to host this group of nodes.
	Size *string `json:"size,omitempty"`
}

var _ genruntime.FromARMConverter = &VirtualMachineNodes_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (nodes *VirtualMachineNodes_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &VirtualMachineNodes_STATUS_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (nodes *VirtualMachineNodes_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(VirtualMachineNodes_STATUS_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected VirtualMachineNodes_STATUS_ARM, got %T", armInput)
	}

	// Set property "Count":
	if typedInput.Count != nil {
		count := *typedInput.Count
		nodes.Count = &count
	}

	// Set property "Size":
	if typedInput.Size != nil {
		size := *typedInput.Size
		nodes.Size = &size
	}

	// No error
	return nil
}

// AssignProperties_From_VirtualMachineNodes_STATUS populates our VirtualMachineNodes_STATUS from the provided source VirtualMachineNodes_STATUS
func (nodes *VirtualMachineNodes_STATUS) AssignProperties_From_VirtualMachineNodes_STATUS(source *v20231102ps.VirtualMachineNodes_STATUS) error {

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

	// Size
	nodes.Size = genruntime.ClonePointerToString(source.Size)

	// No error
	return nil
}

// AssignProperties_To_VirtualMachineNodes_STATUS populates the provided destination VirtualMachineNodes_STATUS from our VirtualMachineNodes_STATUS
func (nodes *VirtualMachineNodes_STATUS) AssignProperties_To_VirtualMachineNodes_STATUS(destination *v20231102ps.VirtualMachineNodes_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

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

	// Size
	destination.Size = genruntime.ClonePointerToString(nodes.Size)

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

	// No error
	return nil
}

// Specifications on VirtualMachines agent pool.
type VirtualMachinesProfile struct {
	// Scale: Specifications on how to scale a VirtualMachines agent pool.
	Scale *ScaleProfile `json:"scale,omitempty"`
}

var _ genruntime.ARMTransformer = &VirtualMachinesProfile{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (profile *VirtualMachinesProfile) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if profile == nil {
		return nil, nil
	}
	result := &VirtualMachinesProfile_ARM{}

	// Set property "Scale":
	if profile.Scale != nil {
		scale_ARM, err := (*profile.Scale).ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		scale := *scale_ARM.(*ScaleProfile_ARM)
		result.Scale = &scale
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *VirtualMachinesProfile) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &VirtualMachinesProfile_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *VirtualMachinesProfile) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(VirtualMachinesProfile_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected VirtualMachinesProfile_ARM, got %T", armInput)
	}

	// Set property "Scale":
	if typedInput.Scale != nil {
		var scale1 ScaleProfile
		err := scale1.PopulateFromARM(owner, *typedInput.Scale)
		if err != nil {
			return err
		}
		scale := scale1
		profile.Scale = &scale
	}

	// No error
	return nil
}

// AssignProperties_From_VirtualMachinesProfile populates our VirtualMachinesProfile from the provided source VirtualMachinesProfile
func (profile *VirtualMachinesProfile) AssignProperties_From_VirtualMachinesProfile(source *v20231102ps.VirtualMachinesProfile) error {

	// Scale
	if source.Scale != nil {
		var scale ScaleProfile
		err := scale.AssignProperties_From_ScaleProfile(source.Scale)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_ScaleProfile() to populate field Scale")
		}
		profile.Scale = &scale
	} else {
		profile.Scale = nil
	}

	// No error
	return nil
}

// AssignProperties_To_VirtualMachinesProfile populates the provided destination VirtualMachinesProfile from our VirtualMachinesProfile
func (profile *VirtualMachinesProfile) AssignProperties_To_VirtualMachinesProfile(destination *v20231102ps.VirtualMachinesProfile) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Scale
	if profile.Scale != nil {
		var scale v20231102ps.ScaleProfile
		err := profile.Scale.AssignProperties_To_ScaleProfile(&scale)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_ScaleProfile() to populate field Scale")
		}
		destination.Scale = &scale
	} else {
		destination.Scale = nil
	}

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

	// No error
	return nil
}

// Specifications on VirtualMachines agent pool.
type VirtualMachinesProfile_STATUS struct {
	// Scale: Specifications on how to scale a VirtualMachines agent pool.
	Scale *ScaleProfile_STATUS `json:"scale,omitempty"`
}

var _ genruntime.FromARMConverter = &VirtualMachinesProfile_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *VirtualMachinesProfile_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &VirtualMachinesProfile_STATUS_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *VirtualMachinesProfile_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(VirtualMachinesProfile_STATUS_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected VirtualMachinesProfile_STATUS_ARM, got %T", armInput)
	}

	// Set property "Scale":
	if typedInput.Scale != nil {
		var scale1 ScaleProfile_STATUS
		err := scale1.PopulateFromARM(owner, *typedInput.Scale)
		if err != nil {
			return err
		}
		scale := scale1
		profile.Scale = &scale
	}

	// No error
	return nil
}

// AssignProperties_From_VirtualMachinesProfile_STATUS populates our VirtualMachinesProfile_STATUS from the provided source VirtualMachinesProfile_STATUS
func (profile *VirtualMachinesProfile_STATUS) AssignProperties_From_VirtualMachinesProfile_STATUS(source *v20231102ps.VirtualMachinesProfile_STATUS) error {

	// Scale
	if source.Scale != nil {
		var scale ScaleProfile_STATUS
		err := scale.AssignProperties_From_ScaleProfile_STATUS(source.Scale)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_From_ScaleProfile_STATUS() to populate field Scale")
		}
		profile.Scale = &scale
	} else {
		profile.Scale = nil
	}

	// No error
	return nil
}

// AssignProperties_To_VirtualMachinesProfile_STATUS populates the provided destination VirtualMachinesProfile_STATUS from our VirtualMachinesProfile_STATUS
func (profile *VirtualMachinesProfile_STATUS) AssignProperties_To_VirtualMachinesProfile_STATUS(destination *v20231102ps.VirtualMachinesProfile_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Scale
	if profile.Scale != nil {
		var scale v20231102ps.ScaleProfile_STATUS
		err := profile.Scale.AssignProperties_To_ScaleProfile_STATUS(&scale)
		if err != nil {
			return errors.Wrap(err, "calling AssignProperties_To_ScaleProfile_STATUS() to populate field Scale")
		}
		destination.Scale = &scale
	} else {
		destination.Scale = nil
	}

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

	// No error
	return nil
}

// Determines the type of workload a node can run.
// +kubebuilder:validation:Enum={"KataMshvVmIsolation","OCIContainer","WasmWasi"}
type WorkloadRuntime string

const (
	WorkloadRuntime_KataMshvVmIsolation = WorkloadRuntime("KataMshvVmIsolation")
	WorkloadRuntime_OCIContainer        = WorkloadRuntime("OCIContainer")
	WorkloadRuntime_WasmWasi            = WorkloadRuntime("WasmWasi")
)

// Determines the type of workload a node can run.
type WorkloadRuntime_STATUS string

const (
	WorkloadRuntime_STATUS_KataMshvVmIsolation = WorkloadRuntime_STATUS("KataMshvVmIsolation")
	WorkloadRuntime_STATUS_OCIContainer        = WorkloadRuntime_STATUS("OCIContainer")
	WorkloadRuntime_STATUS_WasmWasi            = WorkloadRuntime_STATUS("WasmWasi")
)

// SSH access method of an agent pool.
// +kubebuilder:validation:Enum={"Disabled","LocalUser"}
type AgentPoolSSHAccess string

const (
	AgentPoolSSHAccess_Disabled  = AgentPoolSSHAccess("Disabled")
	AgentPoolSSHAccess_LocalUser = AgentPoolSSHAccess("LocalUser")
)

// SSH access method of an agent pool.
type AgentPoolSSHAccess_STATUS string

const (
	AgentPoolSSHAccess_STATUS_Disabled  = AgentPoolSSHAccess_STATUS("Disabled")
	AgentPoolSSHAccess_STATUS_LocalUser = AgentPoolSSHAccess_STATUS("LocalUser")
)

// Contains the IPTag associated with the object.
type IPTag struct {
	// IpTagType: The IP tag type. Example: RoutingPreference.
	IpTagType *string `json:"ipTagType,omitempty"`

	// Tag: The value of the IP tag associated with the public IP. Example: Internet.
	Tag *string `json:"tag,omitempty"`
}

var _ genruntime.ARMTransformer = &IPTag{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (ipTag *IPTag) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if ipTag == nil {
		return nil, nil
	}
	result := &IPTag_ARM{}

	// Set property "IpTagType":
	if ipTag.IpTagType != nil {
		ipTagType := *ipTag.IpTagType
		result.IpTagType = &ipTagType
	}

	// Set property "Tag":
	if ipTag.Tag != nil {
		tag := *ipTag.Tag
		result.Tag = &tag
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (ipTag *IPTag) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &IPTag_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (ipTag *IPTag) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(IPTag_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected IPTag_ARM, got %T", armInput)
	}

	// Set property "IpTagType":
	if typedInput.IpTagType != nil {
		ipTagType := *typedInput.IpTagType
		ipTag.IpTagType = &ipTagType
	}

	// Set property "Tag":
	if typedInput.Tag != nil {
		tag := *typedInput.Tag
		ipTag.Tag = &tag
	}

	// No error
	return nil
}

// AssignProperties_From_IPTag populates our IPTag from the provided source IPTag
func (ipTag *IPTag) AssignProperties_From_IPTag(source *v20231102ps.IPTag) error {

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

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

	// No error
	return nil
}

// AssignProperties_To_IPTag populates the provided destination IPTag from our IPTag
func (ipTag *IPTag) AssignProperties_To_IPTag(destination *v20231102ps.IPTag) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

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

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

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

	// No error
	return nil
}

// Contains the IPTag associated with the object.
type IPTag_STATUS struct {
	// IpTagType: The IP tag type. Example: RoutingPreference.
	IpTagType *string `json:"ipTagType,omitempty"`

	// Tag: The value of the IP tag associated with the public IP. Example: Internet.
	Tag *string `json:"tag,omitempty"`
}

var _ genruntime.FromARMConverter = &IPTag_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (ipTag *IPTag_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &IPTag_STATUS_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (ipTag *IPTag_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(IPTag_STATUS_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected IPTag_STATUS_ARM, got %T", armInput)
	}

	// Set property "IpTagType":
	if typedInput.IpTagType != nil {
		ipTagType := *typedInput.IpTagType
		ipTag.IpTagType = &ipTagType
	}

	// Set property "Tag":
	if typedInput.Tag != nil {
		tag := *typedInput.Tag
		ipTag.Tag = &tag
	}

	// No error
	return nil
}

// AssignProperties_From_IPTag_STATUS populates our IPTag_STATUS from the provided source IPTag_STATUS
func (ipTag *IPTag_STATUS) AssignProperties_From_IPTag_STATUS(source *v20231102ps.IPTag_STATUS) error {

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

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

	// No error
	return nil
}

// AssignProperties_To_IPTag_STATUS populates the provided destination IPTag_STATUS from our IPTag_STATUS
func (ipTag *IPTag_STATUS) AssignProperties_To_IPTag_STATUS(destination *v20231102ps.IPTag_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

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

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

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

	// No error
	return nil
}

// The port range.
type PortRange struct {
	// +kubebuilder:validation:Maximum=65535
	// +kubebuilder:validation:Minimum=1
	// PortEnd: The maximum port that is included in the range. It should be ranged from 1 to 65535, and be greater than or
	// equal to portStart.
	PortEnd *int `json:"portEnd,omitempty"`

	// +kubebuilder:validation:Maximum=65535
	// +kubebuilder:validation:Minimum=1
	// PortStart: The minimum port that is included in the range. It should be ranged from 1 to 65535, and be less than or
	// equal to portEnd.
	PortStart *int `json:"portStart,omitempty"`

	// Protocol: The network protocol of the port.
	Protocol *PortRange_Protocol `json:"protocol,omitempty"`
}

var _ genruntime.ARMTransformer = &PortRange{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (portRange *PortRange) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if portRange == nil {
		return nil, nil
	}
	result := &PortRange_ARM{}

	// Set property "PortEnd":
	if portRange.PortEnd != nil {
		portEnd := *portRange.PortEnd
		result.PortEnd = &portEnd
	}

	// Set property "PortStart":
	if portRange.PortStart != nil {
		portStart := *portRange.PortStart
		result.PortStart = &portStart
	}

	// Set property "Protocol":
	if portRange.Protocol != nil {
		protocol := *portRange.Protocol
		result.Protocol = &protocol
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (portRange *PortRange) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &PortRange_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (portRange *PortRange) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(PortRange_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected PortRange_ARM, got %T", armInput)
	}

	// Set property "PortEnd":
	if typedInput.PortEnd != nil {
		portEnd := *typedInput.PortEnd
		portRange.PortEnd = &portEnd
	}

	// Set property "PortStart":
	if typedInput.PortStart != nil {
		portStart := *typedInput.PortStart
		portRange.PortStart = &portStart
	}

	// Set property "Protocol":
	if typedInput.Protocol != nil {
		protocol := *typedInput.Protocol
		portRange.Protocol = &protocol
	}

	// No error
	return nil
}

// AssignProperties_From_PortRange populates our PortRange from the provided source PortRange
func (portRange *PortRange) AssignProperties_From_PortRange(source *v20231102ps.PortRange) error {

	// PortEnd
	if source.PortEnd != nil {
		portEnd := *source.PortEnd
		portRange.PortEnd = &portEnd
	} else {
		portRange.PortEnd = nil
	}

	// PortStart
	if source.PortStart != nil {
		portStart := *source.PortStart
		portRange.PortStart = &portStart
	} else {
		portRange.PortStart = nil
	}

	// Protocol
	if source.Protocol != nil {
		protocol := PortRange_Protocol(*source.Protocol)
		portRange.Protocol = &protocol
	} else {
		portRange.Protocol = nil
	}

	// No error
	return nil
}

// AssignProperties_To_PortRange populates the provided destination PortRange from our PortRange
func (portRange *PortRange) AssignProperties_To_PortRange(destination *v20231102ps.PortRange) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// PortEnd
	if portRange.PortEnd != nil {
		portEnd := *portRange.PortEnd
		destination.PortEnd = &portEnd
	} else {
		destination.PortEnd = nil
	}

	// PortStart
	if portRange.PortStart != nil {
		portStart := *portRange.PortStart
		destination.PortStart = &portStart
	} else {
		destination.PortStart = nil
	}

	// Protocol
	if portRange.Protocol != nil {
		protocol := string(*portRange.Protocol)
		destination.Protocol = &protocol
	} else {
		destination.Protocol = nil
	}

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

	// No error
	return nil
}

// The port range.
type PortRange_STATUS struct {
	// PortEnd: The maximum port that is included in the range. It should be ranged from 1 to 65535, and be greater than or
	// equal to portStart.
	PortEnd *int `json:"portEnd,omitempty"`

	// PortStart: The minimum port that is included in the range. It should be ranged from 1 to 65535, and be less than or
	// equal to portEnd.
	PortStart *int `json:"portStart,omitempty"`

	// Protocol: The network protocol of the port.
	Protocol *PortRange_Protocol_STATUS `json:"protocol,omitempty"`
}

var _ genruntime.FromARMConverter = &PortRange_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (portRange *PortRange_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &PortRange_STATUS_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (portRange *PortRange_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(PortRange_STATUS_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected PortRange_STATUS_ARM, got %T", armInput)
	}

	// Set property "PortEnd":
	if typedInput.PortEnd != nil {
		portEnd := *typedInput.PortEnd
		portRange.PortEnd = &portEnd
	}

	// Set property "PortStart":
	if typedInput.PortStart != nil {
		portStart := *typedInput.PortStart
		portRange.PortStart = &portStart
	}

	// Set property "Protocol":
	if typedInput.Protocol != nil {
		protocol := *typedInput.Protocol
		portRange.Protocol = &protocol
	}

	// No error
	return nil
}

// AssignProperties_From_PortRange_STATUS populates our PortRange_STATUS from the provided source PortRange_STATUS
func (portRange *PortRange_STATUS) AssignProperties_From_PortRange_STATUS(source *v20231102ps.PortRange_STATUS) error {

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

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

	// Protocol
	if source.Protocol != nil {
		protocol := PortRange_Protocol_STATUS(*source.Protocol)
		portRange.Protocol = &protocol
	} else {
		portRange.Protocol = nil
	}

	// No error
	return nil
}

// AssignProperties_To_PortRange_STATUS populates the provided destination PortRange_STATUS from our PortRange_STATUS
func (portRange *PortRange_STATUS) AssignProperties_To_PortRange_STATUS(destination *v20231102ps.PortRange_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

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

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

	// Protocol
	if portRange.Protocol != nil {
		protocol := string(*portRange.Protocol)
		destination.Protocol = &protocol
	} else {
		destination.Protocol = nil
	}

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

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"Running","Stopped"}
type PowerState_Code string

const (
	PowerState_Code_Running = PowerState_Code("Running")
	PowerState_Code_Stopped = PowerState_Code("Stopped")
)

// Specifications on how to scale a VirtualMachines agent pool.
type ScaleProfile struct {
	// Manual: Specifications on how to scale the VirtualMachines agent pool to a fixed size.
	Manual []ManualScaleProfile `json:"manual,omitempty"`
}

var _ genruntime.ARMTransformer = &ScaleProfile{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (profile *ScaleProfile) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if profile == nil {
		return nil, nil
	}
	result := &ScaleProfile_ARM{}

	// Set property "Manual":
	for _, item := range profile.Manual {
		item_ARM, err := item.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		result.Manual = append(result.Manual, *item_ARM.(*ManualScaleProfile_ARM))
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *ScaleProfile) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &ScaleProfile_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *ScaleProfile) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(ScaleProfile_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ScaleProfile_ARM, got %T", armInput)
	}

	// Set property "Manual":
	for _, item := range typedInput.Manual {
		var item1 ManualScaleProfile
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		profile.Manual = append(profile.Manual, item1)
	}

	// No error
	return nil
}

// AssignProperties_From_ScaleProfile populates our ScaleProfile from the provided source ScaleProfile
func (profile *ScaleProfile) AssignProperties_From_ScaleProfile(source *v20231102ps.ScaleProfile) error {

	// Manual
	if source.Manual != nil {
		manualList := make([]ManualScaleProfile, len(source.Manual))
		for manualIndex, manualItem := range source.Manual {
			// Shadow the loop variable to avoid aliasing
			manualItem := manualItem
			var manual ManualScaleProfile
			err := manual.AssignProperties_From_ManualScaleProfile(&manualItem)
			if err != nil {
				return errors.Wrap(err, "calling AssignProperties_From_ManualScaleProfile() to populate field Manual")
			}
			manualList[manualIndex] = manual
		}
		profile.Manual = manualList
	} else {
		profile.Manual = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ScaleProfile populates the provided destination ScaleProfile from our ScaleProfile
func (profile *ScaleProfile) AssignProperties_To_ScaleProfile(destination *v20231102ps.ScaleProfile) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Manual
	if profile.Manual != nil {
		manualList := make([]v20231102ps.ManualScaleProfile, len(profile.Manual))
		for manualIndex, manualItem := range profile.Manual {
			// Shadow the loop variable to avoid aliasing
			manualItem := manualItem
			var manual v20231102ps.ManualScaleProfile
			err := manualItem.AssignProperties_To_ManualScaleProfile(&manual)
			if err != nil {
				return errors.Wrap(err, "calling AssignProperties_To_ManualScaleProfile() to populate field Manual")
			}
			manualList[manualIndex] = manual
		}
		destination.Manual = manualList
	} else {
		destination.Manual = nil
	}

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

	// No error
	return nil
}

// Specifications on how to scale a VirtualMachines agent pool.
type ScaleProfile_STATUS struct {
	// Manual: Specifications on how to scale the VirtualMachines agent pool to a fixed size.
	Manual []ManualScaleProfile_STATUS `json:"manual,omitempty"`
}

var _ genruntime.FromARMConverter = &ScaleProfile_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *ScaleProfile_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &ScaleProfile_STATUS_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *ScaleProfile_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(ScaleProfile_STATUS_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ScaleProfile_STATUS_ARM, got %T", armInput)
	}

	// Set property "Manual":
	for _, item := range typedInput.Manual {
		var item1 ManualScaleProfile_STATUS
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		profile.Manual = append(profile.Manual, item1)
	}

	// No error
	return nil
}

// AssignProperties_From_ScaleProfile_STATUS populates our ScaleProfile_STATUS from the provided source ScaleProfile_STATUS
func (profile *ScaleProfile_STATUS) AssignProperties_From_ScaleProfile_STATUS(source *v20231102ps.ScaleProfile_STATUS) error {

	// Manual
	if source.Manual != nil {
		manualList := make([]ManualScaleProfile_STATUS, len(source.Manual))
		for manualIndex, manualItem := range source.Manual {
			// Shadow the loop variable to avoid aliasing
			manualItem := manualItem
			var manual ManualScaleProfile_STATUS
			err := manual.AssignProperties_From_ManualScaleProfile_STATUS(&manualItem)
			if err != nil {
				return errors.Wrap(err, "calling AssignProperties_From_ManualScaleProfile_STATUS() to populate field Manual")
			}
			manualList[manualIndex] = manual
		}
		profile.Manual = manualList
	} else {
		profile.Manual = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ScaleProfile_STATUS populates the provided destination ScaleProfile_STATUS from our ScaleProfile_STATUS
func (profile *ScaleProfile_STATUS) AssignProperties_To_ScaleProfile_STATUS(destination *v20231102ps.ScaleProfile_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Manual
	if profile.Manual != nil {
		manualList := make([]v20231102ps.ManualScaleProfile_STATUS, len(profile.Manual))
		for manualIndex, manualItem := range profile.Manual {
			// Shadow the loop variable to avoid aliasing
			manualItem := manualItem
			var manual v20231102ps.ManualScaleProfile_STATUS
			err := manualItem.AssignProperties_To_ManualScaleProfile_STATUS(&manual)
			if err != nil {
				return errors.Wrap(err, "calling AssignProperties_To_ManualScaleProfile_STATUS() to populate field Manual")
			}
			manualList[manualIndex] = manual
		}
		destination.Manual = manualList
	} else {
		destination.Manual = nil
	}

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

	// No error
	return nil
}

// Sysctl settings for Linux agent nodes.
type SysctlConfig struct {
	// FsAioMaxNr: Sysctl setting fs.aio-max-nr.
	FsAioMaxNr *int `json:"fsAioMaxNr,omitempty"`

	// FsFileMax: Sysctl setting fs.file-max.
	FsFileMax *int `json:"fsFileMax,omitempty"`

	// FsInotifyMaxUserWatches: Sysctl setting fs.inotify.max_user_watches.
	FsInotifyMaxUserWatches *int `json:"fsInotifyMaxUserWatches,omitempty"`

	// FsNrOpen: Sysctl setting fs.nr_open.
	FsNrOpen *int `json:"fsNrOpen,omitempty"`

	// KernelThreadsMax: Sysctl setting kernel.threads-max.
	KernelThreadsMax *int `json:"kernelThreadsMax,omitempty"`

	// NetCoreNetdevMaxBacklog: Sysctl setting net.core.netdev_max_backlog.
	NetCoreNetdevMaxBacklog *int `json:"netCoreNetdevMaxBacklog,omitempty"`

	// NetCoreOptmemMax: Sysctl setting net.core.optmem_max.
	NetCoreOptmemMax *int `json:"netCoreOptmemMax,omitempty"`

	// NetCoreRmemDefault: Sysctl setting net.core.rmem_default.
	NetCoreRmemDefault *int `json:"netCoreRmemDefault,omitempty"`

	// NetCoreRmemMax: Sysctl setting net.core.rmem_max.
	NetCoreRmemMax *int `json:"netCoreRmemMax,omitempty"`

	// NetCoreSomaxconn: Sysctl setting net.core.somaxconn.
	NetCoreSomaxconn *int `json:"netCoreSomaxconn,omitempty"`

	// NetCoreWmemDefault: Sysctl setting net.core.wmem_default.
	NetCoreWmemDefault *int `json:"netCoreWmemDefault,omitempty"`

	// NetCoreWmemMax: Sysctl setting net.core.wmem_max.
	NetCoreWmemMax *int `json:"netCoreWmemMax,omitempty"`

	// NetIpv4IpLocalPortRange: Sysctl setting net.ipv4.ip_local_port_range.
	NetIpv4IpLocalPortRange *string `json:"netIpv4IpLocalPortRange,omitempty"`

	// NetIpv4NeighDefaultGcThresh1: Sysctl setting net.ipv4.neigh.default.gc_thresh1.
	NetIpv4NeighDefaultGcThresh1 *int `json:"netIpv4NeighDefaultGcThresh1,omitempty"`

	// NetIpv4NeighDefaultGcThresh2: Sysctl setting net.ipv4.neigh.default.gc_thresh2.
	NetIpv4NeighDefaultGcThresh2 *int `json:"netIpv4NeighDefaultGcThresh2,omitempty"`

	// NetIpv4NeighDefaultGcThresh3: Sysctl setting net.ipv4.neigh.default.gc_thresh3.
	NetIpv4NeighDefaultGcThresh3 *int `json:"netIpv4NeighDefaultGcThresh3,omitempty"`

	// NetIpv4TcpFinTimeout: Sysctl setting net.ipv4.tcp_fin_timeout.
	NetIpv4TcpFinTimeout *int `json:"netIpv4TcpFinTimeout,omitempty"`

	// NetIpv4TcpKeepaliveProbes: Sysctl setting net.ipv4.tcp_keepalive_probes.
	NetIpv4TcpKeepaliveProbes *int `json:"netIpv4TcpKeepaliveProbes,omitempty"`

	// NetIpv4TcpKeepaliveTime: Sysctl setting net.ipv4.tcp_keepalive_time.
	NetIpv4TcpKeepaliveTime *int `json:"netIpv4TcpKeepaliveTime,omitempty"`

	// NetIpv4TcpMaxSynBacklog: Sysctl setting net.ipv4.tcp_max_syn_backlog.
	NetIpv4TcpMaxSynBacklog *int `json:"netIpv4TcpMaxSynBacklog,omitempty"`

	// NetIpv4TcpMaxTwBuckets: Sysctl setting net.ipv4.tcp_max_tw_buckets.
	NetIpv4TcpMaxTwBuckets *int `json:"netIpv4TcpMaxTwBuckets,omitempty"`

	// NetIpv4TcpTwReuse: Sysctl setting net.ipv4.tcp_tw_reuse.
	NetIpv4TcpTwReuse *bool `json:"netIpv4TcpTwReuse,omitempty"`

	// +kubebuilder:validation:Maximum=90
	// +kubebuilder:validation:Minimum=10
	// NetIpv4TcpkeepaliveIntvl: Sysctl setting net.ipv4.tcp_keepalive_intvl.
	NetIpv4TcpkeepaliveIntvl *int `json:"netIpv4TcpkeepaliveIntvl,omitempty"`

	// +kubebuilder:validation:Maximum=524288
	// +kubebuilder:validation:Minimum=65536
	// NetNetfilterNfConntrackBuckets: Sysctl setting net.netfilter.nf_conntrack_buckets.
	NetNetfilterNfConntrackBuckets *int `json:"netNetfilterNfConntrackBuckets,omitempty"`

	// +kubebuilder:validation:Maximum=2097152
	// +kubebuilder:validation:Minimum=131072
	// NetNetfilterNfConntrackMax: Sysctl setting net.netfilter.nf_conntrack_max.
	NetNetfilterNfConntrackMax *int `json:"netNetfilterNfConntrackMax,omitempty"`

	// VmMaxMapCount: Sysctl setting vm.max_map_count.
	VmMaxMapCount *int `json:"vmMaxMapCount,omitempty"`

	// VmSwappiness: Sysctl setting vm.swappiness.
	VmSwappiness *int `json:"vmSwappiness,omitempty"`

	// VmVfsCachePressure: Sysctl setting vm.vfs_cache_pressure.
	VmVfsCachePressure *int `json:"vmVfsCachePressure,omitempty"`
}

var _ genruntime.ARMTransformer = &SysctlConfig{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (config *SysctlConfig) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if config == nil {
		return nil, nil
	}
	result := &SysctlConfig_ARM{}

	// Set property "FsAioMaxNr":
	if config.FsAioMaxNr != nil {
		fsAioMaxNr := *config.FsAioMaxNr
		result.FsAioMaxNr = &fsAioMaxNr
	}

	// Set property "FsFileMax":
	if config.FsFileMax != nil {
		fsFileMax := *config.FsFileMax
		result.FsFileMax = &fsFileMax
	}

	// Set property "FsInotifyMaxUserWatches":
	if config.FsInotifyMaxUserWatches != nil {
		fsInotifyMaxUserWatches := *config.FsInotifyMaxUserWatches
		result.FsInotifyMaxUserWatches = &fsInotifyMaxUserWatches
	}

	// Set property "FsNrOpen":
	if config.FsNrOpen != nil {
		fsNrOpen := *config.FsNrOpen
		result.FsNrOpen = &fsNrOpen
	}

	// Set property "KernelThreadsMax":
	if config.KernelThreadsMax != nil {
		kernelThreadsMax := *config.KernelThreadsMax
		result.KernelThreadsMax = &kernelThreadsMax
	}

	// Set property "NetCoreNetdevMaxBacklog":
	if config.NetCoreNetdevMaxBacklog != nil {
		netCoreNetdevMaxBacklog := *config.NetCoreNetdevMaxBacklog
		result.NetCoreNetdevMaxBacklog = &netCoreNetdevMaxBacklog
	}

	// Set property "NetCoreOptmemMax":
	if config.NetCoreOptmemMax != nil {
		netCoreOptmemMax := *config.NetCoreOptmemMax
		result.NetCoreOptmemMax = &netCoreOptmemMax
	}

	// Set property "NetCoreRmemDefault":
	if config.NetCoreRmemDefault != nil {
		netCoreRmemDefault := *config.NetCoreRmemDefault
		result.NetCoreRmemDefault = &netCoreRmemDefault
	}

	// Set property "NetCoreRmemMax":
	if config.NetCoreRmemMax != nil {
		netCoreRmemMax := *config.NetCoreRmemMax
		result.NetCoreRmemMax = &netCoreRmemMax
	}

	// Set property "NetCoreSomaxconn":
	if config.NetCoreSomaxconn != nil {
		netCoreSomaxconn := *config.NetCoreSomaxconn
		result.NetCoreSomaxconn = &netCoreSomaxconn
	}

	// Set property "NetCoreWmemDefault":
	if config.NetCoreWmemDefault != nil {
		netCoreWmemDefault := *config.NetCoreWmemDefault
		result.NetCoreWmemDefault = &netCoreWmemDefault
	}

	// Set property "NetCoreWmemMax":
	if config.NetCoreWmemMax != nil {
		netCoreWmemMax := *config.NetCoreWmemMax
		result.NetCoreWmemMax = &netCoreWmemMax
	}

	// Set property "NetIpv4IpLocalPortRange":
	if config.NetIpv4IpLocalPortRange != nil {
		netIpv4IpLocalPortRange := *config.NetIpv4IpLocalPortRange
		result.NetIpv4IpLocalPortRange = &netIpv4IpLocalPortRange
	}

	// Set property "NetIpv4NeighDefaultGcThresh1":
	if config.NetIpv4NeighDefaultGcThresh1 != nil {
		netIpv4NeighDefaultGcThresh1 := *config.NetIpv4NeighDefaultGcThresh1
		result.NetIpv4NeighDefaultGcThresh1 = &netIpv4NeighDefaultGcThresh1
	}

	// Set property "NetIpv4NeighDefaultGcThresh2":
	if config.NetIpv4NeighDefaultGcThresh2 != nil {
		netIpv4NeighDefaultGcThresh2 := *config.NetIpv4NeighDefaultGcThresh2
		result.NetIpv4NeighDefaultGcThresh2 = &netIpv4NeighDefaultGcThresh2
	}

	// Set property "NetIpv4NeighDefaultGcThresh3":
	if config.NetIpv4NeighDefaultGcThresh3 != nil {
		netIpv4NeighDefaultGcThresh3 := *config.NetIpv4NeighDefaultGcThresh3
		result.NetIpv4NeighDefaultGcThresh3 = &netIpv4NeighDefaultGcThresh3
	}

	// Set property "NetIpv4TcpFinTimeout":
	if config.NetIpv4TcpFinTimeout != nil {
		netIpv4TcpFinTimeout := *config.NetIpv4TcpFinTimeout
		result.NetIpv4TcpFinTimeout = &netIpv4TcpFinTimeout
	}

	// Set property "NetIpv4TcpKeepaliveProbes":
	if config.NetIpv4TcpKeepaliveProbes != nil {
		netIpv4TcpKeepaliveProbes := *config.NetIpv4TcpKeepaliveProbes
		result.NetIpv4TcpKeepaliveProbes = &netIpv4TcpKeepaliveProbes
	}

	// Set property "NetIpv4TcpKeepaliveTime":
	if config.NetIpv4TcpKeepaliveTime != nil {
		netIpv4TcpKeepaliveTime := *config.NetIpv4TcpKeepaliveTime
		result.NetIpv4TcpKeepaliveTime = &netIpv4TcpKeepaliveTime
	}

	// Set property "NetIpv4TcpMaxSynBacklog":
	if config.NetIpv4TcpMaxSynBacklog != nil {
		netIpv4TcpMaxSynBacklog := *config.NetIpv4TcpMaxSynBacklog
		result.NetIpv4TcpMaxSynBacklog = &netIpv4TcpMaxSynBacklog
	}

	// Set property "NetIpv4TcpMaxTwBuckets":
	if config.NetIpv4TcpMaxTwBuckets != nil {
		netIpv4TcpMaxTwBuckets := *config.NetIpv4TcpMaxTwBuckets
		result.NetIpv4TcpMaxTwBuckets = &netIpv4TcpMaxTwBuckets
	}

	// Set property "NetIpv4TcpTwReuse":
	if config.NetIpv4TcpTwReuse != nil {
		netIpv4TcpTwReuse := *config.NetIpv4TcpTwReuse
		result.NetIpv4TcpTwReuse = &netIpv4TcpTwReuse
	}

	// Set property "NetIpv4TcpkeepaliveIntvl":
	if config.NetIpv4TcpkeepaliveIntvl != nil {
		netIpv4TcpkeepaliveIntvl := *config.NetIpv4TcpkeepaliveIntvl
		result.NetIpv4TcpkeepaliveIntvl = &netIpv4TcpkeepaliveIntvl
	}

	// Set property "NetNetfilterNfConntrackBuckets":
	if config.NetNetfilterNfConntrackBuckets != nil {
		netNetfilterNfConntrackBuckets := *config.NetNetfilterNfConntrackBuckets
		result.NetNetfilterNfConntrackBuckets = &netNetfilterNfConntrackBuckets
	}

	// Set property "NetNetfilterNfConntrackMax":
	if config.NetNetfilterNfConntrackMax != nil {
		netNetfilterNfConntrackMax := *config.NetNetfilterNfConntrackMax
		result.NetNetfilterNfConntrackMax = &netNetfilterNfConntrackMax
	}

	// Set property "VmMaxMapCount":
	if config.VmMaxMapCount != nil {
		vmMaxMapCount := *config.VmMaxMapCount
		result.VmMaxMapCount = &vmMaxMapCount
	}

	// Set property "VmSwappiness":
	if config.VmSwappiness != nil {
		vmSwappiness := *config.VmSwappiness
		result.VmSwappiness = &vmSwappiness
	}

	// Set property "VmVfsCachePressure":
	if config.VmVfsCachePressure != nil {
		vmVfsCachePressure := *config.VmVfsCachePressure
		result.VmVfsCachePressure = &vmVfsCachePressure
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (config *SysctlConfig) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &SysctlConfig_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (config *SysctlConfig) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(SysctlConfig_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected SysctlConfig_ARM, got %T", armInput)
	}

	// Set property "FsAioMaxNr":
	if typedInput.FsAioMaxNr != nil {
		fsAioMaxNr := *typedInput.FsAioMaxNr
		config.FsAioMaxNr = &fsAioMaxNr
	}

	// Set property "FsFileMax":
	if typedInput.FsFileMax != nil {
		fsFileMax := *typedInput.FsFileMax
		config.FsFileMax = &fsFileMax
	}

	// Set property "FsInotifyMaxUserWatches":
	if typedInput.FsInotifyMaxUserWatches != nil {
		fsInotifyMaxUserWatches := *typedInput.FsInotifyMaxUserWatches
		config.FsInotifyMaxUserWatches = &fsInotifyMaxUserWatches
	}

	// Set property "FsNrOpen":
	if typedInput.FsNrOpen != nil {
		fsNrOpen := *typedInput.FsNrOpen
		config.FsNrOpen = &fsNrOpen
	}

	// Set property "KernelThreadsMax":
	if typedInput.KernelThreadsMax != nil {
		kernelThreadsMax := *typedInput.KernelThreadsMax
		config.KernelThreadsMax = &kernelThreadsMax
	}

	// Set property "NetCoreNetdevMaxBacklog":
	if typedInput.NetCoreNetdevMaxBacklog != nil {
		netCoreNetdevMaxBacklog := *typedInput.NetCoreNetdevMaxBacklog
		config.NetCoreNetdevMaxBacklog = &netCoreNetdevMaxBacklog
	}

	// Set property "NetCoreOptmemMax":
	if typedInput.NetCoreOptmemMax != nil {
		netCoreOptmemMax := *typedInput.NetCoreOptmemMax
		config.NetCoreOptmemMax = &netCoreOptmemMax
	}

	// Set property "NetCoreRmemDefault":
	if typedInput.NetCoreRmemDefault != nil {
		netCoreRmemDefault := *typedInput.NetCoreRmemDefault
		config.NetCoreRmemDefault = &netCoreRmemDefault
	}

	// Set property "NetCoreRmemMax":
	if typedInput.NetCoreRmemMax != nil {
		netCoreRmemMax := *typedInput.NetCoreRmemMax
		config.NetCoreRmemMax = &netCoreRmemMax
	}

	// Set property "NetCoreSomaxconn":
	if typedInput.NetCoreSomaxconn != nil {
		netCoreSomaxconn := *typedInput.NetCoreSomaxconn
		config.NetCoreSomaxconn = &netCoreSomaxconn
	}

	// Set property "NetCoreWmemDefault":
	if typedInput.NetCoreWmemDefault != nil {
		netCoreWmemDefault := *typedInput.NetCoreWmemDefault
		config.NetCoreWmemDefault = &netCoreWmemDefault
	}

	// Set property "NetCoreWmemMax":
	if typedInput.NetCoreWmemMax != nil {
		netCoreWmemMax := *typedInput.NetCoreWmemMax
		config.NetCoreWmemMax = &netCoreWmemMax
	}

	// Set property "NetIpv4IpLocalPortRange":
	if typedInput.NetIpv4IpLocalPortRange != nil {
		netIpv4IpLocalPortRange := *typedInput.NetIpv4IpLocalPortRange
		config.NetIpv4IpLocalPortRange = &netIpv4IpLocalPortRange
	}

	// Set property "NetIpv4NeighDefaultGcThresh1":
	if typedInput.NetIpv4NeighDefaultGcThresh1 != nil {
		netIpv4NeighDefaultGcThresh1 := *typedInput.NetIpv4NeighDefaultGcThresh1
		config.NetIpv4NeighDefaultGcThresh1 = &netIpv4NeighDefaultGcThresh1
	}

	// Set property "NetIpv4NeighDefaultGcThresh2":
	if typedInput.NetIpv4NeighDefaultGcThresh2 != nil {
		netIpv4NeighDefaultGcThresh2 := *typedInput.NetIpv4NeighDefaultGcThresh2
		config.NetIpv4NeighDefaultGcThresh2 = &netIpv4NeighDefaultGcThresh2
	}

	// Set property "NetIpv4NeighDefaultGcThresh3":
	if typedInput.NetIpv4NeighDefaultGcThresh3 != nil {
		netIpv4NeighDefaultGcThresh3 := *typedInput.NetIpv4NeighDefaultGcThresh3
		config.NetIpv4NeighDefaultGcThresh3 = &netIpv4NeighDefaultGcThresh3
	}

	// Set property "NetIpv4TcpFinTimeout":
	if typedInput.NetIpv4TcpFinTimeout != nil {
		netIpv4TcpFinTimeout := *typedInput.NetIpv4TcpFinTimeout
		config.NetIpv4TcpFinTimeout = &netIpv4TcpFinTimeout
	}

	// Set property "NetIpv4TcpKeepaliveProbes":
	if typedInput.NetIpv4TcpKeepaliveProbes != nil {
		netIpv4TcpKeepaliveProbes := *typedInput.NetIpv4TcpKeepaliveProbes
		config.NetIpv4TcpKeepaliveProbes = &netIpv4TcpKeepaliveProbes
	}

	// Set property "NetIpv4TcpKeepaliveTime":
	if typedInput.NetIpv4TcpKeepaliveTime != nil {
		netIpv4TcpKeepaliveTime := *typedInput.NetIpv4TcpKeepaliveTime
		config.NetIpv4TcpKeepaliveTime = &netIpv4TcpKeepaliveTime
	}

	// Set property "NetIpv4TcpMaxSynBacklog":
	if typedInput.NetIpv4TcpMaxSynBacklog != nil {
		netIpv4TcpMaxSynBacklog := *typedInput.NetIpv4TcpMaxSynBacklog
		config.NetIpv4TcpMaxSynBacklog = &netIpv4TcpMaxSynBacklog
	}

	// Set property "NetIpv4TcpMaxTwBuckets":
	if typedInput.NetIpv4TcpMaxTwBuckets != nil {
		netIpv4TcpMaxTwBuckets := *typedInput.NetIpv4TcpMaxTwBuckets
		config.NetIpv4TcpMaxTwBuckets = &netIpv4TcpMaxTwBuckets
	}

	// Set property "NetIpv4TcpTwReuse":
	if typedInput.NetIpv4TcpTwReuse != nil {
		netIpv4TcpTwReuse := *typedInput.NetIpv4TcpTwReuse
		config.NetIpv4TcpTwReuse = &netIpv4TcpTwReuse
	}

	// Set property "NetIpv4TcpkeepaliveIntvl":
	if typedInput.NetIpv4TcpkeepaliveIntvl != nil {
		netIpv4TcpkeepaliveIntvl := *typedInput.NetIpv4TcpkeepaliveIntvl
		config.NetIpv4TcpkeepaliveIntvl = &netIpv4TcpkeepaliveIntvl
	}

	// Set property "NetNetfilterNfConntrackBuckets":
	if typedInput.NetNetfilterNfConntrackBuckets != nil {
		netNetfilterNfConntrackBuckets := *typedInput.NetNetfilterNfConntrackBuckets
		config.NetNetfilterNfConntrackBuckets = &netNetfilterNfConntrackBuckets
	}

	// Set property "NetNetfilterNfConntrackMax":
	if typedInput.NetNetfilterNfConntrackMax != nil {
		netNetfilterNfConntrackMax := *typedInput.NetNetfilterNfConntrackMax
		config.NetNetfilterNfConntrackMax = &netNetfilterNfConntrackMax
	}

	// Set property "VmMaxMapCount":
	if typedInput.VmMaxMapCount != nil {
		vmMaxMapCount := *typedInput.VmMaxMapCount
		config.VmMaxMapCount = &vmMaxMapCount
	}

	// Set property "VmSwappiness":
	if typedInput.VmSwappiness != nil {
		vmSwappiness := *typedInput.VmSwappiness
		config.VmSwappiness = &vmSwappiness
	}

	// Set property "VmVfsCachePressure":
	if typedInput.VmVfsCachePressure != nil {
		vmVfsCachePressure := *typedInput.VmVfsCachePressure
		config.VmVfsCachePressure = &vmVfsCachePressure
	}

	// No error
	return nil
}

// AssignProperties_From_SysctlConfig populates our SysctlConfig from the provided source SysctlConfig
func (config *SysctlConfig) AssignProperties_From_SysctlConfig(source *v20231102ps.SysctlConfig) error {

	// 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
	if source.NetIpv4TcpkeepaliveIntvl != nil {
		netIpv4TcpkeepaliveIntvl := *source.NetIpv4TcpkeepaliveIntvl
		config.NetIpv4TcpkeepaliveIntvl = &netIpv4TcpkeepaliveIntvl
	} else {
		config.NetIpv4TcpkeepaliveIntvl = nil
	}

	// NetNetfilterNfConntrackBuckets
	if source.NetNetfilterNfConntrackBuckets != nil {
		netNetfilterNfConntrackBucket := *source.NetNetfilterNfConntrackBuckets
		config.NetNetfilterNfConntrackBuckets = &netNetfilterNfConntrackBucket
	} else {
		config.NetNetfilterNfConntrackBuckets = nil
	}

	// NetNetfilterNfConntrackMax
	if source.NetNetfilterNfConntrackMax != nil {
		netNetfilterNfConntrackMax := *source.NetNetfilterNfConntrackMax
		config.NetNetfilterNfConntrackMax = &netNetfilterNfConntrackMax
	} else {
		config.NetNetfilterNfConntrackMax = nil
	}

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

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

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

	// No error
	return nil
}

// AssignProperties_To_SysctlConfig populates the provided destination SysctlConfig from our SysctlConfig
func (config *SysctlConfig) AssignProperties_To_SysctlConfig(destination *v20231102ps.SysctlConfig) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// 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
	if config.NetIpv4TcpkeepaliveIntvl != nil {
		netIpv4TcpkeepaliveIntvl := *config.NetIpv4TcpkeepaliveIntvl
		destination.NetIpv4TcpkeepaliveIntvl = &netIpv4TcpkeepaliveIntvl
	} else {
		destination.NetIpv4TcpkeepaliveIntvl = nil
	}

	// NetNetfilterNfConntrackBuckets
	if config.NetNetfilterNfConntrackBuckets != nil {
		netNetfilterNfConntrackBucket := *config.NetNetfilterNfConntrackBuckets
		destination.NetNetfilterNfConntrackBuckets = &netNetfilterNfConntrackBucket
	} else {
		destination.NetNetfilterNfConntrackBuckets = nil
	}

	// NetNetfilterNfConntrackMax
	if config.NetNetfilterNfConntrackMax != nil {
		netNetfilterNfConntrackMax := *config.NetNetfilterNfConntrackMax
		destination.NetNetfilterNfConntrackMax = &netNetfilterNfConntrackMax
	} else {
		destination.NetNetfilterNfConntrackMax = nil
	}

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

	// No error
	return nil
}

// Sysctl settings for Linux agent nodes.
type SysctlConfig_STATUS struct {
	// FsAioMaxNr: Sysctl setting fs.aio-max-nr.
	FsAioMaxNr *int `json:"fsAioMaxNr,omitempty"`

	// FsFileMax: Sysctl setting fs.file-max.
	FsFileMax *int `json:"fsFileMax,omitempty"`

	// FsInotifyMaxUserWatches: Sysctl setting fs.inotify.max_user_watches.
	FsInotifyMaxUserWatches *int `json:"fsInotifyMaxUserWatches,omitempty"`

	// FsNrOpen: Sysctl setting fs.nr_open.
	FsNrOpen *int `json:"fsNrOpen,omitempty"`

	// KernelThreadsMax: Sysctl setting kernel.threads-max.
	KernelThreadsMax *int `json:"kernelThreadsMax,omitempty"`

	// NetCoreNetdevMaxBacklog: Sysctl setting net.core.netdev_max_backlog.
	NetCoreNetdevMaxBacklog *int `json:"netCoreNetdevMaxBacklog,omitempty"`

	// NetCoreOptmemMax: Sysctl setting net.core.optmem_max.
	NetCoreOptmemMax *int `json:"netCoreOptmemMax,omitempty"`

	// NetCoreRmemDefault: Sysctl setting net.core.rmem_default.
	NetCoreRmemDefault *int `json:"netCoreRmemDefault,omitempty"`

	// NetCoreRmemMax: Sysctl setting net.core.rmem_max.
	NetCoreRmemMax *int `json:"netCoreRmemMax,omitempty"`

	// NetCoreSomaxconn: Sysctl setting net.core.somaxconn.
	NetCoreSomaxconn *int `json:"netCoreSomaxconn,omitempty"`

	// NetCoreWmemDefault: Sysctl setting net.core.wmem_default.
	NetCoreWmemDefault *int `json:"netCoreWmemDefault,omitempty"`

	// NetCoreWmemMax: Sysctl setting net.core.wmem_max.
	NetCoreWmemMax *int `json:"netCoreWmemMax,omitempty"`

	// NetIpv4IpLocalPortRange: Sysctl setting net.ipv4.ip_local_port_range.
	NetIpv4IpLocalPortRange *string `json:"netIpv4IpLocalPortRange,omitempty"`

	// NetIpv4NeighDefaultGcThresh1: Sysctl setting net.ipv4.neigh.default.gc_thresh1.
	NetIpv4NeighDefaultGcThresh1 *int `json:"netIpv4NeighDefaultGcThresh1,omitempty"`

	// NetIpv4NeighDefaultGcThresh2: Sysctl setting net.ipv4.neigh.default.gc_thresh2.
	NetIpv4NeighDefaultGcThresh2 *int `json:"netIpv4NeighDefaultGcThresh2,omitempty"`

	// NetIpv4NeighDefaultGcThresh3: Sysctl setting net.ipv4.neigh.default.gc_thresh3.
	NetIpv4NeighDefaultGcThresh3 *int `json:"netIpv4NeighDefaultGcThresh3,omitempty"`

	// NetIpv4TcpFinTimeout: Sysctl setting net.ipv4.tcp_fin_timeout.
	NetIpv4TcpFinTimeout *int `json:"netIpv4TcpFinTimeout,omitempty"`

	// NetIpv4TcpKeepaliveProbes: Sysctl setting net.ipv4.tcp_keepalive_probes.
	NetIpv4TcpKeepaliveProbes *int `json:"netIpv4TcpKeepaliveProbes,omitempty"`

	// NetIpv4TcpKeepaliveTime: Sysctl setting net.ipv4.tcp_keepalive_time.
	NetIpv4TcpKeepaliveTime *int `json:"netIpv4TcpKeepaliveTime,omitempty"`

	// NetIpv4TcpMaxSynBacklog: Sysctl setting net.ipv4.tcp_max_syn_backlog.
	NetIpv4TcpMaxSynBacklog *int `json:"netIpv4TcpMaxSynBacklog,omitempty"`

	// NetIpv4TcpMaxTwBuckets: Sysctl setting net.ipv4.tcp_max_tw_buckets.
	NetIpv4TcpMaxTwBuckets *int `json:"netIpv4TcpMaxTwBuckets,omitempty"`

	// NetIpv4TcpTwReuse: Sysctl setting net.ipv4.tcp_tw_reuse.
	NetIpv4TcpTwReuse *bool `json:"netIpv4TcpTwReuse,omitempty"`

	// NetIpv4TcpkeepaliveIntvl: Sysctl setting net.ipv4.tcp_keepalive_intvl.
	NetIpv4TcpkeepaliveIntvl *int `json:"netIpv4TcpkeepaliveIntvl,omitempty"`

	// NetNetfilterNfConntrackBuckets: Sysctl setting net.netfilter.nf_conntrack_buckets.
	NetNetfilterNfConntrackBuckets *int `json:"netNetfilterNfConntrackBuckets,omitempty"`

	// NetNetfilterNfConntrackMax: Sysctl setting net.netfilter.nf_conntrack_max.
	NetNetfilterNfConntrackMax *int `json:"netNetfilterNfConntrackMax,omitempty"`

	// VmMaxMapCount: Sysctl setting vm.max_map_count.
	VmMaxMapCount *int `json:"vmMaxMapCount,omitempty"`

	// VmSwappiness: Sysctl setting vm.swappiness.
	VmSwappiness *int `json:"vmSwappiness,omitempty"`

	// VmVfsCachePressure: Sysctl setting vm.vfs_cache_pressure.
	VmVfsCachePressure *int `json:"vmVfsCachePressure,omitempty"`
}

var _ genruntime.FromARMConverter = &SysctlConfig_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (config *SysctlConfig_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &SysctlConfig_STATUS_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (config *SysctlConfig_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(SysctlConfig_STATUS_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected SysctlConfig_STATUS_ARM, got %T", armInput)
	}

	// Set property "FsAioMaxNr":
	if typedInput.FsAioMaxNr != nil {
		fsAioMaxNr := *typedInput.FsAioMaxNr
		config.FsAioMaxNr = &fsAioMaxNr
	}

	// Set property "FsFileMax":
	if typedInput.FsFileMax != nil {
		fsFileMax := *typedInput.FsFileMax
		config.FsFileMax = &fsFileMax
	}

	// Set property "FsInotifyMaxUserWatches":
	if typedInput.FsInotifyMaxUserWatches != nil {
		fsInotifyMaxUserWatches := *typedInput.FsInotifyMaxUserWatches
		config.FsInotifyMaxUserWatches = &fsInotifyMaxUserWatches
	}

	// Set property "FsNrOpen":
	if typedInput.FsNrOpen != nil {
		fsNrOpen := *typedInput.FsNrOpen
		config.FsNrOpen = &fsNrOpen
	}

	// Set property "KernelThreadsMax":
	if typedInput.KernelThreadsMax != nil {
		kernelThreadsMax := *typedInput.KernelThreadsMax
		config.KernelThreadsMax = &kernelThreadsMax
	}

	// Set property "NetCoreNetdevMaxBacklog":
	if typedInput.NetCoreNetdevMaxBacklog != nil {
		netCoreNetdevMaxBacklog := *typedInput.NetCoreNetdevMaxBacklog
		config.NetCoreNetdevMaxBacklog = &netCoreNetdevMaxBacklog
	}

	// Set property "NetCoreOptmemMax":
	if typedInput.NetCoreOptmemMax != nil {
		netCoreOptmemMax := *typedInput.NetCoreOptmemMax
		config.NetCoreOptmemMax = &netCoreOptmemMax
	}

	// Set property "NetCoreRmemDefault":
	if typedInput.NetCoreRmemDefault != nil {
		netCoreRmemDefault := *typedInput.NetCoreRmemDefault
		config.NetCoreRmemDefault = &netCoreRmemDefault
	}

	// Set property "NetCoreRmemMax":
	if typedInput.NetCoreRmemMax != nil {
		netCoreRmemMax := *typedInput.NetCoreRmemMax
		config.NetCoreRmemMax = &netCoreRmemMax
	}

	// Set property "NetCoreSomaxconn":
	if typedInput.NetCoreSomaxconn != nil {
		netCoreSomaxconn := *typedInput.NetCoreSomaxconn
		config.NetCoreSomaxconn = &netCoreSomaxconn
	}

	// Set property "NetCoreWmemDefault":
	if typedInput.NetCoreWmemDefault != nil {
		netCoreWmemDefault := *typedInput.NetCoreWmemDefault
		config.NetCoreWmemDefault = &netCoreWmemDefault
	}

	// Set property "NetCoreWmemMax":
	if typedInput.NetCoreWmemMax != nil {
		netCoreWmemMax := *typedInput.NetCoreWmemMax
		config.NetCoreWmemMax = &netCoreWmemMax
	}

	// Set property "NetIpv4IpLocalPortRange":
	if typedInput.NetIpv4IpLocalPortRange != nil {
		netIpv4IpLocalPortRange := *typedInput.NetIpv4IpLocalPortRange
		config.NetIpv4IpLocalPortRange = &netIpv4IpLocalPortRange
	}

	// Set property "NetIpv4NeighDefaultGcThresh1":
	if typedInput.NetIpv4NeighDefaultGcThresh1 != nil {
		netIpv4NeighDefaultGcThresh1 := *typedInput.NetIpv4NeighDefaultGcThresh1
		config.NetIpv4NeighDefaultGcThresh1 = &netIpv4NeighDefaultGcThresh1
	}

	// Set property "NetIpv4NeighDefaultGcThresh2":
	if typedInput.NetIpv4NeighDefaultGcThresh2 != nil {
		netIpv4NeighDefaultGcThresh2 := *typedInput.NetIpv4NeighDefaultGcThresh2
		config.NetIpv4NeighDefaultGcThresh2 = &netIpv4NeighDefaultGcThresh2
	}

	// Set property "NetIpv4NeighDefaultGcThresh3":
	if typedInput.NetIpv4NeighDefaultGcThresh3 != nil {
		netIpv4NeighDefaultGcThresh3 := *typedInput.NetIpv4NeighDefaultGcThresh3
		config.NetIpv4NeighDefaultGcThresh3 = &netIpv4NeighDefaultGcThresh3
	}

	// Set property "NetIpv4TcpFinTimeout":
	if typedInput.NetIpv4TcpFinTimeout != nil {
		netIpv4TcpFinTimeout := *typedInput.NetIpv4TcpFinTimeout
		config.NetIpv4TcpFinTimeout = &netIpv4TcpFinTimeout
	}

	// Set property "NetIpv4TcpKeepaliveProbes":
	if typedInput.NetIpv4TcpKeepaliveProbes != nil {
		netIpv4TcpKeepaliveProbes := *typedInput.NetIpv4TcpKeepaliveProbes
		config.NetIpv4TcpKeepaliveProbes = &netIpv4TcpKeepaliveProbes
	}

	// Set property "NetIpv4TcpKeepaliveTime":
	if typedInput.NetIpv4TcpKeepaliveTime != nil {
		netIpv4TcpKeepaliveTime := *typedInput.NetIpv4TcpKeepaliveTime
		config.NetIpv4TcpKeepaliveTime = &netIpv4TcpKeepaliveTime
	}

	// Set property "NetIpv4TcpMaxSynBacklog":
	if typedInput.NetIpv4TcpMaxSynBacklog != nil {
		netIpv4TcpMaxSynBacklog := *typedInput.NetIpv4TcpMaxSynBacklog
		config.NetIpv4TcpMaxSynBacklog = &netIpv4TcpMaxSynBacklog
	}

	// Set property "NetIpv4TcpMaxTwBuckets":
	if typedInput.NetIpv4TcpMaxTwBuckets != nil {
		netIpv4TcpMaxTwBuckets := *typedInput.NetIpv4TcpMaxTwBuckets
		config.NetIpv4TcpMaxTwBuckets = &netIpv4TcpMaxTwBuckets
	}

	// Set property "NetIpv4TcpTwReuse":
	if typedInput.NetIpv4TcpTwReuse != nil {
		netIpv4TcpTwReuse := *typedInput.NetIpv4TcpTwReuse
		config.NetIpv4TcpTwReuse = &netIpv4TcpTwReuse
	}

	// Set property "NetIpv4TcpkeepaliveIntvl":
	if typedInput.NetIpv4TcpkeepaliveIntvl != nil {
		netIpv4TcpkeepaliveIntvl := *typedInput.NetIpv4TcpkeepaliveIntvl
		config.NetIpv4TcpkeepaliveIntvl = &netIpv4TcpkeepaliveIntvl
	}

	// Set property "NetNetfilterNfConntrackBuckets":
	if typedInput.NetNetfilterNfConntrackBuckets != nil {
		netNetfilterNfConntrackBuckets := *typedInput.NetNetfilterNfConntrackBuckets
		config.NetNetfilterNfConntrackBuckets = &netNetfilterNfConntrackBuckets
	}

	// Set property "NetNetfilterNfConntrackMax":
	if typedInput.NetNetfilterNfConntrackMax != nil {
		netNetfilterNfConntrackMax := *typedInput.NetNetfilterNfConntrackMax
		config.NetNetfilterNfConntrackMax = &netNetfilterNfConntrackMax
	}

	// Set property "VmMaxMapCount":
	if typedInput.VmMaxMapCount != nil {
		vmMaxMapCount := *typedInput.VmMaxMapCount
		config.VmMaxMapCount = &vmMaxMapCount
	}

	// Set property "VmSwappiness":
	if typedInput.VmSwappiness != nil {
		vmSwappiness := *typedInput.VmSwappiness
		config.VmSwappiness = &vmSwappiness
	}

	// Set property "VmVfsCachePressure":
	if typedInput.VmVfsCachePressure != nil {
		vmVfsCachePressure := *typedInput.VmVfsCachePressure
		config.VmVfsCachePressure = &vmVfsCachePressure
	}

	// No error
	return nil
}

// AssignProperties_From_SysctlConfig_STATUS populates our SysctlConfig_STATUS from the provided source SysctlConfig_STATUS
func (config *SysctlConfig_STATUS) AssignProperties_From_SysctlConfig_STATUS(source *v20231102ps.SysctlConfig_STATUS) error {

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

	// 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 *v20231102ps.SysctlConfig_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

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

	// No error
	return nil
}

// Specifications on number of machines.
type ManualScaleProfile struct {
	// +kubebuilder:validation:Maximum=1000
	// +kubebuilder:validation:Minimum=0
	// Count: Number of nodes.
	Count *int `json:"count,omitempty"`

	// Sizes: The list of allowed vm sizes. AKS will use the first available one when scaling. If a VM size is unavailable
	// (e.g. due to quota or regional capacity reasons), AKS will use the next size.
	Sizes []string `json:"sizes,omitempty"`
}

var _ genruntime.ARMTransformer = &ManualScaleProfile{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (profile *ManualScaleProfile) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if profile == nil {
		return nil, nil
	}
	result := &ManualScaleProfile_ARM{}

	// Set property "Count":
	if profile.Count != nil {
		count := *profile.Count
		result.Count = &count
	}

	// Set property "Sizes":
	for _, item := range profile.Sizes {
		result.Sizes = append(result.Sizes, item)
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *ManualScaleProfile) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &ManualScaleProfile_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *ManualScaleProfile) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(ManualScaleProfile_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManualScaleProfile_ARM, got %T", armInput)
	}

	// Set property "Count":
	if typedInput.Count != nil {
		count := *typedInput.Count
		profile.Count = &count
	}

	// Set property "Sizes":
	for _, item := range typedInput.Sizes {
		profile.Sizes = append(profile.Sizes, item)
	}

	// No error
	return nil
}

// AssignProperties_From_ManualScaleProfile populates our ManualScaleProfile from the provided source ManualScaleProfile
func (profile *ManualScaleProfile) AssignProperties_From_ManualScaleProfile(source *v20231102ps.ManualScaleProfile) error {

	// Count
	if source.Count != nil {
		count := *source.Count
		profile.Count = &count
	} else {
		profile.Count = nil
	}

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

	// No error
	return nil
}

// AssignProperties_To_ManualScaleProfile populates the provided destination ManualScaleProfile from our ManualScaleProfile
func (profile *ManualScaleProfile) AssignProperties_To_ManualScaleProfile(destination *v20231102ps.ManualScaleProfile) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Count
	if profile.Count != nil {
		count := *profile.Count
		destination.Count = &count
	} else {
		destination.Count = nil
	}

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

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

	// No error
	return nil
}

// Specifications on number of machines.
type ManualScaleProfile_STATUS struct {
	// Count: Number of nodes.
	Count *int `json:"count,omitempty"`

	// Sizes: The list of allowed vm sizes. AKS will use the first available one when scaling. If a VM size is unavailable
	// (e.g. due to quota or regional capacity reasons), AKS will use the next size.
	Sizes []string `json:"sizes,omitempty"`
}

var _ genruntime.FromARMConverter = &ManualScaleProfile_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *ManualScaleProfile_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &ManualScaleProfile_STATUS_ARM{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *ManualScaleProfile_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(ManualScaleProfile_STATUS_ARM)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManualScaleProfile_STATUS_ARM, got %T", armInput)
	}

	// Set property "Count":
	if typedInput.Count != nil {
		count := *typedInput.Count
		profile.Count = &count
	}

	// Set property "Sizes":
	for _, item := range typedInput.Sizes {
		profile.Sizes = append(profile.Sizes, item)
	}

	// No error
	return nil
}

// AssignProperties_From_ManualScaleProfile_STATUS populates our ManualScaleProfile_STATUS from the provided source ManualScaleProfile_STATUS
func (profile *ManualScaleProfile_STATUS) AssignProperties_From_ManualScaleProfile_STATUS(source *v20231102ps.ManualScaleProfile_STATUS) error {

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

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

	// No error
	return nil
}

// AssignProperties_To_ManualScaleProfile_STATUS populates the provided destination ManualScaleProfile_STATUS from our ManualScaleProfile_STATUS
func (profile *ManualScaleProfile_STATUS) AssignProperties_To_ManualScaleProfile_STATUS(destination *v20231102ps.ManualScaleProfile_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

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

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

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

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"TCP","UDP"}
type PortRange_Protocol string

const (
	PortRange_Protocol_TCP = PortRange_Protocol("TCP")
	PortRange_Protocol_UDP = PortRange_Protocol("UDP")
)

type PortRange_Protocol_STATUS string

const (
	PortRange_Protocol_STATUS_TCP = PortRange_Protocol_STATUS("TCP")
	PortRange_Protocol_STATUS_UDP = PortRange_Protocol_STATUS("UDP")
)

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