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

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

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories={azure,containerservice}
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity"
// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason"
// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message"
// Generator information:
// - Generated from: /containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-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              ManagedClustersAgentPool_Spec   `json:"spec,omitempty"`
	Status            ManagedClustersAgentPool_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &ManagedClustersAgentPool{}

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

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

var _ conversion.Convertible = &ManagedClustersAgentPool{}

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

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

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

	return nil
}

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

	return nil
}

var _ configmaps.Exporter = &ManagedClustersAgentPool{}

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

var _ secrets.Exporter = &ManagedClustersAgentPool{}

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

var _ genruntime.KubernetesResource = &ManagedClustersAgentPool{}

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

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

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

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

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

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

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

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

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

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

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

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

	pool.Status = st
	return nil
}

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

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

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

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

	// No error
	return nil
}

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

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

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

	// Status
	var status storage.ManagedClustersAgentPool_STATUS
	err = pool.Status.AssignProperties_To_ManagedClustersAgentPool_STATUS(&status)
	if err != nil {
		return eris.Wrap(err, "calling AssignProperties_To_ManagedClustersAgentPool_STATUS() to populate field Status")
	}
	destination.Status = status

	// 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/2024-04-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 ManagedClustersAgentPool_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"`

	// GatewayProfile: Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is
	// not Gateway.
	GatewayProfile *AgentPoolGatewayProfile `json:"gatewayProfile,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"`

	// OperatorSpec: The specification for configuring operator behavior. This field is interpreted by the operator and not
	// passed directly to Azure
	OperatorSpec *ManagedClustersAgentPoolOperatorSpec `json:"operatorSpec,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        *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"`

	// PodIPAllocationMode: The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is
	// 'DynamicIndividual'.
	PodIPAllocationMode *PodIPAllocationMode `json:"podIPAllocationMode,omitempty"`

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

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

	// 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.GatewayProfile != 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.PodIPAllocationMode != 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 = &arm.ManagedClusterAgentPoolProfileProperties{}
	}
	if pool.ArtifactStreamingProfile != nil {
		artifactStreamingProfile_ARM, err := pool.ArtifactStreamingProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		artifactStreamingProfile := *artifactStreamingProfile_ARM.(*arm.AgentPoolArtifactStreamingProfile)
		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.(*arm.CreationData)
		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.GatewayProfile != nil {
		gatewayProfile_ARM, err := pool.GatewayProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		gatewayProfile := *gatewayProfile_ARM.(*arm.AgentPoolGatewayProfile)
		result.Properties.GatewayProfile = &gatewayProfile
	}
	if pool.GpuInstanceProfile != nil {
		var temp string
		temp = string(*pool.GpuInstanceProfile)
		gpuInstanceProfile := arm.GPUInstanceProfile(temp)
		result.Properties.GpuInstanceProfile = &gpuInstanceProfile
	}
	if pool.GpuProfile != nil {
		gpuProfile_ARM, err := pool.GpuProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		gpuProfile := *gpuProfile_ARM.(*arm.AgentPoolGPUProfile)
		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.(*arm.KubeletConfig)
		result.Properties.KubeletConfig = &kubeletConfig
	}
	if pool.KubeletDiskType != nil {
		var temp string
		temp = string(*pool.KubeletDiskType)
		kubeletDiskType := arm.KubeletDiskType(temp)
		result.Properties.KubeletDiskType = &kubeletDiskType
	}
	if pool.LinuxOSConfig != nil {
		linuxOSConfig_ARM, err := pool.LinuxOSConfig.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		linuxOSConfig := *linuxOSConfig_ARM.(*arm.LinuxOSConfig)
		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 {
		var temp string
		temp = string(*pool.Mode)
		mode := arm.AgentPoolMode(temp)
		result.Properties.Mode = &mode
	}
	if pool.NetworkProfile != nil {
		networkProfile_ARM, err := pool.NetworkProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		networkProfile := *networkProfile_ARM.(*arm.AgentPoolNetworkProfile)
		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 := int(*pool.OsDiskSizeGB)
		result.Properties.OsDiskSizeGB = &osDiskSizeGB
	}
	if pool.OsDiskType != nil {
		var temp string
		temp = string(*pool.OsDiskType)
		osDiskType := arm.OSDiskType(temp)
		result.Properties.OsDiskType = &osDiskType
	}
	if pool.OsSKU != nil {
		var temp string
		temp = string(*pool.OsSKU)
		osSKU := arm.OSSKU(temp)
		result.Properties.OsSKU = &osSKU
	}
	if pool.OsType != nil {
		var temp string
		temp = string(*pool.OsType)
		osType := arm.OSType(temp)
		result.Properties.OsType = &osType
	}
	if pool.PodIPAllocationMode != nil {
		var temp string
		temp = string(*pool.PodIPAllocationMode)
		podIPAllocationMode := arm.PodIPAllocationMode(temp)
		result.Properties.PodIPAllocationMode = &podIPAllocationMode
	}
	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.(*arm.PowerState)
		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 {
		var temp string
		temp = string(*pool.ScaleDownMode)
		scaleDownMode := arm.ScaleDownMode(temp)
		result.Properties.ScaleDownMode = &scaleDownMode
	}
	if pool.ScaleSetEvictionPolicy != nil {
		var temp string
		temp = string(*pool.ScaleSetEvictionPolicy)
		scaleSetEvictionPolicy := arm.ScaleSetEvictionPolicy(temp)
		result.Properties.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy
	}
	if pool.ScaleSetPriority != nil {
		var temp string
		temp = string(*pool.ScaleSetPriority)
		scaleSetPriority := arm.ScaleSetPriority(temp)
		result.Properties.ScaleSetPriority = &scaleSetPriority
	}
	if pool.SecurityProfile != nil {
		securityProfile_ARM, err := pool.SecurityProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		securityProfile := *securityProfile_ARM.(*arm.AgentPoolSecurityProfile)
		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 {
		var temp string
		temp = string(*pool.Type)
		typeVar := arm.AgentPoolType(temp)
		result.Properties.Type = &typeVar
	}
	if pool.UpgradeSettings != nil {
		upgradeSettings_ARM, err := pool.UpgradeSettings.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		upgradeSettings := *upgradeSettings_ARM.(*arm.AgentPoolUpgradeSettings)
		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.(*arm.VirtualMachineNodes))
	}
	if pool.VirtualMachinesProfile != nil {
		virtualMachinesProfile_ARM, err := pool.VirtualMachinesProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		virtualMachinesProfile := *virtualMachinesProfile_ARM.(*arm.VirtualMachinesProfile)
		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.(*arm.AgentPoolWindowsProfile)
		result.Properties.WindowsProfile = &windowsProfile
	}
	if pool.WorkloadRuntime != nil {
		var temp string
		temp = string(*pool.WorkloadRuntime)
		workloadRuntime := arm.WorkloadRuntime(temp)
		result.Properties.WorkloadRuntime = &workloadRuntime
	}
	return result, nil
}

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

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (pool *ManagedClustersAgentPool_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClustersAgentPool_Spec)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClustersAgentPool_Spec, 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 "GatewayProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.GatewayProfile != nil {
			var gatewayProfile1 AgentPoolGatewayProfile
			err := gatewayProfile1.PopulateFromARM(owner, *typedInput.Properties.GatewayProfile)
			if err != nil {
				return err
			}
			gatewayProfile := gatewayProfile1
			pool.GatewayProfile = &gatewayProfile
		}
	}

	// Set property "GpuInstanceProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.GpuInstanceProfile != nil {
			var temp string
			temp = string(*typedInput.Properties.GpuInstanceProfile)
			gpuInstanceProfile := GPUInstanceProfile(temp)
			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 {
			var temp string
			temp = string(*typedInput.Properties.KubeletDiskType)
			kubeletDiskType := KubeletDiskType(temp)
			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 {
			var temp string
			temp = string(*typedInput.Properties.Mode)
			mode := AgentPoolMode(temp)
			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)
		}
	}

	// no assignment for property "OperatorSpec"

	// 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 := ContainerServiceOSDisk(*typedInput.Properties.OsDiskSizeGB)
			pool.OsDiskSizeGB = &osDiskSizeGB
		}
	}

	// Set property "OsDiskType":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.OsDiskType != nil {
			var temp string
			temp = string(*typedInput.Properties.OsDiskType)
			osDiskType := OSDiskType(temp)
			pool.OsDiskType = &osDiskType
		}
	}

	// Set property "OsSKU":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.OsSKU != nil {
			var temp string
			temp = string(*typedInput.Properties.OsSKU)
			osSKU := OSSKU(temp)
			pool.OsSKU = &osSKU
		}
	}

	// Set property "OsType":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.OsType != nil {
			var temp string
			temp = string(*typedInput.Properties.OsType)
			osType := OSType(temp)
			pool.OsType = &osType
		}
	}

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

	// Set property "PodIPAllocationMode":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PodIPAllocationMode != nil {
			var temp string
			temp = string(*typedInput.Properties.PodIPAllocationMode)
			podIPAllocationMode := PodIPAllocationMode(temp)
			pool.PodIPAllocationMode = &podIPAllocationMode
		}
	}

	// 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 {
			var temp string
			temp = string(*typedInput.Properties.ScaleDownMode)
			scaleDownMode := ScaleDownMode(temp)
			pool.ScaleDownMode = &scaleDownMode
		}
	}

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

	// Set property "ScaleSetPriority":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ScaleSetPriority != nil {
			var temp string
			temp = string(*typedInput.Properties.ScaleSetPriority)
			scaleSetPriority := ScaleSetPriority(temp)
			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 {
			var temp string
			temp = string(*typedInput.Properties.Type)
			typeVar := AgentPoolType(temp)
			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 {
			var temp string
			temp = string(*typedInput.Properties.WorkloadRuntime)
			workloadRuntime := WorkloadRuntime(temp)
			pool.WorkloadRuntime = &workloadRuntime
		}
	}

	// No error
	return nil
}

