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

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

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories={azure,cdn}
// +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: /cdn/resource-manager/Microsoft.Cdn/Cdn/stable/2023-05-01/afdx.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}
type SecurityPolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              SecurityPolicy_Spec   `json:"spec,omitempty"`
	Status            SecurityPolicy_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &SecurityPolicy{}

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

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

var _ conversion.Convertible = &SecurityPolicy{}

// ConvertFrom populates our SecurityPolicy from the provided hub SecurityPolicy
func (policy *SecurityPolicy) ConvertFrom(hub conversion.Hub) error {
	source, ok := hub.(*storage.SecurityPolicy)
	if !ok {
		return fmt.Errorf("expected cdn/v1api20230501/storage/SecurityPolicy but received %T instead", hub)
	}

	return policy.AssignProperties_From_SecurityPolicy(source)
}

// ConvertTo populates the provided hub SecurityPolicy from our SecurityPolicy
func (policy *SecurityPolicy) ConvertTo(hub conversion.Hub) error {
	destination, ok := hub.(*storage.SecurityPolicy)
	if !ok {
		return fmt.Errorf("expected cdn/v1api20230501/storage/SecurityPolicy but received %T instead", hub)
	}

	return policy.AssignProperties_To_SecurityPolicy(destination)
}

var _ configmaps.Exporter = &SecurityPolicy{}

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

var _ secrets.Exporter = &SecurityPolicy{}

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

var _ genruntime.ImportableResource = &SecurityPolicy{}

// InitializeSpec initializes the spec for this resource from the given status
func (policy *SecurityPolicy) InitializeSpec(status genruntime.ConvertibleStatus) error {
	if s, ok := status.(*SecurityPolicy_STATUS); ok {
		return policy.Spec.Initialize_From_SecurityPolicy_STATUS(s)
	}

	return fmt.Errorf("expected Status of type SecurityPolicy_STATUS but received %T instead", status)
}

var _ genruntime.KubernetesResource = &SecurityPolicy{}

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

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

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

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

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.Cdn/profiles/securityPolicies"
func (policy *SecurityPolicy) GetType() string {
	return "Microsoft.Cdn/profiles/securityPolicies"
}

// NewEmptyStatus returns a new empty (blank) status
func (policy *SecurityPolicy) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &SecurityPolicy_STATUS{}
}

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

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

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

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

	policy.Status = st
	return nil
}

// AssignProperties_From_SecurityPolicy populates our SecurityPolicy from the provided source SecurityPolicy
func (policy *SecurityPolicy) AssignProperties_From_SecurityPolicy(source *storage.SecurityPolicy) error {

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

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

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

	// No error
	return nil
}

// AssignProperties_To_SecurityPolicy populates the provided destination SecurityPolicy from our SecurityPolicy
func (policy *SecurityPolicy) AssignProperties_To_SecurityPolicy(destination *storage.SecurityPolicy) error {

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

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

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

// +kubebuilder:object:root=true
// Generator information:
// - Generated from: /cdn/resource-manager/Microsoft.Cdn/Cdn/stable/2023-05-01/afdx.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}
type SecurityPolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []SecurityPolicy `json:"items"`
}

type SecurityPolicy_Spec struct {
	// 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"`

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

	// Parameters: object which contains security policy parameters
	Parameters *SecurityPolicyPropertiesParameters `json:"parameters,omitempty"`
}

var _ genruntime.ARMTransformer = &SecurityPolicy_Spec{}

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

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

	// Set property "Properties":
	if policy.Parameters != nil {
		result.Properties = &arm.SecurityPolicyProperties{}
	}
	if policy.Parameters != nil {
		parameters_ARM, err := policy.Parameters.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		parameters := *parameters_ARM.(*arm.SecurityPolicyPropertiesParameters)
		result.Properties.Parameters = &parameters
	}
	return result, nil
}

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

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

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

	// no assignment for property "OperatorSpec"

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

	// Set property "Parameters":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Parameters != nil {
			var parameters1 SecurityPolicyPropertiesParameters
			err := parameters1.PopulateFromARM(owner, *typedInput.Properties.Parameters)
			if err != nil {
				return err
			}
			parameters := parameters1
			policy.Parameters = &parameters
		}
	}

	// No error
	return nil
}

