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

import (
	"context"
	"fmt"
	arm "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20231001/arm"
	storage "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20231001/storage"
	"github.com/Azure/azure-service-operator/v2/internal/genericarmclient"
	"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/go-logr/logr"
	"github.com/rotisserie/eris"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime/schema"
	"sigs.k8s.io/controller-runtime/pkg/client"
	"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/stable/2023-10-01/managedClusters.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}
type ManagedCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ManagedCluster_Spec   `json:"spec,omitempty"`
	Status            ManagedCluster_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &ManagedCluster{}

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

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

var _ conversion.Convertible = &ManagedCluster{}

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

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

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

	return nil
}

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

	return nil
}

var _ configmaps.Exporter = &ManagedCluster{}

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

var _ secrets.Exporter = &ManagedCluster{}

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

var _ genruntime.KubernetesConfigExporter = &ManagedCluster{}

// ExportKubernetesConfigMaps defines a resource which can create ConfigMaps in Kubernetes.
func (cluster *ManagedCluster) ExportKubernetesConfigMaps(_ context.Context, _ genruntime.MetaObject, _ *genericarmclient.GenericClient, _ logr.Logger) ([]client.Object, error) {
	collector := configmaps.NewCollector(cluster.Namespace)
	if cluster.Spec.OperatorSpec != nil && cluster.Spec.OperatorSpec.ConfigMaps != nil {
		if cluster.Status.OidcIssuerProfile != nil {
			if cluster.Status.OidcIssuerProfile.IssuerURL != nil {
				collector.AddValue(cluster.Spec.OperatorSpec.ConfigMaps.OIDCIssuerProfile, *cluster.Status.OidcIssuerProfile.IssuerURL)
			}
		}
	}
	if cluster.Spec.OperatorSpec != nil && cluster.Spec.OperatorSpec.ConfigMaps != nil {
		if cluster.Status.Identity != nil {
			if cluster.Status.Identity.PrincipalId != nil {
				collector.AddValue(cluster.Spec.OperatorSpec.ConfigMaps.PrincipalId, *cluster.Status.Identity.PrincipalId)
			}
		}
	}
	result, err := collector.Values()
	if err != nil {
		return nil, err
	}
	return configmaps.SliceToClientObjectSlice(result), nil
}

var _ genruntime.KubernetesResource = &ManagedCluster{}

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

// GetAPIVersion returns the ARM API version of the resource. This is always "2023-10-01"
func (cluster ManagedCluster) GetAPIVersion() string {
	return "2023-10-01"
}

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

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

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

// GetSupportedOperations returns the operations supported by the resource
func (cluster *ManagedCluster) 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"
func (cluster *ManagedCluster) GetType() string {
	return "Microsoft.ContainerService/managedClusters"
}

// NewEmptyStatus returns a new empty (blank) status
func (cluster *ManagedCluster) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &ManagedCluster_STATUS{}
}

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

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

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

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

	cluster.Status = st
	return nil
}

// AssignProperties_From_ManagedCluster populates our ManagedCluster from the provided source ManagedCluster
func (cluster *ManagedCluster) AssignProperties_From_ManagedCluster(source *storage.ManagedCluster) error {

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

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

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

	// No error
	return nil
}

// AssignProperties_To_ManagedCluster populates the provided destination ManagedCluster from our ManagedCluster
func (cluster *ManagedCluster) AssignProperties_To_ManagedCluster(destination *storage.ManagedCluster) error {

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

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

	// Status
	var status storage.ManagedCluster_STATUS
	err = cluster.Status.AssignProperties_To_ManagedCluster_STATUS(&status)
	if err != nil {
		return eris.Wrap(err, "calling AssignProperties_To_ManagedCluster_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 (cluster *ManagedCluster) OriginalGVK() *schema.GroupVersionKind {
	return &schema.GroupVersionKind{
		Group:   GroupVersion.Group,
		Version: cluster.Spec.OriginalVersion(),
		Kind:    "ManagedCluster",
	}
}

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

// +kubebuilder:validation:Enum={"2023-10-01"}
type APIVersion string

const APIVersion_Value = APIVersion("2023-10-01")

type ManagedCluster_Spec struct {
	// AadProfile: The Azure Active Directory configuration.
	AadProfile *ManagedClusterAADProfile `json:"aadProfile,omitempty"`

	// AddonProfiles: The profile of managed cluster add-on.
	AddonProfiles map[string]ManagedClusterAddonProfile `json:"addonProfiles,omitempty"`

	// AgentPoolProfiles: The agent pool properties.
	AgentPoolProfiles []ManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"`

	// ApiServerAccessProfile: The access profile for managed cluster API server.
	ApiServerAccessProfile *ManagedClusterAPIServerAccessProfile `json:"apiServerAccessProfile,omitempty"`

	// AutoScalerProfile: Parameters to be applied to the cluster-autoscaler when enabled
	AutoScalerProfile *ManagedClusterProperties_AutoScalerProfile `json:"autoScalerProfile,omitempty"`

	// AutoUpgradeProfile: The auto upgrade configuration.
	AutoUpgradeProfile *ManagedClusterAutoUpgradeProfile `json:"autoUpgradeProfile,omitempty"`

	// AzureMonitorProfile: Azure Monitor addon profiles for monitoring the managed cluster.
	AzureMonitorProfile *ManagedClusterAzureMonitorProfile `json:"azureMonitorProfile,omitempty"`

	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:Pattern="^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"
	// 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"`

	// DisableLocalAccounts: If set to true, getting static credentials will be disabled for this cluster. This must only be
	// used on Managed Clusters that are AAD enabled. For more details see [disable local
	// accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview).
	DisableLocalAccounts *bool `json:"disableLocalAccounts,omitempty"`

	// DiskEncryptionSetReference: This is of the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'
	DiskEncryptionSetReference *genruntime.ResourceReference `armReference:"DiskEncryptionSetID" json:"diskEncryptionSetReference,omitempty"`

	// DnsPrefix: This cannot be updated once the Managed Cluster has been created.
	DnsPrefix *string `json:"dnsPrefix,omitempty"`

	// EnablePodSecurityPolicy: (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was
	// deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and
	// https://aka.ms/aks/psp.
	EnablePodSecurityPolicy *bool `json:"enablePodSecurityPolicy,omitempty"`

	// EnableRBAC: Whether to enable Kubernetes Role-Based Access Control.
	EnableRBAC *bool `json:"enableRBAC,omitempty"`

	// ExtendedLocation: The extended location of the Virtual Machine.
	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`

	// FqdnSubdomain: This cannot be updated once the Managed Cluster has been created.
	FqdnSubdomain *string `json:"fqdnSubdomain,omitempty"`

	// HttpProxyConfig: Configurations for provisioning the cluster with HTTP proxy servers.
	HttpProxyConfig *ManagedClusterHTTPProxyConfig `json:"httpProxyConfig,omitempty"`

	// Identity: The identity of the managed cluster, if configured.
	Identity *ManagedClusterIdentity `json:"identity,omitempty"`

	// IdentityProfile: Identities associated with the cluster.
	IdentityProfile map[string]UserAssignedIdentity `json:"identityProfile,omitempty"`

	// KubernetesVersion: Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported.
	// When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the cluster
	// with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer
	// patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All
	// upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or
	// 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS
	// cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details.
	KubernetesVersion *string `json:"kubernetesVersion,omitempty"`

	// LinuxProfile: The profile for Linux VMs in the Managed Cluster.
	LinuxProfile *ContainerServiceLinuxProfile `json:"linuxProfile,omitempty"`

	// +kubebuilder:validation:Required
	// Location: The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// NetworkProfile: The network configuration profile.
	NetworkProfile *ContainerServiceNetworkProfile `json:"networkProfile,omitempty"`

	// NodeResourceGroup: The name of the resource group containing agent pool nodes.
	NodeResourceGroup *string `json:"nodeResourceGroup,omitempty"`

	// OidcIssuerProfile: The OIDC issuer profile of the Managed Cluster.
	OidcIssuerProfile *ManagedClusterOIDCIssuerProfile `json:"oidcIssuerProfile,omitempty"`

	// OperatorSpec: The specification for configuring operator behavior. This field is interpreted by the operator and not
	// passed directly to Azure
	OperatorSpec *ManagedClusterOperatorSpec `json:"operatorSpec,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 resources.azure.com/ResourceGroup resource
	Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"`

	// PodIdentityProfile: See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more
	// details on AAD pod identity integration.
	PodIdentityProfile *ManagedClusterPodIdentityProfile `json:"podIdentityProfile,omitempty"`

	// PrivateLinkResources: Private link resources associated with the cluster.
	PrivateLinkResources []PrivateLinkResource `json:"privateLinkResources,omitempty"`

	// PublicNetworkAccess: Allow or deny public network access for AKS
	PublicNetworkAccess *ManagedClusterProperties_PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`

	// SecurityProfile: Security profile for the managed cluster.
	SecurityProfile *ManagedClusterSecurityProfile `json:"securityProfile,omitempty"`

	// ServiceMeshProfile: Service mesh profile for a managed cluster.
	ServiceMeshProfile *ServiceMeshProfile `json:"serviceMeshProfile,omitempty"`

	// ServicePrincipalProfile: Information about a service principal identity for the cluster to use for manipulating Azure
	// APIs.
	ServicePrincipalProfile *ManagedClusterServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`

	// Sku: The managed cluster SKU.
	Sku *ManagedClusterSKU `json:"sku,omitempty"`

	// StorageProfile: Storage profile for the managed cluster.
	StorageProfile *ManagedClusterStorageProfile `json:"storageProfile,omitempty"`

	// SupportPlan: The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'.
	SupportPlan *KubernetesSupportPlan `json:"supportPlan,omitempty"`

	// Tags: Resource tags.
	Tags map[string]string `json:"tags,omitempty" serializationType:"explicitEmptyCollection"`

	// UpgradeSettings: Settings for upgrading a cluster.
	UpgradeSettings *ClusterUpgradeSettings `json:"upgradeSettings,omitempty"`

	// WindowsProfile: The profile for Windows VMs in the Managed Cluster.
	WindowsProfile *ManagedClusterWindowsProfile `json:"windowsProfile,omitempty"`

	// WorkloadAutoScalerProfile: Workload Auto-scaler profile for the managed cluster.
	WorkloadAutoScalerProfile *ManagedClusterWorkloadAutoScalerProfile `json:"workloadAutoScalerProfile,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedCluster_Spec{}

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

	// Set property "ExtendedLocation":
	if cluster.ExtendedLocation != nil {
		extendedLocation_ARM, err := cluster.ExtendedLocation.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		extendedLocation := *extendedLocation_ARM.(*arm.ExtendedLocation)
		result.ExtendedLocation = &extendedLocation
	}

	// Set property "Identity":
	if cluster.Identity != nil {
		identity_ARM, err := cluster.Identity.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		identity := *identity_ARM.(*arm.ManagedClusterIdentity)
		result.Identity = &identity
	}

	// Set property "Location":
	if cluster.Location != nil {
		location := *cluster.Location
		result.Location = &location
	}

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

	// Set property "Properties":
	if cluster.AadProfile != nil ||
		cluster.AddonProfiles != nil ||
		cluster.AgentPoolProfiles != nil ||
		cluster.ApiServerAccessProfile != nil ||
		cluster.AutoScalerProfile != nil ||
		cluster.AutoUpgradeProfile != nil ||
		cluster.AzureMonitorProfile != nil ||
		cluster.DisableLocalAccounts != nil ||
		cluster.DiskEncryptionSetReference != nil ||
		cluster.DnsPrefix != nil ||
		cluster.EnablePodSecurityPolicy != nil ||
		cluster.EnableRBAC != nil ||
		cluster.FqdnSubdomain != nil ||
		cluster.HttpProxyConfig != nil ||
		cluster.IdentityProfile != nil ||
		cluster.KubernetesVersion != nil ||
		cluster.LinuxProfile != nil ||
		cluster.NetworkProfile != nil ||
		cluster.NodeResourceGroup != nil ||
		cluster.OidcIssuerProfile != nil ||
		cluster.PodIdentityProfile != nil ||
		cluster.PrivateLinkResources != nil ||
		cluster.PublicNetworkAccess != nil ||
		cluster.SecurityProfile != nil ||
		cluster.ServiceMeshProfile != nil ||
		cluster.ServicePrincipalProfile != nil ||
		cluster.StorageProfile != nil ||
		cluster.SupportPlan != nil ||
		cluster.UpgradeSettings != nil ||
		cluster.WindowsProfile != nil ||
		cluster.WorkloadAutoScalerProfile != nil {
		result.Properties = &arm.ManagedClusterProperties{}
	}
	if cluster.AadProfile != nil {
		aadProfile_ARM, err := cluster.AadProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		aadProfile := *aadProfile_ARM.(*arm.ManagedClusterAADProfile)
		result.Properties.AadProfile = &aadProfile
	}
	if cluster.AddonProfiles != nil {
		result.Properties.AddonProfiles = make(map[string]arm.ManagedClusterAddonProfile, len(cluster.AddonProfiles))
		for key, value := range cluster.AddonProfiles {
			value_ARM, err := value.ConvertToARM(resolved)
			if err != nil {
				return nil, err
			}
			result.Properties.AddonProfiles[key] = *value_ARM.(*arm.ManagedClusterAddonProfile)
		}
	}
	for _, item := range cluster.AgentPoolProfiles {
		item_ARM, err := item.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		result.Properties.AgentPoolProfiles = append(result.Properties.AgentPoolProfiles, *item_ARM.(*arm.ManagedClusterAgentPoolProfile))
	}
	if cluster.ApiServerAccessProfile != nil {
		apiServerAccessProfile_ARM, err := cluster.ApiServerAccessProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		apiServerAccessProfile := *apiServerAccessProfile_ARM.(*arm.ManagedClusterAPIServerAccessProfile)
		result.Properties.ApiServerAccessProfile = &apiServerAccessProfile
	}
	if cluster.AutoScalerProfile != nil {
		autoScalerProfile_ARM, err := cluster.AutoScalerProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		autoScalerProfile := *autoScalerProfile_ARM.(*arm.ManagedClusterProperties_AutoScalerProfile)
		result.Properties.AutoScalerProfile = &autoScalerProfile
	}
	if cluster.AutoUpgradeProfile != nil {
		autoUpgradeProfile_ARM, err := cluster.AutoUpgradeProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		autoUpgradeProfile := *autoUpgradeProfile_ARM.(*arm.ManagedClusterAutoUpgradeProfile)
		result.Properties.AutoUpgradeProfile = &autoUpgradeProfile
	}
	if cluster.AzureMonitorProfile != nil {
		azureMonitorProfile_ARM, err := cluster.AzureMonitorProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		azureMonitorProfile := *azureMonitorProfile_ARM.(*arm.ManagedClusterAzureMonitorProfile)
		result.Properties.AzureMonitorProfile = &azureMonitorProfile
	}
	if cluster.DisableLocalAccounts != nil {
		disableLocalAccounts := *cluster.DisableLocalAccounts
		result.Properties.DisableLocalAccounts = &disableLocalAccounts
	}
	if cluster.DiskEncryptionSetReference != nil {
		diskEncryptionSetIDARMID, err := resolved.ResolvedReferences.Lookup(*cluster.DiskEncryptionSetReference)
		if err != nil {
			return nil, err
		}
		diskEncryptionSetID := diskEncryptionSetIDARMID
		result.Properties.DiskEncryptionSetID = &diskEncryptionSetID
	}
	if cluster.DnsPrefix != nil {
		dnsPrefix := *cluster.DnsPrefix
		result.Properties.DnsPrefix = &dnsPrefix
	}
	if cluster.EnablePodSecurityPolicy != nil {
		enablePodSecurityPolicy := *cluster.EnablePodSecurityPolicy
		result.Properties.EnablePodSecurityPolicy = &enablePodSecurityPolicy
	}
	if cluster.EnableRBAC != nil {
		enableRBAC := *cluster.EnableRBAC
		result.Properties.EnableRBAC = &enableRBAC
	}
	if cluster.FqdnSubdomain != nil {
		fqdnSubdomain := *cluster.FqdnSubdomain
		result.Properties.FqdnSubdomain = &fqdnSubdomain
	}
	if cluster.HttpProxyConfig != nil {
		httpProxyConfig_ARM, err := cluster.HttpProxyConfig.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		httpProxyConfig := *httpProxyConfig_ARM.(*arm.ManagedClusterHTTPProxyConfig)
		result.Properties.HttpProxyConfig = &httpProxyConfig
	}
	if cluster.IdentityProfile != nil {
		result.Properties.IdentityProfile = make(map[string]arm.UserAssignedIdentity, len(cluster.IdentityProfile))
		for key, value := range cluster.IdentityProfile {
			value_ARM, err := value.ConvertToARM(resolved)
			if err != nil {
				return nil, err
			}
			result.Properties.IdentityProfile[key] = *value_ARM.(*arm.UserAssignedIdentity)
		}
	}
	if cluster.KubernetesVersion != nil {
		kubernetesVersion := *cluster.KubernetesVersion
		result.Properties.KubernetesVersion = &kubernetesVersion
	}
	if cluster.LinuxProfile != nil {
		linuxProfile_ARM, err := cluster.LinuxProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		linuxProfile := *linuxProfile_ARM.(*arm.ContainerServiceLinuxProfile)
		result.Properties.LinuxProfile = &linuxProfile
	}
	if cluster.NetworkProfile != nil {
		networkProfile_ARM, err := cluster.NetworkProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		networkProfile := *networkProfile_ARM.(*arm.ContainerServiceNetworkProfile)
		result.Properties.NetworkProfile = &networkProfile
	}
	if cluster.NodeResourceGroup != nil {
		nodeResourceGroup := *cluster.NodeResourceGroup
		result.Properties.NodeResourceGroup = &nodeResourceGroup
	}
	if cluster.OidcIssuerProfile != nil {
		oidcIssuerProfile_ARM, err := cluster.OidcIssuerProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		oidcIssuerProfile := *oidcIssuerProfile_ARM.(*arm.ManagedClusterOIDCIssuerProfile)
		result.Properties.OidcIssuerProfile = &oidcIssuerProfile
	}
	if cluster.PodIdentityProfile != nil {
		podIdentityProfile_ARM, err := cluster.PodIdentityProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		podIdentityProfile := *podIdentityProfile_ARM.(*arm.ManagedClusterPodIdentityProfile)
		result.Properties.PodIdentityProfile = &podIdentityProfile
	}
	for _, item := range cluster.PrivateLinkResources {
		item_ARM, err := item.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		result.Properties.PrivateLinkResources = append(result.Properties.PrivateLinkResources, *item_ARM.(*arm.PrivateLinkResource))
	}
	if cluster.PublicNetworkAccess != nil {
		var temp string
		temp = string(*cluster.PublicNetworkAccess)
		publicNetworkAccess := arm.ManagedClusterProperties_PublicNetworkAccess(temp)
		result.Properties.PublicNetworkAccess = &publicNetworkAccess
	}
	if cluster.SecurityProfile != nil {
		securityProfile_ARM, err := cluster.SecurityProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		securityProfile := *securityProfile_ARM.(*arm.ManagedClusterSecurityProfile)
		result.Properties.SecurityProfile = &securityProfile
	}
	if cluster.ServiceMeshProfile != nil {
		serviceMeshProfile_ARM, err := cluster.ServiceMeshProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		serviceMeshProfile := *serviceMeshProfile_ARM.(*arm.ServiceMeshProfile)
		result.Properties.ServiceMeshProfile = &serviceMeshProfile
	}
	if cluster.ServicePrincipalProfile != nil {
		servicePrincipalProfile_ARM, err := cluster.ServicePrincipalProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		servicePrincipalProfile := *servicePrincipalProfile_ARM.(*arm.ManagedClusterServicePrincipalProfile)
		result.Properties.ServicePrincipalProfile = &servicePrincipalProfile
	}
	if cluster.StorageProfile != nil {
		storageProfile_ARM, err := cluster.StorageProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		storageProfile := *storageProfile_ARM.(*arm.ManagedClusterStorageProfile)
		result.Properties.StorageProfile = &storageProfile
	}
	if cluster.SupportPlan != nil {
		var temp string
		temp = string(*cluster.SupportPlan)
		supportPlan := arm.KubernetesSupportPlan(temp)
		result.Properties.SupportPlan = &supportPlan
	}
	if cluster.UpgradeSettings != nil {
		upgradeSettings_ARM, err := cluster.UpgradeSettings.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		upgradeSettings := *upgradeSettings_ARM.(*arm.ClusterUpgradeSettings)
		result.Properties.UpgradeSettings = &upgradeSettings
	}
	if cluster.WindowsProfile != nil {
		windowsProfile_ARM, err := cluster.WindowsProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		windowsProfile := *windowsProfile_ARM.(*arm.ManagedClusterWindowsProfile)
		result.Properties.WindowsProfile = &windowsProfile
	}
	if cluster.WorkloadAutoScalerProfile != nil {
		workloadAutoScalerProfile_ARM, err := cluster.WorkloadAutoScalerProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		workloadAutoScalerProfile := *workloadAutoScalerProfile_ARM.(*arm.ManagedClusterWorkloadAutoScalerProfile)
		result.Properties.WorkloadAutoScalerProfile = &workloadAutoScalerProfile
	}

	// Set property "Sku":
	if cluster.Sku != nil {
		sku_ARM, err := cluster.Sku.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		sku := *sku_ARM.(*arm.ManagedClusterSKU)
		result.Sku = &sku
	}

	// Set property "Tags":
	if cluster.Tags != nil {
		result.Tags = make(map[string]string, len(cluster.Tags))
		for key, value := range cluster.Tags {
			result.Tags[key] = value
		}
	} else {
		// Set property to empty map, as this resource is set to serialize all collections explicitly
		result.Tags = make(map[string]string)
	}
	return result, nil
}

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

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

	// Set property "AadProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AadProfile != nil {
			var aadProfile1 ManagedClusterAADProfile
			err := aadProfile1.PopulateFromARM(owner, *typedInput.Properties.AadProfile)
			if err != nil {
				return err
			}
			aadProfile := aadProfile1
			cluster.AadProfile = &aadProfile
		}
	}

	// Set property "AddonProfiles":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AddonProfiles != nil {
			cluster.AddonProfiles = make(map[string]ManagedClusterAddonProfile, len(typedInput.Properties.AddonProfiles))
			for key, value := range typedInput.Properties.AddonProfiles {
				var value1 ManagedClusterAddonProfile
				err := value1.PopulateFromARM(owner, value)
				if err != nil {
					return err
				}
				cluster.AddonProfiles[key] = value1
			}
		}
	}

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

	// Set property "ApiServerAccessProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ApiServerAccessProfile != nil {
			var apiServerAccessProfile1 ManagedClusterAPIServerAccessProfile
			err := apiServerAccessProfile1.PopulateFromARM(owner, *typedInput.Properties.ApiServerAccessProfile)
			if err != nil {
				return err
			}
			apiServerAccessProfile := apiServerAccessProfile1
			cluster.ApiServerAccessProfile = &apiServerAccessProfile
		}
	}

	// Set property "AutoScalerProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AutoScalerProfile != nil {
			var autoScalerProfile1 ManagedClusterProperties_AutoScalerProfile
			err := autoScalerProfile1.PopulateFromARM(owner, *typedInput.Properties.AutoScalerProfile)
			if err != nil {
				return err
			}
			autoScalerProfile := autoScalerProfile1
			cluster.AutoScalerProfile = &autoScalerProfile
		}
	}

	// Set property "AutoUpgradeProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AutoUpgradeProfile != nil {
			var autoUpgradeProfile1 ManagedClusterAutoUpgradeProfile
			err := autoUpgradeProfile1.PopulateFromARM(owner, *typedInput.Properties.AutoUpgradeProfile)
			if err != nil {
				return err
			}
			autoUpgradeProfile := autoUpgradeProfile1
			cluster.AutoUpgradeProfile = &autoUpgradeProfile
		}
	}

	// Set property "AzureMonitorProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AzureMonitorProfile != nil {
			var azureMonitorProfile1 ManagedClusterAzureMonitorProfile
			err := azureMonitorProfile1.PopulateFromARM(owner, *typedInput.Properties.AzureMonitorProfile)
			if err != nil {
				return err
			}
			azureMonitorProfile := azureMonitorProfile1
			cluster.AzureMonitorProfile = &azureMonitorProfile
		}
	}

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

	// Set property "DisableLocalAccounts":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.DisableLocalAccounts != nil {
			disableLocalAccounts := *typedInput.Properties.DisableLocalAccounts
			cluster.DisableLocalAccounts = &disableLocalAccounts
		}
	}

	// no assignment for property "DiskEncryptionSetReference"

	// Set property "DnsPrefix":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.DnsPrefix != nil {
			dnsPrefix := *typedInput.Properties.DnsPrefix
			cluster.DnsPrefix = &dnsPrefix
		}
	}

	// Set property "EnablePodSecurityPolicy":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EnablePodSecurityPolicy != nil {
			enablePodSecurityPolicy := *typedInput.Properties.EnablePodSecurityPolicy
			cluster.EnablePodSecurityPolicy = &enablePodSecurityPolicy
		}
	}

	// Set property "EnableRBAC":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EnableRBAC != nil {
			enableRBAC := *typedInput.Properties.EnableRBAC
			cluster.EnableRBAC = &enableRBAC
		}
	}

	// Set property "ExtendedLocation":
	if typedInput.ExtendedLocation != nil {
		var extendedLocation1 ExtendedLocation
		err := extendedLocation1.PopulateFromARM(owner, *typedInput.ExtendedLocation)
		if err != nil {
			return err
		}
		extendedLocation := extendedLocation1
		cluster.ExtendedLocation = &extendedLocation
	}

	// Set property "FqdnSubdomain":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.FqdnSubdomain != nil {
			fqdnSubdomain := *typedInput.Properties.FqdnSubdomain
			cluster.FqdnSubdomain = &fqdnSubdomain
		}
	}

	// Set property "HttpProxyConfig":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.HttpProxyConfig != nil {
			var httpProxyConfig1 ManagedClusterHTTPProxyConfig
			err := httpProxyConfig1.PopulateFromARM(owner, *typedInput.Properties.HttpProxyConfig)
			if err != nil {
				return err
			}
			httpProxyConfig := httpProxyConfig1
			cluster.HttpProxyConfig = &httpProxyConfig
		}
	}

	// Set property "Identity":
	if typedInput.Identity != nil {
		var identity1 ManagedClusterIdentity
		err := identity1.PopulateFromARM(owner, *typedInput.Identity)
		if err != nil {
			return err
		}
		identity := identity1
		cluster.Identity = &identity
	}

	// Set property "IdentityProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.IdentityProfile != nil {
			cluster.IdentityProfile = make(map[string]UserAssignedIdentity, len(typedInput.Properties.IdentityProfile))
			for key, value := range typedInput.Properties.IdentityProfile {
				var value1 UserAssignedIdentity
				err := value1.PopulateFromARM(owner, value)
				if err != nil {
					return err
				}
				cluster.IdentityProfile[key] = value1
			}
		}
	}

	// Set property "KubernetesVersion":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.KubernetesVersion != nil {
			kubernetesVersion := *typedInput.Properties.KubernetesVersion
			cluster.KubernetesVersion = &kubernetesVersion
		}
	}

	// Set property "LinuxProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.LinuxProfile != nil {
			var linuxProfile1 ContainerServiceLinuxProfile
			err := linuxProfile1.PopulateFromARM(owner, *typedInput.Properties.LinuxProfile)
			if err != nil {
				return err
			}
			linuxProfile := linuxProfile1
			cluster.LinuxProfile = &linuxProfile
		}
	}

	// Set property "Location":
	if typedInput.Location != nil {
		location := *typedInput.Location
		cluster.Location = &location
	}

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

	// Set property "NodeResourceGroup":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.NodeResourceGroup != nil {
			nodeResourceGroup := *typedInput.Properties.NodeResourceGroup
			cluster.NodeResourceGroup = &nodeResourceGroup
		}
	}

	// Set property "OidcIssuerProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.OidcIssuerProfile != nil {
			var oidcIssuerProfile1 ManagedClusterOIDCIssuerProfile
			err := oidcIssuerProfile1.PopulateFromARM(owner, *typedInput.Properties.OidcIssuerProfile)
			if err != nil {
				return err
			}
			oidcIssuerProfile := oidcIssuerProfile1
			cluster.OidcIssuerProfile = &oidcIssuerProfile
		}
	}

	// no assignment for property "OperatorSpec"

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

	// Set property "PodIdentityProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PodIdentityProfile != nil {
			var podIdentityProfile1 ManagedClusterPodIdentityProfile
			err := podIdentityProfile1.PopulateFromARM(owner, *typedInput.Properties.PodIdentityProfile)
			if err != nil {
				return err
			}
			podIdentityProfile := podIdentityProfile1
			cluster.PodIdentityProfile = &podIdentityProfile
		}
	}

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

	// Set property "PublicNetworkAccess":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PublicNetworkAccess != nil {
			var temp string
			temp = string(*typedInput.Properties.PublicNetworkAccess)
			publicNetworkAccess := ManagedClusterProperties_PublicNetworkAccess(temp)
			cluster.PublicNetworkAccess = &publicNetworkAccess
		}
	}

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

	// Set property "ServiceMeshProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ServiceMeshProfile != nil {
			var serviceMeshProfile1 ServiceMeshProfile
			err := serviceMeshProfile1.PopulateFromARM(owner, *typedInput.Properties.ServiceMeshProfile)
			if err != nil {
				return err
			}
			serviceMeshProfile := serviceMeshProfile1
			cluster.ServiceMeshProfile = &serviceMeshProfile
		}
	}

	// Set property "ServicePrincipalProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ServicePrincipalProfile != nil {
			var servicePrincipalProfile1 ManagedClusterServicePrincipalProfile
			err := servicePrincipalProfile1.PopulateFromARM(owner, *typedInput.Properties.ServicePrincipalProfile)
			if err != nil {
				return err
			}
			servicePrincipalProfile := servicePrincipalProfile1
			cluster.ServicePrincipalProfile = &servicePrincipalProfile
		}
	}

	// Set property "Sku":
	if typedInput.Sku != nil {
		var sku1 ManagedClusterSKU
		err := sku1.PopulateFromARM(owner, *typedInput.Sku)
		if err != nil {
			return err
		}
		sku := sku1
		cluster.Sku = &sku
	}

	// Set property "StorageProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.StorageProfile != nil {
			var storageProfile1 ManagedClusterStorageProfile
			err := storageProfile1.PopulateFromARM(owner, *typedInput.Properties.StorageProfile)
			if err != nil {
				return err
			}
			storageProfile := storageProfile1
			cluster.StorageProfile = &storageProfile
		}
	}

	// Set property "SupportPlan":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.SupportPlan != nil {
			var temp string
			temp = string(*typedInput.Properties.SupportPlan)
			supportPlan := KubernetesSupportPlan(temp)
			cluster.SupportPlan = &supportPlan
		}
	}

	// Set property "Tags":
	if typedInput.Tags != nil {
		cluster.Tags = make(map[string]string, len(typedInput.Tags))
		for key, value := range typedInput.Tags {
			cluster.Tags[key] = value
		}
	} else {
		// Set property to empty map, as this resource is set to serialize all collections explicitly
		cluster.Tags = make(map[string]string)
	}

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

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

	// Set property "WorkloadAutoScalerProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.WorkloadAutoScalerProfile != nil {
			var workloadAutoScalerProfile1 ManagedClusterWorkloadAutoScalerProfile
			err := workloadAutoScalerProfile1.PopulateFromARM(owner, *typedInput.Properties.WorkloadAutoScalerProfile)
			if err != nil {
				return err
			}
			workloadAutoScalerProfile := workloadAutoScalerProfile1
			cluster.WorkloadAutoScalerProfile = &workloadAutoScalerProfile
		}
	}

	// No error
	return nil
}

var _ genruntime.ConvertibleSpec = &ManagedCluster_Spec{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.ManagedCluster_Spec{}
	err := cluster.AssignProperties_To_ManagedCluster_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_ManagedCluster_Spec populates our ManagedCluster_Spec from the provided source ManagedCluster_Spec
func (cluster *ManagedCluster_Spec) AssignProperties_From_ManagedCluster_Spec(source *storage.ManagedCluster_Spec) error {

	// AadProfile
	if source.AadProfile != nil {
		var aadProfile ManagedClusterAADProfile
		err := aadProfile.AssignProperties_From_ManagedClusterAADProfile(source.AadProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterAADProfile() to populate field AadProfile")
		}
		cluster.AadProfile = &aadProfile
	} else {
		cluster.AadProfile = nil
	}

	// AddonProfiles
	if source.AddonProfiles != nil {
		addonProfileMap := make(map[string]ManagedClusterAddonProfile, len(source.AddonProfiles))
		for addonProfileKey, addonProfileValue := range source.AddonProfiles {
			var addonProfile ManagedClusterAddonProfile
			err := addonProfile.AssignProperties_From_ManagedClusterAddonProfile(&addonProfileValue)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterAddonProfile() to populate field AddonProfiles")
			}
			addonProfileMap[addonProfileKey] = addonProfile
		}
		cluster.AddonProfiles = addonProfileMap
	} else {
		cluster.AddonProfiles = nil
	}

	// AgentPoolProfiles
	if source.AgentPoolProfiles != nil {
		agentPoolProfileList := make([]ManagedClusterAgentPoolProfile, len(source.AgentPoolProfiles))
		for agentPoolProfileIndex, agentPoolProfileItem := range source.AgentPoolProfiles {
			var agentPoolProfile ManagedClusterAgentPoolProfile
			err := agentPoolProfile.AssignProperties_From_ManagedClusterAgentPoolProfile(&agentPoolProfileItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterAgentPoolProfile() to populate field AgentPoolProfiles")
			}
			agentPoolProfileList[agentPoolProfileIndex] = agentPoolProfile
		}
		cluster.AgentPoolProfiles = agentPoolProfileList
	} else {
		cluster.AgentPoolProfiles = nil
	}

	// ApiServerAccessProfile
	if source.ApiServerAccessProfile != nil {
		var apiServerAccessProfile ManagedClusterAPIServerAccessProfile
		err := apiServerAccessProfile.AssignProperties_From_ManagedClusterAPIServerAccessProfile(source.ApiServerAccessProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterAPIServerAccessProfile() to populate field ApiServerAccessProfile")
		}
		cluster.ApiServerAccessProfile = &apiServerAccessProfile
	} else {
		cluster.ApiServerAccessProfile = nil
	}

	// AutoScalerProfile
	if source.AutoScalerProfile != nil {
		var autoScalerProfile ManagedClusterProperties_AutoScalerProfile
		err := autoScalerProfile.AssignProperties_From_ManagedClusterProperties_AutoScalerProfile(source.AutoScalerProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterProperties_AutoScalerProfile() to populate field AutoScalerProfile")
		}
		cluster.AutoScalerProfile = &autoScalerProfile
	} else {
		cluster.AutoScalerProfile = nil
	}

	// AutoUpgradeProfile
	if source.AutoUpgradeProfile != nil {
		var autoUpgradeProfile ManagedClusterAutoUpgradeProfile
		err := autoUpgradeProfile.AssignProperties_From_ManagedClusterAutoUpgradeProfile(source.AutoUpgradeProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterAutoUpgradeProfile() to populate field AutoUpgradeProfile")
		}
		cluster.AutoUpgradeProfile = &autoUpgradeProfile
	} else {
		cluster.AutoUpgradeProfile = nil
	}

	// AzureMonitorProfile
	if source.AzureMonitorProfile != nil {
		var azureMonitorProfile ManagedClusterAzureMonitorProfile
		err := azureMonitorProfile.AssignProperties_From_ManagedClusterAzureMonitorProfile(source.AzureMonitorProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterAzureMonitorProfile() to populate field AzureMonitorProfile")
		}
		cluster.AzureMonitorProfile = &azureMonitorProfile
	} else {
		cluster.AzureMonitorProfile = nil
	}

	// AzureName
	cluster.AzureName = source.AzureName

	// DisableLocalAccounts
	if source.DisableLocalAccounts != nil {
		disableLocalAccount := *source.DisableLocalAccounts
		cluster.DisableLocalAccounts = &disableLocalAccount
	} else {
		cluster.DisableLocalAccounts = nil
	}

	// DiskEncryptionSetReference
	if source.DiskEncryptionSetReference != nil {
		diskEncryptionSetReference := source.DiskEncryptionSetReference.Copy()
		cluster.DiskEncryptionSetReference = &diskEncryptionSetReference
	} else {
		cluster.DiskEncryptionSetReference = nil
	}

	// DnsPrefix
	cluster.DnsPrefix = genruntime.ClonePointerToString(source.DnsPrefix)

	// EnablePodSecurityPolicy
	if source.EnablePodSecurityPolicy != nil {
		enablePodSecurityPolicy := *source.EnablePodSecurityPolicy
		cluster.EnablePodSecurityPolicy = &enablePodSecurityPolicy
	} else {
		cluster.EnablePodSecurityPolicy = nil
	}

	// EnableRBAC
	if source.EnableRBAC != nil {
		enableRBAC := *source.EnableRBAC
		cluster.EnableRBAC = &enableRBAC
	} else {
		cluster.EnableRBAC = nil
	}

	// ExtendedLocation
	if source.ExtendedLocation != nil {
		var extendedLocation ExtendedLocation
		err := extendedLocation.AssignProperties_From_ExtendedLocation(source.ExtendedLocation)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ExtendedLocation() to populate field ExtendedLocation")
		}
		cluster.ExtendedLocation = &extendedLocation
	} else {
		cluster.ExtendedLocation = nil
	}

	// FqdnSubdomain
	cluster.FqdnSubdomain = genruntime.ClonePointerToString(source.FqdnSubdomain)

	// HttpProxyConfig
	if source.HttpProxyConfig != nil {
		var httpProxyConfig ManagedClusterHTTPProxyConfig
		err := httpProxyConfig.AssignProperties_From_ManagedClusterHTTPProxyConfig(source.HttpProxyConfig)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterHTTPProxyConfig() to populate field HttpProxyConfig")
		}
		cluster.HttpProxyConfig = &httpProxyConfig
	} else {
		cluster.HttpProxyConfig = nil
	}

	// Identity
	if source.Identity != nil {
		var identity ManagedClusterIdentity
		err := identity.AssignProperties_From_ManagedClusterIdentity(source.Identity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterIdentity() to populate field Identity")
		}
		cluster.Identity = &identity
	} else {
		cluster.Identity = nil
	}

	// IdentityProfile
	if source.IdentityProfile != nil {
		identityProfileMap := make(map[string]UserAssignedIdentity, len(source.IdentityProfile))
		for identityProfileKey, identityProfileValue := range source.IdentityProfile {
			var identityProfile UserAssignedIdentity
			err := identityProfile.AssignProperties_From_UserAssignedIdentity(&identityProfileValue)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_UserAssignedIdentity() to populate field IdentityProfile")
			}
			identityProfileMap[identityProfileKey] = identityProfile
		}
		cluster.IdentityProfile = identityProfileMap
	} else {
		cluster.IdentityProfile = nil
	}

	// KubernetesVersion
	cluster.KubernetesVersion = genruntime.ClonePointerToString(source.KubernetesVersion)

	// LinuxProfile
	if source.LinuxProfile != nil {
		var linuxProfile ContainerServiceLinuxProfile
		err := linuxProfile.AssignProperties_From_ContainerServiceLinuxProfile(source.LinuxProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ContainerServiceLinuxProfile() to populate field LinuxProfile")
		}
		cluster.LinuxProfile = &linuxProfile
	} else {
		cluster.LinuxProfile = nil
	}

	// Location
	cluster.Location = genruntime.ClonePointerToString(source.Location)

	// NetworkProfile
	if source.NetworkProfile != nil {
		var networkProfile ContainerServiceNetworkProfile
		err := networkProfile.AssignProperties_From_ContainerServiceNetworkProfile(source.NetworkProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ContainerServiceNetworkProfile() to populate field NetworkProfile")
		}
		cluster.NetworkProfile = &networkProfile
	} else {
		cluster.NetworkProfile = nil
	}

	// NodeResourceGroup
	cluster.NodeResourceGroup = genruntime.ClonePointerToString(source.NodeResourceGroup)

	// OidcIssuerProfile
	if source.OidcIssuerProfile != nil {
		var oidcIssuerProfile ManagedClusterOIDCIssuerProfile
		err := oidcIssuerProfile.AssignProperties_From_ManagedClusterOIDCIssuerProfile(source.OidcIssuerProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterOIDCIssuerProfile() to populate field OidcIssuerProfile")
		}
		cluster.OidcIssuerProfile = &oidcIssuerProfile
	} else {
		cluster.OidcIssuerProfile = nil
	}

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

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

	// PodIdentityProfile
	if source.PodIdentityProfile != nil {
		var podIdentityProfile ManagedClusterPodIdentityProfile
		err := podIdentityProfile.AssignProperties_From_ManagedClusterPodIdentityProfile(source.PodIdentityProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterPodIdentityProfile() to populate field PodIdentityProfile")
		}
		cluster.PodIdentityProfile = &podIdentityProfile
	} else {
		cluster.PodIdentityProfile = nil
	}

	// PrivateLinkResources
	if source.PrivateLinkResources != nil {
		privateLinkResourceList := make([]PrivateLinkResource, len(source.PrivateLinkResources))
		for privateLinkResourceIndex, privateLinkResourceItem := range source.PrivateLinkResources {
			var privateLinkResource PrivateLinkResource
			err := privateLinkResource.AssignProperties_From_PrivateLinkResource(&privateLinkResourceItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_PrivateLinkResource() to populate field PrivateLinkResources")
			}
			privateLinkResourceList[privateLinkResourceIndex] = privateLinkResource
		}
		cluster.PrivateLinkResources = privateLinkResourceList
	} else {
		cluster.PrivateLinkResources = nil
	}

	// PublicNetworkAccess
	if source.PublicNetworkAccess != nil {
		publicNetworkAccess := *source.PublicNetworkAccess
		publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, managedClusterProperties_PublicNetworkAccess_Values)
		cluster.PublicNetworkAccess = &publicNetworkAccessTemp
	} else {
		cluster.PublicNetworkAccess = nil
	}

	// SecurityProfile
	if source.SecurityProfile != nil {
		var securityProfile ManagedClusterSecurityProfile
		err := securityProfile.AssignProperties_From_ManagedClusterSecurityProfile(source.SecurityProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterSecurityProfile() to populate field SecurityProfile")
		}
		cluster.SecurityProfile = &securityProfile
	} else {
		cluster.SecurityProfile = nil
	}

	// ServiceMeshProfile
	if source.ServiceMeshProfile != nil {
		var serviceMeshProfile ServiceMeshProfile
		err := serviceMeshProfile.AssignProperties_From_ServiceMeshProfile(source.ServiceMeshProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ServiceMeshProfile() to populate field ServiceMeshProfile")
		}
		cluster.ServiceMeshProfile = &serviceMeshProfile
	} else {
		cluster.ServiceMeshProfile = nil
	}

	// ServicePrincipalProfile
	if source.ServicePrincipalProfile != nil {
		var servicePrincipalProfile ManagedClusterServicePrincipalProfile
		err := servicePrincipalProfile.AssignProperties_From_ManagedClusterServicePrincipalProfile(source.ServicePrincipalProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterServicePrincipalProfile() to populate field ServicePrincipalProfile")
		}
		cluster.ServicePrincipalProfile = &servicePrincipalProfile
	} else {
		cluster.ServicePrincipalProfile = nil
	}

	// Sku
	if source.Sku != nil {
		var sku ManagedClusterSKU
		err := sku.AssignProperties_From_ManagedClusterSKU(source.Sku)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterSKU() to populate field Sku")
		}
		cluster.Sku = &sku
	} else {
		cluster.Sku = nil
	}

	// StorageProfile
	if source.StorageProfile != nil {
		var storageProfile ManagedClusterStorageProfile
		err := storageProfile.AssignProperties_From_ManagedClusterStorageProfile(source.StorageProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterStorageProfile() to populate field StorageProfile")
		}
		cluster.StorageProfile = &storageProfile
	} else {
		cluster.StorageProfile = nil
	}

	// SupportPlan
	if source.SupportPlan != nil {
		supportPlan := *source.SupportPlan
		supportPlanTemp := genruntime.ToEnum(supportPlan, kubernetesSupportPlan_Values)
		cluster.SupportPlan = &supportPlanTemp
	} else {
		cluster.SupportPlan = nil
	}

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

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

	// WindowsProfile
	if source.WindowsProfile != nil {
		var windowsProfile ManagedClusterWindowsProfile
		err := windowsProfile.AssignProperties_From_ManagedClusterWindowsProfile(source.WindowsProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterWindowsProfile() to populate field WindowsProfile")
		}
		cluster.WindowsProfile = &windowsProfile
	} else {
		cluster.WindowsProfile = nil
	}

	// WorkloadAutoScalerProfile
	if source.WorkloadAutoScalerProfile != nil {
		var workloadAutoScalerProfile ManagedClusterWorkloadAutoScalerProfile
		err := workloadAutoScalerProfile.AssignProperties_From_ManagedClusterWorkloadAutoScalerProfile(source.WorkloadAutoScalerProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterWorkloadAutoScalerProfile() to populate field WorkloadAutoScalerProfile")
		}
		cluster.WorkloadAutoScalerProfile = &workloadAutoScalerProfile
	} else {
		cluster.WorkloadAutoScalerProfile = nil
	}

	// No error
	return nil
}

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

	// AadProfile
	if cluster.AadProfile != nil {
		var aadProfile storage.ManagedClusterAADProfile
		err := cluster.AadProfile.AssignProperties_To_ManagedClusterAADProfile(&aadProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterAADProfile() to populate field AadProfile")
		}
		destination.AadProfile = &aadProfile
	} else {
		destination.AadProfile = nil
	}

	// AddonProfiles
	if cluster.AddonProfiles != nil {
		addonProfileMap := make(map[string]storage.ManagedClusterAddonProfile, len(cluster.AddonProfiles))
		for addonProfileKey, addonProfileValue := range cluster.AddonProfiles {
			var addonProfile storage.ManagedClusterAddonProfile
			err := addonProfileValue.AssignProperties_To_ManagedClusterAddonProfile(&addonProfile)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterAddonProfile() to populate field AddonProfiles")
			}
			addonProfileMap[addonProfileKey] = addonProfile
		}
		destination.AddonProfiles = addonProfileMap
	} else {
		destination.AddonProfiles = nil
	}

	// AgentPoolProfiles
	if cluster.AgentPoolProfiles != nil {
		agentPoolProfileList := make([]storage.ManagedClusterAgentPoolProfile, len(cluster.AgentPoolProfiles))
		for agentPoolProfileIndex, agentPoolProfileItem := range cluster.AgentPoolProfiles {
			var agentPoolProfile storage.ManagedClusterAgentPoolProfile
			err := agentPoolProfileItem.AssignProperties_To_ManagedClusterAgentPoolProfile(&agentPoolProfile)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterAgentPoolProfile() to populate field AgentPoolProfiles")
			}
			agentPoolProfileList[agentPoolProfileIndex] = agentPoolProfile
		}
		destination.AgentPoolProfiles = agentPoolProfileList
	} else {
		destination.AgentPoolProfiles = nil
	}

	// ApiServerAccessProfile
	if cluster.ApiServerAccessProfile != nil {
		var apiServerAccessProfile storage.ManagedClusterAPIServerAccessProfile
		err := cluster.ApiServerAccessProfile.AssignProperties_To_ManagedClusterAPIServerAccessProfile(&apiServerAccessProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterAPIServerAccessProfile() to populate field ApiServerAccessProfile")
		}
		destination.ApiServerAccessProfile = &apiServerAccessProfile
	} else {
		destination.ApiServerAccessProfile = nil
	}

	// AutoScalerProfile
	if cluster.AutoScalerProfile != nil {
		var autoScalerProfile storage.ManagedClusterProperties_AutoScalerProfile
		err := cluster.AutoScalerProfile.AssignProperties_To_ManagedClusterProperties_AutoScalerProfile(&autoScalerProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterProperties_AutoScalerProfile() to populate field AutoScalerProfile")
		}
		destination.AutoScalerProfile = &autoScalerProfile
	} else {
		destination.AutoScalerProfile = nil
	}

	// AutoUpgradeProfile
	if cluster.AutoUpgradeProfile != nil {
		var autoUpgradeProfile storage.ManagedClusterAutoUpgradeProfile
		err := cluster.AutoUpgradeProfile.AssignProperties_To_ManagedClusterAutoUpgradeProfile(&autoUpgradeProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterAutoUpgradeProfile() to populate field AutoUpgradeProfile")
		}
		destination.AutoUpgradeProfile = &autoUpgradeProfile
	} else {
		destination.AutoUpgradeProfile = nil
	}

	// AzureMonitorProfile
	if cluster.AzureMonitorProfile != nil {
		var azureMonitorProfile storage.ManagedClusterAzureMonitorProfile
		err := cluster.AzureMonitorProfile.AssignProperties_To_ManagedClusterAzureMonitorProfile(&azureMonitorProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterAzureMonitorProfile() to populate field AzureMonitorProfile")
		}
		destination.AzureMonitorProfile = &azureMonitorProfile
	} else {
		destination.AzureMonitorProfile = nil
	}

	// AzureName
	destination.AzureName = cluster.AzureName

	// DisableLocalAccounts
	if cluster.DisableLocalAccounts != nil {
		disableLocalAccount := *cluster.DisableLocalAccounts
		destination.DisableLocalAccounts = &disableLocalAccount
	} else {
		destination.DisableLocalAccounts = nil
	}

	// DiskEncryptionSetReference
	if cluster.DiskEncryptionSetReference != nil {
		diskEncryptionSetReference := cluster.DiskEncryptionSetReference.Copy()
		destination.DiskEncryptionSetReference = &diskEncryptionSetReference
	} else {
		destination.DiskEncryptionSetReference = nil
	}

	// DnsPrefix
	destination.DnsPrefix = genruntime.ClonePointerToString(cluster.DnsPrefix)

	// EnablePodSecurityPolicy
	if cluster.EnablePodSecurityPolicy != nil {
		enablePodSecurityPolicy := *cluster.EnablePodSecurityPolicy
		destination.EnablePodSecurityPolicy = &enablePodSecurityPolicy
	} else {
		destination.EnablePodSecurityPolicy = nil
	}

	// EnableRBAC
	if cluster.EnableRBAC != nil {
		enableRBAC := *cluster.EnableRBAC
		destination.EnableRBAC = &enableRBAC
	} else {
		destination.EnableRBAC = nil
	}

	// ExtendedLocation
	if cluster.ExtendedLocation != nil {
		var extendedLocation storage.ExtendedLocation
		err := cluster.ExtendedLocation.AssignProperties_To_ExtendedLocation(&extendedLocation)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ExtendedLocation() to populate field ExtendedLocation")
		}
		destination.ExtendedLocation = &extendedLocation
	} else {
		destination.ExtendedLocation = nil
	}

	// FqdnSubdomain
	destination.FqdnSubdomain = genruntime.ClonePointerToString(cluster.FqdnSubdomain)

	// HttpProxyConfig
	if cluster.HttpProxyConfig != nil {
		var httpProxyConfig storage.ManagedClusterHTTPProxyConfig
		err := cluster.HttpProxyConfig.AssignProperties_To_ManagedClusterHTTPProxyConfig(&httpProxyConfig)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterHTTPProxyConfig() to populate field HttpProxyConfig")
		}
		destination.HttpProxyConfig = &httpProxyConfig
	} else {
		destination.HttpProxyConfig = nil
	}

	// Identity
	if cluster.Identity != nil {
		var identity storage.ManagedClusterIdentity
		err := cluster.Identity.AssignProperties_To_ManagedClusterIdentity(&identity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterIdentity() to populate field Identity")
		}
		destination.Identity = &identity
	} else {
		destination.Identity = nil
	}

	// IdentityProfile
	if cluster.IdentityProfile != nil {
		identityProfileMap := make(map[string]storage.UserAssignedIdentity, len(cluster.IdentityProfile))
		for identityProfileKey, identityProfileValue := range cluster.IdentityProfile {
			var identityProfile storage.UserAssignedIdentity
			err := identityProfileValue.AssignProperties_To_UserAssignedIdentity(&identityProfile)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_UserAssignedIdentity() to populate field IdentityProfile")
			}
			identityProfileMap[identityProfileKey] = identityProfile
		}
		destination.IdentityProfile = identityProfileMap
	} else {
		destination.IdentityProfile = nil
	}

	// KubernetesVersion
	destination.KubernetesVersion = genruntime.ClonePointerToString(cluster.KubernetesVersion)

	// LinuxProfile
	if cluster.LinuxProfile != nil {
		var linuxProfile storage.ContainerServiceLinuxProfile
		err := cluster.LinuxProfile.AssignProperties_To_ContainerServiceLinuxProfile(&linuxProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ContainerServiceLinuxProfile() to populate field LinuxProfile")
		}
		destination.LinuxProfile = &linuxProfile
	} else {
		destination.LinuxProfile = nil
	}

	// Location
	destination.Location = genruntime.ClonePointerToString(cluster.Location)

	// NetworkProfile
	if cluster.NetworkProfile != nil {
		var networkProfile storage.ContainerServiceNetworkProfile
		err := cluster.NetworkProfile.AssignProperties_To_ContainerServiceNetworkProfile(&networkProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ContainerServiceNetworkProfile() to populate field NetworkProfile")
		}
		destination.NetworkProfile = &networkProfile
	} else {
		destination.NetworkProfile = nil
	}

	// NodeResourceGroup
	destination.NodeResourceGroup = genruntime.ClonePointerToString(cluster.NodeResourceGroup)

	// OidcIssuerProfile
	if cluster.OidcIssuerProfile != nil {
		var oidcIssuerProfile storage.ManagedClusterOIDCIssuerProfile
		err := cluster.OidcIssuerProfile.AssignProperties_To_ManagedClusterOIDCIssuerProfile(&oidcIssuerProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterOIDCIssuerProfile() to populate field OidcIssuerProfile")
		}
		destination.OidcIssuerProfile = &oidcIssuerProfile
	} else {
		destination.OidcIssuerProfile = nil
	}

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

	// OriginalVersion
	destination.OriginalVersion = cluster.OriginalVersion()

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

	// PodIdentityProfile
	if cluster.PodIdentityProfile != nil {
		var podIdentityProfile storage.ManagedClusterPodIdentityProfile
		err := cluster.PodIdentityProfile.AssignProperties_To_ManagedClusterPodIdentityProfile(&podIdentityProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterPodIdentityProfile() to populate field PodIdentityProfile")
		}
		destination.PodIdentityProfile = &podIdentityProfile
	} else {
		destination.PodIdentityProfile = nil
	}

	// PrivateLinkResources
	if cluster.PrivateLinkResources != nil {
		privateLinkResourceList := make([]storage.PrivateLinkResource, len(cluster.PrivateLinkResources))
		for privateLinkResourceIndex, privateLinkResourceItem := range cluster.PrivateLinkResources {
			var privateLinkResource storage.PrivateLinkResource
			err := privateLinkResourceItem.AssignProperties_To_PrivateLinkResource(&privateLinkResource)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_PrivateLinkResource() to populate field PrivateLinkResources")
			}
			privateLinkResourceList[privateLinkResourceIndex] = privateLinkResource
		}
		destination.PrivateLinkResources = privateLinkResourceList
	} else {
		destination.PrivateLinkResources = nil
	}

	// PublicNetworkAccess
	if cluster.PublicNetworkAccess != nil {
		publicNetworkAccess := string(*cluster.PublicNetworkAccess)
		destination.PublicNetworkAccess = &publicNetworkAccess
	} else {
		destination.PublicNetworkAccess = nil
	}

	// SecurityProfile
	if cluster.SecurityProfile != nil {
		var securityProfile storage.ManagedClusterSecurityProfile
		err := cluster.SecurityProfile.AssignProperties_To_ManagedClusterSecurityProfile(&securityProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterSecurityProfile() to populate field SecurityProfile")
		}
		destination.SecurityProfile = &securityProfile
	} else {
		destination.SecurityProfile = nil
	}

	// ServiceMeshProfile
	if cluster.ServiceMeshProfile != nil {
		var serviceMeshProfile storage.ServiceMeshProfile
		err := cluster.ServiceMeshProfile.AssignProperties_To_ServiceMeshProfile(&serviceMeshProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ServiceMeshProfile() to populate field ServiceMeshProfile")
		}
		destination.ServiceMeshProfile = &serviceMeshProfile
	} else {
		destination.ServiceMeshProfile = nil
	}

	// ServicePrincipalProfile
	if cluster.ServicePrincipalProfile != nil {
		var servicePrincipalProfile storage.ManagedClusterServicePrincipalProfile
		err := cluster.ServicePrincipalProfile.AssignProperties_To_ManagedClusterServicePrincipalProfile(&servicePrincipalProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterServicePrincipalProfile() to populate field ServicePrincipalProfile")
		}
		destination.ServicePrincipalProfile = &servicePrincipalProfile
	} else {
		destination.ServicePrincipalProfile = nil
	}

	// Sku
	if cluster.Sku != nil {
		var sku storage.ManagedClusterSKU
		err := cluster.Sku.AssignProperties_To_ManagedClusterSKU(&sku)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterSKU() to populate field Sku")
		}
		destination.Sku = &sku
	} else {
		destination.Sku = nil
	}

	// StorageProfile
	if cluster.StorageProfile != nil {
		var storageProfile storage.ManagedClusterStorageProfile
		err := cluster.StorageProfile.AssignProperties_To_ManagedClusterStorageProfile(&storageProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterStorageProfile() to populate field StorageProfile")
		}
		destination.StorageProfile = &storageProfile
	} else {
		destination.StorageProfile = nil
	}

	// SupportPlan
	if cluster.SupportPlan != nil {
		supportPlan := string(*cluster.SupportPlan)
		destination.SupportPlan = &supportPlan
	} else {
		destination.SupportPlan = nil
	}

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

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

	// WindowsProfile
	if cluster.WindowsProfile != nil {
		var windowsProfile storage.ManagedClusterWindowsProfile
		err := cluster.WindowsProfile.AssignProperties_To_ManagedClusterWindowsProfile(&windowsProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterWindowsProfile() to populate field WindowsProfile")
		}
		destination.WindowsProfile = &windowsProfile
	} else {
		destination.WindowsProfile = nil
	}

	// WorkloadAutoScalerProfile
	if cluster.WorkloadAutoScalerProfile != nil {
		var workloadAutoScalerProfile storage.ManagedClusterWorkloadAutoScalerProfile
		err := cluster.WorkloadAutoScalerProfile.AssignProperties_To_ManagedClusterWorkloadAutoScalerProfile(&workloadAutoScalerProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterWorkloadAutoScalerProfile() to populate field WorkloadAutoScalerProfile")
		}
		destination.WorkloadAutoScalerProfile = &workloadAutoScalerProfile
	} else {
		destination.WorkloadAutoScalerProfile = 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 (cluster *ManagedCluster_Spec) OriginalVersion() string {
	return GroupVersion.Version
}

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

// Managed cluster.
type ManagedCluster_STATUS struct {
	// AadProfile: The Azure Active Directory configuration.
	AadProfile *ManagedClusterAADProfile_STATUS `json:"aadProfile,omitempty"`

	// AddonProfiles: The profile of managed cluster add-on.
	AddonProfiles map[string]ManagedClusterAddonProfile_STATUS `json:"addonProfiles,omitempty"`

	// AgentPoolProfiles: The agent pool properties.
	AgentPoolProfiles []ManagedClusterAgentPoolProfile_STATUS `json:"agentPoolProfiles,omitempty"`

	// ApiServerAccessProfile: The access profile for managed cluster API server.
	ApiServerAccessProfile *ManagedClusterAPIServerAccessProfile_STATUS `json:"apiServerAccessProfile,omitempty"`

	// AutoScalerProfile: Parameters to be applied to the cluster-autoscaler when enabled
	AutoScalerProfile *ManagedClusterProperties_AutoScalerProfile_STATUS `json:"autoScalerProfile,omitempty"`

	// AutoUpgradeProfile: The auto upgrade configuration.
	AutoUpgradeProfile *ManagedClusterAutoUpgradeProfile_STATUS `json:"autoUpgradeProfile,omitempty"`

	// AzureMonitorProfile: Azure Monitor addon profiles for monitoring the managed cluster.
	AzureMonitorProfile *ManagedClusterAzureMonitorProfile_STATUS `json:"azureMonitorProfile,omitempty"`

	// AzurePortalFQDN: The Azure Portal requires certain Cross-Origin Resource Sharing (CORS) headers to be sent in some
	// responses, which Kubernetes APIServer doesn't handle by default. This special FQDN supports CORS, allowing the Azure
	// Portal to function properly.
	AzurePortalFQDN *string `json:"azurePortalFQDN,omitempty"`

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

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

	// DisableLocalAccounts: If set to true, getting static credentials will be disabled for this cluster. This must only be
	// used on Managed Clusters that are AAD enabled. For more details see [disable local
	// accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview).
	DisableLocalAccounts *bool `json:"disableLocalAccounts,omitempty"`

	// DiskEncryptionSetID: This is of the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'
	DiskEncryptionSetID *string `json:"diskEncryptionSetID,omitempty"`

	// DnsPrefix: This cannot be updated once the Managed Cluster has been created.
	DnsPrefix *string `json:"dnsPrefix,omitempty"`

	// EnablePodSecurityPolicy: (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was
	// deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and
	// https://aka.ms/aks/psp.
	EnablePodSecurityPolicy *bool `json:"enablePodSecurityPolicy,omitempty"`

	// EnableRBAC: Whether to enable Kubernetes Role-Based Access Control.
	EnableRBAC *bool `json:"enableRBAC,omitempty"`

	// ExtendedLocation: The extended location of the Virtual Machine.
	ExtendedLocation *ExtendedLocation_STATUS `json:"extendedLocation,omitempty"`

	// Fqdn: The FQDN of the master pool.
	Fqdn *string `json:"fqdn,omitempty"`

	// FqdnSubdomain: This cannot be updated once the Managed Cluster has been created.
	FqdnSubdomain *string `json:"fqdnSubdomain,omitempty"`

	// HttpProxyConfig: Configurations for provisioning the cluster with HTTP proxy servers.
	HttpProxyConfig *ManagedClusterHTTPProxyConfig_STATUS `json:"httpProxyConfig,omitempty"`

	// Id: Fully qualified resource ID for the resource. E.g.
	// "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	Id *string `json:"id,omitempty"`

	// Identity: The identity of the managed cluster, if configured.
	Identity *ManagedClusterIdentity_STATUS `json:"identity,omitempty"`

	// IdentityProfile: Identities associated with the cluster.
	IdentityProfile map[string]UserAssignedIdentity_STATUS `json:"identityProfile,omitempty"`

	// KubernetesVersion: Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported.
	// When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the cluster
	// with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer
	// patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All
	// upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or
	// 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS
	// cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details.
	KubernetesVersion *string `json:"kubernetesVersion,omitempty"`

	// LinuxProfile: The profile for Linux VMs in the Managed Cluster.
	LinuxProfile *ContainerServiceLinuxProfile_STATUS `json:"linuxProfile,omitempty"`

	// Location: The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// MaxAgentPools: The max number of agent pools for the managed cluster.
	MaxAgentPools *int `json:"maxAgentPools,omitempty"`

	// Name: The name of the resource
	Name *string `json:"name,omitempty"`

	// NetworkProfile: The network configuration profile.
	NetworkProfile *ContainerServiceNetworkProfile_STATUS `json:"networkProfile,omitempty"`

	// NodeResourceGroup: The name of the resource group containing agent pool nodes.
	NodeResourceGroup *string `json:"nodeResourceGroup,omitempty"`

	// OidcIssuerProfile: The OIDC issuer profile of the Managed Cluster.
	OidcIssuerProfile *ManagedClusterOIDCIssuerProfile_STATUS `json:"oidcIssuerProfile,omitempty"`

	// PodIdentityProfile: See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more
	// details on AAD pod identity integration.
	PodIdentityProfile *ManagedClusterPodIdentityProfile_STATUS `json:"podIdentityProfile,omitempty"`

	// PowerState: The Power State of the cluster.
	PowerState *PowerState_STATUS `json:"powerState,omitempty"`

	// PrivateFQDN: The FQDN of private cluster.
	PrivateFQDN *string `json:"privateFQDN,omitempty"`

	// PrivateLinkResources: Private link resources associated with the cluster.
	PrivateLinkResources []PrivateLinkResource_STATUS `json:"privateLinkResources,omitempty"`

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

	// PublicNetworkAccess: Allow or deny public network access for AKS
	PublicNetworkAccess *ManagedClusterProperties_PublicNetworkAccess_STATUS `json:"publicNetworkAccess,omitempty"`

	// ResourceUID: The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds (i.e: create, delete, create
	// sequence)
	ResourceUID *string `json:"resourceUID,omitempty"`

	// SecurityProfile: Security profile for the managed cluster.
	SecurityProfile *ManagedClusterSecurityProfile_STATUS `json:"securityProfile,omitempty"`

	// ServiceMeshProfile: Service mesh profile for a managed cluster.
	ServiceMeshProfile *ServiceMeshProfile_STATUS `json:"serviceMeshProfile,omitempty"`

	// ServicePrincipalProfile: Information about a service principal identity for the cluster to use for manipulating Azure
	// APIs.
	ServicePrincipalProfile *ManagedClusterServicePrincipalProfile_STATUS `json:"servicePrincipalProfile,omitempty"`

	// Sku: The managed cluster SKU.
	Sku *ManagedClusterSKU_STATUS `json:"sku,omitempty"`

	// StorageProfile: Storage profile for the managed cluster.
	StorageProfile *ManagedClusterStorageProfile_STATUS `json:"storageProfile,omitempty"`

	// SupportPlan: The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'.
	SupportPlan *KubernetesSupportPlan_STATUS `json:"supportPlan,omitempty"`

	// SystemData: Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData_STATUS `json:"systemData,omitempty"`

	// Tags: Resource tags.
	Tags map[string]string `json:"tags,omitempty"`

	// Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty"`

	// UpgradeSettings: Settings for upgrading a cluster.
	UpgradeSettings *ClusterUpgradeSettings_STATUS `json:"upgradeSettings,omitempty"`

	// WindowsProfile: The profile for Windows VMs in the Managed Cluster.
	WindowsProfile *ManagedClusterWindowsProfile_STATUS `json:"windowsProfile,omitempty"`

	// WorkloadAutoScalerProfile: Workload Auto-scaler profile for the managed cluster.
	WorkloadAutoScalerProfile *ManagedClusterWorkloadAutoScalerProfile_STATUS `json:"workloadAutoScalerProfile,omitempty"`
}

var _ genruntime.ConvertibleStatus = &ManagedCluster_STATUS{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.ManagedCluster_STATUS{}
	err := cluster.AssignProperties_To_ManagedCluster_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 = &ManagedCluster_STATUS{}

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

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

	// Set property "AadProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AadProfile != nil {
			var aadProfile1 ManagedClusterAADProfile_STATUS
			err := aadProfile1.PopulateFromARM(owner, *typedInput.Properties.AadProfile)
			if err != nil {
				return err
			}
			aadProfile := aadProfile1
			cluster.AadProfile = &aadProfile
		}
	}

	// Set property "AddonProfiles":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AddonProfiles != nil {
			cluster.AddonProfiles = make(map[string]ManagedClusterAddonProfile_STATUS, len(typedInput.Properties.AddonProfiles))
			for key, value := range typedInput.Properties.AddonProfiles {
				var value1 ManagedClusterAddonProfile_STATUS
				err := value1.PopulateFromARM(owner, value)
				if err != nil {
					return err
				}
				cluster.AddonProfiles[key] = value1
			}
		}
	}

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

	// Set property "ApiServerAccessProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ApiServerAccessProfile != nil {
			var apiServerAccessProfile1 ManagedClusterAPIServerAccessProfile_STATUS
			err := apiServerAccessProfile1.PopulateFromARM(owner, *typedInput.Properties.ApiServerAccessProfile)
			if err != nil {
				return err
			}
			apiServerAccessProfile := apiServerAccessProfile1
			cluster.ApiServerAccessProfile = &apiServerAccessProfile
		}
	}

	// Set property "AutoScalerProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AutoScalerProfile != nil {
			var autoScalerProfile1 ManagedClusterProperties_AutoScalerProfile_STATUS
			err := autoScalerProfile1.PopulateFromARM(owner, *typedInput.Properties.AutoScalerProfile)
			if err != nil {
				return err
			}
			autoScalerProfile := autoScalerProfile1
			cluster.AutoScalerProfile = &autoScalerProfile
		}
	}

	// Set property "AutoUpgradeProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AutoUpgradeProfile != nil {
			var autoUpgradeProfile1 ManagedClusterAutoUpgradeProfile_STATUS
			err := autoUpgradeProfile1.PopulateFromARM(owner, *typedInput.Properties.AutoUpgradeProfile)
			if err != nil {
				return err
			}
			autoUpgradeProfile := autoUpgradeProfile1
			cluster.AutoUpgradeProfile = &autoUpgradeProfile
		}
	}

	// Set property "AzureMonitorProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AzureMonitorProfile != nil {
			var azureMonitorProfile1 ManagedClusterAzureMonitorProfile_STATUS
			err := azureMonitorProfile1.PopulateFromARM(owner, *typedInput.Properties.AzureMonitorProfile)
			if err != nil {
				return err
			}
			azureMonitorProfile := azureMonitorProfile1
			cluster.AzureMonitorProfile = &azureMonitorProfile
		}
	}

	// Set property "AzurePortalFQDN":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AzurePortalFQDN != nil {
			azurePortalFQDN := *typedInput.Properties.AzurePortalFQDN
			cluster.AzurePortalFQDN = &azurePortalFQDN
		}
	}

	// no assignment for property "Conditions"

	// Set property "CurrentKubernetesVersion":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.CurrentKubernetesVersion != nil {
			currentKubernetesVersion := *typedInput.Properties.CurrentKubernetesVersion
			cluster.CurrentKubernetesVersion = &currentKubernetesVersion
		}
	}

	// Set property "DisableLocalAccounts":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.DisableLocalAccounts != nil {
			disableLocalAccounts := *typedInput.Properties.DisableLocalAccounts
			cluster.DisableLocalAccounts = &disableLocalAccounts
		}
	}

	// Set property "DiskEncryptionSetID":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.DiskEncryptionSetID != nil {
			diskEncryptionSetID := *typedInput.Properties.DiskEncryptionSetID
			cluster.DiskEncryptionSetID = &diskEncryptionSetID
		}
	}

	// Set property "DnsPrefix":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.DnsPrefix != nil {
			dnsPrefix := *typedInput.Properties.DnsPrefix
			cluster.DnsPrefix = &dnsPrefix
		}
	}

	// Set property "EnablePodSecurityPolicy":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EnablePodSecurityPolicy != nil {
			enablePodSecurityPolicy := *typedInput.Properties.EnablePodSecurityPolicy
			cluster.EnablePodSecurityPolicy = &enablePodSecurityPolicy
		}
	}

	// Set property "EnableRBAC":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EnableRBAC != nil {
			enableRBAC := *typedInput.Properties.EnableRBAC
			cluster.EnableRBAC = &enableRBAC
		}
	}

	// Set property "ExtendedLocation":
	if typedInput.ExtendedLocation != nil {
		var extendedLocation1 ExtendedLocation_STATUS
		err := extendedLocation1.PopulateFromARM(owner, *typedInput.ExtendedLocation)
		if err != nil {
			return err
		}
		extendedLocation := extendedLocation1
		cluster.ExtendedLocation = &extendedLocation
	}

	// Set property "Fqdn":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Fqdn != nil {
			fqdn := *typedInput.Properties.Fqdn
			cluster.Fqdn = &fqdn
		}
	}

	// Set property "FqdnSubdomain":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.FqdnSubdomain != nil {
			fqdnSubdomain := *typedInput.Properties.FqdnSubdomain
			cluster.FqdnSubdomain = &fqdnSubdomain
		}
	}

	// Set property "HttpProxyConfig":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.HttpProxyConfig != nil {
			var httpProxyConfig1 ManagedClusterHTTPProxyConfig_STATUS
			err := httpProxyConfig1.PopulateFromARM(owner, *typedInput.Properties.HttpProxyConfig)
			if err != nil {
				return err
			}
			httpProxyConfig := httpProxyConfig1
			cluster.HttpProxyConfig = &httpProxyConfig
		}
	}

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

	// Set property "Identity":
	if typedInput.Identity != nil {
		var identity1 ManagedClusterIdentity_STATUS
		err := identity1.PopulateFromARM(owner, *typedInput.Identity)
		if err != nil {
			return err
		}
		identity := identity1
		cluster.Identity = &identity
	}

	// Set property "IdentityProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.IdentityProfile != nil {
			cluster.IdentityProfile = make(map[string]UserAssignedIdentity_STATUS, len(typedInput.Properties.IdentityProfile))
			for key, value := range typedInput.Properties.IdentityProfile {
				var value1 UserAssignedIdentity_STATUS
				err := value1.PopulateFromARM(owner, value)
				if err != nil {
					return err
				}
				cluster.IdentityProfile[key] = value1
			}
		}
	}

	// Set property "KubernetesVersion":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.KubernetesVersion != nil {
			kubernetesVersion := *typedInput.Properties.KubernetesVersion
			cluster.KubernetesVersion = &kubernetesVersion
		}
	}

	// Set property "LinuxProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.LinuxProfile != nil {
			var linuxProfile1 ContainerServiceLinuxProfile_STATUS
			err := linuxProfile1.PopulateFromARM(owner, *typedInput.Properties.LinuxProfile)
			if err != nil {
				return err
			}
			linuxProfile := linuxProfile1
			cluster.LinuxProfile = &linuxProfile
		}
	}

	// Set property "Location":
	if typedInput.Location != nil {
		location := *typedInput.Location
		cluster.Location = &location
	}

	// Set property "MaxAgentPools":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.MaxAgentPools != nil {
			maxAgentPools := *typedInput.Properties.MaxAgentPools
			cluster.MaxAgentPools = &maxAgentPools
		}
	}

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

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

	// Set property "NodeResourceGroup":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.NodeResourceGroup != nil {
			nodeResourceGroup := *typedInput.Properties.NodeResourceGroup
			cluster.NodeResourceGroup = &nodeResourceGroup
		}
	}

	// Set property "OidcIssuerProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.OidcIssuerProfile != nil {
			var oidcIssuerProfile1 ManagedClusterOIDCIssuerProfile_STATUS
			err := oidcIssuerProfile1.PopulateFromARM(owner, *typedInput.Properties.OidcIssuerProfile)
			if err != nil {
				return err
			}
			oidcIssuerProfile := oidcIssuerProfile1
			cluster.OidcIssuerProfile = &oidcIssuerProfile
		}
	}

	// Set property "PodIdentityProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PodIdentityProfile != nil {
			var podIdentityProfile1 ManagedClusterPodIdentityProfile_STATUS
			err := podIdentityProfile1.PopulateFromARM(owner, *typedInput.Properties.PodIdentityProfile)
			if err != nil {
				return err
			}
			podIdentityProfile := podIdentityProfile1
			cluster.PodIdentityProfile = &podIdentityProfile
		}
	}

	// 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
			cluster.PowerState = &powerState
		}
	}

	// Set property "PrivateFQDN":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PrivateFQDN != nil {
			privateFQDN := *typedInput.Properties.PrivateFQDN
			cluster.PrivateFQDN = &privateFQDN
		}
	}

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

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

	// Set property "PublicNetworkAccess":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PublicNetworkAccess != nil {
			var temp string
			temp = string(*typedInput.Properties.PublicNetworkAccess)
			publicNetworkAccess := ManagedClusterProperties_PublicNetworkAccess_STATUS(temp)
			cluster.PublicNetworkAccess = &publicNetworkAccess
		}
	}

	// Set property "ResourceUID":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ResourceUID != nil {
			resourceUID := *typedInput.Properties.ResourceUID
			cluster.ResourceUID = &resourceUID
		}
	}

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

	// Set property "ServiceMeshProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ServiceMeshProfile != nil {
			var serviceMeshProfile1 ServiceMeshProfile_STATUS
			err := serviceMeshProfile1.PopulateFromARM(owner, *typedInput.Properties.ServiceMeshProfile)
			if err != nil {
				return err
			}
			serviceMeshProfile := serviceMeshProfile1
			cluster.ServiceMeshProfile = &serviceMeshProfile
		}
	}

	// Set property "ServicePrincipalProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ServicePrincipalProfile != nil {
			var servicePrincipalProfile1 ManagedClusterServicePrincipalProfile_STATUS
			err := servicePrincipalProfile1.PopulateFromARM(owner, *typedInput.Properties.ServicePrincipalProfile)
			if err != nil {
				return err
			}
			servicePrincipalProfile := servicePrincipalProfile1
			cluster.ServicePrincipalProfile = &servicePrincipalProfile
		}
	}

	// Set property "Sku":
	if typedInput.Sku != nil {
		var sku1 ManagedClusterSKU_STATUS
		err := sku1.PopulateFromARM(owner, *typedInput.Sku)
		if err != nil {
			return err
		}
		sku := sku1
		cluster.Sku = &sku
	}

	// Set property "StorageProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.StorageProfile != nil {
			var storageProfile1 ManagedClusterStorageProfile_STATUS
			err := storageProfile1.PopulateFromARM(owner, *typedInput.Properties.StorageProfile)
			if err != nil {
				return err
			}
			storageProfile := storageProfile1
			cluster.StorageProfile = &storageProfile
		}
	}

	// Set property "SupportPlan":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.SupportPlan != nil {
			var temp string
			temp = string(*typedInput.Properties.SupportPlan)
			supportPlan := KubernetesSupportPlan_STATUS(temp)
			cluster.SupportPlan = &supportPlan
		}
	}

	// Set property "SystemData":
	if typedInput.SystemData != nil {
		var systemData1 SystemData_STATUS
		err := systemData1.PopulateFromARM(owner, *typedInput.SystemData)
		if err != nil {
			return err
		}
		systemData := systemData1
		cluster.SystemData = &systemData
	}

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

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

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

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

	// Set property "WorkloadAutoScalerProfile":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.WorkloadAutoScalerProfile != nil {
			var workloadAutoScalerProfile1 ManagedClusterWorkloadAutoScalerProfile_STATUS
			err := workloadAutoScalerProfile1.PopulateFromARM(owner, *typedInput.Properties.WorkloadAutoScalerProfile)
			if err != nil {
				return err
			}
			workloadAutoScalerProfile := workloadAutoScalerProfile1
			cluster.WorkloadAutoScalerProfile = &workloadAutoScalerProfile
		}
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedCluster_STATUS populates our ManagedCluster_STATUS from the provided source ManagedCluster_STATUS
func (cluster *ManagedCluster_STATUS) AssignProperties_From_ManagedCluster_STATUS(source *storage.ManagedCluster_STATUS) error {

	// AadProfile
	if source.AadProfile != nil {
		var aadProfile ManagedClusterAADProfile_STATUS
		err := aadProfile.AssignProperties_From_ManagedClusterAADProfile_STATUS(source.AadProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterAADProfile_STATUS() to populate field AadProfile")
		}
		cluster.AadProfile = &aadProfile
	} else {
		cluster.AadProfile = nil
	}

	// AddonProfiles
	if source.AddonProfiles != nil {
		addonProfileMap := make(map[string]ManagedClusterAddonProfile_STATUS, len(source.AddonProfiles))
		for addonProfileKey, addonProfileValue := range source.AddonProfiles {
			var addonProfile ManagedClusterAddonProfile_STATUS
			err := addonProfile.AssignProperties_From_ManagedClusterAddonProfile_STATUS(&addonProfileValue)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterAddonProfile_STATUS() to populate field AddonProfiles")
			}
			addonProfileMap[addonProfileKey] = addonProfile
		}
		cluster.AddonProfiles = addonProfileMap
	} else {
		cluster.AddonProfiles = nil
	}

	// AgentPoolProfiles
	if source.AgentPoolProfiles != nil {
		agentPoolProfileList := make([]ManagedClusterAgentPoolProfile_STATUS, len(source.AgentPoolProfiles))
		for agentPoolProfileIndex, agentPoolProfileItem := range source.AgentPoolProfiles {
			var agentPoolProfile ManagedClusterAgentPoolProfile_STATUS
			err := agentPoolProfile.AssignProperties_From_ManagedClusterAgentPoolProfile_STATUS(&agentPoolProfileItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterAgentPoolProfile_STATUS() to populate field AgentPoolProfiles")
			}
			agentPoolProfileList[agentPoolProfileIndex] = agentPoolProfile
		}
		cluster.AgentPoolProfiles = agentPoolProfileList
	} else {
		cluster.AgentPoolProfiles = nil
	}

	// ApiServerAccessProfile
	if source.ApiServerAccessProfile != nil {
		var apiServerAccessProfile ManagedClusterAPIServerAccessProfile_STATUS
		err := apiServerAccessProfile.AssignProperties_From_ManagedClusterAPIServerAccessProfile_STATUS(source.ApiServerAccessProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterAPIServerAccessProfile_STATUS() to populate field ApiServerAccessProfile")
		}
		cluster.ApiServerAccessProfile = &apiServerAccessProfile
	} else {
		cluster.ApiServerAccessProfile = nil
	}

	// AutoScalerProfile
	if source.AutoScalerProfile != nil {
		var autoScalerProfile ManagedClusterProperties_AutoScalerProfile_STATUS
		err := autoScalerProfile.AssignProperties_From_ManagedClusterProperties_AutoScalerProfile_STATUS(source.AutoScalerProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterProperties_AutoScalerProfile_STATUS() to populate field AutoScalerProfile")
		}
		cluster.AutoScalerProfile = &autoScalerProfile
	} else {
		cluster.AutoScalerProfile = nil
	}

	// AutoUpgradeProfile
	if source.AutoUpgradeProfile != nil {
		var autoUpgradeProfile ManagedClusterAutoUpgradeProfile_STATUS
		err := autoUpgradeProfile.AssignProperties_From_ManagedClusterAutoUpgradeProfile_STATUS(source.AutoUpgradeProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterAutoUpgradeProfile_STATUS() to populate field AutoUpgradeProfile")
		}
		cluster.AutoUpgradeProfile = &autoUpgradeProfile
	} else {
		cluster.AutoUpgradeProfile = nil
	}

	// AzureMonitorProfile
	if source.AzureMonitorProfile != nil {
		var azureMonitorProfile ManagedClusterAzureMonitorProfile_STATUS
		err := azureMonitorProfile.AssignProperties_From_ManagedClusterAzureMonitorProfile_STATUS(source.AzureMonitorProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterAzureMonitorProfile_STATUS() to populate field AzureMonitorProfile")
		}
		cluster.AzureMonitorProfile = &azureMonitorProfile
	} else {
		cluster.AzureMonitorProfile = nil
	}

	// AzurePortalFQDN
	cluster.AzurePortalFQDN = genruntime.ClonePointerToString(source.AzurePortalFQDN)

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

	// CurrentKubernetesVersion
	cluster.CurrentKubernetesVersion = genruntime.ClonePointerToString(source.CurrentKubernetesVersion)

	// DisableLocalAccounts
	if source.DisableLocalAccounts != nil {
		disableLocalAccount := *source.DisableLocalAccounts
		cluster.DisableLocalAccounts = &disableLocalAccount
	} else {
		cluster.DisableLocalAccounts = nil
	}

	// DiskEncryptionSetID
	cluster.DiskEncryptionSetID = genruntime.ClonePointerToString(source.DiskEncryptionSetID)

	// DnsPrefix
	cluster.DnsPrefix = genruntime.ClonePointerToString(source.DnsPrefix)

	// EnablePodSecurityPolicy
	if source.EnablePodSecurityPolicy != nil {
		enablePodSecurityPolicy := *source.EnablePodSecurityPolicy
		cluster.EnablePodSecurityPolicy = &enablePodSecurityPolicy
	} else {
		cluster.EnablePodSecurityPolicy = nil
	}

	// EnableRBAC
	if source.EnableRBAC != nil {
		enableRBAC := *source.EnableRBAC
		cluster.EnableRBAC = &enableRBAC
	} else {
		cluster.EnableRBAC = nil
	}

	// ExtendedLocation
	if source.ExtendedLocation != nil {
		var extendedLocation ExtendedLocation_STATUS
		err := extendedLocation.AssignProperties_From_ExtendedLocation_STATUS(source.ExtendedLocation)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ExtendedLocation_STATUS() to populate field ExtendedLocation")
		}
		cluster.ExtendedLocation = &extendedLocation
	} else {
		cluster.ExtendedLocation = nil
	}

	// Fqdn
	cluster.Fqdn = genruntime.ClonePointerToString(source.Fqdn)

	// FqdnSubdomain
	cluster.FqdnSubdomain = genruntime.ClonePointerToString(source.FqdnSubdomain)

	// HttpProxyConfig
	if source.HttpProxyConfig != nil {
		var httpProxyConfig ManagedClusterHTTPProxyConfig_STATUS
		err := httpProxyConfig.AssignProperties_From_ManagedClusterHTTPProxyConfig_STATUS(source.HttpProxyConfig)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterHTTPProxyConfig_STATUS() to populate field HttpProxyConfig")
		}
		cluster.HttpProxyConfig = &httpProxyConfig
	} else {
		cluster.HttpProxyConfig = nil
	}

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

	// Identity
	if source.Identity != nil {
		var identity ManagedClusterIdentity_STATUS
		err := identity.AssignProperties_From_ManagedClusterIdentity_STATUS(source.Identity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterIdentity_STATUS() to populate field Identity")
		}
		cluster.Identity = &identity
	} else {
		cluster.Identity = nil
	}

	// IdentityProfile
	if source.IdentityProfile != nil {
		identityProfileMap := make(map[string]UserAssignedIdentity_STATUS, len(source.IdentityProfile))
		for identityProfileKey, identityProfileValue := range source.IdentityProfile {
			var identityProfile UserAssignedIdentity_STATUS
			err := identityProfile.AssignProperties_From_UserAssignedIdentity_STATUS(&identityProfileValue)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_UserAssignedIdentity_STATUS() to populate field IdentityProfile")
			}
			identityProfileMap[identityProfileKey] = identityProfile
		}
		cluster.IdentityProfile = identityProfileMap
	} else {
		cluster.IdentityProfile = nil
	}

	// KubernetesVersion
	cluster.KubernetesVersion = genruntime.ClonePointerToString(source.KubernetesVersion)

	// LinuxProfile
	if source.LinuxProfile != nil {
		var linuxProfile ContainerServiceLinuxProfile_STATUS
		err := linuxProfile.AssignProperties_From_ContainerServiceLinuxProfile_STATUS(source.LinuxProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ContainerServiceLinuxProfile_STATUS() to populate field LinuxProfile")
		}
		cluster.LinuxProfile = &linuxProfile
	} else {
		cluster.LinuxProfile = nil
	}

	// Location
	cluster.Location = genruntime.ClonePointerToString(source.Location)

	// MaxAgentPools
	cluster.MaxAgentPools = genruntime.ClonePointerToInt(source.MaxAgentPools)

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

	// NetworkProfile
	if source.NetworkProfile != nil {
		var networkProfile ContainerServiceNetworkProfile_STATUS
		err := networkProfile.AssignProperties_From_ContainerServiceNetworkProfile_STATUS(source.NetworkProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ContainerServiceNetworkProfile_STATUS() to populate field NetworkProfile")
		}
		cluster.NetworkProfile = &networkProfile
	} else {
		cluster.NetworkProfile = nil
	}

	// NodeResourceGroup
	cluster.NodeResourceGroup = genruntime.ClonePointerToString(source.NodeResourceGroup)

	// OidcIssuerProfile
	if source.OidcIssuerProfile != nil {
		var oidcIssuerProfile ManagedClusterOIDCIssuerProfile_STATUS
		err := oidcIssuerProfile.AssignProperties_From_ManagedClusterOIDCIssuerProfile_STATUS(source.OidcIssuerProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterOIDCIssuerProfile_STATUS() to populate field OidcIssuerProfile")
		}
		cluster.OidcIssuerProfile = &oidcIssuerProfile
	} else {
		cluster.OidcIssuerProfile = nil
	}

	// PodIdentityProfile
	if source.PodIdentityProfile != nil {
		var podIdentityProfile ManagedClusterPodIdentityProfile_STATUS
		err := podIdentityProfile.AssignProperties_From_ManagedClusterPodIdentityProfile_STATUS(source.PodIdentityProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterPodIdentityProfile_STATUS() to populate field PodIdentityProfile")
		}
		cluster.PodIdentityProfile = &podIdentityProfile
	} else {
		cluster.PodIdentityProfile = nil
	}

	// 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")
		}
		cluster.PowerState = &powerState
	} else {
		cluster.PowerState = nil
	}

	// PrivateFQDN
	cluster.PrivateFQDN = genruntime.ClonePointerToString(source.PrivateFQDN)

	// PrivateLinkResources
	if source.PrivateLinkResources != nil {
		privateLinkResourceList := make([]PrivateLinkResource_STATUS, len(source.PrivateLinkResources))
		for privateLinkResourceIndex, privateLinkResourceItem := range source.PrivateLinkResources {
			var privateLinkResource PrivateLinkResource_STATUS
			err := privateLinkResource.AssignProperties_From_PrivateLinkResource_STATUS(&privateLinkResourceItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_PrivateLinkResource_STATUS() to populate field PrivateLinkResources")
			}
			privateLinkResourceList[privateLinkResourceIndex] = privateLinkResource
		}
		cluster.PrivateLinkResources = privateLinkResourceList
	} else {
		cluster.PrivateLinkResources = nil
	}

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

	// PublicNetworkAccess
	if source.PublicNetworkAccess != nil {
		publicNetworkAccess := *source.PublicNetworkAccess
		publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, managedClusterProperties_PublicNetworkAccess_STATUS_Values)
		cluster.PublicNetworkAccess = &publicNetworkAccessTemp
	} else {
		cluster.PublicNetworkAccess = nil
	}

	// ResourceUID
	cluster.ResourceUID = genruntime.ClonePointerToString(source.ResourceUID)

	// SecurityProfile
	if source.SecurityProfile != nil {
		var securityProfile ManagedClusterSecurityProfile_STATUS
		err := securityProfile.AssignProperties_From_ManagedClusterSecurityProfile_STATUS(source.SecurityProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterSecurityProfile_STATUS() to populate field SecurityProfile")
		}
		cluster.SecurityProfile = &securityProfile
	} else {
		cluster.SecurityProfile = nil
	}

	// ServiceMeshProfile
	if source.ServiceMeshProfile != nil {
		var serviceMeshProfile ServiceMeshProfile_STATUS
		err := serviceMeshProfile.AssignProperties_From_ServiceMeshProfile_STATUS(source.ServiceMeshProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ServiceMeshProfile_STATUS() to populate field ServiceMeshProfile")
		}
		cluster.ServiceMeshProfile = &serviceMeshProfile
	} else {
		cluster.ServiceMeshProfile = nil
	}

	// ServicePrincipalProfile
	if source.ServicePrincipalProfile != nil {
		var servicePrincipalProfile ManagedClusterServicePrincipalProfile_STATUS
		err := servicePrincipalProfile.AssignProperties_From_ManagedClusterServicePrincipalProfile_STATUS(source.ServicePrincipalProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterServicePrincipalProfile_STATUS() to populate field ServicePrincipalProfile")
		}
		cluster.ServicePrincipalProfile = &servicePrincipalProfile
	} else {
		cluster.ServicePrincipalProfile = nil
	}

	// Sku
	if source.Sku != nil {
		var sku ManagedClusterSKU_STATUS
		err := sku.AssignProperties_From_ManagedClusterSKU_STATUS(source.Sku)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterSKU_STATUS() to populate field Sku")
		}
		cluster.Sku = &sku
	} else {
		cluster.Sku = nil
	}

	// StorageProfile
	if source.StorageProfile != nil {
		var storageProfile ManagedClusterStorageProfile_STATUS
		err := storageProfile.AssignProperties_From_ManagedClusterStorageProfile_STATUS(source.StorageProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterStorageProfile_STATUS() to populate field StorageProfile")
		}
		cluster.StorageProfile = &storageProfile
	} else {
		cluster.StorageProfile = nil
	}

	// SupportPlan
	if source.SupportPlan != nil {
		supportPlan := *source.SupportPlan
		supportPlanTemp := genruntime.ToEnum(supportPlan, kubernetesSupportPlan_STATUS_Values)
		cluster.SupportPlan = &supportPlanTemp
	} else {
		cluster.SupportPlan = nil
	}

	// SystemData
	if source.SystemData != nil {
		var systemDatum SystemData_STATUS
		err := systemDatum.AssignProperties_From_SystemData_STATUS(source.SystemData)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SystemData_STATUS() to populate field SystemData")
		}
		cluster.SystemData = &systemDatum
	} else {
		cluster.SystemData = nil
	}

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

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

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

	// WindowsProfile
	if source.WindowsProfile != nil {
		var windowsProfile ManagedClusterWindowsProfile_STATUS
		err := windowsProfile.AssignProperties_From_ManagedClusterWindowsProfile_STATUS(source.WindowsProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterWindowsProfile_STATUS() to populate field WindowsProfile")
		}
		cluster.WindowsProfile = &windowsProfile
	} else {
		cluster.WindowsProfile = nil
	}

	// WorkloadAutoScalerProfile
	if source.WorkloadAutoScalerProfile != nil {
		var workloadAutoScalerProfile ManagedClusterWorkloadAutoScalerProfile_STATUS
		err := workloadAutoScalerProfile.AssignProperties_From_ManagedClusterWorkloadAutoScalerProfile_STATUS(source.WorkloadAutoScalerProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterWorkloadAutoScalerProfile_STATUS() to populate field WorkloadAutoScalerProfile")
		}
		cluster.WorkloadAutoScalerProfile = &workloadAutoScalerProfile
	} else {
		cluster.WorkloadAutoScalerProfile = nil
	}

	// No error
	return nil
}

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

	// AadProfile
	if cluster.AadProfile != nil {
		var aadProfile storage.ManagedClusterAADProfile_STATUS
		err := cluster.AadProfile.AssignProperties_To_ManagedClusterAADProfile_STATUS(&aadProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterAADProfile_STATUS() to populate field AadProfile")
		}
		destination.AadProfile = &aadProfile
	} else {
		destination.AadProfile = nil
	}

	// AddonProfiles
	if cluster.AddonProfiles != nil {
		addonProfileMap := make(map[string]storage.ManagedClusterAddonProfile_STATUS, len(cluster.AddonProfiles))
		for addonProfileKey, addonProfileValue := range cluster.AddonProfiles {
			var addonProfile storage.ManagedClusterAddonProfile_STATUS
			err := addonProfileValue.AssignProperties_To_ManagedClusterAddonProfile_STATUS(&addonProfile)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterAddonProfile_STATUS() to populate field AddonProfiles")
			}
			addonProfileMap[addonProfileKey] = addonProfile
		}
		destination.AddonProfiles = addonProfileMap
	} else {
		destination.AddonProfiles = nil
	}

	// AgentPoolProfiles
	if cluster.AgentPoolProfiles != nil {
		agentPoolProfileList := make([]storage.ManagedClusterAgentPoolProfile_STATUS, len(cluster.AgentPoolProfiles))
		for agentPoolProfileIndex, agentPoolProfileItem := range cluster.AgentPoolProfiles {
			var agentPoolProfile storage.ManagedClusterAgentPoolProfile_STATUS
			err := agentPoolProfileItem.AssignProperties_To_ManagedClusterAgentPoolProfile_STATUS(&agentPoolProfile)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterAgentPoolProfile_STATUS() to populate field AgentPoolProfiles")
			}
			agentPoolProfileList[agentPoolProfileIndex] = agentPoolProfile
		}
		destination.AgentPoolProfiles = agentPoolProfileList
	} else {
		destination.AgentPoolProfiles = nil
	}

	// ApiServerAccessProfile
	if cluster.ApiServerAccessProfile != nil {
		var apiServerAccessProfile storage.ManagedClusterAPIServerAccessProfile_STATUS
		err := cluster.ApiServerAccessProfile.AssignProperties_To_ManagedClusterAPIServerAccessProfile_STATUS(&apiServerAccessProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterAPIServerAccessProfile_STATUS() to populate field ApiServerAccessProfile")
		}
		destination.ApiServerAccessProfile = &apiServerAccessProfile
	} else {
		destination.ApiServerAccessProfile = nil
	}

	// AutoScalerProfile
	if cluster.AutoScalerProfile != nil {
		var autoScalerProfile storage.ManagedClusterProperties_AutoScalerProfile_STATUS
		err := cluster.AutoScalerProfile.AssignProperties_To_ManagedClusterProperties_AutoScalerProfile_STATUS(&autoScalerProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterProperties_AutoScalerProfile_STATUS() to populate field AutoScalerProfile")
		}
		destination.AutoScalerProfile = &autoScalerProfile
	} else {
		destination.AutoScalerProfile = nil
	}

	// AutoUpgradeProfile
	if cluster.AutoUpgradeProfile != nil {
		var autoUpgradeProfile storage.ManagedClusterAutoUpgradeProfile_STATUS
		err := cluster.AutoUpgradeProfile.AssignProperties_To_ManagedClusterAutoUpgradeProfile_STATUS(&autoUpgradeProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterAutoUpgradeProfile_STATUS() to populate field AutoUpgradeProfile")
		}
		destination.AutoUpgradeProfile = &autoUpgradeProfile
	} else {
		destination.AutoUpgradeProfile = nil
	}

	// AzureMonitorProfile
	if cluster.AzureMonitorProfile != nil {
		var azureMonitorProfile storage.ManagedClusterAzureMonitorProfile_STATUS
		err := cluster.AzureMonitorProfile.AssignProperties_To_ManagedClusterAzureMonitorProfile_STATUS(&azureMonitorProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterAzureMonitorProfile_STATUS() to populate field AzureMonitorProfile")
		}
		destination.AzureMonitorProfile = &azureMonitorProfile
	} else {
		destination.AzureMonitorProfile = nil
	}

	// AzurePortalFQDN
	destination.AzurePortalFQDN = genruntime.ClonePointerToString(cluster.AzurePortalFQDN)

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

	// CurrentKubernetesVersion
	destination.CurrentKubernetesVersion = genruntime.ClonePointerToString(cluster.CurrentKubernetesVersion)

	// DisableLocalAccounts
	if cluster.DisableLocalAccounts != nil {
		disableLocalAccount := *cluster.DisableLocalAccounts
		destination.DisableLocalAccounts = &disableLocalAccount
	} else {
		destination.DisableLocalAccounts = nil
	}

	// DiskEncryptionSetID
	destination.DiskEncryptionSetID = genruntime.ClonePointerToString(cluster.DiskEncryptionSetID)

	// DnsPrefix
	destination.DnsPrefix = genruntime.ClonePointerToString(cluster.DnsPrefix)

	// EnablePodSecurityPolicy
	if cluster.EnablePodSecurityPolicy != nil {
		enablePodSecurityPolicy := *cluster.EnablePodSecurityPolicy
		destination.EnablePodSecurityPolicy = &enablePodSecurityPolicy
	} else {
		destination.EnablePodSecurityPolicy = nil
	}

	// EnableRBAC
	if cluster.EnableRBAC != nil {
		enableRBAC := *cluster.EnableRBAC
		destination.EnableRBAC = &enableRBAC
	} else {
		destination.EnableRBAC = nil
	}

	// ExtendedLocation
	if cluster.ExtendedLocation != nil {
		var extendedLocation storage.ExtendedLocation_STATUS
		err := cluster.ExtendedLocation.AssignProperties_To_ExtendedLocation_STATUS(&extendedLocation)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ExtendedLocation_STATUS() to populate field ExtendedLocation")
		}
		destination.ExtendedLocation = &extendedLocation
	} else {
		destination.ExtendedLocation = nil
	}

	// Fqdn
	destination.Fqdn = genruntime.ClonePointerToString(cluster.Fqdn)

	// FqdnSubdomain
	destination.FqdnSubdomain = genruntime.ClonePointerToString(cluster.FqdnSubdomain)

	// HttpProxyConfig
	if cluster.HttpProxyConfig != nil {
		var httpProxyConfig storage.ManagedClusterHTTPProxyConfig_STATUS
		err := cluster.HttpProxyConfig.AssignProperties_To_ManagedClusterHTTPProxyConfig_STATUS(&httpProxyConfig)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterHTTPProxyConfig_STATUS() to populate field HttpProxyConfig")
		}
		destination.HttpProxyConfig = &httpProxyConfig
	} else {
		destination.HttpProxyConfig = nil
	}

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

	// Identity
	if cluster.Identity != nil {
		var identity storage.ManagedClusterIdentity_STATUS
		err := cluster.Identity.AssignProperties_To_ManagedClusterIdentity_STATUS(&identity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterIdentity_STATUS() to populate field Identity")
		}
		destination.Identity = &identity
	} else {
		destination.Identity = nil
	}

	// IdentityProfile
	if cluster.IdentityProfile != nil {
		identityProfileMap := make(map[string]storage.UserAssignedIdentity_STATUS, len(cluster.IdentityProfile))
		for identityProfileKey, identityProfileValue := range cluster.IdentityProfile {
			var identityProfile storage.UserAssignedIdentity_STATUS
			err := identityProfileValue.AssignProperties_To_UserAssignedIdentity_STATUS(&identityProfile)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_UserAssignedIdentity_STATUS() to populate field IdentityProfile")
			}
			identityProfileMap[identityProfileKey] = identityProfile
		}
		destination.IdentityProfile = identityProfileMap
	} else {
		destination.IdentityProfile = nil
	}

	// KubernetesVersion
	destination.KubernetesVersion = genruntime.ClonePointerToString(cluster.KubernetesVersion)

	// LinuxProfile
	if cluster.LinuxProfile != nil {
		var linuxProfile storage.ContainerServiceLinuxProfile_STATUS
		err := cluster.LinuxProfile.AssignProperties_To_ContainerServiceLinuxProfile_STATUS(&linuxProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ContainerServiceLinuxProfile_STATUS() to populate field LinuxProfile")
		}
		destination.LinuxProfile = &linuxProfile
	} else {
		destination.LinuxProfile = nil
	}

	// Location
	destination.Location = genruntime.ClonePointerToString(cluster.Location)

	// MaxAgentPools
	destination.MaxAgentPools = genruntime.ClonePointerToInt(cluster.MaxAgentPools)

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

	// NetworkProfile
	if cluster.NetworkProfile != nil {
		var networkProfile storage.ContainerServiceNetworkProfile_STATUS
		err := cluster.NetworkProfile.AssignProperties_To_ContainerServiceNetworkProfile_STATUS(&networkProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ContainerServiceNetworkProfile_STATUS() to populate field NetworkProfile")
		}
		destination.NetworkProfile = &networkProfile
	} else {
		destination.NetworkProfile = nil
	}

	// NodeResourceGroup
	destination.NodeResourceGroup = genruntime.ClonePointerToString(cluster.NodeResourceGroup)

	// OidcIssuerProfile
	if cluster.OidcIssuerProfile != nil {
		var oidcIssuerProfile storage.ManagedClusterOIDCIssuerProfile_STATUS
		err := cluster.OidcIssuerProfile.AssignProperties_To_ManagedClusterOIDCIssuerProfile_STATUS(&oidcIssuerProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterOIDCIssuerProfile_STATUS() to populate field OidcIssuerProfile")
		}
		destination.OidcIssuerProfile = &oidcIssuerProfile
	} else {
		destination.OidcIssuerProfile = nil
	}

	// PodIdentityProfile
	if cluster.PodIdentityProfile != nil {
		var podIdentityProfile storage.ManagedClusterPodIdentityProfile_STATUS
		err := cluster.PodIdentityProfile.AssignProperties_To_ManagedClusterPodIdentityProfile_STATUS(&podIdentityProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterPodIdentityProfile_STATUS() to populate field PodIdentityProfile")
		}
		destination.PodIdentityProfile = &podIdentityProfile
	} else {
		destination.PodIdentityProfile = nil
	}

	// PowerState
	if cluster.PowerState != nil {
		var powerState storage.PowerState_STATUS
		err := cluster.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
	}

	// PrivateFQDN
	destination.PrivateFQDN = genruntime.ClonePointerToString(cluster.PrivateFQDN)

	// PrivateLinkResources
	if cluster.PrivateLinkResources != nil {
		privateLinkResourceList := make([]storage.PrivateLinkResource_STATUS, len(cluster.PrivateLinkResources))
		for privateLinkResourceIndex, privateLinkResourceItem := range cluster.PrivateLinkResources {
			var privateLinkResource storage.PrivateLinkResource_STATUS
			err := privateLinkResourceItem.AssignProperties_To_PrivateLinkResource_STATUS(&privateLinkResource)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_PrivateLinkResource_STATUS() to populate field PrivateLinkResources")
			}
			privateLinkResourceList[privateLinkResourceIndex] = privateLinkResource
		}
		destination.PrivateLinkResources = privateLinkResourceList
	} else {
		destination.PrivateLinkResources = nil
	}

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

	// PublicNetworkAccess
	if cluster.PublicNetworkAccess != nil {
		publicNetworkAccess := string(*cluster.PublicNetworkAccess)
		destination.PublicNetworkAccess = &publicNetworkAccess
	} else {
		destination.PublicNetworkAccess = nil
	}

	// ResourceUID
	destination.ResourceUID = genruntime.ClonePointerToString(cluster.ResourceUID)

	// SecurityProfile
	if cluster.SecurityProfile != nil {
		var securityProfile storage.ManagedClusterSecurityProfile_STATUS
		err := cluster.SecurityProfile.AssignProperties_To_ManagedClusterSecurityProfile_STATUS(&securityProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterSecurityProfile_STATUS() to populate field SecurityProfile")
		}
		destination.SecurityProfile = &securityProfile
	} else {
		destination.SecurityProfile = nil
	}

	// ServiceMeshProfile
	if cluster.ServiceMeshProfile != nil {
		var serviceMeshProfile storage.ServiceMeshProfile_STATUS
		err := cluster.ServiceMeshProfile.AssignProperties_To_ServiceMeshProfile_STATUS(&serviceMeshProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ServiceMeshProfile_STATUS() to populate field ServiceMeshProfile")
		}
		destination.ServiceMeshProfile = &serviceMeshProfile
	} else {
		destination.ServiceMeshProfile = nil
	}

	// ServicePrincipalProfile
	if cluster.ServicePrincipalProfile != nil {
		var servicePrincipalProfile storage.ManagedClusterServicePrincipalProfile_STATUS
		err := cluster.ServicePrincipalProfile.AssignProperties_To_ManagedClusterServicePrincipalProfile_STATUS(&servicePrincipalProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterServicePrincipalProfile_STATUS() to populate field ServicePrincipalProfile")
		}
		destination.ServicePrincipalProfile = &servicePrincipalProfile
	} else {
		destination.ServicePrincipalProfile = nil
	}

	// Sku
	if cluster.Sku != nil {
		var sku storage.ManagedClusterSKU_STATUS
		err := cluster.Sku.AssignProperties_To_ManagedClusterSKU_STATUS(&sku)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterSKU_STATUS() to populate field Sku")
		}
		destination.Sku = &sku
	} else {
		destination.Sku = nil
	}

	// StorageProfile
	if cluster.StorageProfile != nil {
		var storageProfile storage.ManagedClusterStorageProfile_STATUS
		err := cluster.StorageProfile.AssignProperties_To_ManagedClusterStorageProfile_STATUS(&storageProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterStorageProfile_STATUS() to populate field StorageProfile")
		}
		destination.StorageProfile = &storageProfile
	} else {
		destination.StorageProfile = nil
	}

	// SupportPlan
	if cluster.SupportPlan != nil {
		supportPlan := string(*cluster.SupportPlan)
		destination.SupportPlan = &supportPlan
	} else {
		destination.SupportPlan = nil
	}

	// SystemData
	if cluster.SystemData != nil {
		var systemDatum storage.SystemData_STATUS
		err := cluster.SystemData.AssignProperties_To_SystemData_STATUS(&systemDatum)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SystemData_STATUS() to populate field SystemData")
		}
		destination.SystemData = &systemDatum
	} else {
		destination.SystemData = nil
	}

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

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

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

	// WindowsProfile
	if cluster.WindowsProfile != nil {
		var windowsProfile storage.ManagedClusterWindowsProfile_STATUS
		err := cluster.WindowsProfile.AssignProperties_To_ManagedClusterWindowsProfile_STATUS(&windowsProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterWindowsProfile_STATUS() to populate field WindowsProfile")
		}
		destination.WindowsProfile = &windowsProfile
	} else {
		destination.WindowsProfile = nil
	}

	// WorkloadAutoScalerProfile
	if cluster.WorkloadAutoScalerProfile != nil {
		var workloadAutoScalerProfile storage.ManagedClusterWorkloadAutoScalerProfile_STATUS
		err := cluster.WorkloadAutoScalerProfile.AssignProperties_To_ManagedClusterWorkloadAutoScalerProfile_STATUS(&workloadAutoScalerProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterWorkloadAutoScalerProfile_STATUS() to populate field WorkloadAutoScalerProfile")
		}
		destination.WorkloadAutoScalerProfile = &workloadAutoScalerProfile
	} else {
		destination.WorkloadAutoScalerProfile = nil
	}

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

	// No error
	return nil
}

// Settings for upgrading a cluster.
type ClusterUpgradeSettings struct {
	// OverrideSettings: Settings for overrides.
	OverrideSettings *UpgradeOverrideSettings `json:"overrideSettings,omitempty"`
}

var _ genruntime.ARMTransformer = &ClusterUpgradeSettings{}

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

	// Set property "OverrideSettings":
	if settings.OverrideSettings != nil {
		overrideSettings_ARM, err := settings.OverrideSettings.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		overrideSettings := *overrideSettings_ARM.(*arm.UpgradeOverrideSettings)
		result.OverrideSettings = &overrideSettings
	}
	return result, nil
}

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

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

	// Set property "OverrideSettings":
	if typedInput.OverrideSettings != nil {
		var overrideSettings1 UpgradeOverrideSettings
		err := overrideSettings1.PopulateFromARM(owner, *typedInput.OverrideSettings)
		if err != nil {
			return err
		}
		overrideSettings := overrideSettings1
		settings.OverrideSettings = &overrideSettings
	}

	// No error
	return nil
}

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

	// OverrideSettings
	if source.OverrideSettings != nil {
		var overrideSetting UpgradeOverrideSettings
		err := overrideSetting.AssignProperties_From_UpgradeOverrideSettings(source.OverrideSettings)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_UpgradeOverrideSettings() to populate field OverrideSettings")
		}
		settings.OverrideSettings = &overrideSetting
	} else {
		settings.OverrideSettings = nil
	}

	// No error
	return nil
}

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

	// OverrideSettings
	if settings.OverrideSettings != nil {
		var overrideSetting storage.UpgradeOverrideSettings
		err := settings.OverrideSettings.AssignProperties_To_UpgradeOverrideSettings(&overrideSetting)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_UpgradeOverrideSettings() to populate field OverrideSettings")
		}
		destination.OverrideSettings = &overrideSetting
	} else {
		destination.OverrideSettings = nil
	}

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

	// No error
	return nil
}

// Settings for upgrading a cluster.
type ClusterUpgradeSettings_STATUS struct {
	// OverrideSettings: Settings for overrides.
	OverrideSettings *UpgradeOverrideSettings_STATUS `json:"overrideSettings,omitempty"`
}

var _ genruntime.FromARMConverter = &ClusterUpgradeSettings_STATUS{}

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

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

	// Set property "OverrideSettings":
	if typedInput.OverrideSettings != nil {
		var overrideSettings1 UpgradeOverrideSettings_STATUS
		err := overrideSettings1.PopulateFromARM(owner, *typedInput.OverrideSettings)
		if err != nil {
			return err
		}
		overrideSettings := overrideSettings1
		settings.OverrideSettings = &overrideSettings
	}

	// No error
	return nil
}

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

	// OverrideSettings
	if source.OverrideSettings != nil {
		var overrideSetting UpgradeOverrideSettings_STATUS
		err := overrideSetting.AssignProperties_From_UpgradeOverrideSettings_STATUS(source.OverrideSettings)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_UpgradeOverrideSettings_STATUS() to populate field OverrideSettings")
		}
		settings.OverrideSettings = &overrideSetting
	} else {
		settings.OverrideSettings = nil
	}

	// No error
	return nil
}

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

	// OverrideSettings
	if settings.OverrideSettings != nil {
		var overrideSetting storage.UpgradeOverrideSettings_STATUS
		err := settings.OverrideSettings.AssignProperties_To_UpgradeOverrideSettings_STATUS(&overrideSetting)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_UpgradeOverrideSettings_STATUS() to populate field OverrideSettings")
		}
		destination.OverrideSettings = &overrideSetting
	} else {
		destination.OverrideSettings = nil
	}

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

	// No error
	return nil
}

// Profile for Linux VMs in the container service cluster.
type ContainerServiceLinuxProfile struct {
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern="^[A-Za-z][-A-Za-z0-9_]*$"
	// AdminUsername: The administrator username to use for Linux VMs.
	AdminUsername *string `json:"adminUsername,omitempty"`

	// +kubebuilder:validation:Required
	// Ssh: The SSH configuration for Linux-based VMs running on Azure.
	Ssh *ContainerServiceSshConfiguration `json:"ssh,omitempty"`
}

var _ genruntime.ARMTransformer = &ContainerServiceLinuxProfile{}

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

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

	// Set property "Ssh":
	if profile.Ssh != nil {
		ssh_ARM, err := profile.Ssh.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		ssh := *ssh_ARM.(*arm.ContainerServiceSshConfiguration)
		result.Ssh = &ssh
	}
	return result, nil
}

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

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

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

	// Set property "Ssh":
	if typedInput.Ssh != nil {
		var ssh1 ContainerServiceSshConfiguration
		err := ssh1.PopulateFromARM(owner, *typedInput.Ssh)
		if err != nil {
			return err
		}
		ssh := ssh1
		profile.Ssh = &ssh
	}

	// No error
	return nil
}

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

	// AdminUsername
	profile.AdminUsername = genruntime.ClonePointerToString(source.AdminUsername)

	// Ssh
	if source.Ssh != nil {
		var ssh ContainerServiceSshConfiguration
		err := ssh.AssignProperties_From_ContainerServiceSshConfiguration(source.Ssh)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ContainerServiceSshConfiguration() to populate field Ssh")
		}
		profile.Ssh = &ssh
	} else {
		profile.Ssh = nil
	}

	// No error
	return nil
}

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

	// AdminUsername
	destination.AdminUsername = genruntime.ClonePointerToString(profile.AdminUsername)

	// Ssh
	if profile.Ssh != nil {
		var ssh storage.ContainerServiceSshConfiguration
		err := profile.Ssh.AssignProperties_To_ContainerServiceSshConfiguration(&ssh)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ContainerServiceSshConfiguration() to populate field Ssh")
		}
		destination.Ssh = &ssh
	} else {
		destination.Ssh = nil
	}

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

	// No error
	return nil
}

// Profile for Linux VMs in the container service cluster.
type ContainerServiceLinuxProfile_STATUS struct {
	// AdminUsername: The administrator username to use for Linux VMs.
	AdminUsername *string `json:"adminUsername,omitempty"`

	// Ssh: The SSH configuration for Linux-based VMs running on Azure.
	Ssh *ContainerServiceSshConfiguration_STATUS `json:"ssh,omitempty"`
}

var _ genruntime.FromARMConverter = &ContainerServiceLinuxProfile_STATUS{}

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

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

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

	// Set property "Ssh":
	if typedInput.Ssh != nil {
		var ssh1 ContainerServiceSshConfiguration_STATUS
		err := ssh1.PopulateFromARM(owner, *typedInput.Ssh)
		if err != nil {
			return err
		}
		ssh := ssh1
		profile.Ssh = &ssh
	}

	// No error
	return nil
}

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

	// AdminUsername
	profile.AdminUsername = genruntime.ClonePointerToString(source.AdminUsername)

	// Ssh
	if source.Ssh != nil {
		var ssh ContainerServiceSshConfiguration_STATUS
		err := ssh.AssignProperties_From_ContainerServiceSshConfiguration_STATUS(source.Ssh)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ContainerServiceSshConfiguration_STATUS() to populate field Ssh")
		}
		profile.Ssh = &ssh
	} else {
		profile.Ssh = nil
	}

	// No error
	return nil
}

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

	// AdminUsername
	destination.AdminUsername = genruntime.ClonePointerToString(profile.AdminUsername)

	// Ssh
	if profile.Ssh != nil {
		var ssh storage.ContainerServiceSshConfiguration_STATUS
		err := profile.Ssh.AssignProperties_To_ContainerServiceSshConfiguration_STATUS(&ssh)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ContainerServiceSshConfiguration_STATUS() to populate field Ssh")
		}
		destination.Ssh = &ssh
	} else {
		destination.Ssh = nil
	}

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

	// No error
	return nil
}

// Profile of network configuration.
type ContainerServiceNetworkProfile struct {
	// +kubebuilder:validation:Pattern="^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"
	// DnsServiceIP: An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address
	// range specified in serviceCidr.
	DnsServiceIP *string `json:"dnsServiceIP,omitempty"`

	// IpFamilies: IP families are used to determine single-stack or dual-stack clusters. For single-stack, the expected value
	// is IPv4. For dual-stack, the expected values are IPv4 and IPv6.
	IpFamilies []ContainerServiceNetworkProfile_IpFamilies `json:"ipFamilies,omitempty"`

	// LoadBalancerProfile: Profile of the cluster load balancer.
	LoadBalancerProfile *ManagedClusterLoadBalancerProfile `json:"loadBalancerProfile,omitempty"`

	// LoadBalancerSku: The default is 'standard'. See [Azure Load Balancer
	// SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more information about the differences between load
	// balancer SKUs.
	LoadBalancerSku *ContainerServiceNetworkProfile_LoadBalancerSku `json:"loadBalancerSku,omitempty"`

	// NatGatewayProfile: Profile of the cluster NAT gateway.
	NatGatewayProfile *ManagedClusterNATGatewayProfile `json:"natGatewayProfile,omitempty"`

	// NetworkDataplane: Network dataplane used in the Kubernetes cluster.
	NetworkDataplane *ContainerServiceNetworkProfile_NetworkDataplane `json:"networkDataplane,omitempty"`

	// NetworkMode: This cannot be specified if networkPlugin is anything other than 'azure'.
	NetworkMode *ContainerServiceNetworkProfile_NetworkMode `json:"networkMode,omitempty"`

	// NetworkPlugin: Network plugin used for building the Kubernetes network.
	NetworkPlugin *NetworkPlugin `json:"networkPlugin,omitempty"`

	// NetworkPluginMode: The mode the network plugin should use.
	NetworkPluginMode *ContainerServiceNetworkProfile_NetworkPluginMode `json:"networkPluginMode,omitempty"`

	// NetworkPolicy: Network policy used for building the Kubernetes network.
	NetworkPolicy *ContainerServiceNetworkProfile_NetworkPolicy `json:"networkPolicy,omitempty"`

	// OutboundType: This can only be set at cluster creation time and cannot be changed later. For more information see
	// [egress outbound type](https://docs.microsoft.com/azure/aks/egress-outboundtype).
	OutboundType *ContainerServiceNetworkProfile_OutboundType `json:"outboundType,omitempty"`

	// +kubebuilder:validation:Pattern="^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$"
	// PodCidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used.
	PodCidr *string `json:"podCidr,omitempty"`

	// PodCidrs: One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is
	// expected for dual-stack networking.
	PodCidrs []string `json:"podCidrs,omitempty"`

	// +kubebuilder:validation:Pattern="^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$"
	// ServiceCidr: A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP
	// ranges.
	ServiceCidr *string `json:"serviceCidr,omitempty"`

	// ServiceCidrs: One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is
	// expected for dual-stack networking. They must not overlap with any Subnet IP ranges.
	ServiceCidrs []string `json:"serviceCidrs,omitempty"`
}

var _ genruntime.ARMTransformer = &ContainerServiceNetworkProfile{}

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

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

	// Set property "IpFamilies":
	for _, item := range profile.IpFamilies {
		var temp string
		temp = string(item)
		result.IpFamilies = append(result.IpFamilies, arm.ContainerServiceNetworkProfile_IpFamilies(temp))
	}

	// Set property "LoadBalancerProfile":
	if profile.LoadBalancerProfile != nil {
		loadBalancerProfile_ARM, err := profile.LoadBalancerProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		loadBalancerProfile := *loadBalancerProfile_ARM.(*arm.ManagedClusterLoadBalancerProfile)
		result.LoadBalancerProfile = &loadBalancerProfile
	}

	// Set property "LoadBalancerSku":
	if profile.LoadBalancerSku != nil {
		var temp string
		temp = string(*profile.LoadBalancerSku)
		loadBalancerSku := arm.ContainerServiceNetworkProfile_LoadBalancerSku(temp)
		result.LoadBalancerSku = &loadBalancerSku
	}

	// Set property "NatGatewayProfile":
	if profile.NatGatewayProfile != nil {
		natGatewayProfile_ARM, err := profile.NatGatewayProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		natGatewayProfile := *natGatewayProfile_ARM.(*arm.ManagedClusterNATGatewayProfile)
		result.NatGatewayProfile = &natGatewayProfile
	}

	// Set property "NetworkDataplane":
	if profile.NetworkDataplane != nil {
		var temp string
		temp = string(*profile.NetworkDataplane)
		networkDataplane := arm.ContainerServiceNetworkProfile_NetworkDataplane(temp)
		result.NetworkDataplane = &networkDataplane
	}

	// Set property "NetworkMode":
	if profile.NetworkMode != nil {
		var temp string
		temp = string(*profile.NetworkMode)
		networkMode := arm.ContainerServiceNetworkProfile_NetworkMode(temp)
		result.NetworkMode = &networkMode
	}

	// Set property "NetworkPlugin":
	if profile.NetworkPlugin != nil {
		var temp string
		temp = string(*profile.NetworkPlugin)
		networkPlugin := arm.NetworkPlugin(temp)
		result.NetworkPlugin = &networkPlugin
	}

	// Set property "NetworkPluginMode":
	if profile.NetworkPluginMode != nil {
		var temp string
		temp = string(*profile.NetworkPluginMode)
		networkPluginMode := arm.ContainerServiceNetworkProfile_NetworkPluginMode(temp)
		result.NetworkPluginMode = &networkPluginMode
	}

	// Set property "NetworkPolicy":
	if profile.NetworkPolicy != nil {
		var temp string
		temp = string(*profile.NetworkPolicy)
		networkPolicy := arm.ContainerServiceNetworkProfile_NetworkPolicy(temp)
		result.NetworkPolicy = &networkPolicy
	}

	// Set property "OutboundType":
	if profile.OutboundType != nil {
		var temp string
		temp = string(*profile.OutboundType)
		outboundType := arm.ContainerServiceNetworkProfile_OutboundType(temp)
		result.OutboundType = &outboundType
	}

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

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

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

	// Set property "ServiceCidrs":
	for _, item := range profile.ServiceCidrs {
		result.ServiceCidrs = append(result.ServiceCidrs, item)
	}
	return result, nil
}

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

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

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

	// Set property "IpFamilies":
	for _, item := range typedInput.IpFamilies {
		var temp string
		temp = string(item)
		profile.IpFamilies = append(profile.IpFamilies, ContainerServiceNetworkProfile_IpFamilies(temp))
	}

	// Set property "LoadBalancerProfile":
	if typedInput.LoadBalancerProfile != nil {
		var loadBalancerProfile1 ManagedClusterLoadBalancerProfile
		err := loadBalancerProfile1.PopulateFromARM(owner, *typedInput.LoadBalancerProfile)
		if err != nil {
			return err
		}
		loadBalancerProfile := loadBalancerProfile1
		profile.LoadBalancerProfile = &loadBalancerProfile
	}

	// Set property "LoadBalancerSku":
	if typedInput.LoadBalancerSku != nil {
		var temp string
		temp = string(*typedInput.LoadBalancerSku)
		loadBalancerSku := ContainerServiceNetworkProfile_LoadBalancerSku(temp)
		profile.LoadBalancerSku = &loadBalancerSku
	}

	// Set property "NatGatewayProfile":
	if typedInput.NatGatewayProfile != nil {
		var natGatewayProfile1 ManagedClusterNATGatewayProfile
		err := natGatewayProfile1.PopulateFromARM(owner, *typedInput.NatGatewayProfile)
		if err != nil {
			return err
		}
		natGatewayProfile := natGatewayProfile1
		profile.NatGatewayProfile = &natGatewayProfile
	}

	// Set property "NetworkDataplane":
	if typedInput.NetworkDataplane != nil {
		var temp string
		temp = string(*typedInput.NetworkDataplane)
		networkDataplane := ContainerServiceNetworkProfile_NetworkDataplane(temp)
		profile.NetworkDataplane = &networkDataplane
	}

	// Set property "NetworkMode":
	if typedInput.NetworkMode != nil {
		var temp string
		temp = string(*typedInput.NetworkMode)
		networkMode := ContainerServiceNetworkProfile_NetworkMode(temp)
		profile.NetworkMode = &networkMode
	}

	// Set property "NetworkPlugin":
	if typedInput.NetworkPlugin != nil {
		var temp string
		temp = string(*typedInput.NetworkPlugin)
		networkPlugin := NetworkPlugin(temp)
		profile.NetworkPlugin = &networkPlugin
	}

	// Set property "NetworkPluginMode":
	if typedInput.NetworkPluginMode != nil {
		var temp string
		temp = string(*typedInput.NetworkPluginMode)
		networkPluginMode := ContainerServiceNetworkProfile_NetworkPluginMode(temp)
		profile.NetworkPluginMode = &networkPluginMode
	}

	// Set property "NetworkPolicy":
	if typedInput.NetworkPolicy != nil {
		var temp string
		temp = string(*typedInput.NetworkPolicy)
		networkPolicy := ContainerServiceNetworkProfile_NetworkPolicy(temp)
		profile.NetworkPolicy = &networkPolicy
	}

	// Set property "OutboundType":
	if typedInput.OutboundType != nil {
		var temp string
		temp = string(*typedInput.OutboundType)
		outboundType := ContainerServiceNetworkProfile_OutboundType(temp)
		profile.OutboundType = &outboundType
	}

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

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

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

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

	// No error
	return nil
}

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

	// DnsServiceIP
	profile.DnsServiceIP = genruntime.ClonePointerToString(source.DnsServiceIP)

	// IpFamilies
	if source.IpFamilies != nil {
		ipFamilyList := make([]ContainerServiceNetworkProfile_IpFamilies, len(source.IpFamilies))
		for ipFamilyIndex, ipFamilyItem := range source.IpFamilies {
			ipFamilyList[ipFamilyIndex] = genruntime.ToEnum(ipFamilyItem, containerServiceNetworkProfile_IpFamilies_Values)
		}
		profile.IpFamilies = ipFamilyList
	} else {
		profile.IpFamilies = nil
	}

	// LoadBalancerProfile
	if source.LoadBalancerProfile != nil {
		var loadBalancerProfile ManagedClusterLoadBalancerProfile
		err := loadBalancerProfile.AssignProperties_From_ManagedClusterLoadBalancerProfile(source.LoadBalancerProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterLoadBalancerProfile() to populate field LoadBalancerProfile")
		}
		profile.LoadBalancerProfile = &loadBalancerProfile
	} else {
		profile.LoadBalancerProfile = nil
	}

	// LoadBalancerSku
	if source.LoadBalancerSku != nil {
		loadBalancerSku := *source.LoadBalancerSku
		loadBalancerSkuTemp := genruntime.ToEnum(loadBalancerSku, containerServiceNetworkProfile_LoadBalancerSku_Values)
		profile.LoadBalancerSku = &loadBalancerSkuTemp
	} else {
		profile.LoadBalancerSku = nil
	}

	// NatGatewayProfile
	if source.NatGatewayProfile != nil {
		var natGatewayProfile ManagedClusterNATGatewayProfile
		err := natGatewayProfile.AssignProperties_From_ManagedClusterNATGatewayProfile(source.NatGatewayProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterNATGatewayProfile() to populate field NatGatewayProfile")
		}
		profile.NatGatewayProfile = &natGatewayProfile
	} else {
		profile.NatGatewayProfile = nil
	}

	// NetworkDataplane
	if source.NetworkDataplane != nil {
		networkDataplane := *source.NetworkDataplane
		networkDataplaneTemp := genruntime.ToEnum(networkDataplane, containerServiceNetworkProfile_NetworkDataplane_Values)
		profile.NetworkDataplane = &networkDataplaneTemp
	} else {
		profile.NetworkDataplane = nil
	}

	// NetworkMode
	if source.NetworkMode != nil {
		networkMode := *source.NetworkMode
		networkModeTemp := genruntime.ToEnum(networkMode, containerServiceNetworkProfile_NetworkMode_Values)
		profile.NetworkMode = &networkModeTemp
	} else {
		profile.NetworkMode = nil
	}

	// NetworkPlugin
	if source.NetworkPlugin != nil {
		networkPlugin := *source.NetworkPlugin
		networkPluginTemp := genruntime.ToEnum(networkPlugin, networkPlugin_Values)
		profile.NetworkPlugin = &networkPluginTemp
	} else {
		profile.NetworkPlugin = nil
	}

	// NetworkPluginMode
	if source.NetworkPluginMode != nil {
		networkPluginMode := *source.NetworkPluginMode
		networkPluginModeTemp := genruntime.ToEnum(networkPluginMode, containerServiceNetworkProfile_NetworkPluginMode_Values)
		profile.NetworkPluginMode = &networkPluginModeTemp
	} else {
		profile.NetworkPluginMode = nil
	}

	// NetworkPolicy
	if source.NetworkPolicy != nil {
		networkPolicy := *source.NetworkPolicy
		networkPolicyTemp := genruntime.ToEnum(networkPolicy, containerServiceNetworkProfile_NetworkPolicy_Values)
		profile.NetworkPolicy = &networkPolicyTemp
	} else {
		profile.NetworkPolicy = nil
	}

	// OutboundType
	if source.OutboundType != nil {
		outboundType := *source.OutboundType
		outboundTypeTemp := genruntime.ToEnum(outboundType, containerServiceNetworkProfile_OutboundType_Values)
		profile.OutboundType = &outboundTypeTemp
	} else {
		profile.OutboundType = nil
	}

	// PodCidr
	profile.PodCidr = genruntime.ClonePointerToString(source.PodCidr)

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

	// ServiceCidr
	profile.ServiceCidr = genruntime.ClonePointerToString(source.ServiceCidr)

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

	// No error
	return nil
}

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

	// DnsServiceIP
	destination.DnsServiceIP = genruntime.ClonePointerToString(profile.DnsServiceIP)

	// IpFamilies
	if profile.IpFamilies != nil {
		ipFamilyList := make([]string, len(profile.IpFamilies))
		for ipFamilyIndex, ipFamilyItem := range profile.IpFamilies {
			ipFamilyList[ipFamilyIndex] = string(ipFamilyItem)
		}
		destination.IpFamilies = ipFamilyList
	} else {
		destination.IpFamilies = nil
	}

	// LoadBalancerProfile
	if profile.LoadBalancerProfile != nil {
		var loadBalancerProfile storage.ManagedClusterLoadBalancerProfile
		err := profile.LoadBalancerProfile.AssignProperties_To_ManagedClusterLoadBalancerProfile(&loadBalancerProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterLoadBalancerProfile() to populate field LoadBalancerProfile")
		}
		destination.LoadBalancerProfile = &loadBalancerProfile
	} else {
		destination.LoadBalancerProfile = nil
	}

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

	// NatGatewayProfile
	if profile.NatGatewayProfile != nil {
		var natGatewayProfile storage.ManagedClusterNATGatewayProfile
		err := profile.NatGatewayProfile.AssignProperties_To_ManagedClusterNATGatewayProfile(&natGatewayProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterNATGatewayProfile() to populate field NatGatewayProfile")
		}
		destination.NatGatewayProfile = &natGatewayProfile
	} else {
		destination.NatGatewayProfile = nil
	}

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

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

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

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

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

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

	// PodCidr
	destination.PodCidr = genruntime.ClonePointerToString(profile.PodCidr)

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

	// ServiceCidr
	destination.ServiceCidr = genruntime.ClonePointerToString(profile.ServiceCidr)

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

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

	// No error
	return nil
}

// Profile of network configuration.
type ContainerServiceNetworkProfile_STATUS struct {
	// DnsServiceIP: An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address
	// range specified in serviceCidr.
	DnsServiceIP *string `json:"dnsServiceIP,omitempty"`

	// IpFamilies: IP families are used to determine single-stack or dual-stack clusters. For single-stack, the expected value
	// is IPv4. For dual-stack, the expected values are IPv4 and IPv6.
	IpFamilies []ContainerServiceNetworkProfile_IpFamilies_STATUS `json:"ipFamilies,omitempty"`

	// LoadBalancerProfile: Profile of the cluster load balancer.
	LoadBalancerProfile *ManagedClusterLoadBalancerProfile_STATUS `json:"loadBalancerProfile,omitempty"`

	// LoadBalancerSku: The default is 'standard'. See [Azure Load Balancer
	// SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more information about the differences between load
	// balancer SKUs.
	LoadBalancerSku *ContainerServiceNetworkProfile_LoadBalancerSku_STATUS `json:"loadBalancerSku,omitempty"`

	// NatGatewayProfile: Profile of the cluster NAT gateway.
	NatGatewayProfile *ManagedClusterNATGatewayProfile_STATUS `json:"natGatewayProfile,omitempty"`

	// NetworkDataplane: Network dataplane used in the Kubernetes cluster.
	NetworkDataplane *ContainerServiceNetworkProfile_NetworkDataplane_STATUS `json:"networkDataplane,omitempty"`

	// NetworkMode: This cannot be specified if networkPlugin is anything other than 'azure'.
	NetworkMode *ContainerServiceNetworkProfile_NetworkMode_STATUS `json:"networkMode,omitempty"`

	// NetworkPlugin: Network plugin used for building the Kubernetes network.
	NetworkPlugin *ContainerServiceNetworkProfile_NetworkPlugin_STATUS `json:"networkPlugin,omitempty"`

	// NetworkPluginMode: The mode the network plugin should use.
	NetworkPluginMode *ContainerServiceNetworkProfile_NetworkPluginMode_STATUS `json:"networkPluginMode,omitempty"`

	// NetworkPolicy: Network policy used for building the Kubernetes network.
	NetworkPolicy *ContainerServiceNetworkProfile_NetworkPolicy_STATUS `json:"networkPolicy,omitempty"`

	// OutboundType: This can only be set at cluster creation time and cannot be changed later. For more information see
	// [egress outbound type](https://docs.microsoft.com/azure/aks/egress-outboundtype).
	OutboundType *ContainerServiceNetworkProfile_OutboundType_STATUS `json:"outboundType,omitempty"`

	// PodCidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used.
	PodCidr *string `json:"podCidr,omitempty"`

	// PodCidrs: One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is
	// expected for dual-stack networking.
	PodCidrs []string `json:"podCidrs,omitempty"`

	// ServiceCidr: A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP
	// ranges.
	ServiceCidr *string `json:"serviceCidr,omitempty"`

	// ServiceCidrs: One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is
	// expected for dual-stack networking. They must not overlap with any Subnet IP ranges.
	ServiceCidrs []string `json:"serviceCidrs,omitempty"`
}

var _ genruntime.FromARMConverter = &ContainerServiceNetworkProfile_STATUS{}

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

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

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

	// Set property "IpFamilies":
	for _, item := range typedInput.IpFamilies {
		var temp string
		temp = string(item)
		profile.IpFamilies = append(profile.IpFamilies, ContainerServiceNetworkProfile_IpFamilies_STATUS(temp))
	}

	// Set property "LoadBalancerProfile":
	if typedInput.LoadBalancerProfile != nil {
		var loadBalancerProfile1 ManagedClusterLoadBalancerProfile_STATUS
		err := loadBalancerProfile1.PopulateFromARM(owner, *typedInput.LoadBalancerProfile)
		if err != nil {
			return err
		}
		loadBalancerProfile := loadBalancerProfile1
		profile.LoadBalancerProfile = &loadBalancerProfile
	}

	// Set property "LoadBalancerSku":
	if typedInput.LoadBalancerSku != nil {
		var temp string
		temp = string(*typedInput.LoadBalancerSku)
		loadBalancerSku := ContainerServiceNetworkProfile_LoadBalancerSku_STATUS(temp)
		profile.LoadBalancerSku = &loadBalancerSku
	}

	// Set property "NatGatewayProfile":
	if typedInput.NatGatewayProfile != nil {
		var natGatewayProfile1 ManagedClusterNATGatewayProfile_STATUS
		err := natGatewayProfile1.PopulateFromARM(owner, *typedInput.NatGatewayProfile)
		if err != nil {
			return err
		}
		natGatewayProfile := natGatewayProfile1
		profile.NatGatewayProfile = &natGatewayProfile
	}

	// Set property "NetworkDataplane":
	if typedInput.NetworkDataplane != nil {
		var temp string
		temp = string(*typedInput.NetworkDataplane)
		networkDataplane := ContainerServiceNetworkProfile_NetworkDataplane_STATUS(temp)
		profile.NetworkDataplane = &networkDataplane
	}

	// Set property "NetworkMode":
	if typedInput.NetworkMode != nil {
		var temp string
		temp = string(*typedInput.NetworkMode)
		networkMode := ContainerServiceNetworkProfile_NetworkMode_STATUS(temp)
		profile.NetworkMode = &networkMode
	}

	// Set property "NetworkPlugin":
	if typedInput.NetworkPlugin != nil {
		var temp string
		temp = string(*typedInput.NetworkPlugin)
		networkPlugin := ContainerServiceNetworkProfile_NetworkPlugin_STATUS(temp)
		profile.NetworkPlugin = &networkPlugin
	}

	// Set property "NetworkPluginMode":
	if typedInput.NetworkPluginMode != nil {
		var temp string
		temp = string(*typedInput.NetworkPluginMode)
		networkPluginMode := ContainerServiceNetworkProfile_NetworkPluginMode_STATUS(temp)
		profile.NetworkPluginMode = &networkPluginMode
	}

	// Set property "NetworkPolicy":
	if typedInput.NetworkPolicy != nil {
		var temp string
		temp = string(*typedInput.NetworkPolicy)
		networkPolicy := ContainerServiceNetworkProfile_NetworkPolicy_STATUS(temp)
		profile.NetworkPolicy = &networkPolicy
	}

	// Set property "OutboundType":
	if typedInput.OutboundType != nil {
		var temp string
		temp = string(*typedInput.OutboundType)
		outboundType := ContainerServiceNetworkProfile_OutboundType_STATUS(temp)
		profile.OutboundType = &outboundType
	}

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

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

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

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

	// No error
	return nil
}

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

	// DnsServiceIP
	profile.DnsServiceIP = genruntime.ClonePointerToString(source.DnsServiceIP)

	// IpFamilies
	if source.IpFamilies != nil {
		ipFamilyList := make([]ContainerServiceNetworkProfile_IpFamilies_STATUS, len(source.IpFamilies))
		for ipFamilyIndex, ipFamilyItem := range source.IpFamilies {
			ipFamilyList[ipFamilyIndex] = genruntime.ToEnum(ipFamilyItem, containerServiceNetworkProfile_IpFamilies_STATUS_Values)
		}
		profile.IpFamilies = ipFamilyList
	} else {
		profile.IpFamilies = nil
	}

	// LoadBalancerProfile
	if source.LoadBalancerProfile != nil {
		var loadBalancerProfile ManagedClusterLoadBalancerProfile_STATUS
		err := loadBalancerProfile.AssignProperties_From_ManagedClusterLoadBalancerProfile_STATUS(source.LoadBalancerProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterLoadBalancerProfile_STATUS() to populate field LoadBalancerProfile")
		}
		profile.LoadBalancerProfile = &loadBalancerProfile
	} else {
		profile.LoadBalancerProfile = nil
	}

	// LoadBalancerSku
	if source.LoadBalancerSku != nil {
		loadBalancerSku := *source.LoadBalancerSku
		loadBalancerSkuTemp := genruntime.ToEnum(loadBalancerSku, containerServiceNetworkProfile_LoadBalancerSku_STATUS_Values)
		profile.LoadBalancerSku = &loadBalancerSkuTemp
	} else {
		profile.LoadBalancerSku = nil
	}

	// NatGatewayProfile
	if source.NatGatewayProfile != nil {
		var natGatewayProfile ManagedClusterNATGatewayProfile_STATUS
		err := natGatewayProfile.AssignProperties_From_ManagedClusterNATGatewayProfile_STATUS(source.NatGatewayProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterNATGatewayProfile_STATUS() to populate field NatGatewayProfile")
		}
		profile.NatGatewayProfile = &natGatewayProfile
	} else {
		profile.NatGatewayProfile = nil
	}

	// NetworkDataplane
	if source.NetworkDataplane != nil {
		networkDataplane := *source.NetworkDataplane
		networkDataplaneTemp := genruntime.ToEnum(networkDataplane, containerServiceNetworkProfile_NetworkDataplane_STATUS_Values)
		profile.NetworkDataplane = &networkDataplaneTemp
	} else {
		profile.NetworkDataplane = nil
	}

	// NetworkMode
	if source.NetworkMode != nil {
		networkMode := *source.NetworkMode
		networkModeTemp := genruntime.ToEnum(networkMode, containerServiceNetworkProfile_NetworkMode_STATUS_Values)
		profile.NetworkMode = &networkModeTemp
	} else {
		profile.NetworkMode = nil
	}

	// NetworkPlugin
	if source.NetworkPlugin != nil {
		networkPlugin := *source.NetworkPlugin
		networkPluginTemp := genruntime.ToEnum(networkPlugin, containerServiceNetworkProfile_NetworkPlugin_STATUS_Values)
		profile.NetworkPlugin = &networkPluginTemp
	} else {
		profile.NetworkPlugin = nil
	}

	// NetworkPluginMode
	if source.NetworkPluginMode != nil {
		networkPluginMode := *source.NetworkPluginMode
		networkPluginModeTemp := genruntime.ToEnum(networkPluginMode, containerServiceNetworkProfile_NetworkPluginMode_STATUS_Values)
		profile.NetworkPluginMode = &networkPluginModeTemp
	} else {
		profile.NetworkPluginMode = nil
	}

	// NetworkPolicy
	if source.NetworkPolicy != nil {
		networkPolicy := *source.NetworkPolicy
		networkPolicyTemp := genruntime.ToEnum(networkPolicy, containerServiceNetworkProfile_NetworkPolicy_STATUS_Values)
		profile.NetworkPolicy = &networkPolicyTemp
	} else {
		profile.NetworkPolicy = nil
	}

	// OutboundType
	if source.OutboundType != nil {
		outboundType := *source.OutboundType
		outboundTypeTemp := genruntime.ToEnum(outboundType, containerServiceNetworkProfile_OutboundType_STATUS_Values)
		profile.OutboundType = &outboundTypeTemp
	} else {
		profile.OutboundType = nil
	}

	// PodCidr
	profile.PodCidr = genruntime.ClonePointerToString(source.PodCidr)

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

	// ServiceCidr
	profile.ServiceCidr = genruntime.ClonePointerToString(source.ServiceCidr)

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

	// No error
	return nil
}

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

	// DnsServiceIP
	destination.DnsServiceIP = genruntime.ClonePointerToString(profile.DnsServiceIP)

	// IpFamilies
	if profile.IpFamilies != nil {
		ipFamilyList := make([]string, len(profile.IpFamilies))
		for ipFamilyIndex, ipFamilyItem := range profile.IpFamilies {
			ipFamilyList[ipFamilyIndex] = string(ipFamilyItem)
		}
		destination.IpFamilies = ipFamilyList
	} else {
		destination.IpFamilies = nil
	}

	// LoadBalancerProfile
	if profile.LoadBalancerProfile != nil {
		var loadBalancerProfile storage.ManagedClusterLoadBalancerProfile_STATUS
		err := profile.LoadBalancerProfile.AssignProperties_To_ManagedClusterLoadBalancerProfile_STATUS(&loadBalancerProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterLoadBalancerProfile_STATUS() to populate field LoadBalancerProfile")
		}
		destination.LoadBalancerProfile = &loadBalancerProfile
	} else {
		destination.LoadBalancerProfile = nil
	}

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

	// NatGatewayProfile
	if profile.NatGatewayProfile != nil {
		var natGatewayProfile storage.ManagedClusterNATGatewayProfile_STATUS
		err := profile.NatGatewayProfile.AssignProperties_To_ManagedClusterNATGatewayProfile_STATUS(&natGatewayProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterNATGatewayProfile_STATUS() to populate field NatGatewayProfile")
		}
		destination.NatGatewayProfile = &natGatewayProfile
	} else {
		destination.NatGatewayProfile = nil
	}

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

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

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

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

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

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

	// PodCidr
	destination.PodCidr = genruntime.ClonePointerToString(profile.PodCidr)

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

	// ServiceCidr
	destination.ServiceCidr = genruntime.ClonePointerToString(profile.ServiceCidr)

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

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

	// No error
	return nil
}

// The complex type of the extended location.
type ExtendedLocation struct {
	// Name: The name of the extended location.
	Name *string `json:"name,omitempty"`

	// Type: The type of the extended location.
	Type *ExtendedLocationType `json:"type,omitempty"`
}

var _ genruntime.ARMTransformer = &ExtendedLocation{}

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

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

	// Set property "Type":
	if location.Type != nil {
		var temp string
		temp = string(*location.Type)
		typeVar := arm.ExtendedLocationType(temp)
		result.Type = &typeVar
	}
	return result, nil
}

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

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

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

	// Set property "Type":
	if typedInput.Type != nil {
		var temp string
		temp = string(*typedInput.Type)
		typeVar := ExtendedLocationType(temp)
		location.Type = &typeVar
	}

	// No error
	return nil
}

// AssignProperties_From_ExtendedLocation populates our ExtendedLocation from the provided source ExtendedLocation
func (location *ExtendedLocation) AssignProperties_From_ExtendedLocation(source *storage.ExtendedLocation) error {

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

	// Type
	if source.Type != nil {
		typeVar := *source.Type
		typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_Values)
		location.Type = &typeTemp
	} else {
		location.Type = nil
	}

	// No error
	return nil
}

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

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

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

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

	// No error
	return nil
}

// The complex type of the extended location.
type ExtendedLocation_STATUS struct {
	// Name: The name of the extended location.
	Name *string `json:"name,omitempty"`

	// Type: The type of the extended location.
	Type *ExtendedLocationType_STATUS `json:"type,omitempty"`
}

var _ genruntime.FromARMConverter = &ExtendedLocation_STATUS{}

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

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

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

	// Set property "Type":
	if typedInput.Type != nil {
		var temp string
		temp = string(*typedInput.Type)
		typeVar := ExtendedLocationType_STATUS(temp)
		location.Type = &typeVar
	}

	// No error
	return nil
}

// AssignProperties_From_ExtendedLocation_STATUS populates our ExtendedLocation_STATUS from the provided source ExtendedLocation_STATUS
func (location *ExtendedLocation_STATUS) AssignProperties_From_ExtendedLocation_STATUS(source *storage.ExtendedLocation_STATUS) error {

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

	// Type
	if source.Type != nil {
		typeVar := *source.Type
		typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_STATUS_Values)
		location.Type = &typeTemp
	} else {
		location.Type = nil
	}

	// No error
	return nil
}

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

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

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

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

	// No error
	return nil
}

// Different support tiers for AKS managed clusters
// +kubebuilder:validation:Enum={"AKSLongTermSupport","KubernetesOfficial"}
type KubernetesSupportPlan string

const (
	KubernetesSupportPlan_AKSLongTermSupport = KubernetesSupportPlan("AKSLongTermSupport")
	KubernetesSupportPlan_KubernetesOfficial = KubernetesSupportPlan("KubernetesOfficial")
)

// Mapping from string to KubernetesSupportPlan
var kubernetesSupportPlan_Values = map[string]KubernetesSupportPlan{
	"akslongtermsupport": KubernetesSupportPlan_AKSLongTermSupport,
	"kubernetesofficial": KubernetesSupportPlan_KubernetesOfficial,
}

// Different support tiers for AKS managed clusters
type KubernetesSupportPlan_STATUS string

const (
	KubernetesSupportPlan_STATUS_AKSLongTermSupport = KubernetesSupportPlan_STATUS("AKSLongTermSupport")
	KubernetesSupportPlan_STATUS_KubernetesOfficial = KubernetesSupportPlan_STATUS("KubernetesOfficial")
)

// Mapping from string to KubernetesSupportPlan_STATUS
var kubernetesSupportPlan_STATUS_Values = map[string]KubernetesSupportPlan_STATUS{
	"akslongtermsupport": KubernetesSupportPlan_STATUS_AKSLongTermSupport,
	"kubernetesofficial": KubernetesSupportPlan_STATUS_KubernetesOfficial,
}

// For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad).
type ManagedClusterAADProfile struct {
	// AdminGroupObjectIDs: The list of AAD group object IDs that will have admin role of the cluster.
	AdminGroupObjectIDs []string `json:"adminGroupObjectIDs,omitempty"`

	// ClientAppID: (DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy.
	ClientAppID *string `json:"clientAppID,omitempty"`

	// EnableAzureRBAC: Whether to enable Azure RBAC for Kubernetes authorization.
	EnableAzureRBAC *bool `json:"enableAzureRBAC,omitempty"`

	// Managed: Whether to enable managed AAD.
	Managed *bool `json:"managed,omitempty"`

	// ServerAppID: (DEPRECATED) The server AAD application ID. Learn more at https://aka.ms/aks/aad-legacy.
	ServerAppID *string `json:"serverAppID,omitempty"`

	// ServerAppSecret: (DEPRECATED) The server AAD application secret. Learn more at https://aka.ms/aks/aad-legacy.
	ServerAppSecret *string `json:"serverAppSecret,omitempty"`

	// TenantID: The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment
	// subscription.
	TenantID *string `json:"tenantID,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterAADProfile{}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	// No error
	return nil
}

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

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

	// ClientAppID
	profile.ClientAppID = genruntime.ClonePointerToString(source.ClientAppID)

	// EnableAzureRBAC
	if source.EnableAzureRBAC != nil {
		enableAzureRBAC := *source.EnableAzureRBAC
		profile.EnableAzureRBAC = &enableAzureRBAC
	} else {
		profile.EnableAzureRBAC = nil
	}

	// Managed
	if source.Managed != nil {
		managed := *source.Managed
		profile.Managed = &managed
	} else {
		profile.Managed = nil
	}

	// ServerAppID
	profile.ServerAppID = genruntime.ClonePointerToString(source.ServerAppID)

	// ServerAppSecret
	profile.ServerAppSecret = genruntime.ClonePointerToString(source.ServerAppSecret)

	// TenantID
	profile.TenantID = genruntime.ClonePointerToString(source.TenantID)

	// No error
	return nil
}

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

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

	// ClientAppID
	destination.ClientAppID = genruntime.ClonePointerToString(profile.ClientAppID)

	// EnableAzureRBAC
	if profile.EnableAzureRBAC != nil {
		enableAzureRBAC := *profile.EnableAzureRBAC
		destination.EnableAzureRBAC = &enableAzureRBAC
	} else {
		destination.EnableAzureRBAC = nil
	}

	// Managed
	if profile.Managed != nil {
		managed := *profile.Managed
		destination.Managed = &managed
	} else {
		destination.Managed = nil
	}

	// ServerAppID
	destination.ServerAppID = genruntime.ClonePointerToString(profile.ServerAppID)

	// ServerAppSecret
	destination.ServerAppSecret = genruntime.ClonePointerToString(profile.ServerAppSecret)

	// TenantID
	destination.TenantID = genruntime.ClonePointerToString(profile.TenantID)

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

	// No error
	return nil
}

// For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad).
type ManagedClusterAADProfile_STATUS struct {
	// AdminGroupObjectIDs: The list of AAD group object IDs that will have admin role of the cluster.
	AdminGroupObjectIDs []string `json:"adminGroupObjectIDs,omitempty"`

	// ClientAppID: (DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy.
	ClientAppID *string `json:"clientAppID,omitempty"`

	// EnableAzureRBAC: Whether to enable Azure RBAC for Kubernetes authorization.
	EnableAzureRBAC *bool `json:"enableAzureRBAC,omitempty"`

	// Managed: Whether to enable managed AAD.
	Managed *bool `json:"managed,omitempty"`

	// ServerAppID: (DEPRECATED) The server AAD application ID. Learn more at https://aka.ms/aks/aad-legacy.
	ServerAppID *string `json:"serverAppID,omitempty"`

	// ServerAppSecret: (DEPRECATED) The server AAD application secret. Learn more at https://aka.ms/aks/aad-legacy.
	ServerAppSecret *string `json:"serverAppSecret,omitempty"`

	// TenantID: The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment
	// subscription.
	TenantID *string `json:"tenantID,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterAADProfile_STATUS{}

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

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

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

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

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

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

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

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

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

	// No error
	return nil
}

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

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

	// ClientAppID
	profile.ClientAppID = genruntime.ClonePointerToString(source.ClientAppID)

	// EnableAzureRBAC
	if source.EnableAzureRBAC != nil {
		enableAzureRBAC := *source.EnableAzureRBAC
		profile.EnableAzureRBAC = &enableAzureRBAC
	} else {
		profile.EnableAzureRBAC = nil
	}

	// Managed
	if source.Managed != nil {
		managed := *source.Managed
		profile.Managed = &managed
	} else {
		profile.Managed = nil
	}

	// ServerAppID
	profile.ServerAppID = genruntime.ClonePointerToString(source.ServerAppID)

	// ServerAppSecret
	profile.ServerAppSecret = genruntime.ClonePointerToString(source.ServerAppSecret)

	// TenantID
	profile.TenantID = genruntime.ClonePointerToString(source.TenantID)

	// No error
	return nil
}

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

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

	// ClientAppID
	destination.ClientAppID = genruntime.ClonePointerToString(profile.ClientAppID)

	// EnableAzureRBAC
	if profile.EnableAzureRBAC != nil {
		enableAzureRBAC := *profile.EnableAzureRBAC
		destination.EnableAzureRBAC = &enableAzureRBAC
	} else {
		destination.EnableAzureRBAC = nil
	}

	// Managed
	if profile.Managed != nil {
		managed := *profile.Managed
		destination.Managed = &managed
	} else {
		destination.Managed = nil
	}

	// ServerAppID
	destination.ServerAppID = genruntime.ClonePointerToString(profile.ServerAppID)

	// ServerAppSecret
	destination.ServerAppSecret = genruntime.ClonePointerToString(profile.ServerAppSecret)

	// TenantID
	destination.TenantID = genruntime.ClonePointerToString(profile.TenantID)

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

	// No error
	return nil
}

// A Kubernetes add-on profile for a managed cluster.
type ManagedClusterAddonProfile struct {
	// Config: Key-value pairs for configuring an add-on.
	Config map[string]string `json:"config,omitempty"`

	// +kubebuilder:validation:Required
	// Enabled: Whether the add-on is enabled or not.
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterAddonProfile{}

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

	// Set property "Config":
	if profile.Config != nil {
		result.Config = make(map[string]string, len(profile.Config))
		for key, value := range profile.Config {
			result.Config[key] = value
		}
	}

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

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

	// Set property "Config":
	if typedInput.Config != nil {
		profile.Config = make(map[string]string, len(typedInput.Config))
		for key, value := range typedInput.Config {
			profile.Config[key] = value
		}
	}

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

	// No error
	return nil
}

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

	// Config
	profile.Config = genruntime.CloneMapOfStringToString(source.Config)

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

	// No error
	return nil
}

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

	// Config
	destination.Config = genruntime.CloneMapOfStringToString(profile.Config)

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

// A Kubernetes add-on profile for a managed cluster.
type ManagedClusterAddonProfile_STATUS struct {
	// Config: Key-value pairs for configuring an add-on.
	Config map[string]string `json:"config,omitempty"`

	// Enabled: Whether the add-on is enabled or not.
	Enabled *bool `json:"enabled,omitempty"`

	// Identity: Information of user assigned identity used by this add-on.
	Identity *UserAssignedIdentity_STATUS `json:"identity,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterAddonProfile_STATUS{}

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

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

	// Set property "Config":
	if typedInput.Config != nil {
		profile.Config = make(map[string]string, len(typedInput.Config))
		for key, value := range typedInput.Config {
			profile.Config[key] = value
		}
	}

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

	// Set property "Identity":
	if typedInput.Identity != nil {
		var identity1 UserAssignedIdentity_STATUS
		err := identity1.PopulateFromARM(owner, *typedInput.Identity)
		if err != nil {
			return err
		}
		identity := identity1
		profile.Identity = &identity
	}

	// No error
	return nil
}

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

	// Config
	profile.Config = genruntime.CloneMapOfStringToString(source.Config)

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

	// Identity
	if source.Identity != nil {
		var identity UserAssignedIdentity_STATUS
		err := identity.AssignProperties_From_UserAssignedIdentity_STATUS(source.Identity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_UserAssignedIdentity_STATUS() to populate field Identity")
		}
		profile.Identity = &identity
	} else {
		profile.Identity = nil
	}

	// No error
	return nil
}

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

	// Config
	destination.Config = genruntime.CloneMapOfStringToString(profile.Config)

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

	// Identity
	if profile.Identity != nil {
		var identity storage.UserAssignedIdentity_STATUS
		err := profile.Identity.AssignProperties_To_UserAssignedIdentity_STATUS(&identity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_UserAssignedIdentity_STATUS() to populate field Identity")
		}
		destination.Identity = &identity
	} else {
		destination.Identity = nil
	}

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

	// No error
	return nil
}

// Profile for the container service agent pool.
type ManagedClusterAgentPoolProfile struct {
	// 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"`

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

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

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

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

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

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

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

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

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern="^[a-z][a-z0-9]{0,11}$"
	// Name: Windows agent pool names must be 6 characters or less.
	Name *string `json:"name,omitempty"`

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

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

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

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

	// OrchestratorVersion: Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported.
	// When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the cluster
	// with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) 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. The default is Ubuntu if OSType is Linux. The default is Windows2019
	// when  Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows.
	OsSKU *OSSKU `json:"osSKU,omitempty"`

	// OsType: The operating system type. The default is Linux.
	OsType *OSType `json:"osType,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"`

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

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

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

var _ genruntime.ARMTransformer = &ManagedClusterAgentPoolProfile{}

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

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

	// Set property "CapacityReservationGroupID":
	if profile.CapacityReservationGroupReference != nil {
		capacityReservationGroupReferenceARMID, err := resolved.ResolvedReferences.Lookup(*profile.CapacityReservationGroupReference)
		if err != nil {
			return nil, err
		}
		capacityReservationGroupReference := capacityReservationGroupReferenceARMID
		result.CapacityReservationGroupID = &capacityReservationGroupReference
	}

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

	// Set property "CreationData":
	if profile.CreationData != nil {
		creationData_ARM, err := profile.CreationData.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		creationData := *creationData_ARM.(*arm.CreationData)
		result.CreationData = &creationData
	}

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

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

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

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

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

	// Set property "GpuInstanceProfile":
	if profile.GpuInstanceProfile != nil {
		var temp string
		temp = string(*profile.GpuInstanceProfile)
		gpuInstanceProfile := arm.GPUInstanceProfile(temp)
		result.GpuInstanceProfile = &gpuInstanceProfile
	}

	// Set property "HostGroupID":
	if profile.HostGroupReference != nil {
		hostGroupReferenceARMID, err := resolved.ResolvedReferences.Lookup(*profile.HostGroupReference)
		if err != nil {
			return nil, err
		}
		hostGroupReference := hostGroupReferenceARMID
		result.HostGroupID = &hostGroupReference
	}

	// Set property "KubeletConfig":
	if profile.KubeletConfig != nil {
		kubeletConfig_ARM, err := profile.KubeletConfig.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		kubeletConfig := *kubeletConfig_ARM.(*arm.KubeletConfig)
		result.KubeletConfig = &kubeletConfig
	}

	// Set property "KubeletDiskType":
	if profile.KubeletDiskType != nil {
		var temp string
		temp = string(*profile.KubeletDiskType)
		kubeletDiskType := arm.KubeletDiskType(temp)
		result.KubeletDiskType = &kubeletDiskType
	}

	// Set property "LinuxOSConfig":
	if profile.LinuxOSConfig != nil {
		linuxOSConfig_ARM, err := profile.LinuxOSConfig.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		linuxOSConfig := *linuxOSConfig_ARM.(*arm.LinuxOSConfig)
		result.LinuxOSConfig = &linuxOSConfig
	}

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

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

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

	// Set property "Mode":
	if profile.Mode != nil {
		var temp string
		temp = string(*profile.Mode)
		mode := arm.AgentPoolMode(temp)
		result.Mode = &mode
	}

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

	// Set property "NetworkProfile":
	if profile.NetworkProfile != nil {
		networkProfile_ARM, err := profile.NetworkProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		networkProfile := *networkProfile_ARM.(*arm.AgentPoolNetworkProfile)
		result.NetworkProfile = &networkProfile
	}

	// Set property "NodeLabels":
	if profile.NodeLabels != nil {
		result.NodeLabels = make(map[string]string, len(profile.NodeLabels))
		for key, value := range profile.NodeLabels {
			result.NodeLabels[key] = value
		}
	} else {
		// Set property to empty map, as this resource is set to serialize all collections explicitly
		result.NodeLabels = make(map[string]string)
	}

	// Set property "NodePublicIPPrefixID":
	if profile.NodePublicIPPrefixReference != nil {
		nodePublicIPPrefixReferenceARMID, err := resolved.ResolvedReferences.Lookup(*profile.NodePublicIPPrefixReference)
		if err != nil {
			return nil, err
		}
		nodePublicIPPrefixReference := nodePublicIPPrefixReferenceARMID
		result.NodePublicIPPrefixID = &nodePublicIPPrefixReference
	}

	// Set property "NodeTaints":
	for _, item := range profile.NodeTaints {
		result.NodeTaints = append(result.NodeTaints, item)
	}
	if result.NodeTaints == nil {
		// Set property to empty map, as this resource is set to serialize all collections explicitly
		result.NodeTaints = []string{}
	}

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

	// Set property "OsDiskSizeGB":
	if profile.OsDiskSizeGB != nil {
		osDiskSizeGB := int(*profile.OsDiskSizeGB)
		result.OsDiskSizeGB = &osDiskSizeGB
	}

	// Set property "OsDiskType":
	if profile.OsDiskType != nil {
		var temp string
		temp = string(*profile.OsDiskType)
		osDiskType := arm.OSDiskType(temp)
		result.OsDiskType = &osDiskType
	}

	// Set property "OsSKU":
	if profile.OsSKU != nil {
		var temp string
		temp = string(*profile.OsSKU)
		osSKU := arm.OSSKU(temp)
		result.OsSKU = &osSKU
	}

	// Set property "OsType":
	if profile.OsType != nil {
		var temp string
		temp = string(*profile.OsType)
		osType := arm.OSType(temp)
		result.OsType = &osType
	}

	// Set property "PodSubnetID":
	if profile.PodSubnetReference != nil {
		podSubnetReferenceARMID, err := resolved.ResolvedReferences.Lookup(*profile.PodSubnetReference)
		if err != nil {
			return nil, err
		}
		podSubnetReference := podSubnetReferenceARMID
		result.PodSubnetID = &podSubnetReference
	}

	// Set property "PowerState":
	if profile.PowerState != nil {
		powerState_ARM, err := profile.PowerState.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		powerState := *powerState_ARM.(*arm.PowerState)
		result.PowerState = &powerState
	}

	// Set property "ProximityPlacementGroupID":
	if profile.ProximityPlacementGroupReference != nil {
		proximityPlacementGroupReferenceARMID, err := resolved.ResolvedReferences.Lookup(*profile.ProximityPlacementGroupReference)
		if err != nil {
			return nil, err
		}
		proximityPlacementGroupReference := proximityPlacementGroupReferenceARMID
		result.ProximityPlacementGroupID = &proximityPlacementGroupReference
	}

	// Set property "ScaleDownMode":
	if profile.ScaleDownMode != nil {
		var temp string
		temp = string(*profile.ScaleDownMode)
		scaleDownMode := arm.ScaleDownMode(temp)
		result.ScaleDownMode = &scaleDownMode
	}

	// Set property "ScaleSetEvictionPolicy":
	if profile.ScaleSetEvictionPolicy != nil {
		var temp string
		temp = string(*profile.ScaleSetEvictionPolicy)
		scaleSetEvictionPolicy := arm.ScaleSetEvictionPolicy(temp)
		result.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy
	}

	// Set property "ScaleSetPriority":
	if profile.ScaleSetPriority != nil {
		var temp string
		temp = string(*profile.ScaleSetPriority)
		scaleSetPriority := arm.ScaleSetPriority(temp)
		result.ScaleSetPriority = &scaleSetPriority
	}

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

	// Set property "Tags":
	if profile.Tags != nil {
		result.Tags = make(map[string]string, len(profile.Tags))
		for key, value := range profile.Tags {
			result.Tags[key] = value
		}
	} else {
		// Set property to empty map, as this resource is set to serialize all collections explicitly
		result.Tags = make(map[string]string)
	}

	// Set property "Type":
	if profile.Type != nil {
		var temp string
		temp = string(*profile.Type)
		typeVar := arm.AgentPoolType(temp)
		result.Type = &typeVar
	}

	// Set property "UpgradeSettings":
	if profile.UpgradeSettings != nil {
		upgradeSettings_ARM, err := profile.UpgradeSettings.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		upgradeSettings := *upgradeSettings_ARM.(*arm.AgentPoolUpgradeSettings)
		result.UpgradeSettings = &upgradeSettings
	}

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

	// Set property "VnetSubnetID":
	if profile.VnetSubnetReference != nil {
		vnetSubnetReferenceARMID, err := resolved.ResolvedReferences.Lookup(*profile.VnetSubnetReference)
		if err != nil {
			return nil, err
		}
		vnetSubnetReference := vnetSubnetReferenceARMID
		result.VnetSubnetID = &vnetSubnetReference
	}

	// Set property "WorkloadRuntime":
	if profile.WorkloadRuntime != nil {
		var temp string
		temp = string(*profile.WorkloadRuntime)
		workloadRuntime := arm.WorkloadRuntime(temp)
		result.WorkloadRuntime = &workloadRuntime
	}
	return result, nil
}

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

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

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

	// no assignment for property "CapacityReservationGroupReference"

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

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

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

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

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

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

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

	// Set property "GpuInstanceProfile":
	if typedInput.GpuInstanceProfile != nil {
		var temp string
		temp = string(*typedInput.GpuInstanceProfile)
		gpuInstanceProfile := GPUInstanceProfile(temp)
		profile.GpuInstanceProfile = &gpuInstanceProfile
	}

	// no assignment for property "HostGroupReference"

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

	// Set property "KubeletDiskType":
	if typedInput.KubeletDiskType != nil {
		var temp string
		temp = string(*typedInput.KubeletDiskType)
		kubeletDiskType := KubeletDiskType(temp)
		profile.KubeletDiskType = &kubeletDiskType
	}

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

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

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

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

	// Set property "Mode":
	if typedInput.Mode != nil {
		var temp string
		temp = string(*typedInput.Mode)
		mode := AgentPoolMode(temp)
		profile.Mode = &mode
	}

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

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

	// Set property "NodeLabels":
	if typedInput.NodeLabels != nil {
		profile.NodeLabels = make(map[string]string, len(typedInput.NodeLabels))
		for key, value := range typedInput.NodeLabels {
			profile.NodeLabels[key] = value
		}
	} else {
		// Set property to empty map, as this resource is set to serialize all collections explicitly
		profile.NodeLabels = make(map[string]string)
	}

	// no assignment for property "NodePublicIPPrefixReference"

	// Set property "NodeTaints":
	for _, item := range typedInput.NodeTaints {
		profile.NodeTaints = append(profile.NodeTaints, item)
	}
	if profile.NodeTaints == nil {
		// Set property to empty map, as this resource is set to serialize all collections explicitly
		profile.NodeTaints = []string{}
	}

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

	// Set property "OsDiskSizeGB":
	if typedInput.OsDiskSizeGB != nil {
		osDiskSizeGB := ContainerServiceOSDisk(*typedInput.OsDiskSizeGB)
		profile.OsDiskSizeGB = &osDiskSizeGB
	}

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

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

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

	// no assignment for property "PodSubnetReference"

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

	// no assignment for property "ProximityPlacementGroupReference"

	// Set property "ScaleDownMode":
	if typedInput.ScaleDownMode != nil {
		var temp string
		temp = string(*typedInput.ScaleDownMode)
		scaleDownMode := ScaleDownMode(temp)
		profile.ScaleDownMode = &scaleDownMode
	}

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

	// Set property "ScaleSetPriority":
	if typedInput.ScaleSetPriority != nil {
		var temp string
		temp = string(*typedInput.ScaleSetPriority)
		scaleSetPriority := ScaleSetPriority(temp)
		profile.ScaleSetPriority = &scaleSetPriority
	}

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

	// Set property "Tags":
	if typedInput.Tags != nil {
		profile.Tags = make(map[string]string, len(typedInput.Tags))
		for key, value := range typedInput.Tags {
			profile.Tags[key] = value
		}
	} else {
		// Set property to empty map, as this resource is set to serialize all collections explicitly
		profile.Tags = make(map[string]string)
	}

	// Set property "Type":
	if typedInput.Type != nil {
		var temp string
		temp = string(*typedInput.Type)
		typeVar := AgentPoolType(temp)
		profile.Type = &typeVar
	}

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

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

	// no assignment for property "VnetSubnetReference"

	// Set property "WorkloadRuntime":
	if typedInput.WorkloadRuntime != nil {
		var temp string
		temp = string(*typedInput.WorkloadRuntime)
		workloadRuntime := WorkloadRuntime(temp)
		profile.WorkloadRuntime = &workloadRuntime
	}

	// No error
	return nil
}

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

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

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

	// Count
	profile.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")
		}
		profile.CreationData = &creationDatum
	} else {
		profile.CreationData = nil
	}

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

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

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

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

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

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

	// HostGroupReference
	if source.HostGroupReference != nil {
		hostGroupReference := source.HostGroupReference.Copy()
		profile.HostGroupReference = &hostGroupReference
	} else {
		profile.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")
		}
		profile.KubeletConfig = &kubeletConfig
	} else {
		profile.KubeletConfig = nil
	}

	// KubeletDiskType
	if source.KubeletDiskType != nil {
		kubeletDiskType := *source.KubeletDiskType
		kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_Values)
		profile.KubeletDiskType = &kubeletDiskTypeTemp
	} else {
		profile.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")
		}
		profile.LinuxOSConfig = &linuxOSConfig
	} else {
		profile.LinuxOSConfig = nil
	}

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

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

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

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

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

	// 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")
		}
		profile.NetworkProfile = &networkProfile
	} else {
		profile.NetworkProfile = nil
	}

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

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

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

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

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

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

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

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

	// PodSubnetReference
	if source.PodSubnetReference != nil {
		podSubnetReference := source.PodSubnetReference.Copy()
		profile.PodSubnetReference = &podSubnetReference
	} else {
		profile.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")
		}
		profile.PowerState = &powerState
	} else {
		profile.PowerState = nil
	}

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

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

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

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

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

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

	// Type
	if source.Type != nil {
		typeVar := *source.Type
		typeTemp := genruntime.ToEnum(typeVar, agentPoolType_Values)
		profile.Type = &typeTemp
	} else {
		profile.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")
		}
		profile.UpgradeSettings = &upgradeSetting
	} else {
		profile.UpgradeSettings = nil
	}

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

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

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

	// No error
	return nil
}

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

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

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

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

	// CreationData
	if profile.CreationData != nil {
		var creationDatum storage.CreationData
		err := profile.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 profile.EnableAutoScaling != nil {
		enableAutoScaling := *profile.EnableAutoScaling
		destination.EnableAutoScaling = &enableAutoScaling
	} else {
		destination.EnableAutoScaling = nil
	}

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

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

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

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

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

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

	// KubeletConfig
	if profile.KubeletConfig != nil {
		var kubeletConfig storage.KubeletConfig
		err := profile.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 profile.KubeletDiskType != nil {
		kubeletDiskType := string(*profile.KubeletDiskType)
		destination.KubeletDiskType = &kubeletDiskType
	} else {
		destination.KubeletDiskType = nil
	}

	// LinuxOSConfig
	if profile.LinuxOSConfig != nil {
		var linuxOSConfig storage.LinuxOSConfig
		err := profile.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(profile.MaxCount)

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

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

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

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

	// NetworkProfile
	if profile.NetworkProfile != nil {
		var networkProfile storage.AgentPoolNetworkProfile
		err := profile.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
	}

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

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

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

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

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

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

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

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

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

	// PowerState
	if profile.PowerState != nil {
		var powerState storage.PowerState
		err := profile.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 profile.ProximityPlacementGroupReference != nil {
		proximityPlacementGroupReference := profile.ProximityPlacementGroupReference.Copy()
		destination.ProximityPlacementGroupReference = &proximityPlacementGroupReference
	} else {
		destination.ProximityPlacementGroupReference = nil
	}

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

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

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

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

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

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

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

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

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

	// WorkloadRuntime
	if profile.WorkloadRuntime != nil {
		workloadRuntime := string(*profile.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
}

// Profile for the container service agent pool.
type ManagedClusterAgentPoolProfile_STATUS struct {
	// 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"`

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

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

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

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

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

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

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

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

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

	// 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: Windows agent pool names must be 6 characters or less.
	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"`

	// 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> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported.
	// When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the cluster
	// with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) 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. The default is Ubuntu if OSType is Linux. The default is Windows2019
	// when  Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows.
	OsSKU *OSSKU_STATUS `json:"osSKU,omitempty"`

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

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

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

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

	// 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: The type of Agent Pool.
	Type *AgentPoolType_STATUS `json:"type,omitempty"`

	// UpgradeSettings: Settings for upgrading the agentpool
	UpgradeSettings *AgentPoolUpgradeSettings_STATUS `json:"upgradeSettings,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"`

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

var _ genruntime.FromARMConverter = &ManagedClusterAgentPoolProfile_STATUS{}

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

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

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

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

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

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

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

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

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

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

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

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

	// Set property "GpuInstanceProfile":
	if typedInput.GpuInstanceProfile != nil {
		var temp string
		temp = string(*typedInput.GpuInstanceProfile)
		gpuInstanceProfile := GPUInstanceProfile_STATUS(temp)
		profile.GpuInstanceProfile = &gpuInstanceProfile
	}

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

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

	// Set property "KubeletDiskType":
	if typedInput.KubeletDiskType != nil {
		var temp string
		temp = string(*typedInput.KubeletDiskType)
		kubeletDiskType := KubeletDiskType_STATUS(temp)
		profile.KubeletDiskType = &kubeletDiskType
	}

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

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

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

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

	// Set property "Mode":
	if typedInput.Mode != nil {
		var temp string
		temp = string(*typedInput.Mode)
		mode := AgentPoolMode_STATUS(temp)
		profile.Mode = &mode
	}

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

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

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

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

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

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

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

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

	// Set property "OsDiskType":
	if typedInput.OsDiskType != nil {
		var temp string
		temp = string(*typedInput.OsDiskType)
		osDiskType := OSDiskType_STATUS(temp)
		profile.OsDiskType = &osDiskType
	}

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

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

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

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

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

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

	// Set property "ScaleDownMode":
	if typedInput.ScaleDownMode != nil {
		var temp string
		temp = string(*typedInput.ScaleDownMode)
		scaleDownMode := ScaleDownMode_STATUS(temp)
		profile.ScaleDownMode = &scaleDownMode
	}

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

	// Set property "ScaleSetPriority":
	if typedInput.ScaleSetPriority != nil {
		var temp string
		temp = string(*typedInput.ScaleSetPriority)
		scaleSetPriority := ScaleSetPriority_STATUS(temp)
		profile.ScaleSetPriority = &scaleSetPriority
	}

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

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

	// Set property "Type":
	if typedInput.Type != nil {
		var temp string
		temp = string(*typedInput.Type)
		typeVar := AgentPoolType_STATUS(temp)
		profile.Type = &typeVar
	}

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

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

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

	// Set property "WorkloadRuntime":
	if typedInput.WorkloadRuntime != nil {
		var temp string
		temp = string(*typedInput.WorkloadRuntime)
		workloadRuntime := WorkloadRuntime_STATUS(temp)
		profile.WorkloadRuntime = &workloadRuntime
	}

	// No error
	return nil
}

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

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

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

	// Count
	profile.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")
		}
		profile.CreationData = &creationDatum
	} else {
		profile.CreationData = nil
	}

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

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

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

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

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

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

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

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

	// 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")
		}
		profile.KubeletConfig = &kubeletConfig
	} else {
		profile.KubeletConfig = nil
	}

	// KubeletDiskType
	if source.KubeletDiskType != nil {
		kubeletDiskType := *source.KubeletDiskType
		kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_STATUS_Values)
		profile.KubeletDiskType = &kubeletDiskTypeTemp
	} else {
		profile.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")
		}
		profile.LinuxOSConfig = &linuxOSConfig
	} else {
		profile.LinuxOSConfig = nil
	}

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

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

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

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

	// Name
	profile.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")
		}
		profile.NetworkProfile = &networkProfile
	} else {
		profile.NetworkProfile = nil
	}

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

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

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

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

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

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

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

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

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

	// PodSubnetID
	profile.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")
		}
		profile.PowerState = &powerState
	} else {
		profile.PowerState = nil
	}

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

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

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

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

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

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

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

	// Type
	if source.Type != nil {
		typeVar := *source.Type
		typeTemp := genruntime.ToEnum(typeVar, agentPoolType_STATUS_Values)
		profile.Type = &typeTemp
	} else {
		profile.Type = nil
	}

	// 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")
		}
		profile.UpgradeSettings = &upgradeSetting
	} else {
		profile.UpgradeSettings = nil
	}

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

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

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

	// No error
	return nil
}

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

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

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

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

	// CreationData
	if profile.CreationData != nil {
		var creationDatum storage.CreationData_STATUS
		err := profile.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(profile.CurrentOrchestratorVersion)

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

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

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

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

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

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

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

	// KubeletConfig
	if profile.KubeletConfig != nil {
		var kubeletConfig storage.KubeletConfig_STATUS
		err := profile.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 profile.KubeletDiskType != nil {
		kubeletDiskType := string(*profile.KubeletDiskType)
		destination.KubeletDiskType = &kubeletDiskType
	} else {
		destination.KubeletDiskType = nil
	}

	// LinuxOSConfig
	if profile.LinuxOSConfig != nil {
		var linuxOSConfig storage.LinuxOSConfig_STATUS
		err := profile.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(profile.MaxCount)

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

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

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

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

	// NetworkProfile
	if profile.NetworkProfile != nil {
		var networkProfile storage.AgentPoolNetworkProfile_STATUS
		err := profile.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(profile.NodeImageVersion)

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

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

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

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

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

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

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

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

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

	// PowerState
	if profile.PowerState != nil {
		var powerState storage.PowerState_STATUS
		err := profile.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
	}

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

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

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

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

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

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

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

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

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

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

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

	// WorkloadRuntime
	if profile.WorkloadRuntime != nil {
		workloadRuntime := string(*profile.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
}

// Access profile for managed cluster API server.
type ManagedClusterAPIServerAccessProfile struct {
	// AuthorizedIPRanges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with
	// clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API
	// server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges).
	AuthorizedIPRanges []string `json:"authorizedIPRanges,omitempty"`

	// DisableRunCommand: Whether to disable run command for the cluster or not.
	DisableRunCommand *bool `json:"disableRunCommand,omitempty"`

	// EnablePrivateCluster: For more details, see [Creating a private AKS
	// cluster](https://docs.microsoft.com/azure/aks/private-clusters).
	EnablePrivateCluster *bool `json:"enablePrivateCluster,omitempty"`

	// EnablePrivateClusterPublicFQDN: Whether to create additional public FQDN for private cluster or not.
	EnablePrivateClusterPublicFQDN *bool `json:"enablePrivateClusterPublicFQDN,omitempty"`

	// PrivateDNSZone: The default is System. For more details see [configure private DNS
	// zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). Allowed values are 'system' and
	// 'none'.
	PrivateDNSZone *string `json:"privateDNSZone,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterAPIServerAccessProfile{}

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

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

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

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

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

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

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

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

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

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

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

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

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

	// No error
	return nil
}

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

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

	// DisableRunCommand
	if source.DisableRunCommand != nil {
		disableRunCommand := *source.DisableRunCommand
		profile.DisableRunCommand = &disableRunCommand
	} else {
		profile.DisableRunCommand = nil
	}

	// EnablePrivateCluster
	if source.EnablePrivateCluster != nil {
		enablePrivateCluster := *source.EnablePrivateCluster
		profile.EnablePrivateCluster = &enablePrivateCluster
	} else {
		profile.EnablePrivateCluster = nil
	}

	// EnablePrivateClusterPublicFQDN
	if source.EnablePrivateClusterPublicFQDN != nil {
		enablePrivateClusterPublicFQDN := *source.EnablePrivateClusterPublicFQDN
		profile.EnablePrivateClusterPublicFQDN = &enablePrivateClusterPublicFQDN
	} else {
		profile.EnablePrivateClusterPublicFQDN = nil
	}

	// PrivateDNSZone
	profile.PrivateDNSZone = genruntime.ClonePointerToString(source.PrivateDNSZone)

	// No error
	return nil
}

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

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

	// DisableRunCommand
	if profile.DisableRunCommand != nil {
		disableRunCommand := *profile.DisableRunCommand
		destination.DisableRunCommand = &disableRunCommand
	} else {
		destination.DisableRunCommand = nil
	}

	// EnablePrivateCluster
	if profile.EnablePrivateCluster != nil {
		enablePrivateCluster := *profile.EnablePrivateCluster
		destination.EnablePrivateCluster = &enablePrivateCluster
	} else {
		destination.EnablePrivateCluster = nil
	}

	// EnablePrivateClusterPublicFQDN
	if profile.EnablePrivateClusterPublicFQDN != nil {
		enablePrivateClusterPublicFQDN := *profile.EnablePrivateClusterPublicFQDN
		destination.EnablePrivateClusterPublicFQDN = &enablePrivateClusterPublicFQDN
	} else {
		destination.EnablePrivateClusterPublicFQDN = nil
	}

	// PrivateDNSZone
	destination.PrivateDNSZone = genruntime.ClonePointerToString(profile.PrivateDNSZone)

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

	// No error
	return nil
}

// Access profile for managed cluster API server.
type ManagedClusterAPIServerAccessProfile_STATUS struct {
	// AuthorizedIPRanges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with
	// clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API
	// server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges).
	AuthorizedIPRanges []string `json:"authorizedIPRanges,omitempty"`

	// DisableRunCommand: Whether to disable run command for the cluster or not.
	DisableRunCommand *bool `json:"disableRunCommand,omitempty"`

	// EnablePrivateCluster: For more details, see [Creating a private AKS
	// cluster](https://docs.microsoft.com/azure/aks/private-clusters).
	EnablePrivateCluster *bool `json:"enablePrivateCluster,omitempty"`

	// EnablePrivateClusterPublicFQDN: Whether to create additional public FQDN for private cluster or not.
	EnablePrivateClusterPublicFQDN *bool `json:"enablePrivateClusterPublicFQDN,omitempty"`

	// PrivateDNSZone: The default is System. For more details see [configure private DNS
	// zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). Allowed values are 'system' and
	// 'none'.
	PrivateDNSZone *string `json:"privateDNSZone,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterAPIServerAccessProfile_STATUS{}

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

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

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

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

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

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

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

	// No error
	return nil
}

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

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

	// DisableRunCommand
	if source.DisableRunCommand != nil {
		disableRunCommand := *source.DisableRunCommand
		profile.DisableRunCommand = &disableRunCommand
	} else {
		profile.DisableRunCommand = nil
	}

	// EnablePrivateCluster
	if source.EnablePrivateCluster != nil {
		enablePrivateCluster := *source.EnablePrivateCluster
		profile.EnablePrivateCluster = &enablePrivateCluster
	} else {
		profile.EnablePrivateCluster = nil
	}

	// EnablePrivateClusterPublicFQDN
	if source.EnablePrivateClusterPublicFQDN != nil {
		enablePrivateClusterPublicFQDN := *source.EnablePrivateClusterPublicFQDN
		profile.EnablePrivateClusterPublicFQDN = &enablePrivateClusterPublicFQDN
	} else {
		profile.EnablePrivateClusterPublicFQDN = nil
	}

	// PrivateDNSZone
	profile.PrivateDNSZone = genruntime.ClonePointerToString(source.PrivateDNSZone)

	// No error
	return nil
}

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

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

	// DisableRunCommand
	if profile.DisableRunCommand != nil {
		disableRunCommand := *profile.DisableRunCommand
		destination.DisableRunCommand = &disableRunCommand
	} else {
		destination.DisableRunCommand = nil
	}

	// EnablePrivateCluster
	if profile.EnablePrivateCluster != nil {
		enablePrivateCluster := *profile.EnablePrivateCluster
		destination.EnablePrivateCluster = &enablePrivateCluster
	} else {
		destination.EnablePrivateCluster = nil
	}

	// EnablePrivateClusterPublicFQDN
	if profile.EnablePrivateClusterPublicFQDN != nil {
		enablePrivateClusterPublicFQDN := *profile.EnablePrivateClusterPublicFQDN
		destination.EnablePrivateClusterPublicFQDN = &enablePrivateClusterPublicFQDN
	} else {
		destination.EnablePrivateClusterPublicFQDN = nil
	}

	// PrivateDNSZone
	destination.PrivateDNSZone = genruntime.ClonePointerToString(profile.PrivateDNSZone)

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

	// No error
	return nil
}

// Auto upgrade profile for a managed cluster.
type ManagedClusterAutoUpgradeProfile struct {
	// NodeOSUpgradeChannel: Manner in which the OS on your nodes is updated. The default is NodeImage.
	NodeOSUpgradeChannel *ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel `json:"nodeOSUpgradeChannel,omitempty"`

	// UpgradeChannel: For more information see [setting the AKS cluster auto-upgrade
	// channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel).
	UpgradeChannel *ManagedClusterAutoUpgradeProfile_UpgradeChannel `json:"upgradeChannel,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterAutoUpgradeProfile{}

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

	// Set property "NodeOSUpgradeChannel":
	if profile.NodeOSUpgradeChannel != nil {
		var temp string
		temp = string(*profile.NodeOSUpgradeChannel)
		nodeOSUpgradeChannel := arm.ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel(temp)
		result.NodeOSUpgradeChannel = &nodeOSUpgradeChannel
	}

	// Set property "UpgradeChannel":
	if profile.UpgradeChannel != nil {
		var temp string
		temp = string(*profile.UpgradeChannel)
		upgradeChannel := arm.ManagedClusterAutoUpgradeProfile_UpgradeChannel(temp)
		result.UpgradeChannel = &upgradeChannel
	}
	return result, nil
}

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

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

	// Set property "NodeOSUpgradeChannel":
	if typedInput.NodeOSUpgradeChannel != nil {
		var temp string
		temp = string(*typedInput.NodeOSUpgradeChannel)
		nodeOSUpgradeChannel := ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel(temp)
		profile.NodeOSUpgradeChannel = &nodeOSUpgradeChannel
	}

	// Set property "UpgradeChannel":
	if typedInput.UpgradeChannel != nil {
		var temp string
		temp = string(*typedInput.UpgradeChannel)
		upgradeChannel := ManagedClusterAutoUpgradeProfile_UpgradeChannel(temp)
		profile.UpgradeChannel = &upgradeChannel
	}

	// No error
	return nil
}

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

	// NodeOSUpgradeChannel
	if source.NodeOSUpgradeChannel != nil {
		nodeOSUpgradeChannel := *source.NodeOSUpgradeChannel
		nodeOSUpgradeChannelTemp := genruntime.ToEnum(nodeOSUpgradeChannel, managedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_Values)
		profile.NodeOSUpgradeChannel = &nodeOSUpgradeChannelTemp
	} else {
		profile.NodeOSUpgradeChannel = nil
	}

	// UpgradeChannel
	if source.UpgradeChannel != nil {
		upgradeChannel := *source.UpgradeChannel
		upgradeChannelTemp := genruntime.ToEnum(upgradeChannel, managedClusterAutoUpgradeProfile_UpgradeChannel_Values)
		profile.UpgradeChannel = &upgradeChannelTemp
	} else {
		profile.UpgradeChannel = nil
	}

	// No error
	return nil
}

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

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

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

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

	// No error
	return nil
}

// Auto upgrade profile for a managed cluster.
type ManagedClusterAutoUpgradeProfile_STATUS struct {
	// NodeOSUpgradeChannel: Manner in which the OS on your nodes is updated. The default is NodeImage.
	NodeOSUpgradeChannel *ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS `json:"nodeOSUpgradeChannel,omitempty"`

	// UpgradeChannel: For more information see [setting the AKS cluster auto-upgrade
	// channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel).
	UpgradeChannel *ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS `json:"upgradeChannel,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterAutoUpgradeProfile_STATUS{}

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

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

	// Set property "NodeOSUpgradeChannel":
	if typedInput.NodeOSUpgradeChannel != nil {
		var temp string
		temp = string(*typedInput.NodeOSUpgradeChannel)
		nodeOSUpgradeChannel := ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS(temp)
		profile.NodeOSUpgradeChannel = &nodeOSUpgradeChannel
	}

	// Set property "UpgradeChannel":
	if typedInput.UpgradeChannel != nil {
		var temp string
		temp = string(*typedInput.UpgradeChannel)
		upgradeChannel := ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS(temp)
		profile.UpgradeChannel = &upgradeChannel
	}

	// No error
	return nil
}

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

	// NodeOSUpgradeChannel
	if source.NodeOSUpgradeChannel != nil {
		nodeOSUpgradeChannel := *source.NodeOSUpgradeChannel
		nodeOSUpgradeChannelTemp := genruntime.ToEnum(nodeOSUpgradeChannel, managedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_Values)
		profile.NodeOSUpgradeChannel = &nodeOSUpgradeChannelTemp
	} else {
		profile.NodeOSUpgradeChannel = nil
	}

	// UpgradeChannel
	if source.UpgradeChannel != nil {
		upgradeChannel := *source.UpgradeChannel
		upgradeChannelTemp := genruntime.ToEnum(upgradeChannel, managedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Values)
		profile.UpgradeChannel = &upgradeChannelTemp
	} else {
		profile.UpgradeChannel = nil
	}

	// No error
	return nil
}

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

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

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

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

	// No error
	return nil
}

// Azure Monitor addon profiles for monitoring the managed cluster.
type ManagedClusterAzureMonitorProfile struct {
	// Metrics: Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes
	// infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See
	// aka.ms/AzureManagedPrometheus for an overview.
	Metrics *ManagedClusterAzureMonitorProfileMetrics `json:"metrics,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterAzureMonitorProfile{}

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

	// Set property "Metrics":
	if profile.Metrics != nil {
		metrics_ARM, err := profile.Metrics.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		metrics := *metrics_ARM.(*arm.ManagedClusterAzureMonitorProfileMetrics)
		result.Metrics = &metrics
	}
	return result, nil
}

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

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

	// Set property "Metrics":
	if typedInput.Metrics != nil {
		var metrics1 ManagedClusterAzureMonitorProfileMetrics
		err := metrics1.PopulateFromARM(owner, *typedInput.Metrics)
		if err != nil {
			return err
		}
		metrics := metrics1
		profile.Metrics = &metrics
	}

	// No error
	return nil
}

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

	// Metrics
	if source.Metrics != nil {
		var metric ManagedClusterAzureMonitorProfileMetrics
		err := metric.AssignProperties_From_ManagedClusterAzureMonitorProfileMetrics(source.Metrics)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterAzureMonitorProfileMetrics() to populate field Metrics")
		}
		profile.Metrics = &metric
	} else {
		profile.Metrics = nil
	}

	// No error
	return nil
}

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

	// Metrics
	if profile.Metrics != nil {
		var metric storage.ManagedClusterAzureMonitorProfileMetrics
		err := profile.Metrics.AssignProperties_To_ManagedClusterAzureMonitorProfileMetrics(&metric)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterAzureMonitorProfileMetrics() to populate field Metrics")
		}
		destination.Metrics = &metric
	} else {
		destination.Metrics = nil
	}

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

	// No error
	return nil
}

// Azure Monitor addon profiles for monitoring the managed cluster.
type ManagedClusterAzureMonitorProfile_STATUS struct {
	// Metrics: Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes
	// infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See
	// aka.ms/AzureManagedPrometheus for an overview.
	Metrics *ManagedClusterAzureMonitorProfileMetrics_STATUS `json:"metrics,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterAzureMonitorProfile_STATUS{}

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

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

	// Set property "Metrics":
	if typedInput.Metrics != nil {
		var metrics1 ManagedClusterAzureMonitorProfileMetrics_STATUS
		err := metrics1.PopulateFromARM(owner, *typedInput.Metrics)
		if err != nil {
			return err
		}
		metrics := metrics1
		profile.Metrics = &metrics
	}

	// No error
	return nil
}

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

	// Metrics
	if source.Metrics != nil {
		var metric ManagedClusterAzureMonitorProfileMetrics_STATUS
		err := metric.AssignProperties_From_ManagedClusterAzureMonitorProfileMetrics_STATUS(source.Metrics)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterAzureMonitorProfileMetrics_STATUS() to populate field Metrics")
		}
		profile.Metrics = &metric
	} else {
		profile.Metrics = nil
	}

	// No error
	return nil
}

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

	// Metrics
	if profile.Metrics != nil {
		var metric storage.ManagedClusterAzureMonitorProfileMetrics_STATUS
		err := profile.Metrics.AssignProperties_To_ManagedClusterAzureMonitorProfileMetrics_STATUS(&metric)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterAzureMonitorProfileMetrics_STATUS() to populate field Metrics")
		}
		destination.Metrics = &metric
	} else {
		destination.Metrics = nil
	}

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

	// No error
	return nil
}

// Cluster HTTP proxy configuration.
type ManagedClusterHTTPProxyConfig struct {
	// HttpProxy: The HTTP proxy server endpoint to use.
	HttpProxy *string `json:"httpProxy,omitempty"`

	// HttpsProxy: The HTTPS proxy server endpoint to use.
	HttpsProxy *string `json:"httpsProxy,omitempty"`

	// NoProxy: The endpoints that should not go through proxy.
	NoProxy []string `json:"noProxy,omitempty"`

	// TrustedCa: Alternative CA cert to use for connecting to proxy servers.
	TrustedCa *string `json:"trustedCa,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterHTTPProxyConfig{}

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

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

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

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

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

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

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

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

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

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

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

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterHTTPProxyConfig populates our ManagedClusterHTTPProxyConfig from the provided source ManagedClusterHTTPProxyConfig
func (config *ManagedClusterHTTPProxyConfig) AssignProperties_From_ManagedClusterHTTPProxyConfig(source *storage.ManagedClusterHTTPProxyConfig) error {

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

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

	// No error
	return nil
}

// Cluster HTTP proxy configuration.
type ManagedClusterHTTPProxyConfig_STATUS struct {
	// HttpProxy: The HTTP proxy server endpoint to use.
	HttpProxy *string `json:"httpProxy,omitempty"`

	// HttpsProxy: The HTTPS proxy server endpoint to use.
	HttpsProxy *string `json:"httpsProxy,omitempty"`

	// NoProxy: The endpoints that should not go through proxy.
	NoProxy []string `json:"noProxy,omitempty"`

	// TrustedCa: Alternative CA cert to use for connecting to proxy servers.
	TrustedCa *string `json:"trustedCa,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterHTTPProxyConfig_STATUS{}

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

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

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

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

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

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

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterHTTPProxyConfig_STATUS populates our ManagedClusterHTTPProxyConfig_STATUS from the provided source ManagedClusterHTTPProxyConfig_STATUS
func (config *ManagedClusterHTTPProxyConfig_STATUS) AssignProperties_From_ManagedClusterHTTPProxyConfig_STATUS(source *storage.ManagedClusterHTTPProxyConfig_STATUS) error {

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

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

	// No error
	return nil
}

// Identity for the managed cluster.
type ManagedClusterIdentity struct {
	// DelegatedResources: The delegated identity resources assigned to this managed cluster. This can only be set by another
	// Azure Resource Provider, and managed cluster only accept one delegated identity resource. Internal use only.
	DelegatedResources map[string]DelegatedResource `json:"delegatedResources,omitempty"`

	// Type: For more information see [use managed identities in
	// AKS](https://docs.microsoft.com/azure/aks/use-managed-identity).
	Type *ManagedClusterIdentity_Type `json:"type,omitempty"`

	// UserAssignedIdentities: The keys must be ARM resource IDs in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
	UserAssignedIdentities []UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterIdentity{}

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

	// Set property "DelegatedResources":
	if identity.DelegatedResources != nil {
		result.DelegatedResources = make(map[string]arm.DelegatedResource, len(identity.DelegatedResources))
		for key, value := range identity.DelegatedResources {
			value_ARM, err := value.ConvertToARM(resolved)
			if err != nil {
				return nil, err
			}
			result.DelegatedResources[key] = *value_ARM.(*arm.DelegatedResource)
		}
	}

	// Set property "Type":
	if identity.Type != nil {
		var temp string
		temp = string(*identity.Type)
		typeVar := arm.ManagedClusterIdentity_Type(temp)
		result.Type = &typeVar
	}

	// Set property "UserAssignedIdentities":
	result.UserAssignedIdentities = make(map[string]arm.UserAssignedIdentityDetails, len(identity.UserAssignedIdentities))
	for _, ident := range identity.UserAssignedIdentities {
		identARMID, err := resolved.ResolvedReferences.Lookup(ident.Reference)
		if err != nil {
			return nil, err
		}
		key := identARMID
		result.UserAssignedIdentities[key] = arm.UserAssignedIdentityDetails{}
	}
	return result, nil
}

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

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

	// Set property "DelegatedResources":
	if typedInput.DelegatedResources != nil {
		identity.DelegatedResources = make(map[string]DelegatedResource, len(typedInput.DelegatedResources))
		for key, value := range typedInput.DelegatedResources {
			var value1 DelegatedResource
			err := value1.PopulateFromARM(owner, value)
			if err != nil {
				return err
			}
			identity.DelegatedResources[key] = value1
		}
	}

	// Set property "Type":
	if typedInput.Type != nil {
		var temp string
		temp = string(*typedInput.Type)
		typeVar := ManagedClusterIdentity_Type(temp)
		identity.Type = &typeVar
	}

	// no assignment for property "UserAssignedIdentities"

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterIdentity populates our ManagedClusterIdentity from the provided source ManagedClusterIdentity
func (identity *ManagedClusterIdentity) AssignProperties_From_ManagedClusterIdentity(source *storage.ManagedClusterIdentity) error {

	// DelegatedResources
	if source.DelegatedResources != nil {
		delegatedResourceMap := make(map[string]DelegatedResource, len(source.DelegatedResources))
		for delegatedResourceKey, delegatedResourceValue := range source.DelegatedResources {
			var delegatedResource DelegatedResource
			err := delegatedResource.AssignProperties_From_DelegatedResource(&delegatedResourceValue)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_DelegatedResource() to populate field DelegatedResources")
			}
			delegatedResourceMap[delegatedResourceKey] = delegatedResource
		}
		identity.DelegatedResources = delegatedResourceMap
	} else {
		identity.DelegatedResources = nil
	}

	// Type
	if source.Type != nil {
		typeVar := *source.Type
		typeTemp := genruntime.ToEnum(typeVar, managedClusterIdentity_Type_Values)
		identity.Type = &typeTemp
	} else {
		identity.Type = nil
	}

	// UserAssignedIdentities
	if source.UserAssignedIdentities != nil {
		userAssignedIdentityList := make([]UserAssignedIdentityDetails, len(source.UserAssignedIdentities))
		for userAssignedIdentityIndex, userAssignedIdentityItem := range source.UserAssignedIdentities {
			var userAssignedIdentity UserAssignedIdentityDetails
			err := userAssignedIdentity.AssignProperties_From_UserAssignedIdentityDetails(&userAssignedIdentityItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_UserAssignedIdentityDetails() to populate field UserAssignedIdentities")
			}
			userAssignedIdentityList[userAssignedIdentityIndex] = userAssignedIdentity
		}
		identity.UserAssignedIdentities = userAssignedIdentityList
	} else {
		identity.UserAssignedIdentities = nil
	}

	// No error
	return nil
}

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

	// DelegatedResources
	if identity.DelegatedResources != nil {
		delegatedResourceMap := make(map[string]storage.DelegatedResource, len(identity.DelegatedResources))
		for delegatedResourceKey, delegatedResourceValue := range identity.DelegatedResources {
			var delegatedResource storage.DelegatedResource
			err := delegatedResourceValue.AssignProperties_To_DelegatedResource(&delegatedResource)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_DelegatedResource() to populate field DelegatedResources")
			}
			delegatedResourceMap[delegatedResourceKey] = delegatedResource
		}
		destination.DelegatedResources = delegatedResourceMap
	} else {
		destination.DelegatedResources = nil
	}

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

	// UserAssignedIdentities
	if identity.UserAssignedIdentities != nil {
		userAssignedIdentityList := make([]storage.UserAssignedIdentityDetails, len(identity.UserAssignedIdentities))
		for userAssignedIdentityIndex, userAssignedIdentityItem := range identity.UserAssignedIdentities {
			var userAssignedIdentity storage.UserAssignedIdentityDetails
			err := userAssignedIdentityItem.AssignProperties_To_UserAssignedIdentityDetails(&userAssignedIdentity)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_UserAssignedIdentityDetails() to populate field UserAssignedIdentities")
			}
			userAssignedIdentityList[userAssignedIdentityIndex] = userAssignedIdentity
		}
		destination.UserAssignedIdentities = userAssignedIdentityList
	} else {
		destination.UserAssignedIdentities = nil
	}

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

	// No error
	return nil
}

// Identity for the managed cluster.
type ManagedClusterIdentity_STATUS struct {
	// DelegatedResources: The delegated identity resources assigned to this managed cluster. This can only be set by another
	// Azure Resource Provider, and managed cluster only accept one delegated identity resource. Internal use only.
	DelegatedResources map[string]DelegatedResource_STATUS `json:"delegatedResources,omitempty"`

	// PrincipalId: The principal id of the system assigned identity which is used by master components.
	PrincipalId *string `json:"principalId,omitempty"`

	// TenantId: The tenant id of the system assigned identity which is used by master components.
	TenantId *string `json:"tenantId,omitempty"`

	// Type: For more information see [use managed identities in
	// AKS](https://docs.microsoft.com/azure/aks/use-managed-identity).
	Type *ManagedClusterIdentity_Type_STATUS `json:"type,omitempty"`

	// UserAssignedIdentities: The keys must be ARM resource IDs in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
	UserAssignedIdentities map[string]ManagedClusterIdentity_UserAssignedIdentities_STATUS `json:"userAssignedIdentities,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterIdentity_STATUS{}

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

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

	// Set property "DelegatedResources":
	if typedInput.DelegatedResources != nil {
		identity.DelegatedResources = make(map[string]DelegatedResource_STATUS, len(typedInput.DelegatedResources))
		for key, value := range typedInput.DelegatedResources {
			var value1 DelegatedResource_STATUS
			err := value1.PopulateFromARM(owner, value)
			if err != nil {
				return err
			}
			identity.DelegatedResources[key] = value1
		}
	}

	// Set property "PrincipalId":
	if typedInput.PrincipalId != nil {
		principalId := *typedInput.PrincipalId
		identity.PrincipalId = &principalId
	}

	// Set property "TenantId":
	if typedInput.TenantId != nil {
		tenantId := *typedInput.TenantId
		identity.TenantId = &tenantId
	}

	// Set property "Type":
	if typedInput.Type != nil {
		var temp string
		temp = string(*typedInput.Type)
		typeVar := ManagedClusterIdentity_Type_STATUS(temp)
		identity.Type = &typeVar
	}

	// Set property "UserAssignedIdentities":
	if typedInput.UserAssignedIdentities != nil {
		identity.UserAssignedIdentities = make(map[string]ManagedClusterIdentity_UserAssignedIdentities_STATUS, len(typedInput.UserAssignedIdentities))
		for key, value := range typedInput.UserAssignedIdentities {
			var value1 ManagedClusterIdentity_UserAssignedIdentities_STATUS
			err := value1.PopulateFromARM(owner, value)
			if err != nil {
				return err
			}
			identity.UserAssignedIdentities[key] = value1
		}
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterIdentity_STATUS populates our ManagedClusterIdentity_STATUS from the provided source ManagedClusterIdentity_STATUS
func (identity *ManagedClusterIdentity_STATUS) AssignProperties_From_ManagedClusterIdentity_STATUS(source *storage.ManagedClusterIdentity_STATUS) error {

	// DelegatedResources
	if source.DelegatedResources != nil {
		delegatedResourceMap := make(map[string]DelegatedResource_STATUS, len(source.DelegatedResources))
		for delegatedResourceKey, delegatedResourceValue := range source.DelegatedResources {
			var delegatedResource DelegatedResource_STATUS
			err := delegatedResource.AssignProperties_From_DelegatedResource_STATUS(&delegatedResourceValue)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_DelegatedResource_STATUS() to populate field DelegatedResources")
			}
			delegatedResourceMap[delegatedResourceKey] = delegatedResource
		}
		identity.DelegatedResources = delegatedResourceMap
	} else {
		identity.DelegatedResources = nil
	}

	// PrincipalId
	identity.PrincipalId = genruntime.ClonePointerToString(source.PrincipalId)

	// TenantId
	identity.TenantId = genruntime.ClonePointerToString(source.TenantId)

	// Type
	if source.Type != nil {
		typeVar := *source.Type
		typeTemp := genruntime.ToEnum(typeVar, managedClusterIdentity_Type_STATUS_Values)
		identity.Type = &typeTemp
	} else {
		identity.Type = nil
	}

	// UserAssignedIdentities
	if source.UserAssignedIdentities != nil {
		userAssignedIdentityMap := make(map[string]ManagedClusterIdentity_UserAssignedIdentities_STATUS, len(source.UserAssignedIdentities))
		for userAssignedIdentityKey, userAssignedIdentityValue := range source.UserAssignedIdentities {
			var userAssignedIdentity ManagedClusterIdentity_UserAssignedIdentities_STATUS
			err := userAssignedIdentity.AssignProperties_From_ManagedClusterIdentity_UserAssignedIdentities_STATUS(&userAssignedIdentityValue)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterIdentity_UserAssignedIdentities_STATUS() to populate field UserAssignedIdentities")
			}
			userAssignedIdentityMap[userAssignedIdentityKey] = userAssignedIdentity
		}
		identity.UserAssignedIdentities = userAssignedIdentityMap
	} else {
		identity.UserAssignedIdentities = nil
	}

	// No error
	return nil
}

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

	// DelegatedResources
	if identity.DelegatedResources != nil {
		delegatedResourceMap := make(map[string]storage.DelegatedResource_STATUS, len(identity.DelegatedResources))
		for delegatedResourceKey, delegatedResourceValue := range identity.DelegatedResources {
			var delegatedResource storage.DelegatedResource_STATUS
			err := delegatedResourceValue.AssignProperties_To_DelegatedResource_STATUS(&delegatedResource)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_DelegatedResource_STATUS() to populate field DelegatedResources")
			}
			delegatedResourceMap[delegatedResourceKey] = delegatedResource
		}
		destination.DelegatedResources = delegatedResourceMap
	} else {
		destination.DelegatedResources = nil
	}

	// PrincipalId
	destination.PrincipalId = genruntime.ClonePointerToString(identity.PrincipalId)

	// TenantId
	destination.TenantId = genruntime.ClonePointerToString(identity.TenantId)

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

	// UserAssignedIdentities
	if identity.UserAssignedIdentities != nil {
		userAssignedIdentityMap := make(map[string]storage.ManagedClusterIdentity_UserAssignedIdentities_STATUS, len(identity.UserAssignedIdentities))
		for userAssignedIdentityKey, userAssignedIdentityValue := range identity.UserAssignedIdentities {
			var userAssignedIdentity storage.ManagedClusterIdentity_UserAssignedIdentities_STATUS
			err := userAssignedIdentityValue.AssignProperties_To_ManagedClusterIdentity_UserAssignedIdentities_STATUS(&userAssignedIdentity)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterIdentity_UserAssignedIdentities_STATUS() to populate field UserAssignedIdentities")
			}
			userAssignedIdentityMap[userAssignedIdentityKey] = userAssignedIdentity
		}
		destination.UserAssignedIdentities = userAssignedIdentityMap
	} else {
		destination.UserAssignedIdentities = nil
	}

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

	// No error
	return nil
}

// The OIDC issuer profile of the Managed Cluster.
type ManagedClusterOIDCIssuerProfile struct {
	// Enabled: Whether the OIDC issuer is enabled.
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterOIDCIssuerProfile{}

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

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

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

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

	// No error
	return nil
}

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

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

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterOIDCIssuerProfile populates the provided destination ManagedClusterOIDCIssuerProfile from our ManagedClusterOIDCIssuerProfile
func (profile *ManagedClusterOIDCIssuerProfile) AssignProperties_To_ManagedClusterOIDCIssuerProfile(destination *storage.ManagedClusterOIDCIssuerProfile) 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
}

// The OIDC issuer profile of the Managed Cluster.
type ManagedClusterOIDCIssuerProfile_STATUS struct {
	// Enabled: Whether the OIDC issuer is enabled.
	Enabled *bool `json:"enabled,omitempty"`

	// IssuerURL: The OIDC issuer url of the Managed Cluster.
	IssuerURL *string `json:"issuerURL,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterOIDCIssuerProfile_STATUS{}

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

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

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

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

	// No error
	return nil
}

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

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

	// IssuerURL
	profile.IssuerURL = genruntime.ClonePointerToString(source.IssuerURL)

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterOIDCIssuerProfile_STATUS populates the provided destination ManagedClusterOIDCIssuerProfile_STATUS from our ManagedClusterOIDCIssuerProfile_STATUS
func (profile *ManagedClusterOIDCIssuerProfile_STATUS) AssignProperties_To_ManagedClusterOIDCIssuerProfile_STATUS(destination *storage.ManagedClusterOIDCIssuerProfile_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
	}

	// IssuerURL
	destination.IssuerURL = genruntime.ClonePointerToString(profile.IssuerURL)

	// 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 ManagedClusterOperatorSpec struct {
	// ConfigMapExpressions: configures where to place operator written dynamic ConfigMaps (created with CEL expressions).
	ConfigMapExpressions []*core.DestinationExpression `json:"configMapExpressions,omitempty"`

	// ConfigMaps: configures where to place operator written ConfigMaps.
	ConfigMaps *ManagedClusterOperatorConfigMaps `json:"configMaps,omitempty"`

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

	// Secrets: configures where to place Azure generated secrets.
	Secrets *ManagedClusterOperatorSecrets `json:"secrets,omitempty"`
}

// AssignProperties_From_ManagedClusterOperatorSpec populates our ManagedClusterOperatorSpec from the provided source ManagedClusterOperatorSpec
func (operator *ManagedClusterOperatorSpec) AssignProperties_From_ManagedClusterOperatorSpec(source *storage.ManagedClusterOperatorSpec) 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
	}

	// ConfigMaps
	if source.ConfigMaps != nil {
		var configMap ManagedClusterOperatorConfigMaps
		err := configMap.AssignProperties_From_ManagedClusterOperatorConfigMaps(source.ConfigMaps)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterOperatorConfigMaps() to populate field ConfigMaps")
		}
		operator.ConfigMaps = &configMap
	} else {
		operator.ConfigMaps = 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
	}

	// Secrets
	if source.Secrets != nil {
		var secret ManagedClusterOperatorSecrets
		err := secret.AssignProperties_From_ManagedClusterOperatorSecrets(source.Secrets)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterOperatorSecrets() to populate field Secrets")
		}
		operator.Secrets = &secret
	} else {
		operator.Secrets = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterOperatorSpec populates the provided destination ManagedClusterOperatorSpec from our ManagedClusterOperatorSpec
func (operator *ManagedClusterOperatorSpec) AssignProperties_To_ManagedClusterOperatorSpec(destination *storage.ManagedClusterOperatorSpec) 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
	}

	// ConfigMaps
	if operator.ConfigMaps != nil {
		var configMap storage.ManagedClusterOperatorConfigMaps
		err := operator.ConfigMaps.AssignProperties_To_ManagedClusterOperatorConfigMaps(&configMap)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterOperatorConfigMaps() to populate field ConfigMaps")
		}
		destination.ConfigMaps = &configMap
	} else {
		destination.ConfigMaps = 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
	}

	// Secrets
	if operator.Secrets != nil {
		var secret storage.ManagedClusterOperatorSecrets
		err := operator.Secrets.AssignProperties_To_ManagedClusterOperatorSecrets(&secret)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterOperatorSecrets() to populate field Secrets")
		}
		destination.Secrets = &secret
	} else {
		destination.Secrets = nil
	}

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

	// No error
	return nil
}

// See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on pod
// identity integration.
type ManagedClusterPodIdentityProfile struct {
	// AllowNetworkPluginKubenet: Running in Kubenet is disabled by default due to the security related nature of AAD Pod
	// Identity and the risks of IP spoofing. See [using Kubenet network plugin with AAD Pod
	// Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities)
	// for more information.
	AllowNetworkPluginKubenet *bool `json:"allowNetworkPluginKubenet,omitempty"`

	// Enabled: Whether the pod identity addon is enabled.
	Enabled *bool `json:"enabled,omitempty"`

	// UserAssignedIdentities: The pod identities to use in the cluster.
	UserAssignedIdentities []ManagedClusterPodIdentity `json:"userAssignedIdentities,omitempty"`

	// UserAssignedIdentityExceptions: The pod identity exceptions to allow.
	UserAssignedIdentityExceptions []ManagedClusterPodIdentityException `json:"userAssignedIdentityExceptions,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterPodIdentityProfile{}

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

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

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

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

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

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

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

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

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

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

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

	// No error
	return nil
}

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

	// AllowNetworkPluginKubenet
	if source.AllowNetworkPluginKubenet != nil {
		allowNetworkPluginKubenet := *source.AllowNetworkPluginKubenet
		profile.AllowNetworkPluginKubenet = &allowNetworkPluginKubenet
	} else {
		profile.AllowNetworkPluginKubenet = nil
	}

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

	// UserAssignedIdentities
	if source.UserAssignedIdentities != nil {
		userAssignedIdentityList := make([]ManagedClusterPodIdentity, len(source.UserAssignedIdentities))
		for userAssignedIdentityIndex, userAssignedIdentityItem := range source.UserAssignedIdentities {
			var userAssignedIdentity ManagedClusterPodIdentity
			err := userAssignedIdentity.AssignProperties_From_ManagedClusterPodIdentity(&userAssignedIdentityItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterPodIdentity() to populate field UserAssignedIdentities")
			}
			userAssignedIdentityList[userAssignedIdentityIndex] = userAssignedIdentity
		}
		profile.UserAssignedIdentities = userAssignedIdentityList
	} else {
		profile.UserAssignedIdentities = nil
	}

	// UserAssignedIdentityExceptions
	if source.UserAssignedIdentityExceptions != nil {
		userAssignedIdentityExceptionList := make([]ManagedClusterPodIdentityException, len(source.UserAssignedIdentityExceptions))
		for userAssignedIdentityExceptionIndex, userAssignedIdentityExceptionItem := range source.UserAssignedIdentityExceptions {
			var userAssignedIdentityException ManagedClusterPodIdentityException
			err := userAssignedIdentityException.AssignProperties_From_ManagedClusterPodIdentityException(&userAssignedIdentityExceptionItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterPodIdentityException() to populate field UserAssignedIdentityExceptions")
			}
			userAssignedIdentityExceptionList[userAssignedIdentityExceptionIndex] = userAssignedIdentityException
		}
		profile.UserAssignedIdentityExceptions = userAssignedIdentityExceptionList
	} else {
		profile.UserAssignedIdentityExceptions = nil
	}

	// No error
	return nil
}

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

	// AllowNetworkPluginKubenet
	if profile.AllowNetworkPluginKubenet != nil {
		allowNetworkPluginKubenet := *profile.AllowNetworkPluginKubenet
		destination.AllowNetworkPluginKubenet = &allowNetworkPluginKubenet
	} else {
		destination.AllowNetworkPluginKubenet = nil
	}

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

	// UserAssignedIdentities
	if profile.UserAssignedIdentities != nil {
		userAssignedIdentityList := make([]storage.ManagedClusterPodIdentity, len(profile.UserAssignedIdentities))
		for userAssignedIdentityIndex, userAssignedIdentityItem := range profile.UserAssignedIdentities {
			var userAssignedIdentity storage.ManagedClusterPodIdentity
			err := userAssignedIdentityItem.AssignProperties_To_ManagedClusterPodIdentity(&userAssignedIdentity)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterPodIdentity() to populate field UserAssignedIdentities")
			}
			userAssignedIdentityList[userAssignedIdentityIndex] = userAssignedIdentity
		}
		destination.UserAssignedIdentities = userAssignedIdentityList
	} else {
		destination.UserAssignedIdentities = nil
	}

	// UserAssignedIdentityExceptions
	if profile.UserAssignedIdentityExceptions != nil {
		userAssignedIdentityExceptionList := make([]storage.ManagedClusterPodIdentityException, len(profile.UserAssignedIdentityExceptions))
		for userAssignedIdentityExceptionIndex, userAssignedIdentityExceptionItem := range profile.UserAssignedIdentityExceptions {
			var userAssignedIdentityException storage.ManagedClusterPodIdentityException
			err := userAssignedIdentityExceptionItem.AssignProperties_To_ManagedClusterPodIdentityException(&userAssignedIdentityException)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterPodIdentityException() to populate field UserAssignedIdentityExceptions")
			}
			userAssignedIdentityExceptionList[userAssignedIdentityExceptionIndex] = userAssignedIdentityException
		}
		destination.UserAssignedIdentityExceptions = userAssignedIdentityExceptionList
	} else {
		destination.UserAssignedIdentityExceptions = nil
	}

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

	// No error
	return nil
}

// See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on pod
// identity integration.
type ManagedClusterPodIdentityProfile_STATUS struct {
	// AllowNetworkPluginKubenet: Running in Kubenet is disabled by default due to the security related nature of AAD Pod
	// Identity and the risks of IP spoofing. See [using Kubenet network plugin with AAD Pod
	// Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities)
	// for more information.
	AllowNetworkPluginKubenet *bool `json:"allowNetworkPluginKubenet,omitempty"`

	// Enabled: Whether the pod identity addon is enabled.
	Enabled *bool `json:"enabled,omitempty"`

	// UserAssignedIdentities: The pod identities to use in the cluster.
	UserAssignedIdentities []ManagedClusterPodIdentity_STATUS `json:"userAssignedIdentities,omitempty"`

	// UserAssignedIdentityExceptions: The pod identity exceptions to allow.
	UserAssignedIdentityExceptions []ManagedClusterPodIdentityException_STATUS `json:"userAssignedIdentityExceptions,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterPodIdentityProfile_STATUS{}

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

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

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

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

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

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

	// No error
	return nil
}

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

	// AllowNetworkPluginKubenet
	if source.AllowNetworkPluginKubenet != nil {
		allowNetworkPluginKubenet := *source.AllowNetworkPluginKubenet
		profile.AllowNetworkPluginKubenet = &allowNetworkPluginKubenet
	} else {
		profile.AllowNetworkPluginKubenet = nil
	}

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

	// UserAssignedIdentities
	if source.UserAssignedIdentities != nil {
		userAssignedIdentityList := make([]ManagedClusterPodIdentity_STATUS, len(source.UserAssignedIdentities))
		for userAssignedIdentityIndex, userAssignedIdentityItem := range source.UserAssignedIdentities {
			var userAssignedIdentity ManagedClusterPodIdentity_STATUS
			err := userAssignedIdentity.AssignProperties_From_ManagedClusterPodIdentity_STATUS(&userAssignedIdentityItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterPodIdentity_STATUS() to populate field UserAssignedIdentities")
			}
			userAssignedIdentityList[userAssignedIdentityIndex] = userAssignedIdentity
		}
		profile.UserAssignedIdentities = userAssignedIdentityList
	} else {
		profile.UserAssignedIdentities = nil
	}

	// UserAssignedIdentityExceptions
	if source.UserAssignedIdentityExceptions != nil {
		userAssignedIdentityExceptionList := make([]ManagedClusterPodIdentityException_STATUS, len(source.UserAssignedIdentityExceptions))
		for userAssignedIdentityExceptionIndex, userAssignedIdentityExceptionItem := range source.UserAssignedIdentityExceptions {
			var userAssignedIdentityException ManagedClusterPodIdentityException_STATUS
			err := userAssignedIdentityException.AssignProperties_From_ManagedClusterPodIdentityException_STATUS(&userAssignedIdentityExceptionItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterPodIdentityException_STATUS() to populate field UserAssignedIdentityExceptions")
			}
			userAssignedIdentityExceptionList[userAssignedIdentityExceptionIndex] = userAssignedIdentityException
		}
		profile.UserAssignedIdentityExceptions = userAssignedIdentityExceptionList
	} else {
		profile.UserAssignedIdentityExceptions = nil
	}

	// No error
	return nil
}

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

	// AllowNetworkPluginKubenet
	if profile.AllowNetworkPluginKubenet != nil {
		allowNetworkPluginKubenet := *profile.AllowNetworkPluginKubenet
		destination.AllowNetworkPluginKubenet = &allowNetworkPluginKubenet
	} else {
		destination.AllowNetworkPluginKubenet = nil
	}

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

	// UserAssignedIdentities
	if profile.UserAssignedIdentities != nil {
		userAssignedIdentityList := make([]storage.ManagedClusterPodIdentity_STATUS, len(profile.UserAssignedIdentities))
		for userAssignedIdentityIndex, userAssignedIdentityItem := range profile.UserAssignedIdentities {
			var userAssignedIdentity storage.ManagedClusterPodIdentity_STATUS
			err := userAssignedIdentityItem.AssignProperties_To_ManagedClusterPodIdentity_STATUS(&userAssignedIdentity)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterPodIdentity_STATUS() to populate field UserAssignedIdentities")
			}
			userAssignedIdentityList[userAssignedIdentityIndex] = userAssignedIdentity
		}
		destination.UserAssignedIdentities = userAssignedIdentityList
	} else {
		destination.UserAssignedIdentities = nil
	}

	// UserAssignedIdentityExceptions
	if profile.UserAssignedIdentityExceptions != nil {
		userAssignedIdentityExceptionList := make([]storage.ManagedClusterPodIdentityException_STATUS, len(profile.UserAssignedIdentityExceptions))
		for userAssignedIdentityExceptionIndex, userAssignedIdentityExceptionItem := range profile.UserAssignedIdentityExceptions {
			var userAssignedIdentityException storage.ManagedClusterPodIdentityException_STATUS
			err := userAssignedIdentityExceptionItem.AssignProperties_To_ManagedClusterPodIdentityException_STATUS(&userAssignedIdentityException)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterPodIdentityException_STATUS() to populate field UserAssignedIdentityExceptions")
			}
			userAssignedIdentityExceptionList[userAssignedIdentityExceptionIndex] = userAssignedIdentityException
		}
		destination.UserAssignedIdentityExceptions = userAssignedIdentityExceptionList
	} else {
		destination.UserAssignedIdentityExceptions = nil
	}

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

	// No error
	return nil
}

type ManagedClusterProperties_AutoScalerProfile struct {
	// BalanceSimilarNodeGroups: Valid values are 'true' and 'false'
	BalanceSimilarNodeGroups *string `json:"balance-similar-node-groups,omitempty"`

	// Expander: If not specified, the default is 'random'. See
	// [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) for more
	// information.
	Expander *ManagedClusterProperties_AutoScalerProfile_Expander `json:"expander,omitempty"`

	// MaxEmptyBulkDelete: The default is 10.
	MaxEmptyBulkDelete *string `json:"max-empty-bulk-delete,omitempty"`

	// MaxGracefulTerminationSec: The default is 600.
	MaxGracefulTerminationSec *string `json:"max-graceful-termination-sec,omitempty"`

	// MaxNodeProvisionTime: The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than
	// minutes (m) is supported.
	MaxNodeProvisionTime *string `json:"max-node-provision-time,omitempty"`

	// MaxTotalUnreadyPercentage: The default is 45. The maximum is 100 and the minimum is 0.
	MaxTotalUnreadyPercentage *string `json:"max-total-unready-percentage,omitempty"`

	// NewPodScaleUpDelay: For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler
	// could schedule all the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is
	// '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc).
	NewPodScaleUpDelay *string `json:"new-pod-scale-up-delay,omitempty"`

	// OkTotalUnreadyCount: This must be an integer. The default is 3.
	OkTotalUnreadyCount *string `json:"ok-total-unready-count,omitempty"`

	// ScaleDownDelayAfterAdd: The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than
	// minutes (m) is supported.
	ScaleDownDelayAfterAdd *string `json:"scale-down-delay-after-add,omitempty"`

	// ScaleDownDelayAfterDelete: The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of
	// time other than minutes (m) is supported.
	ScaleDownDelayAfterDelete *string `json:"scale-down-delay-after-delete,omitempty"`

	// ScaleDownDelayAfterFailure: The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other
	// than minutes (m) is supported.
	ScaleDownDelayAfterFailure *string `json:"scale-down-delay-after-failure,omitempty"`

	// ScaleDownUnneededTime: The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than
	// minutes (m) is supported.
	ScaleDownUnneededTime *string `json:"scale-down-unneeded-time,omitempty"`

	// ScaleDownUnreadyTime: The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than
	// minutes (m) is supported.
	ScaleDownUnreadyTime *string `json:"scale-down-unready-time,omitempty"`

	// ScaleDownUtilizationThreshold: The default is '0.5'.
	ScaleDownUtilizationThreshold *string `json:"scale-down-utilization-threshold,omitempty"`

	// ScanInterval: The default is '10'. Values must be an integer number of seconds.
	ScanInterval *string `json:"scan-interval,omitempty"`

	// SkipNodesWithLocalStorage: The default is true.
	SkipNodesWithLocalStorage *string `json:"skip-nodes-with-local-storage,omitempty"`

	// SkipNodesWithSystemPods: The default is true.
	SkipNodesWithSystemPods *string `json:"skip-nodes-with-system-pods,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterProperties_AutoScalerProfile{}

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

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

	// Set property "Expander":
	if profile.Expander != nil {
		var temp string
		temp = string(*profile.Expander)
		expander := arm.ManagedClusterProperties_AutoScalerProfile_Expander(temp)
		result.Expander = &expander
	}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	// Set property "Expander":
	if typedInput.Expander != nil {
		var temp string
		temp = string(*typedInput.Expander)
		expander := ManagedClusterProperties_AutoScalerProfile_Expander(temp)
		profile.Expander = &expander
	}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	// No error
	return nil
}

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

	// BalanceSimilarNodeGroups
	profile.BalanceSimilarNodeGroups = genruntime.ClonePointerToString(source.BalanceSimilarNodeGroups)

	// Expander
	if source.Expander != nil {
		expander := *source.Expander
		expanderTemp := genruntime.ToEnum(expander, managedClusterProperties_AutoScalerProfile_Expander_Values)
		profile.Expander = &expanderTemp
	} else {
		profile.Expander = nil
	}

	// MaxEmptyBulkDelete
	profile.MaxEmptyBulkDelete = genruntime.ClonePointerToString(source.MaxEmptyBulkDelete)

	// MaxGracefulTerminationSec
	profile.MaxGracefulTerminationSec = genruntime.ClonePointerToString(source.MaxGracefulTerminationSec)

	// MaxNodeProvisionTime
	profile.MaxNodeProvisionTime = genruntime.ClonePointerToString(source.MaxNodeProvisionTime)

	// MaxTotalUnreadyPercentage
	profile.MaxTotalUnreadyPercentage = genruntime.ClonePointerToString(source.MaxTotalUnreadyPercentage)

	// NewPodScaleUpDelay
	profile.NewPodScaleUpDelay = genruntime.ClonePointerToString(source.NewPodScaleUpDelay)

	// OkTotalUnreadyCount
	profile.OkTotalUnreadyCount = genruntime.ClonePointerToString(source.OkTotalUnreadyCount)

	// ScaleDownDelayAfterAdd
	profile.ScaleDownDelayAfterAdd = genruntime.ClonePointerToString(source.ScaleDownDelayAfterAdd)

	// ScaleDownDelayAfterDelete
	profile.ScaleDownDelayAfterDelete = genruntime.ClonePointerToString(source.ScaleDownDelayAfterDelete)

	// ScaleDownDelayAfterFailure
	profile.ScaleDownDelayAfterFailure = genruntime.ClonePointerToString(source.ScaleDownDelayAfterFailure)

	// ScaleDownUnneededTime
	profile.ScaleDownUnneededTime = genruntime.ClonePointerToString(source.ScaleDownUnneededTime)

	// ScaleDownUnreadyTime
	profile.ScaleDownUnreadyTime = genruntime.ClonePointerToString(source.ScaleDownUnreadyTime)

	// ScaleDownUtilizationThreshold
	profile.ScaleDownUtilizationThreshold = genruntime.ClonePointerToString(source.ScaleDownUtilizationThreshold)

	// ScanInterval
	profile.ScanInterval = genruntime.ClonePointerToString(source.ScanInterval)

	// SkipNodesWithLocalStorage
	profile.SkipNodesWithLocalStorage = genruntime.ClonePointerToString(source.SkipNodesWithLocalStorage)

	// SkipNodesWithSystemPods
	profile.SkipNodesWithSystemPods = genruntime.ClonePointerToString(source.SkipNodesWithSystemPods)

	// No error
	return nil
}

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

	// BalanceSimilarNodeGroups
	destination.BalanceSimilarNodeGroups = genruntime.ClonePointerToString(profile.BalanceSimilarNodeGroups)

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

	// MaxEmptyBulkDelete
	destination.MaxEmptyBulkDelete = genruntime.ClonePointerToString(profile.MaxEmptyBulkDelete)

	// MaxGracefulTerminationSec
	destination.MaxGracefulTerminationSec = genruntime.ClonePointerToString(profile.MaxGracefulTerminationSec)

	// MaxNodeProvisionTime
	destination.MaxNodeProvisionTime = genruntime.ClonePointerToString(profile.MaxNodeProvisionTime)

	// MaxTotalUnreadyPercentage
	destination.MaxTotalUnreadyPercentage = genruntime.ClonePointerToString(profile.MaxTotalUnreadyPercentage)

	// NewPodScaleUpDelay
	destination.NewPodScaleUpDelay = genruntime.ClonePointerToString(profile.NewPodScaleUpDelay)

	// OkTotalUnreadyCount
	destination.OkTotalUnreadyCount = genruntime.ClonePointerToString(profile.OkTotalUnreadyCount)

	// ScaleDownDelayAfterAdd
	destination.ScaleDownDelayAfterAdd = genruntime.ClonePointerToString(profile.ScaleDownDelayAfterAdd)

	// ScaleDownDelayAfterDelete
	destination.ScaleDownDelayAfterDelete = genruntime.ClonePointerToString(profile.ScaleDownDelayAfterDelete)

	// ScaleDownDelayAfterFailure
	destination.ScaleDownDelayAfterFailure = genruntime.ClonePointerToString(profile.ScaleDownDelayAfterFailure)

	// ScaleDownUnneededTime
	destination.ScaleDownUnneededTime = genruntime.ClonePointerToString(profile.ScaleDownUnneededTime)

	// ScaleDownUnreadyTime
	destination.ScaleDownUnreadyTime = genruntime.ClonePointerToString(profile.ScaleDownUnreadyTime)

	// ScaleDownUtilizationThreshold
	destination.ScaleDownUtilizationThreshold = genruntime.ClonePointerToString(profile.ScaleDownUtilizationThreshold)

	// ScanInterval
	destination.ScanInterval = genruntime.ClonePointerToString(profile.ScanInterval)

	// SkipNodesWithLocalStorage
	destination.SkipNodesWithLocalStorage = genruntime.ClonePointerToString(profile.SkipNodesWithLocalStorage)

	// SkipNodesWithSystemPods
	destination.SkipNodesWithSystemPods = genruntime.ClonePointerToString(profile.SkipNodesWithSystemPods)

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

	// No error
	return nil
}

type ManagedClusterProperties_AutoScalerProfile_STATUS struct {
	// BalanceSimilarNodeGroups: Valid values are 'true' and 'false'
	BalanceSimilarNodeGroups *string `json:"balance-similar-node-groups,omitempty"`

	// Expander: If not specified, the default is 'random'. See
	// [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) for more
	// information.
	Expander *ManagedClusterProperties_AutoScalerProfile_Expander_STATUS `json:"expander,omitempty"`

	// MaxEmptyBulkDelete: The default is 10.
	MaxEmptyBulkDelete *string `json:"max-empty-bulk-delete,omitempty"`

	// MaxGracefulTerminationSec: The default is 600.
	MaxGracefulTerminationSec *string `json:"max-graceful-termination-sec,omitempty"`

	// MaxNodeProvisionTime: The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than
	// minutes (m) is supported.
	MaxNodeProvisionTime *string `json:"max-node-provision-time,omitempty"`

	// MaxTotalUnreadyPercentage: The default is 45. The maximum is 100 and the minimum is 0.
	MaxTotalUnreadyPercentage *string `json:"max-total-unready-percentage,omitempty"`

	// NewPodScaleUpDelay: For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler
	// could schedule all the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is
	// '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc).
	NewPodScaleUpDelay *string `json:"new-pod-scale-up-delay,omitempty"`

	// OkTotalUnreadyCount: This must be an integer. The default is 3.
	OkTotalUnreadyCount *string `json:"ok-total-unready-count,omitempty"`

	// ScaleDownDelayAfterAdd: The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than
	// minutes (m) is supported.
	ScaleDownDelayAfterAdd *string `json:"scale-down-delay-after-add,omitempty"`

	// ScaleDownDelayAfterDelete: The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of
	// time other than minutes (m) is supported.
	ScaleDownDelayAfterDelete *string `json:"scale-down-delay-after-delete,omitempty"`

	// ScaleDownDelayAfterFailure: The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other
	// than minutes (m) is supported.
	ScaleDownDelayAfterFailure *string `json:"scale-down-delay-after-failure,omitempty"`

	// ScaleDownUnneededTime: The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than
	// minutes (m) is supported.
	ScaleDownUnneededTime *string `json:"scale-down-unneeded-time,omitempty"`

	// ScaleDownUnreadyTime: The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than
	// minutes (m) is supported.
	ScaleDownUnreadyTime *string `json:"scale-down-unready-time,omitempty"`

	// ScaleDownUtilizationThreshold: The default is '0.5'.
	ScaleDownUtilizationThreshold *string `json:"scale-down-utilization-threshold,omitempty"`

	// ScanInterval: The default is '10'. Values must be an integer number of seconds.
	ScanInterval *string `json:"scan-interval,omitempty"`

	// SkipNodesWithLocalStorage: The default is true.
	SkipNodesWithLocalStorage *string `json:"skip-nodes-with-local-storage,omitempty"`

	// SkipNodesWithSystemPods: The default is true.
	SkipNodesWithSystemPods *string `json:"skip-nodes-with-system-pods,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterProperties_AutoScalerProfile_STATUS{}

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

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

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

	// Set property "Expander":
	if typedInput.Expander != nil {
		var temp string
		temp = string(*typedInput.Expander)
		expander := ManagedClusterProperties_AutoScalerProfile_Expander_STATUS(temp)
		profile.Expander = &expander
	}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	// No error
	return nil
}

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

	// BalanceSimilarNodeGroups
	profile.BalanceSimilarNodeGroups = genruntime.ClonePointerToString(source.BalanceSimilarNodeGroups)

	// Expander
	if source.Expander != nil {
		expander := *source.Expander
		expanderTemp := genruntime.ToEnum(expander, managedClusterProperties_AutoScalerProfile_Expander_STATUS_Values)
		profile.Expander = &expanderTemp
	} else {
		profile.Expander = nil
	}

	// MaxEmptyBulkDelete
	profile.MaxEmptyBulkDelete = genruntime.ClonePointerToString(source.MaxEmptyBulkDelete)

	// MaxGracefulTerminationSec
	profile.MaxGracefulTerminationSec = genruntime.ClonePointerToString(source.MaxGracefulTerminationSec)

	// MaxNodeProvisionTime
	profile.MaxNodeProvisionTime = genruntime.ClonePointerToString(source.MaxNodeProvisionTime)

	// MaxTotalUnreadyPercentage
	profile.MaxTotalUnreadyPercentage = genruntime.ClonePointerToString(source.MaxTotalUnreadyPercentage)

	// NewPodScaleUpDelay
	profile.NewPodScaleUpDelay = genruntime.ClonePointerToString(source.NewPodScaleUpDelay)

	// OkTotalUnreadyCount
	profile.OkTotalUnreadyCount = genruntime.ClonePointerToString(source.OkTotalUnreadyCount)

	// ScaleDownDelayAfterAdd
	profile.ScaleDownDelayAfterAdd = genruntime.ClonePointerToString(source.ScaleDownDelayAfterAdd)

	// ScaleDownDelayAfterDelete
	profile.ScaleDownDelayAfterDelete = genruntime.ClonePointerToString(source.ScaleDownDelayAfterDelete)

	// ScaleDownDelayAfterFailure
	profile.ScaleDownDelayAfterFailure = genruntime.ClonePointerToString(source.ScaleDownDelayAfterFailure)

	// ScaleDownUnneededTime
	profile.ScaleDownUnneededTime = genruntime.ClonePointerToString(source.ScaleDownUnneededTime)

	// ScaleDownUnreadyTime
	profile.ScaleDownUnreadyTime = genruntime.ClonePointerToString(source.ScaleDownUnreadyTime)

	// ScaleDownUtilizationThreshold
	profile.ScaleDownUtilizationThreshold = genruntime.ClonePointerToString(source.ScaleDownUtilizationThreshold)

	// ScanInterval
	profile.ScanInterval = genruntime.ClonePointerToString(source.ScanInterval)

	// SkipNodesWithLocalStorage
	profile.SkipNodesWithLocalStorage = genruntime.ClonePointerToString(source.SkipNodesWithLocalStorage)

	// SkipNodesWithSystemPods
	profile.SkipNodesWithSystemPods = genruntime.ClonePointerToString(source.SkipNodesWithSystemPods)

	// No error
	return nil
}

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

	// BalanceSimilarNodeGroups
	destination.BalanceSimilarNodeGroups = genruntime.ClonePointerToString(profile.BalanceSimilarNodeGroups)

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

	// MaxEmptyBulkDelete
	destination.MaxEmptyBulkDelete = genruntime.ClonePointerToString(profile.MaxEmptyBulkDelete)

	// MaxGracefulTerminationSec
	destination.MaxGracefulTerminationSec = genruntime.ClonePointerToString(profile.MaxGracefulTerminationSec)

	// MaxNodeProvisionTime
	destination.MaxNodeProvisionTime = genruntime.ClonePointerToString(profile.MaxNodeProvisionTime)

	// MaxTotalUnreadyPercentage
	destination.MaxTotalUnreadyPercentage = genruntime.ClonePointerToString(profile.MaxTotalUnreadyPercentage)

	// NewPodScaleUpDelay
	destination.NewPodScaleUpDelay = genruntime.ClonePointerToString(profile.NewPodScaleUpDelay)

	// OkTotalUnreadyCount
	destination.OkTotalUnreadyCount = genruntime.ClonePointerToString(profile.OkTotalUnreadyCount)

	// ScaleDownDelayAfterAdd
	destination.ScaleDownDelayAfterAdd = genruntime.ClonePointerToString(profile.ScaleDownDelayAfterAdd)

	// ScaleDownDelayAfterDelete
	destination.ScaleDownDelayAfterDelete = genruntime.ClonePointerToString(profile.ScaleDownDelayAfterDelete)

	// ScaleDownDelayAfterFailure
	destination.ScaleDownDelayAfterFailure = genruntime.ClonePointerToString(profile.ScaleDownDelayAfterFailure)

	// ScaleDownUnneededTime
	destination.ScaleDownUnneededTime = genruntime.ClonePointerToString(profile.ScaleDownUnneededTime)

	// ScaleDownUnreadyTime
	destination.ScaleDownUnreadyTime = genruntime.ClonePointerToString(profile.ScaleDownUnreadyTime)

	// ScaleDownUtilizationThreshold
	destination.ScaleDownUtilizationThreshold = genruntime.ClonePointerToString(profile.ScaleDownUtilizationThreshold)

	// ScanInterval
	destination.ScanInterval = genruntime.ClonePointerToString(profile.ScanInterval)

	// SkipNodesWithLocalStorage
	destination.SkipNodesWithLocalStorage = genruntime.ClonePointerToString(profile.SkipNodesWithLocalStorage)

	// SkipNodesWithSystemPods
	destination.SkipNodesWithSystemPods = genruntime.ClonePointerToString(profile.SkipNodesWithSystemPods)

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

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"Disabled","Enabled"}
type ManagedClusterProperties_PublicNetworkAccess string

const (
	ManagedClusterProperties_PublicNetworkAccess_Disabled = ManagedClusterProperties_PublicNetworkAccess("Disabled")
	ManagedClusterProperties_PublicNetworkAccess_Enabled  = ManagedClusterProperties_PublicNetworkAccess("Enabled")
)

// Mapping from string to ManagedClusterProperties_PublicNetworkAccess
var managedClusterProperties_PublicNetworkAccess_Values = map[string]ManagedClusterProperties_PublicNetworkAccess{
	"disabled": ManagedClusterProperties_PublicNetworkAccess_Disabled,
	"enabled":  ManagedClusterProperties_PublicNetworkAccess_Enabled,
}

type ManagedClusterProperties_PublicNetworkAccess_STATUS string

const (
	ManagedClusterProperties_PublicNetworkAccess_STATUS_Disabled = ManagedClusterProperties_PublicNetworkAccess_STATUS("Disabled")
	ManagedClusterProperties_PublicNetworkAccess_STATUS_Enabled  = ManagedClusterProperties_PublicNetworkAccess_STATUS("Enabled")
)

// Mapping from string to ManagedClusterProperties_PublicNetworkAccess_STATUS
var managedClusterProperties_PublicNetworkAccess_STATUS_Values = map[string]ManagedClusterProperties_PublicNetworkAccess_STATUS{
	"disabled": ManagedClusterProperties_PublicNetworkAccess_STATUS_Disabled,
	"enabled":  ManagedClusterProperties_PublicNetworkAccess_STATUS_Enabled,
}

// Security profile for the container service cluster.
type ManagedClusterSecurityProfile struct {
	// AzureKeyVaultKms: Azure Key Vault [key management
	// service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) settings for the security profile.
	AzureKeyVaultKms *AzureKeyVaultKms `json:"azureKeyVaultKms,omitempty"`

	// Defender: Microsoft Defender settings for the security profile.
	Defender *ManagedClusterSecurityProfileDefender `json:"defender,omitempty"`

	// ImageCleaner: Image Cleaner settings for the security profile.
	ImageCleaner *ManagedClusterSecurityProfileImageCleaner `json:"imageCleaner,omitempty"`

	// WorkloadIdentity: Workload identity settings for the security profile. Workload identity enables Kubernetes applications
	// to access Azure cloud resources securely with Azure AD. See https://aka.ms/aks/wi for more details.
	WorkloadIdentity *ManagedClusterSecurityProfileWorkloadIdentity `json:"workloadIdentity,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterSecurityProfile{}

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

	// Set property "AzureKeyVaultKms":
	if profile.AzureKeyVaultKms != nil {
		azureKeyVaultKms_ARM, err := profile.AzureKeyVaultKms.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		azureKeyVaultKms := *azureKeyVaultKms_ARM.(*arm.AzureKeyVaultKms)
		result.AzureKeyVaultKms = &azureKeyVaultKms
	}

	// Set property "Defender":
	if profile.Defender != nil {
		defender_ARM, err := profile.Defender.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		defender := *defender_ARM.(*arm.ManagedClusterSecurityProfileDefender)
		result.Defender = &defender
	}

	// Set property "ImageCleaner":
	if profile.ImageCleaner != nil {
		imageCleaner_ARM, err := profile.ImageCleaner.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		imageCleaner := *imageCleaner_ARM.(*arm.ManagedClusterSecurityProfileImageCleaner)
		result.ImageCleaner = &imageCleaner
	}

	// Set property "WorkloadIdentity":
	if profile.WorkloadIdentity != nil {
		workloadIdentity_ARM, err := profile.WorkloadIdentity.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		workloadIdentity := *workloadIdentity_ARM.(*arm.ManagedClusterSecurityProfileWorkloadIdentity)
		result.WorkloadIdentity = &workloadIdentity
	}
	return result, nil
}

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

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

	// Set property "AzureKeyVaultKms":
	if typedInput.AzureKeyVaultKms != nil {
		var azureKeyVaultKms1 AzureKeyVaultKms
		err := azureKeyVaultKms1.PopulateFromARM(owner, *typedInput.AzureKeyVaultKms)
		if err != nil {
			return err
		}
		azureKeyVaultKms := azureKeyVaultKms1
		profile.AzureKeyVaultKms = &azureKeyVaultKms
	}

	// Set property "Defender":
	if typedInput.Defender != nil {
		var defender1 ManagedClusterSecurityProfileDefender
		err := defender1.PopulateFromARM(owner, *typedInput.Defender)
		if err != nil {
			return err
		}
		defender := defender1
		profile.Defender = &defender
	}

	// Set property "ImageCleaner":
	if typedInput.ImageCleaner != nil {
		var imageCleaner1 ManagedClusterSecurityProfileImageCleaner
		err := imageCleaner1.PopulateFromARM(owner, *typedInput.ImageCleaner)
		if err != nil {
			return err
		}
		imageCleaner := imageCleaner1
		profile.ImageCleaner = &imageCleaner
	}

	// Set property "WorkloadIdentity":
	if typedInput.WorkloadIdentity != nil {
		var workloadIdentity1 ManagedClusterSecurityProfileWorkloadIdentity
		err := workloadIdentity1.PopulateFromARM(owner, *typedInput.WorkloadIdentity)
		if err != nil {
			return err
		}
		workloadIdentity := workloadIdentity1
		profile.WorkloadIdentity = &workloadIdentity
	}

	// No error
	return nil
}

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

	// AzureKeyVaultKms
	if source.AzureKeyVaultKms != nil {
		var azureKeyVaultKm AzureKeyVaultKms
		err := azureKeyVaultKm.AssignProperties_From_AzureKeyVaultKms(source.AzureKeyVaultKms)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_AzureKeyVaultKms() to populate field AzureKeyVaultKms")
		}
		profile.AzureKeyVaultKms = &azureKeyVaultKm
	} else {
		profile.AzureKeyVaultKms = nil
	}

	// Defender
	if source.Defender != nil {
		var defender ManagedClusterSecurityProfileDefender
		err := defender.AssignProperties_From_ManagedClusterSecurityProfileDefender(source.Defender)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterSecurityProfileDefender() to populate field Defender")
		}
		profile.Defender = &defender
	} else {
		profile.Defender = nil
	}

	// ImageCleaner
	if source.ImageCleaner != nil {
		var imageCleaner ManagedClusterSecurityProfileImageCleaner
		err := imageCleaner.AssignProperties_From_ManagedClusterSecurityProfileImageCleaner(source.ImageCleaner)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterSecurityProfileImageCleaner() to populate field ImageCleaner")
		}
		profile.ImageCleaner = &imageCleaner
	} else {
		profile.ImageCleaner = nil
	}

	// WorkloadIdentity
	if source.WorkloadIdentity != nil {
		var workloadIdentity ManagedClusterSecurityProfileWorkloadIdentity
		err := workloadIdentity.AssignProperties_From_ManagedClusterSecurityProfileWorkloadIdentity(source.WorkloadIdentity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterSecurityProfileWorkloadIdentity() to populate field WorkloadIdentity")
		}
		profile.WorkloadIdentity = &workloadIdentity
	} else {
		profile.WorkloadIdentity = nil
	}

	// No error
	return nil
}

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

	// AzureKeyVaultKms
	if profile.AzureKeyVaultKms != nil {
		var azureKeyVaultKm storage.AzureKeyVaultKms
		err := profile.AzureKeyVaultKms.AssignProperties_To_AzureKeyVaultKms(&azureKeyVaultKm)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_AzureKeyVaultKms() to populate field AzureKeyVaultKms")
		}
		destination.AzureKeyVaultKms = &azureKeyVaultKm
	} else {
		destination.AzureKeyVaultKms = nil
	}

	// Defender
	if profile.Defender != nil {
		var defender storage.ManagedClusterSecurityProfileDefender
		err := profile.Defender.AssignProperties_To_ManagedClusterSecurityProfileDefender(&defender)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterSecurityProfileDefender() to populate field Defender")
		}
		destination.Defender = &defender
	} else {
		destination.Defender = nil
	}

	// ImageCleaner
	if profile.ImageCleaner != nil {
		var imageCleaner storage.ManagedClusterSecurityProfileImageCleaner
		err := profile.ImageCleaner.AssignProperties_To_ManagedClusterSecurityProfileImageCleaner(&imageCleaner)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterSecurityProfileImageCleaner() to populate field ImageCleaner")
		}
		destination.ImageCleaner = &imageCleaner
	} else {
		destination.ImageCleaner = nil
	}

	// WorkloadIdentity
	if profile.WorkloadIdentity != nil {
		var workloadIdentity storage.ManagedClusterSecurityProfileWorkloadIdentity
		err := profile.WorkloadIdentity.AssignProperties_To_ManagedClusterSecurityProfileWorkloadIdentity(&workloadIdentity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterSecurityProfileWorkloadIdentity() to populate field WorkloadIdentity")
		}
		destination.WorkloadIdentity = &workloadIdentity
	} else {
		destination.WorkloadIdentity = nil
	}

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

	// No error
	return nil
}

// Security profile for the container service cluster.
type ManagedClusterSecurityProfile_STATUS struct {
	// AzureKeyVaultKms: Azure Key Vault [key management
	// service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) settings for the security profile.
	AzureKeyVaultKms *AzureKeyVaultKms_STATUS `json:"azureKeyVaultKms,omitempty"`

	// Defender: Microsoft Defender settings for the security profile.
	Defender *ManagedClusterSecurityProfileDefender_STATUS `json:"defender,omitempty"`

	// ImageCleaner: Image Cleaner settings for the security profile.
	ImageCleaner *ManagedClusterSecurityProfileImageCleaner_STATUS `json:"imageCleaner,omitempty"`

	// WorkloadIdentity: Workload identity settings for the security profile. Workload identity enables Kubernetes applications
	// to access Azure cloud resources securely with Azure AD. See https://aka.ms/aks/wi for more details.
	WorkloadIdentity *ManagedClusterSecurityProfileWorkloadIdentity_STATUS `json:"workloadIdentity,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterSecurityProfile_STATUS{}

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

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

	// Set property "AzureKeyVaultKms":
	if typedInput.AzureKeyVaultKms != nil {
		var azureKeyVaultKms1 AzureKeyVaultKms_STATUS
		err := azureKeyVaultKms1.PopulateFromARM(owner, *typedInput.AzureKeyVaultKms)
		if err != nil {
			return err
		}
		azureKeyVaultKms := azureKeyVaultKms1
		profile.AzureKeyVaultKms = &azureKeyVaultKms
	}

	// Set property "Defender":
	if typedInput.Defender != nil {
		var defender1 ManagedClusterSecurityProfileDefender_STATUS
		err := defender1.PopulateFromARM(owner, *typedInput.Defender)
		if err != nil {
			return err
		}
		defender := defender1
		profile.Defender = &defender
	}

	// Set property "ImageCleaner":
	if typedInput.ImageCleaner != nil {
		var imageCleaner1 ManagedClusterSecurityProfileImageCleaner_STATUS
		err := imageCleaner1.PopulateFromARM(owner, *typedInput.ImageCleaner)
		if err != nil {
			return err
		}
		imageCleaner := imageCleaner1
		profile.ImageCleaner = &imageCleaner
	}

	// Set property "WorkloadIdentity":
	if typedInput.WorkloadIdentity != nil {
		var workloadIdentity1 ManagedClusterSecurityProfileWorkloadIdentity_STATUS
		err := workloadIdentity1.PopulateFromARM(owner, *typedInput.WorkloadIdentity)
		if err != nil {
			return err
		}
		workloadIdentity := workloadIdentity1
		profile.WorkloadIdentity = &workloadIdentity
	}

	// No error
	return nil
}

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

	// AzureKeyVaultKms
	if source.AzureKeyVaultKms != nil {
		var azureKeyVaultKm AzureKeyVaultKms_STATUS
		err := azureKeyVaultKm.AssignProperties_From_AzureKeyVaultKms_STATUS(source.AzureKeyVaultKms)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_AzureKeyVaultKms_STATUS() to populate field AzureKeyVaultKms")
		}
		profile.AzureKeyVaultKms = &azureKeyVaultKm
	} else {
		profile.AzureKeyVaultKms = nil
	}

	// Defender
	if source.Defender != nil {
		var defender ManagedClusterSecurityProfileDefender_STATUS
		err := defender.AssignProperties_From_ManagedClusterSecurityProfileDefender_STATUS(source.Defender)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterSecurityProfileDefender_STATUS() to populate field Defender")
		}
		profile.Defender = &defender
	} else {
		profile.Defender = nil
	}

	// ImageCleaner
	if source.ImageCleaner != nil {
		var imageCleaner ManagedClusterSecurityProfileImageCleaner_STATUS
		err := imageCleaner.AssignProperties_From_ManagedClusterSecurityProfileImageCleaner_STATUS(source.ImageCleaner)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterSecurityProfileImageCleaner_STATUS() to populate field ImageCleaner")
		}
		profile.ImageCleaner = &imageCleaner
	} else {
		profile.ImageCleaner = nil
	}

	// WorkloadIdentity
	if source.WorkloadIdentity != nil {
		var workloadIdentity ManagedClusterSecurityProfileWorkloadIdentity_STATUS
		err := workloadIdentity.AssignProperties_From_ManagedClusterSecurityProfileWorkloadIdentity_STATUS(source.WorkloadIdentity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterSecurityProfileWorkloadIdentity_STATUS() to populate field WorkloadIdentity")
		}
		profile.WorkloadIdentity = &workloadIdentity
	} else {
		profile.WorkloadIdentity = nil
	}

	// No error
	return nil
}

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

	// AzureKeyVaultKms
	if profile.AzureKeyVaultKms != nil {
		var azureKeyVaultKm storage.AzureKeyVaultKms_STATUS
		err := profile.AzureKeyVaultKms.AssignProperties_To_AzureKeyVaultKms_STATUS(&azureKeyVaultKm)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_AzureKeyVaultKms_STATUS() to populate field AzureKeyVaultKms")
		}
		destination.AzureKeyVaultKms = &azureKeyVaultKm
	} else {
		destination.AzureKeyVaultKms = nil
	}

	// Defender
	if profile.Defender != nil {
		var defender storage.ManagedClusterSecurityProfileDefender_STATUS
		err := profile.Defender.AssignProperties_To_ManagedClusterSecurityProfileDefender_STATUS(&defender)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterSecurityProfileDefender_STATUS() to populate field Defender")
		}
		destination.Defender = &defender
	} else {
		destination.Defender = nil
	}

	// ImageCleaner
	if profile.ImageCleaner != nil {
		var imageCleaner storage.ManagedClusterSecurityProfileImageCleaner_STATUS
		err := profile.ImageCleaner.AssignProperties_To_ManagedClusterSecurityProfileImageCleaner_STATUS(&imageCleaner)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterSecurityProfileImageCleaner_STATUS() to populate field ImageCleaner")
		}
		destination.ImageCleaner = &imageCleaner
	} else {
		destination.ImageCleaner = nil
	}

	// WorkloadIdentity
	if profile.WorkloadIdentity != nil {
		var workloadIdentity storage.ManagedClusterSecurityProfileWorkloadIdentity_STATUS
		err := profile.WorkloadIdentity.AssignProperties_To_ManagedClusterSecurityProfileWorkloadIdentity_STATUS(&workloadIdentity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterSecurityProfileWorkloadIdentity_STATUS() to populate field WorkloadIdentity")
		}
		destination.WorkloadIdentity = &workloadIdentity
	} else {
		destination.WorkloadIdentity = nil
	}

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

	// No error
	return nil
}

// Information about a service principal identity for the cluster to use for manipulating Azure APIs.
type ManagedClusterServicePrincipalProfile struct {
	// +kubebuilder:validation:Required
	// ClientId: The ID for the service principal.
	ClientId *string `json:"clientId,omitempty"`

	// Secret: The secret password associated with the service principal in plain text.
	Secret *genruntime.SecretReference `json:"secret,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterServicePrincipalProfile{}

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

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

	// Set property "Secret":
	if profile.Secret != nil {
		secretSecret, err := resolved.ResolvedSecrets.Lookup(*profile.Secret)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property Secret")
		}
		secret := secretSecret
		result.Secret = &secret
	}
	return result, nil
}

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

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

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

	// no assignment for property "Secret"

	// No error
	return nil
}

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

	// ClientId
	profile.ClientId = genruntime.ClonePointerToString(source.ClientId)

	// Secret
	if source.Secret != nil {
		secret := source.Secret.Copy()
		profile.Secret = &secret
	} else {
		profile.Secret = nil
	}

	// No error
	return nil
}

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

	// ClientId
	destination.ClientId = genruntime.ClonePointerToString(profile.ClientId)

	// Secret
	if profile.Secret != nil {
		secret := profile.Secret.Copy()
		destination.Secret = &secret
	} else {
		destination.Secret = nil
	}

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

	// No error
	return nil
}

// Information about a service principal identity for the cluster to use for manipulating Azure APIs.
type ManagedClusterServicePrincipalProfile_STATUS struct {
	// ClientId: The ID for the service principal.
	ClientId *string `json:"clientId,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterServicePrincipalProfile_STATUS{}

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

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

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

	// No error
	return nil
}

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

	// ClientId
	profile.ClientId = genruntime.ClonePointerToString(source.ClientId)

	// No error
	return nil
}

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

	// ClientId
	destination.ClientId = genruntime.ClonePointerToString(profile.ClientId)

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

	// No error
	return nil
}

// The SKU of a Managed Cluster.
type ManagedClusterSKU struct {
	// Name: The name of a managed cluster SKU.
	Name *ManagedClusterSKU_Name `json:"name,omitempty"`

	// Tier: If not specified, the default is 'Free'. See [AKS Pricing
	// Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) for more details.
	Tier *ManagedClusterSKU_Tier `json:"tier,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterSKU{}

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

	// Set property "Name":
	if clusterSKU.Name != nil {
		var temp string
		temp = string(*clusterSKU.Name)
		name := arm.ManagedClusterSKU_Name(temp)
		result.Name = &name
	}

	// Set property "Tier":
	if clusterSKU.Tier != nil {
		var temp string
		temp = string(*clusterSKU.Tier)
		tier := arm.ManagedClusterSKU_Tier(temp)
		result.Tier = &tier
	}
	return result, nil
}

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

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

	// Set property "Name":
	if typedInput.Name != nil {
		var temp string
		temp = string(*typedInput.Name)
		name := ManagedClusterSKU_Name(temp)
		clusterSKU.Name = &name
	}

	// Set property "Tier":
	if typedInput.Tier != nil {
		var temp string
		temp = string(*typedInput.Tier)
		tier := ManagedClusterSKU_Tier(temp)
		clusterSKU.Tier = &tier
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterSKU populates our ManagedClusterSKU from the provided source ManagedClusterSKU
func (clusterSKU *ManagedClusterSKU) AssignProperties_From_ManagedClusterSKU(source *storage.ManagedClusterSKU) error {

	// Name
	if source.Name != nil {
		name := *source.Name
		nameTemp := genruntime.ToEnum(name, managedClusterSKU_Name_Values)
		clusterSKU.Name = &nameTemp
	} else {
		clusterSKU.Name = nil
	}

	// Tier
	if source.Tier != nil {
		tier := *source.Tier
		tierTemp := genruntime.ToEnum(tier, managedClusterSKU_Tier_Values)
		clusterSKU.Tier = &tierTemp
	} else {
		clusterSKU.Tier = nil
	}

	// No error
	return nil
}

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

	// Name
	if clusterSKU.Name != nil {
		name := string(*clusterSKU.Name)
		destination.Name = &name
	} else {
		destination.Name = nil
	}

	// Tier
	if clusterSKU.Tier != nil {
		tier := string(*clusterSKU.Tier)
		destination.Tier = &tier
	} else {
		destination.Tier = nil
	}

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

	// No error
	return nil
}

// The SKU of a Managed Cluster.
type ManagedClusterSKU_STATUS struct {
	// Name: The name of a managed cluster SKU.
	Name *ManagedClusterSKU_Name_STATUS `json:"name,omitempty"`

	// Tier: If not specified, the default is 'Free'. See [AKS Pricing
	// Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) for more details.
	Tier *ManagedClusterSKU_Tier_STATUS `json:"tier,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterSKU_STATUS{}

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

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

	// Set property "Name":
	if typedInput.Name != nil {
		var temp string
		temp = string(*typedInput.Name)
		name := ManagedClusterSKU_Name_STATUS(temp)
		clusterSKU.Name = &name
	}

	// Set property "Tier":
	if typedInput.Tier != nil {
		var temp string
		temp = string(*typedInput.Tier)
		tier := ManagedClusterSKU_Tier_STATUS(temp)
		clusterSKU.Tier = &tier
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterSKU_STATUS populates our ManagedClusterSKU_STATUS from the provided source ManagedClusterSKU_STATUS
func (clusterSKU *ManagedClusterSKU_STATUS) AssignProperties_From_ManagedClusterSKU_STATUS(source *storage.ManagedClusterSKU_STATUS) error {

	// Name
	if source.Name != nil {
		name := *source.Name
		nameTemp := genruntime.ToEnum(name, managedClusterSKU_Name_STATUS_Values)
		clusterSKU.Name = &nameTemp
	} else {
		clusterSKU.Name = nil
	}

	// Tier
	if source.Tier != nil {
		tier := *source.Tier
		tierTemp := genruntime.ToEnum(tier, managedClusterSKU_Tier_STATUS_Values)
		clusterSKU.Tier = &tierTemp
	} else {
		clusterSKU.Tier = nil
	}

	// No error
	return nil
}

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

	// Name
	if clusterSKU.Name != nil {
		name := string(*clusterSKU.Name)
		destination.Name = &name
	} else {
		destination.Name = nil
	}

	// Tier
	if clusterSKU.Tier != nil {
		tier := string(*clusterSKU.Tier)
		destination.Tier = &tier
	} else {
		destination.Tier = nil
	}

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

	// No error
	return nil
}

// Storage profile for the container service cluster.
type ManagedClusterStorageProfile struct {
	// BlobCSIDriver: AzureBlob CSI Driver settings for the storage profile.
	BlobCSIDriver *ManagedClusterStorageProfileBlobCSIDriver `json:"blobCSIDriver,omitempty"`

	// DiskCSIDriver: AzureDisk CSI Driver settings for the storage profile.
	DiskCSIDriver *ManagedClusterStorageProfileDiskCSIDriver `json:"diskCSIDriver,omitempty"`

	// FileCSIDriver: AzureFile CSI Driver settings for the storage profile.
	FileCSIDriver *ManagedClusterStorageProfileFileCSIDriver `json:"fileCSIDriver,omitempty"`

	// SnapshotController: Snapshot Controller settings for the storage profile.
	SnapshotController *ManagedClusterStorageProfileSnapshotController `json:"snapshotController,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterStorageProfile{}

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

	// Set property "BlobCSIDriver":
	if profile.BlobCSIDriver != nil {
		blobCSIDriver_ARM, err := profile.BlobCSIDriver.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		blobCSIDriver := *blobCSIDriver_ARM.(*arm.ManagedClusterStorageProfileBlobCSIDriver)
		result.BlobCSIDriver = &blobCSIDriver
	}

	// Set property "DiskCSIDriver":
	if profile.DiskCSIDriver != nil {
		diskCSIDriver_ARM, err := profile.DiskCSIDriver.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		diskCSIDriver := *diskCSIDriver_ARM.(*arm.ManagedClusterStorageProfileDiskCSIDriver)
		result.DiskCSIDriver = &diskCSIDriver
	}

	// Set property "FileCSIDriver":
	if profile.FileCSIDriver != nil {
		fileCSIDriver_ARM, err := profile.FileCSIDriver.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		fileCSIDriver := *fileCSIDriver_ARM.(*arm.ManagedClusterStorageProfileFileCSIDriver)
		result.FileCSIDriver = &fileCSIDriver
	}

	// Set property "SnapshotController":
	if profile.SnapshotController != nil {
		snapshotController_ARM, err := profile.SnapshotController.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		snapshotController := *snapshotController_ARM.(*arm.ManagedClusterStorageProfileSnapshotController)
		result.SnapshotController = &snapshotController
	}
	return result, nil
}

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

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

	// Set property "BlobCSIDriver":
	if typedInput.BlobCSIDriver != nil {
		var blobCSIDriver1 ManagedClusterStorageProfileBlobCSIDriver
		err := blobCSIDriver1.PopulateFromARM(owner, *typedInput.BlobCSIDriver)
		if err != nil {
			return err
		}
		blobCSIDriver := blobCSIDriver1
		profile.BlobCSIDriver = &blobCSIDriver
	}

	// Set property "DiskCSIDriver":
	if typedInput.DiskCSIDriver != nil {
		var diskCSIDriver1 ManagedClusterStorageProfileDiskCSIDriver
		err := diskCSIDriver1.PopulateFromARM(owner, *typedInput.DiskCSIDriver)
		if err != nil {
			return err
		}
		diskCSIDriver := diskCSIDriver1
		profile.DiskCSIDriver = &diskCSIDriver
	}

	// Set property "FileCSIDriver":
	if typedInput.FileCSIDriver != nil {
		var fileCSIDriver1 ManagedClusterStorageProfileFileCSIDriver
		err := fileCSIDriver1.PopulateFromARM(owner, *typedInput.FileCSIDriver)
		if err != nil {
			return err
		}
		fileCSIDriver := fileCSIDriver1
		profile.FileCSIDriver = &fileCSIDriver
	}

	// Set property "SnapshotController":
	if typedInput.SnapshotController != nil {
		var snapshotController1 ManagedClusterStorageProfileSnapshotController
		err := snapshotController1.PopulateFromARM(owner, *typedInput.SnapshotController)
		if err != nil {
			return err
		}
		snapshotController := snapshotController1
		profile.SnapshotController = &snapshotController
	}

	// No error
	return nil
}

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

	// BlobCSIDriver
	if source.BlobCSIDriver != nil {
		var blobCSIDriver ManagedClusterStorageProfileBlobCSIDriver
		err := blobCSIDriver.AssignProperties_From_ManagedClusterStorageProfileBlobCSIDriver(source.BlobCSIDriver)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterStorageProfileBlobCSIDriver() to populate field BlobCSIDriver")
		}
		profile.BlobCSIDriver = &blobCSIDriver
	} else {
		profile.BlobCSIDriver = nil
	}

	// DiskCSIDriver
	if source.DiskCSIDriver != nil {
		var diskCSIDriver ManagedClusterStorageProfileDiskCSIDriver
		err := diskCSIDriver.AssignProperties_From_ManagedClusterStorageProfileDiskCSIDriver(source.DiskCSIDriver)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterStorageProfileDiskCSIDriver() to populate field DiskCSIDriver")
		}
		profile.DiskCSIDriver = &diskCSIDriver
	} else {
		profile.DiskCSIDriver = nil
	}

	// FileCSIDriver
	if source.FileCSIDriver != nil {
		var fileCSIDriver ManagedClusterStorageProfileFileCSIDriver
		err := fileCSIDriver.AssignProperties_From_ManagedClusterStorageProfileFileCSIDriver(source.FileCSIDriver)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterStorageProfileFileCSIDriver() to populate field FileCSIDriver")
		}
		profile.FileCSIDriver = &fileCSIDriver
	} else {
		profile.FileCSIDriver = nil
	}

	// SnapshotController
	if source.SnapshotController != nil {
		var snapshotController ManagedClusterStorageProfileSnapshotController
		err := snapshotController.AssignProperties_From_ManagedClusterStorageProfileSnapshotController(source.SnapshotController)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterStorageProfileSnapshotController() to populate field SnapshotController")
		}
		profile.SnapshotController = &snapshotController
	} else {
		profile.SnapshotController = nil
	}

	// No error
	return nil
}

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

	// BlobCSIDriver
	if profile.BlobCSIDriver != nil {
		var blobCSIDriver storage.ManagedClusterStorageProfileBlobCSIDriver
		err := profile.BlobCSIDriver.AssignProperties_To_ManagedClusterStorageProfileBlobCSIDriver(&blobCSIDriver)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterStorageProfileBlobCSIDriver() to populate field BlobCSIDriver")
		}
		destination.BlobCSIDriver = &blobCSIDriver
	} else {
		destination.BlobCSIDriver = nil
	}

	// DiskCSIDriver
	if profile.DiskCSIDriver != nil {
		var diskCSIDriver storage.ManagedClusterStorageProfileDiskCSIDriver
		err := profile.DiskCSIDriver.AssignProperties_To_ManagedClusterStorageProfileDiskCSIDriver(&diskCSIDriver)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterStorageProfileDiskCSIDriver() to populate field DiskCSIDriver")
		}
		destination.DiskCSIDriver = &diskCSIDriver
	} else {
		destination.DiskCSIDriver = nil
	}

	// FileCSIDriver
	if profile.FileCSIDriver != nil {
		var fileCSIDriver storage.ManagedClusterStorageProfileFileCSIDriver
		err := profile.FileCSIDriver.AssignProperties_To_ManagedClusterStorageProfileFileCSIDriver(&fileCSIDriver)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterStorageProfileFileCSIDriver() to populate field FileCSIDriver")
		}
		destination.FileCSIDriver = &fileCSIDriver
	} else {
		destination.FileCSIDriver = nil
	}

	// SnapshotController
	if profile.SnapshotController != nil {
		var snapshotController storage.ManagedClusterStorageProfileSnapshotController
		err := profile.SnapshotController.AssignProperties_To_ManagedClusterStorageProfileSnapshotController(&snapshotController)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterStorageProfileSnapshotController() to populate field SnapshotController")
		}
		destination.SnapshotController = &snapshotController
	} else {
		destination.SnapshotController = nil
	}

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

	// No error
	return nil
}

// Storage profile for the container service cluster.
type ManagedClusterStorageProfile_STATUS struct {
	// BlobCSIDriver: AzureBlob CSI Driver settings for the storage profile.
	BlobCSIDriver *ManagedClusterStorageProfileBlobCSIDriver_STATUS `json:"blobCSIDriver,omitempty"`

	// DiskCSIDriver: AzureDisk CSI Driver settings for the storage profile.
	DiskCSIDriver *ManagedClusterStorageProfileDiskCSIDriver_STATUS `json:"diskCSIDriver,omitempty"`

	// FileCSIDriver: AzureFile CSI Driver settings for the storage profile.
	FileCSIDriver *ManagedClusterStorageProfileFileCSIDriver_STATUS `json:"fileCSIDriver,omitempty"`

	// SnapshotController: Snapshot Controller settings for the storage profile.
	SnapshotController *ManagedClusterStorageProfileSnapshotController_STATUS `json:"snapshotController,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterStorageProfile_STATUS{}

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

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

	// Set property "BlobCSIDriver":
	if typedInput.BlobCSIDriver != nil {
		var blobCSIDriver1 ManagedClusterStorageProfileBlobCSIDriver_STATUS
		err := blobCSIDriver1.PopulateFromARM(owner, *typedInput.BlobCSIDriver)
		if err != nil {
			return err
		}
		blobCSIDriver := blobCSIDriver1
		profile.BlobCSIDriver = &blobCSIDriver
	}

	// Set property "DiskCSIDriver":
	if typedInput.DiskCSIDriver != nil {
		var diskCSIDriver1 ManagedClusterStorageProfileDiskCSIDriver_STATUS
		err := diskCSIDriver1.PopulateFromARM(owner, *typedInput.DiskCSIDriver)
		if err != nil {
			return err
		}
		diskCSIDriver := diskCSIDriver1
		profile.DiskCSIDriver = &diskCSIDriver
	}

	// Set property "FileCSIDriver":
	if typedInput.FileCSIDriver != nil {
		var fileCSIDriver1 ManagedClusterStorageProfileFileCSIDriver_STATUS
		err := fileCSIDriver1.PopulateFromARM(owner, *typedInput.FileCSIDriver)
		if err != nil {
			return err
		}
		fileCSIDriver := fileCSIDriver1
		profile.FileCSIDriver = &fileCSIDriver
	}

	// Set property "SnapshotController":
	if typedInput.SnapshotController != nil {
		var snapshotController1 ManagedClusterStorageProfileSnapshotController_STATUS
		err := snapshotController1.PopulateFromARM(owner, *typedInput.SnapshotController)
		if err != nil {
			return err
		}
		snapshotController := snapshotController1
		profile.SnapshotController = &snapshotController
	}

	// No error
	return nil
}

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

	// BlobCSIDriver
	if source.BlobCSIDriver != nil {
		var blobCSIDriver ManagedClusterStorageProfileBlobCSIDriver_STATUS
		err := blobCSIDriver.AssignProperties_From_ManagedClusterStorageProfileBlobCSIDriver_STATUS(source.BlobCSIDriver)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterStorageProfileBlobCSIDriver_STATUS() to populate field BlobCSIDriver")
		}
		profile.BlobCSIDriver = &blobCSIDriver
	} else {
		profile.BlobCSIDriver = nil
	}

	// DiskCSIDriver
	if source.DiskCSIDriver != nil {
		var diskCSIDriver ManagedClusterStorageProfileDiskCSIDriver_STATUS
		err := diskCSIDriver.AssignProperties_From_ManagedClusterStorageProfileDiskCSIDriver_STATUS(source.DiskCSIDriver)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterStorageProfileDiskCSIDriver_STATUS() to populate field DiskCSIDriver")
		}
		profile.DiskCSIDriver = &diskCSIDriver
	} else {
		profile.DiskCSIDriver = nil
	}

	// FileCSIDriver
	if source.FileCSIDriver != nil {
		var fileCSIDriver ManagedClusterStorageProfileFileCSIDriver_STATUS
		err := fileCSIDriver.AssignProperties_From_ManagedClusterStorageProfileFileCSIDriver_STATUS(source.FileCSIDriver)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterStorageProfileFileCSIDriver_STATUS() to populate field FileCSIDriver")
		}
		profile.FileCSIDriver = &fileCSIDriver
	} else {
		profile.FileCSIDriver = nil
	}

	// SnapshotController
	if source.SnapshotController != nil {
		var snapshotController ManagedClusterStorageProfileSnapshotController_STATUS
		err := snapshotController.AssignProperties_From_ManagedClusterStorageProfileSnapshotController_STATUS(source.SnapshotController)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterStorageProfileSnapshotController_STATUS() to populate field SnapshotController")
		}
		profile.SnapshotController = &snapshotController
	} else {
		profile.SnapshotController = nil
	}

	// No error
	return nil
}

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

	// BlobCSIDriver
	if profile.BlobCSIDriver != nil {
		var blobCSIDriver storage.ManagedClusterStorageProfileBlobCSIDriver_STATUS
		err := profile.BlobCSIDriver.AssignProperties_To_ManagedClusterStorageProfileBlobCSIDriver_STATUS(&blobCSIDriver)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterStorageProfileBlobCSIDriver_STATUS() to populate field BlobCSIDriver")
		}
		destination.BlobCSIDriver = &blobCSIDriver
	} else {
		destination.BlobCSIDriver = nil
	}

	// DiskCSIDriver
	if profile.DiskCSIDriver != nil {
		var diskCSIDriver storage.ManagedClusterStorageProfileDiskCSIDriver_STATUS
		err := profile.DiskCSIDriver.AssignProperties_To_ManagedClusterStorageProfileDiskCSIDriver_STATUS(&diskCSIDriver)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterStorageProfileDiskCSIDriver_STATUS() to populate field DiskCSIDriver")
		}
		destination.DiskCSIDriver = &diskCSIDriver
	} else {
		destination.DiskCSIDriver = nil
	}

	// FileCSIDriver
	if profile.FileCSIDriver != nil {
		var fileCSIDriver storage.ManagedClusterStorageProfileFileCSIDriver_STATUS
		err := profile.FileCSIDriver.AssignProperties_To_ManagedClusterStorageProfileFileCSIDriver_STATUS(&fileCSIDriver)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterStorageProfileFileCSIDriver_STATUS() to populate field FileCSIDriver")
		}
		destination.FileCSIDriver = &fileCSIDriver
	} else {
		destination.FileCSIDriver = nil
	}

	// SnapshotController
	if profile.SnapshotController != nil {
		var snapshotController storage.ManagedClusterStorageProfileSnapshotController_STATUS
		err := profile.SnapshotController.AssignProperties_To_ManagedClusterStorageProfileSnapshotController_STATUS(&snapshotController)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterStorageProfileSnapshotController_STATUS() to populate field SnapshotController")
		}
		destination.SnapshotController = &snapshotController
	} else {
		destination.SnapshotController = nil
	}

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

	// No error
	return nil
}

// Profile for Windows VMs in the managed cluster.
type ManagedClusterWindowsProfile struct {
	// AdminPassword: Specifies the password of the administrator account.
	// Minimum-length: 8 characters
	// Max-length: 123 characters
	// Complexity requirements: 3 out of 4 conditions below need to be fulfilled
	// Has lower characters
	// Has upper characters
	// Has a digit
	// Has a special character (Regex match [\W_])
	// Disallowed values: "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1",
	// "Password22", "iloveyou!"
	AdminPassword *genruntime.SecretReference `json:"adminPassword,omitempty"`

	// +kubebuilder:validation:Required
	// AdminUsername: Specifies the name of the administrator account.
	// Restriction: Cannot end in "."
	// Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123",
	// "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server",
	// "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".
	// Minimum-length: 1 character
	// Max-length: 20 characters
	AdminUsername *string `json:"adminUsername,omitempty"`

	// EnableCSIProxy: For more details on CSI proxy, see the [CSI proxy GitHub
	// repo](https://github.com/kubernetes-csi/csi-proxy).
	EnableCSIProxy *bool `json:"enableCSIProxy,omitempty"`

	// GmsaProfile: The Windows gMSA Profile in the Managed Cluster.
	GmsaProfile *WindowsGmsaProfile `json:"gmsaProfile,omitempty"`

	// LicenseType: The license type to use for Windows VMs. See [Azure Hybrid User
	// Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details.
	LicenseType *ManagedClusterWindowsProfile_LicenseType `json:"licenseType,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterWindowsProfile{}

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

	// Set property "AdminPassword":
	if profile.AdminPassword != nil {
		adminPasswordSecret, err := resolved.ResolvedSecrets.Lookup(*profile.AdminPassword)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property AdminPassword")
		}
		adminPassword := adminPasswordSecret
		result.AdminPassword = &adminPassword
	}

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

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

	// Set property "GmsaProfile":
	if profile.GmsaProfile != nil {
		gmsaProfile_ARM, err := profile.GmsaProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		gmsaProfile := *gmsaProfile_ARM.(*arm.WindowsGmsaProfile)
		result.GmsaProfile = &gmsaProfile
	}

	// Set property "LicenseType":
	if profile.LicenseType != nil {
		var temp string
		temp = string(*profile.LicenseType)
		licenseType := arm.ManagedClusterWindowsProfile_LicenseType(temp)
		result.LicenseType = &licenseType
	}
	return result, nil
}

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

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

	// no assignment for property "AdminPassword"

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

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

	// Set property "GmsaProfile":
	if typedInput.GmsaProfile != nil {
		var gmsaProfile1 WindowsGmsaProfile
		err := gmsaProfile1.PopulateFromARM(owner, *typedInput.GmsaProfile)
		if err != nil {
			return err
		}
		gmsaProfile := gmsaProfile1
		profile.GmsaProfile = &gmsaProfile
	}

	// Set property "LicenseType":
	if typedInput.LicenseType != nil {
		var temp string
		temp = string(*typedInput.LicenseType)
		licenseType := ManagedClusterWindowsProfile_LicenseType(temp)
		profile.LicenseType = &licenseType
	}

	// No error
	return nil
}

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

	// AdminPassword
	if source.AdminPassword != nil {
		adminPassword := source.AdminPassword.Copy()
		profile.AdminPassword = &adminPassword
	} else {
		profile.AdminPassword = nil
	}

	// AdminUsername
	profile.AdminUsername = genruntime.ClonePointerToString(source.AdminUsername)

	// EnableCSIProxy
	if source.EnableCSIProxy != nil {
		enableCSIProxy := *source.EnableCSIProxy
		profile.EnableCSIProxy = &enableCSIProxy
	} else {
		profile.EnableCSIProxy = nil
	}

	// GmsaProfile
	if source.GmsaProfile != nil {
		var gmsaProfile WindowsGmsaProfile
		err := gmsaProfile.AssignProperties_From_WindowsGmsaProfile(source.GmsaProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_WindowsGmsaProfile() to populate field GmsaProfile")
		}
		profile.GmsaProfile = &gmsaProfile
	} else {
		profile.GmsaProfile = nil
	}

	// LicenseType
	if source.LicenseType != nil {
		licenseType := *source.LicenseType
		licenseTypeTemp := genruntime.ToEnum(licenseType, managedClusterWindowsProfile_LicenseType_Values)
		profile.LicenseType = &licenseTypeTemp
	} else {
		profile.LicenseType = nil
	}

	// No error
	return nil
}

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

	// AdminPassword
	if profile.AdminPassword != nil {
		adminPassword := profile.AdminPassword.Copy()
		destination.AdminPassword = &adminPassword
	} else {
		destination.AdminPassword = nil
	}

	// AdminUsername
	destination.AdminUsername = genruntime.ClonePointerToString(profile.AdminUsername)

	// EnableCSIProxy
	if profile.EnableCSIProxy != nil {
		enableCSIProxy := *profile.EnableCSIProxy
		destination.EnableCSIProxy = &enableCSIProxy
	} else {
		destination.EnableCSIProxy = nil
	}

	// GmsaProfile
	if profile.GmsaProfile != nil {
		var gmsaProfile storage.WindowsGmsaProfile
		err := profile.GmsaProfile.AssignProperties_To_WindowsGmsaProfile(&gmsaProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_WindowsGmsaProfile() to populate field GmsaProfile")
		}
		destination.GmsaProfile = &gmsaProfile
	} else {
		destination.GmsaProfile = nil
	}

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

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

	// No error
	return nil
}

// Profile for Windows VMs in the managed cluster.
type ManagedClusterWindowsProfile_STATUS struct {
	// AdminUsername: Specifies the name of the administrator account.
	// Restriction: Cannot end in "."
	// Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123",
	// "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server",
	// "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".
	// Minimum-length: 1 character
	// Max-length: 20 characters
	AdminUsername *string `json:"adminUsername,omitempty"`

	// EnableCSIProxy: For more details on CSI proxy, see the [CSI proxy GitHub
	// repo](https://github.com/kubernetes-csi/csi-proxy).
	EnableCSIProxy *bool `json:"enableCSIProxy,omitempty"`

	// GmsaProfile: The Windows gMSA Profile in the Managed Cluster.
	GmsaProfile *WindowsGmsaProfile_STATUS `json:"gmsaProfile,omitempty"`

	// LicenseType: The license type to use for Windows VMs. See [Azure Hybrid User
	// Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details.
	LicenseType *ManagedClusterWindowsProfile_LicenseType_STATUS `json:"licenseType,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterWindowsProfile_STATUS{}

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

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

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

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

	// Set property "GmsaProfile":
	if typedInput.GmsaProfile != nil {
		var gmsaProfile1 WindowsGmsaProfile_STATUS
		err := gmsaProfile1.PopulateFromARM(owner, *typedInput.GmsaProfile)
		if err != nil {
			return err
		}
		gmsaProfile := gmsaProfile1
		profile.GmsaProfile = &gmsaProfile
	}

	// Set property "LicenseType":
	if typedInput.LicenseType != nil {
		var temp string
		temp = string(*typedInput.LicenseType)
		licenseType := ManagedClusterWindowsProfile_LicenseType_STATUS(temp)
		profile.LicenseType = &licenseType
	}

	// No error
	return nil
}

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

	// AdminUsername
	profile.AdminUsername = genruntime.ClonePointerToString(source.AdminUsername)

	// EnableCSIProxy
	if source.EnableCSIProxy != nil {
		enableCSIProxy := *source.EnableCSIProxy
		profile.EnableCSIProxy = &enableCSIProxy
	} else {
		profile.EnableCSIProxy = nil
	}

	// GmsaProfile
	if source.GmsaProfile != nil {
		var gmsaProfile WindowsGmsaProfile_STATUS
		err := gmsaProfile.AssignProperties_From_WindowsGmsaProfile_STATUS(source.GmsaProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_WindowsGmsaProfile_STATUS() to populate field GmsaProfile")
		}
		profile.GmsaProfile = &gmsaProfile
	} else {
		profile.GmsaProfile = nil
	}

	// LicenseType
	if source.LicenseType != nil {
		licenseType := *source.LicenseType
		licenseTypeTemp := genruntime.ToEnum(licenseType, managedClusterWindowsProfile_LicenseType_STATUS_Values)
		profile.LicenseType = &licenseTypeTemp
	} else {
		profile.LicenseType = nil
	}

	// No error
	return nil
}

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

	// AdminUsername
	destination.AdminUsername = genruntime.ClonePointerToString(profile.AdminUsername)

	// EnableCSIProxy
	if profile.EnableCSIProxy != nil {
		enableCSIProxy := *profile.EnableCSIProxy
		destination.EnableCSIProxy = &enableCSIProxy
	} else {
		destination.EnableCSIProxy = nil
	}

	// GmsaProfile
	if profile.GmsaProfile != nil {
		var gmsaProfile storage.WindowsGmsaProfile_STATUS
		err := profile.GmsaProfile.AssignProperties_To_WindowsGmsaProfile_STATUS(&gmsaProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_WindowsGmsaProfile_STATUS() to populate field GmsaProfile")
		}
		destination.GmsaProfile = &gmsaProfile
	} else {
		destination.GmsaProfile = nil
	}

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

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

	// No error
	return nil
}

// Workload Auto-scaler profile for the managed cluster.
type ManagedClusterWorkloadAutoScalerProfile struct {
	// Keda: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile.
	Keda *ManagedClusterWorkloadAutoScalerProfileKeda `json:"keda,omitempty"`

	// VerticalPodAutoscaler: VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile.
	VerticalPodAutoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler `json:"verticalPodAutoscaler,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterWorkloadAutoScalerProfile{}

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

	// Set property "Keda":
	if profile.Keda != nil {
		keda_ARM, err := profile.Keda.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		keda := *keda_ARM.(*arm.ManagedClusterWorkloadAutoScalerProfileKeda)
		result.Keda = &keda
	}

	// Set property "VerticalPodAutoscaler":
	if profile.VerticalPodAutoscaler != nil {
		verticalPodAutoscaler_ARM, err := profile.VerticalPodAutoscaler.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		verticalPodAutoscaler := *verticalPodAutoscaler_ARM.(*arm.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler)
		result.VerticalPodAutoscaler = &verticalPodAutoscaler
	}
	return result, nil
}

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

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

	// Set property "Keda":
	if typedInput.Keda != nil {
		var keda1 ManagedClusterWorkloadAutoScalerProfileKeda
		err := keda1.PopulateFromARM(owner, *typedInput.Keda)
		if err != nil {
			return err
		}
		keda := keda1
		profile.Keda = &keda
	}

	// Set property "VerticalPodAutoscaler":
	if typedInput.VerticalPodAutoscaler != nil {
		var verticalPodAutoscaler1 ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler
		err := verticalPodAutoscaler1.PopulateFromARM(owner, *typedInput.VerticalPodAutoscaler)
		if err != nil {
			return err
		}
		verticalPodAutoscaler := verticalPodAutoscaler1
		profile.VerticalPodAutoscaler = &verticalPodAutoscaler
	}

	// No error
	return nil
}

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

	// Keda
	if source.Keda != nil {
		var kedum ManagedClusterWorkloadAutoScalerProfileKeda
		err := kedum.AssignProperties_From_ManagedClusterWorkloadAutoScalerProfileKeda(source.Keda)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterWorkloadAutoScalerProfileKeda() to populate field Keda")
		}
		profile.Keda = &kedum
	} else {
		profile.Keda = nil
	}

	// VerticalPodAutoscaler
	if source.VerticalPodAutoscaler != nil {
		var verticalPodAutoscaler ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler
		err := verticalPodAutoscaler.AssignProperties_From_ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler(source.VerticalPodAutoscaler)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler() to populate field VerticalPodAutoscaler")
		}
		profile.VerticalPodAutoscaler = &verticalPodAutoscaler
	} else {
		profile.VerticalPodAutoscaler = nil
	}

	// No error
	return nil
}

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

	// Keda
	if profile.Keda != nil {
		var kedum storage.ManagedClusterWorkloadAutoScalerProfileKeda
		err := profile.Keda.AssignProperties_To_ManagedClusterWorkloadAutoScalerProfileKeda(&kedum)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterWorkloadAutoScalerProfileKeda() to populate field Keda")
		}
		destination.Keda = &kedum
	} else {
		destination.Keda = nil
	}

	// VerticalPodAutoscaler
	if profile.VerticalPodAutoscaler != nil {
		var verticalPodAutoscaler storage.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler
		err := profile.VerticalPodAutoscaler.AssignProperties_To_ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler(&verticalPodAutoscaler)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler() to populate field VerticalPodAutoscaler")
		}
		destination.VerticalPodAutoscaler = &verticalPodAutoscaler
	} else {
		destination.VerticalPodAutoscaler = nil
	}

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

	// No error
	return nil
}

// Workload Auto-scaler profile for the managed cluster.
type ManagedClusterWorkloadAutoScalerProfile_STATUS struct {
	// Keda: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile.
	Keda *ManagedClusterWorkloadAutoScalerProfileKeda_STATUS `json:"keda,omitempty"`

	// VerticalPodAutoscaler: VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile.
	VerticalPodAutoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS `json:"verticalPodAutoscaler,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterWorkloadAutoScalerProfile_STATUS{}

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

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

	// Set property "Keda":
	if typedInput.Keda != nil {
		var keda1 ManagedClusterWorkloadAutoScalerProfileKeda_STATUS
		err := keda1.PopulateFromARM(owner, *typedInput.Keda)
		if err != nil {
			return err
		}
		keda := keda1
		profile.Keda = &keda
	}

	// Set property "VerticalPodAutoscaler":
	if typedInput.VerticalPodAutoscaler != nil {
		var verticalPodAutoscaler1 ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS
		err := verticalPodAutoscaler1.PopulateFromARM(owner, *typedInput.VerticalPodAutoscaler)
		if err != nil {
			return err
		}
		verticalPodAutoscaler := verticalPodAutoscaler1
		profile.VerticalPodAutoscaler = &verticalPodAutoscaler
	}

	// No error
	return nil
}

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

	// Keda
	if source.Keda != nil {
		var kedum ManagedClusterWorkloadAutoScalerProfileKeda_STATUS
		err := kedum.AssignProperties_From_ManagedClusterWorkloadAutoScalerProfileKeda_STATUS(source.Keda)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterWorkloadAutoScalerProfileKeda_STATUS() to populate field Keda")
		}
		profile.Keda = &kedum
	} else {
		profile.Keda = nil
	}

	// VerticalPodAutoscaler
	if source.VerticalPodAutoscaler != nil {
		var verticalPodAutoscaler ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS
		err := verticalPodAutoscaler.AssignProperties_From_ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS(source.VerticalPodAutoscaler)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS() to populate field VerticalPodAutoscaler")
		}
		profile.VerticalPodAutoscaler = &verticalPodAutoscaler
	} else {
		profile.VerticalPodAutoscaler = nil
	}

	// No error
	return nil
}

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

	// Keda
	if profile.Keda != nil {
		var kedum storage.ManagedClusterWorkloadAutoScalerProfileKeda_STATUS
		err := profile.Keda.AssignProperties_To_ManagedClusterWorkloadAutoScalerProfileKeda_STATUS(&kedum)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterWorkloadAutoScalerProfileKeda_STATUS() to populate field Keda")
		}
		destination.Keda = &kedum
	} else {
		destination.Keda = nil
	}

	// VerticalPodAutoscaler
	if profile.VerticalPodAutoscaler != nil {
		var verticalPodAutoscaler storage.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS
		err := profile.VerticalPodAutoscaler.AssignProperties_To_ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS(&verticalPodAutoscaler)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS() to populate field VerticalPodAutoscaler")
		}
		destination.VerticalPodAutoscaler = &verticalPodAutoscaler
	} else {
		destination.VerticalPodAutoscaler = nil
	}

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

	// No error
	return nil
}

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

var _ genruntime.FromARMConverter = &PowerState_STATUS{}

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

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

	// Set property "Code":
	if typedInput.Code != nil {
		var temp string
		temp = string(*typedInput.Code)
		code := PowerState_Code_STATUS(temp)
		state.Code = &code
	}

	// No error
	return nil
}

// AssignProperties_From_PowerState_STATUS populates our PowerState_STATUS from the provided source PowerState_STATUS
func (state *PowerState_STATUS) AssignProperties_From_PowerState_STATUS(source *storage.PowerState_STATUS) error {

	// Code
	if source.Code != nil {
		code := *source.Code
		codeTemp := genruntime.ToEnum(code, powerState_Code_STATUS_Values)
		state.Code = &codeTemp
	} else {
		state.Code = nil
	}

	// No error
	return nil
}

// AssignProperties_To_PowerState_STATUS populates the provided destination PowerState_STATUS from our PowerState_STATUS
func (state *PowerState_STATUS) AssignProperties_To_PowerState_STATUS(destination *storage.PowerState_STATUS) 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
}

// A private link resource
type PrivateLinkResource struct {
	// GroupId: The group ID of the resource.
	GroupId *string `json:"groupId,omitempty"`

	// Name: The name of the private link resource.
	Name *string `json:"name,omitempty"`

	// Reference: The ID of the private link resource.
	Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"`

	// RequiredMembers: The RequiredMembers of the resource
	RequiredMembers []string `json:"requiredMembers,omitempty"`

	// Type: The resource type.
	Type *string `json:"type,omitempty"`
}

var _ genruntime.ARMTransformer = &PrivateLinkResource{}

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

	// Set property "GroupId":
	if resource.GroupId != nil {
		groupId := *resource.GroupId
		result.GroupId = &groupId
	}

	// Set property "Id":
	if resource.Reference != nil {
		referenceARMID, err := resolved.ResolvedReferences.Lookup(*resource.Reference)
		if err != nil {
			return nil, err
		}
		reference := referenceARMID
		result.Id = &reference
	}

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

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

	// Set property "Type":
	if resource.Type != nil {
		typeVar := *resource.Type
		result.Type = &typeVar
	}
	return result, nil
}

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

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

	// Set property "GroupId":
	if typedInput.GroupId != nil {
		groupId := *typedInput.GroupId
		resource.GroupId = &groupId
	}

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

	// no assignment for property "Reference"

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

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

	// No error
	return nil
}

// AssignProperties_From_PrivateLinkResource populates our PrivateLinkResource from the provided source PrivateLinkResource
func (resource *PrivateLinkResource) AssignProperties_From_PrivateLinkResource(source *storage.PrivateLinkResource) error {

	// GroupId
	resource.GroupId = genruntime.ClonePointerToString(source.GroupId)

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

	// Reference
	if source.Reference != nil {
		reference := source.Reference.Copy()
		resource.Reference = &reference
	} else {
		resource.Reference = nil
	}

	// RequiredMembers
	resource.RequiredMembers = genruntime.CloneSliceOfString(source.RequiredMembers)

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

	// No error
	return nil
}

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

	// GroupId
	destination.GroupId = genruntime.ClonePointerToString(resource.GroupId)

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

	// Reference
	if resource.Reference != nil {
		reference := resource.Reference.Copy()
		destination.Reference = &reference
	} else {
		destination.Reference = nil
	}

	// RequiredMembers
	destination.RequiredMembers = genruntime.CloneSliceOfString(resource.RequiredMembers)

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

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

	// No error
	return nil
}

// A private link resource
type PrivateLinkResource_STATUS struct {
	// GroupId: The group ID of the resource.
	GroupId *string `json:"groupId,omitempty"`

	// Id: The ID of the private link resource.
	Id *string `json:"id,omitempty"`

	// Name: The name of the private link resource.
	Name *string `json:"name,omitempty"`

	// PrivateLinkServiceID: The private link service ID of the resource, this field is exposed only to NRP internally.
	PrivateLinkServiceID *string `json:"privateLinkServiceID,omitempty"`

	// RequiredMembers: The RequiredMembers of the resource
	RequiredMembers []string `json:"requiredMembers,omitempty"`

	// Type: The resource type.
	Type *string `json:"type,omitempty"`
}

var _ genruntime.FromARMConverter = &PrivateLinkResource_STATUS{}

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

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

	// Set property "GroupId":
	if typedInput.GroupId != nil {
		groupId := *typedInput.GroupId
		resource.GroupId = &groupId
	}

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

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

	// Set property "PrivateLinkServiceID":
	if typedInput.PrivateLinkServiceID != nil {
		privateLinkServiceID := *typedInput.PrivateLinkServiceID
		resource.PrivateLinkServiceID = &privateLinkServiceID
	}

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

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

	// No error
	return nil
}

// AssignProperties_From_PrivateLinkResource_STATUS populates our PrivateLinkResource_STATUS from the provided source PrivateLinkResource_STATUS
func (resource *PrivateLinkResource_STATUS) AssignProperties_From_PrivateLinkResource_STATUS(source *storage.PrivateLinkResource_STATUS) error {

	// GroupId
	resource.GroupId = genruntime.ClonePointerToString(source.GroupId)

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

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

	// PrivateLinkServiceID
	resource.PrivateLinkServiceID = genruntime.ClonePointerToString(source.PrivateLinkServiceID)

	// RequiredMembers
	resource.RequiredMembers = genruntime.CloneSliceOfString(source.RequiredMembers)

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

	// No error
	return nil
}

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

	// GroupId
	destination.GroupId = genruntime.ClonePointerToString(resource.GroupId)

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

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

	// PrivateLinkServiceID
	destination.PrivateLinkServiceID = genruntime.ClonePointerToString(resource.PrivateLinkServiceID)

	// RequiredMembers
	destination.RequiredMembers = genruntime.CloneSliceOfString(resource.RequiredMembers)

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

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

	// No error
	return nil
}

// Service mesh profile for a managed cluster.
type ServiceMeshProfile struct {
	// Istio: Istio service mesh configuration.
	Istio *IstioServiceMesh `json:"istio,omitempty"`

	// +kubebuilder:validation:Required
	// Mode: Mode of the service mesh.
	Mode *ServiceMeshProfile_Mode `json:"mode,omitempty"`
}

var _ genruntime.ARMTransformer = &ServiceMeshProfile{}

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

	// Set property "Istio":
	if profile.Istio != nil {
		istio_ARM, err := profile.Istio.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		istio := *istio_ARM.(*arm.IstioServiceMesh)
		result.Istio = &istio
	}

	// Set property "Mode":
	if profile.Mode != nil {
		var temp string
		temp = string(*profile.Mode)
		mode := arm.ServiceMeshProfile_Mode(temp)
		result.Mode = &mode
	}
	return result, nil
}

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

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

	// Set property "Istio":
	if typedInput.Istio != nil {
		var istio1 IstioServiceMesh
		err := istio1.PopulateFromARM(owner, *typedInput.Istio)
		if err != nil {
			return err
		}
		istio := istio1
		profile.Istio = &istio
	}

	// Set property "Mode":
	if typedInput.Mode != nil {
		var temp string
		temp = string(*typedInput.Mode)
		mode := ServiceMeshProfile_Mode(temp)
		profile.Mode = &mode
	}

	// No error
	return nil
}

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

	// Istio
	if source.Istio != nil {
		var istio IstioServiceMesh
		err := istio.AssignProperties_From_IstioServiceMesh(source.Istio)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_IstioServiceMesh() to populate field Istio")
		}
		profile.Istio = &istio
	} else {
		profile.Istio = nil
	}

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

	// No error
	return nil
}

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

	// Istio
	if profile.Istio != nil {
		var istio storage.IstioServiceMesh
		err := profile.Istio.AssignProperties_To_IstioServiceMesh(&istio)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_IstioServiceMesh() to populate field Istio")
		}
		destination.Istio = &istio
	} else {
		destination.Istio = nil
	}

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

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

	// No error
	return nil
}

// Service mesh profile for a managed cluster.
type ServiceMeshProfile_STATUS struct {
	// Istio: Istio service mesh configuration.
	Istio *IstioServiceMesh_STATUS `json:"istio,omitempty"`

	// Mode: Mode of the service mesh.
	Mode *ServiceMeshProfile_Mode_STATUS `json:"mode,omitempty"`
}

var _ genruntime.FromARMConverter = &ServiceMeshProfile_STATUS{}

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

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

	// Set property "Istio":
	if typedInput.Istio != nil {
		var istio1 IstioServiceMesh_STATUS
		err := istio1.PopulateFromARM(owner, *typedInput.Istio)
		if err != nil {
			return err
		}
		istio := istio1
		profile.Istio = &istio
	}

	// Set property "Mode":
	if typedInput.Mode != nil {
		var temp string
		temp = string(*typedInput.Mode)
		mode := ServiceMeshProfile_Mode_STATUS(temp)
		profile.Mode = &mode
	}

	// No error
	return nil
}

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

	// Istio
	if source.Istio != nil {
		var istio IstioServiceMesh_STATUS
		err := istio.AssignProperties_From_IstioServiceMesh_STATUS(source.Istio)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_IstioServiceMesh_STATUS() to populate field Istio")
		}
		profile.Istio = &istio
	} else {
		profile.Istio = nil
	}

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

	// No error
	return nil
}

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

	// Istio
	if profile.Istio != nil {
		var istio storage.IstioServiceMesh_STATUS
		err := profile.Istio.AssignProperties_To_IstioServiceMesh_STATUS(&istio)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_IstioServiceMesh_STATUS() to populate field Istio")
		}
		destination.Istio = &istio
	} else {
		destination.Istio = nil
	}

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

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

	// No error
	return nil
}

// Metadata pertaining to creation and last modification of the resource.
type SystemData_STATUS struct {
	// CreatedAt: The timestamp of resource creation (UTC).
	CreatedAt *string `json:"createdAt,omitempty"`

	// CreatedBy: The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// CreatedByType: The type of identity that created the resource.
	CreatedByType *SystemData_CreatedByType_STATUS `json:"createdByType,omitempty"`

	// LastModifiedAt: The timestamp of resource last modification (UTC)
	LastModifiedAt *string `json:"lastModifiedAt,omitempty"`

	// LastModifiedBy: The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// LastModifiedByType: The type of identity that last modified the resource.
	LastModifiedByType *SystemData_LastModifiedByType_STATUS `json:"lastModifiedByType,omitempty"`
}

var _ genruntime.FromARMConverter = &SystemData_STATUS{}

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

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

	// Set property "CreatedAt":
	if typedInput.CreatedAt != nil {
		createdAt := *typedInput.CreatedAt
		data.CreatedAt = &createdAt
	}

	// Set property "CreatedBy":
	if typedInput.CreatedBy != nil {
		createdBy := *typedInput.CreatedBy
		data.CreatedBy = &createdBy
	}

	// Set property "CreatedByType":
	if typedInput.CreatedByType != nil {
		var temp string
		temp = string(*typedInput.CreatedByType)
		createdByType := SystemData_CreatedByType_STATUS(temp)
		data.CreatedByType = &createdByType
	}

	// Set property "LastModifiedAt":
	if typedInput.LastModifiedAt != nil {
		lastModifiedAt := *typedInput.LastModifiedAt
		data.LastModifiedAt = &lastModifiedAt
	}

	// Set property "LastModifiedBy":
	if typedInput.LastModifiedBy != nil {
		lastModifiedBy := *typedInput.LastModifiedBy
		data.LastModifiedBy = &lastModifiedBy
	}

	// Set property "LastModifiedByType":
	if typedInput.LastModifiedByType != nil {
		var temp string
		temp = string(*typedInput.LastModifiedByType)
		lastModifiedByType := SystemData_LastModifiedByType_STATUS(temp)
		data.LastModifiedByType = &lastModifiedByType
	}

	// No error
	return nil
}

// AssignProperties_From_SystemData_STATUS populates our SystemData_STATUS from the provided source SystemData_STATUS
func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *storage.SystemData_STATUS) error {

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

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

	// CreatedByType
	if source.CreatedByType != nil {
		createdByType := *source.CreatedByType
		createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values)
		data.CreatedByType = &createdByTypeTemp
	} else {
		data.CreatedByType = nil
	}

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

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

	// LastModifiedByType
	if source.LastModifiedByType != nil {
		lastModifiedByType := *source.LastModifiedByType
		lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values)
		data.LastModifiedByType = &lastModifiedByTypeTemp
	} else {
		data.LastModifiedByType = nil
	}

	// No error
	return nil
}

// AssignProperties_To_SystemData_STATUS populates the provided destination SystemData_STATUS from our SystemData_STATUS
func (data *SystemData_STATUS) AssignProperties_To_SystemData_STATUS(destination *storage.SystemData_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// CreatedAt
	destination.CreatedAt = genruntime.ClonePointerToString(data.CreatedAt)

	// CreatedBy
	destination.CreatedBy = genruntime.ClonePointerToString(data.CreatedBy)

	// CreatedByType
	if data.CreatedByType != nil {
		createdByType := string(*data.CreatedByType)
		destination.CreatedByType = &createdByType
	} else {
		destination.CreatedByType = nil
	}

	// LastModifiedAt
	destination.LastModifiedAt = genruntime.ClonePointerToString(data.LastModifiedAt)

	// LastModifiedBy
	destination.LastModifiedBy = genruntime.ClonePointerToString(data.LastModifiedBy)

	// LastModifiedByType
	if data.LastModifiedByType != nil {
		lastModifiedByType := string(*data.LastModifiedByType)
		destination.LastModifiedByType = &lastModifiedByType
	} else {
		destination.LastModifiedByType = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Details about a user assigned identity.
type UserAssignedIdentity struct {
	// ClientId: The client ID of the user assigned identity.
	ClientId *string `json:"clientId,omitempty" optionalConfigMapPair:"ClientId"`

	// ClientIdFromConfig: The client ID of the user assigned identity.
	ClientIdFromConfig *genruntime.ConfigMapReference `json:"clientIdFromConfig,omitempty" optionalConfigMapPair:"ClientId"`

	// ObjectId: The object ID of the user assigned identity.
	ObjectId *string `json:"objectId,omitempty" optionalConfigMapPair:"ObjectId"`

	// ObjectIdFromConfig: The object ID of the user assigned identity.
	ObjectIdFromConfig *genruntime.ConfigMapReference `json:"objectIdFromConfig,omitempty" optionalConfigMapPair:"ObjectId"`

	// ResourceReference: The resource ID of the user assigned identity.
	ResourceReference *genruntime.ResourceReference `armReference:"ResourceId" json:"resourceReference,omitempty"`
}

var _ genruntime.ARMTransformer = &UserAssignedIdentity{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (identity *UserAssignedIdentity) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if identity == nil {
		return nil, nil
	}
	result := &arm.UserAssignedIdentity{}

	// Set property "ClientId":
	if identity.ClientId != nil {
		clientId := *identity.ClientId
		result.ClientId = &clientId
	}
	if identity.ClientIdFromConfig != nil {
		clientIdValue, err := resolved.ResolvedConfigMaps.Lookup(*identity.ClientIdFromConfig)
		if err != nil {
			return nil, eris.Wrap(err, "looking up configmap for property ClientId")
		}
		clientId := clientIdValue
		result.ClientId = &clientId
	}

	// Set property "ObjectId":
	if identity.ObjectId != nil {
		objectId := *identity.ObjectId
		result.ObjectId = &objectId
	}
	if identity.ObjectIdFromConfig != nil {
		objectIdValue, err := resolved.ResolvedConfigMaps.Lookup(*identity.ObjectIdFromConfig)
		if err != nil {
			return nil, eris.Wrap(err, "looking up configmap for property ObjectId")
		}
		objectId := objectIdValue
		result.ObjectId = &objectId
	}

	// Set property "ResourceId":
	if identity.ResourceReference != nil {
		resourceReferenceARMID, err := resolved.ResolvedReferences.Lookup(*identity.ResourceReference)
		if err != nil {
			return nil, err
		}
		resourceReference := resourceReferenceARMID
		result.ResourceId = &resourceReference
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (identity *UserAssignedIdentity) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.UserAssignedIdentity{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (identity *UserAssignedIdentity) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.UserAssignedIdentity)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.UserAssignedIdentity, got %T", armInput)
	}

	// Set property "ClientId":
	if typedInput.ClientId != nil {
		clientId := *typedInput.ClientId
		identity.ClientId = &clientId
	}

	// no assignment for property "ClientIdFromConfig"

	// Set property "ObjectId":
	if typedInput.ObjectId != nil {
		objectId := *typedInput.ObjectId
		identity.ObjectId = &objectId
	}

	// no assignment for property "ObjectIdFromConfig"

	// no assignment for property "ResourceReference"

	// No error
	return nil
}

// AssignProperties_From_UserAssignedIdentity populates our UserAssignedIdentity from the provided source UserAssignedIdentity
func (identity *UserAssignedIdentity) AssignProperties_From_UserAssignedIdentity(source *storage.UserAssignedIdentity) error {

	// ClientId
	identity.ClientId = genruntime.ClonePointerToString(source.ClientId)

	// ClientIdFromConfig
	if source.ClientIdFromConfig != nil {
		clientIdFromConfig := source.ClientIdFromConfig.Copy()
		identity.ClientIdFromConfig = &clientIdFromConfig
	} else {
		identity.ClientIdFromConfig = nil
	}

	// ObjectId
	identity.ObjectId = genruntime.ClonePointerToString(source.ObjectId)

	// ObjectIdFromConfig
	if source.ObjectIdFromConfig != nil {
		objectIdFromConfig := source.ObjectIdFromConfig.Copy()
		identity.ObjectIdFromConfig = &objectIdFromConfig
	} else {
		identity.ObjectIdFromConfig = nil
	}

	// ResourceReference
	if source.ResourceReference != nil {
		resourceReference := source.ResourceReference.Copy()
		identity.ResourceReference = &resourceReference
	} else {
		identity.ResourceReference = nil
	}

	// No error
	return nil
}

// AssignProperties_To_UserAssignedIdentity populates the provided destination UserAssignedIdentity from our UserAssignedIdentity
func (identity *UserAssignedIdentity) AssignProperties_To_UserAssignedIdentity(destination *storage.UserAssignedIdentity) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// ClientId
	destination.ClientId = genruntime.ClonePointerToString(identity.ClientId)

	// ClientIdFromConfig
	if identity.ClientIdFromConfig != nil {
		clientIdFromConfig := identity.ClientIdFromConfig.Copy()
		destination.ClientIdFromConfig = &clientIdFromConfig
	} else {
		destination.ClientIdFromConfig = nil
	}

	// ObjectId
	destination.ObjectId = genruntime.ClonePointerToString(identity.ObjectId)

	// ObjectIdFromConfig
	if identity.ObjectIdFromConfig != nil {
		objectIdFromConfig := identity.ObjectIdFromConfig.Copy()
		destination.ObjectIdFromConfig = &objectIdFromConfig
	} else {
		destination.ObjectIdFromConfig = nil
	}

	// ResourceReference
	if identity.ResourceReference != nil {
		resourceReference := identity.ResourceReference.Copy()
		destination.ResourceReference = &resourceReference
	} else {
		destination.ResourceReference = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Details about a user assigned identity.
type UserAssignedIdentity_STATUS struct {
	// ClientId: The client ID of the user assigned identity.
	ClientId *string `json:"clientId,omitempty"`

	// ObjectId: The object ID of the user assigned identity.
	ObjectId *string `json:"objectId,omitempty"`

	// ResourceId: The resource ID of the user assigned identity.
	ResourceId *string `json:"resourceId,omitempty"`
}

var _ genruntime.FromARMConverter = &UserAssignedIdentity_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (identity *UserAssignedIdentity_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.UserAssignedIdentity_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (identity *UserAssignedIdentity_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.UserAssignedIdentity_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.UserAssignedIdentity_STATUS, got %T", armInput)
	}

	// Set property "ClientId":
	if typedInput.ClientId != nil {
		clientId := *typedInput.ClientId
		identity.ClientId = &clientId
	}

	// Set property "ObjectId":
	if typedInput.ObjectId != nil {
		objectId := *typedInput.ObjectId
		identity.ObjectId = &objectId
	}

	// Set property "ResourceId":
	if typedInput.ResourceId != nil {
		resourceId := *typedInput.ResourceId
		identity.ResourceId = &resourceId
	}

	// No error
	return nil
}

// AssignProperties_From_UserAssignedIdentity_STATUS populates our UserAssignedIdentity_STATUS from the provided source UserAssignedIdentity_STATUS
func (identity *UserAssignedIdentity_STATUS) AssignProperties_From_UserAssignedIdentity_STATUS(source *storage.UserAssignedIdentity_STATUS) error {

	// ClientId
	identity.ClientId = genruntime.ClonePointerToString(source.ClientId)

	// ObjectId
	identity.ObjectId = genruntime.ClonePointerToString(source.ObjectId)

	// ResourceId
	identity.ResourceId = genruntime.ClonePointerToString(source.ResourceId)

	// No error
	return nil
}

// AssignProperties_To_UserAssignedIdentity_STATUS populates the provided destination UserAssignedIdentity_STATUS from our UserAssignedIdentity_STATUS
func (identity *UserAssignedIdentity_STATUS) AssignProperties_To_UserAssignedIdentity_STATUS(destination *storage.UserAssignedIdentity_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// ClientId
	destination.ClientId = genruntime.ClonePointerToString(identity.ClientId)

	// ObjectId
	destination.ObjectId = genruntime.ClonePointerToString(identity.ObjectId)

	// ResourceId
	destination.ResourceId = genruntime.ClonePointerToString(identity.ResourceId)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Azure Key Vault key management service settings for the security profile.
type AzureKeyVaultKms struct {
	// Enabled: Whether to enable Azure Key Vault key management service. The default is false.
	Enabled *bool `json:"enabled,omitempty"`

	// KeyId: Identifier of Azure Key Vault key. See [key identifier
	// format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name)
	// for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key
	// identifier. When Azure Key Vault key management service is disabled, leave the field empty.
	KeyId *string `json:"keyId,omitempty"`

	// KeyVaultNetworkAccess: Network access of key vault. The possible values are `Public` and `Private`. `Public` means the
	// key vault allows public access from all networks. `Private` means the key vault disables public access and enables
	// private link. The default value is `Public`.
	KeyVaultNetworkAccess *AzureKeyVaultKms_KeyVaultNetworkAccess `json:"keyVaultNetworkAccess,omitempty"`

	// KeyVaultResourceReference: Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and
	// must be a valid resource ID. When keyVaultNetworkAccess is `Public`, leave the field empty.
	KeyVaultResourceReference *genruntime.ResourceReference `armReference:"KeyVaultResourceId" json:"keyVaultResourceReference,omitempty"`
}

var _ genruntime.ARMTransformer = &AzureKeyVaultKms{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (vaultKms *AzureKeyVaultKms) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if vaultKms == nil {
		return nil, nil
	}
	result := &arm.AzureKeyVaultKms{}

	// Set property "Enabled":
	if vaultKms.Enabled != nil {
		enabled := *vaultKms.Enabled
		result.Enabled = &enabled
	}

	// Set property "KeyId":
	if vaultKms.KeyId != nil {
		keyId := *vaultKms.KeyId
		result.KeyId = &keyId
	}

	// Set property "KeyVaultNetworkAccess":
	if vaultKms.KeyVaultNetworkAccess != nil {
		var temp string
		temp = string(*vaultKms.KeyVaultNetworkAccess)
		keyVaultNetworkAccess := arm.AzureKeyVaultKms_KeyVaultNetworkAccess(temp)
		result.KeyVaultNetworkAccess = &keyVaultNetworkAccess
	}

	// Set property "KeyVaultResourceId":
	if vaultKms.KeyVaultResourceReference != nil {
		keyVaultResourceReferenceARMID, err := resolved.ResolvedReferences.Lookup(*vaultKms.KeyVaultResourceReference)
		if err != nil {
			return nil, err
		}
		keyVaultResourceReference := keyVaultResourceReferenceARMID
		result.KeyVaultResourceId = &keyVaultResourceReference
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (vaultKms *AzureKeyVaultKms) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.AzureKeyVaultKms{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (vaultKms *AzureKeyVaultKms) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.AzureKeyVaultKms)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AzureKeyVaultKms, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		vaultKms.Enabled = &enabled
	}

	// Set property "KeyId":
	if typedInput.KeyId != nil {
		keyId := *typedInput.KeyId
		vaultKms.KeyId = &keyId
	}

	// Set property "KeyVaultNetworkAccess":
	if typedInput.KeyVaultNetworkAccess != nil {
		var temp string
		temp = string(*typedInput.KeyVaultNetworkAccess)
		keyVaultNetworkAccess := AzureKeyVaultKms_KeyVaultNetworkAccess(temp)
		vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccess
	}

	// no assignment for property "KeyVaultResourceReference"

	// No error
	return nil
}

// AssignProperties_From_AzureKeyVaultKms populates our AzureKeyVaultKms from the provided source AzureKeyVaultKms
func (vaultKms *AzureKeyVaultKms) AssignProperties_From_AzureKeyVaultKms(source *storage.AzureKeyVaultKms) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		vaultKms.Enabled = &enabled
	} else {
		vaultKms.Enabled = nil
	}

	// KeyId
	vaultKms.KeyId = genruntime.ClonePointerToString(source.KeyId)

	// KeyVaultNetworkAccess
	if source.KeyVaultNetworkAccess != nil {
		keyVaultNetworkAccess := *source.KeyVaultNetworkAccess
		keyVaultNetworkAccessTemp := genruntime.ToEnum(keyVaultNetworkAccess, azureKeyVaultKms_KeyVaultNetworkAccess_Values)
		vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccessTemp
	} else {
		vaultKms.KeyVaultNetworkAccess = nil
	}

	// KeyVaultResourceReference
	if source.KeyVaultResourceReference != nil {
		keyVaultResourceReference := source.KeyVaultResourceReference.Copy()
		vaultKms.KeyVaultResourceReference = &keyVaultResourceReference
	} else {
		vaultKms.KeyVaultResourceReference = nil
	}

	// No error
	return nil
}

// AssignProperties_To_AzureKeyVaultKms populates the provided destination AzureKeyVaultKms from our AzureKeyVaultKms
func (vaultKms *AzureKeyVaultKms) AssignProperties_To_AzureKeyVaultKms(destination *storage.AzureKeyVaultKms) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if vaultKms.Enabled != nil {
		enabled := *vaultKms.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

	// KeyId
	destination.KeyId = genruntime.ClonePointerToString(vaultKms.KeyId)

	// KeyVaultNetworkAccess
	if vaultKms.KeyVaultNetworkAccess != nil {
		keyVaultNetworkAccess := string(*vaultKms.KeyVaultNetworkAccess)
		destination.KeyVaultNetworkAccess = &keyVaultNetworkAccess
	} else {
		destination.KeyVaultNetworkAccess = nil
	}

	// KeyVaultResourceReference
	if vaultKms.KeyVaultResourceReference != nil {
		keyVaultResourceReference := vaultKms.KeyVaultResourceReference.Copy()
		destination.KeyVaultResourceReference = &keyVaultResourceReference
	} else {
		destination.KeyVaultResourceReference = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Azure Key Vault key management service settings for the security profile.
type AzureKeyVaultKms_STATUS struct {
	// Enabled: Whether to enable Azure Key Vault key management service. The default is false.
	Enabled *bool `json:"enabled,omitempty"`

	// KeyId: Identifier of Azure Key Vault key. See [key identifier
	// format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name)
	// for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key
	// identifier. When Azure Key Vault key management service is disabled, leave the field empty.
	KeyId *string `json:"keyId,omitempty"`

	// KeyVaultNetworkAccess: Network access of key vault. The possible values are `Public` and `Private`. `Public` means the
	// key vault allows public access from all networks. `Private` means the key vault disables public access and enables
	// private link. The default value is `Public`.
	KeyVaultNetworkAccess *AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS `json:"keyVaultNetworkAccess,omitempty"`

	// KeyVaultResourceId: Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must
	// be a valid resource ID. When keyVaultNetworkAccess is `Public`, leave the field empty.
	KeyVaultResourceId *string `json:"keyVaultResourceId,omitempty"`
}

var _ genruntime.FromARMConverter = &AzureKeyVaultKms_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (vaultKms *AzureKeyVaultKms_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.AzureKeyVaultKms_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (vaultKms *AzureKeyVaultKms_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.AzureKeyVaultKms_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.AzureKeyVaultKms_STATUS, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		vaultKms.Enabled = &enabled
	}

	// Set property "KeyId":
	if typedInput.KeyId != nil {
		keyId := *typedInput.KeyId
		vaultKms.KeyId = &keyId
	}

	// Set property "KeyVaultNetworkAccess":
	if typedInput.KeyVaultNetworkAccess != nil {
		var temp string
		temp = string(*typedInput.KeyVaultNetworkAccess)
		keyVaultNetworkAccess := AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS(temp)
		vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccess
	}

	// Set property "KeyVaultResourceId":
	if typedInput.KeyVaultResourceId != nil {
		keyVaultResourceId := *typedInput.KeyVaultResourceId
		vaultKms.KeyVaultResourceId = &keyVaultResourceId
	}

	// No error
	return nil
}

// AssignProperties_From_AzureKeyVaultKms_STATUS populates our AzureKeyVaultKms_STATUS from the provided source AzureKeyVaultKms_STATUS
func (vaultKms *AzureKeyVaultKms_STATUS) AssignProperties_From_AzureKeyVaultKms_STATUS(source *storage.AzureKeyVaultKms_STATUS) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		vaultKms.Enabled = &enabled
	} else {
		vaultKms.Enabled = nil
	}

	// KeyId
	vaultKms.KeyId = genruntime.ClonePointerToString(source.KeyId)

	// KeyVaultNetworkAccess
	if source.KeyVaultNetworkAccess != nil {
		keyVaultNetworkAccess := *source.KeyVaultNetworkAccess
		keyVaultNetworkAccessTemp := genruntime.ToEnum(keyVaultNetworkAccess, azureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Values)
		vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccessTemp
	} else {
		vaultKms.KeyVaultNetworkAccess = nil
	}

	// KeyVaultResourceId
	vaultKms.KeyVaultResourceId = genruntime.ClonePointerToString(source.KeyVaultResourceId)

	// No error
	return nil
}

// AssignProperties_To_AzureKeyVaultKms_STATUS populates the provided destination AzureKeyVaultKms_STATUS from our AzureKeyVaultKms_STATUS
func (vaultKms *AzureKeyVaultKms_STATUS) AssignProperties_To_AzureKeyVaultKms_STATUS(destination *storage.AzureKeyVaultKms_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if vaultKms.Enabled != nil {
		enabled := *vaultKms.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

	// KeyId
	destination.KeyId = genruntime.ClonePointerToString(vaultKms.KeyId)

	// KeyVaultNetworkAccess
	if vaultKms.KeyVaultNetworkAccess != nil {
		keyVaultNetworkAccess := string(*vaultKms.KeyVaultNetworkAccess)
		destination.KeyVaultNetworkAccess = &keyVaultNetworkAccess
	} else {
		destination.KeyVaultNetworkAccess = nil
	}

	// KeyVaultResourceId
	destination.KeyVaultResourceId = genruntime.ClonePointerToString(vaultKms.KeyVaultResourceId)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"IPv4","IPv6"}
type ContainerServiceNetworkProfile_IpFamilies string

const (
	ContainerServiceNetworkProfile_IpFamilies_IPv4 = ContainerServiceNetworkProfile_IpFamilies("IPv4")
	ContainerServiceNetworkProfile_IpFamilies_IPv6 = ContainerServiceNetworkProfile_IpFamilies("IPv6")
)

// Mapping from string to ContainerServiceNetworkProfile_IpFamilies
var containerServiceNetworkProfile_IpFamilies_Values = map[string]ContainerServiceNetworkProfile_IpFamilies{
	"ipv4": ContainerServiceNetworkProfile_IpFamilies_IPv4,
	"ipv6": ContainerServiceNetworkProfile_IpFamilies_IPv6,
}

type ContainerServiceNetworkProfile_IpFamilies_STATUS string

const (
	ContainerServiceNetworkProfile_IpFamilies_STATUS_IPv4 = ContainerServiceNetworkProfile_IpFamilies_STATUS("IPv4")
	ContainerServiceNetworkProfile_IpFamilies_STATUS_IPv6 = ContainerServiceNetworkProfile_IpFamilies_STATUS("IPv6")
)

// Mapping from string to ContainerServiceNetworkProfile_IpFamilies_STATUS
var containerServiceNetworkProfile_IpFamilies_STATUS_Values = map[string]ContainerServiceNetworkProfile_IpFamilies_STATUS{
	"ipv4": ContainerServiceNetworkProfile_IpFamilies_STATUS_IPv4,
	"ipv6": ContainerServiceNetworkProfile_IpFamilies_STATUS_IPv6,
}

// +kubebuilder:validation:Enum={"basic","standard"}
type ContainerServiceNetworkProfile_LoadBalancerSku string

const (
	ContainerServiceNetworkProfile_LoadBalancerSku_Basic    = ContainerServiceNetworkProfile_LoadBalancerSku("basic")
	ContainerServiceNetworkProfile_LoadBalancerSku_Standard = ContainerServiceNetworkProfile_LoadBalancerSku("standard")
)

// Mapping from string to ContainerServiceNetworkProfile_LoadBalancerSku
var containerServiceNetworkProfile_LoadBalancerSku_Values = map[string]ContainerServiceNetworkProfile_LoadBalancerSku{
	"basic":    ContainerServiceNetworkProfile_LoadBalancerSku_Basic,
	"standard": ContainerServiceNetworkProfile_LoadBalancerSku_Standard,
}

type ContainerServiceNetworkProfile_LoadBalancerSku_STATUS string

const (
	ContainerServiceNetworkProfile_LoadBalancerSku_STATUS_Basic    = ContainerServiceNetworkProfile_LoadBalancerSku_STATUS("basic")
	ContainerServiceNetworkProfile_LoadBalancerSku_STATUS_Standard = ContainerServiceNetworkProfile_LoadBalancerSku_STATUS("standard")
)

// Mapping from string to ContainerServiceNetworkProfile_LoadBalancerSku_STATUS
var containerServiceNetworkProfile_LoadBalancerSku_STATUS_Values = map[string]ContainerServiceNetworkProfile_LoadBalancerSku_STATUS{
	"basic":    ContainerServiceNetworkProfile_LoadBalancerSku_STATUS_Basic,
	"standard": ContainerServiceNetworkProfile_LoadBalancerSku_STATUS_Standard,
}

// +kubebuilder:validation:Enum={"azure","cilium"}
type ContainerServiceNetworkProfile_NetworkDataplane string

const (
	ContainerServiceNetworkProfile_NetworkDataplane_Azure  = ContainerServiceNetworkProfile_NetworkDataplane("azure")
	ContainerServiceNetworkProfile_NetworkDataplane_Cilium = ContainerServiceNetworkProfile_NetworkDataplane("cilium")
)

// Mapping from string to ContainerServiceNetworkProfile_NetworkDataplane
var containerServiceNetworkProfile_NetworkDataplane_Values = map[string]ContainerServiceNetworkProfile_NetworkDataplane{
	"azure":  ContainerServiceNetworkProfile_NetworkDataplane_Azure,
	"cilium": ContainerServiceNetworkProfile_NetworkDataplane_Cilium,
}

type ContainerServiceNetworkProfile_NetworkDataplane_STATUS string

const (
	ContainerServiceNetworkProfile_NetworkDataplane_STATUS_Azure  = ContainerServiceNetworkProfile_NetworkDataplane_STATUS("azure")
	ContainerServiceNetworkProfile_NetworkDataplane_STATUS_Cilium = ContainerServiceNetworkProfile_NetworkDataplane_STATUS("cilium")
)

// Mapping from string to ContainerServiceNetworkProfile_NetworkDataplane_STATUS
var containerServiceNetworkProfile_NetworkDataplane_STATUS_Values = map[string]ContainerServiceNetworkProfile_NetworkDataplane_STATUS{
	"azure":  ContainerServiceNetworkProfile_NetworkDataplane_STATUS_Azure,
	"cilium": ContainerServiceNetworkProfile_NetworkDataplane_STATUS_Cilium,
}

// +kubebuilder:validation:Enum={"bridge","transparent"}
type ContainerServiceNetworkProfile_NetworkMode string

const (
	ContainerServiceNetworkProfile_NetworkMode_Bridge      = ContainerServiceNetworkProfile_NetworkMode("bridge")
	ContainerServiceNetworkProfile_NetworkMode_Transparent = ContainerServiceNetworkProfile_NetworkMode("transparent")
)

// Mapping from string to ContainerServiceNetworkProfile_NetworkMode
var containerServiceNetworkProfile_NetworkMode_Values = map[string]ContainerServiceNetworkProfile_NetworkMode{
	"bridge":      ContainerServiceNetworkProfile_NetworkMode_Bridge,
	"transparent": ContainerServiceNetworkProfile_NetworkMode_Transparent,
}

type ContainerServiceNetworkProfile_NetworkMode_STATUS string

const (
	ContainerServiceNetworkProfile_NetworkMode_STATUS_Bridge      = ContainerServiceNetworkProfile_NetworkMode_STATUS("bridge")
	ContainerServiceNetworkProfile_NetworkMode_STATUS_Transparent = ContainerServiceNetworkProfile_NetworkMode_STATUS("transparent")
)

// Mapping from string to ContainerServiceNetworkProfile_NetworkMode_STATUS
var containerServiceNetworkProfile_NetworkMode_STATUS_Values = map[string]ContainerServiceNetworkProfile_NetworkMode_STATUS{
	"bridge":      ContainerServiceNetworkProfile_NetworkMode_STATUS_Bridge,
	"transparent": ContainerServiceNetworkProfile_NetworkMode_STATUS_Transparent,
}

type ContainerServiceNetworkProfile_NetworkPlugin_STATUS string

const (
	ContainerServiceNetworkProfile_NetworkPlugin_STATUS_Azure   = ContainerServiceNetworkProfile_NetworkPlugin_STATUS("azure")
	ContainerServiceNetworkProfile_NetworkPlugin_STATUS_Kubenet = ContainerServiceNetworkProfile_NetworkPlugin_STATUS("kubenet")
	ContainerServiceNetworkProfile_NetworkPlugin_STATUS_None    = ContainerServiceNetworkProfile_NetworkPlugin_STATUS("none")
)

// Mapping from string to ContainerServiceNetworkProfile_NetworkPlugin_STATUS
var containerServiceNetworkProfile_NetworkPlugin_STATUS_Values = map[string]ContainerServiceNetworkProfile_NetworkPlugin_STATUS{
	"azure":   ContainerServiceNetworkProfile_NetworkPlugin_STATUS_Azure,
	"kubenet": ContainerServiceNetworkProfile_NetworkPlugin_STATUS_Kubenet,
	"none":    ContainerServiceNetworkProfile_NetworkPlugin_STATUS_None,
}

// +kubebuilder:validation:Enum={"overlay"}
type ContainerServiceNetworkProfile_NetworkPluginMode string

const ContainerServiceNetworkProfile_NetworkPluginMode_Overlay = ContainerServiceNetworkProfile_NetworkPluginMode("overlay")

// Mapping from string to ContainerServiceNetworkProfile_NetworkPluginMode
var containerServiceNetworkProfile_NetworkPluginMode_Values = map[string]ContainerServiceNetworkProfile_NetworkPluginMode{
	"overlay": ContainerServiceNetworkProfile_NetworkPluginMode_Overlay,
}

type ContainerServiceNetworkProfile_NetworkPluginMode_STATUS string

const ContainerServiceNetworkProfile_NetworkPluginMode_STATUS_Overlay = ContainerServiceNetworkProfile_NetworkPluginMode_STATUS("overlay")

// Mapping from string to ContainerServiceNetworkProfile_NetworkPluginMode_STATUS
var containerServiceNetworkProfile_NetworkPluginMode_STATUS_Values = map[string]ContainerServiceNetworkProfile_NetworkPluginMode_STATUS{
	"overlay": ContainerServiceNetworkProfile_NetworkPluginMode_STATUS_Overlay,
}

// +kubebuilder:validation:Enum={"azure","calico","cilium"}
type ContainerServiceNetworkProfile_NetworkPolicy string

const (
	ContainerServiceNetworkProfile_NetworkPolicy_Azure  = ContainerServiceNetworkProfile_NetworkPolicy("azure")
	ContainerServiceNetworkProfile_NetworkPolicy_Calico = ContainerServiceNetworkProfile_NetworkPolicy("calico")
	ContainerServiceNetworkProfile_NetworkPolicy_Cilium = ContainerServiceNetworkProfile_NetworkPolicy("cilium")
)

// Mapping from string to ContainerServiceNetworkProfile_NetworkPolicy
var containerServiceNetworkProfile_NetworkPolicy_Values = map[string]ContainerServiceNetworkProfile_NetworkPolicy{
	"azure":  ContainerServiceNetworkProfile_NetworkPolicy_Azure,
	"calico": ContainerServiceNetworkProfile_NetworkPolicy_Calico,
	"cilium": ContainerServiceNetworkProfile_NetworkPolicy_Cilium,
}

type ContainerServiceNetworkProfile_NetworkPolicy_STATUS string

const (
	ContainerServiceNetworkProfile_NetworkPolicy_STATUS_Azure  = ContainerServiceNetworkProfile_NetworkPolicy_STATUS("azure")
	ContainerServiceNetworkProfile_NetworkPolicy_STATUS_Calico = ContainerServiceNetworkProfile_NetworkPolicy_STATUS("calico")
	ContainerServiceNetworkProfile_NetworkPolicy_STATUS_Cilium = ContainerServiceNetworkProfile_NetworkPolicy_STATUS("cilium")
)

// Mapping from string to ContainerServiceNetworkProfile_NetworkPolicy_STATUS
var containerServiceNetworkProfile_NetworkPolicy_STATUS_Values = map[string]ContainerServiceNetworkProfile_NetworkPolicy_STATUS{
	"azure":  ContainerServiceNetworkProfile_NetworkPolicy_STATUS_Azure,
	"calico": ContainerServiceNetworkProfile_NetworkPolicy_STATUS_Calico,
	"cilium": ContainerServiceNetworkProfile_NetworkPolicy_STATUS_Cilium,
}

// +kubebuilder:validation:Enum={"loadBalancer","managedNATGateway","userAssignedNATGateway","userDefinedRouting"}
type ContainerServiceNetworkProfile_OutboundType string

const (
	ContainerServiceNetworkProfile_OutboundType_LoadBalancer           = ContainerServiceNetworkProfile_OutboundType("loadBalancer")
	ContainerServiceNetworkProfile_OutboundType_ManagedNATGateway      = ContainerServiceNetworkProfile_OutboundType("managedNATGateway")
	ContainerServiceNetworkProfile_OutboundType_UserAssignedNATGateway = ContainerServiceNetworkProfile_OutboundType("userAssignedNATGateway")
	ContainerServiceNetworkProfile_OutboundType_UserDefinedRouting     = ContainerServiceNetworkProfile_OutboundType("userDefinedRouting")
)

// Mapping from string to ContainerServiceNetworkProfile_OutboundType
var containerServiceNetworkProfile_OutboundType_Values = map[string]ContainerServiceNetworkProfile_OutboundType{
	"loadbalancer":           ContainerServiceNetworkProfile_OutboundType_LoadBalancer,
	"managednatgateway":      ContainerServiceNetworkProfile_OutboundType_ManagedNATGateway,
	"userassignednatgateway": ContainerServiceNetworkProfile_OutboundType_UserAssignedNATGateway,
	"userdefinedrouting":     ContainerServiceNetworkProfile_OutboundType_UserDefinedRouting,
}

type ContainerServiceNetworkProfile_OutboundType_STATUS string

const (
	ContainerServiceNetworkProfile_OutboundType_STATUS_LoadBalancer           = ContainerServiceNetworkProfile_OutboundType_STATUS("loadBalancer")
	ContainerServiceNetworkProfile_OutboundType_STATUS_ManagedNATGateway      = ContainerServiceNetworkProfile_OutboundType_STATUS("managedNATGateway")
	ContainerServiceNetworkProfile_OutboundType_STATUS_UserAssignedNATGateway = ContainerServiceNetworkProfile_OutboundType_STATUS("userAssignedNATGateway")
	ContainerServiceNetworkProfile_OutboundType_STATUS_UserDefinedRouting     = ContainerServiceNetworkProfile_OutboundType_STATUS("userDefinedRouting")
)

// Mapping from string to ContainerServiceNetworkProfile_OutboundType_STATUS
var containerServiceNetworkProfile_OutboundType_STATUS_Values = map[string]ContainerServiceNetworkProfile_OutboundType_STATUS{
	"loadbalancer":           ContainerServiceNetworkProfile_OutboundType_STATUS_LoadBalancer,
	"managednatgateway":      ContainerServiceNetworkProfile_OutboundType_STATUS_ManagedNATGateway,
	"userassignednatgateway": ContainerServiceNetworkProfile_OutboundType_STATUS_UserAssignedNATGateway,
	"userdefinedrouting":     ContainerServiceNetworkProfile_OutboundType_STATUS_UserDefinedRouting,
}

// SSH configuration for Linux-based VMs running on Azure.
type ContainerServiceSshConfiguration struct {
	// +kubebuilder:validation:Required
	// PublicKeys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified.
	PublicKeys []ContainerServiceSshPublicKey `json:"publicKeys,omitempty"`
}

var _ genruntime.ARMTransformer = &ContainerServiceSshConfiguration{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (configuration *ContainerServiceSshConfiguration) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if configuration == nil {
		return nil, nil
	}
	result := &arm.ContainerServiceSshConfiguration{}

	// Set property "PublicKeys":
	for _, item := range configuration.PublicKeys {
		item_ARM, err := item.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		result.PublicKeys = append(result.PublicKeys, *item_ARM.(*arm.ContainerServiceSshPublicKey))
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (configuration *ContainerServiceSshConfiguration) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ContainerServiceSshConfiguration{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (configuration *ContainerServiceSshConfiguration) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ContainerServiceSshConfiguration)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ContainerServiceSshConfiguration, got %T", armInput)
	}

	// Set property "PublicKeys":
	for _, item := range typedInput.PublicKeys {
		var item1 ContainerServiceSshPublicKey
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		configuration.PublicKeys = append(configuration.PublicKeys, item1)
	}

	// No error
	return nil
}

// AssignProperties_From_ContainerServiceSshConfiguration populates our ContainerServiceSshConfiguration from the provided source ContainerServiceSshConfiguration
func (configuration *ContainerServiceSshConfiguration) AssignProperties_From_ContainerServiceSshConfiguration(source *storage.ContainerServiceSshConfiguration) error {

	// PublicKeys
	if source.PublicKeys != nil {
		publicKeyList := make([]ContainerServiceSshPublicKey, len(source.PublicKeys))
		for publicKeyIndex, publicKeyItem := range source.PublicKeys {
			var publicKey ContainerServiceSshPublicKey
			err := publicKey.AssignProperties_From_ContainerServiceSshPublicKey(&publicKeyItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ContainerServiceSshPublicKey() to populate field PublicKeys")
			}
			publicKeyList[publicKeyIndex] = publicKey
		}
		configuration.PublicKeys = publicKeyList
	} else {
		configuration.PublicKeys = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ContainerServiceSshConfiguration populates the provided destination ContainerServiceSshConfiguration from our ContainerServiceSshConfiguration
func (configuration *ContainerServiceSshConfiguration) AssignProperties_To_ContainerServiceSshConfiguration(destination *storage.ContainerServiceSshConfiguration) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// PublicKeys
	if configuration.PublicKeys != nil {
		publicKeyList := make([]storage.ContainerServiceSshPublicKey, len(configuration.PublicKeys))
		for publicKeyIndex, publicKeyItem := range configuration.PublicKeys {
			var publicKey storage.ContainerServiceSshPublicKey
			err := publicKeyItem.AssignProperties_To_ContainerServiceSshPublicKey(&publicKey)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ContainerServiceSshPublicKey() to populate field PublicKeys")
			}
			publicKeyList[publicKeyIndex] = publicKey
		}
		destination.PublicKeys = publicKeyList
	} else {
		destination.PublicKeys = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// SSH configuration for Linux-based VMs running on Azure.
type ContainerServiceSshConfiguration_STATUS struct {
	// PublicKeys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified.
	PublicKeys []ContainerServiceSshPublicKey_STATUS `json:"publicKeys,omitempty"`
}

var _ genruntime.FromARMConverter = &ContainerServiceSshConfiguration_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (configuration *ContainerServiceSshConfiguration_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ContainerServiceSshConfiguration_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (configuration *ContainerServiceSshConfiguration_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ContainerServiceSshConfiguration_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ContainerServiceSshConfiguration_STATUS, got %T", armInput)
	}

	// Set property "PublicKeys":
	for _, item := range typedInput.PublicKeys {
		var item1 ContainerServiceSshPublicKey_STATUS
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		configuration.PublicKeys = append(configuration.PublicKeys, item1)
	}

	// No error
	return nil
}

// AssignProperties_From_ContainerServiceSshConfiguration_STATUS populates our ContainerServiceSshConfiguration_STATUS from the provided source ContainerServiceSshConfiguration_STATUS
func (configuration *ContainerServiceSshConfiguration_STATUS) AssignProperties_From_ContainerServiceSshConfiguration_STATUS(source *storage.ContainerServiceSshConfiguration_STATUS) error {

	// PublicKeys
	if source.PublicKeys != nil {
		publicKeyList := make([]ContainerServiceSshPublicKey_STATUS, len(source.PublicKeys))
		for publicKeyIndex, publicKeyItem := range source.PublicKeys {
			var publicKey ContainerServiceSshPublicKey_STATUS
			err := publicKey.AssignProperties_From_ContainerServiceSshPublicKey_STATUS(&publicKeyItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ContainerServiceSshPublicKey_STATUS() to populate field PublicKeys")
			}
			publicKeyList[publicKeyIndex] = publicKey
		}
		configuration.PublicKeys = publicKeyList
	} else {
		configuration.PublicKeys = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ContainerServiceSshConfiguration_STATUS populates the provided destination ContainerServiceSshConfiguration_STATUS from our ContainerServiceSshConfiguration_STATUS
func (configuration *ContainerServiceSshConfiguration_STATUS) AssignProperties_To_ContainerServiceSshConfiguration_STATUS(destination *storage.ContainerServiceSshConfiguration_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// PublicKeys
	if configuration.PublicKeys != nil {
		publicKeyList := make([]storage.ContainerServiceSshPublicKey_STATUS, len(configuration.PublicKeys))
		for publicKeyIndex, publicKeyItem := range configuration.PublicKeys {
			var publicKey storage.ContainerServiceSshPublicKey_STATUS
			err := publicKeyItem.AssignProperties_To_ContainerServiceSshPublicKey_STATUS(&publicKey)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ContainerServiceSshPublicKey_STATUS() to populate field PublicKeys")
			}
			publicKeyList[publicKeyIndex] = publicKey
		}
		destination.PublicKeys = publicKeyList
	} else {
		destination.PublicKeys = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Delegated resource properties - internal use only.
type DelegatedResource struct {
	// Location: The source resource location - internal use only.
	Location *string `json:"location,omitempty"`

	// ReferralResource: The delegation id of the referral delegation (optional) - internal use only.
	ReferralResource *string `json:"referralResource,omitempty"`

	// ResourceReference: The ARM resource id of the delegated resource - internal use only.
	ResourceReference *genruntime.ResourceReference `armReference:"ResourceId" json:"resourceReference,omitempty"`

	// +kubebuilder:validation:Pattern="^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"
	// TenantId: The tenant id of the delegated resource - internal use only.
	TenantId *string `json:"tenantId,omitempty"`
}

var _ genruntime.ARMTransformer = &DelegatedResource{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (resource *DelegatedResource) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if resource == nil {
		return nil, nil
	}
	result := &arm.DelegatedResource{}

	// Set property "Location":
	if resource.Location != nil {
		location := *resource.Location
		result.Location = &location
	}

	// Set property "ReferralResource":
	if resource.ReferralResource != nil {
		referralResource := *resource.ReferralResource
		result.ReferralResource = &referralResource
	}

	// Set property "ResourceId":
	if resource.ResourceReference != nil {
		resourceReferenceARMID, err := resolved.ResolvedReferences.Lookup(*resource.ResourceReference)
		if err != nil {
			return nil, err
		}
		resourceReference := resourceReferenceARMID
		result.ResourceId = &resourceReference
	}

	// Set property "TenantId":
	if resource.TenantId != nil {
		tenantId := *resource.TenantId
		result.TenantId = &tenantId
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (resource *DelegatedResource) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.DelegatedResource{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (resource *DelegatedResource) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.DelegatedResource)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.DelegatedResource, got %T", armInput)
	}

	// Set property "Location":
	if typedInput.Location != nil {
		location := *typedInput.Location
		resource.Location = &location
	}

	// Set property "ReferralResource":
	if typedInput.ReferralResource != nil {
		referralResource := *typedInput.ReferralResource
		resource.ReferralResource = &referralResource
	}

	// no assignment for property "ResourceReference"

	// Set property "TenantId":
	if typedInput.TenantId != nil {
		tenantId := *typedInput.TenantId
		resource.TenantId = &tenantId
	}

	// No error
	return nil
}

// AssignProperties_From_DelegatedResource populates our DelegatedResource from the provided source DelegatedResource
func (resource *DelegatedResource) AssignProperties_From_DelegatedResource(source *storage.DelegatedResource) error {

	// Location
	resource.Location = genruntime.ClonePointerToString(source.Location)

	// ReferralResource
	resource.ReferralResource = genruntime.ClonePointerToString(source.ReferralResource)

	// ResourceReference
	if source.ResourceReference != nil {
		resourceReference := source.ResourceReference.Copy()
		resource.ResourceReference = &resourceReference
	} else {
		resource.ResourceReference = nil
	}

	// TenantId
	resource.TenantId = genruntime.ClonePointerToString(source.TenantId)

	// No error
	return nil
}

// AssignProperties_To_DelegatedResource populates the provided destination DelegatedResource from our DelegatedResource
func (resource *DelegatedResource) AssignProperties_To_DelegatedResource(destination *storage.DelegatedResource) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Location
	destination.Location = genruntime.ClonePointerToString(resource.Location)

	// ReferralResource
	destination.ReferralResource = genruntime.ClonePointerToString(resource.ReferralResource)

	// ResourceReference
	if resource.ResourceReference != nil {
		resourceReference := resource.ResourceReference.Copy()
		destination.ResourceReference = &resourceReference
	} else {
		destination.ResourceReference = nil
	}

	// TenantId
	destination.TenantId = genruntime.ClonePointerToString(resource.TenantId)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Delegated resource properties - internal use only.
type DelegatedResource_STATUS struct {
	// Location: The source resource location - internal use only.
	Location *string `json:"location,omitempty"`

	// ReferralResource: The delegation id of the referral delegation (optional) - internal use only.
	ReferralResource *string `json:"referralResource,omitempty"`

	// ResourceId: The ARM resource id of the delegated resource - internal use only.
	ResourceId *string `json:"resourceId,omitempty"`

	// TenantId: The tenant id of the delegated resource - internal use only.
	TenantId *string `json:"tenantId,omitempty"`
}

var _ genruntime.FromARMConverter = &DelegatedResource_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (resource *DelegatedResource_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.DelegatedResource_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (resource *DelegatedResource_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.DelegatedResource_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.DelegatedResource_STATUS, got %T", armInput)
	}

	// Set property "Location":
	if typedInput.Location != nil {
		location := *typedInput.Location
		resource.Location = &location
	}

	// Set property "ReferralResource":
	if typedInput.ReferralResource != nil {
		referralResource := *typedInput.ReferralResource
		resource.ReferralResource = &referralResource
	}

	// Set property "ResourceId":
	if typedInput.ResourceId != nil {
		resourceId := *typedInput.ResourceId
		resource.ResourceId = &resourceId
	}

	// Set property "TenantId":
	if typedInput.TenantId != nil {
		tenantId := *typedInput.TenantId
		resource.TenantId = &tenantId
	}

	// No error
	return nil
}

// AssignProperties_From_DelegatedResource_STATUS populates our DelegatedResource_STATUS from the provided source DelegatedResource_STATUS
func (resource *DelegatedResource_STATUS) AssignProperties_From_DelegatedResource_STATUS(source *storage.DelegatedResource_STATUS) error {

	// Location
	resource.Location = genruntime.ClonePointerToString(source.Location)

	// ReferralResource
	resource.ReferralResource = genruntime.ClonePointerToString(source.ReferralResource)

	// ResourceId
	resource.ResourceId = genruntime.ClonePointerToString(source.ResourceId)

	// TenantId
	resource.TenantId = genruntime.ClonePointerToString(source.TenantId)

	// No error
	return nil
}

// AssignProperties_To_DelegatedResource_STATUS populates the provided destination DelegatedResource_STATUS from our DelegatedResource_STATUS
func (resource *DelegatedResource_STATUS) AssignProperties_To_DelegatedResource_STATUS(destination *storage.DelegatedResource_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Location
	destination.Location = genruntime.ClonePointerToString(resource.Location)

	// ReferralResource
	destination.ReferralResource = genruntime.ClonePointerToString(resource.ReferralResource)

	// ResourceId
	destination.ResourceId = genruntime.ClonePointerToString(resource.ResourceId)

	// TenantId
	destination.TenantId = genruntime.ClonePointerToString(resource.TenantId)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// The type of extendedLocation.
// +kubebuilder:validation:Enum={"EdgeZone"}
type ExtendedLocationType string

const ExtendedLocationType_EdgeZone = ExtendedLocationType("EdgeZone")

// Mapping from string to ExtendedLocationType
var extendedLocationType_Values = map[string]ExtendedLocationType{
	"edgezone": ExtendedLocationType_EdgeZone,
}

// The type of extendedLocation.
type ExtendedLocationType_STATUS string

const ExtendedLocationType_STATUS_EdgeZone = ExtendedLocationType_STATUS("EdgeZone")

// Mapping from string to ExtendedLocationType_STATUS
var extendedLocationType_STATUS_Values = map[string]ExtendedLocationType_STATUS{
	"edgezone": ExtendedLocationType_STATUS_EdgeZone,
}

// Istio service mesh configuration.
type IstioServiceMesh struct {
	// CertificateAuthority: Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin
	// certificates as described  here https://aka.ms/asm-plugin-ca
	CertificateAuthority *IstioCertificateAuthority `json:"certificateAuthority,omitempty"`

	// Components: Istio components configuration.
	Components *IstioComponents `json:"components,omitempty"`

	// +kubebuilder:validation:MaxItems=2
	// Revisions: The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value.
	// When canary upgrade is in progress, this can only hold two consecutive values. For more information, see:
	// https://learn.microsoft.com/en-us/azure/aks/istio-upgrade
	Revisions []string `json:"revisions,omitempty"`
}

var _ genruntime.ARMTransformer = &IstioServiceMesh{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (mesh *IstioServiceMesh) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if mesh == nil {
		return nil, nil
	}
	result := &arm.IstioServiceMesh{}

	// Set property "CertificateAuthority":
	if mesh.CertificateAuthority != nil {
		certificateAuthority_ARM, err := mesh.CertificateAuthority.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		certificateAuthority := *certificateAuthority_ARM.(*arm.IstioCertificateAuthority)
		result.CertificateAuthority = &certificateAuthority
	}

	// Set property "Components":
	if mesh.Components != nil {
		components_ARM, err := mesh.Components.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		components := *components_ARM.(*arm.IstioComponents)
		result.Components = &components
	}

	// Set property "Revisions":
	for _, item := range mesh.Revisions {
		result.Revisions = append(result.Revisions, item)
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (mesh *IstioServiceMesh) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.IstioServiceMesh{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (mesh *IstioServiceMesh) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.IstioServiceMesh)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IstioServiceMesh, got %T", armInput)
	}

	// Set property "CertificateAuthority":
	if typedInput.CertificateAuthority != nil {
		var certificateAuthority1 IstioCertificateAuthority
		err := certificateAuthority1.PopulateFromARM(owner, *typedInput.CertificateAuthority)
		if err != nil {
			return err
		}
		certificateAuthority := certificateAuthority1
		mesh.CertificateAuthority = &certificateAuthority
	}

	// Set property "Components":
	if typedInput.Components != nil {
		var components1 IstioComponents
		err := components1.PopulateFromARM(owner, *typedInput.Components)
		if err != nil {
			return err
		}
		components := components1
		mesh.Components = &components
	}

	// Set property "Revisions":
	for _, item := range typedInput.Revisions {
		mesh.Revisions = append(mesh.Revisions, item)
	}

	// No error
	return nil
}

// AssignProperties_From_IstioServiceMesh populates our IstioServiceMesh from the provided source IstioServiceMesh
func (mesh *IstioServiceMesh) AssignProperties_From_IstioServiceMesh(source *storage.IstioServiceMesh) error {

	// CertificateAuthority
	if source.CertificateAuthority != nil {
		var certificateAuthority IstioCertificateAuthority
		err := certificateAuthority.AssignProperties_From_IstioCertificateAuthority(source.CertificateAuthority)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_IstioCertificateAuthority() to populate field CertificateAuthority")
		}
		mesh.CertificateAuthority = &certificateAuthority
	} else {
		mesh.CertificateAuthority = nil
	}

	// Components
	if source.Components != nil {
		var component IstioComponents
		err := component.AssignProperties_From_IstioComponents(source.Components)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_IstioComponents() to populate field Components")
		}
		mesh.Components = &component
	} else {
		mesh.Components = nil
	}

	// Revisions
	mesh.Revisions = genruntime.CloneSliceOfString(source.Revisions)

	// No error
	return nil
}

// AssignProperties_To_IstioServiceMesh populates the provided destination IstioServiceMesh from our IstioServiceMesh
func (mesh *IstioServiceMesh) AssignProperties_To_IstioServiceMesh(destination *storage.IstioServiceMesh) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// CertificateAuthority
	if mesh.CertificateAuthority != nil {
		var certificateAuthority storage.IstioCertificateAuthority
		err := mesh.CertificateAuthority.AssignProperties_To_IstioCertificateAuthority(&certificateAuthority)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_IstioCertificateAuthority() to populate field CertificateAuthority")
		}
		destination.CertificateAuthority = &certificateAuthority
	} else {
		destination.CertificateAuthority = nil
	}

	// Components
	if mesh.Components != nil {
		var component storage.IstioComponents
		err := mesh.Components.AssignProperties_To_IstioComponents(&component)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_IstioComponents() to populate field Components")
		}
		destination.Components = &component
	} else {
		destination.Components = nil
	}

	// Revisions
	destination.Revisions = genruntime.CloneSliceOfString(mesh.Revisions)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Istio service mesh configuration.
type IstioServiceMesh_STATUS struct {
	// CertificateAuthority: Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin
	// certificates as described  here https://aka.ms/asm-plugin-ca
	CertificateAuthority *IstioCertificateAuthority_STATUS `json:"certificateAuthority,omitempty"`

	// Components: Istio components configuration.
	Components *IstioComponents_STATUS `json:"components,omitempty"`

	// Revisions: The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value.
	// When canary upgrade is in progress, this can only hold two consecutive values. For more information, see:
	// https://learn.microsoft.com/en-us/azure/aks/istio-upgrade
	Revisions []string `json:"revisions,omitempty"`
}

var _ genruntime.FromARMConverter = &IstioServiceMesh_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (mesh *IstioServiceMesh_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.IstioServiceMesh_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (mesh *IstioServiceMesh_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.IstioServiceMesh_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IstioServiceMesh_STATUS, got %T", armInput)
	}

	// Set property "CertificateAuthority":
	if typedInput.CertificateAuthority != nil {
		var certificateAuthority1 IstioCertificateAuthority_STATUS
		err := certificateAuthority1.PopulateFromARM(owner, *typedInput.CertificateAuthority)
		if err != nil {
			return err
		}
		certificateAuthority := certificateAuthority1
		mesh.CertificateAuthority = &certificateAuthority
	}

	// Set property "Components":
	if typedInput.Components != nil {
		var components1 IstioComponents_STATUS
		err := components1.PopulateFromARM(owner, *typedInput.Components)
		if err != nil {
			return err
		}
		components := components1
		mesh.Components = &components
	}

	// Set property "Revisions":
	for _, item := range typedInput.Revisions {
		mesh.Revisions = append(mesh.Revisions, item)
	}

	// No error
	return nil
}

// AssignProperties_From_IstioServiceMesh_STATUS populates our IstioServiceMesh_STATUS from the provided source IstioServiceMesh_STATUS
func (mesh *IstioServiceMesh_STATUS) AssignProperties_From_IstioServiceMesh_STATUS(source *storage.IstioServiceMesh_STATUS) error {

	// CertificateAuthority
	if source.CertificateAuthority != nil {
		var certificateAuthority IstioCertificateAuthority_STATUS
		err := certificateAuthority.AssignProperties_From_IstioCertificateAuthority_STATUS(source.CertificateAuthority)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_IstioCertificateAuthority_STATUS() to populate field CertificateAuthority")
		}
		mesh.CertificateAuthority = &certificateAuthority
	} else {
		mesh.CertificateAuthority = nil
	}

	// Components
	if source.Components != nil {
		var component IstioComponents_STATUS
		err := component.AssignProperties_From_IstioComponents_STATUS(source.Components)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_IstioComponents_STATUS() to populate field Components")
		}
		mesh.Components = &component
	} else {
		mesh.Components = nil
	}

	// Revisions
	mesh.Revisions = genruntime.CloneSliceOfString(source.Revisions)

	// No error
	return nil
}

// AssignProperties_To_IstioServiceMesh_STATUS populates the provided destination IstioServiceMesh_STATUS from our IstioServiceMesh_STATUS
func (mesh *IstioServiceMesh_STATUS) AssignProperties_To_IstioServiceMesh_STATUS(destination *storage.IstioServiceMesh_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// CertificateAuthority
	if mesh.CertificateAuthority != nil {
		var certificateAuthority storage.IstioCertificateAuthority_STATUS
		err := mesh.CertificateAuthority.AssignProperties_To_IstioCertificateAuthority_STATUS(&certificateAuthority)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_IstioCertificateAuthority_STATUS() to populate field CertificateAuthority")
		}
		destination.CertificateAuthority = &certificateAuthority
	} else {
		destination.CertificateAuthority = nil
	}

	// Components
	if mesh.Components != nil {
		var component storage.IstioComponents_STATUS
		err := mesh.Components.AssignProperties_To_IstioComponents_STATUS(&component)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_IstioComponents_STATUS() to populate field Components")
		}
		destination.Components = &component
	} else {
		destination.Components = nil
	}

	// Revisions
	destination.Revisions = genruntime.CloneSliceOfString(mesh.Revisions)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"NodeImage","None","Unmanaged"}
type ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel string

const (
	ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_NodeImage = ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel("NodeImage")
	ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_None      = ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel("None")
	ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_Unmanaged = ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel("Unmanaged")
)

// Mapping from string to ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel
var managedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_Values = map[string]ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel{
	"nodeimage": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_NodeImage,
	"none":      ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_None,
	"unmanaged": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_Unmanaged,
}

type ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS string

const (
	ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_NodeImage = ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS("NodeImage")
	ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_None      = ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS("None")
	ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_Unmanaged = ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS("Unmanaged")
)

// Mapping from string to ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS
var managedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_Values = map[string]ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS{
	"nodeimage": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_NodeImage,
	"none":      ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_None,
	"unmanaged": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_Unmanaged,
}

// +kubebuilder:validation:Enum={"node-image","none","patch","rapid","stable"}
type ManagedClusterAutoUpgradeProfile_UpgradeChannel string

const (
	ManagedClusterAutoUpgradeProfile_UpgradeChannel_NodeImage = ManagedClusterAutoUpgradeProfile_UpgradeChannel("node-image")
	ManagedClusterAutoUpgradeProfile_UpgradeChannel_None      = ManagedClusterAutoUpgradeProfile_UpgradeChannel("none")
	ManagedClusterAutoUpgradeProfile_UpgradeChannel_Patch     = ManagedClusterAutoUpgradeProfile_UpgradeChannel("patch")
	ManagedClusterAutoUpgradeProfile_UpgradeChannel_Rapid     = ManagedClusterAutoUpgradeProfile_UpgradeChannel("rapid")
	ManagedClusterAutoUpgradeProfile_UpgradeChannel_Stable    = ManagedClusterAutoUpgradeProfile_UpgradeChannel("stable")
)

// Mapping from string to ManagedClusterAutoUpgradeProfile_UpgradeChannel
var managedClusterAutoUpgradeProfile_UpgradeChannel_Values = map[string]ManagedClusterAutoUpgradeProfile_UpgradeChannel{
	"node-image": ManagedClusterAutoUpgradeProfile_UpgradeChannel_NodeImage,
	"none":       ManagedClusterAutoUpgradeProfile_UpgradeChannel_None,
	"patch":      ManagedClusterAutoUpgradeProfile_UpgradeChannel_Patch,
	"rapid":      ManagedClusterAutoUpgradeProfile_UpgradeChannel_Rapid,
	"stable":     ManagedClusterAutoUpgradeProfile_UpgradeChannel_Stable,
}

type ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS string

const (
	ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_NodeImage = ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS("node-image")
	ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_None      = ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS("none")
	ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Patch     = ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS("patch")
	ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Rapid     = ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS("rapid")
	ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Stable    = ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS("stable")
)

// Mapping from string to ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS
var managedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Values = map[string]ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS{
	"node-image": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_NodeImage,
	"none":       ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_None,
	"patch":      ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Patch,
	"rapid":      ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Rapid,
	"stable":     ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Stable,
}

// Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes
// infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See
// aka.ms/AzureManagedPrometheus for an overview.
type ManagedClusterAzureMonitorProfileMetrics struct {
	// +kubebuilder:validation:Required
	// Enabled: Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See
	// aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling.
	Enabled *bool `json:"enabled,omitempty"`

	// KubeStateMetrics: Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the
	//  kube-state-metrics pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for
	// details.
	KubeStateMetrics *ManagedClusterAzureMonitorProfileKubeStateMetrics `json:"kubeStateMetrics,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterAzureMonitorProfileMetrics{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (metrics *ManagedClusterAzureMonitorProfileMetrics) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if metrics == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterAzureMonitorProfileMetrics{}

	// Set property "Enabled":
	if metrics.Enabled != nil {
		enabled := *metrics.Enabled
		result.Enabled = &enabled
	}

	// Set property "KubeStateMetrics":
	if metrics.KubeStateMetrics != nil {
		kubeStateMetrics_ARM, err := metrics.KubeStateMetrics.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		kubeStateMetrics := *kubeStateMetrics_ARM.(*arm.ManagedClusterAzureMonitorProfileKubeStateMetrics)
		result.KubeStateMetrics = &kubeStateMetrics
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (metrics *ManagedClusterAzureMonitorProfileMetrics) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterAzureMonitorProfileMetrics{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (metrics *ManagedClusterAzureMonitorProfileMetrics) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterAzureMonitorProfileMetrics)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterAzureMonitorProfileMetrics, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		metrics.Enabled = &enabled
	}

	// Set property "KubeStateMetrics":
	if typedInput.KubeStateMetrics != nil {
		var kubeStateMetrics1 ManagedClusterAzureMonitorProfileKubeStateMetrics
		err := kubeStateMetrics1.PopulateFromARM(owner, *typedInput.KubeStateMetrics)
		if err != nil {
			return err
		}
		kubeStateMetrics := kubeStateMetrics1
		metrics.KubeStateMetrics = &kubeStateMetrics
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterAzureMonitorProfileMetrics populates our ManagedClusterAzureMonitorProfileMetrics from the provided source ManagedClusterAzureMonitorProfileMetrics
func (metrics *ManagedClusterAzureMonitorProfileMetrics) AssignProperties_From_ManagedClusterAzureMonitorProfileMetrics(source *storage.ManagedClusterAzureMonitorProfileMetrics) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		metrics.Enabled = &enabled
	} else {
		metrics.Enabled = nil
	}

	// KubeStateMetrics
	if source.KubeStateMetrics != nil {
		var kubeStateMetric ManagedClusterAzureMonitorProfileKubeStateMetrics
		err := kubeStateMetric.AssignProperties_From_ManagedClusterAzureMonitorProfileKubeStateMetrics(source.KubeStateMetrics)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterAzureMonitorProfileKubeStateMetrics() to populate field KubeStateMetrics")
		}
		metrics.KubeStateMetrics = &kubeStateMetric
	} else {
		metrics.KubeStateMetrics = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterAzureMonitorProfileMetrics populates the provided destination ManagedClusterAzureMonitorProfileMetrics from our ManagedClusterAzureMonitorProfileMetrics
func (metrics *ManagedClusterAzureMonitorProfileMetrics) AssignProperties_To_ManagedClusterAzureMonitorProfileMetrics(destination *storage.ManagedClusterAzureMonitorProfileMetrics) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if metrics.Enabled != nil {
		enabled := *metrics.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

	// KubeStateMetrics
	if metrics.KubeStateMetrics != nil {
		var kubeStateMetric storage.ManagedClusterAzureMonitorProfileKubeStateMetrics
		err := metrics.KubeStateMetrics.AssignProperties_To_ManagedClusterAzureMonitorProfileKubeStateMetrics(&kubeStateMetric)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterAzureMonitorProfileKubeStateMetrics() to populate field KubeStateMetrics")
		}
		destination.KubeStateMetrics = &kubeStateMetric
	} else {
		destination.KubeStateMetrics = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes
// infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See
// aka.ms/AzureManagedPrometheus for an overview.
type ManagedClusterAzureMonitorProfileMetrics_STATUS struct {
	// Enabled: Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See
	// aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling.
	Enabled *bool `json:"enabled,omitempty"`

	// KubeStateMetrics: Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the
	//  kube-state-metrics pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for
	// details.
	KubeStateMetrics *ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS `json:"kubeStateMetrics,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterAzureMonitorProfileMetrics_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (metrics *ManagedClusterAzureMonitorProfileMetrics_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterAzureMonitorProfileMetrics_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (metrics *ManagedClusterAzureMonitorProfileMetrics_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterAzureMonitorProfileMetrics_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterAzureMonitorProfileMetrics_STATUS, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		metrics.Enabled = &enabled
	}

	// Set property "KubeStateMetrics":
	if typedInput.KubeStateMetrics != nil {
		var kubeStateMetrics1 ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS
		err := kubeStateMetrics1.PopulateFromARM(owner, *typedInput.KubeStateMetrics)
		if err != nil {
			return err
		}
		kubeStateMetrics := kubeStateMetrics1
		metrics.KubeStateMetrics = &kubeStateMetrics
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterAzureMonitorProfileMetrics_STATUS populates our ManagedClusterAzureMonitorProfileMetrics_STATUS from the provided source ManagedClusterAzureMonitorProfileMetrics_STATUS
func (metrics *ManagedClusterAzureMonitorProfileMetrics_STATUS) AssignProperties_From_ManagedClusterAzureMonitorProfileMetrics_STATUS(source *storage.ManagedClusterAzureMonitorProfileMetrics_STATUS) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		metrics.Enabled = &enabled
	} else {
		metrics.Enabled = nil
	}

	// KubeStateMetrics
	if source.KubeStateMetrics != nil {
		var kubeStateMetric ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS
		err := kubeStateMetric.AssignProperties_From_ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS(source.KubeStateMetrics)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS() to populate field KubeStateMetrics")
		}
		metrics.KubeStateMetrics = &kubeStateMetric
	} else {
		metrics.KubeStateMetrics = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterAzureMonitorProfileMetrics_STATUS populates the provided destination ManagedClusterAzureMonitorProfileMetrics_STATUS from our ManagedClusterAzureMonitorProfileMetrics_STATUS
func (metrics *ManagedClusterAzureMonitorProfileMetrics_STATUS) AssignProperties_To_ManagedClusterAzureMonitorProfileMetrics_STATUS(destination *storage.ManagedClusterAzureMonitorProfileMetrics_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if metrics.Enabled != nil {
		enabled := *metrics.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

	// KubeStateMetrics
	if metrics.KubeStateMetrics != nil {
		var kubeStateMetric storage.ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS
		err := metrics.KubeStateMetrics.AssignProperties_To_ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS(&kubeStateMetric)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS() to populate field KubeStateMetrics")
		}
		destination.KubeStateMetrics = &kubeStateMetric
	} else {
		destination.KubeStateMetrics = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"None","SystemAssigned","UserAssigned"}
type ManagedClusterIdentity_Type string

const (
	ManagedClusterIdentity_Type_None           = ManagedClusterIdentity_Type("None")
	ManagedClusterIdentity_Type_SystemAssigned = ManagedClusterIdentity_Type("SystemAssigned")
	ManagedClusterIdentity_Type_UserAssigned   = ManagedClusterIdentity_Type("UserAssigned")
)

// Mapping from string to ManagedClusterIdentity_Type
var managedClusterIdentity_Type_Values = map[string]ManagedClusterIdentity_Type{
	"none":           ManagedClusterIdentity_Type_None,
	"systemassigned": ManagedClusterIdentity_Type_SystemAssigned,
	"userassigned":   ManagedClusterIdentity_Type_UserAssigned,
}

type ManagedClusterIdentity_Type_STATUS string

const (
	ManagedClusterIdentity_Type_STATUS_None           = ManagedClusterIdentity_Type_STATUS("None")
	ManagedClusterIdentity_Type_STATUS_SystemAssigned = ManagedClusterIdentity_Type_STATUS("SystemAssigned")
	ManagedClusterIdentity_Type_STATUS_UserAssigned   = ManagedClusterIdentity_Type_STATUS("UserAssigned")
)

// Mapping from string to ManagedClusterIdentity_Type_STATUS
var managedClusterIdentity_Type_STATUS_Values = map[string]ManagedClusterIdentity_Type_STATUS{
	"none":           ManagedClusterIdentity_Type_STATUS_None,
	"systemassigned": ManagedClusterIdentity_Type_STATUS_SystemAssigned,
	"userassigned":   ManagedClusterIdentity_Type_STATUS_UserAssigned,
}

type ManagedClusterIdentity_UserAssignedIdentities_STATUS struct {
	// ClientId: The client id of user assigned identity.
	ClientId *string `json:"clientId,omitempty"`

	// PrincipalId: The principal id of user assigned identity.
	PrincipalId *string `json:"principalId,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterIdentity_UserAssignedIdentities_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (identities *ManagedClusterIdentity_UserAssignedIdentities_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterIdentity_UserAssignedIdentities_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (identities *ManagedClusterIdentity_UserAssignedIdentities_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterIdentity_UserAssignedIdentities_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterIdentity_UserAssignedIdentities_STATUS, got %T", armInput)
	}

	// Set property "ClientId":
	if typedInput.ClientId != nil {
		clientId := *typedInput.ClientId
		identities.ClientId = &clientId
	}

	// Set property "PrincipalId":
	if typedInput.PrincipalId != nil {
		principalId := *typedInput.PrincipalId
		identities.PrincipalId = &principalId
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterIdentity_UserAssignedIdentities_STATUS populates our ManagedClusterIdentity_UserAssignedIdentities_STATUS from the provided source ManagedClusterIdentity_UserAssignedIdentities_STATUS
func (identities *ManagedClusterIdentity_UserAssignedIdentities_STATUS) AssignProperties_From_ManagedClusterIdentity_UserAssignedIdentities_STATUS(source *storage.ManagedClusterIdentity_UserAssignedIdentities_STATUS) error {

	// ClientId
	identities.ClientId = genruntime.ClonePointerToString(source.ClientId)

	// PrincipalId
	identities.PrincipalId = genruntime.ClonePointerToString(source.PrincipalId)

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterIdentity_UserAssignedIdentities_STATUS populates the provided destination ManagedClusterIdentity_UserAssignedIdentities_STATUS from our ManagedClusterIdentity_UserAssignedIdentities_STATUS
func (identities *ManagedClusterIdentity_UserAssignedIdentities_STATUS) AssignProperties_To_ManagedClusterIdentity_UserAssignedIdentities_STATUS(destination *storage.ManagedClusterIdentity_UserAssignedIdentities_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// ClientId
	destination.ClientId = genruntime.ClonePointerToString(identities.ClientId)

	// PrincipalId
	destination.PrincipalId = genruntime.ClonePointerToString(identities.PrincipalId)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Profile of the managed cluster load balancer.
type ManagedClusterLoadBalancerProfile struct {
	// +kubebuilder:validation:Maximum=64000
	// +kubebuilder:validation:Minimum=0
	// AllocatedOutboundPorts: The desired number of allocated SNAT ports per VM. Allowed values are in the range of 0 to 64000
	// (inclusive). The default value is 0 which results in Azure dynamically allocating ports.
	AllocatedOutboundPorts *int `json:"allocatedOutboundPorts,omitempty"`

	// BackendPoolType: The type of the managed inbound Load Balancer BackendPool.
	BackendPoolType *ManagedClusterLoadBalancerProfile_BackendPoolType `json:"backendPoolType,omitempty"`

	// EffectiveOutboundIPs: The effective outbound IP resources of the cluster load balancer.
	EffectiveOutboundIPs []ResourceReference `json:"effectiveOutboundIPs,omitempty"`

	// EnableMultipleStandardLoadBalancers: Enable multiple standard load balancers per AKS cluster or not.
	EnableMultipleStandardLoadBalancers *bool `json:"enableMultipleStandardLoadBalancers,omitempty"`

	// +kubebuilder:validation:Maximum=120
	// +kubebuilder:validation:Minimum=4
	// IdleTimeoutInMinutes: Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120
	// (inclusive). The default value is 30 minutes.
	IdleTimeoutInMinutes *int `json:"idleTimeoutInMinutes,omitempty"`

	// ManagedOutboundIPs: Desired managed outbound IPs for the cluster load balancer.
	ManagedOutboundIPs *ManagedClusterLoadBalancerProfile_ManagedOutboundIPs `json:"managedOutboundIPs,omitempty"`

	// OutboundIPPrefixes: Desired outbound IP Prefix resources for the cluster load balancer.
	OutboundIPPrefixes *ManagedClusterLoadBalancerProfile_OutboundIPPrefixes `json:"outboundIPPrefixes,omitempty"`

	// OutboundIPs: Desired outbound IP resources for the cluster load balancer.
	OutboundIPs *ManagedClusterLoadBalancerProfile_OutboundIPs `json:"outboundIPs,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterLoadBalancerProfile{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (profile *ManagedClusterLoadBalancerProfile) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if profile == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterLoadBalancerProfile{}

	// Set property "AllocatedOutboundPorts":
	if profile.AllocatedOutboundPorts != nil {
		allocatedOutboundPorts := *profile.AllocatedOutboundPorts
		result.AllocatedOutboundPorts = &allocatedOutboundPorts
	}

	// Set property "BackendPoolType":
	if profile.BackendPoolType != nil {
		var temp string
		temp = string(*profile.BackendPoolType)
		backendPoolType := arm.ManagedClusterLoadBalancerProfile_BackendPoolType(temp)
		result.BackendPoolType = &backendPoolType
	}

	// Set property "EffectiveOutboundIPs":
	for _, item := range profile.EffectiveOutboundIPs {
		item_ARM, err := item.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		result.EffectiveOutboundIPs = append(result.EffectiveOutboundIPs, *item_ARM.(*arm.ResourceReference))
	}

	// Set property "EnableMultipleStandardLoadBalancers":
	if profile.EnableMultipleStandardLoadBalancers != nil {
		enableMultipleStandardLoadBalancers := *profile.EnableMultipleStandardLoadBalancers
		result.EnableMultipleStandardLoadBalancers = &enableMultipleStandardLoadBalancers
	}

	// Set property "IdleTimeoutInMinutes":
	if profile.IdleTimeoutInMinutes != nil {
		idleTimeoutInMinutes := *profile.IdleTimeoutInMinutes
		result.IdleTimeoutInMinutes = &idleTimeoutInMinutes
	}

	// Set property "ManagedOutboundIPs":
	if profile.ManagedOutboundIPs != nil {
		managedOutboundIPs_ARM, err := profile.ManagedOutboundIPs.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		managedOutboundIPs := *managedOutboundIPs_ARM.(*arm.ManagedClusterLoadBalancerProfile_ManagedOutboundIPs)
		result.ManagedOutboundIPs = &managedOutboundIPs
	}

	// Set property "OutboundIPPrefixes":
	if profile.OutboundIPPrefixes != nil {
		outboundIPPrefixes_ARM, err := profile.OutboundIPPrefixes.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		outboundIPPrefixes := *outboundIPPrefixes_ARM.(*arm.ManagedClusterLoadBalancerProfile_OutboundIPPrefixes)
		result.OutboundIPPrefixes = &outboundIPPrefixes
	}

	// Set property "OutboundIPs":
	if profile.OutboundIPs != nil {
		outboundIPs_ARM, err := profile.OutboundIPs.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		outboundIPs := *outboundIPs_ARM.(*arm.ManagedClusterLoadBalancerProfile_OutboundIPs)
		result.OutboundIPs = &outboundIPs
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *ManagedClusterLoadBalancerProfile) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterLoadBalancerProfile{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *ManagedClusterLoadBalancerProfile) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterLoadBalancerProfile)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterLoadBalancerProfile, got %T", armInput)
	}

	// Set property "AllocatedOutboundPorts":
	if typedInput.AllocatedOutboundPorts != nil {
		allocatedOutboundPorts := *typedInput.AllocatedOutboundPorts
		profile.AllocatedOutboundPorts = &allocatedOutboundPorts
	}

	// Set property "BackendPoolType":
	if typedInput.BackendPoolType != nil {
		var temp string
		temp = string(*typedInput.BackendPoolType)
		backendPoolType := ManagedClusterLoadBalancerProfile_BackendPoolType(temp)
		profile.BackendPoolType = &backendPoolType
	}

	// Set property "EffectiveOutboundIPs":
	for _, item := range typedInput.EffectiveOutboundIPs {
		var item1 ResourceReference
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		profile.EffectiveOutboundIPs = append(profile.EffectiveOutboundIPs, item1)
	}

	// Set property "EnableMultipleStandardLoadBalancers":
	if typedInput.EnableMultipleStandardLoadBalancers != nil {
		enableMultipleStandardLoadBalancers := *typedInput.EnableMultipleStandardLoadBalancers
		profile.EnableMultipleStandardLoadBalancers = &enableMultipleStandardLoadBalancers
	}

	// Set property "IdleTimeoutInMinutes":
	if typedInput.IdleTimeoutInMinutes != nil {
		idleTimeoutInMinutes := *typedInput.IdleTimeoutInMinutes
		profile.IdleTimeoutInMinutes = &idleTimeoutInMinutes
	}

	// Set property "ManagedOutboundIPs":
	if typedInput.ManagedOutboundIPs != nil {
		var managedOutboundIPs1 ManagedClusterLoadBalancerProfile_ManagedOutboundIPs
		err := managedOutboundIPs1.PopulateFromARM(owner, *typedInput.ManagedOutboundIPs)
		if err != nil {
			return err
		}
		managedOutboundIPs := managedOutboundIPs1
		profile.ManagedOutboundIPs = &managedOutboundIPs
	}

	// Set property "OutboundIPPrefixes":
	if typedInput.OutboundIPPrefixes != nil {
		var outboundIPPrefixes1 ManagedClusterLoadBalancerProfile_OutboundIPPrefixes
		err := outboundIPPrefixes1.PopulateFromARM(owner, *typedInput.OutboundIPPrefixes)
		if err != nil {
			return err
		}
		outboundIPPrefixes := outboundIPPrefixes1
		profile.OutboundIPPrefixes = &outboundIPPrefixes
	}

	// Set property "OutboundIPs":
	if typedInput.OutboundIPs != nil {
		var outboundIPs1 ManagedClusterLoadBalancerProfile_OutboundIPs
		err := outboundIPs1.PopulateFromARM(owner, *typedInput.OutboundIPs)
		if err != nil {
			return err
		}
		outboundIPs := outboundIPs1
		profile.OutboundIPs = &outboundIPs
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterLoadBalancerProfile populates our ManagedClusterLoadBalancerProfile from the provided source ManagedClusterLoadBalancerProfile
func (profile *ManagedClusterLoadBalancerProfile) AssignProperties_From_ManagedClusterLoadBalancerProfile(source *storage.ManagedClusterLoadBalancerProfile) error {

	// AllocatedOutboundPorts
	profile.AllocatedOutboundPorts = genruntime.ClonePointerToInt(source.AllocatedOutboundPorts)

	// BackendPoolType
	if source.BackendPoolType != nil {
		backendPoolType := *source.BackendPoolType
		backendPoolTypeTemp := genruntime.ToEnum(backendPoolType, managedClusterLoadBalancerProfile_BackendPoolType_Values)
		profile.BackendPoolType = &backendPoolTypeTemp
	} else {
		profile.BackendPoolType = nil
	}

	// EffectiveOutboundIPs
	if source.EffectiveOutboundIPs != nil {
		effectiveOutboundIPList := make([]ResourceReference, len(source.EffectiveOutboundIPs))
		for effectiveOutboundIPIndex, effectiveOutboundIPItem := range source.EffectiveOutboundIPs {
			var effectiveOutboundIP ResourceReference
			err := effectiveOutboundIP.AssignProperties_From_ResourceReference(&effectiveOutboundIPItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ResourceReference() to populate field EffectiveOutboundIPs")
			}
			effectiveOutboundIPList[effectiveOutboundIPIndex] = effectiveOutboundIP
		}
		profile.EffectiveOutboundIPs = effectiveOutboundIPList
	} else {
		profile.EffectiveOutboundIPs = nil
	}

	// EnableMultipleStandardLoadBalancers
	if source.EnableMultipleStandardLoadBalancers != nil {
		enableMultipleStandardLoadBalancer := *source.EnableMultipleStandardLoadBalancers
		profile.EnableMultipleStandardLoadBalancers = &enableMultipleStandardLoadBalancer
	} else {
		profile.EnableMultipleStandardLoadBalancers = nil
	}

	// IdleTimeoutInMinutes
	profile.IdleTimeoutInMinutes = genruntime.ClonePointerToInt(source.IdleTimeoutInMinutes)

	// ManagedOutboundIPs
	if source.ManagedOutboundIPs != nil {
		var managedOutboundIP ManagedClusterLoadBalancerProfile_ManagedOutboundIPs
		err := managedOutboundIP.AssignProperties_From_ManagedClusterLoadBalancerProfile_ManagedOutboundIPs(source.ManagedOutboundIPs)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterLoadBalancerProfile_ManagedOutboundIPs() to populate field ManagedOutboundIPs")
		}
		profile.ManagedOutboundIPs = &managedOutboundIP
	} else {
		profile.ManagedOutboundIPs = nil
	}

	// OutboundIPPrefixes
	if source.OutboundIPPrefixes != nil {
		var outboundIPPrefix ManagedClusterLoadBalancerProfile_OutboundIPPrefixes
		err := outboundIPPrefix.AssignProperties_From_ManagedClusterLoadBalancerProfile_OutboundIPPrefixes(source.OutboundIPPrefixes)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterLoadBalancerProfile_OutboundIPPrefixes() to populate field OutboundIPPrefixes")
		}
		profile.OutboundIPPrefixes = &outboundIPPrefix
	} else {
		profile.OutboundIPPrefixes = nil
	}

	// OutboundIPs
	if source.OutboundIPs != nil {
		var outboundIP ManagedClusterLoadBalancerProfile_OutboundIPs
		err := outboundIP.AssignProperties_From_ManagedClusterLoadBalancerProfile_OutboundIPs(source.OutboundIPs)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterLoadBalancerProfile_OutboundIPs() to populate field OutboundIPs")
		}
		profile.OutboundIPs = &outboundIP
	} else {
		profile.OutboundIPs = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterLoadBalancerProfile populates the provided destination ManagedClusterLoadBalancerProfile from our ManagedClusterLoadBalancerProfile
func (profile *ManagedClusterLoadBalancerProfile) AssignProperties_To_ManagedClusterLoadBalancerProfile(destination *storage.ManagedClusterLoadBalancerProfile) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// AllocatedOutboundPorts
	destination.AllocatedOutboundPorts = genruntime.ClonePointerToInt(profile.AllocatedOutboundPorts)

	// BackendPoolType
	if profile.BackendPoolType != nil {
		backendPoolType := string(*profile.BackendPoolType)
		destination.BackendPoolType = &backendPoolType
	} else {
		destination.BackendPoolType = nil
	}

	// EffectiveOutboundIPs
	if profile.EffectiveOutboundIPs != nil {
		effectiveOutboundIPList := make([]storage.ResourceReference, len(profile.EffectiveOutboundIPs))
		for effectiveOutboundIPIndex, effectiveOutboundIPItem := range profile.EffectiveOutboundIPs {
			var effectiveOutboundIP storage.ResourceReference
			err := effectiveOutboundIPItem.AssignProperties_To_ResourceReference(&effectiveOutboundIP)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ResourceReference() to populate field EffectiveOutboundIPs")
			}
			effectiveOutboundIPList[effectiveOutboundIPIndex] = effectiveOutboundIP
		}
		destination.EffectiveOutboundIPs = effectiveOutboundIPList
	} else {
		destination.EffectiveOutboundIPs = nil
	}

	// EnableMultipleStandardLoadBalancers
	if profile.EnableMultipleStandardLoadBalancers != nil {
		enableMultipleStandardLoadBalancer := *profile.EnableMultipleStandardLoadBalancers
		destination.EnableMultipleStandardLoadBalancers = &enableMultipleStandardLoadBalancer
	} else {
		destination.EnableMultipleStandardLoadBalancers = nil
	}

	// IdleTimeoutInMinutes
	destination.IdleTimeoutInMinutes = genruntime.ClonePointerToInt(profile.IdleTimeoutInMinutes)

	// ManagedOutboundIPs
	if profile.ManagedOutboundIPs != nil {
		var managedOutboundIP storage.ManagedClusterLoadBalancerProfile_ManagedOutboundIPs
		err := profile.ManagedOutboundIPs.AssignProperties_To_ManagedClusterLoadBalancerProfile_ManagedOutboundIPs(&managedOutboundIP)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterLoadBalancerProfile_ManagedOutboundIPs() to populate field ManagedOutboundIPs")
		}
		destination.ManagedOutboundIPs = &managedOutboundIP
	} else {
		destination.ManagedOutboundIPs = nil
	}

	// OutboundIPPrefixes
	if profile.OutboundIPPrefixes != nil {
		var outboundIPPrefix storage.ManagedClusterLoadBalancerProfile_OutboundIPPrefixes
		err := profile.OutboundIPPrefixes.AssignProperties_To_ManagedClusterLoadBalancerProfile_OutboundIPPrefixes(&outboundIPPrefix)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterLoadBalancerProfile_OutboundIPPrefixes() to populate field OutboundIPPrefixes")
		}
		destination.OutboundIPPrefixes = &outboundIPPrefix
	} else {
		destination.OutboundIPPrefixes = nil
	}

	// OutboundIPs
	if profile.OutboundIPs != nil {
		var outboundIP storage.ManagedClusterLoadBalancerProfile_OutboundIPs
		err := profile.OutboundIPs.AssignProperties_To_ManagedClusterLoadBalancerProfile_OutboundIPs(&outboundIP)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterLoadBalancerProfile_OutboundIPs() to populate field OutboundIPs")
		}
		destination.OutboundIPs = &outboundIP
	} else {
		destination.OutboundIPs = 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 load balancer.
type ManagedClusterLoadBalancerProfile_STATUS struct {
	// AllocatedOutboundPorts: The desired number of allocated SNAT ports per VM. Allowed values are in the range of 0 to 64000
	// (inclusive). The default value is 0 which results in Azure dynamically allocating ports.
	AllocatedOutboundPorts *int `json:"allocatedOutboundPorts,omitempty"`

	// BackendPoolType: The type of the managed inbound Load Balancer BackendPool.
	BackendPoolType *ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS `json:"backendPoolType,omitempty"`

	// EffectiveOutboundIPs: The effective outbound IP resources of the cluster load balancer.
	EffectiveOutboundIPs []ResourceReference_STATUS `json:"effectiveOutboundIPs,omitempty"`

	// EnableMultipleStandardLoadBalancers: Enable multiple standard load balancers per AKS cluster or not.
	EnableMultipleStandardLoadBalancers *bool `json:"enableMultipleStandardLoadBalancers,omitempty"`

	// IdleTimeoutInMinutes: Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120
	// (inclusive). The default value is 30 minutes.
	IdleTimeoutInMinutes *int `json:"idleTimeoutInMinutes,omitempty"`

	// ManagedOutboundIPs: Desired managed outbound IPs for the cluster load balancer.
	ManagedOutboundIPs *ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS `json:"managedOutboundIPs,omitempty"`

	// OutboundIPPrefixes: Desired outbound IP Prefix resources for the cluster load balancer.
	OutboundIPPrefixes *ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS `json:"outboundIPPrefixes,omitempty"`

	// OutboundIPs: Desired outbound IP resources for the cluster load balancer.
	OutboundIPs *ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS `json:"outboundIPs,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterLoadBalancerProfile_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *ManagedClusterLoadBalancerProfile_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterLoadBalancerProfile_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *ManagedClusterLoadBalancerProfile_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterLoadBalancerProfile_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterLoadBalancerProfile_STATUS, got %T", armInput)
	}

	// Set property "AllocatedOutboundPorts":
	if typedInput.AllocatedOutboundPorts != nil {
		allocatedOutboundPorts := *typedInput.AllocatedOutboundPorts
		profile.AllocatedOutboundPorts = &allocatedOutboundPorts
	}

	// Set property "BackendPoolType":
	if typedInput.BackendPoolType != nil {
		var temp string
		temp = string(*typedInput.BackendPoolType)
		backendPoolType := ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS(temp)
		profile.BackendPoolType = &backendPoolType
	}

	// Set property "EffectiveOutboundIPs":
	for _, item := range typedInput.EffectiveOutboundIPs {
		var item1 ResourceReference_STATUS
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		profile.EffectiveOutboundIPs = append(profile.EffectiveOutboundIPs, item1)
	}

	// Set property "EnableMultipleStandardLoadBalancers":
	if typedInput.EnableMultipleStandardLoadBalancers != nil {
		enableMultipleStandardLoadBalancers := *typedInput.EnableMultipleStandardLoadBalancers
		profile.EnableMultipleStandardLoadBalancers = &enableMultipleStandardLoadBalancers
	}

	// Set property "IdleTimeoutInMinutes":
	if typedInput.IdleTimeoutInMinutes != nil {
		idleTimeoutInMinutes := *typedInput.IdleTimeoutInMinutes
		profile.IdleTimeoutInMinutes = &idleTimeoutInMinutes
	}

	// Set property "ManagedOutboundIPs":
	if typedInput.ManagedOutboundIPs != nil {
		var managedOutboundIPs1 ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS
		err := managedOutboundIPs1.PopulateFromARM(owner, *typedInput.ManagedOutboundIPs)
		if err != nil {
			return err
		}
		managedOutboundIPs := managedOutboundIPs1
		profile.ManagedOutboundIPs = &managedOutboundIPs
	}

	// Set property "OutboundIPPrefixes":
	if typedInput.OutboundIPPrefixes != nil {
		var outboundIPPrefixes1 ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS
		err := outboundIPPrefixes1.PopulateFromARM(owner, *typedInput.OutboundIPPrefixes)
		if err != nil {
			return err
		}
		outboundIPPrefixes := outboundIPPrefixes1
		profile.OutboundIPPrefixes = &outboundIPPrefixes
	}

	// Set property "OutboundIPs":
	if typedInput.OutboundIPs != nil {
		var outboundIPs1 ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS
		err := outboundIPs1.PopulateFromARM(owner, *typedInput.OutboundIPs)
		if err != nil {
			return err
		}
		outboundIPs := outboundIPs1
		profile.OutboundIPs = &outboundIPs
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterLoadBalancerProfile_STATUS populates our ManagedClusterLoadBalancerProfile_STATUS from the provided source ManagedClusterLoadBalancerProfile_STATUS
func (profile *ManagedClusterLoadBalancerProfile_STATUS) AssignProperties_From_ManagedClusterLoadBalancerProfile_STATUS(source *storage.ManagedClusterLoadBalancerProfile_STATUS) error {

	// AllocatedOutboundPorts
	profile.AllocatedOutboundPorts = genruntime.ClonePointerToInt(source.AllocatedOutboundPorts)

	// BackendPoolType
	if source.BackendPoolType != nil {
		backendPoolType := *source.BackendPoolType
		backendPoolTypeTemp := genruntime.ToEnum(backendPoolType, managedClusterLoadBalancerProfile_BackendPoolType_STATUS_Values)
		profile.BackendPoolType = &backendPoolTypeTemp
	} else {
		profile.BackendPoolType = nil
	}

	// EffectiveOutboundIPs
	if source.EffectiveOutboundIPs != nil {
		effectiveOutboundIPList := make([]ResourceReference_STATUS, len(source.EffectiveOutboundIPs))
		for effectiveOutboundIPIndex, effectiveOutboundIPItem := range source.EffectiveOutboundIPs {
			var effectiveOutboundIP ResourceReference_STATUS
			err := effectiveOutboundIP.AssignProperties_From_ResourceReference_STATUS(&effectiveOutboundIPItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ResourceReference_STATUS() to populate field EffectiveOutboundIPs")
			}
			effectiveOutboundIPList[effectiveOutboundIPIndex] = effectiveOutboundIP
		}
		profile.EffectiveOutboundIPs = effectiveOutboundIPList
	} else {
		profile.EffectiveOutboundIPs = nil
	}

	// EnableMultipleStandardLoadBalancers
	if source.EnableMultipleStandardLoadBalancers != nil {
		enableMultipleStandardLoadBalancer := *source.EnableMultipleStandardLoadBalancers
		profile.EnableMultipleStandardLoadBalancers = &enableMultipleStandardLoadBalancer
	} else {
		profile.EnableMultipleStandardLoadBalancers = nil
	}

	// IdleTimeoutInMinutes
	profile.IdleTimeoutInMinutes = genruntime.ClonePointerToInt(source.IdleTimeoutInMinutes)

	// ManagedOutboundIPs
	if source.ManagedOutboundIPs != nil {
		var managedOutboundIP ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS
		err := managedOutboundIP.AssignProperties_From_ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS(source.ManagedOutboundIPs)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS() to populate field ManagedOutboundIPs")
		}
		profile.ManagedOutboundIPs = &managedOutboundIP
	} else {
		profile.ManagedOutboundIPs = nil
	}

	// OutboundIPPrefixes
	if source.OutboundIPPrefixes != nil {
		var outboundIPPrefix ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS
		err := outboundIPPrefix.AssignProperties_From_ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS(source.OutboundIPPrefixes)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS() to populate field OutboundIPPrefixes")
		}
		profile.OutboundIPPrefixes = &outboundIPPrefix
	} else {
		profile.OutboundIPPrefixes = nil
	}

	// OutboundIPs
	if source.OutboundIPs != nil {
		var outboundIP ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS
		err := outboundIP.AssignProperties_From_ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS(source.OutboundIPs)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS() to populate field OutboundIPs")
		}
		profile.OutboundIPs = &outboundIP
	} else {
		profile.OutboundIPs = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterLoadBalancerProfile_STATUS populates the provided destination ManagedClusterLoadBalancerProfile_STATUS from our ManagedClusterLoadBalancerProfile_STATUS
func (profile *ManagedClusterLoadBalancerProfile_STATUS) AssignProperties_To_ManagedClusterLoadBalancerProfile_STATUS(destination *storage.ManagedClusterLoadBalancerProfile_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// AllocatedOutboundPorts
	destination.AllocatedOutboundPorts = genruntime.ClonePointerToInt(profile.AllocatedOutboundPorts)

	// BackendPoolType
	if profile.BackendPoolType != nil {
		backendPoolType := string(*profile.BackendPoolType)
		destination.BackendPoolType = &backendPoolType
	} else {
		destination.BackendPoolType = nil
	}

	// EffectiveOutboundIPs
	if profile.EffectiveOutboundIPs != nil {
		effectiveOutboundIPList := make([]storage.ResourceReference_STATUS, len(profile.EffectiveOutboundIPs))
		for effectiveOutboundIPIndex, effectiveOutboundIPItem := range profile.EffectiveOutboundIPs {
			var effectiveOutboundIP storage.ResourceReference_STATUS
			err := effectiveOutboundIPItem.AssignProperties_To_ResourceReference_STATUS(&effectiveOutboundIP)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ResourceReference_STATUS() to populate field EffectiveOutboundIPs")
			}
			effectiveOutboundIPList[effectiveOutboundIPIndex] = effectiveOutboundIP
		}
		destination.EffectiveOutboundIPs = effectiveOutboundIPList
	} else {
		destination.EffectiveOutboundIPs = nil
	}

	// EnableMultipleStandardLoadBalancers
	if profile.EnableMultipleStandardLoadBalancers != nil {
		enableMultipleStandardLoadBalancer := *profile.EnableMultipleStandardLoadBalancers
		destination.EnableMultipleStandardLoadBalancers = &enableMultipleStandardLoadBalancer
	} else {
		destination.EnableMultipleStandardLoadBalancers = nil
	}

	// IdleTimeoutInMinutes
	destination.IdleTimeoutInMinutes = genruntime.ClonePointerToInt(profile.IdleTimeoutInMinutes)

	// ManagedOutboundIPs
	if profile.ManagedOutboundIPs != nil {
		var managedOutboundIP storage.ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS
		err := profile.ManagedOutboundIPs.AssignProperties_To_ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS(&managedOutboundIP)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS() to populate field ManagedOutboundIPs")
		}
		destination.ManagedOutboundIPs = &managedOutboundIP
	} else {
		destination.ManagedOutboundIPs = nil
	}

	// OutboundIPPrefixes
	if profile.OutboundIPPrefixes != nil {
		var outboundIPPrefix storage.ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS
		err := profile.OutboundIPPrefixes.AssignProperties_To_ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS(&outboundIPPrefix)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS() to populate field OutboundIPPrefixes")
		}
		destination.OutboundIPPrefixes = &outboundIPPrefix
	} else {
		destination.OutboundIPPrefixes = nil
	}

	// OutboundIPs
	if profile.OutboundIPs != nil {
		var outboundIP storage.ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS
		err := profile.OutboundIPs.AssignProperties_To_ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS(&outboundIP)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS() to populate field OutboundIPs")
		}
		destination.OutboundIPs = &outboundIP
	} else {
		destination.OutboundIPs = 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 NAT gateway.
type ManagedClusterNATGatewayProfile struct {
	// EffectiveOutboundIPs: The effective outbound IP resources of the cluster NAT gateway.
	EffectiveOutboundIPs []ResourceReference `json:"effectiveOutboundIPs,omitempty"`

	// +kubebuilder:validation:Maximum=120
	// +kubebuilder:validation:Minimum=4
	// IdleTimeoutInMinutes: Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120
	// (inclusive). The default value is 4 minutes.
	IdleTimeoutInMinutes *int `json:"idleTimeoutInMinutes,omitempty"`

	// ManagedOutboundIPProfile: Profile of the managed outbound IP resources of the cluster NAT gateway.
	ManagedOutboundIPProfile *ManagedClusterManagedOutboundIPProfile `json:"managedOutboundIPProfile,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterNATGatewayProfile{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (profile *ManagedClusterNATGatewayProfile) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if profile == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterNATGatewayProfile{}

	// Set property "EffectiveOutboundIPs":
	for _, item := range profile.EffectiveOutboundIPs {
		item_ARM, err := item.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		result.EffectiveOutboundIPs = append(result.EffectiveOutboundIPs, *item_ARM.(*arm.ResourceReference))
	}

	// Set property "IdleTimeoutInMinutes":
	if profile.IdleTimeoutInMinutes != nil {
		idleTimeoutInMinutes := *profile.IdleTimeoutInMinutes
		result.IdleTimeoutInMinutes = &idleTimeoutInMinutes
	}

	// Set property "ManagedOutboundIPProfile":
	if profile.ManagedOutboundIPProfile != nil {
		managedOutboundIPProfile_ARM, err := profile.ManagedOutboundIPProfile.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		managedOutboundIPProfile := *managedOutboundIPProfile_ARM.(*arm.ManagedClusterManagedOutboundIPProfile)
		result.ManagedOutboundIPProfile = &managedOutboundIPProfile
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *ManagedClusterNATGatewayProfile) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterNATGatewayProfile{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *ManagedClusterNATGatewayProfile) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterNATGatewayProfile)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterNATGatewayProfile, got %T", armInput)
	}

	// Set property "EffectiveOutboundIPs":
	for _, item := range typedInput.EffectiveOutboundIPs {
		var item1 ResourceReference
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		profile.EffectiveOutboundIPs = append(profile.EffectiveOutboundIPs, item1)
	}

	// Set property "IdleTimeoutInMinutes":
	if typedInput.IdleTimeoutInMinutes != nil {
		idleTimeoutInMinutes := *typedInput.IdleTimeoutInMinutes
		profile.IdleTimeoutInMinutes = &idleTimeoutInMinutes
	}

	// Set property "ManagedOutboundIPProfile":
	if typedInput.ManagedOutboundIPProfile != nil {
		var managedOutboundIPProfile1 ManagedClusterManagedOutboundIPProfile
		err := managedOutboundIPProfile1.PopulateFromARM(owner, *typedInput.ManagedOutboundIPProfile)
		if err != nil {
			return err
		}
		managedOutboundIPProfile := managedOutboundIPProfile1
		profile.ManagedOutboundIPProfile = &managedOutboundIPProfile
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterNATGatewayProfile populates our ManagedClusterNATGatewayProfile from the provided source ManagedClusterNATGatewayProfile
func (profile *ManagedClusterNATGatewayProfile) AssignProperties_From_ManagedClusterNATGatewayProfile(source *storage.ManagedClusterNATGatewayProfile) error {

	// EffectiveOutboundIPs
	if source.EffectiveOutboundIPs != nil {
		effectiveOutboundIPList := make([]ResourceReference, len(source.EffectiveOutboundIPs))
		for effectiveOutboundIPIndex, effectiveOutboundIPItem := range source.EffectiveOutboundIPs {
			var effectiveOutboundIP ResourceReference
			err := effectiveOutboundIP.AssignProperties_From_ResourceReference(&effectiveOutboundIPItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ResourceReference() to populate field EffectiveOutboundIPs")
			}
			effectiveOutboundIPList[effectiveOutboundIPIndex] = effectiveOutboundIP
		}
		profile.EffectiveOutboundIPs = effectiveOutboundIPList
	} else {
		profile.EffectiveOutboundIPs = nil
	}

	// IdleTimeoutInMinutes
	profile.IdleTimeoutInMinutes = genruntime.ClonePointerToInt(source.IdleTimeoutInMinutes)

	// ManagedOutboundIPProfile
	if source.ManagedOutboundIPProfile != nil {
		var managedOutboundIPProfile ManagedClusterManagedOutboundIPProfile
		err := managedOutboundIPProfile.AssignProperties_From_ManagedClusterManagedOutboundIPProfile(source.ManagedOutboundIPProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterManagedOutboundIPProfile() to populate field ManagedOutboundIPProfile")
		}
		profile.ManagedOutboundIPProfile = &managedOutboundIPProfile
	} else {
		profile.ManagedOutboundIPProfile = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterNATGatewayProfile populates the provided destination ManagedClusterNATGatewayProfile from our ManagedClusterNATGatewayProfile
func (profile *ManagedClusterNATGatewayProfile) AssignProperties_To_ManagedClusterNATGatewayProfile(destination *storage.ManagedClusterNATGatewayProfile) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// EffectiveOutboundIPs
	if profile.EffectiveOutboundIPs != nil {
		effectiveOutboundIPList := make([]storage.ResourceReference, len(profile.EffectiveOutboundIPs))
		for effectiveOutboundIPIndex, effectiveOutboundIPItem := range profile.EffectiveOutboundIPs {
			var effectiveOutboundIP storage.ResourceReference
			err := effectiveOutboundIPItem.AssignProperties_To_ResourceReference(&effectiveOutboundIP)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ResourceReference() to populate field EffectiveOutboundIPs")
			}
			effectiveOutboundIPList[effectiveOutboundIPIndex] = effectiveOutboundIP
		}
		destination.EffectiveOutboundIPs = effectiveOutboundIPList
	} else {
		destination.EffectiveOutboundIPs = nil
	}

	// IdleTimeoutInMinutes
	destination.IdleTimeoutInMinutes = genruntime.ClonePointerToInt(profile.IdleTimeoutInMinutes)

	// ManagedOutboundIPProfile
	if profile.ManagedOutboundIPProfile != nil {
		var managedOutboundIPProfile storage.ManagedClusterManagedOutboundIPProfile
		err := profile.ManagedOutboundIPProfile.AssignProperties_To_ManagedClusterManagedOutboundIPProfile(&managedOutboundIPProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterManagedOutboundIPProfile() to populate field ManagedOutboundIPProfile")
		}
		destination.ManagedOutboundIPProfile = &managedOutboundIPProfile
	} else {
		destination.ManagedOutboundIPProfile = 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 NAT gateway.
type ManagedClusterNATGatewayProfile_STATUS struct {
	// EffectiveOutboundIPs: The effective outbound IP resources of the cluster NAT gateway.
	EffectiveOutboundIPs []ResourceReference_STATUS `json:"effectiveOutboundIPs,omitempty"`

	// IdleTimeoutInMinutes: Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120
	// (inclusive). The default value is 4 minutes.
	IdleTimeoutInMinutes *int `json:"idleTimeoutInMinutes,omitempty"`

	// ManagedOutboundIPProfile: Profile of the managed outbound IP resources of the cluster NAT gateway.
	ManagedOutboundIPProfile *ManagedClusterManagedOutboundIPProfile_STATUS `json:"managedOutboundIPProfile,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterNATGatewayProfile_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *ManagedClusterNATGatewayProfile_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterNATGatewayProfile_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *ManagedClusterNATGatewayProfile_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterNATGatewayProfile_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterNATGatewayProfile_STATUS, got %T", armInput)
	}

	// Set property "EffectiveOutboundIPs":
	for _, item := range typedInput.EffectiveOutboundIPs {
		var item1 ResourceReference_STATUS
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		profile.EffectiveOutboundIPs = append(profile.EffectiveOutboundIPs, item1)
	}

	// Set property "IdleTimeoutInMinutes":
	if typedInput.IdleTimeoutInMinutes != nil {
		idleTimeoutInMinutes := *typedInput.IdleTimeoutInMinutes
		profile.IdleTimeoutInMinutes = &idleTimeoutInMinutes
	}

	// Set property "ManagedOutboundIPProfile":
	if typedInput.ManagedOutboundIPProfile != nil {
		var managedOutboundIPProfile1 ManagedClusterManagedOutboundIPProfile_STATUS
		err := managedOutboundIPProfile1.PopulateFromARM(owner, *typedInput.ManagedOutboundIPProfile)
		if err != nil {
			return err
		}
		managedOutboundIPProfile := managedOutboundIPProfile1
		profile.ManagedOutboundIPProfile = &managedOutboundIPProfile
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterNATGatewayProfile_STATUS populates our ManagedClusterNATGatewayProfile_STATUS from the provided source ManagedClusterNATGatewayProfile_STATUS
func (profile *ManagedClusterNATGatewayProfile_STATUS) AssignProperties_From_ManagedClusterNATGatewayProfile_STATUS(source *storage.ManagedClusterNATGatewayProfile_STATUS) error {

	// EffectiveOutboundIPs
	if source.EffectiveOutboundIPs != nil {
		effectiveOutboundIPList := make([]ResourceReference_STATUS, len(source.EffectiveOutboundIPs))
		for effectiveOutboundIPIndex, effectiveOutboundIPItem := range source.EffectiveOutboundIPs {
			var effectiveOutboundIP ResourceReference_STATUS
			err := effectiveOutboundIP.AssignProperties_From_ResourceReference_STATUS(&effectiveOutboundIPItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ResourceReference_STATUS() to populate field EffectiveOutboundIPs")
			}
			effectiveOutboundIPList[effectiveOutboundIPIndex] = effectiveOutboundIP
		}
		profile.EffectiveOutboundIPs = effectiveOutboundIPList
	} else {
		profile.EffectiveOutboundIPs = nil
	}

	// IdleTimeoutInMinutes
	profile.IdleTimeoutInMinutes = genruntime.ClonePointerToInt(source.IdleTimeoutInMinutes)

	// ManagedOutboundIPProfile
	if source.ManagedOutboundIPProfile != nil {
		var managedOutboundIPProfile ManagedClusterManagedOutboundIPProfile_STATUS
		err := managedOutboundIPProfile.AssignProperties_From_ManagedClusterManagedOutboundIPProfile_STATUS(source.ManagedOutboundIPProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterManagedOutboundIPProfile_STATUS() to populate field ManagedOutboundIPProfile")
		}
		profile.ManagedOutboundIPProfile = &managedOutboundIPProfile
	} else {
		profile.ManagedOutboundIPProfile = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterNATGatewayProfile_STATUS populates the provided destination ManagedClusterNATGatewayProfile_STATUS from our ManagedClusterNATGatewayProfile_STATUS
func (profile *ManagedClusterNATGatewayProfile_STATUS) AssignProperties_To_ManagedClusterNATGatewayProfile_STATUS(destination *storage.ManagedClusterNATGatewayProfile_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// EffectiveOutboundIPs
	if profile.EffectiveOutboundIPs != nil {
		effectiveOutboundIPList := make([]storage.ResourceReference_STATUS, len(profile.EffectiveOutboundIPs))
		for effectiveOutboundIPIndex, effectiveOutboundIPItem := range profile.EffectiveOutboundIPs {
			var effectiveOutboundIP storage.ResourceReference_STATUS
			err := effectiveOutboundIPItem.AssignProperties_To_ResourceReference_STATUS(&effectiveOutboundIP)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ResourceReference_STATUS() to populate field EffectiveOutboundIPs")
			}
			effectiveOutboundIPList[effectiveOutboundIPIndex] = effectiveOutboundIP
		}
		destination.EffectiveOutboundIPs = effectiveOutboundIPList
	} else {
		destination.EffectiveOutboundIPs = nil
	}

	// IdleTimeoutInMinutes
	destination.IdleTimeoutInMinutes = genruntime.ClonePointerToInt(profile.IdleTimeoutInMinutes)

	// ManagedOutboundIPProfile
	if profile.ManagedOutboundIPProfile != nil {
		var managedOutboundIPProfile storage.ManagedClusterManagedOutboundIPProfile_STATUS
		err := profile.ManagedOutboundIPProfile.AssignProperties_To_ManagedClusterManagedOutboundIPProfile_STATUS(&managedOutboundIPProfile)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterManagedOutboundIPProfile_STATUS() to populate field ManagedOutboundIPProfile")
		}
		destination.ManagedOutboundIPProfile = &managedOutboundIPProfile
	} else {
		destination.ManagedOutboundIPProfile = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

type ManagedClusterOperatorConfigMaps struct {
	// OIDCIssuerProfile: indicates where the OIDCIssuerProfile config map should be placed. If omitted, no config map will be
	// created.
	OIDCIssuerProfile *genruntime.ConfigMapDestination `json:"oidcIssuerProfile,omitempty"`

	// PrincipalId: indicates where the PrincipalId config map should be placed. If omitted, no config map will be created.
	PrincipalId *genruntime.ConfigMapDestination `json:"principalId,omitempty"`
}

// AssignProperties_From_ManagedClusterOperatorConfigMaps populates our ManagedClusterOperatorConfigMaps from the provided source ManagedClusterOperatorConfigMaps
func (maps *ManagedClusterOperatorConfigMaps) AssignProperties_From_ManagedClusterOperatorConfigMaps(source *storage.ManagedClusterOperatorConfigMaps) error {

	// OIDCIssuerProfile
	if source.OIDCIssuerProfile != nil {
		oidcIssuerProfile := source.OIDCIssuerProfile.Copy()
		maps.OIDCIssuerProfile = &oidcIssuerProfile
	} else {
		maps.OIDCIssuerProfile = nil
	}

	// PrincipalId
	if source.PrincipalId != nil {
		principalId := source.PrincipalId.Copy()
		maps.PrincipalId = &principalId
	} else {
		maps.PrincipalId = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterOperatorConfigMaps populates the provided destination ManagedClusterOperatorConfigMaps from our ManagedClusterOperatorConfigMaps
func (maps *ManagedClusterOperatorConfigMaps) AssignProperties_To_ManagedClusterOperatorConfigMaps(destination *storage.ManagedClusterOperatorConfigMaps) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// OIDCIssuerProfile
	if maps.OIDCIssuerProfile != nil {
		oidcIssuerProfile := maps.OIDCIssuerProfile.Copy()
		destination.OIDCIssuerProfile = &oidcIssuerProfile
	} else {
		destination.OIDCIssuerProfile = nil
	}

	// PrincipalId
	if maps.PrincipalId != nil {
		principalId := maps.PrincipalId.Copy()
		destination.PrincipalId = &principalId
	} else {
		destination.PrincipalId = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

type ManagedClusterOperatorSecrets struct {
	// AdminCredentials: indicates where the AdminCredentials secret should be placed. If omitted, the secret will not be
	// retrieved from Azure.
	AdminCredentials *genruntime.SecretDestination `json:"adminCredentials,omitempty"`

	// UserCredentials: indicates where the UserCredentials secret should be placed. If omitted, the secret will not be
	// retrieved from Azure.
	UserCredentials *genruntime.SecretDestination `json:"userCredentials,omitempty"`
}

// AssignProperties_From_ManagedClusterOperatorSecrets populates our ManagedClusterOperatorSecrets from the provided source ManagedClusterOperatorSecrets
func (secrets *ManagedClusterOperatorSecrets) AssignProperties_From_ManagedClusterOperatorSecrets(source *storage.ManagedClusterOperatorSecrets) error {

	// AdminCredentials
	if source.AdminCredentials != nil {
		adminCredential := source.AdminCredentials.Copy()
		secrets.AdminCredentials = &adminCredential
	} else {
		secrets.AdminCredentials = nil
	}

	// UserCredentials
	if source.UserCredentials != nil {
		userCredential := source.UserCredentials.Copy()
		secrets.UserCredentials = &userCredential
	} else {
		secrets.UserCredentials = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterOperatorSecrets populates the provided destination ManagedClusterOperatorSecrets from our ManagedClusterOperatorSecrets
func (secrets *ManagedClusterOperatorSecrets) AssignProperties_To_ManagedClusterOperatorSecrets(destination *storage.ManagedClusterOperatorSecrets) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// AdminCredentials
	if secrets.AdminCredentials != nil {
		adminCredential := secrets.AdminCredentials.Copy()
		destination.AdminCredentials = &adminCredential
	} else {
		destination.AdminCredentials = nil
	}

	// UserCredentials
	if secrets.UserCredentials != nil {
		userCredential := secrets.UserCredentials.Copy()
		destination.UserCredentials = &userCredential
	} else {
		destination.UserCredentials = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Details about the pod identity assigned to the Managed Cluster.
type ManagedClusterPodIdentity struct {
	// BindingSelector: The binding selector to use for the AzureIdentityBinding resource.
	BindingSelector *string `json:"bindingSelector,omitempty"`

	// +kubebuilder:validation:Required
	// Identity: The user assigned identity details.
	Identity *UserAssignedIdentity `json:"identity,omitempty"`

	// +kubebuilder:validation:Required
	// Name: The name of the pod identity.
	Name *string `json:"name,omitempty"`

	// +kubebuilder:validation:Required
	// Namespace: The namespace of the pod identity.
	Namespace *string `json:"namespace,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterPodIdentity{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (identity *ManagedClusterPodIdentity) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if identity == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterPodIdentity{}

	// Set property "BindingSelector":
	if identity.BindingSelector != nil {
		bindingSelector := *identity.BindingSelector
		result.BindingSelector = &bindingSelector
	}

	// Set property "Identity":
	if identity.Identity != nil {
		identity_ARM, err := identity.Identity.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		identity1 := *identity_ARM.(*arm.UserAssignedIdentity)
		result.Identity = &identity1
	}

	// Set property "Name":
	if identity.Name != nil {
		name := *identity.Name
		result.Name = &name
	}

	// Set property "Namespace":
	if identity.Namespace != nil {
		namespace := *identity.Namespace
		result.Namespace = &namespace
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (identity *ManagedClusterPodIdentity) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterPodIdentity{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (identity *ManagedClusterPodIdentity) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterPodIdentity)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterPodIdentity, got %T", armInput)
	}

	// Set property "BindingSelector":
	if typedInput.BindingSelector != nil {
		bindingSelector := *typedInput.BindingSelector
		identity.BindingSelector = &bindingSelector
	}

	// Set property "Identity":
	if typedInput.Identity != nil {
		var identity2 UserAssignedIdentity
		err := identity2.PopulateFromARM(owner, *typedInput.Identity)
		if err != nil {
			return err
		}
		identity1 := identity2
		identity.Identity = &identity1
	}

	// Set property "Name":
	if typedInput.Name != nil {
		name := *typedInput.Name
		identity.Name = &name
	}

	// Set property "Namespace":
	if typedInput.Namespace != nil {
		namespace := *typedInput.Namespace
		identity.Namespace = &namespace
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterPodIdentity populates our ManagedClusterPodIdentity from the provided source ManagedClusterPodIdentity
func (identity *ManagedClusterPodIdentity) AssignProperties_From_ManagedClusterPodIdentity(source *storage.ManagedClusterPodIdentity) error {

	// BindingSelector
	identity.BindingSelector = genruntime.ClonePointerToString(source.BindingSelector)

	// Identity
	if source.Identity != nil {
		var identityLocal UserAssignedIdentity
		err := identityLocal.AssignProperties_From_UserAssignedIdentity(source.Identity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_UserAssignedIdentity() to populate field Identity")
		}
		identity.Identity = &identityLocal
	} else {
		identity.Identity = nil
	}

	// Name
	identity.Name = genruntime.ClonePointerToString(source.Name)

	// Namespace
	identity.Namespace = genruntime.ClonePointerToString(source.Namespace)

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterPodIdentity populates the provided destination ManagedClusterPodIdentity from our ManagedClusterPodIdentity
func (identity *ManagedClusterPodIdentity) AssignProperties_To_ManagedClusterPodIdentity(destination *storage.ManagedClusterPodIdentity) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// BindingSelector
	destination.BindingSelector = genruntime.ClonePointerToString(identity.BindingSelector)

	// Identity
	if identity.Identity != nil {
		var identityLocal storage.UserAssignedIdentity
		err := identity.Identity.AssignProperties_To_UserAssignedIdentity(&identityLocal)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_UserAssignedIdentity() to populate field Identity")
		}
		destination.Identity = &identityLocal
	} else {
		destination.Identity = nil
	}

	// Name
	destination.Name = genruntime.ClonePointerToString(identity.Name)

	// Namespace
	destination.Namespace = genruntime.ClonePointerToString(identity.Namespace)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Details about the pod identity assigned to the Managed Cluster.
type ManagedClusterPodIdentity_STATUS struct {
	// BindingSelector: The binding selector to use for the AzureIdentityBinding resource.
	BindingSelector *string `json:"bindingSelector,omitempty"`

	// Identity: The user assigned identity details.
	Identity *UserAssignedIdentity_STATUS `json:"identity,omitempty"`

	// Name: The name of the pod identity.
	Name *string `json:"name,omitempty"`

	// Namespace: The namespace of the pod identity.
	Namespace        *string                                            `json:"namespace,omitempty"`
	ProvisioningInfo *ManagedClusterPodIdentity_ProvisioningInfo_STATUS `json:"provisioningInfo,omitempty"`

	// ProvisioningState: The current provisioning state of the pod identity.
	ProvisioningState *ManagedClusterPodIdentity_ProvisioningState_STATUS `json:"provisioningState,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterPodIdentity_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (identity *ManagedClusterPodIdentity_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterPodIdentity_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (identity *ManagedClusterPodIdentity_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterPodIdentity_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterPodIdentity_STATUS, got %T", armInput)
	}

	// Set property "BindingSelector":
	if typedInput.BindingSelector != nil {
		bindingSelector := *typedInput.BindingSelector
		identity.BindingSelector = &bindingSelector
	}

	// Set property "Identity":
	if typedInput.Identity != nil {
		var identity2 UserAssignedIdentity_STATUS
		err := identity2.PopulateFromARM(owner, *typedInput.Identity)
		if err != nil {
			return err
		}
		identity1 := identity2
		identity.Identity = &identity1
	}

	// Set property "Name":
	if typedInput.Name != nil {
		name := *typedInput.Name
		identity.Name = &name
	}

	// Set property "Namespace":
	if typedInput.Namespace != nil {
		namespace := *typedInput.Namespace
		identity.Namespace = &namespace
	}

	// Set property "ProvisioningInfo":
	if typedInput.ProvisioningInfo != nil {
		var provisioningInfo1 ManagedClusterPodIdentity_ProvisioningInfo_STATUS
		err := provisioningInfo1.PopulateFromARM(owner, *typedInput.ProvisioningInfo)
		if err != nil {
			return err
		}
		provisioningInfo := provisioningInfo1
		identity.ProvisioningInfo = &provisioningInfo
	}

	// Set property "ProvisioningState":
	if typedInput.ProvisioningState != nil {
		var temp string
		temp = string(*typedInput.ProvisioningState)
		provisioningState := ManagedClusterPodIdentity_ProvisioningState_STATUS(temp)
		identity.ProvisioningState = &provisioningState
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterPodIdentity_STATUS populates our ManagedClusterPodIdentity_STATUS from the provided source ManagedClusterPodIdentity_STATUS
func (identity *ManagedClusterPodIdentity_STATUS) AssignProperties_From_ManagedClusterPodIdentity_STATUS(source *storage.ManagedClusterPodIdentity_STATUS) error {

	// BindingSelector
	identity.BindingSelector = genruntime.ClonePointerToString(source.BindingSelector)

	// Identity
	if source.Identity != nil {
		var identityLocal UserAssignedIdentity_STATUS
		err := identityLocal.AssignProperties_From_UserAssignedIdentity_STATUS(source.Identity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_UserAssignedIdentity_STATUS() to populate field Identity")
		}
		identity.Identity = &identityLocal
	} else {
		identity.Identity = nil
	}

	// Name
	identity.Name = genruntime.ClonePointerToString(source.Name)

	// Namespace
	identity.Namespace = genruntime.ClonePointerToString(source.Namespace)

	// ProvisioningInfo
	if source.ProvisioningInfo != nil {
		var provisioningInfo ManagedClusterPodIdentity_ProvisioningInfo_STATUS
		err := provisioningInfo.AssignProperties_From_ManagedClusterPodIdentity_ProvisioningInfo_STATUS(source.ProvisioningInfo)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterPodIdentity_ProvisioningInfo_STATUS() to populate field ProvisioningInfo")
		}
		identity.ProvisioningInfo = &provisioningInfo
	} else {
		identity.ProvisioningInfo = nil
	}

	// ProvisioningState
	if source.ProvisioningState != nil {
		provisioningState := *source.ProvisioningState
		provisioningStateTemp := genruntime.ToEnum(provisioningState, managedClusterPodIdentity_ProvisioningState_STATUS_Values)
		identity.ProvisioningState = &provisioningStateTemp
	} else {
		identity.ProvisioningState = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterPodIdentity_STATUS populates the provided destination ManagedClusterPodIdentity_STATUS from our ManagedClusterPodIdentity_STATUS
func (identity *ManagedClusterPodIdentity_STATUS) AssignProperties_To_ManagedClusterPodIdentity_STATUS(destination *storage.ManagedClusterPodIdentity_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// BindingSelector
	destination.BindingSelector = genruntime.ClonePointerToString(identity.BindingSelector)

	// Identity
	if identity.Identity != nil {
		var identityLocal storage.UserAssignedIdentity_STATUS
		err := identity.Identity.AssignProperties_To_UserAssignedIdentity_STATUS(&identityLocal)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_UserAssignedIdentity_STATUS() to populate field Identity")
		}
		destination.Identity = &identityLocal
	} else {
		destination.Identity = nil
	}

	// Name
	destination.Name = genruntime.ClonePointerToString(identity.Name)

	// Namespace
	destination.Namespace = genruntime.ClonePointerToString(identity.Namespace)

	// ProvisioningInfo
	if identity.ProvisioningInfo != nil {
		var provisioningInfo storage.ManagedClusterPodIdentity_ProvisioningInfo_STATUS
		err := identity.ProvisioningInfo.AssignProperties_To_ManagedClusterPodIdentity_ProvisioningInfo_STATUS(&provisioningInfo)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterPodIdentity_ProvisioningInfo_STATUS() to populate field ProvisioningInfo")
		}
		destination.ProvisioningInfo = &provisioningInfo
	} else {
		destination.ProvisioningInfo = nil
	}

	// ProvisioningState
	if identity.ProvisioningState != nil {
		provisioningState := string(*identity.ProvisioningState)
		destination.ProvisioningState = &provisioningState
	} else {
		destination.ProvisioningState = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// See [disable AAD Pod Identity for a specific
// Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) for more details.
type ManagedClusterPodIdentityException struct {
	// +kubebuilder:validation:Required
	// Name: The name of the pod identity exception.
	Name *string `json:"name,omitempty"`

	// +kubebuilder:validation:Required
	// Namespace: The namespace of the pod identity exception.
	Namespace *string `json:"namespace,omitempty"`

	// +kubebuilder:validation:Required
	// PodLabels: The pod labels to match.
	PodLabels map[string]string `json:"podLabels,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterPodIdentityException{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (exception *ManagedClusterPodIdentityException) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if exception == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterPodIdentityException{}

	// Set property "Name":
	if exception.Name != nil {
		name := *exception.Name
		result.Name = &name
	}

	// Set property "Namespace":
	if exception.Namespace != nil {
		namespace := *exception.Namespace
		result.Namespace = &namespace
	}

	// Set property "PodLabels":
	if exception.PodLabels != nil {
		result.PodLabels = make(map[string]string, len(exception.PodLabels))
		for key, value := range exception.PodLabels {
			result.PodLabels[key] = value
		}
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (exception *ManagedClusterPodIdentityException) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterPodIdentityException{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (exception *ManagedClusterPodIdentityException) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterPodIdentityException)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterPodIdentityException, got %T", armInput)
	}

	// Set property "Name":
	if typedInput.Name != nil {
		name := *typedInput.Name
		exception.Name = &name
	}

	// Set property "Namespace":
	if typedInput.Namespace != nil {
		namespace := *typedInput.Namespace
		exception.Namespace = &namespace
	}

	// Set property "PodLabels":
	if typedInput.PodLabels != nil {
		exception.PodLabels = make(map[string]string, len(typedInput.PodLabels))
		for key, value := range typedInput.PodLabels {
			exception.PodLabels[key] = value
		}
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterPodIdentityException populates our ManagedClusterPodIdentityException from the provided source ManagedClusterPodIdentityException
func (exception *ManagedClusterPodIdentityException) AssignProperties_From_ManagedClusterPodIdentityException(source *storage.ManagedClusterPodIdentityException) error {

	// Name
	exception.Name = genruntime.ClonePointerToString(source.Name)

	// Namespace
	exception.Namespace = genruntime.ClonePointerToString(source.Namespace)

	// PodLabels
	exception.PodLabels = genruntime.CloneMapOfStringToString(source.PodLabels)

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterPodIdentityException populates the provided destination ManagedClusterPodIdentityException from our ManagedClusterPodIdentityException
func (exception *ManagedClusterPodIdentityException) AssignProperties_To_ManagedClusterPodIdentityException(destination *storage.ManagedClusterPodIdentityException) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Name
	destination.Name = genruntime.ClonePointerToString(exception.Name)

	// Namespace
	destination.Namespace = genruntime.ClonePointerToString(exception.Namespace)

	// PodLabels
	destination.PodLabels = genruntime.CloneMapOfStringToString(exception.PodLabels)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// See [disable AAD Pod Identity for a specific
// Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) for more details.
type ManagedClusterPodIdentityException_STATUS struct {
	// Name: The name of the pod identity exception.
	Name *string `json:"name,omitempty"`

	// Namespace: The namespace of the pod identity exception.
	Namespace *string `json:"namespace,omitempty"`

	// PodLabels: The pod labels to match.
	PodLabels map[string]string `json:"podLabels,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterPodIdentityException_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (exception *ManagedClusterPodIdentityException_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterPodIdentityException_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (exception *ManagedClusterPodIdentityException_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterPodIdentityException_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterPodIdentityException_STATUS, got %T", armInput)
	}

	// Set property "Name":
	if typedInput.Name != nil {
		name := *typedInput.Name
		exception.Name = &name
	}

	// Set property "Namespace":
	if typedInput.Namespace != nil {
		namespace := *typedInput.Namespace
		exception.Namespace = &namespace
	}

	// Set property "PodLabels":
	if typedInput.PodLabels != nil {
		exception.PodLabels = make(map[string]string, len(typedInput.PodLabels))
		for key, value := range typedInput.PodLabels {
			exception.PodLabels[key] = value
		}
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterPodIdentityException_STATUS populates our ManagedClusterPodIdentityException_STATUS from the provided source ManagedClusterPodIdentityException_STATUS
func (exception *ManagedClusterPodIdentityException_STATUS) AssignProperties_From_ManagedClusterPodIdentityException_STATUS(source *storage.ManagedClusterPodIdentityException_STATUS) error {

	// Name
	exception.Name = genruntime.ClonePointerToString(source.Name)

	// Namespace
	exception.Namespace = genruntime.ClonePointerToString(source.Namespace)

	// PodLabels
	exception.PodLabels = genruntime.CloneMapOfStringToString(source.PodLabels)

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterPodIdentityException_STATUS populates the provided destination ManagedClusterPodIdentityException_STATUS from our ManagedClusterPodIdentityException_STATUS
func (exception *ManagedClusterPodIdentityException_STATUS) AssignProperties_To_ManagedClusterPodIdentityException_STATUS(destination *storage.ManagedClusterPodIdentityException_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Name
	destination.Name = genruntime.ClonePointerToString(exception.Name)

	// Namespace
	destination.Namespace = genruntime.ClonePointerToString(exception.Namespace)

	// PodLabels
	destination.PodLabels = genruntime.CloneMapOfStringToString(exception.PodLabels)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"least-waste","most-pods","priority","random"}
type ManagedClusterProperties_AutoScalerProfile_Expander string

const (
	ManagedClusterProperties_AutoScalerProfile_Expander_LeastWaste = ManagedClusterProperties_AutoScalerProfile_Expander("least-waste")
	ManagedClusterProperties_AutoScalerProfile_Expander_MostPods   = ManagedClusterProperties_AutoScalerProfile_Expander("most-pods")
	ManagedClusterProperties_AutoScalerProfile_Expander_Priority   = ManagedClusterProperties_AutoScalerProfile_Expander("priority")
	ManagedClusterProperties_AutoScalerProfile_Expander_Random     = ManagedClusterProperties_AutoScalerProfile_Expander("random")
)

// Mapping from string to ManagedClusterProperties_AutoScalerProfile_Expander
var managedClusterProperties_AutoScalerProfile_Expander_Values = map[string]ManagedClusterProperties_AutoScalerProfile_Expander{
	"least-waste": ManagedClusterProperties_AutoScalerProfile_Expander_LeastWaste,
	"most-pods":   ManagedClusterProperties_AutoScalerProfile_Expander_MostPods,
	"priority":    ManagedClusterProperties_AutoScalerProfile_Expander_Priority,
	"random":      ManagedClusterProperties_AutoScalerProfile_Expander_Random,
}

type ManagedClusterProperties_AutoScalerProfile_Expander_STATUS string

const (
	ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_LeastWaste = ManagedClusterProperties_AutoScalerProfile_Expander_STATUS("least-waste")
	ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_MostPods   = ManagedClusterProperties_AutoScalerProfile_Expander_STATUS("most-pods")
	ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_Priority   = ManagedClusterProperties_AutoScalerProfile_Expander_STATUS("priority")
	ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_Random     = ManagedClusterProperties_AutoScalerProfile_Expander_STATUS("random")
)

// Mapping from string to ManagedClusterProperties_AutoScalerProfile_Expander_STATUS
var managedClusterProperties_AutoScalerProfile_Expander_STATUS_Values = map[string]ManagedClusterProperties_AutoScalerProfile_Expander_STATUS{
	"least-waste": ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_LeastWaste,
	"most-pods":   ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_MostPods,
	"priority":    ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_Priority,
	"random":      ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_Random,
}

// Microsoft Defender settings for the security profile.
type ManagedClusterSecurityProfileDefender struct {
	// LogAnalyticsWorkspaceResourceReference: Resource ID of the Log Analytics workspace to be associated with Microsoft
	// Defender. When Microsoft Defender is enabled, this field is required and must be a valid workspace resource ID. When
	// Microsoft Defender is disabled, leave the field empty.
	LogAnalyticsWorkspaceResourceReference *genruntime.ResourceReference `armReference:"LogAnalyticsWorkspaceResourceId" json:"logAnalyticsWorkspaceResourceReference,omitempty"`

	// SecurityMonitoring: Microsoft Defender threat detection for Cloud settings for the security profile.
	SecurityMonitoring *ManagedClusterSecurityProfileDefenderSecurityMonitoring `json:"securityMonitoring,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterSecurityProfileDefender{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (defender *ManagedClusterSecurityProfileDefender) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if defender == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterSecurityProfileDefender{}

	// Set property "LogAnalyticsWorkspaceResourceId":
	if defender.LogAnalyticsWorkspaceResourceReference != nil {
		logAnalyticsWorkspaceResourceReferenceARMID, err := resolved.ResolvedReferences.Lookup(*defender.LogAnalyticsWorkspaceResourceReference)
		if err != nil {
			return nil, err
		}
		logAnalyticsWorkspaceResourceReference := logAnalyticsWorkspaceResourceReferenceARMID
		result.LogAnalyticsWorkspaceResourceId = &logAnalyticsWorkspaceResourceReference
	}

	// Set property "SecurityMonitoring":
	if defender.SecurityMonitoring != nil {
		securityMonitoring_ARM, err := defender.SecurityMonitoring.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		securityMonitoring := *securityMonitoring_ARM.(*arm.ManagedClusterSecurityProfileDefenderSecurityMonitoring)
		result.SecurityMonitoring = &securityMonitoring
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (defender *ManagedClusterSecurityProfileDefender) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterSecurityProfileDefender{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (defender *ManagedClusterSecurityProfileDefender) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterSecurityProfileDefender)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterSecurityProfileDefender, got %T", armInput)
	}

	// no assignment for property "LogAnalyticsWorkspaceResourceReference"

	// Set property "SecurityMonitoring":
	if typedInput.SecurityMonitoring != nil {
		var securityMonitoring1 ManagedClusterSecurityProfileDefenderSecurityMonitoring
		err := securityMonitoring1.PopulateFromARM(owner, *typedInput.SecurityMonitoring)
		if err != nil {
			return err
		}
		securityMonitoring := securityMonitoring1
		defender.SecurityMonitoring = &securityMonitoring
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterSecurityProfileDefender populates our ManagedClusterSecurityProfileDefender from the provided source ManagedClusterSecurityProfileDefender
func (defender *ManagedClusterSecurityProfileDefender) AssignProperties_From_ManagedClusterSecurityProfileDefender(source *storage.ManagedClusterSecurityProfileDefender) error {

	// LogAnalyticsWorkspaceResourceReference
	if source.LogAnalyticsWorkspaceResourceReference != nil {
		logAnalyticsWorkspaceResourceReference := source.LogAnalyticsWorkspaceResourceReference.Copy()
		defender.LogAnalyticsWorkspaceResourceReference = &logAnalyticsWorkspaceResourceReference
	} else {
		defender.LogAnalyticsWorkspaceResourceReference = nil
	}

	// SecurityMonitoring
	if source.SecurityMonitoring != nil {
		var securityMonitoring ManagedClusterSecurityProfileDefenderSecurityMonitoring
		err := securityMonitoring.AssignProperties_From_ManagedClusterSecurityProfileDefenderSecurityMonitoring(source.SecurityMonitoring)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterSecurityProfileDefenderSecurityMonitoring() to populate field SecurityMonitoring")
		}
		defender.SecurityMonitoring = &securityMonitoring
	} else {
		defender.SecurityMonitoring = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterSecurityProfileDefender populates the provided destination ManagedClusterSecurityProfileDefender from our ManagedClusterSecurityProfileDefender
func (defender *ManagedClusterSecurityProfileDefender) AssignProperties_To_ManagedClusterSecurityProfileDefender(destination *storage.ManagedClusterSecurityProfileDefender) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// LogAnalyticsWorkspaceResourceReference
	if defender.LogAnalyticsWorkspaceResourceReference != nil {
		logAnalyticsWorkspaceResourceReference := defender.LogAnalyticsWorkspaceResourceReference.Copy()
		destination.LogAnalyticsWorkspaceResourceReference = &logAnalyticsWorkspaceResourceReference
	} else {
		destination.LogAnalyticsWorkspaceResourceReference = nil
	}

	// SecurityMonitoring
	if defender.SecurityMonitoring != nil {
		var securityMonitoring storage.ManagedClusterSecurityProfileDefenderSecurityMonitoring
		err := defender.SecurityMonitoring.AssignProperties_To_ManagedClusterSecurityProfileDefenderSecurityMonitoring(&securityMonitoring)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterSecurityProfileDefenderSecurityMonitoring() to populate field SecurityMonitoring")
		}
		destination.SecurityMonitoring = &securityMonitoring
	} else {
		destination.SecurityMonitoring = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Microsoft Defender settings for the security profile.
type ManagedClusterSecurityProfileDefender_STATUS struct {
	// LogAnalyticsWorkspaceResourceId: Resource ID of the Log Analytics workspace to be associated with Microsoft Defender.
	// When Microsoft Defender is enabled, this field is required and must be a valid workspace resource ID. When Microsoft
	// Defender is disabled, leave the field empty.
	LogAnalyticsWorkspaceResourceId *string `json:"logAnalyticsWorkspaceResourceId,omitempty"`

	// SecurityMonitoring: Microsoft Defender threat detection for Cloud settings for the security profile.
	SecurityMonitoring *ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS `json:"securityMonitoring,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterSecurityProfileDefender_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (defender *ManagedClusterSecurityProfileDefender_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterSecurityProfileDefender_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (defender *ManagedClusterSecurityProfileDefender_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterSecurityProfileDefender_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterSecurityProfileDefender_STATUS, got %T", armInput)
	}

	// Set property "LogAnalyticsWorkspaceResourceId":
	if typedInput.LogAnalyticsWorkspaceResourceId != nil {
		logAnalyticsWorkspaceResourceId := *typedInput.LogAnalyticsWorkspaceResourceId
		defender.LogAnalyticsWorkspaceResourceId = &logAnalyticsWorkspaceResourceId
	}

	// Set property "SecurityMonitoring":
	if typedInput.SecurityMonitoring != nil {
		var securityMonitoring1 ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS
		err := securityMonitoring1.PopulateFromARM(owner, *typedInput.SecurityMonitoring)
		if err != nil {
			return err
		}
		securityMonitoring := securityMonitoring1
		defender.SecurityMonitoring = &securityMonitoring
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterSecurityProfileDefender_STATUS populates our ManagedClusterSecurityProfileDefender_STATUS from the provided source ManagedClusterSecurityProfileDefender_STATUS
func (defender *ManagedClusterSecurityProfileDefender_STATUS) AssignProperties_From_ManagedClusterSecurityProfileDefender_STATUS(source *storage.ManagedClusterSecurityProfileDefender_STATUS) error {

	// LogAnalyticsWorkspaceResourceId
	defender.LogAnalyticsWorkspaceResourceId = genruntime.ClonePointerToString(source.LogAnalyticsWorkspaceResourceId)

	// SecurityMonitoring
	if source.SecurityMonitoring != nil {
		var securityMonitoring ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS
		err := securityMonitoring.AssignProperties_From_ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS(source.SecurityMonitoring)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS() to populate field SecurityMonitoring")
		}
		defender.SecurityMonitoring = &securityMonitoring
	} else {
		defender.SecurityMonitoring = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterSecurityProfileDefender_STATUS populates the provided destination ManagedClusterSecurityProfileDefender_STATUS from our ManagedClusterSecurityProfileDefender_STATUS
func (defender *ManagedClusterSecurityProfileDefender_STATUS) AssignProperties_To_ManagedClusterSecurityProfileDefender_STATUS(destination *storage.ManagedClusterSecurityProfileDefender_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// LogAnalyticsWorkspaceResourceId
	destination.LogAnalyticsWorkspaceResourceId = genruntime.ClonePointerToString(defender.LogAnalyticsWorkspaceResourceId)

	// SecurityMonitoring
	if defender.SecurityMonitoring != nil {
		var securityMonitoring storage.ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS
		err := defender.SecurityMonitoring.AssignProperties_To_ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS(&securityMonitoring)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS() to populate field SecurityMonitoring")
		}
		destination.SecurityMonitoring = &securityMonitoring
	} else {
		destination.SecurityMonitoring = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Image Cleaner removes unused images from nodes, freeing up disk space and helping to reduce attack surface area. Here
// are settings for the security profile.
type ManagedClusterSecurityProfileImageCleaner struct {
	// Enabled: Whether to enable Image Cleaner on AKS cluster.
	Enabled *bool `json:"enabled,omitempty"`

	// IntervalHours: Image Cleaner scanning interval in hours.
	IntervalHours *int `json:"intervalHours,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterSecurityProfileImageCleaner{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (cleaner *ManagedClusterSecurityProfileImageCleaner) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if cleaner == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterSecurityProfileImageCleaner{}

	// Set property "Enabled":
	if cleaner.Enabled != nil {
		enabled := *cleaner.Enabled
		result.Enabled = &enabled
	}

	// Set property "IntervalHours":
	if cleaner.IntervalHours != nil {
		intervalHours := *cleaner.IntervalHours
		result.IntervalHours = &intervalHours
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (cleaner *ManagedClusterSecurityProfileImageCleaner) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterSecurityProfileImageCleaner{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (cleaner *ManagedClusterSecurityProfileImageCleaner) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterSecurityProfileImageCleaner)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterSecurityProfileImageCleaner, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		cleaner.Enabled = &enabled
	}

	// Set property "IntervalHours":
	if typedInput.IntervalHours != nil {
		intervalHours := *typedInput.IntervalHours
		cleaner.IntervalHours = &intervalHours
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterSecurityProfileImageCleaner populates our ManagedClusterSecurityProfileImageCleaner from the provided source ManagedClusterSecurityProfileImageCleaner
func (cleaner *ManagedClusterSecurityProfileImageCleaner) AssignProperties_From_ManagedClusterSecurityProfileImageCleaner(source *storage.ManagedClusterSecurityProfileImageCleaner) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		cleaner.Enabled = &enabled
	} else {
		cleaner.Enabled = nil
	}

	// IntervalHours
	cleaner.IntervalHours = genruntime.ClonePointerToInt(source.IntervalHours)

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterSecurityProfileImageCleaner populates the provided destination ManagedClusterSecurityProfileImageCleaner from our ManagedClusterSecurityProfileImageCleaner
func (cleaner *ManagedClusterSecurityProfileImageCleaner) AssignProperties_To_ManagedClusterSecurityProfileImageCleaner(destination *storage.ManagedClusterSecurityProfileImageCleaner) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if cleaner.Enabled != nil {
		enabled := *cleaner.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

	// IntervalHours
	destination.IntervalHours = genruntime.ClonePointerToInt(cleaner.IntervalHours)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Image Cleaner removes unused images from nodes, freeing up disk space and helping to reduce attack surface area. Here
// are settings for the security profile.
type ManagedClusterSecurityProfileImageCleaner_STATUS struct {
	// Enabled: Whether to enable Image Cleaner on AKS cluster.
	Enabled *bool `json:"enabled,omitempty"`

	// IntervalHours: Image Cleaner scanning interval in hours.
	IntervalHours *int `json:"intervalHours,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterSecurityProfileImageCleaner_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (cleaner *ManagedClusterSecurityProfileImageCleaner_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterSecurityProfileImageCleaner_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (cleaner *ManagedClusterSecurityProfileImageCleaner_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterSecurityProfileImageCleaner_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterSecurityProfileImageCleaner_STATUS, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		cleaner.Enabled = &enabled
	}

	// Set property "IntervalHours":
	if typedInput.IntervalHours != nil {
		intervalHours := *typedInput.IntervalHours
		cleaner.IntervalHours = &intervalHours
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterSecurityProfileImageCleaner_STATUS populates our ManagedClusterSecurityProfileImageCleaner_STATUS from the provided source ManagedClusterSecurityProfileImageCleaner_STATUS
func (cleaner *ManagedClusterSecurityProfileImageCleaner_STATUS) AssignProperties_From_ManagedClusterSecurityProfileImageCleaner_STATUS(source *storage.ManagedClusterSecurityProfileImageCleaner_STATUS) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		cleaner.Enabled = &enabled
	} else {
		cleaner.Enabled = nil
	}

	// IntervalHours
	cleaner.IntervalHours = genruntime.ClonePointerToInt(source.IntervalHours)

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterSecurityProfileImageCleaner_STATUS populates the provided destination ManagedClusterSecurityProfileImageCleaner_STATUS from our ManagedClusterSecurityProfileImageCleaner_STATUS
func (cleaner *ManagedClusterSecurityProfileImageCleaner_STATUS) AssignProperties_To_ManagedClusterSecurityProfileImageCleaner_STATUS(destination *storage.ManagedClusterSecurityProfileImageCleaner_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if cleaner.Enabled != nil {
		enabled := *cleaner.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

	// IntervalHours
	destination.IntervalHours = genruntime.ClonePointerToInt(cleaner.IntervalHours)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Workload identity settings for the security profile.
type ManagedClusterSecurityProfileWorkloadIdentity struct {
	// Enabled: Whether to enable workload identity.
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterSecurityProfileWorkloadIdentity{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (identity *ManagedClusterSecurityProfileWorkloadIdentity) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if identity == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterSecurityProfileWorkloadIdentity{}

	// Set property "Enabled":
	if identity.Enabled != nil {
		enabled := *identity.Enabled
		result.Enabled = &enabled
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (identity *ManagedClusterSecurityProfileWorkloadIdentity) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterSecurityProfileWorkloadIdentity{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (identity *ManagedClusterSecurityProfileWorkloadIdentity) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterSecurityProfileWorkloadIdentity)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterSecurityProfileWorkloadIdentity, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		identity.Enabled = &enabled
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterSecurityProfileWorkloadIdentity populates our ManagedClusterSecurityProfileWorkloadIdentity from the provided source ManagedClusterSecurityProfileWorkloadIdentity
func (identity *ManagedClusterSecurityProfileWorkloadIdentity) AssignProperties_From_ManagedClusterSecurityProfileWorkloadIdentity(source *storage.ManagedClusterSecurityProfileWorkloadIdentity) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		identity.Enabled = &enabled
	} else {
		identity.Enabled = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterSecurityProfileWorkloadIdentity populates the provided destination ManagedClusterSecurityProfileWorkloadIdentity from our ManagedClusterSecurityProfileWorkloadIdentity
func (identity *ManagedClusterSecurityProfileWorkloadIdentity) AssignProperties_To_ManagedClusterSecurityProfileWorkloadIdentity(destination *storage.ManagedClusterSecurityProfileWorkloadIdentity) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if identity.Enabled != nil {
		enabled := *identity.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
}

// Workload identity settings for the security profile.
type ManagedClusterSecurityProfileWorkloadIdentity_STATUS struct {
	// Enabled: Whether to enable workload identity.
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterSecurityProfileWorkloadIdentity_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (identity *ManagedClusterSecurityProfileWorkloadIdentity_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterSecurityProfileWorkloadIdentity_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (identity *ManagedClusterSecurityProfileWorkloadIdentity_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterSecurityProfileWorkloadIdentity_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterSecurityProfileWorkloadIdentity_STATUS, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		identity.Enabled = &enabled
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterSecurityProfileWorkloadIdentity_STATUS populates our ManagedClusterSecurityProfileWorkloadIdentity_STATUS from the provided source ManagedClusterSecurityProfileWorkloadIdentity_STATUS
func (identity *ManagedClusterSecurityProfileWorkloadIdentity_STATUS) AssignProperties_From_ManagedClusterSecurityProfileWorkloadIdentity_STATUS(source *storage.ManagedClusterSecurityProfileWorkloadIdentity_STATUS) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		identity.Enabled = &enabled
	} else {
		identity.Enabled = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterSecurityProfileWorkloadIdentity_STATUS populates the provided destination ManagedClusterSecurityProfileWorkloadIdentity_STATUS from our ManagedClusterSecurityProfileWorkloadIdentity_STATUS
func (identity *ManagedClusterSecurityProfileWorkloadIdentity_STATUS) AssignProperties_To_ManagedClusterSecurityProfileWorkloadIdentity_STATUS(destination *storage.ManagedClusterSecurityProfileWorkloadIdentity_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if identity.Enabled != nil {
		enabled := *identity.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
}

// +kubebuilder:validation:Enum={"Base"}
type ManagedClusterSKU_Name string

const ManagedClusterSKU_Name_Base = ManagedClusterSKU_Name("Base")

// Mapping from string to ManagedClusterSKU_Name
var managedClusterSKU_Name_Values = map[string]ManagedClusterSKU_Name{
	"base": ManagedClusterSKU_Name_Base,
}

type ManagedClusterSKU_Name_STATUS string

const ManagedClusterSKU_Name_STATUS_Base = ManagedClusterSKU_Name_STATUS("Base")

// Mapping from string to ManagedClusterSKU_Name_STATUS
var managedClusterSKU_Name_STATUS_Values = map[string]ManagedClusterSKU_Name_STATUS{
	"base": ManagedClusterSKU_Name_STATUS_Base,
}

// +kubebuilder:validation:Enum={"Free","Premium","Standard"}
type ManagedClusterSKU_Tier string

const (
	ManagedClusterSKU_Tier_Free     = ManagedClusterSKU_Tier("Free")
	ManagedClusterSKU_Tier_Premium  = ManagedClusterSKU_Tier("Premium")
	ManagedClusterSKU_Tier_Standard = ManagedClusterSKU_Tier("Standard")
)

// Mapping from string to ManagedClusterSKU_Tier
var managedClusterSKU_Tier_Values = map[string]ManagedClusterSKU_Tier{
	"free":     ManagedClusterSKU_Tier_Free,
	"premium":  ManagedClusterSKU_Tier_Premium,
	"standard": ManagedClusterSKU_Tier_Standard,
}

type ManagedClusterSKU_Tier_STATUS string

const (
	ManagedClusterSKU_Tier_STATUS_Free     = ManagedClusterSKU_Tier_STATUS("Free")
	ManagedClusterSKU_Tier_STATUS_Premium  = ManagedClusterSKU_Tier_STATUS("Premium")
	ManagedClusterSKU_Tier_STATUS_Standard = ManagedClusterSKU_Tier_STATUS("Standard")
)

// Mapping from string to ManagedClusterSKU_Tier_STATUS
var managedClusterSKU_Tier_STATUS_Values = map[string]ManagedClusterSKU_Tier_STATUS{
	"free":     ManagedClusterSKU_Tier_STATUS_Free,
	"premium":  ManagedClusterSKU_Tier_STATUS_Premium,
	"standard": ManagedClusterSKU_Tier_STATUS_Standard,
}

// AzureBlob CSI Driver settings for the storage profile.
type ManagedClusterStorageProfileBlobCSIDriver struct {
	// Enabled: Whether to enable AzureBlob CSI Driver. The default value is false.
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterStorageProfileBlobCSIDriver{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (driver *ManagedClusterStorageProfileBlobCSIDriver) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if driver == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterStorageProfileBlobCSIDriver{}

	// Set property "Enabled":
	if driver.Enabled != nil {
		enabled := *driver.Enabled
		result.Enabled = &enabled
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (driver *ManagedClusterStorageProfileBlobCSIDriver) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterStorageProfileBlobCSIDriver{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (driver *ManagedClusterStorageProfileBlobCSIDriver) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterStorageProfileBlobCSIDriver)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterStorageProfileBlobCSIDriver, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		driver.Enabled = &enabled
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterStorageProfileBlobCSIDriver populates our ManagedClusterStorageProfileBlobCSIDriver from the provided source ManagedClusterStorageProfileBlobCSIDriver
func (driver *ManagedClusterStorageProfileBlobCSIDriver) AssignProperties_From_ManagedClusterStorageProfileBlobCSIDriver(source *storage.ManagedClusterStorageProfileBlobCSIDriver) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		driver.Enabled = &enabled
	} else {
		driver.Enabled = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterStorageProfileBlobCSIDriver populates the provided destination ManagedClusterStorageProfileBlobCSIDriver from our ManagedClusterStorageProfileBlobCSIDriver
func (driver *ManagedClusterStorageProfileBlobCSIDriver) AssignProperties_To_ManagedClusterStorageProfileBlobCSIDriver(destination *storage.ManagedClusterStorageProfileBlobCSIDriver) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if driver.Enabled != nil {
		enabled := *driver.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
}

// AzureBlob CSI Driver settings for the storage profile.
type ManagedClusterStorageProfileBlobCSIDriver_STATUS struct {
	// Enabled: Whether to enable AzureBlob CSI Driver. The default value is false.
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterStorageProfileBlobCSIDriver_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (driver *ManagedClusterStorageProfileBlobCSIDriver_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterStorageProfileBlobCSIDriver_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (driver *ManagedClusterStorageProfileBlobCSIDriver_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterStorageProfileBlobCSIDriver_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterStorageProfileBlobCSIDriver_STATUS, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		driver.Enabled = &enabled
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterStorageProfileBlobCSIDriver_STATUS populates our ManagedClusterStorageProfileBlobCSIDriver_STATUS from the provided source ManagedClusterStorageProfileBlobCSIDriver_STATUS
func (driver *ManagedClusterStorageProfileBlobCSIDriver_STATUS) AssignProperties_From_ManagedClusterStorageProfileBlobCSIDriver_STATUS(source *storage.ManagedClusterStorageProfileBlobCSIDriver_STATUS) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		driver.Enabled = &enabled
	} else {
		driver.Enabled = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterStorageProfileBlobCSIDriver_STATUS populates the provided destination ManagedClusterStorageProfileBlobCSIDriver_STATUS from our ManagedClusterStorageProfileBlobCSIDriver_STATUS
func (driver *ManagedClusterStorageProfileBlobCSIDriver_STATUS) AssignProperties_To_ManagedClusterStorageProfileBlobCSIDriver_STATUS(destination *storage.ManagedClusterStorageProfileBlobCSIDriver_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if driver.Enabled != nil {
		enabled := *driver.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
}

// AzureDisk CSI Driver settings for the storage profile.
type ManagedClusterStorageProfileDiskCSIDriver struct {
	// Enabled: Whether to enable AzureDisk CSI Driver. The default value is true.
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterStorageProfileDiskCSIDriver{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (driver *ManagedClusterStorageProfileDiskCSIDriver) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if driver == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterStorageProfileDiskCSIDriver{}

	// Set property "Enabled":
	if driver.Enabled != nil {
		enabled := *driver.Enabled
		result.Enabled = &enabled
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (driver *ManagedClusterStorageProfileDiskCSIDriver) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterStorageProfileDiskCSIDriver{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (driver *ManagedClusterStorageProfileDiskCSIDriver) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterStorageProfileDiskCSIDriver)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterStorageProfileDiskCSIDriver, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		driver.Enabled = &enabled
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterStorageProfileDiskCSIDriver populates our ManagedClusterStorageProfileDiskCSIDriver from the provided source ManagedClusterStorageProfileDiskCSIDriver
func (driver *ManagedClusterStorageProfileDiskCSIDriver) AssignProperties_From_ManagedClusterStorageProfileDiskCSIDriver(source *storage.ManagedClusterStorageProfileDiskCSIDriver) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		driver.Enabled = &enabled
	} else {
		driver.Enabled = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterStorageProfileDiskCSIDriver populates the provided destination ManagedClusterStorageProfileDiskCSIDriver from our ManagedClusterStorageProfileDiskCSIDriver
func (driver *ManagedClusterStorageProfileDiskCSIDriver) AssignProperties_To_ManagedClusterStorageProfileDiskCSIDriver(destination *storage.ManagedClusterStorageProfileDiskCSIDriver) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if driver.Enabled != nil {
		enabled := *driver.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
}

// AzureDisk CSI Driver settings for the storage profile.
type ManagedClusterStorageProfileDiskCSIDriver_STATUS struct {
	// Enabled: Whether to enable AzureDisk CSI Driver. The default value is true.
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterStorageProfileDiskCSIDriver_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (driver *ManagedClusterStorageProfileDiskCSIDriver_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterStorageProfileDiskCSIDriver_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (driver *ManagedClusterStorageProfileDiskCSIDriver_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterStorageProfileDiskCSIDriver_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterStorageProfileDiskCSIDriver_STATUS, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		driver.Enabled = &enabled
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterStorageProfileDiskCSIDriver_STATUS populates our ManagedClusterStorageProfileDiskCSIDriver_STATUS from the provided source ManagedClusterStorageProfileDiskCSIDriver_STATUS
func (driver *ManagedClusterStorageProfileDiskCSIDriver_STATUS) AssignProperties_From_ManagedClusterStorageProfileDiskCSIDriver_STATUS(source *storage.ManagedClusterStorageProfileDiskCSIDriver_STATUS) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		driver.Enabled = &enabled
	} else {
		driver.Enabled = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterStorageProfileDiskCSIDriver_STATUS populates the provided destination ManagedClusterStorageProfileDiskCSIDriver_STATUS from our ManagedClusterStorageProfileDiskCSIDriver_STATUS
func (driver *ManagedClusterStorageProfileDiskCSIDriver_STATUS) AssignProperties_To_ManagedClusterStorageProfileDiskCSIDriver_STATUS(destination *storage.ManagedClusterStorageProfileDiskCSIDriver_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if driver.Enabled != nil {
		enabled := *driver.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
}

// AzureFile CSI Driver settings for the storage profile.
type ManagedClusterStorageProfileFileCSIDriver struct {
	// Enabled: Whether to enable AzureFile CSI Driver. The default value is true.
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterStorageProfileFileCSIDriver{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (driver *ManagedClusterStorageProfileFileCSIDriver) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if driver == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterStorageProfileFileCSIDriver{}

	// Set property "Enabled":
	if driver.Enabled != nil {
		enabled := *driver.Enabled
		result.Enabled = &enabled
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (driver *ManagedClusterStorageProfileFileCSIDriver) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterStorageProfileFileCSIDriver{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (driver *ManagedClusterStorageProfileFileCSIDriver) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterStorageProfileFileCSIDriver)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterStorageProfileFileCSIDriver, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		driver.Enabled = &enabled
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterStorageProfileFileCSIDriver populates our ManagedClusterStorageProfileFileCSIDriver from the provided source ManagedClusterStorageProfileFileCSIDriver
func (driver *ManagedClusterStorageProfileFileCSIDriver) AssignProperties_From_ManagedClusterStorageProfileFileCSIDriver(source *storage.ManagedClusterStorageProfileFileCSIDriver) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		driver.Enabled = &enabled
	} else {
		driver.Enabled = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterStorageProfileFileCSIDriver populates the provided destination ManagedClusterStorageProfileFileCSIDriver from our ManagedClusterStorageProfileFileCSIDriver
func (driver *ManagedClusterStorageProfileFileCSIDriver) AssignProperties_To_ManagedClusterStorageProfileFileCSIDriver(destination *storage.ManagedClusterStorageProfileFileCSIDriver) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if driver.Enabled != nil {
		enabled := *driver.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
}

// AzureFile CSI Driver settings for the storage profile.
type ManagedClusterStorageProfileFileCSIDriver_STATUS struct {
	// Enabled: Whether to enable AzureFile CSI Driver. The default value is true.
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterStorageProfileFileCSIDriver_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (driver *ManagedClusterStorageProfileFileCSIDriver_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterStorageProfileFileCSIDriver_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (driver *ManagedClusterStorageProfileFileCSIDriver_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterStorageProfileFileCSIDriver_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterStorageProfileFileCSIDriver_STATUS, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		driver.Enabled = &enabled
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterStorageProfileFileCSIDriver_STATUS populates our ManagedClusterStorageProfileFileCSIDriver_STATUS from the provided source ManagedClusterStorageProfileFileCSIDriver_STATUS
func (driver *ManagedClusterStorageProfileFileCSIDriver_STATUS) AssignProperties_From_ManagedClusterStorageProfileFileCSIDriver_STATUS(source *storage.ManagedClusterStorageProfileFileCSIDriver_STATUS) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		driver.Enabled = &enabled
	} else {
		driver.Enabled = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterStorageProfileFileCSIDriver_STATUS populates the provided destination ManagedClusterStorageProfileFileCSIDriver_STATUS from our ManagedClusterStorageProfileFileCSIDriver_STATUS
func (driver *ManagedClusterStorageProfileFileCSIDriver_STATUS) AssignProperties_To_ManagedClusterStorageProfileFileCSIDriver_STATUS(destination *storage.ManagedClusterStorageProfileFileCSIDriver_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if driver.Enabled != nil {
		enabled := *driver.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
}

// Snapshot Controller settings for the storage profile.
type ManagedClusterStorageProfileSnapshotController struct {
	// Enabled: Whether to enable Snapshot Controller. The default value is true.
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterStorageProfileSnapshotController{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (controller *ManagedClusterStorageProfileSnapshotController) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if controller == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterStorageProfileSnapshotController{}

	// Set property "Enabled":
	if controller.Enabled != nil {
		enabled := *controller.Enabled
		result.Enabled = &enabled
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (controller *ManagedClusterStorageProfileSnapshotController) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterStorageProfileSnapshotController{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (controller *ManagedClusterStorageProfileSnapshotController) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterStorageProfileSnapshotController)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterStorageProfileSnapshotController, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		controller.Enabled = &enabled
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterStorageProfileSnapshotController populates our ManagedClusterStorageProfileSnapshotController from the provided source ManagedClusterStorageProfileSnapshotController
func (controller *ManagedClusterStorageProfileSnapshotController) AssignProperties_From_ManagedClusterStorageProfileSnapshotController(source *storage.ManagedClusterStorageProfileSnapshotController) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		controller.Enabled = &enabled
	} else {
		controller.Enabled = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterStorageProfileSnapshotController populates the provided destination ManagedClusterStorageProfileSnapshotController from our ManagedClusterStorageProfileSnapshotController
func (controller *ManagedClusterStorageProfileSnapshotController) AssignProperties_To_ManagedClusterStorageProfileSnapshotController(destination *storage.ManagedClusterStorageProfileSnapshotController) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if controller.Enabled != nil {
		enabled := *controller.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
}

// Snapshot Controller settings for the storage profile.
type ManagedClusterStorageProfileSnapshotController_STATUS struct {
	// Enabled: Whether to enable Snapshot Controller. The default value is true.
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterStorageProfileSnapshotController_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (controller *ManagedClusterStorageProfileSnapshotController_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterStorageProfileSnapshotController_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (controller *ManagedClusterStorageProfileSnapshotController_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterStorageProfileSnapshotController_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterStorageProfileSnapshotController_STATUS, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		controller.Enabled = &enabled
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterStorageProfileSnapshotController_STATUS populates our ManagedClusterStorageProfileSnapshotController_STATUS from the provided source ManagedClusterStorageProfileSnapshotController_STATUS
func (controller *ManagedClusterStorageProfileSnapshotController_STATUS) AssignProperties_From_ManagedClusterStorageProfileSnapshotController_STATUS(source *storage.ManagedClusterStorageProfileSnapshotController_STATUS) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		controller.Enabled = &enabled
	} else {
		controller.Enabled = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterStorageProfileSnapshotController_STATUS populates the provided destination ManagedClusterStorageProfileSnapshotController_STATUS from our ManagedClusterStorageProfileSnapshotController_STATUS
func (controller *ManagedClusterStorageProfileSnapshotController_STATUS) AssignProperties_To_ManagedClusterStorageProfileSnapshotController_STATUS(destination *storage.ManagedClusterStorageProfileSnapshotController_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if controller.Enabled != nil {
		enabled := *controller.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
}

// +kubebuilder:validation:Enum={"None","Windows_Server"}
type ManagedClusterWindowsProfile_LicenseType string

const (
	ManagedClusterWindowsProfile_LicenseType_None           = ManagedClusterWindowsProfile_LicenseType("None")
	ManagedClusterWindowsProfile_LicenseType_Windows_Server = ManagedClusterWindowsProfile_LicenseType("Windows_Server")
)

// Mapping from string to ManagedClusterWindowsProfile_LicenseType
var managedClusterWindowsProfile_LicenseType_Values = map[string]ManagedClusterWindowsProfile_LicenseType{
	"none":           ManagedClusterWindowsProfile_LicenseType_None,
	"windows_server": ManagedClusterWindowsProfile_LicenseType_Windows_Server,
}

type ManagedClusterWindowsProfile_LicenseType_STATUS string

const (
	ManagedClusterWindowsProfile_LicenseType_STATUS_None           = ManagedClusterWindowsProfile_LicenseType_STATUS("None")
	ManagedClusterWindowsProfile_LicenseType_STATUS_Windows_Server = ManagedClusterWindowsProfile_LicenseType_STATUS("Windows_Server")
)

// Mapping from string to ManagedClusterWindowsProfile_LicenseType_STATUS
var managedClusterWindowsProfile_LicenseType_STATUS_Values = map[string]ManagedClusterWindowsProfile_LicenseType_STATUS{
	"none":           ManagedClusterWindowsProfile_LicenseType_STATUS_None,
	"windows_server": ManagedClusterWindowsProfile_LicenseType_STATUS_Windows_Server,
}

// KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile.
type ManagedClusterWorkloadAutoScalerProfileKeda struct {
	// +kubebuilder:validation:Required
	// Enabled: Whether to enable KEDA.
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterWorkloadAutoScalerProfileKeda{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (keda *ManagedClusterWorkloadAutoScalerProfileKeda) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if keda == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterWorkloadAutoScalerProfileKeda{}

	// Set property "Enabled":
	if keda.Enabled != nil {
		enabled := *keda.Enabled
		result.Enabled = &enabled
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (keda *ManagedClusterWorkloadAutoScalerProfileKeda) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterWorkloadAutoScalerProfileKeda{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (keda *ManagedClusterWorkloadAutoScalerProfileKeda) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterWorkloadAutoScalerProfileKeda)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterWorkloadAutoScalerProfileKeda, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		keda.Enabled = &enabled
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterWorkloadAutoScalerProfileKeda populates our ManagedClusterWorkloadAutoScalerProfileKeda from the provided source ManagedClusterWorkloadAutoScalerProfileKeda
func (keda *ManagedClusterWorkloadAutoScalerProfileKeda) AssignProperties_From_ManagedClusterWorkloadAutoScalerProfileKeda(source *storage.ManagedClusterWorkloadAutoScalerProfileKeda) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		keda.Enabled = &enabled
	} else {
		keda.Enabled = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterWorkloadAutoScalerProfileKeda populates the provided destination ManagedClusterWorkloadAutoScalerProfileKeda from our ManagedClusterWorkloadAutoScalerProfileKeda
func (keda *ManagedClusterWorkloadAutoScalerProfileKeda) AssignProperties_To_ManagedClusterWorkloadAutoScalerProfileKeda(destination *storage.ManagedClusterWorkloadAutoScalerProfileKeda) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if keda.Enabled != nil {
		enabled := *keda.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
}

// KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile.
type ManagedClusterWorkloadAutoScalerProfileKeda_STATUS struct {
	// Enabled: Whether to enable KEDA.
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterWorkloadAutoScalerProfileKeda_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (keda *ManagedClusterWorkloadAutoScalerProfileKeda_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterWorkloadAutoScalerProfileKeda_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (keda *ManagedClusterWorkloadAutoScalerProfileKeda_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterWorkloadAutoScalerProfileKeda_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterWorkloadAutoScalerProfileKeda_STATUS, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		keda.Enabled = &enabled
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterWorkloadAutoScalerProfileKeda_STATUS populates our ManagedClusterWorkloadAutoScalerProfileKeda_STATUS from the provided source ManagedClusterWorkloadAutoScalerProfileKeda_STATUS
func (keda *ManagedClusterWorkloadAutoScalerProfileKeda_STATUS) AssignProperties_From_ManagedClusterWorkloadAutoScalerProfileKeda_STATUS(source *storage.ManagedClusterWorkloadAutoScalerProfileKeda_STATUS) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		keda.Enabled = &enabled
	} else {
		keda.Enabled = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterWorkloadAutoScalerProfileKeda_STATUS populates the provided destination ManagedClusterWorkloadAutoScalerProfileKeda_STATUS from our ManagedClusterWorkloadAutoScalerProfileKeda_STATUS
func (keda *ManagedClusterWorkloadAutoScalerProfileKeda_STATUS) AssignProperties_To_ManagedClusterWorkloadAutoScalerProfileKeda_STATUS(destination *storage.ManagedClusterWorkloadAutoScalerProfileKeda_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if keda.Enabled != nil {
		enabled := *keda.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
}

// VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile.
type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler struct {
	// +kubebuilder:validation:Required
	// Enabled: Whether to enable VPA. Default value is false.
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (autoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if autoscaler == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler{}

	// Set property "Enabled":
	if autoscaler.Enabled != nil {
		enabled := *autoscaler.Enabled
		result.Enabled = &enabled
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (autoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (autoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		autoscaler.Enabled = &enabled
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler populates our ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler from the provided source ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler
func (autoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) AssignProperties_From_ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler(source *storage.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		autoscaler.Enabled = &enabled
	} else {
		autoscaler.Enabled = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler populates the provided destination ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler from our ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler
func (autoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) AssignProperties_To_ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler(destination *storage.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if autoscaler.Enabled != nil {
		enabled := *autoscaler.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
}

// VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile.
type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS struct {
	// Enabled: Whether to enable VPA. Default value is false.
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (autoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (autoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		autoscaler.Enabled = &enabled
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS populates our ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS from the provided source ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS
func (autoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS) AssignProperties_From_ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS(source *storage.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		autoscaler.Enabled = &enabled
	} else {
		autoscaler.Enabled = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS populates the provided destination ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS from our ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS
func (autoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS) AssignProperties_To_ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS(destination *storage.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if autoscaler.Enabled != nil {
		enabled := *autoscaler.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
}

// +kubebuilder:validation:Enum={"azure","kubenet","none"}
type NetworkPlugin string

const (
	NetworkPlugin_Azure   = NetworkPlugin("azure")
	NetworkPlugin_Kubenet = NetworkPlugin("kubenet")
	NetworkPlugin_None    = NetworkPlugin("none")
)

// Mapping from string to NetworkPlugin
var networkPlugin_Values = map[string]NetworkPlugin{
	"azure":   NetworkPlugin_Azure,
	"kubenet": NetworkPlugin_Kubenet,
	"none":    NetworkPlugin_None,
}

type PowerState_Code_STATUS string

const (
	PowerState_Code_STATUS_Running = PowerState_Code_STATUS("Running")
	PowerState_Code_STATUS_Stopped = PowerState_Code_STATUS("Stopped")
)

// Mapping from string to PowerState_Code_STATUS
var powerState_Code_STATUS_Values = map[string]PowerState_Code_STATUS{
	"running": PowerState_Code_STATUS_Running,
	"stopped": PowerState_Code_STATUS_Stopped,
}

// +kubebuilder:validation:Enum={"Disabled","Istio"}
type ServiceMeshProfile_Mode string

const (
	ServiceMeshProfile_Mode_Disabled = ServiceMeshProfile_Mode("Disabled")
	ServiceMeshProfile_Mode_Istio    = ServiceMeshProfile_Mode("Istio")
)

// Mapping from string to ServiceMeshProfile_Mode
var serviceMeshProfile_Mode_Values = map[string]ServiceMeshProfile_Mode{
	"disabled": ServiceMeshProfile_Mode_Disabled,
	"istio":    ServiceMeshProfile_Mode_Istio,
}

type ServiceMeshProfile_Mode_STATUS string

const (
	ServiceMeshProfile_Mode_STATUS_Disabled = ServiceMeshProfile_Mode_STATUS("Disabled")
	ServiceMeshProfile_Mode_STATUS_Istio    = ServiceMeshProfile_Mode_STATUS("Istio")
)

// Mapping from string to ServiceMeshProfile_Mode_STATUS
var serviceMeshProfile_Mode_STATUS_Values = map[string]ServiceMeshProfile_Mode_STATUS{
	"disabled": ServiceMeshProfile_Mode_STATUS_Disabled,
	"istio":    ServiceMeshProfile_Mode_STATUS_Istio,
}

type SystemData_CreatedByType_STATUS string

const (
	SystemData_CreatedByType_STATUS_Application     = SystemData_CreatedByType_STATUS("Application")
	SystemData_CreatedByType_STATUS_Key             = SystemData_CreatedByType_STATUS("Key")
	SystemData_CreatedByType_STATUS_ManagedIdentity = SystemData_CreatedByType_STATUS("ManagedIdentity")
	SystemData_CreatedByType_STATUS_User            = SystemData_CreatedByType_STATUS("User")
)

// Mapping from string to SystemData_CreatedByType_STATUS
var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{
	"application":     SystemData_CreatedByType_STATUS_Application,
	"key":             SystemData_CreatedByType_STATUS_Key,
	"managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity,
	"user":            SystemData_CreatedByType_STATUS_User,
}

type SystemData_LastModifiedByType_STATUS string

const (
	SystemData_LastModifiedByType_STATUS_Application     = SystemData_LastModifiedByType_STATUS("Application")
	SystemData_LastModifiedByType_STATUS_Key             = SystemData_LastModifiedByType_STATUS("Key")
	SystemData_LastModifiedByType_STATUS_ManagedIdentity = SystemData_LastModifiedByType_STATUS("ManagedIdentity")
	SystemData_LastModifiedByType_STATUS_User            = SystemData_LastModifiedByType_STATUS("User")
)

// Mapping from string to SystemData_LastModifiedByType_STATUS
var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{
	"application":     SystemData_LastModifiedByType_STATUS_Application,
	"key":             SystemData_LastModifiedByType_STATUS_Key,
	"managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity,
	"user":            SystemData_LastModifiedByType_STATUS_User,
}

// Settings for overrides when upgrading a cluster.
type UpgradeOverrideSettings struct {
	// ForceUpgrade: Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade
	// protections such as checking for deprecated API usage. Enable this option only with caution.
	ForceUpgrade *bool `json:"forceUpgrade,omitempty"`

	// Until: Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the
	// effectiveness won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set
	// by default. It must be set for the overrides to take effect.
	Until *string `json:"until,omitempty"`
}

var _ genruntime.ARMTransformer = &UpgradeOverrideSettings{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (settings *UpgradeOverrideSettings) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if settings == nil {
		return nil, nil
	}
	result := &arm.UpgradeOverrideSettings{}

	// Set property "ForceUpgrade":
	if settings.ForceUpgrade != nil {
		forceUpgrade := *settings.ForceUpgrade
		result.ForceUpgrade = &forceUpgrade
	}

	// Set property "Until":
	if settings.Until != nil {
		until := *settings.Until
		result.Until = &until
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (settings *UpgradeOverrideSettings) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.UpgradeOverrideSettings{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (settings *UpgradeOverrideSettings) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.UpgradeOverrideSettings)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.UpgradeOverrideSettings, got %T", armInput)
	}

	// Set property "ForceUpgrade":
	if typedInput.ForceUpgrade != nil {
		forceUpgrade := *typedInput.ForceUpgrade
		settings.ForceUpgrade = &forceUpgrade
	}

	// Set property "Until":
	if typedInput.Until != nil {
		until := *typedInput.Until
		settings.Until = &until
	}

	// No error
	return nil
}

// AssignProperties_From_UpgradeOverrideSettings populates our UpgradeOverrideSettings from the provided source UpgradeOverrideSettings
func (settings *UpgradeOverrideSettings) AssignProperties_From_UpgradeOverrideSettings(source *storage.UpgradeOverrideSettings) error {

	// ForceUpgrade
	if source.ForceUpgrade != nil {
		forceUpgrade := *source.ForceUpgrade
		settings.ForceUpgrade = &forceUpgrade
	} else {
		settings.ForceUpgrade = nil
	}

	// Until
	settings.Until = genruntime.ClonePointerToString(source.Until)

	// No error
	return nil
}

// AssignProperties_To_UpgradeOverrideSettings populates the provided destination UpgradeOverrideSettings from our UpgradeOverrideSettings
func (settings *UpgradeOverrideSettings) AssignProperties_To_UpgradeOverrideSettings(destination *storage.UpgradeOverrideSettings) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// ForceUpgrade
	if settings.ForceUpgrade != nil {
		forceUpgrade := *settings.ForceUpgrade
		destination.ForceUpgrade = &forceUpgrade
	} else {
		destination.ForceUpgrade = nil
	}

	// Until
	destination.Until = genruntime.ClonePointerToString(settings.Until)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Settings for overrides when upgrading a cluster.
type UpgradeOverrideSettings_STATUS struct {
	// ForceUpgrade: Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade
	// protections such as checking for deprecated API usage. Enable this option only with caution.
	ForceUpgrade *bool `json:"forceUpgrade,omitempty"`

	// Until: Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the
	// effectiveness won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set
	// by default. It must be set for the overrides to take effect.
	Until *string `json:"until,omitempty"`
}

var _ genruntime.FromARMConverter = &UpgradeOverrideSettings_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (settings *UpgradeOverrideSettings_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.UpgradeOverrideSettings_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (settings *UpgradeOverrideSettings_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.UpgradeOverrideSettings_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.UpgradeOverrideSettings_STATUS, got %T", armInput)
	}

	// Set property "ForceUpgrade":
	if typedInput.ForceUpgrade != nil {
		forceUpgrade := *typedInput.ForceUpgrade
		settings.ForceUpgrade = &forceUpgrade
	}

	// Set property "Until":
	if typedInput.Until != nil {
		until := *typedInput.Until
		settings.Until = &until
	}

	// No error
	return nil
}

// AssignProperties_From_UpgradeOverrideSettings_STATUS populates our UpgradeOverrideSettings_STATUS from the provided source UpgradeOverrideSettings_STATUS
func (settings *UpgradeOverrideSettings_STATUS) AssignProperties_From_UpgradeOverrideSettings_STATUS(source *storage.UpgradeOverrideSettings_STATUS) error {

	// ForceUpgrade
	if source.ForceUpgrade != nil {
		forceUpgrade := *source.ForceUpgrade
		settings.ForceUpgrade = &forceUpgrade
	} else {
		settings.ForceUpgrade = nil
	}

	// Until
	settings.Until = genruntime.ClonePointerToString(source.Until)

	// No error
	return nil
}

// AssignProperties_To_UpgradeOverrideSettings_STATUS populates the provided destination UpgradeOverrideSettings_STATUS from our UpgradeOverrideSettings_STATUS
func (settings *UpgradeOverrideSettings_STATUS) AssignProperties_To_UpgradeOverrideSettings_STATUS(destination *storage.UpgradeOverrideSettings_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// ForceUpgrade
	if settings.ForceUpgrade != nil {
		forceUpgrade := *settings.ForceUpgrade
		destination.ForceUpgrade = &forceUpgrade
	} else {
		destination.ForceUpgrade = nil
	}

	// Until
	destination.Until = genruntime.ClonePointerToString(settings.Until)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Information about the user assigned identity for the resource
type UserAssignedIdentityDetails struct {
	Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"`
}

// AssignProperties_From_UserAssignedIdentityDetails populates our UserAssignedIdentityDetails from the provided source UserAssignedIdentityDetails
func (details *UserAssignedIdentityDetails) AssignProperties_From_UserAssignedIdentityDetails(source *storage.UserAssignedIdentityDetails) error {

	// Reference
	details.Reference = source.Reference.Copy()

	// No error
	return nil
}

// AssignProperties_To_UserAssignedIdentityDetails populates the provided destination UserAssignedIdentityDetails from our UserAssignedIdentityDetails
func (details *UserAssignedIdentityDetails) AssignProperties_To_UserAssignedIdentityDetails(destination *storage.UserAssignedIdentityDetails) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Reference
	destination.Reference = details.Reference.Copy()

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Windows gMSA Profile in the managed cluster.
type WindowsGmsaProfile struct {
	// DnsServer: Specifies the DNS server for Windows gMSA.
	// Set it to empty if you have configured the DNS server in the vnet which is used to create the managed cluster.
	DnsServer *string `json:"dnsServer,omitempty"`

	// Enabled: Specifies whether to enable Windows gMSA in the managed cluster.
	Enabled *bool `json:"enabled,omitempty"`

	// RootDomainName: Specifies the root domain name for Windows gMSA.
	// Set it to empty if you have configured the DNS server in the vnet which is used to create the managed cluster.
	RootDomainName *string `json:"rootDomainName,omitempty"`
}

var _ genruntime.ARMTransformer = &WindowsGmsaProfile{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (profile *WindowsGmsaProfile) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if profile == nil {
		return nil, nil
	}
	result := &arm.WindowsGmsaProfile{}

	// Set property "DnsServer":
	if profile.DnsServer != nil {
		dnsServer := *profile.DnsServer
		result.DnsServer = &dnsServer
	}

	// Set property "Enabled":
	if profile.Enabled != nil {
		enabled := *profile.Enabled
		result.Enabled = &enabled
	}

	// Set property "RootDomainName":
	if profile.RootDomainName != nil {
		rootDomainName := *profile.RootDomainName
		result.RootDomainName = &rootDomainName
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *WindowsGmsaProfile) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.WindowsGmsaProfile{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *WindowsGmsaProfile) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.WindowsGmsaProfile)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.WindowsGmsaProfile, got %T", armInput)
	}

	// Set property "DnsServer":
	if typedInput.DnsServer != nil {
		dnsServer := *typedInput.DnsServer
		profile.DnsServer = &dnsServer
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		profile.Enabled = &enabled
	}

	// Set property "RootDomainName":
	if typedInput.RootDomainName != nil {
		rootDomainName := *typedInput.RootDomainName
		profile.RootDomainName = &rootDomainName
	}

	// No error
	return nil
}

// AssignProperties_From_WindowsGmsaProfile populates our WindowsGmsaProfile from the provided source WindowsGmsaProfile
func (profile *WindowsGmsaProfile) AssignProperties_From_WindowsGmsaProfile(source *storage.WindowsGmsaProfile) error {

	// DnsServer
	profile.DnsServer = genruntime.ClonePointerToString(source.DnsServer)

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		profile.Enabled = &enabled
	} else {
		profile.Enabled = nil
	}

	// RootDomainName
	profile.RootDomainName = genruntime.ClonePointerToString(source.RootDomainName)

	// No error
	return nil
}

// AssignProperties_To_WindowsGmsaProfile populates the provided destination WindowsGmsaProfile from our WindowsGmsaProfile
func (profile *WindowsGmsaProfile) AssignProperties_To_WindowsGmsaProfile(destination *storage.WindowsGmsaProfile) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// DnsServer
	destination.DnsServer = genruntime.ClonePointerToString(profile.DnsServer)

	// Enabled
	if profile.Enabled != nil {
		enabled := *profile.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

	// RootDomainName
	destination.RootDomainName = genruntime.ClonePointerToString(profile.RootDomainName)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Windows gMSA Profile in the managed cluster.
type WindowsGmsaProfile_STATUS struct {
	// DnsServer: Specifies the DNS server for Windows gMSA.
	// Set it to empty if you have configured the DNS server in the vnet which is used to create the managed cluster.
	DnsServer *string `json:"dnsServer,omitempty"`

	// Enabled: Specifies whether to enable Windows gMSA in the managed cluster.
	Enabled *bool `json:"enabled,omitempty"`

	// RootDomainName: Specifies the root domain name for Windows gMSA.
	// Set it to empty if you have configured the DNS server in the vnet which is used to create the managed cluster.
	RootDomainName *string `json:"rootDomainName,omitempty"`
}

var _ genruntime.FromARMConverter = &WindowsGmsaProfile_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *WindowsGmsaProfile_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.WindowsGmsaProfile_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *WindowsGmsaProfile_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.WindowsGmsaProfile_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.WindowsGmsaProfile_STATUS, got %T", armInput)
	}

	// Set property "DnsServer":
	if typedInput.DnsServer != nil {
		dnsServer := *typedInput.DnsServer
		profile.DnsServer = &dnsServer
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		profile.Enabled = &enabled
	}

	// Set property "RootDomainName":
	if typedInput.RootDomainName != nil {
		rootDomainName := *typedInput.RootDomainName
		profile.RootDomainName = &rootDomainName
	}

	// No error
	return nil
}

// AssignProperties_From_WindowsGmsaProfile_STATUS populates our WindowsGmsaProfile_STATUS from the provided source WindowsGmsaProfile_STATUS
func (profile *WindowsGmsaProfile_STATUS) AssignProperties_From_WindowsGmsaProfile_STATUS(source *storage.WindowsGmsaProfile_STATUS) error {

	// DnsServer
	profile.DnsServer = genruntime.ClonePointerToString(source.DnsServer)

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		profile.Enabled = &enabled
	} else {
		profile.Enabled = nil
	}

	// RootDomainName
	profile.RootDomainName = genruntime.ClonePointerToString(source.RootDomainName)

	// No error
	return nil
}

// AssignProperties_To_WindowsGmsaProfile_STATUS populates the provided destination WindowsGmsaProfile_STATUS from our WindowsGmsaProfile_STATUS
func (profile *WindowsGmsaProfile_STATUS) AssignProperties_To_WindowsGmsaProfile_STATUS(destination *storage.WindowsGmsaProfile_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// DnsServer
	destination.DnsServer = genruntime.ClonePointerToString(profile.DnsServer)

	// Enabled
	if profile.Enabled != nil {
		enabled := *profile.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

	// RootDomainName
	destination.RootDomainName = genruntime.ClonePointerToString(profile.RootDomainName)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"Private","Public"}
type AzureKeyVaultKms_KeyVaultNetworkAccess string

const (
	AzureKeyVaultKms_KeyVaultNetworkAccess_Private = AzureKeyVaultKms_KeyVaultNetworkAccess("Private")
	AzureKeyVaultKms_KeyVaultNetworkAccess_Public  = AzureKeyVaultKms_KeyVaultNetworkAccess("Public")
)

// Mapping from string to AzureKeyVaultKms_KeyVaultNetworkAccess
var azureKeyVaultKms_KeyVaultNetworkAccess_Values = map[string]AzureKeyVaultKms_KeyVaultNetworkAccess{
	"private": AzureKeyVaultKms_KeyVaultNetworkAccess_Private,
	"public":  AzureKeyVaultKms_KeyVaultNetworkAccess_Public,
}

type AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS string

const (
	AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Private = AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS("Private")
	AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Public  = AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS("Public")
)

// Mapping from string to AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS
var azureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Values = map[string]AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS{
	"private": AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Private,
	"public":  AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Public,
}

// Contains information about SSH certificate public key data.
type ContainerServiceSshPublicKey struct {
	// +kubebuilder:validation:Required
	// KeyData: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or
	// without headers.
	KeyData *string `json:"keyData,omitempty"`
}

var _ genruntime.ARMTransformer = &ContainerServiceSshPublicKey{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (publicKey *ContainerServiceSshPublicKey) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if publicKey == nil {
		return nil, nil
	}
	result := &arm.ContainerServiceSshPublicKey{}

	// Set property "KeyData":
	if publicKey.KeyData != nil {
		keyData := *publicKey.KeyData
		result.KeyData = &keyData
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (publicKey *ContainerServiceSshPublicKey) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ContainerServiceSshPublicKey{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (publicKey *ContainerServiceSshPublicKey) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ContainerServiceSshPublicKey)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ContainerServiceSshPublicKey, got %T", armInput)
	}

	// Set property "KeyData":
	if typedInput.KeyData != nil {
		keyData := *typedInput.KeyData
		publicKey.KeyData = &keyData
	}

	// No error
	return nil
}

// AssignProperties_From_ContainerServiceSshPublicKey populates our ContainerServiceSshPublicKey from the provided source ContainerServiceSshPublicKey
func (publicKey *ContainerServiceSshPublicKey) AssignProperties_From_ContainerServiceSshPublicKey(source *storage.ContainerServiceSshPublicKey) error {

	// KeyData
	publicKey.KeyData = genruntime.ClonePointerToString(source.KeyData)

	// No error
	return nil
}

// AssignProperties_To_ContainerServiceSshPublicKey populates the provided destination ContainerServiceSshPublicKey from our ContainerServiceSshPublicKey
func (publicKey *ContainerServiceSshPublicKey) AssignProperties_To_ContainerServiceSshPublicKey(destination *storage.ContainerServiceSshPublicKey) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// KeyData
	destination.KeyData = genruntime.ClonePointerToString(publicKey.KeyData)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Contains information about SSH certificate public key data.
type ContainerServiceSshPublicKey_STATUS struct {
	// KeyData: Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or
	// without headers.
	KeyData *string `json:"keyData,omitempty"`
}

var _ genruntime.FromARMConverter = &ContainerServiceSshPublicKey_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (publicKey *ContainerServiceSshPublicKey_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ContainerServiceSshPublicKey_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (publicKey *ContainerServiceSshPublicKey_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ContainerServiceSshPublicKey_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ContainerServiceSshPublicKey_STATUS, got %T", armInput)
	}

	// Set property "KeyData":
	if typedInput.KeyData != nil {
		keyData := *typedInput.KeyData
		publicKey.KeyData = &keyData
	}

	// No error
	return nil
}

// AssignProperties_From_ContainerServiceSshPublicKey_STATUS populates our ContainerServiceSshPublicKey_STATUS from the provided source ContainerServiceSshPublicKey_STATUS
func (publicKey *ContainerServiceSshPublicKey_STATUS) AssignProperties_From_ContainerServiceSshPublicKey_STATUS(source *storage.ContainerServiceSshPublicKey_STATUS) error {

	// KeyData
	publicKey.KeyData = genruntime.ClonePointerToString(source.KeyData)

	// No error
	return nil
}

// AssignProperties_To_ContainerServiceSshPublicKey_STATUS populates the provided destination ContainerServiceSshPublicKey_STATUS from our ContainerServiceSshPublicKey_STATUS
func (publicKey *ContainerServiceSshPublicKey_STATUS) AssignProperties_To_ContainerServiceSshPublicKey_STATUS(destination *storage.ContainerServiceSshPublicKey_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// KeyData
	destination.KeyData = genruntime.ClonePointerToString(publicKey.KeyData)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as described
// here https://aka.ms/asm-plugin-ca
type IstioCertificateAuthority struct {
	// Plugin: Plugin certificates information for Service Mesh.
	Plugin *IstioPluginCertificateAuthority `json:"plugin,omitempty"`
}

var _ genruntime.ARMTransformer = &IstioCertificateAuthority{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (authority *IstioCertificateAuthority) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if authority == nil {
		return nil, nil
	}
	result := &arm.IstioCertificateAuthority{}

	// Set property "Plugin":
	if authority.Plugin != nil {
		plugin_ARM, err := authority.Plugin.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		plugin := *plugin_ARM.(*arm.IstioPluginCertificateAuthority)
		result.Plugin = &plugin
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (authority *IstioCertificateAuthority) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.IstioCertificateAuthority{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (authority *IstioCertificateAuthority) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.IstioCertificateAuthority)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IstioCertificateAuthority, got %T", armInput)
	}

	// Set property "Plugin":
	if typedInput.Plugin != nil {
		var plugin1 IstioPluginCertificateAuthority
		err := plugin1.PopulateFromARM(owner, *typedInput.Plugin)
		if err != nil {
			return err
		}
		plugin := plugin1
		authority.Plugin = &plugin
	}

	// No error
	return nil
}

// AssignProperties_From_IstioCertificateAuthority populates our IstioCertificateAuthority from the provided source IstioCertificateAuthority
func (authority *IstioCertificateAuthority) AssignProperties_From_IstioCertificateAuthority(source *storage.IstioCertificateAuthority) error {

	// Plugin
	if source.Plugin != nil {
		var plugin IstioPluginCertificateAuthority
		err := plugin.AssignProperties_From_IstioPluginCertificateAuthority(source.Plugin)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_IstioPluginCertificateAuthority() to populate field Plugin")
		}
		authority.Plugin = &plugin
	} else {
		authority.Plugin = nil
	}

	// No error
	return nil
}

// AssignProperties_To_IstioCertificateAuthority populates the provided destination IstioCertificateAuthority from our IstioCertificateAuthority
func (authority *IstioCertificateAuthority) AssignProperties_To_IstioCertificateAuthority(destination *storage.IstioCertificateAuthority) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Plugin
	if authority.Plugin != nil {
		var plugin storage.IstioPluginCertificateAuthority
		err := authority.Plugin.AssignProperties_To_IstioPluginCertificateAuthority(&plugin)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_IstioPluginCertificateAuthority() to populate field Plugin")
		}
		destination.Plugin = &plugin
	} else {
		destination.Plugin = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as described
// here https://aka.ms/asm-plugin-ca
type IstioCertificateAuthority_STATUS struct {
	// Plugin: Plugin certificates information for Service Mesh.
	Plugin *IstioPluginCertificateAuthority_STATUS `json:"plugin,omitempty"`
}

var _ genruntime.FromARMConverter = &IstioCertificateAuthority_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (authority *IstioCertificateAuthority_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.IstioCertificateAuthority_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (authority *IstioCertificateAuthority_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.IstioCertificateAuthority_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IstioCertificateAuthority_STATUS, got %T", armInput)
	}

	// Set property "Plugin":
	if typedInput.Plugin != nil {
		var plugin1 IstioPluginCertificateAuthority_STATUS
		err := plugin1.PopulateFromARM(owner, *typedInput.Plugin)
		if err != nil {
			return err
		}
		plugin := plugin1
		authority.Plugin = &plugin
	}

	// No error
	return nil
}

// AssignProperties_From_IstioCertificateAuthority_STATUS populates our IstioCertificateAuthority_STATUS from the provided source IstioCertificateAuthority_STATUS
func (authority *IstioCertificateAuthority_STATUS) AssignProperties_From_IstioCertificateAuthority_STATUS(source *storage.IstioCertificateAuthority_STATUS) error {

	// Plugin
	if source.Plugin != nil {
		var plugin IstioPluginCertificateAuthority_STATUS
		err := plugin.AssignProperties_From_IstioPluginCertificateAuthority_STATUS(source.Plugin)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_IstioPluginCertificateAuthority_STATUS() to populate field Plugin")
		}
		authority.Plugin = &plugin
	} else {
		authority.Plugin = nil
	}

	// No error
	return nil
}

// AssignProperties_To_IstioCertificateAuthority_STATUS populates the provided destination IstioCertificateAuthority_STATUS from our IstioCertificateAuthority_STATUS
func (authority *IstioCertificateAuthority_STATUS) AssignProperties_To_IstioCertificateAuthority_STATUS(destination *storage.IstioCertificateAuthority_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Plugin
	if authority.Plugin != nil {
		var plugin storage.IstioPluginCertificateAuthority_STATUS
		err := authority.Plugin.AssignProperties_To_IstioPluginCertificateAuthority_STATUS(&plugin)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_IstioPluginCertificateAuthority_STATUS() to populate field Plugin")
		}
		destination.Plugin = &plugin
	} else {
		destination.Plugin = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Istio components configuration.
type IstioComponents struct {
	// EgressGateways: Istio egress gateways.
	EgressGateways []IstioEgressGateway `json:"egressGateways,omitempty"`

	// IngressGateways: Istio ingress gateways.
	IngressGateways []IstioIngressGateway `json:"ingressGateways,omitempty"`
}

var _ genruntime.ARMTransformer = &IstioComponents{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (components *IstioComponents) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if components == nil {
		return nil, nil
	}
	result := &arm.IstioComponents{}

	// Set property "EgressGateways":
	for _, item := range components.EgressGateways {
		item_ARM, err := item.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		result.EgressGateways = append(result.EgressGateways, *item_ARM.(*arm.IstioEgressGateway))
	}

	// Set property "IngressGateways":
	for _, item := range components.IngressGateways {
		item_ARM, err := item.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		result.IngressGateways = append(result.IngressGateways, *item_ARM.(*arm.IstioIngressGateway))
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (components *IstioComponents) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.IstioComponents{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (components *IstioComponents) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.IstioComponents)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IstioComponents, got %T", armInput)
	}

	// Set property "EgressGateways":
	for _, item := range typedInput.EgressGateways {
		var item1 IstioEgressGateway
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		components.EgressGateways = append(components.EgressGateways, item1)
	}

	// Set property "IngressGateways":
	for _, item := range typedInput.IngressGateways {
		var item1 IstioIngressGateway
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		components.IngressGateways = append(components.IngressGateways, item1)
	}

	// No error
	return nil
}

// AssignProperties_From_IstioComponents populates our IstioComponents from the provided source IstioComponents
func (components *IstioComponents) AssignProperties_From_IstioComponents(source *storage.IstioComponents) error {

	// EgressGateways
	if source.EgressGateways != nil {
		egressGatewayList := make([]IstioEgressGateway, len(source.EgressGateways))
		for egressGatewayIndex, egressGatewayItem := range source.EgressGateways {
			var egressGateway IstioEgressGateway
			err := egressGateway.AssignProperties_From_IstioEgressGateway(&egressGatewayItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_IstioEgressGateway() to populate field EgressGateways")
			}
			egressGatewayList[egressGatewayIndex] = egressGateway
		}
		components.EgressGateways = egressGatewayList
	} else {
		components.EgressGateways = nil
	}

	// IngressGateways
	if source.IngressGateways != nil {
		ingressGatewayList := make([]IstioIngressGateway, len(source.IngressGateways))
		for ingressGatewayIndex, ingressGatewayItem := range source.IngressGateways {
			var ingressGateway IstioIngressGateway
			err := ingressGateway.AssignProperties_From_IstioIngressGateway(&ingressGatewayItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_IstioIngressGateway() to populate field IngressGateways")
			}
			ingressGatewayList[ingressGatewayIndex] = ingressGateway
		}
		components.IngressGateways = ingressGatewayList
	} else {
		components.IngressGateways = nil
	}

	// No error
	return nil
}

// AssignProperties_To_IstioComponents populates the provided destination IstioComponents from our IstioComponents
func (components *IstioComponents) AssignProperties_To_IstioComponents(destination *storage.IstioComponents) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// EgressGateways
	if components.EgressGateways != nil {
		egressGatewayList := make([]storage.IstioEgressGateway, len(components.EgressGateways))
		for egressGatewayIndex, egressGatewayItem := range components.EgressGateways {
			var egressGateway storage.IstioEgressGateway
			err := egressGatewayItem.AssignProperties_To_IstioEgressGateway(&egressGateway)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_IstioEgressGateway() to populate field EgressGateways")
			}
			egressGatewayList[egressGatewayIndex] = egressGateway
		}
		destination.EgressGateways = egressGatewayList
	} else {
		destination.EgressGateways = nil
	}

	// IngressGateways
	if components.IngressGateways != nil {
		ingressGatewayList := make([]storage.IstioIngressGateway, len(components.IngressGateways))
		for ingressGatewayIndex, ingressGatewayItem := range components.IngressGateways {
			var ingressGateway storage.IstioIngressGateway
			err := ingressGatewayItem.AssignProperties_To_IstioIngressGateway(&ingressGateway)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_IstioIngressGateway() to populate field IngressGateways")
			}
			ingressGatewayList[ingressGatewayIndex] = ingressGateway
		}
		destination.IngressGateways = ingressGatewayList
	} else {
		destination.IngressGateways = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Istio components configuration.
type IstioComponents_STATUS struct {
	// EgressGateways: Istio egress gateways.
	EgressGateways []IstioEgressGateway_STATUS `json:"egressGateways,omitempty"`

	// IngressGateways: Istio ingress gateways.
	IngressGateways []IstioIngressGateway_STATUS `json:"ingressGateways,omitempty"`
}

var _ genruntime.FromARMConverter = &IstioComponents_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (components *IstioComponents_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.IstioComponents_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (components *IstioComponents_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.IstioComponents_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IstioComponents_STATUS, got %T", armInput)
	}

	// Set property "EgressGateways":
	for _, item := range typedInput.EgressGateways {
		var item1 IstioEgressGateway_STATUS
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		components.EgressGateways = append(components.EgressGateways, item1)
	}

	// Set property "IngressGateways":
	for _, item := range typedInput.IngressGateways {
		var item1 IstioIngressGateway_STATUS
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		components.IngressGateways = append(components.IngressGateways, item1)
	}

	// No error
	return nil
}

// AssignProperties_From_IstioComponents_STATUS populates our IstioComponents_STATUS from the provided source IstioComponents_STATUS
func (components *IstioComponents_STATUS) AssignProperties_From_IstioComponents_STATUS(source *storage.IstioComponents_STATUS) error {

	// EgressGateways
	if source.EgressGateways != nil {
		egressGatewayList := make([]IstioEgressGateway_STATUS, len(source.EgressGateways))
		for egressGatewayIndex, egressGatewayItem := range source.EgressGateways {
			var egressGateway IstioEgressGateway_STATUS
			err := egressGateway.AssignProperties_From_IstioEgressGateway_STATUS(&egressGatewayItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_IstioEgressGateway_STATUS() to populate field EgressGateways")
			}
			egressGatewayList[egressGatewayIndex] = egressGateway
		}
		components.EgressGateways = egressGatewayList
	} else {
		components.EgressGateways = nil
	}

	// IngressGateways
	if source.IngressGateways != nil {
		ingressGatewayList := make([]IstioIngressGateway_STATUS, len(source.IngressGateways))
		for ingressGatewayIndex, ingressGatewayItem := range source.IngressGateways {
			var ingressGateway IstioIngressGateway_STATUS
			err := ingressGateway.AssignProperties_From_IstioIngressGateway_STATUS(&ingressGatewayItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_IstioIngressGateway_STATUS() to populate field IngressGateways")
			}
			ingressGatewayList[ingressGatewayIndex] = ingressGateway
		}
		components.IngressGateways = ingressGatewayList
	} else {
		components.IngressGateways = nil
	}

	// No error
	return nil
}

// AssignProperties_To_IstioComponents_STATUS populates the provided destination IstioComponents_STATUS from our IstioComponents_STATUS
func (components *IstioComponents_STATUS) AssignProperties_To_IstioComponents_STATUS(destination *storage.IstioComponents_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// EgressGateways
	if components.EgressGateways != nil {
		egressGatewayList := make([]storage.IstioEgressGateway_STATUS, len(components.EgressGateways))
		for egressGatewayIndex, egressGatewayItem := range components.EgressGateways {
			var egressGateway storage.IstioEgressGateway_STATUS
			err := egressGatewayItem.AssignProperties_To_IstioEgressGateway_STATUS(&egressGateway)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_IstioEgressGateway_STATUS() to populate field EgressGateways")
			}
			egressGatewayList[egressGatewayIndex] = egressGateway
		}
		destination.EgressGateways = egressGatewayList
	} else {
		destination.EgressGateways = nil
	}

	// IngressGateways
	if components.IngressGateways != nil {
		ingressGatewayList := make([]storage.IstioIngressGateway_STATUS, len(components.IngressGateways))
		for ingressGatewayIndex, ingressGatewayItem := range components.IngressGateways {
			var ingressGateway storage.IstioIngressGateway_STATUS
			err := ingressGatewayItem.AssignProperties_To_IstioIngressGateway_STATUS(&ingressGateway)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_IstioIngressGateway_STATUS() to populate field IngressGateways")
			}
			ingressGatewayList[ingressGatewayIndex] = ingressGateway
		}
		destination.IngressGateways = ingressGatewayList
	} else {
		destination.IngressGateways = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the
// kube-state-metrics pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for
// details.
type ManagedClusterAzureMonitorProfileKubeStateMetrics struct {
	// MetricAnnotationsAllowList: Comma-separated list of Kubernetes annotation keys that will be used in the resource's
	// labels metric (Example: 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). By default the metric
	// contains only resource name and namespace labels.
	MetricAnnotationsAllowList *string `json:"metricAnnotationsAllowList,omitempty"`

	// MetricLabelsAllowlist: Comma-separated list of additional Kubernetes label keys that will be used in the resource's
	// labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the metric contains only
	// resource name and namespace labels.
	MetricLabelsAllowlist *string `json:"metricLabelsAllowlist,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterAzureMonitorProfileKubeStateMetrics{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (metrics *ManagedClusterAzureMonitorProfileKubeStateMetrics) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if metrics == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterAzureMonitorProfileKubeStateMetrics{}

	// Set property "MetricAnnotationsAllowList":
	if metrics.MetricAnnotationsAllowList != nil {
		metricAnnotationsAllowList := *metrics.MetricAnnotationsAllowList
		result.MetricAnnotationsAllowList = &metricAnnotationsAllowList
	}

	// Set property "MetricLabelsAllowlist":
	if metrics.MetricLabelsAllowlist != nil {
		metricLabelsAllowlist := *metrics.MetricLabelsAllowlist
		result.MetricLabelsAllowlist = &metricLabelsAllowlist
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (metrics *ManagedClusterAzureMonitorProfileKubeStateMetrics) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterAzureMonitorProfileKubeStateMetrics{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (metrics *ManagedClusterAzureMonitorProfileKubeStateMetrics) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterAzureMonitorProfileKubeStateMetrics)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterAzureMonitorProfileKubeStateMetrics, got %T", armInput)
	}

	// Set property "MetricAnnotationsAllowList":
	if typedInput.MetricAnnotationsAllowList != nil {
		metricAnnotationsAllowList := *typedInput.MetricAnnotationsAllowList
		metrics.MetricAnnotationsAllowList = &metricAnnotationsAllowList
	}

	// Set property "MetricLabelsAllowlist":
	if typedInput.MetricLabelsAllowlist != nil {
		metricLabelsAllowlist := *typedInput.MetricLabelsAllowlist
		metrics.MetricLabelsAllowlist = &metricLabelsAllowlist
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterAzureMonitorProfileKubeStateMetrics populates our ManagedClusterAzureMonitorProfileKubeStateMetrics from the provided source ManagedClusterAzureMonitorProfileKubeStateMetrics
func (metrics *ManagedClusterAzureMonitorProfileKubeStateMetrics) AssignProperties_From_ManagedClusterAzureMonitorProfileKubeStateMetrics(source *storage.ManagedClusterAzureMonitorProfileKubeStateMetrics) error {

	// MetricAnnotationsAllowList
	metrics.MetricAnnotationsAllowList = genruntime.ClonePointerToString(source.MetricAnnotationsAllowList)

	// MetricLabelsAllowlist
	metrics.MetricLabelsAllowlist = genruntime.ClonePointerToString(source.MetricLabelsAllowlist)

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterAzureMonitorProfileKubeStateMetrics populates the provided destination ManagedClusterAzureMonitorProfileKubeStateMetrics from our ManagedClusterAzureMonitorProfileKubeStateMetrics
func (metrics *ManagedClusterAzureMonitorProfileKubeStateMetrics) AssignProperties_To_ManagedClusterAzureMonitorProfileKubeStateMetrics(destination *storage.ManagedClusterAzureMonitorProfileKubeStateMetrics) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// MetricAnnotationsAllowList
	destination.MetricAnnotationsAllowList = genruntime.ClonePointerToString(metrics.MetricAnnotationsAllowList)

	// MetricLabelsAllowlist
	destination.MetricLabelsAllowlist = genruntime.ClonePointerToString(metrics.MetricLabelsAllowlist)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the
// kube-state-metrics pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for
// details.
type ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS struct {
	// MetricAnnotationsAllowList: Comma-separated list of Kubernetes annotation keys that will be used in the resource's
	// labels metric (Example: 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). By default the metric
	// contains only resource name and namespace labels.
	MetricAnnotationsAllowList *string `json:"metricAnnotationsAllowList,omitempty"`

	// MetricLabelsAllowlist: Comma-separated list of additional Kubernetes label keys that will be used in the resource's
	// labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the metric contains only
	// resource name and namespace labels.
	MetricLabelsAllowlist *string `json:"metricLabelsAllowlist,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (metrics *ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (metrics *ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS, got %T", armInput)
	}

	// Set property "MetricAnnotationsAllowList":
	if typedInput.MetricAnnotationsAllowList != nil {
		metricAnnotationsAllowList := *typedInput.MetricAnnotationsAllowList
		metrics.MetricAnnotationsAllowList = &metricAnnotationsAllowList
	}

	// Set property "MetricLabelsAllowlist":
	if typedInput.MetricLabelsAllowlist != nil {
		metricLabelsAllowlist := *typedInput.MetricLabelsAllowlist
		metrics.MetricLabelsAllowlist = &metricLabelsAllowlist
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS populates our ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS from the provided source ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS
func (metrics *ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS) AssignProperties_From_ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS(source *storage.ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS) error {

	// MetricAnnotationsAllowList
	metrics.MetricAnnotationsAllowList = genruntime.ClonePointerToString(source.MetricAnnotationsAllowList)

	// MetricLabelsAllowlist
	metrics.MetricLabelsAllowlist = genruntime.ClonePointerToString(source.MetricLabelsAllowlist)

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS populates the provided destination ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS from our ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS
func (metrics *ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS) AssignProperties_To_ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS(destination *storage.ManagedClusterAzureMonitorProfileKubeStateMetrics_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// MetricAnnotationsAllowList
	destination.MetricAnnotationsAllowList = genruntime.ClonePointerToString(metrics.MetricAnnotationsAllowList)

	// MetricLabelsAllowlist
	destination.MetricLabelsAllowlist = genruntime.ClonePointerToString(metrics.MetricLabelsAllowlist)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"NodeIP","NodeIPConfiguration"}
type ManagedClusterLoadBalancerProfile_BackendPoolType string

const (
	ManagedClusterLoadBalancerProfile_BackendPoolType_NodeIP              = ManagedClusterLoadBalancerProfile_BackendPoolType("NodeIP")
	ManagedClusterLoadBalancerProfile_BackendPoolType_NodeIPConfiguration = ManagedClusterLoadBalancerProfile_BackendPoolType("NodeIPConfiguration")
)

// Mapping from string to ManagedClusterLoadBalancerProfile_BackendPoolType
var managedClusterLoadBalancerProfile_BackendPoolType_Values = map[string]ManagedClusterLoadBalancerProfile_BackendPoolType{
	"nodeip":              ManagedClusterLoadBalancerProfile_BackendPoolType_NodeIP,
	"nodeipconfiguration": ManagedClusterLoadBalancerProfile_BackendPoolType_NodeIPConfiguration,
}

type ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS string

const (
	ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS_NodeIP              = ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS("NodeIP")
	ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS_NodeIPConfiguration = ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS("NodeIPConfiguration")
)

// Mapping from string to ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS
var managedClusterLoadBalancerProfile_BackendPoolType_STATUS_Values = map[string]ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS{
	"nodeip":              ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS_NodeIP,
	"nodeipconfiguration": ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS_NodeIPConfiguration,
}

type ManagedClusterLoadBalancerProfile_ManagedOutboundIPs struct {
	// +kubebuilder:validation:Maximum=100
	// +kubebuilder:validation:Minimum=1
	// Count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values
	// must be in the range of 1 to 100 (inclusive). The default value is 1.
	Count *int `json:"count,omitempty"`

	// +kubebuilder:validation:Maximum=100
	// +kubebuilder:validation:Minimum=0
	// CountIPv6: The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load balancer. Allowed
	// values must be in the range of 1 to 100 (inclusive). The default value is 0 for single-stack and 1 for dual-stack.
	CountIPv6 *int `json:"countIPv6,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterLoadBalancerProfile_ManagedOutboundIPs{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (iPs *ManagedClusterLoadBalancerProfile_ManagedOutboundIPs) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if iPs == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterLoadBalancerProfile_ManagedOutboundIPs{}

	// Set property "Count":
	if iPs.Count != nil {
		count := *iPs.Count
		result.Count = &count
	}

	// Set property "CountIPv6":
	if iPs.CountIPv6 != nil {
		countIPv6 := *iPs.CountIPv6
		result.CountIPv6 = &countIPv6
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (iPs *ManagedClusterLoadBalancerProfile_ManagedOutboundIPs) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterLoadBalancerProfile_ManagedOutboundIPs{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (iPs *ManagedClusterLoadBalancerProfile_ManagedOutboundIPs) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterLoadBalancerProfile_ManagedOutboundIPs)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterLoadBalancerProfile_ManagedOutboundIPs, got %T", armInput)
	}

	// Set property "Count":
	if typedInput.Count != nil {
		count := *typedInput.Count
		iPs.Count = &count
	}

	// Set property "CountIPv6":
	if typedInput.CountIPv6 != nil {
		countIPv6 := *typedInput.CountIPv6
		iPs.CountIPv6 = &countIPv6
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterLoadBalancerProfile_ManagedOutboundIPs populates our ManagedClusterLoadBalancerProfile_ManagedOutboundIPs from the provided source ManagedClusterLoadBalancerProfile_ManagedOutboundIPs
func (iPs *ManagedClusterLoadBalancerProfile_ManagedOutboundIPs) AssignProperties_From_ManagedClusterLoadBalancerProfile_ManagedOutboundIPs(source *storage.ManagedClusterLoadBalancerProfile_ManagedOutboundIPs) error {

	// Count
	iPs.Count = genruntime.ClonePointerToInt(source.Count)

	// CountIPv6
	iPs.CountIPv6 = genruntime.ClonePointerToInt(source.CountIPv6)

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterLoadBalancerProfile_ManagedOutboundIPs populates the provided destination ManagedClusterLoadBalancerProfile_ManagedOutboundIPs from our ManagedClusterLoadBalancerProfile_ManagedOutboundIPs
func (iPs *ManagedClusterLoadBalancerProfile_ManagedOutboundIPs) AssignProperties_To_ManagedClusterLoadBalancerProfile_ManagedOutboundIPs(destination *storage.ManagedClusterLoadBalancerProfile_ManagedOutboundIPs) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Count
	destination.Count = genruntime.ClonePointerToInt(iPs.Count)

	// CountIPv6
	destination.CountIPv6 = genruntime.ClonePointerToInt(iPs.CountIPv6)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

type ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS struct {
	// Count: The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values
	// must be in the range of 1 to 100 (inclusive). The default value is 1.
	Count *int `json:"count,omitempty"`

	// CountIPv6: The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load balancer. Allowed
	// values must be in the range of 1 to 100 (inclusive). The default value is 0 for single-stack and 1 for dual-stack.
	CountIPv6 *int `json:"countIPv6,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (iPs *ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (iPs *ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS, got %T", armInput)
	}

	// Set property "Count":
	if typedInput.Count != nil {
		count := *typedInput.Count
		iPs.Count = &count
	}

	// Set property "CountIPv6":
	if typedInput.CountIPv6 != nil {
		countIPv6 := *typedInput.CountIPv6
		iPs.CountIPv6 = &countIPv6
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS populates our ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS from the provided source ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS
func (iPs *ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS) AssignProperties_From_ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS(source *storage.ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS) error {

	// Count
	iPs.Count = genruntime.ClonePointerToInt(source.Count)

	// CountIPv6
	iPs.CountIPv6 = genruntime.ClonePointerToInt(source.CountIPv6)

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS populates the provided destination ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS from our ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS
func (iPs *ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS) AssignProperties_To_ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS(destination *storage.ManagedClusterLoadBalancerProfile_ManagedOutboundIPs_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Count
	destination.Count = genruntime.ClonePointerToInt(iPs.Count)

	// CountIPv6
	destination.CountIPv6 = genruntime.ClonePointerToInt(iPs.CountIPv6)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

type ManagedClusterLoadBalancerProfile_OutboundIPPrefixes struct {
	// PublicIPPrefixes: A list of public IP prefix resources.
	PublicIPPrefixes []ResourceReference `json:"publicIPPrefixes,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterLoadBalancerProfile_OutboundIPPrefixes{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (prefixes *ManagedClusterLoadBalancerProfile_OutboundIPPrefixes) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if prefixes == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterLoadBalancerProfile_OutboundIPPrefixes{}

	// Set property "PublicIPPrefixes":
	for _, item := range prefixes.PublicIPPrefixes {
		item_ARM, err := item.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		result.PublicIPPrefixes = append(result.PublicIPPrefixes, *item_ARM.(*arm.ResourceReference))
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (prefixes *ManagedClusterLoadBalancerProfile_OutboundIPPrefixes) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterLoadBalancerProfile_OutboundIPPrefixes{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (prefixes *ManagedClusterLoadBalancerProfile_OutboundIPPrefixes) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterLoadBalancerProfile_OutboundIPPrefixes)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterLoadBalancerProfile_OutboundIPPrefixes, got %T", armInput)
	}

	// Set property "PublicIPPrefixes":
	for _, item := range typedInput.PublicIPPrefixes {
		var item1 ResourceReference
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		prefixes.PublicIPPrefixes = append(prefixes.PublicIPPrefixes, item1)
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterLoadBalancerProfile_OutboundIPPrefixes populates our ManagedClusterLoadBalancerProfile_OutboundIPPrefixes from the provided source ManagedClusterLoadBalancerProfile_OutboundIPPrefixes
func (prefixes *ManagedClusterLoadBalancerProfile_OutboundIPPrefixes) AssignProperties_From_ManagedClusterLoadBalancerProfile_OutboundIPPrefixes(source *storage.ManagedClusterLoadBalancerProfile_OutboundIPPrefixes) error {

	// PublicIPPrefixes
	if source.PublicIPPrefixes != nil {
		publicIPPrefixList := make([]ResourceReference, len(source.PublicIPPrefixes))
		for publicIPPrefixIndex, publicIPPrefixItem := range source.PublicIPPrefixes {
			var publicIPPrefix ResourceReference
			err := publicIPPrefix.AssignProperties_From_ResourceReference(&publicIPPrefixItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ResourceReference() to populate field PublicIPPrefixes")
			}
			publicIPPrefixList[publicIPPrefixIndex] = publicIPPrefix
		}
		prefixes.PublicIPPrefixes = publicIPPrefixList
	} else {
		prefixes.PublicIPPrefixes = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterLoadBalancerProfile_OutboundIPPrefixes populates the provided destination ManagedClusterLoadBalancerProfile_OutboundIPPrefixes from our ManagedClusterLoadBalancerProfile_OutboundIPPrefixes
func (prefixes *ManagedClusterLoadBalancerProfile_OutboundIPPrefixes) AssignProperties_To_ManagedClusterLoadBalancerProfile_OutboundIPPrefixes(destination *storage.ManagedClusterLoadBalancerProfile_OutboundIPPrefixes) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// PublicIPPrefixes
	if prefixes.PublicIPPrefixes != nil {
		publicIPPrefixList := make([]storage.ResourceReference, len(prefixes.PublicIPPrefixes))
		for publicIPPrefixIndex, publicIPPrefixItem := range prefixes.PublicIPPrefixes {
			var publicIPPrefix storage.ResourceReference
			err := publicIPPrefixItem.AssignProperties_To_ResourceReference(&publicIPPrefix)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ResourceReference() to populate field PublicIPPrefixes")
			}
			publicIPPrefixList[publicIPPrefixIndex] = publicIPPrefix
		}
		destination.PublicIPPrefixes = publicIPPrefixList
	} else {
		destination.PublicIPPrefixes = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

type ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS struct {
	// PublicIPPrefixes: A list of public IP prefix resources.
	PublicIPPrefixes []ResourceReference_STATUS `json:"publicIPPrefixes,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (prefixes *ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (prefixes *ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS, got %T", armInput)
	}

	// Set property "PublicIPPrefixes":
	for _, item := range typedInput.PublicIPPrefixes {
		var item1 ResourceReference_STATUS
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		prefixes.PublicIPPrefixes = append(prefixes.PublicIPPrefixes, item1)
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS populates our ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS from the provided source ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS
func (prefixes *ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS) AssignProperties_From_ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS(source *storage.ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS) error {

	// PublicIPPrefixes
	if source.PublicIPPrefixes != nil {
		publicIPPrefixList := make([]ResourceReference_STATUS, len(source.PublicIPPrefixes))
		for publicIPPrefixIndex, publicIPPrefixItem := range source.PublicIPPrefixes {
			var publicIPPrefix ResourceReference_STATUS
			err := publicIPPrefix.AssignProperties_From_ResourceReference_STATUS(&publicIPPrefixItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ResourceReference_STATUS() to populate field PublicIPPrefixes")
			}
			publicIPPrefixList[publicIPPrefixIndex] = publicIPPrefix
		}
		prefixes.PublicIPPrefixes = publicIPPrefixList
	} else {
		prefixes.PublicIPPrefixes = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS populates the provided destination ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS from our ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS
func (prefixes *ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS) AssignProperties_To_ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS(destination *storage.ManagedClusterLoadBalancerProfile_OutboundIPPrefixes_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// PublicIPPrefixes
	if prefixes.PublicIPPrefixes != nil {
		publicIPPrefixList := make([]storage.ResourceReference_STATUS, len(prefixes.PublicIPPrefixes))
		for publicIPPrefixIndex, publicIPPrefixItem := range prefixes.PublicIPPrefixes {
			var publicIPPrefix storage.ResourceReference_STATUS
			err := publicIPPrefixItem.AssignProperties_To_ResourceReference_STATUS(&publicIPPrefix)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ResourceReference_STATUS() to populate field PublicIPPrefixes")
			}
			publicIPPrefixList[publicIPPrefixIndex] = publicIPPrefix
		}
		destination.PublicIPPrefixes = publicIPPrefixList
	} else {
		destination.PublicIPPrefixes = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

type ManagedClusterLoadBalancerProfile_OutboundIPs struct {
	// PublicIPs: A list of public IP resources.
	PublicIPs []ResourceReference `json:"publicIPs,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterLoadBalancerProfile_OutboundIPs{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (iPs *ManagedClusterLoadBalancerProfile_OutboundIPs) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if iPs == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterLoadBalancerProfile_OutboundIPs{}

	// Set property "PublicIPs":
	for _, item := range iPs.PublicIPs {
		item_ARM, err := item.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		result.PublicIPs = append(result.PublicIPs, *item_ARM.(*arm.ResourceReference))
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (iPs *ManagedClusterLoadBalancerProfile_OutboundIPs) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterLoadBalancerProfile_OutboundIPs{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (iPs *ManagedClusterLoadBalancerProfile_OutboundIPs) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterLoadBalancerProfile_OutboundIPs)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterLoadBalancerProfile_OutboundIPs, got %T", armInput)
	}

	// Set property "PublicIPs":
	for _, item := range typedInput.PublicIPs {
		var item1 ResourceReference
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		iPs.PublicIPs = append(iPs.PublicIPs, item1)
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterLoadBalancerProfile_OutboundIPs populates our ManagedClusterLoadBalancerProfile_OutboundIPs from the provided source ManagedClusterLoadBalancerProfile_OutboundIPs
func (iPs *ManagedClusterLoadBalancerProfile_OutboundIPs) AssignProperties_From_ManagedClusterLoadBalancerProfile_OutboundIPs(source *storage.ManagedClusterLoadBalancerProfile_OutboundIPs) error {

	// PublicIPs
	if source.PublicIPs != nil {
		publicIPList := make([]ResourceReference, len(source.PublicIPs))
		for publicIPIndex, publicIPItem := range source.PublicIPs {
			var publicIP ResourceReference
			err := publicIP.AssignProperties_From_ResourceReference(&publicIPItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ResourceReference() to populate field PublicIPs")
			}
			publicIPList[publicIPIndex] = publicIP
		}
		iPs.PublicIPs = publicIPList
	} else {
		iPs.PublicIPs = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterLoadBalancerProfile_OutboundIPs populates the provided destination ManagedClusterLoadBalancerProfile_OutboundIPs from our ManagedClusterLoadBalancerProfile_OutboundIPs
func (iPs *ManagedClusterLoadBalancerProfile_OutboundIPs) AssignProperties_To_ManagedClusterLoadBalancerProfile_OutboundIPs(destination *storage.ManagedClusterLoadBalancerProfile_OutboundIPs) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// PublicIPs
	if iPs.PublicIPs != nil {
		publicIPList := make([]storage.ResourceReference, len(iPs.PublicIPs))
		for publicIPIndex, publicIPItem := range iPs.PublicIPs {
			var publicIP storage.ResourceReference
			err := publicIPItem.AssignProperties_To_ResourceReference(&publicIP)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ResourceReference() to populate field PublicIPs")
			}
			publicIPList[publicIPIndex] = publicIP
		}
		destination.PublicIPs = publicIPList
	} else {
		destination.PublicIPs = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

type ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS struct {
	// PublicIPs: A list of public IP resources.
	PublicIPs []ResourceReference_STATUS `json:"publicIPs,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (iPs *ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (iPs *ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS, got %T", armInput)
	}

	// Set property "PublicIPs":
	for _, item := range typedInput.PublicIPs {
		var item1 ResourceReference_STATUS
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		iPs.PublicIPs = append(iPs.PublicIPs, item1)
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS populates our ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS from the provided source ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS
func (iPs *ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS) AssignProperties_From_ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS(source *storage.ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS) error {

	// PublicIPs
	if source.PublicIPs != nil {
		publicIPList := make([]ResourceReference_STATUS, len(source.PublicIPs))
		for publicIPIndex, publicIPItem := range source.PublicIPs {
			var publicIP ResourceReference_STATUS
			err := publicIP.AssignProperties_From_ResourceReference_STATUS(&publicIPItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ResourceReference_STATUS() to populate field PublicIPs")
			}
			publicIPList[publicIPIndex] = publicIP
		}
		iPs.PublicIPs = publicIPList
	} else {
		iPs.PublicIPs = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS populates the provided destination ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS from our ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS
func (iPs *ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS) AssignProperties_To_ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS(destination *storage.ManagedClusterLoadBalancerProfile_OutboundIPs_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// PublicIPs
	if iPs.PublicIPs != nil {
		publicIPList := make([]storage.ResourceReference_STATUS, len(iPs.PublicIPs))
		for publicIPIndex, publicIPItem := range iPs.PublicIPs {
			var publicIP storage.ResourceReference_STATUS
			err := publicIPItem.AssignProperties_To_ResourceReference_STATUS(&publicIP)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ResourceReference_STATUS() to populate field PublicIPs")
			}
			publicIPList[publicIPIndex] = publicIP
		}
		destination.PublicIPs = publicIPList
	} else {
		destination.PublicIPs = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Profile of the managed outbound IP resources of the managed cluster.
type ManagedClusterManagedOutboundIPProfile struct {
	// +kubebuilder:validation:Maximum=16
	// +kubebuilder:validation:Minimum=1
	// Count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16
	// (inclusive). The default value is 1.
	Count *int `json:"count,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterManagedOutboundIPProfile{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (profile *ManagedClusterManagedOutboundIPProfile) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if profile == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterManagedOutboundIPProfile{}

	// Set property "Count":
	if profile.Count != nil {
		count := *profile.Count
		result.Count = &count
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *ManagedClusterManagedOutboundIPProfile) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterManagedOutboundIPProfile{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *ManagedClusterManagedOutboundIPProfile) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterManagedOutboundIPProfile)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterManagedOutboundIPProfile, got %T", armInput)
	}

	// Set property "Count":
	if typedInput.Count != nil {
		count := *typedInput.Count
		profile.Count = &count
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterManagedOutboundIPProfile populates our ManagedClusterManagedOutboundIPProfile from the provided source ManagedClusterManagedOutboundIPProfile
func (profile *ManagedClusterManagedOutboundIPProfile) AssignProperties_From_ManagedClusterManagedOutboundIPProfile(source *storage.ManagedClusterManagedOutboundIPProfile) error {

	// Count
	profile.Count = genruntime.ClonePointerToInt(source.Count)

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterManagedOutboundIPProfile populates the provided destination ManagedClusterManagedOutboundIPProfile from our ManagedClusterManagedOutboundIPProfile
func (profile *ManagedClusterManagedOutboundIPProfile) AssignProperties_To_ManagedClusterManagedOutboundIPProfile(destination *storage.ManagedClusterManagedOutboundIPProfile) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Count
	destination.Count = genruntime.ClonePointerToInt(profile.Count)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Profile of the managed outbound IP resources of the managed cluster.
type ManagedClusterManagedOutboundIPProfile_STATUS struct {
	// Count: The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16
	// (inclusive). The default value is 1.
	Count *int `json:"count,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterManagedOutboundIPProfile_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (profile *ManagedClusterManagedOutboundIPProfile_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterManagedOutboundIPProfile_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (profile *ManagedClusterManagedOutboundIPProfile_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterManagedOutboundIPProfile_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterManagedOutboundIPProfile_STATUS, got %T", armInput)
	}

	// Set property "Count":
	if typedInput.Count != nil {
		count := *typedInput.Count
		profile.Count = &count
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterManagedOutboundIPProfile_STATUS populates our ManagedClusterManagedOutboundIPProfile_STATUS from the provided source ManagedClusterManagedOutboundIPProfile_STATUS
func (profile *ManagedClusterManagedOutboundIPProfile_STATUS) AssignProperties_From_ManagedClusterManagedOutboundIPProfile_STATUS(source *storage.ManagedClusterManagedOutboundIPProfile_STATUS) error {

	// Count
	profile.Count = genruntime.ClonePointerToInt(source.Count)

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterManagedOutboundIPProfile_STATUS populates the provided destination ManagedClusterManagedOutboundIPProfile_STATUS from our ManagedClusterManagedOutboundIPProfile_STATUS
func (profile *ManagedClusterManagedOutboundIPProfile_STATUS) AssignProperties_To_ManagedClusterManagedOutboundIPProfile_STATUS(destination *storage.ManagedClusterManagedOutboundIPProfile_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Count
	destination.Count = genruntime.ClonePointerToInt(profile.Count)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

type ManagedClusterPodIdentity_ProvisioningInfo_STATUS struct {
	// Error: Pod identity assignment error (if any).
	Error *ManagedClusterPodIdentityProvisioningError_STATUS `json:"error,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterPodIdentity_ProvisioningInfo_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (info *ManagedClusterPodIdentity_ProvisioningInfo_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterPodIdentity_ProvisioningInfo_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (info *ManagedClusterPodIdentity_ProvisioningInfo_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterPodIdentity_ProvisioningInfo_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterPodIdentity_ProvisioningInfo_STATUS, got %T", armInput)
	}

	// Set property "Error":
	if typedInput.Error != nil {
		var error1 ManagedClusterPodIdentityProvisioningError_STATUS
		err := error1.PopulateFromARM(owner, *typedInput.Error)
		if err != nil {
			return err
		}
		error := error1
		info.Error = &error
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterPodIdentity_ProvisioningInfo_STATUS populates our ManagedClusterPodIdentity_ProvisioningInfo_STATUS from the provided source ManagedClusterPodIdentity_ProvisioningInfo_STATUS
func (info *ManagedClusterPodIdentity_ProvisioningInfo_STATUS) AssignProperties_From_ManagedClusterPodIdentity_ProvisioningInfo_STATUS(source *storage.ManagedClusterPodIdentity_ProvisioningInfo_STATUS) error {

	// Error
	if source.Error != nil {
		var error ManagedClusterPodIdentityProvisioningError_STATUS
		err := error.AssignProperties_From_ManagedClusterPodIdentityProvisioningError_STATUS(source.Error)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterPodIdentityProvisioningError_STATUS() to populate field Error")
		}
		info.Error = &error
	} else {
		info.Error = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterPodIdentity_ProvisioningInfo_STATUS populates the provided destination ManagedClusterPodIdentity_ProvisioningInfo_STATUS from our ManagedClusterPodIdentity_ProvisioningInfo_STATUS
func (info *ManagedClusterPodIdentity_ProvisioningInfo_STATUS) AssignProperties_To_ManagedClusterPodIdentity_ProvisioningInfo_STATUS(destination *storage.ManagedClusterPodIdentity_ProvisioningInfo_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Error
	if info.Error != nil {
		var error storage.ManagedClusterPodIdentityProvisioningError_STATUS
		err := info.Error.AssignProperties_To_ManagedClusterPodIdentityProvisioningError_STATUS(&error)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterPodIdentityProvisioningError_STATUS() to populate field Error")
		}
		destination.Error = &error
	} else {
		destination.Error = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

type ManagedClusterPodIdentity_ProvisioningState_STATUS string

const (
	ManagedClusterPodIdentity_ProvisioningState_STATUS_Assigned  = ManagedClusterPodIdentity_ProvisioningState_STATUS("Assigned")
	ManagedClusterPodIdentity_ProvisioningState_STATUS_Canceled  = ManagedClusterPodIdentity_ProvisioningState_STATUS("Canceled")
	ManagedClusterPodIdentity_ProvisioningState_STATUS_Deleting  = ManagedClusterPodIdentity_ProvisioningState_STATUS("Deleting")
	ManagedClusterPodIdentity_ProvisioningState_STATUS_Failed    = ManagedClusterPodIdentity_ProvisioningState_STATUS("Failed")
	ManagedClusterPodIdentity_ProvisioningState_STATUS_Succeeded = ManagedClusterPodIdentity_ProvisioningState_STATUS("Succeeded")
	ManagedClusterPodIdentity_ProvisioningState_STATUS_Updating  = ManagedClusterPodIdentity_ProvisioningState_STATUS("Updating")
)

// Mapping from string to ManagedClusterPodIdentity_ProvisioningState_STATUS
var managedClusterPodIdentity_ProvisioningState_STATUS_Values = map[string]ManagedClusterPodIdentity_ProvisioningState_STATUS{
	"assigned":  ManagedClusterPodIdentity_ProvisioningState_STATUS_Assigned,
	"canceled":  ManagedClusterPodIdentity_ProvisioningState_STATUS_Canceled,
	"deleting":  ManagedClusterPodIdentity_ProvisioningState_STATUS_Deleting,
	"failed":    ManagedClusterPodIdentity_ProvisioningState_STATUS_Failed,
	"succeeded": ManagedClusterPodIdentity_ProvisioningState_STATUS_Succeeded,
	"updating":  ManagedClusterPodIdentity_ProvisioningState_STATUS_Updating,
}

// Microsoft Defender settings for the security profile threat detection.
type ManagedClusterSecurityProfileDefenderSecurityMonitoring struct {
	// Enabled: Whether to enable Defender threat detection
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedClusterSecurityProfileDefenderSecurityMonitoring{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (monitoring *ManagedClusterSecurityProfileDefenderSecurityMonitoring) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if monitoring == nil {
		return nil, nil
	}
	result := &arm.ManagedClusterSecurityProfileDefenderSecurityMonitoring{}

	// Set property "Enabled":
	if monitoring.Enabled != nil {
		enabled := *monitoring.Enabled
		result.Enabled = &enabled
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (monitoring *ManagedClusterSecurityProfileDefenderSecurityMonitoring) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterSecurityProfileDefenderSecurityMonitoring{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (monitoring *ManagedClusterSecurityProfileDefenderSecurityMonitoring) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterSecurityProfileDefenderSecurityMonitoring)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterSecurityProfileDefenderSecurityMonitoring, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		monitoring.Enabled = &enabled
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterSecurityProfileDefenderSecurityMonitoring populates our ManagedClusterSecurityProfileDefenderSecurityMonitoring from the provided source ManagedClusterSecurityProfileDefenderSecurityMonitoring
func (monitoring *ManagedClusterSecurityProfileDefenderSecurityMonitoring) AssignProperties_From_ManagedClusterSecurityProfileDefenderSecurityMonitoring(source *storage.ManagedClusterSecurityProfileDefenderSecurityMonitoring) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		monitoring.Enabled = &enabled
	} else {
		monitoring.Enabled = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterSecurityProfileDefenderSecurityMonitoring populates the provided destination ManagedClusterSecurityProfileDefenderSecurityMonitoring from our ManagedClusterSecurityProfileDefenderSecurityMonitoring
func (monitoring *ManagedClusterSecurityProfileDefenderSecurityMonitoring) AssignProperties_To_ManagedClusterSecurityProfileDefenderSecurityMonitoring(destination *storage.ManagedClusterSecurityProfileDefenderSecurityMonitoring) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if monitoring.Enabled != nil {
		enabled := *monitoring.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
}

// Microsoft Defender settings for the security profile threat detection.
type ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS struct {
	// Enabled: Whether to enable Defender threat detection
	Enabled *bool `json:"enabled,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (monitoring *ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (monitoring *ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		monitoring.Enabled = &enabled
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS populates our ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS from the provided source ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS
func (monitoring *ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS) AssignProperties_From_ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS(source *storage.ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		monitoring.Enabled = &enabled
	} else {
		monitoring.Enabled = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS populates the provided destination ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS from our ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS
func (monitoring *ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS) AssignProperties_To_ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS(destination *storage.ManagedClusterSecurityProfileDefenderSecurityMonitoring_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if monitoring.Enabled != nil {
		enabled := *monitoring.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
}

// A reference to an Azure resource.
type ResourceReference struct {
	// Reference: The fully qualified Azure resource id.
	Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"`
}

var _ genruntime.ARMTransformer = &ResourceReference{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (reference *ResourceReference) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if reference == nil {
		return nil, nil
	}
	result := &arm.ResourceReference{}

	// Set property "Id":
	if reference.Reference != nil {
		referenceARMID, err := resolved.ResolvedReferences.Lookup(*reference.Reference)
		if err != nil {
			return nil, err
		}
		reference1 := referenceARMID
		result.Id = &reference1
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (reference *ResourceReference) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ResourceReference{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (reference *ResourceReference) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	_, ok := armInput.(arm.ResourceReference)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ResourceReference, got %T", armInput)
	}

	// no assignment for property "Reference"

	// No error
	return nil
}

// AssignProperties_From_ResourceReference populates our ResourceReference from the provided source ResourceReference
func (reference *ResourceReference) AssignProperties_From_ResourceReference(source *storage.ResourceReference) error {

	// Reference
	if source.Reference != nil {
		referenceTemp := source.Reference.Copy()
		reference.Reference = &referenceTemp
	} else {
		reference.Reference = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ResourceReference populates the provided destination ResourceReference from our ResourceReference
func (reference *ResourceReference) AssignProperties_To_ResourceReference(destination *storage.ResourceReference) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Reference
	if reference.Reference != nil {
		referenceTemp := reference.Reference.Copy()
		destination.Reference = &referenceTemp
	} else {
		destination.Reference = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// A reference to an Azure resource.
type ResourceReference_STATUS struct {
	// Id: The fully qualified Azure resource id.
	Id *string `json:"id,omitempty"`
}

var _ genruntime.FromARMConverter = &ResourceReference_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (reference *ResourceReference_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ResourceReference_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (reference *ResourceReference_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ResourceReference_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ResourceReference_STATUS, got %T", armInput)
	}

	// Set property "Id":
	if typedInput.Id != nil {
		id := *typedInput.Id
		reference.Id = &id
	}

	// No error
	return nil
}

// AssignProperties_From_ResourceReference_STATUS populates our ResourceReference_STATUS from the provided source ResourceReference_STATUS
func (reference *ResourceReference_STATUS) AssignProperties_From_ResourceReference_STATUS(source *storage.ResourceReference_STATUS) error {

	// Id
	reference.Id = genruntime.ClonePointerToString(source.Id)

	// No error
	return nil
}

// AssignProperties_To_ResourceReference_STATUS populates the provided destination ResourceReference_STATUS from our ResourceReference_STATUS
func (reference *ResourceReference_STATUS) AssignProperties_To_ResourceReference_STATUS(destination *storage.ResourceReference_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Id
	destination.Id = genruntime.ClonePointerToString(reference.Id)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Istio egress gateway configuration.
type IstioEgressGateway struct {
	// +kubebuilder:validation:Required
	// Enabled: Whether to enable the egress gateway.
	Enabled *bool `json:"enabled,omitempty"`

	// NodeSelector: NodeSelector for scheduling the egress gateway.
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
}

var _ genruntime.ARMTransformer = &IstioEgressGateway{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (gateway *IstioEgressGateway) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if gateway == nil {
		return nil, nil
	}
	result := &arm.IstioEgressGateway{}

	// Set property "Enabled":
	if gateway.Enabled != nil {
		enabled := *gateway.Enabled
		result.Enabled = &enabled
	}

	// Set property "NodeSelector":
	if gateway.NodeSelector != nil {
		result.NodeSelector = make(map[string]string, len(gateway.NodeSelector))
		for key, value := range gateway.NodeSelector {
			result.NodeSelector[key] = value
		}
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (gateway *IstioEgressGateway) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.IstioEgressGateway{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (gateway *IstioEgressGateway) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.IstioEgressGateway)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IstioEgressGateway, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		gateway.Enabled = &enabled
	}

	// Set property "NodeSelector":
	if typedInput.NodeSelector != nil {
		gateway.NodeSelector = make(map[string]string, len(typedInput.NodeSelector))
		for key, value := range typedInput.NodeSelector {
			gateway.NodeSelector[key] = value
		}
	}

	// No error
	return nil
}

// AssignProperties_From_IstioEgressGateway populates our IstioEgressGateway from the provided source IstioEgressGateway
func (gateway *IstioEgressGateway) AssignProperties_From_IstioEgressGateway(source *storage.IstioEgressGateway) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		gateway.Enabled = &enabled
	} else {
		gateway.Enabled = nil
	}

	// NodeSelector
	gateway.NodeSelector = genruntime.CloneMapOfStringToString(source.NodeSelector)

	// No error
	return nil
}

// AssignProperties_To_IstioEgressGateway populates the provided destination IstioEgressGateway from our IstioEgressGateway
func (gateway *IstioEgressGateway) AssignProperties_To_IstioEgressGateway(destination *storage.IstioEgressGateway) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if gateway.Enabled != nil {
		enabled := *gateway.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

	// NodeSelector
	destination.NodeSelector = genruntime.CloneMapOfStringToString(gateway.NodeSelector)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Istio egress gateway configuration.
type IstioEgressGateway_STATUS struct {
	// Enabled: Whether to enable the egress gateway.
	Enabled *bool `json:"enabled,omitempty"`

	// NodeSelector: NodeSelector for scheduling the egress gateway.
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
}

var _ genruntime.FromARMConverter = &IstioEgressGateway_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (gateway *IstioEgressGateway_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.IstioEgressGateway_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (gateway *IstioEgressGateway_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.IstioEgressGateway_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IstioEgressGateway_STATUS, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		gateway.Enabled = &enabled
	}

	// Set property "NodeSelector":
	if typedInput.NodeSelector != nil {
		gateway.NodeSelector = make(map[string]string, len(typedInput.NodeSelector))
		for key, value := range typedInput.NodeSelector {
			gateway.NodeSelector[key] = value
		}
	}

	// No error
	return nil
}

// AssignProperties_From_IstioEgressGateway_STATUS populates our IstioEgressGateway_STATUS from the provided source IstioEgressGateway_STATUS
func (gateway *IstioEgressGateway_STATUS) AssignProperties_From_IstioEgressGateway_STATUS(source *storage.IstioEgressGateway_STATUS) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		gateway.Enabled = &enabled
	} else {
		gateway.Enabled = nil
	}

	// NodeSelector
	gateway.NodeSelector = genruntime.CloneMapOfStringToString(source.NodeSelector)

	// No error
	return nil
}

// AssignProperties_To_IstioEgressGateway_STATUS populates the provided destination IstioEgressGateway_STATUS from our IstioEgressGateway_STATUS
func (gateway *IstioEgressGateway_STATUS) AssignProperties_To_IstioEgressGateway_STATUS(destination *storage.IstioEgressGateway_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if gateway.Enabled != nil {
		enabled := *gateway.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

	// NodeSelector
	destination.NodeSelector = genruntime.CloneMapOfStringToString(gateway.NodeSelector)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Istio ingress gateway configuration. For now, we support up to one external ingress gateway named
// `aks-istio-ingressgateway-external` and one internal ingress gateway named `aks-istio-ingressgateway-internal`.
type IstioIngressGateway struct {
	// +kubebuilder:validation:Required
	// Enabled: Whether to enable the ingress gateway.
	Enabled *bool `json:"enabled,omitempty"`

	// +kubebuilder:validation:Required
	// Mode: Mode of an ingress gateway.
	Mode *IstioIngressGateway_Mode `json:"mode,omitempty"`
}

var _ genruntime.ARMTransformer = &IstioIngressGateway{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (gateway *IstioIngressGateway) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if gateway == nil {
		return nil, nil
	}
	result := &arm.IstioIngressGateway{}

	// Set property "Enabled":
	if gateway.Enabled != nil {
		enabled := *gateway.Enabled
		result.Enabled = &enabled
	}

	// Set property "Mode":
	if gateway.Mode != nil {
		var temp string
		temp = string(*gateway.Mode)
		mode := arm.IstioIngressGateway_Mode(temp)
		result.Mode = &mode
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (gateway *IstioIngressGateway) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.IstioIngressGateway{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (gateway *IstioIngressGateway) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.IstioIngressGateway)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IstioIngressGateway, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		gateway.Enabled = &enabled
	}

	// Set property "Mode":
	if typedInput.Mode != nil {
		var temp string
		temp = string(*typedInput.Mode)
		mode := IstioIngressGateway_Mode(temp)
		gateway.Mode = &mode
	}

	// No error
	return nil
}

// AssignProperties_From_IstioIngressGateway populates our IstioIngressGateway from the provided source IstioIngressGateway
func (gateway *IstioIngressGateway) AssignProperties_From_IstioIngressGateway(source *storage.IstioIngressGateway) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		gateway.Enabled = &enabled
	} else {
		gateway.Enabled = nil
	}

	// Mode
	if source.Mode != nil {
		mode := *source.Mode
		modeTemp := genruntime.ToEnum(mode, istioIngressGateway_Mode_Values)
		gateway.Mode = &modeTemp
	} else {
		gateway.Mode = nil
	}

	// No error
	return nil
}

// AssignProperties_To_IstioIngressGateway populates the provided destination IstioIngressGateway from our IstioIngressGateway
func (gateway *IstioIngressGateway) AssignProperties_To_IstioIngressGateway(destination *storage.IstioIngressGateway) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if gateway.Enabled != nil {
		enabled := *gateway.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

	// Mode
	if gateway.Mode != nil {
		mode := string(*gateway.Mode)
		destination.Mode = &mode
	} else {
		destination.Mode = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Istio ingress gateway configuration. For now, we support up to one external ingress gateway named
// `aks-istio-ingressgateway-external` and one internal ingress gateway named `aks-istio-ingressgateway-internal`.
type IstioIngressGateway_STATUS struct {
	// Enabled: Whether to enable the ingress gateway.
	Enabled *bool `json:"enabled,omitempty"`

	// Mode: Mode of an ingress gateway.
	Mode *IstioIngressGateway_Mode_STATUS `json:"mode,omitempty"`
}

var _ genruntime.FromARMConverter = &IstioIngressGateway_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (gateway *IstioIngressGateway_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.IstioIngressGateway_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (gateway *IstioIngressGateway_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.IstioIngressGateway_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IstioIngressGateway_STATUS, got %T", armInput)
	}

	// Set property "Enabled":
	if typedInput.Enabled != nil {
		enabled := *typedInput.Enabled
		gateway.Enabled = &enabled
	}

	// Set property "Mode":
	if typedInput.Mode != nil {
		var temp string
		temp = string(*typedInput.Mode)
		mode := IstioIngressGateway_Mode_STATUS(temp)
		gateway.Mode = &mode
	}

	// No error
	return nil
}

// AssignProperties_From_IstioIngressGateway_STATUS populates our IstioIngressGateway_STATUS from the provided source IstioIngressGateway_STATUS
func (gateway *IstioIngressGateway_STATUS) AssignProperties_From_IstioIngressGateway_STATUS(source *storage.IstioIngressGateway_STATUS) error {

	// Enabled
	if source.Enabled != nil {
		enabled := *source.Enabled
		gateway.Enabled = &enabled
	} else {
		gateway.Enabled = nil
	}

	// Mode
	if source.Mode != nil {
		mode := *source.Mode
		modeTemp := genruntime.ToEnum(mode, istioIngressGateway_Mode_STATUS_Values)
		gateway.Mode = &modeTemp
	} else {
		gateway.Mode = nil
	}

	// No error
	return nil
}

// AssignProperties_To_IstioIngressGateway_STATUS populates the provided destination IstioIngressGateway_STATUS from our IstioIngressGateway_STATUS
func (gateway *IstioIngressGateway_STATUS) AssignProperties_To_IstioIngressGateway_STATUS(destination *storage.IstioIngressGateway_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Enabled
	if gateway.Enabled != nil {
		enabled := *gateway.Enabled
		destination.Enabled = &enabled
	} else {
		destination.Enabled = nil
	}

	// Mode
	if gateway.Mode != nil {
		mode := string(*gateway.Mode)
		destination.Mode = &mode
	} else {
		destination.Mode = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Plugin certificates information for Service Mesh.
type IstioPluginCertificateAuthority struct {
	// CertChainObjectName: Certificate chain object name in Azure Key Vault.
	CertChainObjectName *string `json:"certChainObjectName,omitempty"`

	// CertObjectName: Intermediate certificate object name in Azure Key Vault.
	CertObjectName *string `json:"certObjectName,omitempty"`

	// KeyObjectName: Intermediate certificate private key object name in Azure Key Vault.
	KeyObjectName *string `json:"keyObjectName,omitempty"`

	// KeyVaultReference: The resource ID of the Key Vault.
	KeyVaultReference *genruntime.ResourceReference `armReference:"KeyVaultId" json:"keyVaultReference,omitempty"`

	// RootCertObjectName: Root certificate object name in Azure Key Vault.
	RootCertObjectName *string `json:"rootCertObjectName,omitempty"`
}

var _ genruntime.ARMTransformer = &IstioPluginCertificateAuthority{}

// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (authority *IstioPluginCertificateAuthority) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) {
	if authority == nil {
		return nil, nil
	}
	result := &arm.IstioPluginCertificateAuthority{}

	// Set property "CertChainObjectName":
	if authority.CertChainObjectName != nil {
		certChainObjectName := *authority.CertChainObjectName
		result.CertChainObjectName = &certChainObjectName
	}

	// Set property "CertObjectName":
	if authority.CertObjectName != nil {
		certObjectName := *authority.CertObjectName
		result.CertObjectName = &certObjectName
	}

	// Set property "KeyObjectName":
	if authority.KeyObjectName != nil {
		keyObjectName := *authority.KeyObjectName
		result.KeyObjectName = &keyObjectName
	}

	// Set property "KeyVaultId":
	if authority.KeyVaultReference != nil {
		keyVaultReferenceARMID, err := resolved.ResolvedReferences.Lookup(*authority.KeyVaultReference)
		if err != nil {
			return nil, err
		}
		keyVaultReference := keyVaultReferenceARMID
		result.KeyVaultId = &keyVaultReference
	}

	// Set property "RootCertObjectName":
	if authority.RootCertObjectName != nil {
		rootCertObjectName := *authority.RootCertObjectName
		result.RootCertObjectName = &rootCertObjectName
	}
	return result, nil
}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (authority *IstioPluginCertificateAuthority) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.IstioPluginCertificateAuthority{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (authority *IstioPluginCertificateAuthority) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.IstioPluginCertificateAuthority)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IstioPluginCertificateAuthority, got %T", armInput)
	}

	// Set property "CertChainObjectName":
	if typedInput.CertChainObjectName != nil {
		certChainObjectName := *typedInput.CertChainObjectName
		authority.CertChainObjectName = &certChainObjectName
	}

	// Set property "CertObjectName":
	if typedInput.CertObjectName != nil {
		certObjectName := *typedInput.CertObjectName
		authority.CertObjectName = &certObjectName
	}

	// Set property "KeyObjectName":
	if typedInput.KeyObjectName != nil {
		keyObjectName := *typedInput.KeyObjectName
		authority.KeyObjectName = &keyObjectName
	}

	// no assignment for property "KeyVaultReference"

	// Set property "RootCertObjectName":
	if typedInput.RootCertObjectName != nil {
		rootCertObjectName := *typedInput.RootCertObjectName
		authority.RootCertObjectName = &rootCertObjectName
	}

	// No error
	return nil
}

// AssignProperties_From_IstioPluginCertificateAuthority populates our IstioPluginCertificateAuthority from the provided source IstioPluginCertificateAuthority
func (authority *IstioPluginCertificateAuthority) AssignProperties_From_IstioPluginCertificateAuthority(source *storage.IstioPluginCertificateAuthority) error {

	// CertChainObjectName
	authority.CertChainObjectName = genruntime.ClonePointerToString(source.CertChainObjectName)

	// CertObjectName
	authority.CertObjectName = genruntime.ClonePointerToString(source.CertObjectName)

	// KeyObjectName
	authority.KeyObjectName = genruntime.ClonePointerToString(source.KeyObjectName)

	// KeyVaultReference
	if source.KeyVaultReference != nil {
		keyVaultReference := source.KeyVaultReference.Copy()
		authority.KeyVaultReference = &keyVaultReference
	} else {
		authority.KeyVaultReference = nil
	}

	// RootCertObjectName
	authority.RootCertObjectName = genruntime.ClonePointerToString(source.RootCertObjectName)

	// No error
	return nil
}

// AssignProperties_To_IstioPluginCertificateAuthority populates the provided destination IstioPluginCertificateAuthority from our IstioPluginCertificateAuthority
func (authority *IstioPluginCertificateAuthority) AssignProperties_To_IstioPluginCertificateAuthority(destination *storage.IstioPluginCertificateAuthority) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// CertChainObjectName
	destination.CertChainObjectName = genruntime.ClonePointerToString(authority.CertChainObjectName)

	// CertObjectName
	destination.CertObjectName = genruntime.ClonePointerToString(authority.CertObjectName)

	// KeyObjectName
	destination.KeyObjectName = genruntime.ClonePointerToString(authority.KeyObjectName)

	// KeyVaultReference
	if authority.KeyVaultReference != nil {
		keyVaultReference := authority.KeyVaultReference.Copy()
		destination.KeyVaultReference = &keyVaultReference
	} else {
		destination.KeyVaultReference = nil
	}

	// RootCertObjectName
	destination.RootCertObjectName = genruntime.ClonePointerToString(authority.RootCertObjectName)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// Plugin certificates information for Service Mesh.
type IstioPluginCertificateAuthority_STATUS struct {
	// CertChainObjectName: Certificate chain object name in Azure Key Vault.
	CertChainObjectName *string `json:"certChainObjectName,omitempty"`

	// CertObjectName: Intermediate certificate object name in Azure Key Vault.
	CertObjectName *string `json:"certObjectName,omitempty"`

	// KeyObjectName: Intermediate certificate private key object name in Azure Key Vault.
	KeyObjectName *string `json:"keyObjectName,omitempty"`

	// KeyVaultId: The resource ID of the Key Vault.
	KeyVaultId *string `json:"keyVaultId,omitempty"`

	// RootCertObjectName: Root certificate object name in Azure Key Vault.
	RootCertObjectName *string `json:"rootCertObjectName,omitempty"`
}

var _ genruntime.FromARMConverter = &IstioPluginCertificateAuthority_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (authority *IstioPluginCertificateAuthority_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.IstioPluginCertificateAuthority_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (authority *IstioPluginCertificateAuthority_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.IstioPluginCertificateAuthority_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.IstioPluginCertificateAuthority_STATUS, got %T", armInput)
	}

	// Set property "CertChainObjectName":
	if typedInput.CertChainObjectName != nil {
		certChainObjectName := *typedInput.CertChainObjectName
		authority.CertChainObjectName = &certChainObjectName
	}

	// Set property "CertObjectName":
	if typedInput.CertObjectName != nil {
		certObjectName := *typedInput.CertObjectName
		authority.CertObjectName = &certObjectName
	}

	// Set property "KeyObjectName":
	if typedInput.KeyObjectName != nil {
		keyObjectName := *typedInput.KeyObjectName
		authority.KeyObjectName = &keyObjectName
	}

	// Set property "KeyVaultId":
	if typedInput.KeyVaultId != nil {
		keyVaultId := *typedInput.KeyVaultId
		authority.KeyVaultId = &keyVaultId
	}

	// Set property "RootCertObjectName":
	if typedInput.RootCertObjectName != nil {
		rootCertObjectName := *typedInput.RootCertObjectName
		authority.RootCertObjectName = &rootCertObjectName
	}

	// No error
	return nil
}

// AssignProperties_From_IstioPluginCertificateAuthority_STATUS populates our IstioPluginCertificateAuthority_STATUS from the provided source IstioPluginCertificateAuthority_STATUS
func (authority *IstioPluginCertificateAuthority_STATUS) AssignProperties_From_IstioPluginCertificateAuthority_STATUS(source *storage.IstioPluginCertificateAuthority_STATUS) error {

	// CertChainObjectName
	authority.CertChainObjectName = genruntime.ClonePointerToString(source.CertChainObjectName)

	// CertObjectName
	authority.CertObjectName = genruntime.ClonePointerToString(source.CertObjectName)

	// KeyObjectName
	authority.KeyObjectName = genruntime.ClonePointerToString(source.KeyObjectName)

	// KeyVaultId
	authority.KeyVaultId = genruntime.ClonePointerToString(source.KeyVaultId)

	// RootCertObjectName
	authority.RootCertObjectName = genruntime.ClonePointerToString(source.RootCertObjectName)

	// No error
	return nil
}

// AssignProperties_To_IstioPluginCertificateAuthority_STATUS populates the provided destination IstioPluginCertificateAuthority_STATUS from our IstioPluginCertificateAuthority_STATUS
func (authority *IstioPluginCertificateAuthority_STATUS) AssignProperties_To_IstioPluginCertificateAuthority_STATUS(destination *storage.IstioPluginCertificateAuthority_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// CertChainObjectName
	destination.CertChainObjectName = genruntime.ClonePointerToString(authority.CertChainObjectName)

	// CertObjectName
	destination.CertObjectName = genruntime.ClonePointerToString(authority.CertObjectName)

	// KeyObjectName
	destination.KeyObjectName = genruntime.ClonePointerToString(authority.KeyObjectName)

	// KeyVaultId
	destination.KeyVaultId = genruntime.ClonePointerToString(authority.KeyVaultId)

	// RootCertObjectName
	destination.RootCertObjectName = genruntime.ClonePointerToString(authority.RootCertObjectName)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// An error response from the pod identity provisioning.
type ManagedClusterPodIdentityProvisioningError_STATUS struct {
	// Error: Details about the error.
	Error *ManagedClusterPodIdentityProvisioningErrorBody_STATUS `json:"error,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterPodIdentityProvisioningError_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (error *ManagedClusterPodIdentityProvisioningError_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterPodIdentityProvisioningError_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (error *ManagedClusterPodIdentityProvisioningError_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterPodIdentityProvisioningError_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterPodIdentityProvisioningError_STATUS, got %T", armInput)
	}

	// Set property "Error":
	if typedInput.Error != nil {
		var error2 ManagedClusterPodIdentityProvisioningErrorBody_STATUS
		err := error2.PopulateFromARM(owner, *typedInput.Error)
		if err != nil {
			return err
		}
		error1 := error2
		error.Error = &error1
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterPodIdentityProvisioningError_STATUS populates our ManagedClusterPodIdentityProvisioningError_STATUS from the provided source ManagedClusterPodIdentityProvisioningError_STATUS
func (error *ManagedClusterPodIdentityProvisioningError_STATUS) AssignProperties_From_ManagedClusterPodIdentityProvisioningError_STATUS(source *storage.ManagedClusterPodIdentityProvisioningError_STATUS) error {

	// Error
	if source.Error != nil {
		var errorLocal ManagedClusterPodIdentityProvisioningErrorBody_STATUS
		err := errorLocal.AssignProperties_From_ManagedClusterPodIdentityProvisioningErrorBody_STATUS(source.Error)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterPodIdentityProvisioningErrorBody_STATUS() to populate field Error")
		}
		error.Error = &errorLocal
	} else {
		error.Error = nil
	}

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterPodIdentityProvisioningError_STATUS populates the provided destination ManagedClusterPodIdentityProvisioningError_STATUS from our ManagedClusterPodIdentityProvisioningError_STATUS
func (error *ManagedClusterPodIdentityProvisioningError_STATUS) AssignProperties_To_ManagedClusterPodIdentityProvisioningError_STATUS(destination *storage.ManagedClusterPodIdentityProvisioningError_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Error
	if error.Error != nil {
		var errorLocal storage.ManagedClusterPodIdentityProvisioningErrorBody_STATUS
		err := error.Error.AssignProperties_To_ManagedClusterPodIdentityProvisioningErrorBody_STATUS(&errorLocal)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterPodIdentityProvisioningErrorBody_STATUS() to populate field Error")
		}
		destination.Error = &errorLocal
	} else {
		destination.Error = nil
	}

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"External","Internal"}
type IstioIngressGateway_Mode string

const (
	IstioIngressGateway_Mode_External = IstioIngressGateway_Mode("External")
	IstioIngressGateway_Mode_Internal = IstioIngressGateway_Mode("Internal")
)

// Mapping from string to IstioIngressGateway_Mode
var istioIngressGateway_Mode_Values = map[string]IstioIngressGateway_Mode{
	"external": IstioIngressGateway_Mode_External,
	"internal": IstioIngressGateway_Mode_Internal,
}

type IstioIngressGateway_Mode_STATUS string

const (
	IstioIngressGateway_Mode_STATUS_External = IstioIngressGateway_Mode_STATUS("External")
	IstioIngressGateway_Mode_STATUS_Internal = IstioIngressGateway_Mode_STATUS("Internal")
)

// Mapping from string to IstioIngressGateway_Mode_STATUS
var istioIngressGateway_Mode_STATUS_Values = map[string]IstioIngressGateway_Mode_STATUS{
	"external": IstioIngressGateway_Mode_STATUS_External,
	"internal": IstioIngressGateway_Mode_STATUS_Internal,
}

// An error response from the pod identity provisioning.
type ManagedClusterPodIdentityProvisioningErrorBody_STATUS struct {
	// Code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
	Code *string `json:"code,omitempty"`

	// Details: A list of additional details about the error.
	Details []ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled `json:"details,omitempty"`

	// Message: A message describing the error, intended to be suitable for display in a user interface.
	Message *string `json:"message,omitempty"`

	// Target: The target of the particular error. For example, the name of the property in error.
	Target *string `json:"target,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterPodIdentityProvisioningErrorBody_STATUS{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (body *ManagedClusterPodIdentityProvisioningErrorBody_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterPodIdentityProvisioningErrorBody_STATUS{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (body *ManagedClusterPodIdentityProvisioningErrorBody_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterPodIdentityProvisioningErrorBody_STATUS)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterPodIdentityProvisioningErrorBody_STATUS, got %T", armInput)
	}

	// Set property "Code":
	if typedInput.Code != nil {
		code := *typedInput.Code
		body.Code = &code
	}

	// Set property "Details":
	for _, item := range typedInput.Details {
		var item1 ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		body.Details = append(body.Details, item1)
	}

	// Set property "Message":
	if typedInput.Message != nil {
		message := *typedInput.Message
		body.Message = &message
	}

	// Set property "Target":
	if typedInput.Target != nil {
		target := *typedInput.Target
		body.Target = &target
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterPodIdentityProvisioningErrorBody_STATUS populates our ManagedClusterPodIdentityProvisioningErrorBody_STATUS from the provided source ManagedClusterPodIdentityProvisioningErrorBody_STATUS
func (body *ManagedClusterPodIdentityProvisioningErrorBody_STATUS) AssignProperties_From_ManagedClusterPodIdentityProvisioningErrorBody_STATUS(source *storage.ManagedClusterPodIdentityProvisioningErrorBody_STATUS) error {

	// Code
	body.Code = genruntime.ClonePointerToString(source.Code)

	// Details
	if source.Details != nil {
		detailList := make([]ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled, len(source.Details))
		for detailIndex, detailItem := range source.Details {
			var detail ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled
			err := detail.AssignProperties_From_ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled(&detailItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled() to populate field Details")
			}
			detailList[detailIndex] = detail
		}
		body.Details = detailList
	} else {
		body.Details = nil
	}

	// Message
	body.Message = genruntime.ClonePointerToString(source.Message)

	// Target
	body.Target = genruntime.ClonePointerToString(source.Target)

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterPodIdentityProvisioningErrorBody_STATUS populates the provided destination ManagedClusterPodIdentityProvisioningErrorBody_STATUS from our ManagedClusterPodIdentityProvisioningErrorBody_STATUS
func (body *ManagedClusterPodIdentityProvisioningErrorBody_STATUS) AssignProperties_To_ManagedClusterPodIdentityProvisioningErrorBody_STATUS(destination *storage.ManagedClusterPodIdentityProvisioningErrorBody_STATUS) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Code
	destination.Code = genruntime.ClonePointerToString(body.Code)

	// Details
	if body.Details != nil {
		detailList := make([]storage.ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled, len(body.Details))
		for detailIndex, detailItem := range body.Details {
			var detail storage.ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled
			err := detailItem.AssignProperties_To_ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled(&detail)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled() to populate field Details")
			}
			detailList[detailIndex] = detail
		}
		destination.Details = detailList
	} else {
		destination.Details = nil
	}

	// Message
	destination.Message = genruntime.ClonePointerToString(body.Message)

	// Target
	destination.Target = genruntime.ClonePointerToString(body.Target)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

type ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled struct {
	// Code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
	Code *string `json:"code,omitempty"`

	// Message: A message describing the error, intended to be suitable for display in a user interface.
	Message *string `json:"message,omitempty"`

	// Target: The target of the particular error. For example, the name of the property in error.
	Target *string `json:"target,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled{}

// NewEmptyARMValue returns an empty ARM value suitable for deserializing into
func (unrolled *ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled) NewEmptyARMValue() genruntime.ARMResourceStatus {
	return &arm.ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled{}
}

// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object
func (unrolled *ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
	typedInput, ok := armInput.(arm.ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled, got %T", armInput)
	}

	// Set property "Code":
	if typedInput.Code != nil {
		code := *typedInput.Code
		unrolled.Code = &code
	}

	// Set property "Message":
	if typedInput.Message != nil {
		message := *typedInput.Message
		unrolled.Message = &message
	}

	// Set property "Target":
	if typedInput.Target != nil {
		target := *typedInput.Target
		unrolled.Target = &target
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled populates our ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled from the provided source ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled
func (unrolled *ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled) AssignProperties_From_ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled(source *storage.ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled) error {

	// Code
	unrolled.Code = genruntime.ClonePointerToString(source.Code)

	// Message
	unrolled.Message = genruntime.ClonePointerToString(source.Message)

	// Target
	unrolled.Target = genruntime.ClonePointerToString(source.Target)

	// No error
	return nil
}

// AssignProperties_To_ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled populates the provided destination ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled from our ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled
func (unrolled *ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled) AssignProperties_To_ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled(destination *storage.ManagedClusterPodIdentityProvisioningErrorBody_STATUS_Unrolled) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

	// Code
	destination.Code = genruntime.ClonePointerToString(unrolled.Code)

	// Message
	destination.Message = genruntime.ClonePointerToString(unrolled.Message)

	// Target
	destination.Target = genruntime.ClonePointerToString(unrolled.Target)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// No error
	return nil
}

func init() {
	SchemeBuilder.Register(&ManagedCluster{}, &ManagedClusterList{})
}