var _ genruntime.ConvertibleSpec = &ManagedClustersAgentPool_Spec{}

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

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

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

	return nil
}

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

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

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

	return nil
}

// AssignProperties_From_ManagedClustersAgentPool_Spec populates our ManagedClustersAgentPool_Spec from the provided source ManagedClustersAgentPool_Spec
func (pool *ManagedClustersAgentPool_Spec) AssignProperties_From_ManagedClustersAgentPool_Spec(source *storage.ManagedClustersAgentPool_Spec) error {

	// ArtifactStreamingProfile
	if source.ArtifactStreamingProfile != nil {
		var artifactStreamingProfile AgentPoolArtifactStreamingProfile
		err := artifactStreamingProfile.AssignProperties_From_AgentPoolArtifactStreamingProfile(source.ArtifactStreamingProfile)
		if err != nil {
			return eris.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 eris.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
	}

	// GatewayProfile
	if source.GatewayProfile != nil {
		var gatewayProfile AgentPoolGatewayProfile
		err := gatewayProfile.AssignProperties_From_AgentPoolGatewayProfile(source.GatewayProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_AgentPoolGatewayProfile() to populate field GatewayProfile")
		}
		pool.GatewayProfile = &gatewayProfile
	} else {
		pool.GatewayProfile = nil
	}

	// GpuInstanceProfile
	if source.GpuInstanceProfile != nil {
		gpuInstanceProfile := *source.GpuInstanceProfile
		gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_Values)
		pool.GpuInstanceProfile = &gpuInstanceProfileTemp
	} else {
		pool.GpuInstanceProfile = nil
	}

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

	// KubeletDiskType
	if source.KubeletDiskType != nil {
		kubeletDiskType := *source.KubeletDiskType
		kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_Values)
		pool.KubeletDiskType = &kubeletDiskTypeTemp
	} else {
		pool.KubeletDiskType = nil
	}

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

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

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

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

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

	// Mode
	if source.Mode != nil {
		mode := *source.Mode
		modeTemp := genruntime.ToEnum(mode, agentPoolMode_Values)
		pool.Mode = &modeTemp
	} else {
		pool.Mode = nil
	}

	// NetworkProfile
	if source.NetworkProfile != nil {
		var networkProfile AgentPoolNetworkProfile
		err := networkProfile.AssignProperties_From_AgentPoolNetworkProfile(source.NetworkProfile)
		if err != nil {
			return eris.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)

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

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

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

	// OsDiskType
	if source.OsDiskType != nil {
		osDiskType := *source.OsDiskType
		osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_Values)
		pool.OsDiskType = &osDiskTypeTemp
	} else {
		pool.OsDiskType = nil
	}

	// OsSKU
	if source.OsSKU != nil {
		osSKU := *source.OsSKU
		osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_Values)
		pool.OsSKU = &osSKUTemp
	} else {
		pool.OsSKU = nil
	}

	// OsType
	if source.OsType != nil {
		osType := *source.OsType
		osTypeTemp := genruntime.ToEnum(osType, oSType_Values)
		pool.OsType = &osTypeTemp
	} else {
		pool.OsType = nil
	}

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

	// PodIPAllocationMode
	if source.PodIPAllocationMode != nil {
		podIPAllocationMode := *source.PodIPAllocationMode
		podIPAllocationModeTemp := genruntime.ToEnum(podIPAllocationMode, podIPAllocationMode_Values)
		pool.PodIPAllocationMode = &podIPAllocationModeTemp
	} else {
		pool.PodIPAllocationMode = 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 eris.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 := *source.ScaleDownMode
		scaleDownModeTemp := genruntime.ToEnum(scaleDownMode, scaleDownMode_Values)
		pool.ScaleDownMode = &scaleDownModeTemp
	} else {
		pool.ScaleDownMode = nil
	}

	// ScaleSetEvictionPolicy
	if source.ScaleSetEvictionPolicy != nil {
		scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy
		scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_Values)
		pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp
	} else {
		pool.ScaleSetEvictionPolicy = nil
	}

	// ScaleSetPriority
	if source.ScaleSetPriority != nil {
		scaleSetPriority := *source.ScaleSetPriority
		scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_Values)
		pool.ScaleSetPriority = &scaleSetPriorityTemp
	} else {
		pool.ScaleSetPriority = nil
	}

	// SecurityProfile
	if source.SecurityProfile != nil {
		var securityProfile AgentPoolSecurityProfile
		err := securityProfile.AssignProperties_From_AgentPoolSecurityProfile(source.SecurityProfile)
		if err != nil {
			return eris.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 := *source.Type
		typeTemp := genruntime.ToEnum(typeVar, agentPoolType_Values)
		pool.Type = &typeTemp
	} else {
		pool.Type = nil
	}

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

	// VirtualMachineNodesStatus
	if source.VirtualMachineNodesStatus != nil {
		virtualMachineNodesStatusList := make([]VirtualMachineNodes, len(source.VirtualMachineNodesStatus))
		for virtualMachineNodesStatusIndex, virtualMachineNodesStatusItem := range source.VirtualMachineNodesStatus {
			var virtualMachineNodesStatus VirtualMachineNodes
			err := virtualMachineNodesStatus.AssignProperties_From_VirtualMachineNodes(&virtualMachineNodesStatusItem)
			if err != nil {
				return eris.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 eris.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 eris.Wrap(err, "calling AssignProperties_From_AgentPoolWindowsProfile() to populate field WindowsProfile")
		}
		pool.WindowsProfile = &windowsProfile
	} else {
		pool.WindowsProfile = nil
	}

	// WorkloadRuntime
	if source.WorkloadRuntime != nil {
		workloadRuntime := *source.WorkloadRuntime
		workloadRuntimeTemp := genruntime.ToEnum(workloadRuntime, workloadRuntime_Values)
		pool.WorkloadRuntime = &workloadRuntimeTemp
	} else {
		pool.WorkloadRuntime = nil
	}

	// No error
	return nil
}

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

	// ArtifactStreamingProfile
	if pool.ArtifactStreamingProfile != nil {
		var artifactStreamingProfile storage.AgentPoolArtifactStreamingProfile
		err := pool.ArtifactStreamingProfile.AssignProperties_To_AgentPoolArtifactStreamingProfile(&artifactStreamingProfile)
		if err != nil {
			return eris.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 storage.CreationData
		err := pool.CreationData.AssignProperties_To_CreationData(&creationDatum)
		if err != nil {
			return eris.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
	}

	// GatewayProfile
	if pool.GatewayProfile != nil {
		var gatewayProfile storage.AgentPoolGatewayProfile
		err := pool.GatewayProfile.AssignProperties_To_AgentPoolGatewayProfile(&gatewayProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_AgentPoolGatewayProfile() to populate field GatewayProfile")
		}
		destination.GatewayProfile = &gatewayProfile
	} else {
		destination.GatewayProfile = nil
	}

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

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

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

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

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

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

	// 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 storage.AgentPoolNetworkProfile
		err := pool.NetworkProfile.AssignProperties_To_AgentPoolNetworkProfile(&networkProfile)
		if err != nil {
			return eris.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)

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

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

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

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

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

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

	// PowerState
	if pool.PowerState != nil {
		var powerState storage.PowerState
		err := pool.PowerState.AssignProperties_To_PowerState(&powerState)
		if err != nil {
			return eris.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 storage.AgentPoolSecurityProfile
		err := pool.SecurityProfile.AssignProperties_To_AgentPoolSecurityProfile(&securityProfile)
		if err != nil {
			return eris.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 storage.AgentPoolUpgradeSettings
		err := pool.UpgradeSettings.AssignProperties_To_AgentPoolUpgradeSettings(&upgradeSetting)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_AgentPoolUpgradeSettings() to populate field UpgradeSettings")
		}
		destination.UpgradeSettings = &upgradeSetting
	} else {
		destination.UpgradeSettings = nil
	}

	// VirtualMachineNodesStatus
	if pool.VirtualMachineNodesStatus != nil {
		virtualMachineNodesStatusList := make([]storage.VirtualMachineNodes, len(pool.VirtualMachineNodesStatus))
		for virtualMachineNodesStatusIndex, virtualMachineNodesStatusItem := range pool.VirtualMachineNodesStatus {
			var virtualMachineNodesStatus storage.VirtualMachineNodes
			err := virtualMachineNodesStatusItem.AssignProperties_To_VirtualMachineNodes(&virtualMachineNodesStatus)
			if err != nil {
				return eris.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 storage.VirtualMachinesProfile
		err := pool.VirtualMachinesProfile.AssignProperties_To_VirtualMachinesProfile(&virtualMachinesProfile)
		if err != nil {
			return eris.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 storage.AgentPoolWindowsProfile
		err := pool.WindowsProfile.AssignProperties_To_AgentPoolWindowsProfile(&windowsProfile)
		if err != nil {
			return eris.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 *ManagedClustersAgentPool_Spec) OriginalVersion() string {
	return GroupVersion.Version
}

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

type ManagedClustersAgentPool_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"`

	// ETag: Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is
	// updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable optimistic
	// concurrency per the normal etag convention.
	ETag *string `json:"eTag,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"`

	// GatewayProfile: Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is
	// not Gateway.
	GatewayProfile *AgentPoolGatewayProfile_STATUS `json:"gatewayProfile,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"`

	// PodIPAllocationMode: The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is
	// 'DynamicIndividual'.
	PodIPAllocationMode *PodIPAllocationMode_STATUS `json:"podIPAllocationMode,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 = &ManagedClustersAgentPool_STATUS{}

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

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

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

	return nil
}

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

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

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

	return nil
}

var _ genruntime.FromARMConverter = &ManagedClustersAgentPool_STATUS{}

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

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (pool *ManagedClustersAgentPool_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClustersAgentPool_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClustersAgentPool_STATUS, 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 "ETag":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ETag != nil {
			eTag := *typedInput.Properties.ETag
			pool.ETag = &eTag
		}
	}

	// 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 "GatewayProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.GatewayProfile != nil {
			var gatewayProfile1 AgentPoolGatewayProfile_STATUS
			err := gatewayProfile1.PopulateFromARM(owner, *typedInput.Properties.GatewayProfile)
			if err != nil {
				return err
			}
			gatewayProfile := gatewayProfile1
			pool.GatewayProfile = &gatewayProfile
		}
	}

	// Set property "GpuInstanceProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.GpuInstanceProfile != nil {
			var temp string
			temp = string(*typedInput.Properties.GpuInstanceProfile)
			gpuInstanceProfile := GPUInstanceProfile_STATUS(temp)
			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 {
			var temp string
			temp = string(*typedInput.Properties.KubeletDiskType)
			kubeletDiskType := KubeletDiskType_STATUS(temp)
			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 {
			var temp string
			temp = string(*typedInput.Properties.Mode)
			mode := AgentPoolMode_STATUS(temp)
			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 {
			var temp string
			temp = string(*typedInput.Properties.OsDiskType)
			osDiskType := OSDiskType_STATUS(temp)
			pool.OsDiskType = &osDiskType
		}
	}

	// Set property "OsSKU":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.OsSKU != nil {
			var temp string
			temp = string(*typedInput.Properties.OsSKU)
			osSKU := OSSKU_STATUS(temp)
			pool.OsSKU = &osSKU
		}
	}

	// Set property "OsType":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.OsType != nil {
			var temp string
			temp = string(*typedInput.Properties.OsType)
			osType := OSType_STATUS(temp)
			pool.OsType = &osType
		}
	}

	// Set property "PodIPAllocationMode":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PodIPAllocationMode != nil {
			var temp string
			temp = string(*typedInput.Properties.PodIPAllocationMode)
			podIPAllocationMode := PodIPAllocationMode_STATUS(temp)
			pool.PodIPAllocationMode = &podIPAllocationMode
		}
	}

	// 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 {
			var temp string
			temp = string(*typedInput.Properties.Type)
			propertiesType := AgentPoolType_STATUS(temp)
			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 {
			var temp string
			temp = string(*typedInput.Properties.ScaleDownMode)
			scaleDownMode := ScaleDownMode_STATUS(temp)
			pool.ScaleDownMode = &scaleDownMode
		}
	}

	// Set property "ScaleSetEvictionPolicy":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ScaleSetEvictionPolicy != nil {
			var temp string
			temp = string(*typedInput.Properties.ScaleSetEvictionPolicy)
			scaleSetEvictionPolicy := ScaleSetEvictionPolicy_STATUS(temp)
			pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy
		}
	}

	// Set property "ScaleSetPriority":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ScaleSetPriority != nil {
			var temp string
			temp = string(*typedInput.Properties.ScaleSetPriority)
			scaleSetPriority := ScaleSetPriority_STATUS(temp)
			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 {
			var temp string
			temp = string(*typedInput.Properties.WorkloadRuntime)
			workloadRuntime := WorkloadRuntime_STATUS(temp)
			pool.WorkloadRuntime = &workloadRuntime
		}
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClustersAgentPool_STATUS populates our ManagedClustersAgentPool_STATUS from the provided source ManagedClustersAgentPool_STATUS
func (pool *ManagedClustersAgentPool_STATUS) AssignProperties_From_ManagedClustersAgentPool_STATUS(source *storage.ManagedClustersAgentPool_STATUS) error {

	// ArtifactStreamingProfile
	if source.ArtifactStreamingProfile != nil {
		var artifactStreamingProfile AgentPoolArtifactStreamingProfile_STATUS
		err := artifactStreamingProfile.AssignProperties_From_AgentPoolArtifactStreamingProfile_STATUS(source.ArtifactStreamingProfile)
		if err != nil {
			return eris.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 eris.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)

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

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

	// GatewayProfile
	if source.GatewayProfile != nil {
		var gatewayProfile AgentPoolGatewayProfile_STATUS
		err := gatewayProfile.AssignProperties_From_AgentPoolGatewayProfile_STATUS(source.GatewayProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_AgentPoolGatewayProfile_STATUS() to populate field GatewayProfile")
		}
		pool.GatewayProfile = &gatewayProfile
	} else {
		pool.GatewayProfile = nil
	}

	// GpuInstanceProfile
	if source.GpuInstanceProfile != nil {
		gpuInstanceProfile := *source.GpuInstanceProfile
		gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_STATUS_Values)
		pool.GpuInstanceProfile = &gpuInstanceProfileTemp
	} 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 eris.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 eris.Wrap(err, "calling AssignProperties_From_KubeletConfig_STATUS() to populate field KubeletConfig")
		}
		pool.KubeletConfig = &kubeletConfig
	} else {
		pool.KubeletConfig = nil
	}

	// KubeletDiskType
	if source.KubeletDiskType != nil {
		kubeletDiskType := *source.KubeletDiskType
		kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_STATUS_Values)
		pool.KubeletDiskType = &kubeletDiskTypeTemp
	} 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 eris.Wrap(err, "calling AssignProperties_From_LinuxOSConfig_STATUS() to populate field LinuxOSConfig")
		}
		pool.LinuxOSConfig = &linuxOSConfig
	} else {
		pool.LinuxOSConfig = nil
	}

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

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

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

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

	// Mode
	if source.Mode != nil {
		mode := *source.Mode
		modeTemp := genruntime.ToEnum(mode, agentPoolMode_STATUS_Values)
		pool.Mode = &modeTemp
	} 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 eris.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 := *source.OsDiskType
		osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_STATUS_Values)
		pool.OsDiskType = &osDiskTypeTemp
	} else {
		pool.OsDiskType = nil
	}

	// OsSKU
	if source.OsSKU != nil {
		osSKU := *source.OsSKU
		osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_STATUS_Values)
		pool.OsSKU = &osSKUTemp
	} else {
		pool.OsSKU = nil
	}

	// OsType
	if source.OsType != nil {
		osType := *source.OsType
		osTypeTemp := genruntime.ToEnum(osType, oSType_STATUS_Values)
		pool.OsType = &osTypeTemp
	} else {
		pool.OsType = nil
	}

	// PodIPAllocationMode
	if source.PodIPAllocationMode != nil {
		podIPAllocationMode := *source.PodIPAllocationMode
		podIPAllocationModeTemp := genruntime.ToEnum(podIPAllocationMode, podIPAllocationMode_STATUS_Values)
		pool.PodIPAllocationMode = &podIPAllocationModeTemp
	} else {
		pool.PodIPAllocationMode = 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 eris.Wrap(err, "calling AssignProperties_From_PowerState_STATUS() to populate field PowerState")
		}
		pool.PowerState = &powerState
	} else {
		pool.PowerState = nil
	}

	// PropertiesType
	if source.PropertiesType != nil {
		propertiesType := *source.PropertiesType
		propertiesTypeTemp := genruntime.ToEnum(propertiesType, agentPoolType_STATUS_Values)
		pool.PropertiesType = &propertiesTypeTemp
	} else {
		pool.PropertiesType = nil
	}

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

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

	// ScaleDownMode
	if source.ScaleDownMode != nil {
		scaleDownMode := *source.ScaleDownMode
		scaleDownModeTemp := genruntime.ToEnum(scaleDownMode, scaleDownMode_STATUS_Values)
		pool.ScaleDownMode = &scaleDownModeTemp
	} else {
		pool.ScaleDownMode = nil
	}

	// ScaleSetEvictionPolicy
	if source.ScaleSetEvictionPolicy != nil {
		scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy
		scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_STATUS_Values)
		pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp
	} else {
		pool.ScaleSetEvictionPolicy = nil
	}

	// ScaleSetPriority
	if source.ScaleSetPriority != nil {
		scaleSetPriority := *source.ScaleSetPriority
		scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_STATUS_Values)
		pool.ScaleSetPriority = &scaleSetPriorityTemp
	} 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 eris.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 eris.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 {
			var virtualMachineNodesStatus VirtualMachineNodes_STATUS
			err := virtualMachineNodesStatus.AssignProperties_From_VirtualMachineNodes_STATUS(&virtualMachineNodesStatusItem)
			if err != nil {
				return eris.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 eris.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 eris.Wrap(err, "calling AssignProperties_From_AgentPoolWindowsProfile_STATUS() to populate field WindowsProfile")
		}
		pool.WindowsProfile = &windowsProfile
	} else {
		pool.WindowsProfile = nil
	}

	// WorkloadRuntime
	if source.WorkloadRuntime != nil {
		workloadRuntime := *source.WorkloadRuntime
		workloadRuntimeTemp := genruntime.ToEnum(workloadRuntime, workloadRuntime_STATUS_Values)
		pool.WorkloadRuntime = &workloadRuntimeTemp
	} else {
		pool.WorkloadRuntime = nil
	}

	// No error
	return nil
}

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

	// ArtifactStreamingProfile
	if pool.ArtifactStreamingProfile != nil {
		var artifactStreamingProfile storage.AgentPoolArtifactStreamingProfile_STATUS
		err := pool.ArtifactStreamingProfile.AssignProperties_To_AgentPoolArtifactStreamingProfile_STATUS(&artifactStreamingProfile)
		if err != nil {
			return eris.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 storage.CreationData_STATUS
		err := pool.CreationData.AssignProperties_To_CreationData_STATUS(&creationDatum)
		if err != nil {
			return eris.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)

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

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

	// GatewayProfile
	if pool.GatewayProfile != nil {
		var gatewayProfile storage.AgentPoolGatewayProfile_STATUS
		err := pool.GatewayProfile.AssignProperties_To_AgentPoolGatewayProfile_STATUS(&gatewayProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_AgentPoolGatewayProfile_STATUS() to populate field GatewayProfile")
		}
		destination.GatewayProfile = &gatewayProfile
	} else {
		destination.GatewayProfile = nil
	}

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

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

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

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

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

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

	// 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 storage.AgentPoolNetworkProfile_STATUS
		err := pool.NetworkProfile.AssignProperties_To_AgentPoolNetworkProfile_STATUS(&networkProfile)
		if err != nil {
			return eris.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
	}

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

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

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

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

	// VirtualMachineNodesStatus
	if pool.VirtualMachineNodesStatus != nil {
		virtualMachineNodesStatusList := make([]storage.VirtualMachineNodes_STATUS, len(pool.VirtualMachineNodesStatus))
		for virtualMachineNodesStatusIndex, virtualMachineNodesStatusItem := range pool.VirtualMachineNodesStatus {
			var virtualMachineNodesStatus storage.VirtualMachineNodes_STATUS
			err := virtualMachineNodesStatusItem.AssignProperties_To_VirtualMachineNodes_STATUS(&virtualMachineNodesStatus)
			if err != nil {
				return eris.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 storage.VirtualMachinesProfile_STATUS
		err := pool.VirtualMachinesProfile.AssignProperties_To_VirtualMachinesProfile_STATUS(&virtualMachinesProfile)
		if err != nil {
			return eris.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 storage.AgentPoolWindowsProfile_STATUS
		err := pool.WindowsProfile.AssignProperties_To_AgentPoolWindowsProfile_STATUS(&windowsProfile)
		if err != nil {
			return eris.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 := &arm.AgentPoolArtifactStreamingProfile{}

	// 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 &arm.AgentPoolArtifactStreamingProfile{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *AgentPoolArtifactStreamingProfile) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.AgentPoolArtifactStreamingProfile)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AgentPoolArtifactStreamingProfile, 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 *storage.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 *storage.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 &arm.AgentPoolArtifactStreamingProfile_STATUS{}
}

// 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.(arm.AgentPoolArtifactStreamingProfile_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AgentPoolArtifactStreamingProfile_STATUS, 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 *storage.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 *storage.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
}

// Profile of the managed cluster gateway agent pool.
type AgentPoolGatewayProfile struct {
	// +kubebuilder:validation:Maximum=31
	// +kubebuilder:validation:Minimum=28
	// PublicIPPrefixSize: The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide
	// public egress. The size of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with
	// one IP from the IPPrefix. The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure
	// public IPPrefix size limitation, the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8
	// nodes/IPs, /28 = 16 nodes/IPs). The default value is 31.
	PublicIPPrefixSize *int `json:"publicIPPrefixSize,omitempty"`
}

var _ genruntime.ARMTransformer = &AgentPoolGatewayProfile{}

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

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

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

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

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

	// No error
	return nil
}

// AssignProperties_From_AgentPoolGatewayProfile populates our AgentPoolGatewayProfile from the provided source AgentPoolGatewayProfile
func (profile *AgentPoolGatewayProfile) AssignProperties_From_AgentPoolGatewayProfile(source *storage.AgentPoolGatewayProfile) error {

	// PublicIPPrefixSize
	profile.PublicIPPrefixSize = genruntime.ClonePointerToInt(source.PublicIPPrefixSize)

	// No error
	return nil
}

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

	// PublicIPPrefixSize
	destination.PublicIPPrefixSize = genruntime.ClonePointerToInt(profile.PublicIPPrefixSize)

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

	// No error
	return nil
}

// Profile of the managed cluster gateway agent pool.
type AgentPoolGatewayProfile_STATUS struct {
	// PublicIPPrefixSize: The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide
	// public egress. The size of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with
	// one IP from the IPPrefix. The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure
	// public IPPrefix size limitation, the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8
	// nodes/IPs, /28 = 16 nodes/IPs). The default value is 31.
	PublicIPPrefixSize *int `json:"publicIPPrefixSize,omitempty"`
}

var _ genruntime.FromARMConverter = &AgentPoolGatewayProfile_STATUS{}

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

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

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

	// No error
	return nil
}

// AssignProperties_From_AgentPoolGatewayProfile_STATUS populates our AgentPoolGatewayProfile_STATUS from the provided source AgentPoolGatewayProfile_STATUS
func (profile *AgentPoolGatewayProfile_STATUS) AssignProperties_From_AgentPoolGatewayProfile_STATUS(source *storage.AgentPoolGatewayProfile_STATUS) error {

	// PublicIPPrefixSize
	profile.PublicIPPrefixSize = genruntime.ClonePointerToInt(source.PublicIPPrefixSize)

	// No error
	return nil
}

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

	// PublicIPPrefixSize
	destination.PublicIPPrefixSize = genruntime.ClonePointerToInt(profile.PublicIPPrefixSize)

	// 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 := &arm.AgentPoolGPUProfile{}

	// 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 &arm.AgentPoolGPUProfile{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *AgentPoolGPUProfile) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.AgentPoolGPUProfile)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AgentPoolGPUProfile, 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 *storage.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 *storage.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 &arm.AgentPoolGPUProfile_STATUS{}
}

// 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.(arm.AgentPoolGPUProfile_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AgentPoolGPUProfile_STATUS, 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 *storage.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 *storage.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={"Gateway","System","User"}
type AgentPoolMode string

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

// Mapping from string to AgentPoolMode
var agentPoolMode_Values = map[string]AgentPoolMode{
	"gateway": AgentPoolMode_Gateway,
	"system":  AgentPoolMode_System,
	"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_Gateway = AgentPoolMode_STATUS("Gateway")
	AgentPoolMode_STATUS_System  = AgentPoolMode_STATUS("System")
	AgentPoolMode_STATUS_User    = AgentPoolMode_STATUS("User")
)

// Mapping from string to AgentPoolMode_STATUS
var agentPoolMode_STATUS_Values = map[string]AgentPoolMode_STATUS{
	"gateway": AgentPoolMode_STATUS_Gateway,
	"system":  AgentPoolMode_STATUS_System,
	"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 := &arm.AgentPoolNetworkProfile{}

	// 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.(*arm.PortRange))
	}

	// 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.(*arm.IPTag))
	}
	return result, nil
}

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

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *AgentPoolNetworkProfile) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.AgentPoolNetworkProfile)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AgentPoolNetworkProfile, 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 *storage.AgentPoolNetworkProfile) error {

	// AllowedHostPorts
	if source.AllowedHostPorts != nil {
		allowedHostPortList := make([]PortRange, len(source.AllowedHostPorts))
		for allowedHostPortIndex, allowedHostPortItem := range source.AllowedHostPorts {
			var allowedHostPort PortRange
			err := allowedHostPort.AssignProperties_From_PortRange(&allowedHostPortItem)
			if err != nil {
				return eris.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 {
			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 {
			var nodePublicIPTag IPTag
			err := nodePublicIPTag.AssignProperties_From_IPTag(&nodePublicIPTagItem)
			if err != nil {
				return eris.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 *storage.AgentPoolNetworkProfile) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// AllowedHostPorts
	if profile.AllowedHostPorts != nil {
		allowedHostPortList := make([]storage.PortRange, len(profile.AllowedHostPorts))
		for allowedHostPortIndex, allowedHostPortItem := range profile.AllowedHostPorts {
			var allowedHostPort storage.PortRange
			err := allowedHostPortItem.AssignProperties_To_PortRange(&allowedHostPort)
			if err != nil {
				return eris.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 {
			applicationSecurityGroupsReferenceList[applicationSecurityGroupsReferenceIndex] = applicationSecurityGroupsReferenceItem.Copy()
		}
		destination.ApplicationSecurityGroupsReferences = applicationSecurityGroupsReferenceList
	} else {
		destination.ApplicationSecurityGroupsReferences = nil
	}

	// NodePublicIPTags
	if profile.NodePublicIPTags != nil {
		nodePublicIPTagList := make([]storage.IPTag, len(profile.NodePublicIPTags))
		for nodePublicIPTagIndex, nodePublicIPTagItem := range profile.NodePublicIPTags {
			var nodePublicIPTag storage.IPTag
			err := nodePublicIPTagItem.AssignProperties_To_IPTag(&nodePublicIPTag)
			if err != nil {
				return eris.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 &arm.AgentPoolNetworkProfile_STATUS{}
}

// 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.(arm.AgentPoolNetworkProfile_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AgentPoolNetworkProfile_STATUS, 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 *storage.AgentPoolNetworkProfile_STATUS) error {

	// AllowedHostPorts
	if source.AllowedHostPorts != nil {
		allowedHostPortList := make([]PortRange_STATUS, len(source.AllowedHostPorts))
		for allowedHostPortIndex, allowedHostPortItem := range source.AllowedHostPorts {
			var allowedHostPort PortRange_STATUS
			err := allowedHostPort.AssignProperties_From_PortRange_STATUS(&allowedHostPortItem)
			if err != nil {
				return eris.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 {
			var nodePublicIPTag IPTag_STATUS
			err := nodePublicIPTag.AssignProperties_From_IPTag_STATUS(&nodePublicIPTagItem)
			if err != nil {
				return eris.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 *storage.AgentPoolNetworkProfile_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// AllowedHostPorts
	if profile.AllowedHostPorts != nil {
		allowedHostPortList := make([]storage.PortRange_STATUS, len(profile.AllowedHostPorts))
		for allowedHostPortIndex, allowedHostPortItem := range profile.AllowedHostPorts {
			var allowedHostPort storage.PortRange_STATUS
			err := allowedHostPortItem.AssignProperties_To_PortRange_STATUS(&allowedHostPort)
			if err != nil {
				return eris.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([]storage.IPTag_STATUS, len(profile.NodePublicIPTags))
		for nodePublicIPTagIndex, nodePublicIPTagItem := range profile.NodePublicIPTags {
			var nodePublicIPTag storage.IPTag_STATUS
			err := nodePublicIPTagItem.AssignProperties_To_IPTag_STATUS(&nodePublicIPTag)
			if err != nil {
				return eris.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 := &arm.AgentPoolSecurityProfile{}

	// 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 {
		var temp string
		temp = string(*profile.SshAccess)
		sshAccess := arm.AgentPoolSSHAccess(temp)
		result.SshAccess = &sshAccess
	}
	return result, nil
}

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

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *AgentPoolSecurityProfile) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.AgentPoolSecurityProfile)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AgentPoolSecurityProfile, 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 {
		var temp string
		temp = string(*typedInput.SshAccess)
		sshAccess := AgentPoolSSHAccess(temp)
		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 *storage.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 := *source.SshAccess
		sshAccessTemp := genruntime.ToEnum(sshAccess, agentPoolSSHAccess_Values)
		profile.SshAccess = &sshAccessTemp
	} 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 *storage.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 &arm.AgentPoolSecurityProfile_STATUS{}
}

// 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.(arm.AgentPoolSecurityProfile_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AgentPoolSecurityProfile_STATUS, 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 {
		var temp string
		temp = string(*typedInput.SshAccess)
		sshAccess := AgentPoolSSHAccess_STATUS(temp)
		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 *storage.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 := *source.SshAccess
		sshAccessTemp := genruntime.ToEnum(sshAccess, agentPoolSSHAccess_STATUS_Values)
		profile.SshAccess = &sshAccessTemp
	} 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 *storage.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")
)

// Mapping from string to AgentPoolType
var agentPoolType_Values = map[string]AgentPoolType{
	"availabilityset":         AgentPoolType_AvailabilitySet,
	"virtualmachinescalesets": AgentPoolType_VirtualMachineScaleSets,
	"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")
)

// Mapping from string to AgentPoolType_STATUS
var agentPoolType_STATUS_Values = map[string]AgentPoolType_STATUS{
	"availabilityset":         AgentPoolType_STATUS_AvailabilitySet,
	"virtualmachinescalesets": AgentPoolType_STATUS_VirtualMachineScaleSets,
	"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"`

	// UndrainableNodeBehavior: Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable
	// nodes is Pod Disruption Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the
	// remaining per-node drain timeout or pod is still being in a running state, can also cause undrainable nodes.
	UndrainableNodeBehavior *AgentPoolUpgradeSettings_UndrainableNodeBehavior `json:"undrainableNodeBehavior,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 := &arm.AgentPoolUpgradeSettings{}

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

	// Set property "UndrainableNodeBehavior":
	if settings.UndrainableNodeBehavior != nil {
		var temp string
		temp = string(*settings.UndrainableNodeBehavior)
		undrainableNodeBehavior := arm.AgentPoolUpgradeSettings_UndrainableNodeBehavior(temp)
		result.UndrainableNodeBehavior = &undrainableNodeBehavior
	}
	return result, nil
}

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

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (settings *AgentPoolUpgradeSettings) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.AgentPoolUpgradeSettings)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AgentPoolUpgradeSettings, 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
	}

	// Set property "UndrainableNodeBehavior":
	if typedInput.UndrainableNodeBehavior != nil {
		var temp string
		temp = string(*typedInput.UndrainableNodeBehavior)
		undrainableNodeBehavior := AgentPoolUpgradeSettings_UndrainableNodeBehavior(temp)
		settings.UndrainableNodeBehavior = &undrainableNodeBehavior
	}

	// No error
	return nil
}

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

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

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

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

	// UndrainableNodeBehavior
	if source.UndrainableNodeBehavior != nil {
		undrainableNodeBehavior := *source.UndrainableNodeBehavior
		undrainableNodeBehaviorTemp := genruntime.ToEnum(undrainableNodeBehavior, agentPoolUpgradeSettings_UndrainableNodeBehavior_Values)
		settings.UndrainableNodeBehavior = &undrainableNodeBehaviorTemp
	} else {
		settings.UndrainableNodeBehavior = nil
	}

	// No error
	return nil
}

// AssignProperties_To_AgentPoolUpgradeSettings populates the provided destination AgentPoolUpgradeSettings from our AgentPoolUpgradeSettings
func (settings *AgentPoolUpgradeSettings) AssignProperties_To_AgentPoolUpgradeSettings(destination *storage.AgentPoolUpgradeSettings) error {
	// 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)

	// UndrainableNodeBehavior
	if settings.UndrainableNodeBehavior != nil {
		undrainableNodeBehavior := string(*settings.UndrainableNodeBehavior)
		destination.UndrainableNodeBehavior = &undrainableNodeBehavior
	} else {
		destination.UndrainableNodeBehavior = 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"`

	// UndrainableNodeBehavior: Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable
	// nodes is Pod Disruption Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the
	// remaining per-node drain timeout or pod is still being in a running state, can also cause undrainable nodes.
	UndrainableNodeBehavior *AgentPoolUpgradeSettings_UndrainableNodeBehavior_STATUS `json:"undrainableNodeBehavior,omitempty"`
}

var _ genruntime.FromARMConverter = &AgentPoolUpgradeSettings_STATUS{}

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

// 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.(arm.AgentPoolUpgradeSettings_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AgentPoolUpgradeSettings_STATUS, 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
	}

	// Set property "UndrainableNodeBehavior":
	if typedInput.UndrainableNodeBehavior != nil {
		var temp string
		temp = string(*typedInput.UndrainableNodeBehavior)
		undrainableNodeBehavior := AgentPoolUpgradeSettings_UndrainableNodeBehavior_STATUS(temp)
		settings.UndrainableNodeBehavior = &undrainableNodeBehavior
	}

	// 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 *storage.AgentPoolUpgradeSettings_STATUS) error {

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

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

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

	// UndrainableNodeBehavior
	if source.UndrainableNodeBehavior != nil {
		undrainableNodeBehavior := *source.UndrainableNodeBehavior
		undrainableNodeBehaviorTemp := genruntime.ToEnum(undrainableNodeBehavior, agentPoolUpgradeSettings_UndrainableNodeBehavior_STATUS_Values)
		settings.UndrainableNodeBehavior = &undrainableNodeBehaviorTemp
	} else {
		settings.UndrainableNodeBehavior = nil
	}

	// No error
	return nil
}

// AssignProperties_To_AgentPoolUpgradeSettings_STATUS populates the provided destination AgentPoolUpgradeSettings_STATUS from our AgentPoolUpgradeSettings_STATUS
func (settings *AgentPoolUpgradeSettings_STATUS) AssignProperties_To_AgentPoolUpgradeSettings_STATUS(destination *storage.AgentPoolUpgradeSettings_STATUS) error {
	// 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)

	// UndrainableNodeBehavior
	if settings.UndrainableNodeBehavior != nil {
		undrainableNodeBehavior := string(*settings.UndrainableNodeBehavior)
		destination.UndrainableNodeBehavior = &undrainableNodeBehavior
	} else {
		destination.UndrainableNodeBehavior = 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 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 := &arm.AgentPoolWindowsProfile{}

	// 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 &arm.AgentPoolWindowsProfile{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *AgentPoolWindowsProfile) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.AgentPoolWindowsProfile)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AgentPoolWindowsProfile, 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 *storage.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 *storage.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 &arm.AgentPoolWindowsProfile_STATUS{}
}

// 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.(arm.AgentPoolWindowsProfile_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AgentPoolWindowsProfile_STATUS, 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 *storage.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 *storage.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")
)

// Mapping from string to GPUInstanceProfile
var gPUInstanceProfile_Values = map[string]GPUInstanceProfile{
	"mig1g": GPUInstanceProfile_MIG1G,
	"mig2g": GPUInstanceProfile_MIG2G,
	"mig3g": GPUInstanceProfile_MIG3G,
	"mig4g": GPUInstanceProfile_MIG4G,
	"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")
)

// Mapping from string to GPUInstanceProfile_STATUS
var gPUInstanceProfile_STATUS_Values = map[string]GPUInstanceProfile_STATUS{
	"mig1g": GPUInstanceProfile_STATUS_MIG1G,
	"mig2g": GPUInstanceProfile_STATUS_MIG2G,
	"mig3g": GPUInstanceProfile_STATUS_MIG3G,
	"mig4g": GPUInstanceProfile_STATUS_MIG4G,
	"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 := &arm.KubeletConfig{}

	// 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 &arm.KubeletConfig{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (config *KubeletConfig) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.KubeletConfig)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.KubeletConfig, 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 *storage.KubeletConfig) 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 populates the provided destination KubeletConfig from our KubeletConfig
func (config *KubeletConfig) AssignProperties_To_KubeletConfig(destination *storage.KubeletConfig) 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
}

// 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 &arm.KubeletConfig_STATUS{}
}

// 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.(arm.KubeletConfig_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.KubeletConfig_STATUS, 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 *storage.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 *storage.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")
)

// Mapping from string to KubeletDiskType
var kubeletDiskType_Values = map[string]KubeletDiskType{
	"os":        KubeletDiskType_OS,
	"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")
)

// Mapping from string to KubeletDiskType_STATUS
var kubeletDiskType_STATUS_Values = map[string]KubeletDiskType_STATUS{
	"os":        KubeletDiskType_STATUS_OS,
	"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 := &arm.LinuxOSConfig{}

	// 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.(*arm.SysctlConfig)
		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 &arm.LinuxOSConfig{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (config *LinuxOSConfig) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.LinuxOSConfig)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.LinuxOSConfig, 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 *storage.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 eris.Wrap(err, "calling AssignProperties_From_SysctlConfig() to populate field Sysctls")
		}
		config.Sysctls = &sysctl
	} else {
		config.Sysctls = nil
	}

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

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

	// No error
	return nil
}

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

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

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

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

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

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

	// 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 &arm.LinuxOSConfig_STATUS{}
}