var _ genruntime.ConvertibleSpec = &SecurityPolicy_Spec{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.SecurityPolicy_Spec{}
	err := policy.AssignProperties_To_SecurityPolicy_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_SecurityPolicy_Spec populates our SecurityPolicy_Spec from the provided source SecurityPolicy_Spec
func (policy *SecurityPolicy_Spec) AssignProperties_From_SecurityPolicy_Spec(source *storage.SecurityPolicy_Spec) error {

	// AzureName
	policy.AzureName = source.AzureName

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

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

	// Parameters
	if source.Parameters != nil {
		var parameter SecurityPolicyPropertiesParameters
		err := parameter.AssignProperties_From_SecurityPolicyPropertiesParameters(source.Parameters)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SecurityPolicyPropertiesParameters() to populate field Parameters")
		}
		policy.Parameters = &parameter
	} else {
		policy.Parameters = nil
	}

	// No error
	return nil
}

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

	// AzureName
	destination.AzureName = policy.AzureName

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

	// OriginalVersion
	destination.OriginalVersion = policy.OriginalVersion()

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

	// Parameters
	if policy.Parameters != nil {
		var parameter storage.SecurityPolicyPropertiesParameters
		err := policy.Parameters.AssignProperties_To_SecurityPolicyPropertiesParameters(&parameter)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SecurityPolicyPropertiesParameters() to populate field Parameters")
		}
		destination.Parameters = &parameter
	} else {
		destination.Parameters = nil
	}

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

	// No error
	return nil
}

// Initialize_From_SecurityPolicy_STATUS populates our SecurityPolicy_Spec from the provided source SecurityPolicy_STATUS
func (policy *SecurityPolicy_Spec) Initialize_From_SecurityPolicy_STATUS(source *SecurityPolicy_STATUS) error {

	// Parameters
	if source.Parameters != nil {
		var parameter SecurityPolicyPropertiesParameters
		err := parameter.Initialize_From_SecurityPolicyPropertiesParameters_STATUS(source.Parameters)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_SecurityPolicyPropertiesParameters_STATUS() to populate field Parameters")
		}
		policy.Parameters = &parameter
	} else {
		policy.Parameters = nil
	}

	// No error
	return nil
}

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

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

type SecurityPolicy_STATUS struct {
	// Conditions: The observed state of the resource
	Conditions       []conditions.Condition                            `json:"conditions,omitempty"`
	DeploymentStatus *SecurityPolicyProperties_DeploymentStatus_STATUS `json:"deploymentStatus,omitempty"`

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

	// Name: Resource name.
	Name *string `json:"name,omitempty"`

	// Parameters: object which contains security policy parameters
	Parameters *SecurityPolicyPropertiesParameters_STATUS `json:"parameters,omitempty"`

	// ProfileName: The name of the profile which holds the security policy.
	ProfileName *string `json:"profileName,omitempty"`

	// ProvisioningState: Provisioning status
	ProvisioningState *SecurityPolicyProperties_ProvisioningState_STATUS `json:"provisioningState,omitempty"`

	// SystemData: Read only system data
	SystemData *SystemData_STATUS `json:"systemData,omitempty"`

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

var _ genruntime.ConvertibleStatus = &SecurityPolicy_STATUS{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.SecurityPolicy_STATUS{}
	err := policy.AssignProperties_To_SecurityPolicy_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 = &SecurityPolicy_STATUS{}

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

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

	// no assignment for property "Conditions"

	// Set property "DeploymentStatus":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.DeploymentStatus != nil {
			var temp string
			temp = string(*typedInput.Properties.DeploymentStatus)
			deploymentStatus := SecurityPolicyProperties_DeploymentStatus_STATUS(temp)
			policy.DeploymentStatus = &deploymentStatus
		}
	}

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

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

	// Set property "Parameters":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Parameters != nil {
			var parameters1 SecurityPolicyPropertiesParameters_STATUS
			err := parameters1.PopulateFromARM(owner, *typedInput.Properties.Parameters)
			if err != nil {
				return err
			}
			parameters := parameters1
			policy.Parameters = &parameters
		}
	}

	// Set property "ProfileName":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ProfileName != nil {
			profileName := *typedInput.Properties.ProfileName
			policy.ProfileName = &profileName
		}
	}

	// Set property "ProvisioningState":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ProvisioningState != nil {
			var temp string
			temp = string(*typedInput.Properties.ProvisioningState)
			provisioningState := SecurityPolicyProperties_ProvisioningState_STATUS(temp)
			policy.ProvisioningState = &provisioningState
		}
	}

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

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

	// No error
	return nil
}