// 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.(arm.LinuxOSConfig_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.LinuxOSConfig_STATUS, 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 *storage.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 eris.Wrap(err, "calling AssignProperties_From_SysctlConfig_STATUS() to populate field Sysctls")
		}
		config.Sysctls = &sysctl
	} else {
		config.Sysctls = nil
	}

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

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

	// No error
	return nil
}

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

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

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

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

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

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

	// No error
	return nil
}

// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure
type ManagedClustersAgentPoolOperatorSpec struct {
	// ConfigMapExpressions: configures where to place operator written dynamic ConfigMaps (created with CEL expressions).
	ConfigMapExpressions []*core.DestinationExpression `json:"configMapExpressions,omitempty"`

	// SecretExpressions: configures where to place operator written dynamic secrets (created with CEL expressions).
	SecretExpressions []*core.DestinationExpression `json:"secretExpressions,omitempty"`
}

// AssignProperties_From_ManagedClustersAgentPoolOperatorSpec populates our ManagedClustersAgentPoolOperatorSpec from the provided source ManagedClustersAgentPoolOperatorSpec
func (operator *ManagedClustersAgentPoolOperatorSpec) AssignProperties_From_ManagedClustersAgentPoolOperatorSpec(source *storage.ManagedClustersAgentPoolOperatorSpec) error {

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

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

	// No error
	return nil
}

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

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

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

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

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

// Mapping from string to OSDiskType
var oSDiskType_Values = map[string]OSDiskType{
	"ephemeral": OSDiskType_Ephemeral,
	"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")
)

// Mapping from string to OSDiskType_STATUS
var oSDiskType_STATUS_Values = map[string]OSDiskType_STATUS{
	"ephemeral": OSDiskType_STATUS_Ephemeral,
	"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")
)

// Mapping from string to OSSKU
var oSSKU_Values = map[string]OSSKU{
	"azurelinux":    OSSKU_AzureLinux,
	"cblmariner":    OSSKU_CBLMariner,
	"mariner":       OSSKU_Mariner,
	"ubuntu":        OSSKU_Ubuntu,
	"windows2019":   OSSKU_Windows2019,
	"windows2022":   OSSKU_Windows2022,
	"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")
)

// Mapping from string to OSSKU_STATUS
var oSSKU_STATUS_Values = map[string]OSSKU_STATUS{
	"azurelinux":    OSSKU_STATUS_AzureLinux,
	"cblmariner":    OSSKU_STATUS_CBLMariner,
	"mariner":       OSSKU_STATUS_Mariner,
	"ubuntu":        OSSKU_STATUS_Ubuntu,
	"windows2019":   OSSKU_STATUS_Windows2019,
	"windows2022":   OSSKU_STATUS_Windows2022,
	"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")
)