// AssignProperties_From_SecurityPolicy_STATUS populates our SecurityPolicy_STATUS from the provided source SecurityPolicy_STATUS
func (policy *SecurityPolicy_STATUS) AssignProperties_From_SecurityPolicy_STATUS(source *storage.SecurityPolicy_STATUS) error {

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

	// DeploymentStatus
	if source.DeploymentStatus != nil {
		deploymentStatus := *source.DeploymentStatus
		deploymentStatusTemp := genruntime.ToEnum(deploymentStatus, securityPolicyProperties_DeploymentStatus_STATUS_Values)
		policy.DeploymentStatus = &deploymentStatusTemp
	} else {
		policy.DeploymentStatus = nil
	}

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

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

	// Parameters
	if source.Parameters != nil {
		var parameter SecurityPolicyPropertiesParameters_STATUS
		err := parameter.AssignProperties_From_SecurityPolicyPropertiesParameters_STATUS(source.Parameters)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SecurityPolicyPropertiesParameters_STATUS() to populate field Parameters")
		}
		policy.Parameters = &parameter
	} else {
		policy.Parameters = nil
	}

	// ProfileName
	policy.ProfileName = genruntime.ClonePointerToString(source.ProfileName)

	// ProvisioningState
	if source.ProvisioningState != nil {
		provisioningState := *source.ProvisioningState
		provisioningStateTemp := genruntime.ToEnum(provisioningState, securityPolicyProperties_ProvisioningState_STATUS_Values)
		policy.ProvisioningState = &provisioningStateTemp
	} else {
		policy.ProvisioningState = 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")
		}
		policy.SystemData = &systemDatum
	} else {
		policy.SystemData = nil
	}

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

	// No error
	return nil
}

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

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

	// DeploymentStatus
	if policy.DeploymentStatus != nil {
		deploymentStatus := string(*policy.DeploymentStatus)
		destination.DeploymentStatus = &deploymentStatus
	} else {
		destination.DeploymentStatus = nil
	}

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

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

	// Parameters
	if policy.Parameters != nil {
		var parameter storage.SecurityPolicyPropertiesParameters_STATUS
		err := policy.Parameters.AssignProperties_To_SecurityPolicyPropertiesParameters_STATUS(&parameter)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SecurityPolicyPropertiesParameters_STATUS() to populate field Parameters")
		}
		destination.Parameters = &parameter
	} else {
		destination.Parameters = nil
	}

	// ProfileName
	destination.ProfileName = genruntime.ClonePointerToString(policy.ProfileName)

	// ProvisioningState
	if policy.ProvisioningState != nil {
		provisioningState := string(*policy.ProvisioningState)
		destination.ProvisioningState = &provisioningState
	} else {
		destination.ProvisioningState = nil
	}

	// SystemData
	if policy.SystemData != nil {
		var systemDatum storage.SystemData_STATUS
		err := policy.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
	}

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

	// 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 SecurityPolicyOperatorSpec struct {
	// ConfigMapExpressions: configures where to place operator written dynamic ConfigMaps (created with CEL expressions).
	ConfigMapExpressions []*core.DestinationExpression `json:"configMapExpressions,omitempty"`

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

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

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

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

	// No error
	return nil
}

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

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

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

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

	// No error
	return nil
}

type SecurityPolicyProperties_DeploymentStatus_STATUS string

const (
	SecurityPolicyProperties_DeploymentStatus_STATUS_Failed     = SecurityPolicyProperties_DeploymentStatus_STATUS("Failed")
	SecurityPolicyProperties_DeploymentStatus_STATUS_InProgress = SecurityPolicyProperties_DeploymentStatus_STATUS("InProgress")
	SecurityPolicyProperties_DeploymentStatus_STATUS_NotStarted = SecurityPolicyProperties_DeploymentStatus_STATUS("NotStarted")
	SecurityPolicyProperties_DeploymentStatus_STATUS_Succeeded  = SecurityPolicyProperties_DeploymentStatus_STATUS("Succeeded")
)

// Mapping from string to SecurityPolicyProperties_DeploymentStatus_STATUS
var securityPolicyProperties_DeploymentStatus_STATUS_Values = map[string]SecurityPolicyProperties_DeploymentStatus_STATUS{
	"failed":     SecurityPolicyProperties_DeploymentStatus_STATUS_Failed,
	"inprogress": SecurityPolicyProperties_DeploymentStatus_STATUS_InProgress,
	"notstarted": SecurityPolicyProperties_DeploymentStatus_STATUS_NotStarted,
	"succeeded":  SecurityPolicyProperties_DeploymentStatus_STATUS_Succeeded,
}

type SecurityPolicyProperties_ProvisioningState_STATUS string

const (
	SecurityPolicyProperties_ProvisioningState_STATUS_Creating  = SecurityPolicyProperties_ProvisioningState_STATUS("Creating")
	SecurityPolicyProperties_ProvisioningState_STATUS_Deleting  = SecurityPolicyProperties_ProvisioningState_STATUS("Deleting")
	SecurityPolicyProperties_ProvisioningState_STATUS_Failed    = SecurityPolicyProperties_ProvisioningState_STATUS("Failed")
	SecurityPolicyProperties_ProvisioningState_STATUS_Succeeded = SecurityPolicyProperties_ProvisioningState_STATUS("Succeeded")
	SecurityPolicyProperties_ProvisioningState_STATUS_Updating  = SecurityPolicyProperties_ProvisioningState_STATUS("Updating")
)

// Mapping from string to SecurityPolicyProperties_ProvisioningState_STATUS
var securityPolicyProperties_ProvisioningState_STATUS_Values = map[string]SecurityPolicyProperties_ProvisioningState_STATUS{
	"creating":  SecurityPolicyProperties_ProvisioningState_STATUS_Creating,
	"deleting":  SecurityPolicyProperties_ProvisioningState_STATUS_Deleting,
	"failed":    SecurityPolicyProperties_ProvisioningState_STATUS_Failed,
	"succeeded": SecurityPolicyProperties_ProvisioningState_STATUS_Succeeded,
	"updating":  SecurityPolicyProperties_ProvisioningState_STATUS_Updating,
}