// Mapping from string to OSType
var oSType_Values = map[string]OSType{
	"linux":   OSType_Linux,
	"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")
)

// Mapping from string to OSType_STATUS
var oSType_STATUS_Values = map[string]OSType_STATUS{
	"linux":   OSType_STATUS_Linux,
	"windows": OSType_STATUS_Windows,
}

// The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is 'DynamicIndividual'.
// +kubebuilder:validation:Enum={"DynamicIndividual","StaticBlock"}
type PodIPAllocationMode string

const (
	PodIPAllocationMode_DynamicIndividual = PodIPAllocationMode("DynamicIndividual")
	PodIPAllocationMode_StaticBlock       = PodIPAllocationMode("StaticBlock")
)

// Mapping from string to PodIPAllocationMode
var podIPAllocationMode_Values = map[string]PodIPAllocationMode{
	"dynamicindividual": PodIPAllocationMode_DynamicIndividual,
	"staticblock":       PodIPAllocationMode_StaticBlock,
}

// The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is 'DynamicIndividual'.
type PodIPAllocationMode_STATUS string

const (
	PodIPAllocationMode_STATUS_DynamicIndividual = PodIPAllocationMode_STATUS("DynamicIndividual")
	PodIPAllocationMode_STATUS_StaticBlock       = PodIPAllocationMode_STATUS("StaticBlock")
)