type SecurityPolicyPropertiesParameters struct {
	// WebApplicationFirewall: Mutually exclusive with all other properties
	WebApplicationFirewall *SecurityPolicyWebApplicationFirewallParameters `json:"webApplicationFirewall,omitempty"`
}

var _ genruntime.ARMTransformer = &SecurityPolicyPropertiesParameters{}

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

	// Set property "WebApplicationFirewall":
	if parameters.WebApplicationFirewall != nil {
		webApplicationFirewall_ARM, err := parameters.WebApplicationFirewall.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		webApplicationFirewall := *webApplicationFirewall_ARM.(*arm.SecurityPolicyWebApplicationFirewallParameters)
		result.WebApplicationFirewall = &webApplicationFirewall
	}
	return result, nil
}

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

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

	// Set property "WebApplicationFirewall":
	if typedInput.WebApplicationFirewall != nil {
		var webApplicationFirewall1 SecurityPolicyWebApplicationFirewallParameters
		err := webApplicationFirewall1.PopulateFromARM(owner, *typedInput.WebApplicationFirewall)
		if err != nil {
			return err
		}
		webApplicationFirewall := webApplicationFirewall1
		parameters.WebApplicationFirewall = &webApplicationFirewall
	}

	// No error
	return nil
}

// AssignProperties_From_SecurityPolicyPropertiesParameters populates our SecurityPolicyPropertiesParameters from the provided source SecurityPolicyPropertiesParameters
func (parameters *SecurityPolicyPropertiesParameters) AssignProperties_From_SecurityPolicyPropertiesParameters(source *storage.SecurityPolicyPropertiesParameters) error {

	// WebApplicationFirewall
	if source.WebApplicationFirewall != nil {
		var webApplicationFirewall SecurityPolicyWebApplicationFirewallParameters
		err := webApplicationFirewall.AssignProperties_From_SecurityPolicyWebApplicationFirewallParameters(source.WebApplicationFirewall)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SecurityPolicyWebApplicationFirewallParameters() to populate field WebApplicationFirewall")
		}
		parameters.WebApplicationFirewall = &webApplicationFirewall
	} else {
		parameters.WebApplicationFirewall = nil
	}

	// No error
	return nil
}

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

	// WebApplicationFirewall
	if parameters.WebApplicationFirewall != nil {
		var webApplicationFirewall storage.SecurityPolicyWebApplicationFirewallParameters
		err := parameters.WebApplicationFirewall.AssignProperties_To_SecurityPolicyWebApplicationFirewallParameters(&webApplicationFirewall)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SecurityPolicyWebApplicationFirewallParameters() to populate field WebApplicationFirewall")
		}
		destination.WebApplicationFirewall = &webApplicationFirewall
	} else {
		destination.WebApplicationFirewall = nil
	}

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

	// No error
	return nil
}

// Initialize_From_SecurityPolicyPropertiesParameters_STATUS populates our SecurityPolicyPropertiesParameters from the provided source SecurityPolicyPropertiesParameters_STATUS
func (parameters *SecurityPolicyPropertiesParameters) Initialize_From_SecurityPolicyPropertiesParameters_STATUS(source *SecurityPolicyPropertiesParameters_STATUS) error {

	// WebApplicationFirewall
	if source.WebApplicationFirewall != nil {
		var webApplicationFirewall SecurityPolicyWebApplicationFirewallParameters
		err := webApplicationFirewall.Initialize_From_SecurityPolicyWebApplicationFirewallParameters_STATUS(source.WebApplicationFirewall)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_SecurityPolicyWebApplicationFirewallParameters_STATUS() to populate field WebApplicationFirewall")
		}
		parameters.WebApplicationFirewall = &webApplicationFirewall
	} else {
		parameters.WebApplicationFirewall = nil
	}

	// No error
	return nil
}

type SecurityPolicyPropertiesParameters_STATUS struct {
	// WebApplicationFirewall: Mutually exclusive with all other properties
	WebApplicationFirewall *SecurityPolicyWebApplicationFirewallParameters_STATUS `json:"webApplicationFirewall,omitempty"`
}

var _ genruntime.FromARMConverter = &SecurityPolicyPropertiesParameters_STATUS{}

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

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

	// Set property "WebApplicationFirewall":
	if typedInput.WebApplicationFirewall != nil {
		var webApplicationFirewall1 SecurityPolicyWebApplicationFirewallParameters_STATUS
		err := webApplicationFirewall1.PopulateFromARM(owner, *typedInput.WebApplicationFirewall)
		if err != nil {
			return err
		}
		webApplicationFirewall := webApplicationFirewall1
		parameters.WebApplicationFirewall = &webApplicationFirewall
	}

	// No error
	return nil
}

// AssignProperties_From_SecurityPolicyPropertiesParameters_STATUS populates our SecurityPolicyPropertiesParameters_STATUS from the provided source SecurityPolicyPropertiesParameters_STATUS
func (parameters *SecurityPolicyPropertiesParameters_STATUS) AssignProperties_From_SecurityPolicyPropertiesParameters_STATUS(source *storage.SecurityPolicyPropertiesParameters_STATUS) error {

	// WebApplicationFirewall
	if source.WebApplicationFirewall != nil {
		var webApplicationFirewall SecurityPolicyWebApplicationFirewallParameters_STATUS
		err := webApplicationFirewall.AssignProperties_From_SecurityPolicyWebApplicationFirewallParameters_STATUS(source.WebApplicationFirewall)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SecurityPolicyWebApplicationFirewallParameters_STATUS() to populate field WebApplicationFirewall")
		}
		parameters.WebApplicationFirewall = &webApplicationFirewall
	} else {
		parameters.WebApplicationFirewall = nil
	}

	// No error
	return nil
}

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

	// WebApplicationFirewall
	if parameters.WebApplicationFirewall != nil {
		var webApplicationFirewall storage.SecurityPolicyWebApplicationFirewallParameters_STATUS
		err := parameters.WebApplicationFirewall.AssignProperties_To_SecurityPolicyWebApplicationFirewallParameters_STATUS(&webApplicationFirewall)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SecurityPolicyWebApplicationFirewallParameters_STATUS() to populate field WebApplicationFirewall")
		}
		destination.WebApplicationFirewall = &webApplicationFirewall
	} else {
		destination.WebApplicationFirewall = nil
	}

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

	// No error
	return nil
}

type SecurityPolicyWebApplicationFirewallParameters struct {
	// Associations: Waf associations
	Associations []SecurityPolicyWebApplicationFirewallAssociation `json:"associations,omitempty"`

	// +kubebuilder:validation:Required
	// Type: The type of the Security policy to create.
	Type *SecurityPolicyWebApplicationFirewallParameters_Type `json:"type,omitempty"`

	// WafPolicy: Resource ID.
	WafPolicy *ResourceReference `json:"wafPolicy,omitempty"`
}

var _ genruntime.ARMTransformer = &SecurityPolicyWebApplicationFirewallParameters{}

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

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

	// Set property "Type":
	if parameters.Type != nil {
		var temp arm.SecurityPolicyWebApplicationFirewallParameters_Type
		var temp1 string
		temp1 = string(*parameters.Type)
		temp = arm.SecurityPolicyWebApplicationFirewallParameters_Type(temp1)
		result.Type = temp
	}

	// Set property "WafPolicy":
	if parameters.WafPolicy != nil {
		wafPolicy_ARM, err := parameters.WafPolicy.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		wafPolicy := *wafPolicy_ARM.(*arm.ResourceReference)
		result.WafPolicy = &wafPolicy
	}
	return result, nil
}

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

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

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

	// Set property "Type":
	var temp SecurityPolicyWebApplicationFirewallParameters_Type
	var temp1 string
	temp1 = string(typedInput.Type)
	temp = SecurityPolicyWebApplicationFirewallParameters_Type(temp1)
	parameters.Type = &temp

	// Set property "WafPolicy":
	if typedInput.WafPolicy != nil {
		var wafPolicy1 ResourceReference
		err := wafPolicy1.PopulateFromARM(owner, *typedInput.WafPolicy)
		if err != nil {
			return err
		}
		wafPolicy := wafPolicy1
		parameters.WafPolicy = &wafPolicy
	}

	// No error
	return nil
}

// AssignProperties_From_SecurityPolicyWebApplicationFirewallParameters populates our SecurityPolicyWebApplicationFirewallParameters from the provided source SecurityPolicyWebApplicationFirewallParameters
func (parameters *SecurityPolicyWebApplicationFirewallParameters) AssignProperties_From_SecurityPolicyWebApplicationFirewallParameters(source *storage.SecurityPolicyWebApplicationFirewallParameters) error {

	// Associations
	if source.Associations != nil {
		associationList := make([]SecurityPolicyWebApplicationFirewallAssociation, len(source.Associations))
		for associationIndex, associationItem := range source.Associations {
			var association SecurityPolicyWebApplicationFirewallAssociation
			err := association.AssignProperties_From_SecurityPolicyWebApplicationFirewallAssociation(&associationItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_SecurityPolicyWebApplicationFirewallAssociation() to populate field Associations")
			}
			associationList[associationIndex] = association
		}
		parameters.Associations = associationList
	} else {
		parameters.Associations = nil
	}

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

	// WafPolicy
	if source.WafPolicy != nil {
		var wafPolicy ResourceReference
		err := wafPolicy.AssignProperties_From_ResourceReference(source.WafPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ResourceReference() to populate field WafPolicy")
		}
		parameters.WafPolicy = &wafPolicy
	} else {
		parameters.WafPolicy = nil
	}

	// No error
	return nil
}

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

	// Associations
	if parameters.Associations != nil {
		associationList := make([]storage.SecurityPolicyWebApplicationFirewallAssociation, len(parameters.Associations))
		for associationIndex, associationItem := range parameters.Associations {
			var association storage.SecurityPolicyWebApplicationFirewallAssociation
			err := associationItem.AssignProperties_To_SecurityPolicyWebApplicationFirewallAssociation(&association)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_SecurityPolicyWebApplicationFirewallAssociation() to populate field Associations")
			}
			associationList[associationIndex] = association
		}
		destination.Associations = associationList
	} else {
		destination.Associations = nil
	}

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

	// WafPolicy
	if parameters.WafPolicy != nil {
		var wafPolicy storage.ResourceReference
		err := parameters.WafPolicy.AssignProperties_To_ResourceReference(&wafPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ResourceReference() to populate field WafPolicy")
		}
		destination.WafPolicy = &wafPolicy
	} else {
		destination.WafPolicy = nil
	}

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

	// No error
	return nil
}