// Mapping from string to PodIPAllocationMode_STATUS
var podIPAllocationMode_STATUS_Values = map[string]PodIPAllocationMode_STATUS{
	"dynamicindividual": PodIPAllocationMode_STATUS_DynamicIndividual,
	"staticblock":       PodIPAllocationMode_STATUS_StaticBlock,
}

// 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 := &arm.PowerState{}

	// Set property "Code":
	if state.Code != nil {
		var temp string
		temp = string(*state.Code)
		code := arm.PowerState_Code(temp)
		result.Code = &code
	}
	return result, nil
}

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

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

	// Set property "Code":
	if typedInput.Code != nil {
		var temp string
		temp = string(*typedInput.Code)
		code := PowerState_Code(temp)
		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 *storage.PowerState) error {

	// Code
	if source.Code != nil {
		code := *source.Code
		codeTemp := genruntime.ToEnum(code, powerState_Code_Values)
		state.Code = &codeTemp
	} 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 *storage.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")
)

// Mapping from string to ScaleDownMode
var scaleDownMode_Values = map[string]ScaleDownMode{
	"deallocate": ScaleDownMode_Deallocate,
	"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")
)

// Mapping from string to ScaleDownMode_STATUS
var scaleDownMode_STATUS_Values = map[string]ScaleDownMode_STATUS{
	"deallocate": ScaleDownMode_STATUS_Deallocate,
	"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")
)