// Initialize_From_SecurityPolicyWebApplicationFirewallParameters_STATUS populates our SecurityPolicyWebApplicationFirewallParameters from the provided source SecurityPolicyWebApplicationFirewallParameters_STATUS
func (parameters *SecurityPolicyWebApplicationFirewallParameters) Initialize_From_SecurityPolicyWebApplicationFirewallParameters_STATUS(source *SecurityPolicyWebApplicationFirewallParameters_STATUS) error {

	// Associations
	if source.Associations != nil {
		associationList := make([]SecurityPolicyWebApplicationFirewallAssociation, len(source.Associations))
		for associationIndex, associationItem := range source.Associations {
			var association SecurityPolicyWebApplicationFirewallAssociation
			err := association.Initialize_From_SecurityPolicyWebApplicationFirewallAssociation_STATUS(&associationItem)
			if err != nil {
				return eris.Wrap(err, "calling Initialize_From_SecurityPolicyWebApplicationFirewallAssociation_STATUS() to populate field Associations")
			}
			associationList[associationIndex] = association
		}
		parameters.Associations = associationList
	} else {
		parameters.Associations = nil
	}

	// Type
	if source.Type != nil {
		typeVar := genruntime.ToEnum(string(*source.Type), securityPolicyWebApplicationFirewallParameters_Type_Values)
		parameters.Type = &typeVar
	} else {
		parameters.Type = nil
	}

	// WafPolicy
	if source.WafPolicy != nil {
		var wafPolicy ResourceReference
		err := wafPolicy.Initialize_From_ResourceReference_STATUS(source.WafPolicy)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_ResourceReference_STATUS() to populate field WafPolicy")
		}
		parameters.WafPolicy = &wafPolicy
	} else {
		parameters.WafPolicy = nil
	}

	// No error
	return nil
}

type SecurityPolicyWebApplicationFirewallParameters_STATUS struct {
	// Associations: Waf associations
	Associations []SecurityPolicyWebApplicationFirewallAssociation_STATUS `json:"associations,omitempty"`

	// Type: The type of the Security policy to create.
	Type *SecurityPolicyWebApplicationFirewallParameters_Type_STATUS `json:"type,omitempty"`

	// WafPolicy: Resource ID.
	WafPolicy *ResourceReference_STATUS `json:"wafPolicy,omitempty"`
}

var _ genruntime.FromARMConverter = &SecurityPolicyWebApplicationFirewallParameters_STATUS{}

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

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

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

	// Set property "Type":
	var temp SecurityPolicyWebApplicationFirewallParameters_Type_STATUS
	var temp1 string
	temp1 = string(typedInput.Type)
	temp = SecurityPolicyWebApplicationFirewallParameters_Type_STATUS(temp1)
	parameters.Type = &temp

	// Set property "WafPolicy":
	if typedInput.WafPolicy != nil {
		var wafPolicy1 ResourceReference_STATUS
		err := wafPolicy1.PopulateFromARM(owner, *typedInput.WafPolicy)
		if err != nil {
			return err
		}
		wafPolicy := wafPolicy1
		parameters.WafPolicy = &wafPolicy
	}

	// No error
	return nil
}

// AssignProperties_From_SecurityPolicyWebApplicationFirewallParameters_STATUS populates our SecurityPolicyWebApplicationFirewallParameters_STATUS from the provided source SecurityPolicyWebApplicationFirewallParameters_STATUS
func (parameters *SecurityPolicyWebApplicationFirewallParameters_STATUS) AssignProperties_From_SecurityPolicyWebApplicationFirewallParameters_STATUS(source *storage.SecurityPolicyWebApplicationFirewallParameters_STATUS) error {

	// Associations
	if source.Associations != nil {
		associationList := make([]SecurityPolicyWebApplicationFirewallAssociation_STATUS, len(source.Associations))
		for associationIndex, associationItem := range source.Associations {
			var association SecurityPolicyWebApplicationFirewallAssociation_STATUS
			err := association.AssignProperties_From_SecurityPolicyWebApplicationFirewallAssociation_STATUS(&associationItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_SecurityPolicyWebApplicationFirewallAssociation_STATUS() to populate field Associations")
			}
			associationList[associationIndex] = association
		}
		parameters.Associations = associationList
	} else {
		parameters.Associations = nil
	}

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

	// WafPolicy
	if source.WafPolicy != nil {
		var wafPolicy ResourceReference_STATUS
		err := wafPolicy.AssignProperties_From_ResourceReference_STATUS(source.WafPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ResourceReference_STATUS() to populate field WafPolicy")
		}
		parameters.WafPolicy = &wafPolicy
	} else {
		parameters.WafPolicy = nil
	}

	// No error
	return nil
}

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

	// Associations
	if parameters.Associations != nil {
		associationList := make([]storage.SecurityPolicyWebApplicationFirewallAssociation_STATUS, len(parameters.Associations))
		for associationIndex, associationItem := range parameters.Associations {
			var association storage.SecurityPolicyWebApplicationFirewallAssociation_STATUS
			err := associationItem.AssignProperties_To_SecurityPolicyWebApplicationFirewallAssociation_STATUS(&association)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_SecurityPolicyWebApplicationFirewallAssociation_STATUS() to populate field Associations")
			}
			associationList[associationIndex] = association
		}
		destination.Associations = associationList
	} else {
		destination.Associations = nil
	}

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

	// WafPolicy
	if parameters.WafPolicy != nil {
		var wafPolicy storage.ResourceReference_STATUS
		err := parameters.WafPolicy.AssignProperties_To_ResourceReference_STATUS(&wafPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ResourceReference_STATUS() to populate field WafPolicy")
		}
		destination.WafPolicy = &wafPolicy
	} else {
		destination.WafPolicy = nil
	}

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

	// No error
	return nil
}

// settings for security policy patterns to match
type SecurityPolicyWebApplicationFirewallAssociation struct {
	// Domains: List of domains.
	Domains []ActivatedResourceReference `json:"domains,omitempty"`

	// PatternsToMatch: List of paths
	PatternsToMatch []string `json:"patternsToMatch,omitempty"`
}

var _ genruntime.ARMTransformer = &SecurityPolicyWebApplicationFirewallAssociation{}

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

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

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

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

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

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

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

	// No error
	return nil
}

// AssignProperties_From_SecurityPolicyWebApplicationFirewallAssociation populates our SecurityPolicyWebApplicationFirewallAssociation from the provided source SecurityPolicyWebApplicationFirewallAssociation
func (association *SecurityPolicyWebApplicationFirewallAssociation) AssignProperties_From_SecurityPolicyWebApplicationFirewallAssociation(source *storage.SecurityPolicyWebApplicationFirewallAssociation) error {

	// Domains
	if source.Domains != nil {
		domainList := make([]ActivatedResourceReference, len(source.Domains))
		for domainIndex, domainItem := range source.Domains {
			var domain ActivatedResourceReference
			err := domain.AssignProperties_From_ActivatedResourceReference(&domainItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ActivatedResourceReference() to populate field Domains")
			}
			domainList[domainIndex] = domain
		}
		association.Domains = domainList
	} else {
		association.Domains = nil
	}

	// PatternsToMatch
	association.PatternsToMatch = genruntime.CloneSliceOfString(source.PatternsToMatch)

	// No error
	return nil
}

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

	// Domains
	if association.Domains != nil {
		domainList := make([]storage.ActivatedResourceReference, len(association.Domains))
		for domainIndex, domainItem := range association.Domains {
			var domain storage.ActivatedResourceReference
			err := domainItem.AssignProperties_To_ActivatedResourceReference(&domain)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ActivatedResourceReference() to populate field Domains")
			}
			domainList[domainIndex] = domain
		}
		destination.Domains = domainList
	} else {
		destination.Domains = nil
	}

	// PatternsToMatch
	destination.PatternsToMatch = genruntime.CloneSliceOfString(association.PatternsToMatch)

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

	// No error
	return nil
}

// Initialize_From_SecurityPolicyWebApplicationFirewallAssociation_STATUS populates our SecurityPolicyWebApplicationFirewallAssociation from the provided source SecurityPolicyWebApplicationFirewallAssociation_STATUS
func (association *SecurityPolicyWebApplicationFirewallAssociation) Initialize_From_SecurityPolicyWebApplicationFirewallAssociation_STATUS(source *SecurityPolicyWebApplicationFirewallAssociation_STATUS) error {

	// Domains
	if source.Domains != nil {
		domainList := make([]ActivatedResourceReference, len(source.Domains))
		for domainIndex, domainItem := range source.Domains {
			var domain ActivatedResourceReference
			err := domain.Initialize_From_ActivatedResourceReference_STATUS_Profiles_SecurityPolicy_SubResourceEmbedded(&domainItem)
			if err != nil {
				return eris.Wrap(err, "calling Initialize_From_ActivatedResourceReference_STATUS_Profiles_SecurityPolicy_SubResourceEmbedded() to populate field Domains")
			}
			domainList[domainIndex] = domain
		}
		association.Domains = domainList
	} else {
		association.Domains = nil
	}

	// PatternsToMatch
	association.PatternsToMatch = genruntime.CloneSliceOfString(source.PatternsToMatch)

	// No error
	return nil
}