// Mapping from string to ScaleSetEvictionPolicy
var scaleSetEvictionPolicy_Values = map[string]ScaleSetEvictionPolicy{
	"deallocate": ScaleSetEvictionPolicy_Deallocate,
	"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")
)

// Mapping from string to ScaleSetEvictionPolicy_STATUS
var scaleSetEvictionPolicy_STATUS_Values = map[string]ScaleSetEvictionPolicy_STATUS{
	"deallocate": ScaleSetEvictionPolicy_STATUS_Deallocate,
	"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")
)

// Mapping from string to ScaleSetPriority
var scaleSetPriority_Values = map[string]ScaleSetPriority{
	"regular": ScaleSetPriority_Regular,
	"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")
)

// Mapping from string to ScaleSetPriority_STATUS
var scaleSetPriority_STATUS_Values = map[string]ScaleSetPriority_STATUS{
	"regular": ScaleSetPriority_STATUS_Regular,
	"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 := &arm.VirtualMachineNodes{}

	// 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 &arm.VirtualMachineNodes{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (nodes *VirtualMachineNodes) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.VirtualMachineNodes)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.VirtualMachineNodes, 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 *storage.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 *storage.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 &arm.VirtualMachineNodes_STATUS{}
}

// 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.(arm.VirtualMachineNodes_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.VirtualMachineNodes_STATUS, 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 *storage.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 *storage.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 := &arm.VirtualMachinesProfile{}

	// Set property "Scale":
	if profile.Scale != nil {
		scale_ARM, err := profile.Scale.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		scale := *scale_ARM.(*arm.ScaleProfile)
		result.Scale = &scale
	}
	return result, nil
}

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

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *VirtualMachinesProfile) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.VirtualMachinesProfile)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.VirtualMachinesProfile, 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 *storage.VirtualMachinesProfile) error {

	// Scale
	if source.Scale != nil {
		var scale ScaleProfile
		err := scale.AssignProperties_From_ScaleProfile(source.Scale)
		if err != nil {
			return eris.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 *storage.VirtualMachinesProfile) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Scale
	if profile.Scale != nil {
		var scale storage.ScaleProfile
		err := profile.Scale.AssignProperties_To_ScaleProfile(&scale)
		if err != nil {
			return eris.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 &arm.VirtualMachinesProfile_STATUS{}
}

// 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.(arm.VirtualMachinesProfile_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.VirtualMachinesProfile_STATUS, 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 *storage.VirtualMachinesProfile_STATUS) error {

	// Scale
	if source.Scale != nil {
		var scale ScaleProfile_STATUS
		err := scale.AssignProperties_From_ScaleProfile_STATUS(source.Scale)
		if err != nil {
			return eris.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 *storage.VirtualMachinesProfile_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Scale
	if profile.Scale != nil {
		var scale storage.ScaleProfile_STATUS
		err := profile.Scale.AssignProperties_To_ScaleProfile_STATUS(&scale)
		if err != nil {
			return eris.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")
)

// Mapping from string to WorkloadRuntime
var workloadRuntime_Values = map[string]WorkloadRuntime{
	"katamshvvmisolation": WorkloadRuntime_KataMshvVmIsolation,
	"ocicontainer":        WorkloadRuntime_OCIContainer,
	"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")
)

// Mapping from string to WorkloadRuntime_STATUS
var workloadRuntime_STATUS_Values = map[string]WorkloadRuntime_STATUS{
	"katamshvvmisolation": WorkloadRuntime_STATUS_KataMshvVmIsolation,
	"ocicontainer":        WorkloadRuntime_STATUS_OCIContainer,
	"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")
)

// Mapping from string to AgentPoolSSHAccess
var agentPoolSSHAccess_Values = map[string]AgentPoolSSHAccess{
	"disabled":  AgentPoolSSHAccess_Disabled,
	"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")
)

// Mapping from string to AgentPoolSSHAccess_STATUS
var agentPoolSSHAccess_STATUS_Values = map[string]AgentPoolSSHAccess_STATUS{
	"disabled":  AgentPoolSSHAccess_STATUS_Disabled,
	"localuser": AgentPoolSSHAccess_STATUS_LocalUser,
}

// +kubebuilder:validation:Enum={"Cordon","Schedule"}
type AgentPoolUpgradeSettings_UndrainableNodeBehavior string

const (
	AgentPoolUpgradeSettings_UndrainableNodeBehavior_Cordon   = AgentPoolUpgradeSettings_UndrainableNodeBehavior("Cordon")
	AgentPoolUpgradeSettings_UndrainableNodeBehavior_Schedule = AgentPoolUpgradeSettings_UndrainableNodeBehavior("Schedule")
)

// Mapping from string to AgentPoolUpgradeSettings_UndrainableNodeBehavior
var agentPoolUpgradeSettings_UndrainableNodeBehavior_Values = map[string]AgentPoolUpgradeSettings_UndrainableNodeBehavior{
	"cordon":   AgentPoolUpgradeSettings_UndrainableNodeBehavior_Cordon,
	"schedule": AgentPoolUpgradeSettings_UndrainableNodeBehavior_Schedule,
}

type AgentPoolUpgradeSettings_UndrainableNodeBehavior_STATUS string

const (
	AgentPoolUpgradeSettings_UndrainableNodeBehavior_STATUS_Cordon   = AgentPoolUpgradeSettings_UndrainableNodeBehavior_STATUS("Cordon")
	AgentPoolUpgradeSettings_UndrainableNodeBehavior_STATUS_Schedule = AgentPoolUpgradeSettings_UndrainableNodeBehavior_STATUS("Schedule")
)

// Mapping from string to AgentPoolUpgradeSettings_UndrainableNodeBehavior_STATUS
var agentPoolUpgradeSettings_UndrainableNodeBehavior_STATUS_Values = map[string]AgentPoolUpgradeSettings_UndrainableNodeBehavior_STATUS{
	"cordon":   AgentPoolUpgradeSettings_UndrainableNodeBehavior_STATUS_Cordon,
	"schedule": AgentPoolUpgradeSettings_UndrainableNodeBehavior_STATUS_Schedule,
}

// 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 := &arm.IPTag{}

	// 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 &arm.IPTag{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (ipTag *IPTag) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.IPTag)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IPTag, 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 *storage.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 *storage.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 &arm.IPTag_STATUS{}
}

// 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.(arm.IPTag_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IPTag_STATUS, 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 *storage.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 *storage.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 := &arm.PortRange{}

	// 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 {
		var temp string
		temp = string(*portRange.Protocol)
		protocol := arm.PortRange_Protocol(temp)
		result.Protocol = &protocol
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (portRange *PortRange) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.PortRange{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (portRange *PortRange) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.PortRange)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.PortRange, 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 {
		var temp string
		temp = string(*typedInput.Protocol)
		protocol := PortRange_Protocol(temp)
		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 *storage.PortRange) error {

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

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

	// Protocol
	if source.Protocol != nil {
		protocol := *source.Protocol
		protocolTemp := genruntime.ToEnum(protocol, portRange_Protocol_Values)
		portRange.Protocol = &protocolTemp
	} 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 *storage.PortRange) 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
}

// 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 &arm.PortRange_STATUS{}
}

// 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.(arm.PortRange_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.PortRange_STATUS, 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 {
		var temp string
		temp = string(*typedInput.Protocol)
		protocol := PortRange_Protocol_STATUS(temp)
		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 *storage.PortRange_STATUS) error {

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

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

	// Protocol
	if source.Protocol != nil {
		protocol := *source.Protocol
		protocolTemp := genruntime.ToEnum(protocol, portRange_Protocol_STATUS_Values)
		portRange.Protocol = &protocolTemp
	} 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 *storage.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")
)

// Mapping from string to PowerState_Code
var powerState_Code_Values = map[string]PowerState_Code{
	"running": PowerState_Code_Running,
	"stopped": PowerState_Code_Stopped,
}

// Specifications on how to scale a VirtualMachines agent pool.
type ScaleProfile struct {
	// Autoscale: Specifications on how to auto-scale the VirtualMachines agent pool within a predefined size range. Currently,
	// at most one AutoScaleProfile is allowed.
	Autoscale []AutoScaleProfile `json:"autoscale,omitempty"`

	// 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 := &arm.ScaleProfile{}

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

	// 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.(*arm.ManualScaleProfile))
	}
	return result, nil
}

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

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

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

	// 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 *storage.ScaleProfile) error {

	// Autoscale
	if source.Autoscale != nil {
		autoscaleList := make([]AutoScaleProfile, len(source.Autoscale))
		for autoscaleIndex, autoscaleItem := range source.Autoscale {
			var autoscale AutoScaleProfile
			err := autoscale.AssignProperties_From_AutoScaleProfile(&autoscaleItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_AutoScaleProfile() to populate field Autoscale")
			}
			autoscaleList[autoscaleIndex] = autoscale
		}
		profile.Autoscale = autoscaleList
	} else {
		profile.Autoscale = nil
	}

	// Manual
	if source.Manual != nil {
		manualList := make([]ManualScaleProfile, len(source.Manual))
		for manualIndex, manualItem := range source.Manual {
			var manual ManualScaleProfile
			err := manual.AssignProperties_From_ManualScaleProfile(&manualItem)
			if err != nil {
				return eris.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 *storage.ScaleProfile) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Autoscale
	if profile.Autoscale != nil {
		autoscaleList := make([]storage.AutoScaleProfile, len(profile.Autoscale))
		for autoscaleIndex, autoscaleItem := range profile.Autoscale {
			var autoscale storage.AutoScaleProfile
			err := autoscaleItem.AssignProperties_To_AutoScaleProfile(&autoscale)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_AutoScaleProfile() to populate field Autoscale")
			}
			autoscaleList[autoscaleIndex] = autoscale
		}
		destination.Autoscale = autoscaleList
	} else {
		destination.Autoscale = nil
	}

	// Manual
	if profile.Manual != nil {
		manualList := make([]storage.ManualScaleProfile, len(profile.Manual))
		for manualIndex, manualItem := range profile.Manual {
			var manual storage.ManualScaleProfile
			err := manualItem.AssignProperties_To_ManualScaleProfile(&manual)
			if err != nil {
				return eris.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 {
	// Autoscale: Specifications on how to auto-scale the VirtualMachines agent pool within a predefined size range. Currently,
	// at most one AutoScaleProfile is allowed.
	Autoscale []AutoScaleProfile_STATUS `json:"autoscale,omitempty"`

	// 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 &arm.ScaleProfile_STATUS{}
}

// 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.(arm.ScaleProfile_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ScaleProfile_STATUS, got %T", armInput)
	}

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

	// 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 *storage.ScaleProfile_STATUS) error {

	// Autoscale
	if source.Autoscale != nil {
		autoscaleList := make([]AutoScaleProfile_STATUS, len(source.Autoscale))
		for autoscaleIndex, autoscaleItem := range source.Autoscale {
			var autoscale AutoScaleProfile_STATUS
			err := autoscale.AssignProperties_From_AutoScaleProfile_STATUS(&autoscaleItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_AutoScaleProfile_STATUS() to populate field Autoscale")
			}
			autoscaleList[autoscaleIndex] = autoscale
		}
		profile.Autoscale = autoscaleList
	} else {
		profile.Autoscale = nil
	}

	// Manual
	if source.Manual != nil {
		manualList := make([]ManualScaleProfile_STATUS, len(source.Manual))
		for manualIndex, manualItem := range source.Manual {
			var manual ManualScaleProfile_STATUS
			err := manual.AssignProperties_From_ManualScaleProfile_STATUS(&manualItem)
			if err != nil {
				return eris.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 *storage.ScaleProfile_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Autoscale
	if profile.Autoscale != nil {
		autoscaleList := make([]storage.AutoScaleProfile_STATUS, len(profile.Autoscale))
		for autoscaleIndex, autoscaleItem := range profile.Autoscale {
			var autoscale storage.AutoScaleProfile_STATUS
			err := autoscaleItem.AssignProperties_To_AutoScaleProfile_STATUS(&autoscale)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_AutoScaleProfile_STATUS() to populate field Autoscale")
			}
			autoscaleList[autoscaleIndex] = autoscale
		}
		destination.Autoscale = autoscaleList
	} else {
		destination.Autoscale = nil
	}

	// Manual
	if profile.Manual != nil {
		manualList := make([]storage.ManualScaleProfile_STATUS, len(profile.Manual))
		for manualIndex, manualItem := range profile.Manual {
			var manual storage.ManualScaleProfile_STATUS
			err := manualItem.AssignProperties_To_ManualScaleProfile_STATUS(&manual)
			if err != nil {
				return eris.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 := &arm.SysctlConfig{}

	// 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 &arm.SysctlConfig{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (config *SysctlConfig) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.SysctlConfig)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.SysctlConfig, 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 *storage.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
	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 populates the provided destination SysctlConfig from our SysctlConfig
func (config *SysctlConfig) AssignProperties_To_SysctlConfig(destination *storage.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
	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
}

// 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 &arm.SysctlConfig_STATUS{}
}

// 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.(arm.SysctlConfig_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.SysctlConfig_STATUS, 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 *storage.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 *storage.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 auto-scaling.
type AutoScaleProfile struct {
	// MaxCount: The maximum number of nodes of the specified sizes.
	MaxCount *int `json:"maxCount,omitempty"`

	// MinCount: The minimum number of nodes of the specified sizes.
	MinCount *int `json:"minCount,omitempty"`

	// Sizes: The list of allowed vm sizes e.g. ['Standard_E4s_v3', 'Standard_E16s_v3', 'Standard_D16s_v5']. AKS will use the
	// first available one when auto 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 = &AutoScaleProfile{}

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

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

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

	// 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 *AutoScaleProfile) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.AutoScaleProfile{}
}

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

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

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

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

	// No error
	return nil
}

// AssignProperties_From_AutoScaleProfile populates our AutoScaleProfile from the provided source AutoScaleProfile
func (profile *AutoScaleProfile) AssignProperties_From_AutoScaleProfile(source *storage.AutoScaleProfile) error {

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

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

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

	// No error
	return nil
}

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

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

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

	// 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 auto-scaling.
type AutoScaleProfile_STATUS struct {
	// MaxCount: The maximum number of nodes of the specified sizes.
	MaxCount *int `json:"maxCount,omitempty"`

	// MinCount: The minimum number of nodes of the specified sizes.
	MinCount *int `json:"minCount,omitempty"`

	// Sizes: The list of allowed vm sizes e.g. ['Standard_E4s_v3', 'Standard_E16s_v3', 'Standard_D16s_v5']. AKS will use the
	// first available one when auto 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 = &AutoScaleProfile_STATUS{}

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

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

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

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

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

	// No error
	return nil
}

// AssignProperties_From_AutoScaleProfile_STATUS populates our AutoScaleProfile_STATUS from the provided source AutoScaleProfile_STATUS
func (profile *AutoScaleProfile_STATUS) AssignProperties_From_AutoScaleProfile_STATUS(source *storage.AutoScaleProfile_STATUS) error {

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

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

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

	// No error
	return nil
}

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

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

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

	// 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 struct {
	// Count: Number of nodes.
	Count *int `json:"count,omitempty"`

	// Sizes: The list of allowed vm sizes e.g. ['Standard_E4s_v3', 'Standard_E16s_v3', 'Standard_D16s_v5']. 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 := &arm.ManualScaleProfile{}

	// 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 &arm.ManualScaleProfile{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *ManualScaleProfile) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManualScaleProfile)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManualScaleProfile, 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 *storage.ManualScaleProfile) error {

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

	// 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 *storage.ManualScaleProfile) 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
}

// 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 e.g. ['Standard_E4s_v3', 'Standard_E16s_v3', 'Standard_D16s_v5']. 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 &arm.ManualScaleProfile_STATUS{}
}

// 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.(arm.ManualScaleProfile_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManualScaleProfile_STATUS, 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 *storage.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 *storage.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")
)

// Mapping from string to PortRange_Protocol
var portRange_Protocol_Values = map[string]PortRange_Protocol{
	"tcp": PortRange_Protocol_TCP,
	"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")
)

// Mapping from string to PortRange_Protocol_STATUS
var portRange_Protocol_STATUS_Values = map[string]PortRange_Protocol_STATUS{
	"tcp": PortRange_Protocol_STATUS_TCP,
	"udp": PortRange_Protocol_STATUS_UDP,
}

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