// settings for security policy patterns to match
type SecurityPolicyWebApplicationFirewallAssociation_STATUS struct {
	// Domains: List of domains.
	Domains []ActivatedResourceReference_STATUS_Profiles_SecurityPolicy_SubResourceEmbedded `json:"domains,omitempty"`

	// PatternsToMatch: List of paths
	PatternsToMatch []string `json:"patternsToMatch,omitempty"`
}

var _ genruntime.FromARMConverter = &SecurityPolicyWebApplicationFirewallAssociation_STATUS{}

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

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

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

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

	// No error
	return nil
}

// AssignProperties_From_SecurityPolicyWebApplicationFirewallAssociation_STATUS populates our SecurityPolicyWebApplicationFirewallAssociation_STATUS from the provided source SecurityPolicyWebApplicationFirewallAssociation_STATUS
func (association *SecurityPolicyWebApplicationFirewallAssociation_STATUS) AssignProperties_From_SecurityPolicyWebApplicationFirewallAssociation_STATUS(source *storage.SecurityPolicyWebApplicationFirewallAssociation_STATUS) error {

	// Domains
	if source.Domains != nil {
		domainList := make([]ActivatedResourceReference_STATUS_Profiles_SecurityPolicy_SubResourceEmbedded, len(source.Domains))
		for domainIndex, domainItem := range source.Domains {
			var domain ActivatedResourceReference_STATUS_Profiles_SecurityPolicy_SubResourceEmbedded
			err := domain.AssignProperties_From_ActivatedResourceReference_STATUS_Profiles_SecurityPolicy_SubResourceEmbedded(&domainItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ActivatedResourceReference_STATUS_Profiles_SecurityPolicy_SubResourceEmbedded() to populate field Domains")
			}
			domainList[domainIndex] = domain
		}
		association.Domains = domainList
	} else {
		association.Domains = nil
	}

	// PatternsToMatch
	association.PatternsToMatch = genruntime.CloneSliceOfString(source.PatternsToMatch)

	// No error
	return nil
}

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

	// Domains
	if association.Domains != nil {
		domainList := make([]storage.ActivatedResourceReference_STATUS_Profiles_SecurityPolicy_SubResourceEmbedded, len(association.Domains))
		for domainIndex, domainItem := range association.Domains {
			var domain storage.ActivatedResourceReference_STATUS_Profiles_SecurityPolicy_SubResourceEmbedded
			err := domainItem.AssignProperties_To_ActivatedResourceReference_STATUS_Profiles_SecurityPolicy_SubResourceEmbedded(&domain)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ActivatedResourceReference_STATUS_Profiles_SecurityPolicy_SubResourceEmbedded() to populate field Domains")
			}
			domainList[domainIndex] = domain
		}
		destination.Domains = domainList
	} else {
		destination.Domains = nil
	}

	// PatternsToMatch
	destination.PatternsToMatch = genruntime.CloneSliceOfString(association.PatternsToMatch)

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

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"WebApplicationFirewall"}
type SecurityPolicyWebApplicationFirewallParameters_Type string

const SecurityPolicyWebApplicationFirewallParameters_Type_WebApplicationFirewall = SecurityPolicyWebApplicationFirewallParameters_Type("WebApplicationFirewall")

// Mapping from string to SecurityPolicyWebApplicationFirewallParameters_Type
var securityPolicyWebApplicationFirewallParameters_Type_Values = map[string]SecurityPolicyWebApplicationFirewallParameters_Type{
	"webapplicationfirewall": SecurityPolicyWebApplicationFirewallParameters_Type_WebApplicationFirewall,
}

type SecurityPolicyWebApplicationFirewallParameters_Type_STATUS string

const SecurityPolicyWebApplicationFirewallParameters_Type_STATUS_WebApplicationFirewall = SecurityPolicyWebApplicationFirewallParameters_Type_STATUS("WebApplicationFirewall")

// Mapping from string to SecurityPolicyWebApplicationFirewallParameters_Type_STATUS
var securityPolicyWebApplicationFirewallParameters_Type_STATUS_Values = map[string]SecurityPolicyWebApplicationFirewallParameters_Type_STATUS{
	"webapplicationfirewall": SecurityPolicyWebApplicationFirewallParameters_Type_STATUS_WebApplicationFirewall,
}

func init() {
	SchemeBuilder.Register(&SecurityPolicy{}, &SecurityPolicyList{})
}
