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

import (
	"fmt"
	arm "github.com/Azure/azure-service-operator/v2/api/eventgrid/v1api20200601/arm"
	storage "github.com/Azure/azure-service-operator/v2/api/eventgrid/v1api20200601/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,eventgrid}
// +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: /eventgrid/resource-manager/Microsoft.EventGrid/stable/2020-06-01/EventGrid.json
// - ARM URI: /{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}
type EventSubscription struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              EventSubscription_Spec   `json:"spec,omitempty"`
	Status            EventSubscription_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &EventSubscription{}

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

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

var _ conversion.Convertible = &EventSubscription{}

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

	return subscription.AssignProperties_From_EventSubscription(source)
}

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

	return subscription.AssignProperties_To_EventSubscription(destination)
}

var _ configmaps.Exporter = &EventSubscription{}

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

var _ secrets.Exporter = &EventSubscription{}

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

var _ genruntime.ImportableResource = &EventSubscription{}

// InitializeSpec initializes the spec for this resource from the given status
func (subscription *EventSubscription) InitializeSpec(status genruntime.ConvertibleStatus) error {
	if s, ok := status.(*EventSubscription_STATUS); ok {
		return subscription.Spec.Initialize_From_EventSubscription_STATUS(s)
	}

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

var _ genruntime.KubernetesResource = &EventSubscription{}

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

// GetAPIVersion returns the ARM API version of the resource. This is always "2020-06-01"
func (subscription EventSubscription) GetAPIVersion() string {
	return "2020-06-01"
}

// GetResourceScope returns the scope of the resource
func (subscription *EventSubscription) GetResourceScope() genruntime.ResourceScope {
	return genruntime.ResourceScopeExtension
}

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

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.EventGrid/eventSubscriptions"
func (subscription *EventSubscription) GetType() string {
	return "Microsoft.EventGrid/eventSubscriptions"
}

// NewEmptyStatus returns a new empty (blank) status
func (subscription *EventSubscription) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &EventSubscription_STATUS{}
}

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

	return subscription.Spec.Owner.AsResourceReference()
}

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

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

	subscription.Status = st
	return nil
}

// AssignProperties_From_EventSubscription populates our EventSubscription from the provided source EventSubscription
func (subscription *EventSubscription) AssignProperties_From_EventSubscription(source *storage.EventSubscription) error {

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

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

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

	// No error
	return nil
}

// AssignProperties_To_EventSubscription populates the provided destination EventSubscription from our EventSubscription
func (subscription *EventSubscription) AssignProperties_To_EventSubscription(destination *storage.EventSubscription) error {

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

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

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

// +kubebuilder:object:root=true
// Generator information:
// - Generated from: /eventgrid/resource-manager/Microsoft.EventGrid/stable/2020-06-01/EventGrid.json
// - ARM URI: /{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}
type EventSubscriptionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []EventSubscription `json:"items"`
}

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

	// DeadLetterDestination: The DeadLetter destination of the event subscription.
	DeadLetterDestination *DeadLetterDestination `json:"deadLetterDestination,omitempty"`

	// Destination: Information about the destination where events have to be delivered for the event subscription.
	Destination *EventSubscriptionDestination `json:"destination,omitempty"`

	// EventDeliverySchema: The event delivery schema for the event subscription.
	EventDeliverySchema *EventSubscriptionProperties_EventDeliverySchema `json:"eventDeliverySchema,omitempty"`

	// ExpirationTimeUtc: Expiration time of the event subscription.
	ExpirationTimeUtc *string `json:"expirationTimeUtc,omitempty"`

	// Filter: Information about the filter for the event subscription.
	Filter *EventSubscriptionFilter `json:"filter,omitempty"`

	// Labels: List of user defined labels.
	Labels []string `json:"labels,omitempty"`

	// OperatorSpec: The specification for configuring operator behavior. This field is interpreted by the operator and not
	// passed directly to Azure
	OperatorSpec *EventSubscriptionOperatorSpec `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. This resource is an
	// extension resource, which means that any other Azure resource can be its owner.
	Owner *genruntime.ArbitraryOwnerReference `json:"owner,omitempty"`

	// RetryPolicy: The retry policy for events. This can be used to configure maximum number of delivery attempts and time to
	// live for events.
	RetryPolicy *RetryPolicy `json:"retryPolicy,omitempty"`
}

var _ genruntime.ARMTransformer = &EventSubscription_Spec{}

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

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

	// Set property "Properties":
	if subscription.DeadLetterDestination != nil ||
		subscription.Destination != nil ||
		subscription.EventDeliverySchema != nil ||
		subscription.ExpirationTimeUtc != nil ||
		subscription.Filter != nil ||
		subscription.Labels != nil ||
		subscription.RetryPolicy != nil {
		result.Properties = &arm.EventSubscriptionProperties{}
	}
	if subscription.DeadLetterDestination != nil {
		deadLetterDestination_ARM, err := subscription.DeadLetterDestination.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		deadLetterDestination := *deadLetterDestination_ARM.(*arm.DeadLetterDestination)
		result.Properties.DeadLetterDestination = &deadLetterDestination
	}
	if subscription.Destination != nil {
		destination_ARM, err := subscription.Destination.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		destination := *destination_ARM.(*arm.EventSubscriptionDestination)
		result.Properties.Destination = &destination
	}
	if subscription.EventDeliverySchema != nil {
		var temp string
		temp = string(*subscription.EventDeliverySchema)
		eventDeliverySchema := arm.EventSubscriptionProperties_EventDeliverySchema(temp)
		result.Properties.EventDeliverySchema = &eventDeliverySchema
	}
	if subscription.ExpirationTimeUtc != nil {
		expirationTimeUtc := *subscription.ExpirationTimeUtc
		result.Properties.ExpirationTimeUtc = &expirationTimeUtc
	}
	if subscription.Filter != nil {
		filter_ARM, err := subscription.Filter.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		filter := *filter_ARM.(*arm.EventSubscriptionFilter)
		result.Properties.Filter = &filter
	}
	for _, item := range subscription.Labels {
		result.Properties.Labels = append(result.Properties.Labels, item)
	}
	if subscription.RetryPolicy != nil {
		retryPolicy_ARM, err := subscription.RetryPolicy.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		retryPolicy := *retryPolicy_ARM.(*arm.RetryPolicy)
		result.Properties.RetryPolicy = &retryPolicy
	}
	return result, nil
}

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

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

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

	// Set property "DeadLetterDestination":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.DeadLetterDestination != nil {
			var deadLetterDestination1 DeadLetterDestination
			err := deadLetterDestination1.PopulateFromARM(owner, *typedInput.Properties.DeadLetterDestination)
			if err != nil {
				return err
			}
			deadLetterDestination := deadLetterDestination1
			subscription.DeadLetterDestination = &deadLetterDestination
		}
	}

	// Set property "Destination":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Destination != nil {
			var destination1 EventSubscriptionDestination
			err := destination1.PopulateFromARM(owner, *typedInput.Properties.Destination)
			if err != nil {
				return err
			}
			destination := destination1
			subscription.Destination = &destination
		}
	}

	// Set property "EventDeliverySchema":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EventDeliverySchema != nil {
			var temp string
			temp = string(*typedInput.Properties.EventDeliverySchema)
			eventDeliverySchema := EventSubscriptionProperties_EventDeliverySchema(temp)
			subscription.EventDeliverySchema = &eventDeliverySchema
		}
	}

	// Set property "ExpirationTimeUtc":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ExpirationTimeUtc != nil {
			expirationTimeUtc := *typedInput.Properties.ExpirationTimeUtc
			subscription.ExpirationTimeUtc = &expirationTimeUtc
		}
	}

	// Set property "Filter":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Filter != nil {
			var filter1 EventSubscriptionFilter
			err := filter1.PopulateFromARM(owner, *typedInput.Properties.Filter)
			if err != nil {
				return err
			}
			filter := filter1
			subscription.Filter = &filter
		}
	}

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

	// no assignment for property "OperatorSpec"

	// Set property "Owner":
	subscription.Owner = &owner

	// Set property "RetryPolicy":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.RetryPolicy != nil {
			var retryPolicy1 RetryPolicy
			err := retryPolicy1.PopulateFromARM(owner, *typedInput.Properties.RetryPolicy)
			if err != nil {
				return err
			}
			retryPolicy := retryPolicy1
			subscription.RetryPolicy = &retryPolicy
		}
	}

	// No error
	return nil
}

var _ genruntime.ConvertibleSpec = &EventSubscription_Spec{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.EventSubscription_Spec{}
	err := subscription.AssignProperties_To_EventSubscription_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_EventSubscription_Spec populates our EventSubscription_Spec from the provided source EventSubscription_Spec
func (subscription *EventSubscription_Spec) AssignProperties_From_EventSubscription_Spec(source *storage.EventSubscription_Spec) error {

	// AzureName
	subscription.AzureName = source.AzureName

	// DeadLetterDestination
	if source.DeadLetterDestination != nil {
		var deadLetterDestination DeadLetterDestination
		err := deadLetterDestination.AssignProperties_From_DeadLetterDestination(source.DeadLetterDestination)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_DeadLetterDestination() to populate field DeadLetterDestination")
		}
		subscription.DeadLetterDestination = &deadLetterDestination
	} else {
		subscription.DeadLetterDestination = nil
	}

	// Destination
	if source.Destination != nil {
		var destination EventSubscriptionDestination
		err := destination.AssignProperties_From_EventSubscriptionDestination(source.Destination)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EventSubscriptionDestination() to populate field Destination")
		}
		subscription.Destination = &destination
	} else {
		subscription.Destination = nil
	}

	// EventDeliverySchema
	if source.EventDeliverySchema != nil {
		eventDeliverySchema := *source.EventDeliverySchema
		eventDeliverySchemaTemp := genruntime.ToEnum(eventDeliverySchema, eventSubscriptionProperties_EventDeliverySchema_Values)
		subscription.EventDeliverySchema = &eventDeliverySchemaTemp
	} else {
		subscription.EventDeliverySchema = nil
	}

	// ExpirationTimeUtc
	subscription.ExpirationTimeUtc = genruntime.ClonePointerToString(source.ExpirationTimeUtc)

	// Filter
	if source.Filter != nil {
		var filter EventSubscriptionFilter
		err := filter.AssignProperties_From_EventSubscriptionFilter(source.Filter)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EventSubscriptionFilter() to populate field Filter")
		}
		subscription.Filter = &filter
	} else {
		subscription.Filter = nil
	}

	// Labels
	subscription.Labels = genruntime.CloneSliceOfString(source.Labels)

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

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

	// RetryPolicy
	if source.RetryPolicy != nil {
		var retryPolicy RetryPolicy
		err := retryPolicy.AssignProperties_From_RetryPolicy(source.RetryPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_RetryPolicy() to populate field RetryPolicy")
		}
		subscription.RetryPolicy = &retryPolicy
	} else {
		subscription.RetryPolicy = nil
	}

	// No error
	return nil
}

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

	// AzureName
	destination.AzureName = subscription.AzureName

	// DeadLetterDestination
	if subscription.DeadLetterDestination != nil {
		var deadLetterDestination storage.DeadLetterDestination
		err := subscription.DeadLetterDestination.AssignProperties_To_DeadLetterDestination(&deadLetterDestination)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_DeadLetterDestination() to populate field DeadLetterDestination")
		}
		destination.DeadLetterDestination = &deadLetterDestination
	} else {
		destination.DeadLetterDestination = nil
	}

	// Destination
	if subscription.Destination != nil {
		var destinationLocal storage.EventSubscriptionDestination
		err := subscription.Destination.AssignProperties_To_EventSubscriptionDestination(&destinationLocal)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EventSubscriptionDestination() to populate field Destination")
		}
		destination.Destination = &destinationLocal
	} else {
		destination.Destination = nil
	}

	// EventDeliverySchema
	if subscription.EventDeliverySchema != nil {
		eventDeliverySchema := string(*subscription.EventDeliverySchema)
		destination.EventDeliverySchema = &eventDeliverySchema
	} else {
		destination.EventDeliverySchema = nil
	}

	// ExpirationTimeUtc
	destination.ExpirationTimeUtc = genruntime.ClonePointerToString(subscription.ExpirationTimeUtc)

	// Filter
	if subscription.Filter != nil {
		var filter storage.EventSubscriptionFilter
		err := subscription.Filter.AssignProperties_To_EventSubscriptionFilter(&filter)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EventSubscriptionFilter() to populate field Filter")
		}
		destination.Filter = &filter
	} else {
		destination.Filter = nil
	}

	// Labels
	destination.Labels = genruntime.CloneSliceOfString(subscription.Labels)

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

	// OriginalVersion
	destination.OriginalVersion = subscription.OriginalVersion()

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

	// RetryPolicy
	if subscription.RetryPolicy != nil {
		var retryPolicy storage.RetryPolicy
		err := subscription.RetryPolicy.AssignProperties_To_RetryPolicy(&retryPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_RetryPolicy() to populate field RetryPolicy")
		}
		destination.RetryPolicy = &retryPolicy
	} else {
		destination.RetryPolicy = nil
	}

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

	// No error
	return nil
}

// Initialize_From_EventSubscription_STATUS populates our EventSubscription_Spec from the provided source EventSubscription_STATUS
func (subscription *EventSubscription_Spec) Initialize_From_EventSubscription_STATUS(source *EventSubscription_STATUS) error {

	// DeadLetterDestination
	if source.DeadLetterDestination != nil {
		var deadLetterDestination DeadLetterDestination
		err := deadLetterDestination.Initialize_From_DeadLetterDestination_STATUS(source.DeadLetterDestination)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_DeadLetterDestination_STATUS() to populate field DeadLetterDestination")
		}
		subscription.DeadLetterDestination = &deadLetterDestination
	} else {
		subscription.DeadLetterDestination = nil
	}

	// Destination
	if source.Destination != nil {
		var destination EventSubscriptionDestination
		err := destination.Initialize_From_EventSubscriptionDestination_STATUS(source.Destination)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_EventSubscriptionDestination_STATUS() to populate field Destination")
		}
		subscription.Destination = &destination
	} else {
		subscription.Destination = nil
	}

	// EventDeliverySchema
	if source.EventDeliverySchema != nil {
		eventDeliverySchema := genruntime.ToEnum(string(*source.EventDeliverySchema), eventSubscriptionProperties_EventDeliverySchema_Values)
		subscription.EventDeliverySchema = &eventDeliverySchema
	} else {
		subscription.EventDeliverySchema = nil
	}

	// ExpirationTimeUtc
	subscription.ExpirationTimeUtc = genruntime.ClonePointerToString(source.ExpirationTimeUtc)

	// Filter
	if source.Filter != nil {
		var filter EventSubscriptionFilter
		err := filter.Initialize_From_EventSubscriptionFilter_STATUS(source.Filter)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_EventSubscriptionFilter_STATUS() to populate field Filter")
		}
		subscription.Filter = &filter
	} else {
		subscription.Filter = nil
	}

	// Labels
	subscription.Labels = genruntime.CloneSliceOfString(source.Labels)

	// RetryPolicy
	if source.RetryPolicy != nil {
		var retryPolicy RetryPolicy
		err := retryPolicy.Initialize_From_RetryPolicy_STATUS(source.RetryPolicy)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_RetryPolicy_STATUS() to populate field RetryPolicy")
		}
		subscription.RetryPolicy = &retryPolicy
	} else {
		subscription.RetryPolicy = nil
	}

	// No error
	return nil
}

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

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

// Event Subscription
type EventSubscription_STATUS struct {
	// Conditions: The observed state of the resource
	Conditions []conditions.Condition `json:"conditions,omitempty"`

	// DeadLetterDestination: The DeadLetter destination of the event subscription.
	DeadLetterDestination *DeadLetterDestination_STATUS `json:"deadLetterDestination,omitempty"`

	// Destination: Information about the destination where events have to be delivered for the event subscription.
	Destination *EventSubscriptionDestination_STATUS `json:"destination,omitempty"`

	// EventDeliverySchema: The event delivery schema for the event subscription.
	EventDeliverySchema *EventSubscriptionProperties_EventDeliverySchema_STATUS `json:"eventDeliverySchema,omitempty"`

	// ExpirationTimeUtc: Expiration time of the event subscription.
	ExpirationTimeUtc *string `json:"expirationTimeUtc,omitempty"`

	// Filter: Information about the filter for the event subscription.
	Filter *EventSubscriptionFilter_STATUS `json:"filter,omitempty"`

	// Id: Fully qualified identifier of the resource.
	Id *string `json:"id,omitempty"`

	// Labels: List of user defined labels.
	Labels []string `json:"labels,omitempty"`

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

	// ProvisioningState: Provisioning state of the event subscription.
	ProvisioningState *EventSubscriptionProperties_ProvisioningState_STATUS `json:"provisioningState,omitempty"`

	// RetryPolicy: The retry policy for events. This can be used to configure maximum number of delivery attempts and time to
	// live for events.
	RetryPolicy *RetryPolicy_STATUS `json:"retryPolicy,omitempty"`

	// SystemData: The system metadata relating to Event Subscription resource.
	SystemData *SystemData_STATUS `json:"systemData,omitempty"`

	// Topic: Name of the topic of the event subscription.
	Topic *string `json:"topic,omitempty"`

	// Type: Type of the resource.
	Type *string `json:"type,omitempty"`
}

var _ genruntime.ConvertibleStatus = &EventSubscription_STATUS{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.EventSubscription_STATUS{}
	err := subscription.AssignProperties_To_EventSubscription_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 = &EventSubscription_STATUS{}

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

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

	// no assignment for property "Conditions"

	// Set property "DeadLetterDestination":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.DeadLetterDestination != nil {
			var deadLetterDestination1 DeadLetterDestination_STATUS
			err := deadLetterDestination1.PopulateFromARM(owner, *typedInput.Properties.DeadLetterDestination)
			if err != nil {
				return err
			}
			deadLetterDestination := deadLetterDestination1
			subscription.DeadLetterDestination = &deadLetterDestination
		}
	}

	// Set property "Destination":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Destination != nil {
			var destination1 EventSubscriptionDestination_STATUS
			err := destination1.PopulateFromARM(owner, *typedInput.Properties.Destination)
			if err != nil {
				return err
			}
			destination := destination1
			subscription.Destination = &destination
		}
	}

	// Set property "EventDeliverySchema":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EventDeliverySchema != nil {
			var temp string
			temp = string(*typedInput.Properties.EventDeliverySchema)
			eventDeliverySchema := EventSubscriptionProperties_EventDeliverySchema_STATUS(temp)
			subscription.EventDeliverySchema = &eventDeliverySchema
		}
	}

	// Set property "ExpirationTimeUtc":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ExpirationTimeUtc != nil {
			expirationTimeUtc := *typedInput.Properties.ExpirationTimeUtc
			subscription.ExpirationTimeUtc = &expirationTimeUtc
		}
	}

	// Set property "Filter":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Filter != nil {
			var filter1 EventSubscriptionFilter_STATUS
			err := filter1.PopulateFromARM(owner, *typedInput.Properties.Filter)
			if err != nil {
				return err
			}
			filter := filter1
			subscription.Filter = &filter
		}
	}

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

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

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

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

	// Set property "RetryPolicy":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.RetryPolicy != nil {
			var retryPolicy1 RetryPolicy_STATUS
			err := retryPolicy1.PopulateFromARM(owner, *typedInput.Properties.RetryPolicy)
			if err != nil {
				return err
			}
			retryPolicy := retryPolicy1
			subscription.RetryPolicy = &retryPolicy
		}
	}

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

	// Set property "Topic":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Topic != nil {
			topic := *typedInput.Properties.Topic
			subscription.Topic = &topic
		}
	}

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

	// No error
	return nil
}

// AssignProperties_From_EventSubscription_STATUS populates our EventSubscription_STATUS from the provided source EventSubscription_STATUS
func (subscription *EventSubscription_STATUS) AssignProperties_From_EventSubscription_STATUS(source *storage.EventSubscription_STATUS) error {

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

	// DeadLetterDestination
	if source.DeadLetterDestination != nil {
		var deadLetterDestination DeadLetterDestination_STATUS
		err := deadLetterDestination.AssignProperties_From_DeadLetterDestination_STATUS(source.DeadLetterDestination)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_DeadLetterDestination_STATUS() to populate field DeadLetterDestination")
		}
		subscription.DeadLetterDestination = &deadLetterDestination
	} else {
		subscription.DeadLetterDestination = nil
	}

	// Destination
	if source.Destination != nil {
		var destination EventSubscriptionDestination_STATUS
		err := destination.AssignProperties_From_EventSubscriptionDestination_STATUS(source.Destination)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EventSubscriptionDestination_STATUS() to populate field Destination")
		}
		subscription.Destination = &destination
	} else {
		subscription.Destination = nil
	}

	// EventDeliverySchema
	if source.EventDeliverySchema != nil {
		eventDeliverySchema := *source.EventDeliverySchema
		eventDeliverySchemaTemp := genruntime.ToEnum(eventDeliverySchema, eventSubscriptionProperties_EventDeliverySchema_STATUS_Values)
		subscription.EventDeliverySchema = &eventDeliverySchemaTemp
	} else {
		subscription.EventDeliverySchema = nil
	}

	// ExpirationTimeUtc
	subscription.ExpirationTimeUtc = genruntime.ClonePointerToString(source.ExpirationTimeUtc)

	// Filter
	if source.Filter != nil {
		var filter EventSubscriptionFilter_STATUS
		err := filter.AssignProperties_From_EventSubscriptionFilter_STATUS(source.Filter)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EventSubscriptionFilter_STATUS() to populate field Filter")
		}
		subscription.Filter = &filter
	} else {
		subscription.Filter = nil
	}

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

	// Labels
	subscription.Labels = genruntime.CloneSliceOfString(source.Labels)

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

	// ProvisioningState
	if source.ProvisioningState != nil {
		provisioningState := *source.ProvisioningState
		provisioningStateTemp := genruntime.ToEnum(provisioningState, eventSubscriptionProperties_ProvisioningState_STATUS_Values)
		subscription.ProvisioningState = &provisioningStateTemp
	} else {
		subscription.ProvisioningState = nil
	}

	// RetryPolicy
	if source.RetryPolicy != nil {
		var retryPolicy RetryPolicy_STATUS
		err := retryPolicy.AssignProperties_From_RetryPolicy_STATUS(source.RetryPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_RetryPolicy_STATUS() to populate field RetryPolicy")
		}
		subscription.RetryPolicy = &retryPolicy
	} else {
		subscription.RetryPolicy = 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")
		}
		subscription.SystemData = &systemDatum
	} else {
		subscription.SystemData = nil
	}

	// Topic
	subscription.Topic = genruntime.ClonePointerToString(source.Topic)

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

	// No error
	return nil
}

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

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

	// DeadLetterDestination
	if subscription.DeadLetterDestination != nil {
		var deadLetterDestination storage.DeadLetterDestination_STATUS
		err := subscription.DeadLetterDestination.AssignProperties_To_DeadLetterDestination_STATUS(&deadLetterDestination)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_DeadLetterDestination_STATUS() to populate field DeadLetterDestination")
		}
		destination.DeadLetterDestination = &deadLetterDestination
	} else {
		destination.DeadLetterDestination = nil
	}

	// Destination
	if subscription.Destination != nil {
		var destinationLocal storage.EventSubscriptionDestination_STATUS
		err := subscription.Destination.AssignProperties_To_EventSubscriptionDestination_STATUS(&destinationLocal)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EventSubscriptionDestination_STATUS() to populate field Destination")
		}
		destination.Destination = &destinationLocal
	} else {
		destination.Destination = nil
	}

	// EventDeliverySchema
	if subscription.EventDeliverySchema != nil {
		eventDeliverySchema := string(*subscription.EventDeliverySchema)
		destination.EventDeliverySchema = &eventDeliverySchema
	} else {
		destination.EventDeliverySchema = nil
	}

	// ExpirationTimeUtc
	destination.ExpirationTimeUtc = genruntime.ClonePointerToString(subscription.ExpirationTimeUtc)

	// Filter
	if subscription.Filter != nil {
		var filter storage.EventSubscriptionFilter_STATUS
		err := subscription.Filter.AssignProperties_To_EventSubscriptionFilter_STATUS(&filter)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EventSubscriptionFilter_STATUS() to populate field Filter")
		}
		destination.Filter = &filter
	} else {
		destination.Filter = nil
	}

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

	// Labels
	destination.Labels = genruntime.CloneSliceOfString(subscription.Labels)

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

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

	// RetryPolicy
	if subscription.RetryPolicy != nil {
		var retryPolicy storage.RetryPolicy_STATUS
		err := subscription.RetryPolicy.AssignProperties_To_RetryPolicy_STATUS(&retryPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_RetryPolicy_STATUS() to populate field RetryPolicy")
		}
		destination.RetryPolicy = &retryPolicy
	} else {
		destination.RetryPolicy = nil
	}

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

	// Topic
	destination.Topic = genruntime.ClonePointerToString(subscription.Topic)

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

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

	// No error
	return nil
}

type DeadLetterDestination struct {
	// StorageBlob: Mutually exclusive with all other properties
	StorageBlob *StorageBlobDeadLetterDestination `json:"storageBlob,omitempty"`
}

var _ genruntime.ARMTransformer = &DeadLetterDestination{}

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

	// Set property "StorageBlob":
	if destination.StorageBlob != nil {
		storageBlob_ARM, err := destination.StorageBlob.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		storageBlob := *storageBlob_ARM.(*arm.StorageBlobDeadLetterDestination)
		result.StorageBlob = &storageBlob
	}
	return result, nil
}

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

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

	// Set property "StorageBlob":
	if typedInput.StorageBlob != nil {
		var storageBlob1 StorageBlobDeadLetterDestination
		err := storageBlob1.PopulateFromARM(owner, *typedInput.StorageBlob)
		if err != nil {
			return err
		}
		storageBlob := storageBlob1
		destination.StorageBlob = &storageBlob
	}

	// No error
	return nil
}

// AssignProperties_From_DeadLetterDestination populates our DeadLetterDestination from the provided source DeadLetterDestination
func (destination *DeadLetterDestination) AssignProperties_From_DeadLetterDestination(source *storage.DeadLetterDestination) error {

	// StorageBlob
	if source.StorageBlob != nil {
		var storageBlob StorageBlobDeadLetterDestination
		err := storageBlob.AssignProperties_From_StorageBlobDeadLetterDestination(source.StorageBlob)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StorageBlobDeadLetterDestination() to populate field StorageBlob")
		}
		destination.StorageBlob = &storageBlob
	} else {
		destination.StorageBlob = nil
	}

	// No error
	return nil
}

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

	// StorageBlob
	if destination.StorageBlob != nil {
		var storageBlob storage.StorageBlobDeadLetterDestination
		err := destination.StorageBlob.AssignProperties_To_StorageBlobDeadLetterDestination(&storageBlob)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StorageBlobDeadLetterDestination() to populate field StorageBlob")
		}
		target.StorageBlob = &storageBlob
	} else {
		target.StorageBlob = nil
	}

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

	// No error
	return nil
}

// Initialize_From_DeadLetterDestination_STATUS populates our DeadLetterDestination from the provided source DeadLetterDestination_STATUS
func (destination *DeadLetterDestination) Initialize_From_DeadLetterDestination_STATUS(source *DeadLetterDestination_STATUS) error {

	// StorageBlob
	if source.StorageBlob != nil {
		var storageBlob StorageBlobDeadLetterDestination
		err := storageBlob.Initialize_From_StorageBlobDeadLetterDestination_STATUS(source.StorageBlob)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_StorageBlobDeadLetterDestination_STATUS() to populate field StorageBlob")
		}
		destination.StorageBlob = &storageBlob
	} else {
		destination.StorageBlob = nil
	}

	// No error
	return nil
}

type DeadLetterDestination_STATUS struct {
	// StorageBlob: Mutually exclusive with all other properties
	StorageBlob *StorageBlobDeadLetterDestination_STATUS `json:"storageBlob,omitempty"`
}

var _ genruntime.FromARMConverter = &DeadLetterDestination_STATUS{}

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

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

	// Set property "StorageBlob":
	if typedInput.StorageBlob != nil {
		var storageBlob1 StorageBlobDeadLetterDestination_STATUS
		err := storageBlob1.PopulateFromARM(owner, *typedInput.StorageBlob)
		if err != nil {
			return err
		}
		storageBlob := storageBlob1
		destination.StorageBlob = &storageBlob
	}

	// No error
	return nil
}

// AssignProperties_From_DeadLetterDestination_STATUS populates our DeadLetterDestination_STATUS from the provided source DeadLetterDestination_STATUS
func (destination *DeadLetterDestination_STATUS) AssignProperties_From_DeadLetterDestination_STATUS(source *storage.DeadLetterDestination_STATUS) error {

	// StorageBlob
	if source.StorageBlob != nil {
		var storageBlob StorageBlobDeadLetterDestination_STATUS
		err := storageBlob.AssignProperties_From_StorageBlobDeadLetterDestination_STATUS(source.StorageBlob)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StorageBlobDeadLetterDestination_STATUS() to populate field StorageBlob")
		}
		destination.StorageBlob = &storageBlob
	} else {
		destination.StorageBlob = nil
	}

	// No error
	return nil
}

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

	// StorageBlob
	if destination.StorageBlob != nil {
		var storageBlob storage.StorageBlobDeadLetterDestination_STATUS
		err := destination.StorageBlob.AssignProperties_To_StorageBlobDeadLetterDestination_STATUS(&storageBlob)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StorageBlobDeadLetterDestination_STATUS() to populate field StorageBlob")
		}
		target.StorageBlob = &storageBlob
	} else {
		target.StorageBlob = nil
	}

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

	// No error
	return nil
}

type EventSubscriptionDestination struct {
	// AzureFunction: Mutually exclusive with all other properties
	AzureFunction *AzureFunctionEventSubscriptionDestination `json:"azureFunction,omitempty"`

	// EventHub: Mutually exclusive with all other properties
	EventHub *EventHubEventSubscriptionDestination `json:"eventHub,omitempty"`

	// HybridConnection: Mutually exclusive with all other properties
	HybridConnection *HybridConnectionEventSubscriptionDestination `json:"hybridConnection,omitempty"`

	// ServiceBusQueue: Mutually exclusive with all other properties
	ServiceBusQueue *ServiceBusQueueEventSubscriptionDestination `json:"serviceBusQueue,omitempty"`

	// ServiceBusTopic: Mutually exclusive with all other properties
	ServiceBusTopic *ServiceBusTopicEventSubscriptionDestination `json:"serviceBusTopic,omitempty"`

	// StorageQueue: Mutually exclusive with all other properties
	StorageQueue *StorageQueueEventSubscriptionDestination `json:"storageQueue,omitempty"`

	// WebHook: Mutually exclusive with all other properties
	WebHook *WebHookEventSubscriptionDestination `json:"webHook,omitempty"`
}

var _ genruntime.ARMTransformer = &EventSubscriptionDestination{}

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

	// Set property "AzureFunction":
	if destination.AzureFunction != nil {
		azureFunction_ARM, err := destination.AzureFunction.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		azureFunction := *azureFunction_ARM.(*arm.AzureFunctionEventSubscriptionDestination)
		result.AzureFunction = &azureFunction
	}

	// Set property "EventHub":
	if destination.EventHub != nil {
		eventHub_ARM, err := destination.EventHub.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		eventHub := *eventHub_ARM.(*arm.EventHubEventSubscriptionDestination)
		result.EventHub = &eventHub
	}

	// Set property "HybridConnection":
	if destination.HybridConnection != nil {
		hybridConnection_ARM, err := destination.HybridConnection.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		hybridConnection := *hybridConnection_ARM.(*arm.HybridConnectionEventSubscriptionDestination)
		result.HybridConnection = &hybridConnection
	}

	// Set property "ServiceBusQueue":
	if destination.ServiceBusQueue != nil {
		serviceBusQueue_ARM, err := destination.ServiceBusQueue.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		serviceBusQueue := *serviceBusQueue_ARM.(*arm.ServiceBusQueueEventSubscriptionDestination)
		result.ServiceBusQueue = &serviceBusQueue
	}

	// Set property "ServiceBusTopic":
	if destination.ServiceBusTopic != nil {
		serviceBusTopic_ARM, err := destination.ServiceBusTopic.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		serviceBusTopic := *serviceBusTopic_ARM.(*arm.ServiceBusTopicEventSubscriptionDestination)
		result.ServiceBusTopic = &serviceBusTopic
	}

	// Set property "StorageQueue":
	if destination.StorageQueue != nil {
		storageQueue_ARM, err := destination.StorageQueue.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		storageQueue := *storageQueue_ARM.(*arm.StorageQueueEventSubscriptionDestination)
		result.StorageQueue = &storageQueue
	}

	// Set property "WebHook":
	if destination.WebHook != nil {
		webHook_ARM, err := destination.WebHook.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		webHook := *webHook_ARM.(*arm.WebHookEventSubscriptionDestination)
		result.WebHook = &webHook
	}
	return result, nil
}

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

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

	// Set property "AzureFunction":
	if typedInput.AzureFunction != nil {
		var azureFunction1 AzureFunctionEventSubscriptionDestination
		err := azureFunction1.PopulateFromARM(owner, *typedInput.AzureFunction)
		if err != nil {
			return err
		}
		azureFunction := azureFunction1
		destination.AzureFunction = &azureFunction
	}

	// Set property "EventHub":
	if typedInput.EventHub != nil {
		var eventHub1 EventHubEventSubscriptionDestination
		err := eventHub1.PopulateFromARM(owner, *typedInput.EventHub)
		if err != nil {
			return err
		}
		eventHub := eventHub1
		destination.EventHub = &eventHub
	}

	// Set property "HybridConnection":
	if typedInput.HybridConnection != nil {
		var hybridConnection1 HybridConnectionEventSubscriptionDestination
		err := hybridConnection1.PopulateFromARM(owner, *typedInput.HybridConnection)
		if err != nil {
			return err
		}
		hybridConnection := hybridConnection1
		destination.HybridConnection = &hybridConnection
	}

	// Set property "ServiceBusQueue":
	if typedInput.ServiceBusQueue != nil {
		var serviceBusQueue1 ServiceBusQueueEventSubscriptionDestination
		err := serviceBusQueue1.PopulateFromARM(owner, *typedInput.ServiceBusQueue)
		if err != nil {
			return err
		}
		serviceBusQueue := serviceBusQueue1
		destination.ServiceBusQueue = &serviceBusQueue
	}

	// Set property "ServiceBusTopic":
	if typedInput.ServiceBusTopic != nil {
		var serviceBusTopic1 ServiceBusTopicEventSubscriptionDestination
		err := serviceBusTopic1.PopulateFromARM(owner, *typedInput.ServiceBusTopic)
		if err != nil {
			return err
		}
		serviceBusTopic := serviceBusTopic1
		destination.ServiceBusTopic = &serviceBusTopic
	}

	// Set property "StorageQueue":
	if typedInput.StorageQueue != nil {
		var storageQueue1 StorageQueueEventSubscriptionDestination
		err := storageQueue1.PopulateFromARM(owner, *typedInput.StorageQueue)
		if err != nil {
			return err
		}
		storageQueue := storageQueue1
		destination.StorageQueue = &storageQueue
	}

	// Set property "WebHook":
	if typedInput.WebHook != nil {
		var webHook1 WebHookEventSubscriptionDestination
		err := webHook1.PopulateFromARM(owner, *typedInput.WebHook)
		if err != nil {
			return err
		}
		webHook := webHook1
		destination.WebHook = &webHook
	}

	// No error
	return nil
}

// AssignProperties_From_EventSubscriptionDestination populates our EventSubscriptionDestination from the provided source EventSubscriptionDestination
func (destination *EventSubscriptionDestination) AssignProperties_From_EventSubscriptionDestination(source *storage.EventSubscriptionDestination) error {

	// AzureFunction
	if source.AzureFunction != nil {
		var azureFunction AzureFunctionEventSubscriptionDestination
		err := azureFunction.AssignProperties_From_AzureFunctionEventSubscriptionDestination(source.AzureFunction)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_AzureFunctionEventSubscriptionDestination() to populate field AzureFunction")
		}
		destination.AzureFunction = &azureFunction
	} else {
		destination.AzureFunction = nil
	}

	// EventHub
	if source.EventHub != nil {
		var eventHub EventHubEventSubscriptionDestination
		err := eventHub.AssignProperties_From_EventHubEventSubscriptionDestination(source.EventHub)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EventHubEventSubscriptionDestination() to populate field EventHub")
		}
		destination.EventHub = &eventHub
	} else {
		destination.EventHub = nil
	}

	// HybridConnection
	if source.HybridConnection != nil {
		var hybridConnection HybridConnectionEventSubscriptionDestination
		err := hybridConnection.AssignProperties_From_HybridConnectionEventSubscriptionDestination(source.HybridConnection)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_HybridConnectionEventSubscriptionDestination() to populate field HybridConnection")
		}
		destination.HybridConnection = &hybridConnection
	} else {
		destination.HybridConnection = nil
	}

	// ServiceBusQueue
	if source.ServiceBusQueue != nil {
		var serviceBusQueue ServiceBusQueueEventSubscriptionDestination
		err := serviceBusQueue.AssignProperties_From_ServiceBusQueueEventSubscriptionDestination(source.ServiceBusQueue)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ServiceBusQueueEventSubscriptionDestination() to populate field ServiceBusQueue")
		}
		destination.ServiceBusQueue = &serviceBusQueue
	} else {
		destination.ServiceBusQueue = nil
	}

	// ServiceBusTopic
	if source.ServiceBusTopic != nil {
		var serviceBusTopic ServiceBusTopicEventSubscriptionDestination
		err := serviceBusTopic.AssignProperties_From_ServiceBusTopicEventSubscriptionDestination(source.ServiceBusTopic)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ServiceBusTopicEventSubscriptionDestination() to populate field ServiceBusTopic")
		}
		destination.ServiceBusTopic = &serviceBusTopic
	} else {
		destination.ServiceBusTopic = nil
	}

	// StorageQueue
	if source.StorageQueue != nil {
		var storageQueue StorageQueueEventSubscriptionDestination
		err := storageQueue.AssignProperties_From_StorageQueueEventSubscriptionDestination(source.StorageQueue)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StorageQueueEventSubscriptionDestination() to populate field StorageQueue")
		}
		destination.StorageQueue = &storageQueue
	} else {
		destination.StorageQueue = nil
	}

	// WebHook
	if source.WebHook != nil {
		var webHook WebHookEventSubscriptionDestination
		err := webHook.AssignProperties_From_WebHookEventSubscriptionDestination(source.WebHook)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_WebHookEventSubscriptionDestination() to populate field WebHook")
		}
		destination.WebHook = &webHook
	} else {
		destination.WebHook = nil
	}

	// No error
	return nil
}

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

	// AzureFunction
	if destination.AzureFunction != nil {
		var azureFunction storage.AzureFunctionEventSubscriptionDestination
		err := destination.AzureFunction.AssignProperties_To_AzureFunctionEventSubscriptionDestination(&azureFunction)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_AzureFunctionEventSubscriptionDestination() to populate field AzureFunction")
		}
		target.AzureFunction = &azureFunction
	} else {
		target.AzureFunction = nil
	}

	// EventHub
	if destination.EventHub != nil {
		var eventHub storage.EventHubEventSubscriptionDestination
		err := destination.EventHub.AssignProperties_To_EventHubEventSubscriptionDestination(&eventHub)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EventHubEventSubscriptionDestination() to populate field EventHub")
		}
		target.EventHub = &eventHub
	} else {
		target.EventHub = nil
	}

	// HybridConnection
	if destination.HybridConnection != nil {
		var hybridConnection storage.HybridConnectionEventSubscriptionDestination
		err := destination.HybridConnection.AssignProperties_To_HybridConnectionEventSubscriptionDestination(&hybridConnection)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_HybridConnectionEventSubscriptionDestination() to populate field HybridConnection")
		}
		target.HybridConnection = &hybridConnection
	} else {
		target.HybridConnection = nil
	}

	// ServiceBusQueue
	if destination.ServiceBusQueue != nil {
		var serviceBusQueue storage.ServiceBusQueueEventSubscriptionDestination
		err := destination.ServiceBusQueue.AssignProperties_To_ServiceBusQueueEventSubscriptionDestination(&serviceBusQueue)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ServiceBusQueueEventSubscriptionDestination() to populate field ServiceBusQueue")
		}
		target.ServiceBusQueue = &serviceBusQueue
	} else {
		target.ServiceBusQueue = nil
	}

	// ServiceBusTopic
	if destination.ServiceBusTopic != nil {
		var serviceBusTopic storage.ServiceBusTopicEventSubscriptionDestination
		err := destination.ServiceBusTopic.AssignProperties_To_ServiceBusTopicEventSubscriptionDestination(&serviceBusTopic)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ServiceBusTopicEventSubscriptionDestination() to populate field ServiceBusTopic")
		}
		target.ServiceBusTopic = &serviceBusTopic
	} else {
		target.ServiceBusTopic = nil
	}

	// StorageQueue
	if destination.StorageQueue != nil {
		var storageQueue storage.StorageQueueEventSubscriptionDestination
		err := destination.StorageQueue.AssignProperties_To_StorageQueueEventSubscriptionDestination(&storageQueue)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StorageQueueEventSubscriptionDestination() to populate field StorageQueue")
		}
		target.StorageQueue = &storageQueue
	} else {
		target.StorageQueue = nil
	}

	// WebHook
	if destination.WebHook != nil {
		var webHook storage.WebHookEventSubscriptionDestination
		err := destination.WebHook.AssignProperties_To_WebHookEventSubscriptionDestination(&webHook)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_WebHookEventSubscriptionDestination() to populate field WebHook")
		}
		target.WebHook = &webHook
	} else {
		target.WebHook = nil
	}

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

	// No error
	return nil
}

// Initialize_From_EventSubscriptionDestination_STATUS populates our EventSubscriptionDestination from the provided source EventSubscriptionDestination_STATUS
func (destination *EventSubscriptionDestination) Initialize_From_EventSubscriptionDestination_STATUS(source *EventSubscriptionDestination_STATUS) error {

	// AzureFunction
	if source.AzureFunction != nil {
		var azureFunction AzureFunctionEventSubscriptionDestination
		err := azureFunction.Initialize_From_AzureFunctionEventSubscriptionDestination_STATUS(source.AzureFunction)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_AzureFunctionEventSubscriptionDestination_STATUS() to populate field AzureFunction")
		}
		destination.AzureFunction = &azureFunction
	} else {
		destination.AzureFunction = nil
	}

	// EventHub
	if source.EventHub != nil {
		var eventHub EventHubEventSubscriptionDestination
		err := eventHub.Initialize_From_EventHubEventSubscriptionDestination_STATUS(source.EventHub)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_EventHubEventSubscriptionDestination_STATUS() to populate field EventHub")
		}
		destination.EventHub = &eventHub
	} else {
		destination.EventHub = nil
	}

	// HybridConnection
	if source.HybridConnection != nil {
		var hybridConnection HybridConnectionEventSubscriptionDestination
		err := hybridConnection.Initialize_From_HybridConnectionEventSubscriptionDestination_STATUS(source.HybridConnection)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_HybridConnectionEventSubscriptionDestination_STATUS() to populate field HybridConnection")
		}
		destination.HybridConnection = &hybridConnection
	} else {
		destination.HybridConnection = nil
	}

	// ServiceBusQueue
	if source.ServiceBusQueue != nil {
		var serviceBusQueue ServiceBusQueueEventSubscriptionDestination
		err := serviceBusQueue.Initialize_From_ServiceBusQueueEventSubscriptionDestination_STATUS(source.ServiceBusQueue)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_ServiceBusQueueEventSubscriptionDestination_STATUS() to populate field ServiceBusQueue")
		}
		destination.ServiceBusQueue = &serviceBusQueue
	} else {
		destination.ServiceBusQueue = nil
	}

	// ServiceBusTopic
	if source.ServiceBusTopic != nil {
		var serviceBusTopic ServiceBusTopicEventSubscriptionDestination
		err := serviceBusTopic.Initialize_From_ServiceBusTopicEventSubscriptionDestination_STATUS(source.ServiceBusTopic)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_ServiceBusTopicEventSubscriptionDestination_STATUS() to populate field ServiceBusTopic")
		}
		destination.ServiceBusTopic = &serviceBusTopic
	} else {
		destination.ServiceBusTopic = nil
	}

	// StorageQueue
	if source.StorageQueue != nil {
		var storageQueue StorageQueueEventSubscriptionDestination
		err := storageQueue.Initialize_From_StorageQueueEventSubscriptionDestination_STATUS(source.StorageQueue)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_StorageQueueEventSubscriptionDestination_STATUS() to populate field StorageQueue")
		}
		destination.StorageQueue = &storageQueue
	} else {
		destination.StorageQueue = nil
	}

	// WebHook
	if source.WebHook != nil {
		var webHook WebHookEventSubscriptionDestination
		err := webHook.Initialize_From_WebHookEventSubscriptionDestination_STATUS(source.WebHook)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_WebHookEventSubscriptionDestination_STATUS() to populate field WebHook")
		}
		destination.WebHook = &webHook
	} else {
		destination.WebHook = nil
	}

	// No error
	return nil
}

type EventSubscriptionDestination_STATUS struct {
	// AzureFunction: Mutually exclusive with all other properties
	AzureFunction *AzureFunctionEventSubscriptionDestination_STATUS `json:"azureFunction,omitempty"`

	// EventHub: Mutually exclusive with all other properties
	EventHub *EventHubEventSubscriptionDestination_STATUS `json:"eventHub,omitempty"`

	// HybridConnection: Mutually exclusive with all other properties
	HybridConnection *HybridConnectionEventSubscriptionDestination_STATUS `json:"hybridConnection,omitempty"`

	// ServiceBusQueue: Mutually exclusive with all other properties
	ServiceBusQueue *ServiceBusQueueEventSubscriptionDestination_STATUS `json:"serviceBusQueue,omitempty"`

	// ServiceBusTopic: Mutually exclusive with all other properties
	ServiceBusTopic *ServiceBusTopicEventSubscriptionDestination_STATUS `json:"serviceBusTopic,omitempty"`

	// StorageQueue: Mutually exclusive with all other properties
	StorageQueue *StorageQueueEventSubscriptionDestination_STATUS `json:"storageQueue,omitempty"`

	// WebHook: Mutually exclusive with all other properties
	WebHook *WebHookEventSubscriptionDestination_STATUS `json:"webHook,omitempty"`
}

var _ genruntime.FromARMConverter = &EventSubscriptionDestination_STATUS{}

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

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

	// Set property "AzureFunction":
	if typedInput.AzureFunction != nil {
		var azureFunction1 AzureFunctionEventSubscriptionDestination_STATUS
		err := azureFunction1.PopulateFromARM(owner, *typedInput.AzureFunction)
		if err != nil {
			return err
		}
		azureFunction := azureFunction1
		destination.AzureFunction = &azureFunction
	}

	// Set property "EventHub":
	if typedInput.EventHub != nil {
		var eventHub1 EventHubEventSubscriptionDestination_STATUS
		err := eventHub1.PopulateFromARM(owner, *typedInput.EventHub)
		if err != nil {
			return err
		}
		eventHub := eventHub1
		destination.EventHub = &eventHub
	}

	// Set property "HybridConnection":
	if typedInput.HybridConnection != nil {
		var hybridConnection1 HybridConnectionEventSubscriptionDestination_STATUS
		err := hybridConnection1.PopulateFromARM(owner, *typedInput.HybridConnection)
		if err != nil {
			return err
		}
		hybridConnection := hybridConnection1
		destination.HybridConnection = &hybridConnection
	}

	// Set property "ServiceBusQueue":
	if typedInput.ServiceBusQueue != nil {
		var serviceBusQueue1 ServiceBusQueueEventSubscriptionDestination_STATUS
		err := serviceBusQueue1.PopulateFromARM(owner, *typedInput.ServiceBusQueue)
		if err != nil {
			return err
		}
		serviceBusQueue := serviceBusQueue1
		destination.ServiceBusQueue = &serviceBusQueue
	}

	// Set property "ServiceBusTopic":
	if typedInput.ServiceBusTopic != nil {
		var serviceBusTopic1 ServiceBusTopicEventSubscriptionDestination_STATUS
		err := serviceBusTopic1.PopulateFromARM(owner, *typedInput.ServiceBusTopic)
		if err != nil {
			return err
		}
		serviceBusTopic := serviceBusTopic1
		destination.ServiceBusTopic = &serviceBusTopic
	}

	// Set property "StorageQueue":
	if typedInput.StorageQueue != nil {
		var storageQueue1 StorageQueueEventSubscriptionDestination_STATUS
		err := storageQueue1.PopulateFromARM(owner, *typedInput.StorageQueue)
		if err != nil {
			return err
		}
		storageQueue := storageQueue1
		destination.StorageQueue = &storageQueue
	}

	// Set property "WebHook":
	if typedInput.WebHook != nil {
		var webHook1 WebHookEventSubscriptionDestination_STATUS
		err := webHook1.PopulateFromARM(owner, *typedInput.WebHook)
		if err != nil {
			return err
		}
		webHook := webHook1
		destination.WebHook = &webHook
	}

	// No error
	return nil
}

// AssignProperties_From_EventSubscriptionDestination_STATUS populates our EventSubscriptionDestination_STATUS from the provided source EventSubscriptionDestination_STATUS
func (destination *EventSubscriptionDestination_STATUS) AssignProperties_From_EventSubscriptionDestination_STATUS(source *storage.EventSubscriptionDestination_STATUS) error {

	// AzureFunction
	if source.AzureFunction != nil {
		var azureFunction AzureFunctionEventSubscriptionDestination_STATUS
		err := azureFunction.AssignProperties_From_AzureFunctionEventSubscriptionDestination_STATUS(source.AzureFunction)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_AzureFunctionEventSubscriptionDestination_STATUS() to populate field AzureFunction")
		}
		destination.AzureFunction = &azureFunction
	} else {
		destination.AzureFunction = nil
	}

	// EventHub
	if source.EventHub != nil {
		var eventHub EventHubEventSubscriptionDestination_STATUS
		err := eventHub.AssignProperties_From_EventHubEventSubscriptionDestination_STATUS(source.EventHub)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EventHubEventSubscriptionDestination_STATUS() to populate field EventHub")
		}
		destination.EventHub = &eventHub
	} else {
		destination.EventHub = nil
	}

	// HybridConnection
	if source.HybridConnection != nil {
		var hybridConnection HybridConnectionEventSubscriptionDestination_STATUS
		err := hybridConnection.AssignProperties_From_HybridConnectionEventSubscriptionDestination_STATUS(source.HybridConnection)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_HybridConnectionEventSubscriptionDestination_STATUS() to populate field HybridConnection")
		}
		destination.HybridConnection = &hybridConnection
	} else {
		destination.HybridConnection = nil
	}

	// ServiceBusQueue
	if source.ServiceBusQueue != nil {
		var serviceBusQueue ServiceBusQueueEventSubscriptionDestination_STATUS
		err := serviceBusQueue.AssignProperties_From_ServiceBusQueueEventSubscriptionDestination_STATUS(source.ServiceBusQueue)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ServiceBusQueueEventSubscriptionDestination_STATUS() to populate field ServiceBusQueue")
		}
		destination.ServiceBusQueue = &serviceBusQueue
	} else {
		destination.ServiceBusQueue = nil
	}

	// ServiceBusTopic
	if source.ServiceBusTopic != nil {
		var serviceBusTopic ServiceBusTopicEventSubscriptionDestination_STATUS
		err := serviceBusTopic.AssignProperties_From_ServiceBusTopicEventSubscriptionDestination_STATUS(source.ServiceBusTopic)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ServiceBusTopicEventSubscriptionDestination_STATUS() to populate field ServiceBusTopic")
		}
		destination.ServiceBusTopic = &serviceBusTopic
	} else {
		destination.ServiceBusTopic = nil
	}

	// StorageQueue
	if source.StorageQueue != nil {
		var storageQueue StorageQueueEventSubscriptionDestination_STATUS
		err := storageQueue.AssignProperties_From_StorageQueueEventSubscriptionDestination_STATUS(source.StorageQueue)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StorageQueueEventSubscriptionDestination_STATUS() to populate field StorageQueue")
		}
		destination.StorageQueue = &storageQueue
	} else {
		destination.StorageQueue = nil
	}

	// WebHook
	if source.WebHook != nil {
		var webHook WebHookEventSubscriptionDestination_STATUS
		err := webHook.AssignProperties_From_WebHookEventSubscriptionDestination_STATUS(source.WebHook)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_WebHookEventSubscriptionDestination_STATUS() to populate field WebHook")
		}
		destination.WebHook = &webHook
	} else {
		destination.WebHook = nil
	}

	// No error
	return nil
}

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

	// AzureFunction
	if destination.AzureFunction != nil {
		var azureFunction storage.AzureFunctionEventSubscriptionDestination_STATUS
		err := destination.AzureFunction.AssignProperties_To_AzureFunctionEventSubscriptionDestination_STATUS(&azureFunction)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_AzureFunctionEventSubscriptionDestination_STATUS() to populate field AzureFunction")
		}
		target.AzureFunction = &azureFunction
	} else {
		target.AzureFunction = nil
	}

	// EventHub
	if destination.EventHub != nil {
		var eventHub storage.EventHubEventSubscriptionDestination_STATUS
		err := destination.EventHub.AssignProperties_To_EventHubEventSubscriptionDestination_STATUS(&eventHub)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EventHubEventSubscriptionDestination_STATUS() to populate field EventHub")
		}
		target.EventHub = &eventHub
	} else {
		target.EventHub = nil
	}

	// HybridConnection
	if destination.HybridConnection != nil {
		var hybridConnection storage.HybridConnectionEventSubscriptionDestination_STATUS
		err := destination.HybridConnection.AssignProperties_To_HybridConnectionEventSubscriptionDestination_STATUS(&hybridConnection)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_HybridConnectionEventSubscriptionDestination_STATUS() to populate field HybridConnection")
		}
		target.HybridConnection = &hybridConnection
	} else {
		target.HybridConnection = nil
	}

	// ServiceBusQueue
	if destination.ServiceBusQueue != nil {
		var serviceBusQueue storage.ServiceBusQueueEventSubscriptionDestination_STATUS
		err := destination.ServiceBusQueue.AssignProperties_To_ServiceBusQueueEventSubscriptionDestination_STATUS(&serviceBusQueue)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ServiceBusQueueEventSubscriptionDestination_STATUS() to populate field ServiceBusQueue")
		}
		target.ServiceBusQueue = &serviceBusQueue
	} else {
		target.ServiceBusQueue = nil
	}

	// ServiceBusTopic
	if destination.ServiceBusTopic != nil {
		var serviceBusTopic storage.ServiceBusTopicEventSubscriptionDestination_STATUS
		err := destination.ServiceBusTopic.AssignProperties_To_ServiceBusTopicEventSubscriptionDestination_STATUS(&serviceBusTopic)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ServiceBusTopicEventSubscriptionDestination_STATUS() to populate field ServiceBusTopic")
		}
		target.ServiceBusTopic = &serviceBusTopic
	} else {
		target.ServiceBusTopic = nil
	}

	// StorageQueue
	if destination.StorageQueue != nil {
		var storageQueue storage.StorageQueueEventSubscriptionDestination_STATUS
		err := destination.StorageQueue.AssignProperties_To_StorageQueueEventSubscriptionDestination_STATUS(&storageQueue)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StorageQueueEventSubscriptionDestination_STATUS() to populate field StorageQueue")
		}
		target.StorageQueue = &storageQueue
	} else {
		target.StorageQueue = nil
	}

	// WebHook
	if destination.WebHook != nil {
		var webHook storage.WebHookEventSubscriptionDestination_STATUS
		err := destination.WebHook.AssignProperties_To_WebHookEventSubscriptionDestination_STATUS(&webHook)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_WebHookEventSubscriptionDestination_STATUS() to populate field WebHook")
		}
		target.WebHook = &webHook
	} else {
		target.WebHook = nil
	}

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

	// No error
	return nil
}

// Filter for the Event Subscription.
type EventSubscriptionFilter struct {
	// AdvancedFilters: An array of advanced filters that are used for filtering event subscriptions.
	AdvancedFilters []AdvancedFilter `json:"advancedFilters,omitempty"`

	// IncludedEventTypes: A list of applicable event types that need to be part of the event subscription. If it is desired to
	// subscribe to all default event types, set the IncludedEventTypes to null.
	IncludedEventTypes []string `json:"includedEventTypes,omitempty"`

	// IsSubjectCaseSensitive: Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the filter
	// should be compared in a case sensitive manner.
	IsSubjectCaseSensitive *bool `json:"isSubjectCaseSensitive,omitempty"`

	// SubjectBeginsWith: An optional string to filter events for an event subscription based on a resource path prefix.
	// The format of this depends on the publisher of the events.
	// Wildcard characters are not supported in this path.
	SubjectBeginsWith *string `json:"subjectBeginsWith,omitempty"`

	// SubjectEndsWith: An optional string to filter events for an event subscription based on a resource path suffix.
	// Wildcard characters are not supported in this path.
	SubjectEndsWith *string `json:"subjectEndsWith,omitempty"`
}

var _ genruntime.ARMTransformer = &EventSubscriptionFilter{}

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

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

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

	// Set property "IsSubjectCaseSensitive":
	if filter.IsSubjectCaseSensitive != nil {
		isSubjectCaseSensitive := *filter.IsSubjectCaseSensitive
		result.IsSubjectCaseSensitive = &isSubjectCaseSensitive
	}

	// Set property "SubjectBeginsWith":
	if filter.SubjectBeginsWith != nil {
		subjectBeginsWith := *filter.SubjectBeginsWith
		result.SubjectBeginsWith = &subjectBeginsWith
	}

	// Set property "SubjectEndsWith":
	if filter.SubjectEndsWith != nil {
		subjectEndsWith := *filter.SubjectEndsWith
		result.SubjectEndsWith = &subjectEndsWith
	}
	return result, nil
}

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

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

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

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

	// Set property "IsSubjectCaseSensitive":
	if typedInput.IsSubjectCaseSensitive != nil {
		isSubjectCaseSensitive := *typedInput.IsSubjectCaseSensitive
		filter.IsSubjectCaseSensitive = &isSubjectCaseSensitive
	}

	// Set property "SubjectBeginsWith":
	if typedInput.SubjectBeginsWith != nil {
		subjectBeginsWith := *typedInput.SubjectBeginsWith
		filter.SubjectBeginsWith = &subjectBeginsWith
	}

	// Set property "SubjectEndsWith":
	if typedInput.SubjectEndsWith != nil {
		subjectEndsWith := *typedInput.SubjectEndsWith
		filter.SubjectEndsWith = &subjectEndsWith
	}

	// No error
	return nil
}

// AssignProperties_From_EventSubscriptionFilter populates our EventSubscriptionFilter from the provided source EventSubscriptionFilter
func (filter *EventSubscriptionFilter) AssignProperties_From_EventSubscriptionFilter(source *storage.EventSubscriptionFilter) error {

	// AdvancedFilters
	if source.AdvancedFilters != nil {
		advancedFilterList := make([]AdvancedFilter, len(source.AdvancedFilters))
		for advancedFilterIndex, advancedFilterItem := range source.AdvancedFilters {
			var advancedFilter AdvancedFilter
			err := advancedFilter.AssignProperties_From_AdvancedFilter(&advancedFilterItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_AdvancedFilter() to populate field AdvancedFilters")
			}
			advancedFilterList[advancedFilterIndex] = advancedFilter
		}
		filter.AdvancedFilters = advancedFilterList
	} else {
		filter.AdvancedFilters = nil
	}

	// IncludedEventTypes
	filter.IncludedEventTypes = genruntime.CloneSliceOfString(source.IncludedEventTypes)

	// IsSubjectCaseSensitive
	if source.IsSubjectCaseSensitive != nil {
		isSubjectCaseSensitive := *source.IsSubjectCaseSensitive
		filter.IsSubjectCaseSensitive = &isSubjectCaseSensitive
	} else {
		filter.IsSubjectCaseSensitive = nil
	}

	// SubjectBeginsWith
	filter.SubjectBeginsWith = genruntime.ClonePointerToString(source.SubjectBeginsWith)

	// SubjectEndsWith
	filter.SubjectEndsWith = genruntime.ClonePointerToString(source.SubjectEndsWith)

	// No error
	return nil
}

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

	// AdvancedFilters
	if filter.AdvancedFilters != nil {
		advancedFilterList := make([]storage.AdvancedFilter, len(filter.AdvancedFilters))
		for advancedFilterIndex, advancedFilterItem := range filter.AdvancedFilters {
			var advancedFilter storage.AdvancedFilter
			err := advancedFilterItem.AssignProperties_To_AdvancedFilter(&advancedFilter)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_AdvancedFilter() to populate field AdvancedFilters")
			}
			advancedFilterList[advancedFilterIndex] = advancedFilter
		}
		destination.AdvancedFilters = advancedFilterList
	} else {
		destination.AdvancedFilters = nil
	}

	// IncludedEventTypes
	destination.IncludedEventTypes = genruntime.CloneSliceOfString(filter.IncludedEventTypes)

	// IsSubjectCaseSensitive
	if filter.IsSubjectCaseSensitive != nil {
		isSubjectCaseSensitive := *filter.IsSubjectCaseSensitive
		destination.IsSubjectCaseSensitive = &isSubjectCaseSensitive
	} else {
		destination.IsSubjectCaseSensitive = nil
	}

	// SubjectBeginsWith
	destination.SubjectBeginsWith = genruntime.ClonePointerToString(filter.SubjectBeginsWith)

	// SubjectEndsWith
	destination.SubjectEndsWith = genruntime.ClonePointerToString(filter.SubjectEndsWith)

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

	// No error
	return nil
}

// Initialize_From_EventSubscriptionFilter_STATUS populates our EventSubscriptionFilter from the provided source EventSubscriptionFilter_STATUS
func (filter *EventSubscriptionFilter) Initialize_From_EventSubscriptionFilter_STATUS(source *EventSubscriptionFilter_STATUS) error {

	// AdvancedFilters
	if source.AdvancedFilters != nil {
		advancedFilterList := make([]AdvancedFilter, len(source.AdvancedFilters))
		for advancedFilterIndex, advancedFilterItem := range source.AdvancedFilters {
			var advancedFilter AdvancedFilter
			err := advancedFilter.Initialize_From_AdvancedFilter_STATUS(&advancedFilterItem)
			if err != nil {
				return eris.Wrap(err, "calling Initialize_From_AdvancedFilter_STATUS() to populate field AdvancedFilters")
			}
			advancedFilterList[advancedFilterIndex] = advancedFilter
		}
		filter.AdvancedFilters = advancedFilterList
	} else {
		filter.AdvancedFilters = nil
	}

	// IncludedEventTypes
	filter.IncludedEventTypes = genruntime.CloneSliceOfString(source.IncludedEventTypes)

	// IsSubjectCaseSensitive
	if source.IsSubjectCaseSensitive != nil {
		isSubjectCaseSensitive := *source.IsSubjectCaseSensitive
		filter.IsSubjectCaseSensitive = &isSubjectCaseSensitive
	} else {
		filter.IsSubjectCaseSensitive = nil
	}

	// SubjectBeginsWith
	filter.SubjectBeginsWith = genruntime.ClonePointerToString(source.SubjectBeginsWith)

	// SubjectEndsWith
	filter.SubjectEndsWith = genruntime.ClonePointerToString(source.SubjectEndsWith)

	// No error
	return nil
}

// Filter for the Event Subscription.
type EventSubscriptionFilter_STATUS struct {
	// AdvancedFilters: An array of advanced filters that are used for filtering event subscriptions.
	AdvancedFilters []AdvancedFilter_STATUS `json:"advancedFilters,omitempty"`

	// IncludedEventTypes: A list of applicable event types that need to be part of the event subscription. If it is desired to
	// subscribe to all default event types, set the IncludedEventTypes to null.
	IncludedEventTypes []string `json:"includedEventTypes,omitempty"`

	// IsSubjectCaseSensitive: Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the filter
	// should be compared in a case sensitive manner.
	IsSubjectCaseSensitive *bool `json:"isSubjectCaseSensitive,omitempty"`

	// SubjectBeginsWith: An optional string to filter events for an event subscription based on a resource path prefix.
	// The format of this depends on the publisher of the events.
	// Wildcard characters are not supported in this path.
	SubjectBeginsWith *string `json:"subjectBeginsWith,omitempty"`

	// SubjectEndsWith: An optional string to filter events for an event subscription based on a resource path suffix.
	// Wildcard characters are not supported in this path.
	SubjectEndsWith *string `json:"subjectEndsWith,omitempty"`
}

var _ genruntime.FromARMConverter = &EventSubscriptionFilter_STATUS{}

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

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

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

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

	// Set property "IsSubjectCaseSensitive":
	if typedInput.IsSubjectCaseSensitive != nil {
		isSubjectCaseSensitive := *typedInput.IsSubjectCaseSensitive
		filter.IsSubjectCaseSensitive = &isSubjectCaseSensitive
	}

	// Set property "SubjectBeginsWith":
	if typedInput.SubjectBeginsWith != nil {
		subjectBeginsWith := *typedInput.SubjectBeginsWith
		filter.SubjectBeginsWith = &subjectBeginsWith
	}

	// Set property "SubjectEndsWith":
	if typedInput.SubjectEndsWith != nil {
		subjectEndsWith := *typedInput.SubjectEndsWith
		filter.SubjectEndsWith = &subjectEndsWith
	}

	// No error
	return nil
}

// AssignProperties_From_EventSubscriptionFilter_STATUS populates our EventSubscriptionFilter_STATUS from the provided source EventSubscriptionFilter_STATUS
func (filter *EventSubscriptionFilter_STATUS) AssignProperties_From_EventSubscriptionFilter_STATUS(source *storage.EventSubscriptionFilter_STATUS) error {

	// AdvancedFilters
	if source.AdvancedFilters != nil {
		advancedFilterList := make([]AdvancedFilter_STATUS, len(source.AdvancedFilters))
		for advancedFilterIndex, advancedFilterItem := range source.AdvancedFilters {
			var advancedFilter AdvancedFilter_STATUS
			err := advancedFilter.AssignProperties_From_AdvancedFilter_STATUS(&advancedFilterItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_AdvancedFilter_STATUS() to populate field AdvancedFilters")
			}
			advancedFilterList[advancedFilterIndex] = advancedFilter
		}
		filter.AdvancedFilters = advancedFilterList
	} else {
		filter.AdvancedFilters = nil
	}

	// IncludedEventTypes
	filter.IncludedEventTypes = genruntime.CloneSliceOfString(source.IncludedEventTypes)

	// IsSubjectCaseSensitive
	if source.IsSubjectCaseSensitive != nil {
		isSubjectCaseSensitive := *source.IsSubjectCaseSensitive
		filter.IsSubjectCaseSensitive = &isSubjectCaseSensitive
	} else {
		filter.IsSubjectCaseSensitive = nil
	}

	// SubjectBeginsWith
	filter.SubjectBeginsWith = genruntime.ClonePointerToString(source.SubjectBeginsWith)

	// SubjectEndsWith
	filter.SubjectEndsWith = genruntime.ClonePointerToString(source.SubjectEndsWith)

	// No error
	return nil
}

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

	// AdvancedFilters
	if filter.AdvancedFilters != nil {
		advancedFilterList := make([]storage.AdvancedFilter_STATUS, len(filter.AdvancedFilters))
		for advancedFilterIndex, advancedFilterItem := range filter.AdvancedFilters {
			var advancedFilter storage.AdvancedFilter_STATUS
			err := advancedFilterItem.AssignProperties_To_AdvancedFilter_STATUS(&advancedFilter)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_AdvancedFilter_STATUS() to populate field AdvancedFilters")
			}
			advancedFilterList[advancedFilterIndex] = advancedFilter
		}
		destination.AdvancedFilters = advancedFilterList
	} else {
		destination.AdvancedFilters = nil
	}

	// IncludedEventTypes
	destination.IncludedEventTypes = genruntime.CloneSliceOfString(filter.IncludedEventTypes)

	// IsSubjectCaseSensitive
	if filter.IsSubjectCaseSensitive != nil {
		isSubjectCaseSensitive := *filter.IsSubjectCaseSensitive
		destination.IsSubjectCaseSensitive = &isSubjectCaseSensitive
	} else {
		destination.IsSubjectCaseSensitive = nil
	}

	// SubjectBeginsWith
	destination.SubjectBeginsWith = genruntime.ClonePointerToString(filter.SubjectBeginsWith)

	// SubjectEndsWith
	destination.SubjectEndsWith = genruntime.ClonePointerToString(filter.SubjectEndsWith)

	// 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 EventSubscriptionOperatorSpec 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_EventSubscriptionOperatorSpec populates our EventSubscriptionOperatorSpec from the provided source EventSubscriptionOperatorSpec
func (operator *EventSubscriptionOperatorSpec) AssignProperties_From_EventSubscriptionOperatorSpec(source *storage.EventSubscriptionOperatorSpec) 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_EventSubscriptionOperatorSpec populates the provided destination EventSubscriptionOperatorSpec from our EventSubscriptionOperatorSpec
func (operator *EventSubscriptionOperatorSpec) AssignProperties_To_EventSubscriptionOperatorSpec(destination *storage.EventSubscriptionOperatorSpec) 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
}

// +kubebuilder:validation:Enum={"CloudEventSchemaV1_0","CustomInputSchema","EventGridSchema"}
type EventSubscriptionProperties_EventDeliverySchema string

const (
	EventSubscriptionProperties_EventDeliverySchema_CloudEventSchemaV1_0 = EventSubscriptionProperties_EventDeliverySchema("CloudEventSchemaV1_0")
	EventSubscriptionProperties_EventDeliverySchema_CustomInputSchema    = EventSubscriptionProperties_EventDeliverySchema("CustomInputSchema")
	EventSubscriptionProperties_EventDeliverySchema_EventGridSchema      = EventSubscriptionProperties_EventDeliverySchema("EventGridSchema")
)

// Mapping from string to EventSubscriptionProperties_EventDeliverySchema
var eventSubscriptionProperties_EventDeliverySchema_Values = map[string]EventSubscriptionProperties_EventDeliverySchema{
	"cloudeventschemav1_0": EventSubscriptionProperties_EventDeliverySchema_CloudEventSchemaV1_0,
	"custominputschema":    EventSubscriptionProperties_EventDeliverySchema_CustomInputSchema,
	"eventgridschema":      EventSubscriptionProperties_EventDeliverySchema_EventGridSchema,
}

type EventSubscriptionProperties_EventDeliverySchema_STATUS string

const (
	EventSubscriptionProperties_EventDeliverySchema_STATUS_CloudEventSchemaV1_0 = EventSubscriptionProperties_EventDeliverySchema_STATUS("CloudEventSchemaV1_0")
	EventSubscriptionProperties_EventDeliverySchema_STATUS_CustomInputSchema    = EventSubscriptionProperties_EventDeliverySchema_STATUS("CustomInputSchema")
	EventSubscriptionProperties_EventDeliverySchema_STATUS_EventGridSchema      = EventSubscriptionProperties_EventDeliverySchema_STATUS("EventGridSchema")
)

// Mapping from string to EventSubscriptionProperties_EventDeliverySchema_STATUS
var eventSubscriptionProperties_EventDeliverySchema_STATUS_Values = map[string]EventSubscriptionProperties_EventDeliverySchema_STATUS{
	"cloudeventschemav1_0": EventSubscriptionProperties_EventDeliverySchema_STATUS_CloudEventSchemaV1_0,
	"custominputschema":    EventSubscriptionProperties_EventDeliverySchema_STATUS_CustomInputSchema,
	"eventgridschema":      EventSubscriptionProperties_EventDeliverySchema_STATUS_EventGridSchema,
}

type EventSubscriptionProperties_ProvisioningState_STATUS string

const (
	EventSubscriptionProperties_ProvisioningState_STATUS_AwaitingManualAction = EventSubscriptionProperties_ProvisioningState_STATUS("AwaitingManualAction")
	EventSubscriptionProperties_ProvisioningState_STATUS_Canceled             = EventSubscriptionProperties_ProvisioningState_STATUS("Canceled")
	EventSubscriptionProperties_ProvisioningState_STATUS_Creating             = EventSubscriptionProperties_ProvisioningState_STATUS("Creating")
	EventSubscriptionProperties_ProvisioningState_STATUS_Deleting             = EventSubscriptionProperties_ProvisioningState_STATUS("Deleting")
	EventSubscriptionProperties_ProvisioningState_STATUS_Failed               = EventSubscriptionProperties_ProvisioningState_STATUS("Failed")
	EventSubscriptionProperties_ProvisioningState_STATUS_Succeeded            = EventSubscriptionProperties_ProvisioningState_STATUS("Succeeded")
	EventSubscriptionProperties_ProvisioningState_STATUS_Updating             = EventSubscriptionProperties_ProvisioningState_STATUS("Updating")
)

// Mapping from string to EventSubscriptionProperties_ProvisioningState_STATUS
var eventSubscriptionProperties_ProvisioningState_STATUS_Values = map[string]EventSubscriptionProperties_ProvisioningState_STATUS{
	"awaitingmanualaction": EventSubscriptionProperties_ProvisioningState_STATUS_AwaitingManualAction,
	"canceled":             EventSubscriptionProperties_ProvisioningState_STATUS_Canceled,
	"creating":             EventSubscriptionProperties_ProvisioningState_STATUS_Creating,
	"deleting":             EventSubscriptionProperties_ProvisioningState_STATUS_Deleting,
	"failed":               EventSubscriptionProperties_ProvisioningState_STATUS_Failed,
	"succeeded":            EventSubscriptionProperties_ProvisioningState_STATUS_Succeeded,
	"updating":             EventSubscriptionProperties_ProvisioningState_STATUS_Updating,
}

// Information about the retry policy for an event subscription.
type RetryPolicy struct {
	// EventTimeToLiveInMinutes: Time To Live (in minutes) for events.
	EventTimeToLiveInMinutes *int `json:"eventTimeToLiveInMinutes,omitempty"`

	// MaxDeliveryAttempts: Maximum number of delivery retry attempts for events.
	MaxDeliveryAttempts *int `json:"maxDeliveryAttempts,omitempty"`
}

var _ genruntime.ARMTransformer = &RetryPolicy{}

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

	// Set property "EventTimeToLiveInMinutes":
	if policy.EventTimeToLiveInMinutes != nil {
		eventTimeToLiveInMinutes := *policy.EventTimeToLiveInMinutes
		result.EventTimeToLiveInMinutes = &eventTimeToLiveInMinutes
	}

	// Set property "MaxDeliveryAttempts":
	if policy.MaxDeliveryAttempts != nil {
		maxDeliveryAttempts := *policy.MaxDeliveryAttempts
		result.MaxDeliveryAttempts = &maxDeliveryAttempts
	}
	return result, nil
}

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

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

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

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

	// No error
	return nil
}

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

	// EventTimeToLiveInMinutes
	policy.EventTimeToLiveInMinutes = genruntime.ClonePointerToInt(source.EventTimeToLiveInMinutes)

	// MaxDeliveryAttempts
	policy.MaxDeliveryAttempts = genruntime.ClonePointerToInt(source.MaxDeliveryAttempts)

	// No error
	return nil
}

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

	// EventTimeToLiveInMinutes
	destination.EventTimeToLiveInMinutes = genruntime.ClonePointerToInt(policy.EventTimeToLiveInMinutes)

	// MaxDeliveryAttempts
	destination.MaxDeliveryAttempts = genruntime.ClonePointerToInt(policy.MaxDeliveryAttempts)

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

	// No error
	return nil
}

// Initialize_From_RetryPolicy_STATUS populates our RetryPolicy from the provided source RetryPolicy_STATUS
func (policy *RetryPolicy) Initialize_From_RetryPolicy_STATUS(source *RetryPolicy_STATUS) error {

	// EventTimeToLiveInMinutes
	policy.EventTimeToLiveInMinutes = genruntime.ClonePointerToInt(source.EventTimeToLiveInMinutes)

	// MaxDeliveryAttempts
	policy.MaxDeliveryAttempts = genruntime.ClonePointerToInt(source.MaxDeliveryAttempts)

	// No error
	return nil
}

// Information about the retry policy for an event subscription.
type RetryPolicy_STATUS struct {
	// EventTimeToLiveInMinutes: Time To Live (in minutes) for events.
	EventTimeToLiveInMinutes *int `json:"eventTimeToLiveInMinutes,omitempty"`

	// MaxDeliveryAttempts: Maximum number of delivery retry attempts for events.
	MaxDeliveryAttempts *int `json:"maxDeliveryAttempts,omitempty"`
}

var _ genruntime.FromARMConverter = &RetryPolicy_STATUS{}

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

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

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

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

	// No error
	return nil
}

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

	// EventTimeToLiveInMinutes
	policy.EventTimeToLiveInMinutes = genruntime.ClonePointerToInt(source.EventTimeToLiveInMinutes)

	// MaxDeliveryAttempts
	policy.MaxDeliveryAttempts = genruntime.ClonePointerToInt(source.MaxDeliveryAttempts)

	// No error
	return nil
}

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

	// EventTimeToLiveInMinutes
	destination.EventTimeToLiveInMinutes = genruntime.ClonePointerToInt(policy.EventTimeToLiveInMinutes)

	// MaxDeliveryAttempts
	destination.MaxDeliveryAttempts = genruntime.ClonePointerToInt(policy.MaxDeliveryAttempts)

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

	// No error
	return nil
}

type AdvancedFilter struct {
	// BoolEquals: Mutually exclusive with all other properties
	BoolEquals *BoolEqualsAdvancedFilter `json:"boolEquals,omitempty"`

	// NumberGreaterThan: Mutually exclusive with all other properties
	NumberGreaterThan *NumberGreaterThanAdvancedFilter `json:"numberGreaterThan,omitempty"`

	// NumberGreaterThanOrEquals: Mutually exclusive with all other properties
	NumberGreaterThanOrEquals *NumberGreaterThanOrEqualsAdvancedFilter `json:"numberGreaterThanOrEquals,omitempty"`

	// NumberIn: Mutually exclusive with all other properties
	NumberIn *NumberInAdvancedFilter `json:"numberIn,omitempty"`

	// NumberLessThan: Mutually exclusive with all other properties
	NumberLessThan *NumberLessThanAdvancedFilter `json:"numberLessThan,omitempty"`

	// NumberLessThanOrEquals: Mutually exclusive with all other properties
	NumberLessThanOrEquals *NumberLessThanOrEqualsAdvancedFilter `json:"numberLessThanOrEquals,omitempty"`

	// NumberNotIn: Mutually exclusive with all other properties
	NumberNotIn *NumberNotInAdvancedFilter `json:"numberNotIn,omitempty"`

	// StringBeginsWith: Mutually exclusive with all other properties
	StringBeginsWith *StringBeginsWithAdvancedFilter `json:"stringBeginsWith,omitempty"`

	// StringContains: Mutually exclusive with all other properties
	StringContains *StringContainsAdvancedFilter `json:"stringContains,omitempty"`

	// StringEndsWith: Mutually exclusive with all other properties
	StringEndsWith *StringEndsWithAdvancedFilter `json:"stringEndsWith,omitempty"`

	// StringIn: Mutually exclusive with all other properties
	StringIn *StringInAdvancedFilter `json:"stringIn,omitempty"`

	// StringNotIn: Mutually exclusive with all other properties
	StringNotIn *StringNotInAdvancedFilter `json:"stringNotIn,omitempty"`
}

var _ genruntime.ARMTransformer = &AdvancedFilter{}

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

	// Set property "BoolEquals":
	if filter.BoolEquals != nil {
		boolEquals_ARM, err := filter.BoolEquals.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		boolEquals := *boolEquals_ARM.(*arm.BoolEqualsAdvancedFilter)
		result.BoolEquals = &boolEquals
	}

	// Set property "NumberGreaterThan":
	if filter.NumberGreaterThan != nil {
		numberGreaterThan_ARM, err := filter.NumberGreaterThan.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		numberGreaterThan := *numberGreaterThan_ARM.(*arm.NumberGreaterThanAdvancedFilter)
		result.NumberGreaterThan = &numberGreaterThan
	}

	// Set property "NumberGreaterThanOrEquals":
	if filter.NumberGreaterThanOrEquals != nil {
		numberGreaterThanOrEquals_ARM, err := filter.NumberGreaterThanOrEquals.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		numberGreaterThanOrEquals := *numberGreaterThanOrEquals_ARM.(*arm.NumberGreaterThanOrEqualsAdvancedFilter)
		result.NumberGreaterThanOrEquals = &numberGreaterThanOrEquals
	}

	// Set property "NumberIn":
	if filter.NumberIn != nil {
		numberIn_ARM, err := filter.NumberIn.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		numberIn := *numberIn_ARM.(*arm.NumberInAdvancedFilter)
		result.NumberIn = &numberIn
	}

	// Set property "NumberLessThan":
	if filter.NumberLessThan != nil {
		numberLessThan_ARM, err := filter.NumberLessThan.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		numberLessThan := *numberLessThan_ARM.(*arm.NumberLessThanAdvancedFilter)
		result.NumberLessThan = &numberLessThan
	}

	// Set property "NumberLessThanOrEquals":
	if filter.NumberLessThanOrEquals != nil {
		numberLessThanOrEquals_ARM, err := filter.NumberLessThanOrEquals.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		numberLessThanOrEquals := *numberLessThanOrEquals_ARM.(*arm.NumberLessThanOrEqualsAdvancedFilter)
		result.NumberLessThanOrEquals = &numberLessThanOrEquals
	}

	// Set property "NumberNotIn":
	if filter.NumberNotIn != nil {
		numberNotIn_ARM, err := filter.NumberNotIn.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		numberNotIn := *numberNotIn_ARM.(*arm.NumberNotInAdvancedFilter)
		result.NumberNotIn = &numberNotIn
	}

	// Set property "StringBeginsWith":
	if filter.StringBeginsWith != nil {
		stringBeginsWith_ARM, err := filter.StringBeginsWith.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		stringBeginsWith := *stringBeginsWith_ARM.(*arm.StringBeginsWithAdvancedFilter)
		result.StringBeginsWith = &stringBeginsWith
	}

	// Set property "StringContains":
	if filter.StringContains != nil {
		stringContains_ARM, err := filter.StringContains.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		stringContains := *stringContains_ARM.(*arm.StringContainsAdvancedFilter)
		result.StringContains = &stringContains
	}

	// Set property "StringEndsWith":
	if filter.StringEndsWith != nil {
		stringEndsWith_ARM, err := filter.StringEndsWith.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		stringEndsWith := *stringEndsWith_ARM.(*arm.StringEndsWithAdvancedFilter)
		result.StringEndsWith = &stringEndsWith
	}

	// Set property "StringIn":
	if filter.StringIn != nil {
		stringIn_ARM, err := filter.StringIn.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		stringIn := *stringIn_ARM.(*arm.StringInAdvancedFilter)
		result.StringIn = &stringIn
	}

	// Set property "StringNotIn":
	if filter.StringNotIn != nil {
		stringNotIn_ARM, err := filter.StringNotIn.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		stringNotIn := *stringNotIn_ARM.(*arm.StringNotInAdvancedFilter)
		result.StringNotIn = &stringNotIn
	}
	return result, nil
}

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

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

	// Set property "BoolEquals":
	if typedInput.BoolEquals != nil {
		var boolEquals1 BoolEqualsAdvancedFilter
		err := boolEquals1.PopulateFromARM(owner, *typedInput.BoolEquals)
		if err != nil {
			return err
		}
		boolEquals := boolEquals1
		filter.BoolEquals = &boolEquals
	}

	// Set property "NumberGreaterThan":
	if typedInput.NumberGreaterThan != nil {
		var numberGreaterThan1 NumberGreaterThanAdvancedFilter
		err := numberGreaterThan1.PopulateFromARM(owner, *typedInput.NumberGreaterThan)
		if err != nil {
			return err
		}
		numberGreaterThan := numberGreaterThan1
		filter.NumberGreaterThan = &numberGreaterThan
	}

	// Set property "NumberGreaterThanOrEquals":
	if typedInput.NumberGreaterThanOrEquals != nil {
		var numberGreaterThanOrEquals1 NumberGreaterThanOrEqualsAdvancedFilter
		err := numberGreaterThanOrEquals1.PopulateFromARM(owner, *typedInput.NumberGreaterThanOrEquals)
		if err != nil {
			return err
		}
		numberGreaterThanOrEquals := numberGreaterThanOrEquals1
		filter.NumberGreaterThanOrEquals = &numberGreaterThanOrEquals
	}

	// Set property "NumberIn":
	if typedInput.NumberIn != nil {
		var numberIn1 NumberInAdvancedFilter
		err := numberIn1.PopulateFromARM(owner, *typedInput.NumberIn)
		if err != nil {
			return err
		}
		numberIn := numberIn1
		filter.NumberIn = &numberIn
	}

	// Set property "NumberLessThan":
	if typedInput.NumberLessThan != nil {
		var numberLessThan1 NumberLessThanAdvancedFilter
		err := numberLessThan1.PopulateFromARM(owner, *typedInput.NumberLessThan)
		if err != nil {
			return err
		}
		numberLessThan := numberLessThan1
		filter.NumberLessThan = &numberLessThan
	}

	// Set property "NumberLessThanOrEquals":
	if typedInput.NumberLessThanOrEquals != nil {
		var numberLessThanOrEquals1 NumberLessThanOrEqualsAdvancedFilter
		err := numberLessThanOrEquals1.PopulateFromARM(owner, *typedInput.NumberLessThanOrEquals)
		if err != nil {
			return err
		}
		numberLessThanOrEquals := numberLessThanOrEquals1
		filter.NumberLessThanOrEquals = &numberLessThanOrEquals
	}

	// Set property "NumberNotIn":
	if typedInput.NumberNotIn != nil {
		var numberNotIn1 NumberNotInAdvancedFilter
		err := numberNotIn1.PopulateFromARM(owner, *typedInput.NumberNotIn)
		if err != nil {
			return err
		}
		numberNotIn := numberNotIn1
		filter.NumberNotIn = &numberNotIn
	}

	// Set property "StringBeginsWith":
	if typedInput.StringBeginsWith != nil {
		var stringBeginsWith1 StringBeginsWithAdvancedFilter
		err := stringBeginsWith1.PopulateFromARM(owner, *typedInput.StringBeginsWith)
		if err != nil {
			return err
		}
		stringBeginsWith := stringBeginsWith1
		filter.StringBeginsWith = &stringBeginsWith
	}

	// Set property "StringContains":
	if typedInput.StringContains != nil {
		var stringContains1 StringContainsAdvancedFilter
		err := stringContains1.PopulateFromARM(owner, *typedInput.StringContains)
		if err != nil {
			return err
		}
		stringContains := stringContains1
		filter.StringContains = &stringContains
	}

	// Set property "StringEndsWith":
	if typedInput.StringEndsWith != nil {
		var stringEndsWith1 StringEndsWithAdvancedFilter
		err := stringEndsWith1.PopulateFromARM(owner, *typedInput.StringEndsWith)
		if err != nil {
			return err
		}
		stringEndsWith := stringEndsWith1
		filter.StringEndsWith = &stringEndsWith
	}

	// Set property "StringIn":
	if typedInput.StringIn != nil {
		var stringIn1 StringInAdvancedFilter
		err := stringIn1.PopulateFromARM(owner, *typedInput.StringIn)
		if err != nil {
			return err
		}
		stringIn := stringIn1
		filter.StringIn = &stringIn
	}

	// Set property "StringNotIn":
	if typedInput.StringNotIn != nil {
		var stringNotIn1 StringNotInAdvancedFilter
		err := stringNotIn1.PopulateFromARM(owner, *typedInput.StringNotIn)
		if err != nil {
			return err
		}
		stringNotIn := stringNotIn1
		filter.StringNotIn = &stringNotIn
	}

	// No error
	return nil
}

// AssignProperties_From_AdvancedFilter populates our AdvancedFilter from the provided source AdvancedFilter
func (filter *AdvancedFilter) AssignProperties_From_AdvancedFilter(source *storage.AdvancedFilter) error {

	// BoolEquals
	if source.BoolEquals != nil {
		var boolEqual BoolEqualsAdvancedFilter
		err := boolEqual.AssignProperties_From_BoolEqualsAdvancedFilter(source.BoolEquals)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_BoolEqualsAdvancedFilter() to populate field BoolEquals")
		}
		filter.BoolEquals = &boolEqual
	} else {
		filter.BoolEquals = nil
	}

	// NumberGreaterThan
	if source.NumberGreaterThan != nil {
		var numberGreaterThan NumberGreaterThanAdvancedFilter
		err := numberGreaterThan.AssignProperties_From_NumberGreaterThanAdvancedFilter(source.NumberGreaterThan)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NumberGreaterThanAdvancedFilter() to populate field NumberGreaterThan")
		}
		filter.NumberGreaterThan = &numberGreaterThan
	} else {
		filter.NumberGreaterThan = nil
	}

	// NumberGreaterThanOrEquals
	if source.NumberGreaterThanOrEquals != nil {
		var numberGreaterThanOrEqual NumberGreaterThanOrEqualsAdvancedFilter
		err := numberGreaterThanOrEqual.AssignProperties_From_NumberGreaterThanOrEqualsAdvancedFilter(source.NumberGreaterThanOrEquals)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NumberGreaterThanOrEqualsAdvancedFilter() to populate field NumberGreaterThanOrEquals")
		}
		filter.NumberGreaterThanOrEquals = &numberGreaterThanOrEqual
	} else {
		filter.NumberGreaterThanOrEquals = nil
	}

	// NumberIn
	if source.NumberIn != nil {
		var numberIn NumberInAdvancedFilter
		err := numberIn.AssignProperties_From_NumberInAdvancedFilter(source.NumberIn)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NumberInAdvancedFilter() to populate field NumberIn")
		}
		filter.NumberIn = &numberIn
	} else {
		filter.NumberIn = nil
	}

	// NumberLessThan
	if source.NumberLessThan != nil {
		var numberLessThan NumberLessThanAdvancedFilter
		err := numberLessThan.AssignProperties_From_NumberLessThanAdvancedFilter(source.NumberLessThan)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NumberLessThanAdvancedFilter() to populate field NumberLessThan")
		}
		filter.NumberLessThan = &numberLessThan
	} else {
		filter.NumberLessThan = nil
	}

	// NumberLessThanOrEquals
	if source.NumberLessThanOrEquals != nil {
		var numberLessThanOrEqual NumberLessThanOrEqualsAdvancedFilter
		err := numberLessThanOrEqual.AssignProperties_From_NumberLessThanOrEqualsAdvancedFilter(source.NumberLessThanOrEquals)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NumberLessThanOrEqualsAdvancedFilter() to populate field NumberLessThanOrEquals")
		}
		filter.NumberLessThanOrEquals = &numberLessThanOrEqual
	} else {
		filter.NumberLessThanOrEquals = nil
	}

	// NumberNotIn
	if source.NumberNotIn != nil {
		var numberNotIn NumberNotInAdvancedFilter
		err := numberNotIn.AssignProperties_From_NumberNotInAdvancedFilter(source.NumberNotIn)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NumberNotInAdvancedFilter() to populate field NumberNotIn")
		}
		filter.NumberNotIn = &numberNotIn
	} else {
		filter.NumberNotIn = nil
	}

	// StringBeginsWith
	if source.StringBeginsWith != nil {
		var stringBeginsWith StringBeginsWithAdvancedFilter
		err := stringBeginsWith.AssignProperties_From_StringBeginsWithAdvancedFilter(source.StringBeginsWith)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StringBeginsWithAdvancedFilter() to populate field StringBeginsWith")
		}
		filter.StringBeginsWith = &stringBeginsWith
	} else {
		filter.StringBeginsWith = nil
	}

	// StringContains
	if source.StringContains != nil {
		var stringContain StringContainsAdvancedFilter
		err := stringContain.AssignProperties_From_StringContainsAdvancedFilter(source.StringContains)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StringContainsAdvancedFilter() to populate field StringContains")
		}
		filter.StringContains = &stringContain
	} else {
		filter.StringContains = nil
	}

	// StringEndsWith
	if source.StringEndsWith != nil {
		var stringEndsWith StringEndsWithAdvancedFilter
		err := stringEndsWith.AssignProperties_From_StringEndsWithAdvancedFilter(source.StringEndsWith)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StringEndsWithAdvancedFilter() to populate field StringEndsWith")
		}
		filter.StringEndsWith = &stringEndsWith
	} else {
		filter.StringEndsWith = nil
	}

	// StringIn
	if source.StringIn != nil {
		var stringIn StringInAdvancedFilter
		err := stringIn.AssignProperties_From_StringInAdvancedFilter(source.StringIn)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StringInAdvancedFilter() to populate field StringIn")
		}
		filter.StringIn = &stringIn
	} else {
		filter.StringIn = nil
	}

	// StringNotIn
	if source.StringNotIn != nil {
		var stringNotIn StringNotInAdvancedFilter
		err := stringNotIn.AssignProperties_From_StringNotInAdvancedFilter(source.StringNotIn)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StringNotInAdvancedFilter() to populate field StringNotIn")
		}
		filter.StringNotIn = &stringNotIn
	} else {
		filter.StringNotIn = nil
	}

	// No error
	return nil
}

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

	// BoolEquals
	if filter.BoolEquals != nil {
		var boolEqual storage.BoolEqualsAdvancedFilter
		err := filter.BoolEquals.AssignProperties_To_BoolEqualsAdvancedFilter(&boolEqual)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_BoolEqualsAdvancedFilter() to populate field BoolEquals")
		}
		destination.BoolEquals = &boolEqual
	} else {
		destination.BoolEquals = nil
	}

	// NumberGreaterThan
	if filter.NumberGreaterThan != nil {
		var numberGreaterThan storage.NumberGreaterThanAdvancedFilter
		err := filter.NumberGreaterThan.AssignProperties_To_NumberGreaterThanAdvancedFilter(&numberGreaterThan)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NumberGreaterThanAdvancedFilter() to populate field NumberGreaterThan")
		}
		destination.NumberGreaterThan = &numberGreaterThan
	} else {
		destination.NumberGreaterThan = nil
	}

	// NumberGreaterThanOrEquals
	if filter.NumberGreaterThanOrEquals != nil {
		var numberGreaterThanOrEqual storage.NumberGreaterThanOrEqualsAdvancedFilter
		err := filter.NumberGreaterThanOrEquals.AssignProperties_To_NumberGreaterThanOrEqualsAdvancedFilter(&numberGreaterThanOrEqual)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NumberGreaterThanOrEqualsAdvancedFilter() to populate field NumberGreaterThanOrEquals")
		}
		destination.NumberGreaterThanOrEquals = &numberGreaterThanOrEqual
	} else {
		destination.NumberGreaterThanOrEquals = nil
	}

	// NumberIn
	if filter.NumberIn != nil {
		var numberIn storage.NumberInAdvancedFilter
		err := filter.NumberIn.AssignProperties_To_NumberInAdvancedFilter(&numberIn)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NumberInAdvancedFilter() to populate field NumberIn")
		}
		destination.NumberIn = &numberIn
	} else {
		destination.NumberIn = nil
	}

	// NumberLessThan
	if filter.NumberLessThan != nil {
		var numberLessThan storage.NumberLessThanAdvancedFilter
		err := filter.NumberLessThan.AssignProperties_To_NumberLessThanAdvancedFilter(&numberLessThan)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NumberLessThanAdvancedFilter() to populate field NumberLessThan")
		}
		destination.NumberLessThan = &numberLessThan
	} else {
		destination.NumberLessThan = nil
	}

	// NumberLessThanOrEquals
	if filter.NumberLessThanOrEquals != nil {
		var numberLessThanOrEqual storage.NumberLessThanOrEqualsAdvancedFilter
		err := filter.NumberLessThanOrEquals.AssignProperties_To_NumberLessThanOrEqualsAdvancedFilter(&numberLessThanOrEqual)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NumberLessThanOrEqualsAdvancedFilter() to populate field NumberLessThanOrEquals")
		}
		destination.NumberLessThanOrEquals = &numberLessThanOrEqual
	} else {
		destination.NumberLessThanOrEquals = nil
	}

	// NumberNotIn
	if filter.NumberNotIn != nil {
		var numberNotIn storage.NumberNotInAdvancedFilter
		err := filter.NumberNotIn.AssignProperties_To_NumberNotInAdvancedFilter(&numberNotIn)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NumberNotInAdvancedFilter() to populate field NumberNotIn")
		}
		destination.NumberNotIn = &numberNotIn
	} else {
		destination.NumberNotIn = nil
	}

	// StringBeginsWith
	if filter.StringBeginsWith != nil {
		var stringBeginsWith storage.StringBeginsWithAdvancedFilter
		err := filter.StringBeginsWith.AssignProperties_To_StringBeginsWithAdvancedFilter(&stringBeginsWith)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StringBeginsWithAdvancedFilter() to populate field StringBeginsWith")
		}
		destination.StringBeginsWith = &stringBeginsWith
	} else {
		destination.StringBeginsWith = nil
	}

	// StringContains
	if filter.StringContains != nil {
		var stringContain storage.StringContainsAdvancedFilter
		err := filter.StringContains.AssignProperties_To_StringContainsAdvancedFilter(&stringContain)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StringContainsAdvancedFilter() to populate field StringContains")
		}
		destination.StringContains = &stringContain
	} else {
		destination.StringContains = nil
	}

	// StringEndsWith
	if filter.StringEndsWith != nil {
		var stringEndsWith storage.StringEndsWithAdvancedFilter
		err := filter.StringEndsWith.AssignProperties_To_StringEndsWithAdvancedFilter(&stringEndsWith)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StringEndsWithAdvancedFilter() to populate field StringEndsWith")
		}
		destination.StringEndsWith = &stringEndsWith
	} else {
		destination.StringEndsWith = nil
	}

	// StringIn
	if filter.StringIn != nil {
		var stringIn storage.StringInAdvancedFilter
		err := filter.StringIn.AssignProperties_To_StringInAdvancedFilter(&stringIn)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StringInAdvancedFilter() to populate field StringIn")
		}
		destination.StringIn = &stringIn
	} else {
		destination.StringIn = nil
	}

	// StringNotIn
	if filter.StringNotIn != nil {
		var stringNotIn storage.StringNotInAdvancedFilter
		err := filter.StringNotIn.AssignProperties_To_StringNotInAdvancedFilter(&stringNotIn)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StringNotInAdvancedFilter() to populate field StringNotIn")
		}
		destination.StringNotIn = &stringNotIn
	} else {
		destination.StringNotIn = nil
	}

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

	// No error
	return nil
}

// Initialize_From_AdvancedFilter_STATUS populates our AdvancedFilter from the provided source AdvancedFilter_STATUS
func (filter *AdvancedFilter) Initialize_From_AdvancedFilter_STATUS(source *AdvancedFilter_STATUS) error {

	// BoolEquals
	if source.BoolEquals != nil {
		var boolEqual BoolEqualsAdvancedFilter
		err := boolEqual.Initialize_From_BoolEqualsAdvancedFilter_STATUS(source.BoolEquals)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_BoolEqualsAdvancedFilter_STATUS() to populate field BoolEquals")
		}
		filter.BoolEquals = &boolEqual
	} else {
		filter.BoolEquals = nil
	}

	// NumberGreaterThan
	if source.NumberGreaterThan != nil {
		var numberGreaterThan NumberGreaterThanAdvancedFilter
		err := numberGreaterThan.Initialize_From_NumberGreaterThanAdvancedFilter_STATUS(source.NumberGreaterThan)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_NumberGreaterThanAdvancedFilter_STATUS() to populate field NumberGreaterThan")
		}
		filter.NumberGreaterThan = &numberGreaterThan
	} else {
		filter.NumberGreaterThan = nil
	}

	// NumberGreaterThanOrEquals
	if source.NumberGreaterThanOrEquals != nil {
		var numberGreaterThanOrEqual NumberGreaterThanOrEqualsAdvancedFilter
		err := numberGreaterThanOrEqual.Initialize_From_NumberGreaterThanOrEqualsAdvancedFilter_STATUS(source.NumberGreaterThanOrEquals)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_NumberGreaterThanOrEqualsAdvancedFilter_STATUS() to populate field NumberGreaterThanOrEquals")
		}
		filter.NumberGreaterThanOrEquals = &numberGreaterThanOrEqual
	} else {
		filter.NumberGreaterThanOrEquals = nil
	}

	// NumberIn
	if source.NumberIn != nil {
		var numberIn NumberInAdvancedFilter
		err := numberIn.Initialize_From_NumberInAdvancedFilter_STATUS(source.NumberIn)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_NumberInAdvancedFilter_STATUS() to populate field NumberIn")
		}
		filter.NumberIn = &numberIn
	} else {
		filter.NumberIn = nil
	}

	// NumberLessThan
	if source.NumberLessThan != nil {
		var numberLessThan NumberLessThanAdvancedFilter
		err := numberLessThan.Initialize_From_NumberLessThanAdvancedFilter_STATUS(source.NumberLessThan)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_NumberLessThanAdvancedFilter_STATUS() to populate field NumberLessThan")
		}
		filter.NumberLessThan = &numberLessThan
	} else {
		filter.NumberLessThan = nil
	}

	// NumberLessThanOrEquals
	if source.NumberLessThanOrEquals != nil {
		var numberLessThanOrEqual NumberLessThanOrEqualsAdvancedFilter
		err := numberLessThanOrEqual.Initialize_From_NumberLessThanOrEqualsAdvancedFilter_STATUS(source.NumberLessThanOrEquals)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_NumberLessThanOrEqualsAdvancedFilter_STATUS() to populate field NumberLessThanOrEquals")
		}
		filter.NumberLessThanOrEquals = &numberLessThanOrEqual
	} else {
		filter.NumberLessThanOrEquals = nil
	}

	// NumberNotIn
	if source.NumberNotIn != nil {
		var numberNotIn NumberNotInAdvancedFilter
		err := numberNotIn.Initialize_From_NumberNotInAdvancedFilter_STATUS(source.NumberNotIn)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_NumberNotInAdvancedFilter_STATUS() to populate field NumberNotIn")
		}
		filter.NumberNotIn = &numberNotIn
	} else {
		filter.NumberNotIn = nil
	}

	// StringBeginsWith
	if source.StringBeginsWith != nil {
		var stringBeginsWith StringBeginsWithAdvancedFilter
		err := stringBeginsWith.Initialize_From_StringBeginsWithAdvancedFilter_STATUS(source.StringBeginsWith)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_StringBeginsWithAdvancedFilter_STATUS() to populate field StringBeginsWith")
		}
		filter.StringBeginsWith = &stringBeginsWith
	} else {
		filter.StringBeginsWith = nil
	}

	// StringContains
	if source.StringContains != nil {
		var stringContain StringContainsAdvancedFilter
		err := stringContain.Initialize_From_StringContainsAdvancedFilter_STATUS(source.StringContains)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_StringContainsAdvancedFilter_STATUS() to populate field StringContains")
		}
		filter.StringContains = &stringContain
	} else {
		filter.StringContains = nil
	}

	// StringEndsWith
	if source.StringEndsWith != nil {
		var stringEndsWith StringEndsWithAdvancedFilter
		err := stringEndsWith.Initialize_From_StringEndsWithAdvancedFilter_STATUS(source.StringEndsWith)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_StringEndsWithAdvancedFilter_STATUS() to populate field StringEndsWith")
		}
		filter.StringEndsWith = &stringEndsWith
	} else {
		filter.StringEndsWith = nil
	}

	// StringIn
	if source.StringIn != nil {
		var stringIn StringInAdvancedFilter
		err := stringIn.Initialize_From_StringInAdvancedFilter_STATUS(source.StringIn)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_StringInAdvancedFilter_STATUS() to populate field StringIn")
		}
		filter.StringIn = &stringIn
	} else {
		filter.StringIn = nil
	}

	// StringNotIn
	if source.StringNotIn != nil {
		var stringNotIn StringNotInAdvancedFilter
		err := stringNotIn.Initialize_From_StringNotInAdvancedFilter_STATUS(source.StringNotIn)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_StringNotInAdvancedFilter_STATUS() to populate field StringNotIn")
		}
		filter.StringNotIn = &stringNotIn
	} else {
		filter.StringNotIn = nil
	}

	// No error
	return nil
}

type AdvancedFilter_STATUS struct {
	// BoolEquals: Mutually exclusive with all other properties
	BoolEquals *BoolEqualsAdvancedFilter_STATUS `json:"boolEquals,omitempty"`

	// NumberGreaterThan: Mutually exclusive with all other properties
	NumberGreaterThan *NumberGreaterThanAdvancedFilter_STATUS `json:"numberGreaterThan,omitempty"`

	// NumberGreaterThanOrEquals: Mutually exclusive with all other properties
	NumberGreaterThanOrEquals *NumberGreaterThanOrEqualsAdvancedFilter_STATUS `json:"numberGreaterThanOrEquals,omitempty"`

	// NumberIn: Mutually exclusive with all other properties
	NumberIn *NumberInAdvancedFilter_STATUS `json:"numberIn,omitempty"`

	// NumberLessThan: Mutually exclusive with all other properties
	NumberLessThan *NumberLessThanAdvancedFilter_STATUS `json:"numberLessThan,omitempty"`

	// NumberLessThanOrEquals: Mutually exclusive with all other properties
	NumberLessThanOrEquals *NumberLessThanOrEqualsAdvancedFilter_STATUS `json:"numberLessThanOrEquals,omitempty"`

	// NumberNotIn: Mutually exclusive with all other properties
	NumberNotIn *NumberNotInAdvancedFilter_STATUS `json:"numberNotIn,omitempty"`

	// StringBeginsWith: Mutually exclusive with all other properties
	StringBeginsWith *StringBeginsWithAdvancedFilter_STATUS `json:"stringBeginsWith,omitempty"`

	// StringContains: Mutually exclusive with all other properties
	StringContains *StringContainsAdvancedFilter_STATUS `json:"stringContains,omitempty"`

	// StringEndsWith: Mutually exclusive with all other properties
	StringEndsWith *StringEndsWithAdvancedFilter_STATUS `json:"stringEndsWith,omitempty"`

	// StringIn: Mutually exclusive with all other properties
	StringIn *StringInAdvancedFilter_STATUS `json:"stringIn,omitempty"`

	// StringNotIn: Mutually exclusive with all other properties
	StringNotIn *StringNotInAdvancedFilter_STATUS `json:"stringNotIn,omitempty"`
}

var _ genruntime.FromARMConverter = &AdvancedFilter_STATUS{}

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

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

	// Set property "BoolEquals":
	if typedInput.BoolEquals != nil {
		var boolEquals1 BoolEqualsAdvancedFilter_STATUS
		err := boolEquals1.PopulateFromARM(owner, *typedInput.BoolEquals)
		if err != nil {
			return err
		}
		boolEquals := boolEquals1
		filter.BoolEquals = &boolEquals
	}

	// Set property "NumberGreaterThan":
	if typedInput.NumberGreaterThan != nil {
		var numberGreaterThan1 NumberGreaterThanAdvancedFilter_STATUS
		err := numberGreaterThan1.PopulateFromARM(owner, *typedInput.NumberGreaterThan)
		if err != nil {
			return err
		}
		numberGreaterThan := numberGreaterThan1
		filter.NumberGreaterThan = &numberGreaterThan
	}

	// Set property "NumberGreaterThanOrEquals":
	if typedInput.NumberGreaterThanOrEquals != nil {
		var numberGreaterThanOrEquals1 NumberGreaterThanOrEqualsAdvancedFilter_STATUS
		err := numberGreaterThanOrEquals1.PopulateFromARM(owner, *typedInput.NumberGreaterThanOrEquals)
		if err != nil {
			return err
		}
		numberGreaterThanOrEquals := numberGreaterThanOrEquals1
		filter.NumberGreaterThanOrEquals = &numberGreaterThanOrEquals
	}

	// Set property "NumberIn":
	if typedInput.NumberIn != nil {
		var numberIn1 NumberInAdvancedFilter_STATUS
		err := numberIn1.PopulateFromARM(owner, *typedInput.NumberIn)
		if err != nil {
			return err
		}
		numberIn := numberIn1
		filter.NumberIn = &numberIn
	}

	// Set property "NumberLessThan":
	if typedInput.NumberLessThan != nil {
		var numberLessThan1 NumberLessThanAdvancedFilter_STATUS
		err := numberLessThan1.PopulateFromARM(owner, *typedInput.NumberLessThan)
		if err != nil {
			return err
		}
		numberLessThan := numberLessThan1
		filter.NumberLessThan = &numberLessThan
	}

	// Set property "NumberLessThanOrEquals":
	if typedInput.NumberLessThanOrEquals != nil {
		var numberLessThanOrEquals1 NumberLessThanOrEqualsAdvancedFilter_STATUS
		err := numberLessThanOrEquals1.PopulateFromARM(owner, *typedInput.NumberLessThanOrEquals)
		if err != nil {
			return err
		}
		numberLessThanOrEquals := numberLessThanOrEquals1
		filter.NumberLessThanOrEquals = &numberLessThanOrEquals
	}

	// Set property "NumberNotIn":
	if typedInput.NumberNotIn != nil {
		var numberNotIn1 NumberNotInAdvancedFilter_STATUS
		err := numberNotIn1.PopulateFromARM(owner, *typedInput.NumberNotIn)
		if err != nil {
			return err
		}
		numberNotIn := numberNotIn1
		filter.NumberNotIn = &numberNotIn
	}

	// Set property "StringBeginsWith":
	if typedInput.StringBeginsWith != nil {
		var stringBeginsWith1 StringBeginsWithAdvancedFilter_STATUS
		err := stringBeginsWith1.PopulateFromARM(owner, *typedInput.StringBeginsWith)
		if err != nil {
			return err
		}
		stringBeginsWith := stringBeginsWith1
		filter.StringBeginsWith = &stringBeginsWith
	}

	// Set property "StringContains":
	if typedInput.StringContains != nil {
		var stringContains1 StringContainsAdvancedFilter_STATUS
		err := stringContains1.PopulateFromARM(owner, *typedInput.StringContains)
		if err != nil {
			return err
		}
		stringContains := stringContains1
		filter.StringContains = &stringContains
	}

	// Set property "StringEndsWith":
	if typedInput.StringEndsWith != nil {
		var stringEndsWith1 StringEndsWithAdvancedFilter_STATUS
		err := stringEndsWith1.PopulateFromARM(owner, *typedInput.StringEndsWith)
		if err != nil {
			return err
		}
		stringEndsWith := stringEndsWith1
		filter.StringEndsWith = &stringEndsWith
	}

	// Set property "StringIn":
	if typedInput.StringIn != nil {
		var stringIn1 StringInAdvancedFilter_STATUS
		err := stringIn1.PopulateFromARM(owner, *typedInput.StringIn)
		if err != nil {
			return err
		}
		stringIn := stringIn1
		filter.StringIn = &stringIn
	}

	// Set property "StringNotIn":
	if typedInput.StringNotIn != nil {
		var stringNotIn1 StringNotInAdvancedFilter_STATUS
		err := stringNotIn1.PopulateFromARM(owner, *typedInput.StringNotIn)
		if err != nil {
			return err
		}
		stringNotIn := stringNotIn1
		filter.StringNotIn = &stringNotIn
	}

	// No error
	return nil
}

// AssignProperties_From_AdvancedFilter_STATUS populates our AdvancedFilter_STATUS from the provided source AdvancedFilter_STATUS
func (filter *AdvancedFilter_STATUS) AssignProperties_From_AdvancedFilter_STATUS(source *storage.AdvancedFilter_STATUS) error {

	// BoolEquals
	if source.BoolEquals != nil {
		var boolEqual BoolEqualsAdvancedFilter_STATUS
		err := boolEqual.AssignProperties_From_BoolEqualsAdvancedFilter_STATUS(source.BoolEquals)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_BoolEqualsAdvancedFilter_STATUS() to populate field BoolEquals")
		}
		filter.BoolEquals = &boolEqual
	} else {
		filter.BoolEquals = nil
	}

	// NumberGreaterThan
	if source.NumberGreaterThan != nil {
		var numberGreaterThan NumberGreaterThanAdvancedFilter_STATUS
		err := numberGreaterThan.AssignProperties_From_NumberGreaterThanAdvancedFilter_STATUS(source.NumberGreaterThan)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NumberGreaterThanAdvancedFilter_STATUS() to populate field NumberGreaterThan")
		}
		filter.NumberGreaterThan = &numberGreaterThan
	} else {
		filter.NumberGreaterThan = nil
	}

	// NumberGreaterThanOrEquals
	if source.NumberGreaterThanOrEquals != nil {
		var numberGreaterThanOrEqual NumberGreaterThanOrEqualsAdvancedFilter_STATUS
		err := numberGreaterThanOrEqual.AssignProperties_From_NumberGreaterThanOrEqualsAdvancedFilter_STATUS(source.NumberGreaterThanOrEquals)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NumberGreaterThanOrEqualsAdvancedFilter_STATUS() to populate field NumberGreaterThanOrEquals")
		}
		filter.NumberGreaterThanOrEquals = &numberGreaterThanOrEqual
	} else {
		filter.NumberGreaterThanOrEquals = nil
	}

	// NumberIn
	if source.NumberIn != nil {
		var numberIn NumberInAdvancedFilter_STATUS
		err := numberIn.AssignProperties_From_NumberInAdvancedFilter_STATUS(source.NumberIn)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NumberInAdvancedFilter_STATUS() to populate field NumberIn")
		}
		filter.NumberIn = &numberIn
	} else {
		filter.NumberIn = nil
	}

	// NumberLessThan
	if source.NumberLessThan != nil {
		var numberLessThan NumberLessThanAdvancedFilter_STATUS
		err := numberLessThan.AssignProperties_From_NumberLessThanAdvancedFilter_STATUS(source.NumberLessThan)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NumberLessThanAdvancedFilter_STATUS() to populate field NumberLessThan")
		}
		filter.NumberLessThan = &numberLessThan
	} else {
		filter.NumberLessThan = nil
	}

	// NumberLessThanOrEquals
	if source.NumberLessThanOrEquals != nil {
		var numberLessThanOrEqual NumberLessThanOrEqualsAdvancedFilter_STATUS
		err := numberLessThanOrEqual.AssignProperties_From_NumberLessThanOrEqualsAdvancedFilter_STATUS(source.NumberLessThanOrEquals)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NumberLessThanOrEqualsAdvancedFilter_STATUS() to populate field NumberLessThanOrEquals")
		}
		filter.NumberLessThanOrEquals = &numberLessThanOrEqual
	} else {
		filter.NumberLessThanOrEquals = nil
	}

	// NumberNotIn
	if source.NumberNotIn != nil {
		var numberNotIn NumberNotInAdvancedFilter_STATUS
		err := numberNotIn.AssignProperties_From_NumberNotInAdvancedFilter_STATUS(source.NumberNotIn)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NumberNotInAdvancedFilter_STATUS() to populate field NumberNotIn")
		}
		filter.NumberNotIn = &numberNotIn
	} else {
		filter.NumberNotIn = nil
	}

	// StringBeginsWith
	if source.StringBeginsWith != nil {
		var stringBeginsWith StringBeginsWithAdvancedFilter_STATUS
		err := stringBeginsWith.AssignProperties_From_StringBeginsWithAdvancedFilter_STATUS(source.StringBeginsWith)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StringBeginsWithAdvancedFilter_STATUS() to populate field StringBeginsWith")
		}
		filter.StringBeginsWith = &stringBeginsWith
	} else {
		filter.StringBeginsWith = nil
	}

	// StringContains
	if source.StringContains != nil {
		var stringContain StringContainsAdvancedFilter_STATUS
		err := stringContain.AssignProperties_From_StringContainsAdvancedFilter_STATUS(source.StringContains)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StringContainsAdvancedFilter_STATUS() to populate field StringContains")
		}
		filter.StringContains = &stringContain
	} else {
		filter.StringContains = nil
	}

	// StringEndsWith
	if source.StringEndsWith != nil {
		var stringEndsWith StringEndsWithAdvancedFilter_STATUS
		err := stringEndsWith.AssignProperties_From_StringEndsWithAdvancedFilter_STATUS(source.StringEndsWith)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StringEndsWithAdvancedFilter_STATUS() to populate field StringEndsWith")
		}
		filter.StringEndsWith = &stringEndsWith
	} else {
		filter.StringEndsWith = nil
	}

	// StringIn
	if source.StringIn != nil {
		var stringIn StringInAdvancedFilter_STATUS
		err := stringIn.AssignProperties_From_StringInAdvancedFilter_STATUS(source.StringIn)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StringInAdvancedFilter_STATUS() to populate field StringIn")
		}
		filter.StringIn = &stringIn
	} else {
		filter.StringIn = nil
	}

	// StringNotIn
	if source.StringNotIn != nil {
		var stringNotIn StringNotInAdvancedFilter_STATUS
		err := stringNotIn.AssignProperties_From_StringNotInAdvancedFilter_STATUS(source.StringNotIn)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_StringNotInAdvancedFilter_STATUS() to populate field StringNotIn")
		}
		filter.StringNotIn = &stringNotIn
	} else {
		filter.StringNotIn = nil
	}

	// No error
	return nil
}

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

	// BoolEquals
	if filter.BoolEquals != nil {
		var boolEqual storage.BoolEqualsAdvancedFilter_STATUS
		err := filter.BoolEquals.AssignProperties_To_BoolEqualsAdvancedFilter_STATUS(&boolEqual)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_BoolEqualsAdvancedFilter_STATUS() to populate field BoolEquals")
		}
		destination.BoolEquals = &boolEqual
	} else {
		destination.BoolEquals = nil
	}

	// NumberGreaterThan
	if filter.NumberGreaterThan != nil {
		var numberGreaterThan storage.NumberGreaterThanAdvancedFilter_STATUS
		err := filter.NumberGreaterThan.AssignProperties_To_NumberGreaterThanAdvancedFilter_STATUS(&numberGreaterThan)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NumberGreaterThanAdvancedFilter_STATUS() to populate field NumberGreaterThan")
		}
		destination.NumberGreaterThan = &numberGreaterThan
	} else {
		destination.NumberGreaterThan = nil
	}

	// NumberGreaterThanOrEquals
	if filter.NumberGreaterThanOrEquals != nil {
		var numberGreaterThanOrEqual storage.NumberGreaterThanOrEqualsAdvancedFilter_STATUS
		err := filter.NumberGreaterThanOrEquals.AssignProperties_To_NumberGreaterThanOrEqualsAdvancedFilter_STATUS(&numberGreaterThanOrEqual)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NumberGreaterThanOrEqualsAdvancedFilter_STATUS() to populate field NumberGreaterThanOrEquals")
		}
		destination.NumberGreaterThanOrEquals = &numberGreaterThanOrEqual
	} else {
		destination.NumberGreaterThanOrEquals = nil
	}

	// NumberIn
	if filter.NumberIn != nil {
		var numberIn storage.NumberInAdvancedFilter_STATUS
		err := filter.NumberIn.AssignProperties_To_NumberInAdvancedFilter_STATUS(&numberIn)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NumberInAdvancedFilter_STATUS() to populate field NumberIn")
		}
		destination.NumberIn = &numberIn
	} else {
		destination.NumberIn = nil
	}

	// NumberLessThan
	if filter.NumberLessThan != nil {
		var numberLessThan storage.NumberLessThanAdvancedFilter_STATUS
		err := filter.NumberLessThan.AssignProperties_To_NumberLessThanAdvancedFilter_STATUS(&numberLessThan)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NumberLessThanAdvancedFilter_STATUS() to populate field NumberLessThan")
		}
		destination.NumberLessThan = &numberLessThan
	} else {
		destination.NumberLessThan = nil
	}

	// NumberLessThanOrEquals
	if filter.NumberLessThanOrEquals != nil {
		var numberLessThanOrEqual storage.NumberLessThanOrEqualsAdvancedFilter_STATUS
		err := filter.NumberLessThanOrEquals.AssignProperties_To_NumberLessThanOrEqualsAdvancedFilter_STATUS(&numberLessThanOrEqual)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NumberLessThanOrEqualsAdvancedFilter_STATUS() to populate field NumberLessThanOrEquals")
		}
		destination.NumberLessThanOrEquals = &numberLessThanOrEqual
	} else {
		destination.NumberLessThanOrEquals = nil
	}

	// NumberNotIn
	if filter.NumberNotIn != nil {
		var numberNotIn storage.NumberNotInAdvancedFilter_STATUS
		err := filter.NumberNotIn.AssignProperties_To_NumberNotInAdvancedFilter_STATUS(&numberNotIn)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NumberNotInAdvancedFilter_STATUS() to populate field NumberNotIn")
		}
		destination.NumberNotIn = &numberNotIn
	} else {
		destination.NumberNotIn = nil
	}

	// StringBeginsWith
	if filter.StringBeginsWith != nil {
		var stringBeginsWith storage.StringBeginsWithAdvancedFilter_STATUS
		err := filter.StringBeginsWith.AssignProperties_To_StringBeginsWithAdvancedFilter_STATUS(&stringBeginsWith)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StringBeginsWithAdvancedFilter_STATUS() to populate field StringBeginsWith")
		}
		destination.StringBeginsWith = &stringBeginsWith
	} else {
		destination.StringBeginsWith = nil
	}

	// StringContains
	if filter.StringContains != nil {
		var stringContain storage.StringContainsAdvancedFilter_STATUS
		err := filter.StringContains.AssignProperties_To_StringContainsAdvancedFilter_STATUS(&stringContain)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StringContainsAdvancedFilter_STATUS() to populate field StringContains")
		}
		destination.StringContains = &stringContain
	} else {
		destination.StringContains = nil
	}

	// StringEndsWith
	if filter.StringEndsWith != nil {
		var stringEndsWith storage.StringEndsWithAdvancedFilter_STATUS
		err := filter.StringEndsWith.AssignProperties_To_StringEndsWithAdvancedFilter_STATUS(&stringEndsWith)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StringEndsWithAdvancedFilter_STATUS() to populate field StringEndsWith")
		}
		destination.StringEndsWith = &stringEndsWith
	} else {
		destination.StringEndsWith = nil
	}

	// StringIn
	if filter.StringIn != nil {
		var stringIn storage.StringInAdvancedFilter_STATUS
		err := filter.StringIn.AssignProperties_To_StringInAdvancedFilter_STATUS(&stringIn)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StringInAdvancedFilter_STATUS() to populate field StringIn")
		}
		destination.StringIn = &stringIn
	} else {
		destination.StringIn = nil
	}

	// StringNotIn
	if filter.StringNotIn != nil {
		var stringNotIn storage.StringNotInAdvancedFilter_STATUS
		err := filter.StringNotIn.AssignProperties_To_StringNotInAdvancedFilter_STATUS(&stringNotIn)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_StringNotInAdvancedFilter_STATUS() to populate field StringNotIn")
		}
		destination.StringNotIn = &stringNotIn
	} else {
		destination.StringNotIn = nil
	}

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

	// No error
	return nil
}

type AzureFunctionEventSubscriptionDestination struct {
	// +kubebuilder:validation:Required
	// EndpointType: Type of the endpoint for the event subscription destination.
	EndpointType *AzureFunctionEventSubscriptionDestination_EndpointType `json:"endpointType,omitempty"`

	// MaxEventsPerBatch: Maximum number of events per batch.
	MaxEventsPerBatch *int `json:"maxEventsPerBatch,omitempty"`

	// PreferredBatchSizeInKilobytes: Preferred batch size in Kilobytes.
	PreferredBatchSizeInKilobytes *int `json:"preferredBatchSizeInKilobytes,omitempty"`

	// ResourceReference: The Azure Resource Id that represents the endpoint of the Azure Function destination of an event
	// subscription.
	ResourceReference *genruntime.ResourceReference `armReference:"ResourceId" json:"resourceReference,omitempty"`
}

var _ genruntime.ARMTransformer = &AzureFunctionEventSubscriptionDestination{}

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

	// Set property "EndpointType":
	if destination.EndpointType != nil {
		var temp arm.AzureFunctionEventSubscriptionDestination_EndpointType
		var temp1 string
		temp1 = string(*destination.EndpointType)
		temp = arm.AzureFunctionEventSubscriptionDestination_EndpointType(temp1)
		result.EndpointType = temp
	}

	// Set property "Properties":
	if destination.MaxEventsPerBatch != nil ||
		destination.PreferredBatchSizeInKilobytes != nil ||
		destination.ResourceReference != nil {
		result.Properties = &arm.AzureFunctionEventSubscriptionDestinationProperties{}
	}
	if destination.MaxEventsPerBatch != nil {
		maxEventsPerBatch := *destination.MaxEventsPerBatch
		result.Properties.MaxEventsPerBatch = &maxEventsPerBatch
	}
	if destination.PreferredBatchSizeInKilobytes != nil {
		preferredBatchSizeInKilobytes := *destination.PreferredBatchSizeInKilobytes
		result.Properties.PreferredBatchSizeInKilobytes = &preferredBatchSizeInKilobytes
	}
	if destination.ResourceReference != nil {
		resourceIdARMID, err := resolved.ResolvedReferences.Lookup(*destination.ResourceReference)
		if err != nil {
			return nil, err
		}
		resourceId := resourceIdARMID
		result.Properties.ResourceId = &resourceId
	}
	return result, nil
}

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

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

	// Set property "EndpointType":
	var temp AzureFunctionEventSubscriptionDestination_EndpointType
	var temp1 string
	temp1 = string(typedInput.EndpointType)
	temp = AzureFunctionEventSubscriptionDestination_EndpointType(temp1)
	destination.EndpointType = &temp

	// Set property "MaxEventsPerBatch":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.MaxEventsPerBatch != nil {
			maxEventsPerBatch := *typedInput.Properties.MaxEventsPerBatch
			destination.MaxEventsPerBatch = &maxEventsPerBatch
		}
	}

	// Set property "PreferredBatchSizeInKilobytes":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PreferredBatchSizeInKilobytes != nil {
			preferredBatchSizeInKilobytes := *typedInput.Properties.PreferredBatchSizeInKilobytes
			destination.PreferredBatchSizeInKilobytes = &preferredBatchSizeInKilobytes
		}
	}

	// no assignment for property "ResourceReference"

	// No error
	return nil
}

// AssignProperties_From_AzureFunctionEventSubscriptionDestination populates our AzureFunctionEventSubscriptionDestination from the provided source AzureFunctionEventSubscriptionDestination
func (destination *AzureFunctionEventSubscriptionDestination) AssignProperties_From_AzureFunctionEventSubscriptionDestination(source *storage.AzureFunctionEventSubscriptionDestination) error {

	// EndpointType
	if source.EndpointType != nil {
		endpointType := *source.EndpointType
		endpointTypeTemp := genruntime.ToEnum(endpointType, azureFunctionEventSubscriptionDestination_EndpointType_Values)
		destination.EndpointType = &endpointTypeTemp
	} else {
		destination.EndpointType = nil
	}

	// MaxEventsPerBatch
	destination.MaxEventsPerBatch = genruntime.ClonePointerToInt(source.MaxEventsPerBatch)

	// PreferredBatchSizeInKilobytes
	destination.PreferredBatchSizeInKilobytes = genruntime.ClonePointerToInt(source.PreferredBatchSizeInKilobytes)

	// ResourceReference
	if source.ResourceReference != nil {
		resourceReference := source.ResourceReference.Copy()
		destination.ResourceReference = &resourceReference
	} else {
		destination.ResourceReference = nil
	}

	// No error
	return nil
}

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

	// EndpointType
	if destination.EndpointType != nil {
		endpointType := string(*destination.EndpointType)
		target.EndpointType = &endpointType
	} else {
		target.EndpointType = nil
	}

	// MaxEventsPerBatch
	target.MaxEventsPerBatch = genruntime.ClonePointerToInt(destination.MaxEventsPerBatch)

	// PreferredBatchSizeInKilobytes
	target.PreferredBatchSizeInKilobytes = genruntime.ClonePointerToInt(destination.PreferredBatchSizeInKilobytes)

	// ResourceReference
	if destination.ResourceReference != nil {
		resourceReference := destination.ResourceReference.Copy()
		target.ResourceReference = &resourceReference
	} else {
		target.ResourceReference = nil
	}

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

	// No error
	return nil
}

// Initialize_From_AzureFunctionEventSubscriptionDestination_STATUS populates our AzureFunctionEventSubscriptionDestination from the provided source AzureFunctionEventSubscriptionDestination_STATUS
func (destination *AzureFunctionEventSubscriptionDestination) Initialize_From_AzureFunctionEventSubscriptionDestination_STATUS(source *AzureFunctionEventSubscriptionDestination_STATUS) error {

	// EndpointType
	if source.EndpointType != nil {
		endpointType := genruntime.ToEnum(string(*source.EndpointType), azureFunctionEventSubscriptionDestination_EndpointType_Values)
		destination.EndpointType = &endpointType
	} else {
		destination.EndpointType = nil
	}

	// MaxEventsPerBatch
	destination.MaxEventsPerBatch = genruntime.ClonePointerToInt(source.MaxEventsPerBatch)

	// PreferredBatchSizeInKilobytes
	destination.PreferredBatchSizeInKilobytes = genruntime.ClonePointerToInt(source.PreferredBatchSizeInKilobytes)

	// ResourceReference
	if source.ResourceId != nil {
		resourceReference := genruntime.CreateResourceReferenceFromARMID(*source.ResourceId)
		destination.ResourceReference = &resourceReference
	} else {
		destination.ResourceReference = nil
	}

	// No error
	return nil
}

type AzureFunctionEventSubscriptionDestination_STATUS struct {
	// EndpointType: Type of the endpoint for the event subscription destination.
	EndpointType *AzureFunctionEventSubscriptionDestination_EndpointType_STATUS `json:"endpointType,omitempty"`

	// MaxEventsPerBatch: Maximum number of events per batch.
	MaxEventsPerBatch *int `json:"maxEventsPerBatch,omitempty"`

	// PreferredBatchSizeInKilobytes: Preferred batch size in Kilobytes.
	PreferredBatchSizeInKilobytes *int `json:"preferredBatchSizeInKilobytes,omitempty"`

	// ResourceId: The Azure Resource Id that represents the endpoint of the Azure Function destination of an event
	// subscription.
	ResourceId *string `json:"resourceId,omitempty"`
}

var _ genruntime.FromARMConverter = &AzureFunctionEventSubscriptionDestination_STATUS{}

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

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

	// Set property "EndpointType":
	var temp AzureFunctionEventSubscriptionDestination_EndpointType_STATUS
	var temp1 string
	temp1 = string(typedInput.EndpointType)
	temp = AzureFunctionEventSubscriptionDestination_EndpointType_STATUS(temp1)
	destination.EndpointType = &temp

	// Set property "MaxEventsPerBatch":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.MaxEventsPerBatch != nil {
			maxEventsPerBatch := *typedInput.Properties.MaxEventsPerBatch
			destination.MaxEventsPerBatch = &maxEventsPerBatch
		}
	}

	// Set property "PreferredBatchSizeInKilobytes":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PreferredBatchSizeInKilobytes != nil {
			preferredBatchSizeInKilobytes := *typedInput.Properties.PreferredBatchSizeInKilobytes
			destination.PreferredBatchSizeInKilobytes = &preferredBatchSizeInKilobytes
		}
	}

	// Set property "ResourceId":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ResourceId != nil {
			resourceId := *typedInput.Properties.ResourceId
			destination.ResourceId = &resourceId
		}
	}

	// No error
	return nil
}

// AssignProperties_From_AzureFunctionEventSubscriptionDestination_STATUS populates our AzureFunctionEventSubscriptionDestination_STATUS from the provided source AzureFunctionEventSubscriptionDestination_STATUS
func (destination *AzureFunctionEventSubscriptionDestination_STATUS) AssignProperties_From_AzureFunctionEventSubscriptionDestination_STATUS(source *storage.AzureFunctionEventSubscriptionDestination_STATUS) error {

	// EndpointType
	if source.EndpointType != nil {
		endpointType := *source.EndpointType
		endpointTypeTemp := genruntime.ToEnum(endpointType, azureFunctionEventSubscriptionDestination_EndpointType_STATUS_Values)
		destination.EndpointType = &endpointTypeTemp
	} else {
		destination.EndpointType = nil
	}

	// MaxEventsPerBatch
	destination.MaxEventsPerBatch = genruntime.ClonePointerToInt(source.MaxEventsPerBatch)

	// PreferredBatchSizeInKilobytes
	destination.PreferredBatchSizeInKilobytes = genruntime.ClonePointerToInt(source.PreferredBatchSizeInKilobytes)

	// ResourceId
	destination.ResourceId = genruntime.ClonePointerToString(source.ResourceId)

	// No error
	return nil
}

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

	// EndpointType
	if destination.EndpointType != nil {
		endpointType := string(*destination.EndpointType)
		target.EndpointType = &endpointType
	} else {
		target.EndpointType = nil
	}

	// MaxEventsPerBatch
	target.MaxEventsPerBatch = genruntime.ClonePointerToInt(destination.MaxEventsPerBatch)

	// PreferredBatchSizeInKilobytes
	target.PreferredBatchSizeInKilobytes = genruntime.ClonePointerToInt(destination.PreferredBatchSizeInKilobytes)

	// ResourceId
	target.ResourceId = genruntime.ClonePointerToString(destination.ResourceId)

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

	// No error
	return nil
}

type EventHubEventSubscriptionDestination struct {
	// +kubebuilder:validation:Required
	// EndpointType: Type of the endpoint for the event subscription destination.
	EndpointType *EventHubEventSubscriptionDestination_EndpointType `json:"endpointType,omitempty"`

	// ResourceReference: The Azure Resource Id that represents the endpoint of an Event Hub destination of an event
	// subscription.
	ResourceReference *genruntime.ResourceReference `armReference:"ResourceId" json:"resourceReference,omitempty"`
}

var _ genruntime.ARMTransformer = &EventHubEventSubscriptionDestination{}

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

	// Set property "EndpointType":
	if destination.EndpointType != nil {
		var temp arm.EventHubEventSubscriptionDestination_EndpointType
		var temp1 string
		temp1 = string(*destination.EndpointType)
		temp = arm.EventHubEventSubscriptionDestination_EndpointType(temp1)
		result.EndpointType = temp
	}

	// Set property "Properties":
	if destination.ResourceReference != nil {
		result.Properties = &arm.EventHubEventSubscriptionDestinationProperties{}
	}
	if destination.ResourceReference != nil {
		resourceIdARMID, err := resolved.ResolvedReferences.Lookup(*destination.ResourceReference)
		if err != nil {
			return nil, err
		}
		resourceId := resourceIdARMID
		result.Properties.ResourceId = &resourceId
	}
	return result, nil
}

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

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

	// Set property "EndpointType":
	var temp EventHubEventSubscriptionDestination_EndpointType
	var temp1 string
	temp1 = string(typedInput.EndpointType)
	temp = EventHubEventSubscriptionDestination_EndpointType(temp1)
	destination.EndpointType = &temp

	// no assignment for property "ResourceReference"

	// No error
	return nil
}

// AssignProperties_From_EventHubEventSubscriptionDestination populates our EventHubEventSubscriptionDestination from the provided source EventHubEventSubscriptionDestination
func (destination *EventHubEventSubscriptionDestination) AssignProperties_From_EventHubEventSubscriptionDestination(source *storage.EventHubEventSubscriptionDestination) error {

	// EndpointType
	if source.EndpointType != nil {
		endpointType := *source.EndpointType
		endpointTypeTemp := genruntime.ToEnum(endpointType, eventHubEventSubscriptionDestination_EndpointType_Values)
		destination.EndpointType = &endpointTypeTemp
	} else {
		destination.EndpointType = nil
	}

	// ResourceReference
	if source.ResourceReference != nil {
		resourceReference := source.ResourceReference.Copy()
		destination.ResourceReference = &resourceReference
	} else {
		destination.ResourceReference = nil
	}

	// No error
	return nil
}

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

	// EndpointType
	if destination.EndpointType != nil {
		endpointType := string(*destination.EndpointType)
		target.EndpointType = &endpointType
	} else {
		target.EndpointType = nil
	}

	// ResourceReference
	if destination.ResourceReference != nil {
		resourceReference := destination.ResourceReference.Copy()
		target.ResourceReference = &resourceReference
	} else {
		target.ResourceReference = nil
	}

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

	// No error
	return nil
}

// Initialize_From_EventHubEventSubscriptionDestination_STATUS populates our EventHubEventSubscriptionDestination from the provided source EventHubEventSubscriptionDestination_STATUS
func (destination *EventHubEventSubscriptionDestination) Initialize_From_EventHubEventSubscriptionDestination_STATUS(source *EventHubEventSubscriptionDestination_STATUS) error {

	// EndpointType
	if source.EndpointType != nil {
		endpointType := genruntime.ToEnum(string(*source.EndpointType), eventHubEventSubscriptionDestination_EndpointType_Values)
		destination.EndpointType = &endpointType
	} else {
		destination.EndpointType = nil
	}

	// ResourceReference
	if source.ResourceId != nil {
		resourceReference := genruntime.CreateResourceReferenceFromARMID(*source.ResourceId)
		destination.ResourceReference = &resourceReference
	} else {
		destination.ResourceReference = nil
	}

	// No error
	return nil
}

type EventHubEventSubscriptionDestination_STATUS struct {
	// EndpointType: Type of the endpoint for the event subscription destination.
	EndpointType *EventHubEventSubscriptionDestination_EndpointType_STATUS `json:"endpointType,omitempty"`

	// ResourceId: The Azure Resource Id that represents the endpoint of an Event Hub destination of an event subscription.
	ResourceId *string `json:"resourceId,omitempty"`
}

var _ genruntime.FromARMConverter = &EventHubEventSubscriptionDestination_STATUS{}

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

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

	// Set property "EndpointType":
	var temp EventHubEventSubscriptionDestination_EndpointType_STATUS
	var temp1 string
	temp1 = string(typedInput.EndpointType)
	temp = EventHubEventSubscriptionDestination_EndpointType_STATUS(temp1)
	destination.EndpointType = &temp

	// Set property "ResourceId":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ResourceId != nil {
			resourceId := *typedInput.Properties.ResourceId
			destination.ResourceId = &resourceId
		}
	}

	// No error
	return nil
}

// AssignProperties_From_EventHubEventSubscriptionDestination_STATUS populates our EventHubEventSubscriptionDestination_STATUS from the provided source EventHubEventSubscriptionDestination_STATUS
func (destination *EventHubEventSubscriptionDestination_STATUS) AssignProperties_From_EventHubEventSubscriptionDestination_STATUS(source *storage.EventHubEventSubscriptionDestination_STATUS) error {

	// EndpointType
	if source.EndpointType != nil {
		endpointType := *source.EndpointType
		endpointTypeTemp := genruntime.ToEnum(endpointType, eventHubEventSubscriptionDestination_EndpointType_STATUS_Values)
		destination.EndpointType = &endpointTypeTemp
	} else {
		destination.EndpointType = nil
	}

	// ResourceId
	destination.ResourceId = genruntime.ClonePointerToString(source.ResourceId)

	// No error
	return nil
}

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

	// EndpointType
	if destination.EndpointType != nil {
		endpointType := string(*destination.EndpointType)
		target.EndpointType = &endpointType
	} else {
		target.EndpointType = nil
	}

	// ResourceId
	target.ResourceId = genruntime.ClonePointerToString(destination.ResourceId)

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

	// No error
	return nil
}

type HybridConnectionEventSubscriptionDestination struct {
	// +kubebuilder:validation:Required
	// EndpointType: Type of the endpoint for the event subscription destination.
	EndpointType *HybridConnectionEventSubscriptionDestination_EndpointType `json:"endpointType,omitempty"`

	// ResourceReference: The Azure Resource ID of an hybrid connection that is the destination of an event subscription.
	ResourceReference *genruntime.ResourceReference `armReference:"ResourceId" json:"resourceReference,omitempty"`
}

var _ genruntime.ARMTransformer = &HybridConnectionEventSubscriptionDestination{}

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

	// Set property "EndpointType":
	if destination.EndpointType != nil {
		var temp arm.HybridConnectionEventSubscriptionDestination_EndpointType
		var temp1 string
		temp1 = string(*destination.EndpointType)
		temp = arm.HybridConnectionEventSubscriptionDestination_EndpointType(temp1)
		result.EndpointType = temp
	}

	// Set property "Properties":
	if destination.ResourceReference != nil {
		result.Properties = &arm.HybridConnectionEventSubscriptionDestinationProperties{}
	}
	if destination.ResourceReference != nil {
		resourceIdARMID, err := resolved.ResolvedReferences.Lookup(*destination.ResourceReference)
		if err != nil {
			return nil, err
		}
		resourceId := resourceIdARMID
		result.Properties.ResourceId = &resourceId
	}
	return result, nil
}

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

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

	// Set property "EndpointType":
	var temp HybridConnectionEventSubscriptionDestination_EndpointType
	var temp1 string
	temp1 = string(typedInput.EndpointType)
	temp = HybridConnectionEventSubscriptionDestination_EndpointType(temp1)
	destination.EndpointType = &temp

	// no assignment for property "ResourceReference"

	// No error
	return nil
}

// AssignProperties_From_HybridConnectionEventSubscriptionDestination populates our HybridConnectionEventSubscriptionDestination from the provided source HybridConnectionEventSubscriptionDestination
func (destination *HybridConnectionEventSubscriptionDestination) AssignProperties_From_HybridConnectionEventSubscriptionDestination(source *storage.HybridConnectionEventSubscriptionDestination) error {

	// EndpointType
	if source.EndpointType != nil {
		endpointType := *source.EndpointType
		endpointTypeTemp := genruntime.ToEnum(endpointType, hybridConnectionEventSubscriptionDestination_EndpointType_Values)
		destination.EndpointType = &endpointTypeTemp
	} else {
		destination.EndpointType = nil
	}

	// ResourceReference
	if source.ResourceReference != nil {
		resourceReference := source.ResourceReference.Copy()
		destination.ResourceReference = &resourceReference
	} else {
		destination.ResourceReference = nil
	}

	// No error
	return nil
}

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

	// EndpointType
	if destination.EndpointType != nil {
		endpointType := string(*destination.EndpointType)
		target.EndpointType = &endpointType
	} else {
		target.EndpointType = nil
	}

	// ResourceReference
	if destination.ResourceReference != nil {
		resourceReference := destination.ResourceReference.Copy()
		target.ResourceReference = &resourceReference
	} else {
		target.ResourceReference = nil
	}

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

	// No error
	return nil
}

// Initialize_From_HybridConnectionEventSubscriptionDestination_STATUS populates our HybridConnectionEventSubscriptionDestination from the provided source HybridConnectionEventSubscriptionDestination_STATUS
func (destination *HybridConnectionEventSubscriptionDestination) Initialize_From_HybridConnectionEventSubscriptionDestination_STATUS(source *HybridConnectionEventSubscriptionDestination_STATUS) error {

	// EndpointType
	if source.EndpointType != nil {
		endpointType := genruntime.ToEnum(string(*source.EndpointType), hybridConnectionEventSubscriptionDestination_EndpointType_Values)
		destination.EndpointType = &endpointType
	} else {
		destination.EndpointType = nil
	}

	// ResourceReference
	if source.ResourceId != nil {
		resourceReference := genruntime.CreateResourceReferenceFromARMID(*source.ResourceId)
		destination.ResourceReference = &resourceReference
	} else {
		destination.ResourceReference = nil
	}

	// No error
	return nil
}

type HybridConnectionEventSubscriptionDestination_STATUS struct {
	// EndpointType: Type of the endpoint for the event subscription destination.
	EndpointType *HybridConnectionEventSubscriptionDestination_EndpointType_STATUS `json:"endpointType,omitempty"`

	// ResourceId: The Azure Resource ID of an hybrid connection that is the destination of an event subscription.
	ResourceId *string `json:"resourceId,omitempty"`
}

var _ genruntime.FromARMConverter = &HybridConnectionEventSubscriptionDestination_STATUS{}

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

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

	// Set property "EndpointType":
	var temp HybridConnectionEventSubscriptionDestination_EndpointType_STATUS
	var temp1 string
	temp1 = string(typedInput.EndpointType)
	temp = HybridConnectionEventSubscriptionDestination_EndpointType_STATUS(temp1)
	destination.EndpointType = &temp

	// Set property "ResourceId":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ResourceId != nil {
			resourceId := *typedInput.Properties.ResourceId
			destination.ResourceId = &resourceId
		}
	}

	// No error
	return nil
}

// AssignProperties_From_HybridConnectionEventSubscriptionDestination_STATUS populates our HybridConnectionEventSubscriptionDestination_STATUS from the provided source HybridConnectionEventSubscriptionDestination_STATUS
func (destination *HybridConnectionEventSubscriptionDestination_STATUS) AssignProperties_From_HybridConnectionEventSubscriptionDestination_STATUS(source *storage.HybridConnectionEventSubscriptionDestination_STATUS) error {

	// EndpointType
	if source.EndpointType != nil {
		endpointType := *source.EndpointType
		endpointTypeTemp := genruntime.ToEnum(endpointType, hybridConnectionEventSubscriptionDestination_EndpointType_STATUS_Values)
		destination.EndpointType = &endpointTypeTemp
	} else {
		destination.EndpointType = nil
	}

	// ResourceId
	destination.ResourceId = genruntime.ClonePointerToString(source.ResourceId)

	// No error
	return nil
}

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

	// EndpointType
	if destination.EndpointType != nil {
		endpointType := string(*destination.EndpointType)
		target.EndpointType = &endpointType
	} else {
		target.EndpointType = nil
	}

	// ResourceId
	target.ResourceId = genruntime.ClonePointerToString(destination.ResourceId)

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

	// No error
	return nil
}

type ServiceBusQueueEventSubscriptionDestination struct {
	// +kubebuilder:validation:Required
	// EndpointType: Type of the endpoint for the event subscription destination.
	EndpointType *ServiceBusQueueEventSubscriptionDestination_EndpointType `json:"endpointType,omitempty"`

	// ResourceReference: The Azure Resource Id that represents the endpoint of the Service Bus destination of an event
	// subscription.
	ResourceReference *genruntime.ResourceReference `armReference:"ResourceId" json:"resourceReference,omitempty"`
}

var _ genruntime.ARMTransformer = &ServiceBusQueueEventSubscriptionDestination{}

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

	// Set property "EndpointType":
	if destination.EndpointType != nil {
		var temp arm.ServiceBusQueueEventSubscriptionDestination_EndpointType
		var temp1 string
		temp1 = string(*destination.EndpointType)
		temp = arm.ServiceBusQueueEventSubscriptionDestination_EndpointType(temp1)
		result.EndpointType = temp
	}

	// Set property "Properties":
	if destination.ResourceReference != nil {
		result.Properties = &arm.ServiceBusQueueEventSubscriptionDestinationProperties{}
	}
	if destination.ResourceReference != nil {
		resourceIdARMID, err := resolved.ResolvedReferences.Lookup(*destination.ResourceReference)
		if err != nil {
			return nil, err
		}
		resourceId := resourceIdARMID
		result.Properties.ResourceId = &resourceId
	}
	return result, nil
}

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

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

	// Set property "EndpointType":
	var temp ServiceBusQueueEventSubscriptionDestination_EndpointType
	var temp1 string
	temp1 = string(typedInput.EndpointType)
	temp = ServiceBusQueueEventSubscriptionDestination_EndpointType(temp1)
	destination.EndpointType = &temp

	// no assignment for property "ResourceReference"

	// No error
	return nil
}

// AssignProperties_From_ServiceBusQueueEventSubscriptionDestination populates our ServiceBusQueueEventSubscriptionDestination from the provided source ServiceBusQueueEventSubscriptionDestination
func (destination *ServiceBusQueueEventSubscriptionDestination) AssignProperties_From_ServiceBusQueueEventSubscriptionDestination(source *storage.ServiceBusQueueEventSubscriptionDestination) error {

	// EndpointType
	if source.EndpointType != nil {
		endpointType := *source.EndpointType
		endpointTypeTemp := genruntime.ToEnum(endpointType, serviceBusQueueEventSubscriptionDestination_EndpointType_Values)
		destination.EndpointType = &endpointTypeTemp
	} else {
		destination.EndpointType = nil
	}

	// ResourceReference
	if source.ResourceReference != nil {
		resourceReference := source.ResourceReference.Copy()
		destination.ResourceReference = &resourceReference
	} else {
		destination.ResourceReference = nil
	}

	// No error
	return nil
}

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

	// EndpointType
	if destination.EndpointType != nil {
		endpointType := string(*destination.EndpointType)
		target.EndpointType = &endpointType
	} else {
		target.EndpointType = nil
	}

	// ResourceReference
	if destination.ResourceReference != nil {
		resourceReference := destination.ResourceReference.Copy()
		target.ResourceReference = &resourceReference
	} else {
		target.ResourceReference = nil
	}

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

	// No error
	return nil
}

// Initialize_From_ServiceBusQueueEventSubscriptionDestination_STATUS populates our ServiceBusQueueEventSubscriptionDestination from the provided source ServiceBusQueueEventSubscriptionDestination_STATUS
func (destination *ServiceBusQueueEventSubscriptionDestination) Initialize_From_ServiceBusQueueEventSubscriptionDestination_STATUS(source *ServiceBusQueueEventSubscriptionDestination_STATUS) error {

	// EndpointType
	if source.EndpointType != nil {
		endpointType := genruntime.ToEnum(string(*source.EndpointType), serviceBusQueueEventSubscriptionDestination_EndpointType_Values)
		destination.EndpointType = &endpointType
	} else {
		destination.EndpointType = nil
	}

	// ResourceReference
	if source.ResourceId != nil {
		resourceReference := genruntime.CreateResourceReferenceFromARMID(*source.ResourceId)
		destination.ResourceReference = &resourceReference
	} else {
		destination.ResourceReference = nil
	}

	// No error
	return nil
}

type ServiceBusQueueEventSubscriptionDestination_STATUS struct {
	// EndpointType: Type of the endpoint for the event subscription destination.
	EndpointType *ServiceBusQueueEventSubscriptionDestination_EndpointType_STATUS `json:"endpointType,omitempty"`

	// ResourceId: The Azure Resource Id that represents the endpoint of the Service Bus destination of an event subscription.
	ResourceId *string `json:"resourceId,omitempty"`
}

var _ genruntime.FromARMConverter = &ServiceBusQueueEventSubscriptionDestination_STATUS{}

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

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

	// Set property "EndpointType":
	var temp ServiceBusQueueEventSubscriptionDestination_EndpointType_STATUS
	var temp1 string
	temp1 = string(typedInput.EndpointType)
	temp = ServiceBusQueueEventSubscriptionDestination_EndpointType_STATUS(temp1)
	destination.EndpointType = &temp

	// Set property "ResourceId":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ResourceId != nil {
			resourceId := *typedInput.Properties.ResourceId
			destination.ResourceId = &resourceId
		}
	}

	// No error
	return nil
}

// AssignProperties_From_ServiceBusQueueEventSubscriptionDestination_STATUS populates our ServiceBusQueueEventSubscriptionDestination_STATUS from the provided source ServiceBusQueueEventSubscriptionDestination_STATUS
func (destination *ServiceBusQueueEventSubscriptionDestination_STATUS) AssignProperties_From_ServiceBusQueueEventSubscriptionDestination_STATUS(source *storage.ServiceBusQueueEventSubscriptionDestination_STATUS) error {

	// EndpointType
	if source.EndpointType != nil {
		endpointType := *source.EndpointType
		endpointTypeTemp := genruntime.ToEnum(endpointType, serviceBusQueueEventSubscriptionDestination_EndpointType_STATUS_Values)
		destination.EndpointType = &endpointTypeTemp
	} else {
		destination.EndpointType = nil
	}

	// ResourceId
	destination.ResourceId = genruntime.ClonePointerToString(source.ResourceId)

	// No error
	return nil
}

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

	// EndpointType
	if destination.EndpointType != nil {
		endpointType := string(*destination.EndpointType)
		target.EndpointType = &endpointType
	} else {
		target.EndpointType = nil
	}

	// ResourceId
	target.ResourceId = genruntime.ClonePointerToString(destination.ResourceId)

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

	// No error
	return nil
}

type ServiceBusTopicEventSubscriptionDestination struct {
	// +kubebuilder:validation:Required
	// EndpointType: Type of the endpoint for the event subscription destination.
	EndpointType *ServiceBusTopicEventSubscriptionDestination_EndpointType `json:"endpointType,omitempty"`

	// ResourceReference: The Azure Resource Id that represents the endpoint of the Service Bus Topic destination of an event
	// subscription.
	ResourceReference *genruntime.ResourceReference `armReference:"ResourceId" json:"resourceReference,omitempty"`
}

var _ genruntime.ARMTransformer = &ServiceBusTopicEventSubscriptionDestination{}

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

	// Set property "EndpointType":
	if destination.EndpointType != nil {
		var temp arm.ServiceBusTopicEventSubscriptionDestination_EndpointType
		var temp1 string
		temp1 = string(*destination.EndpointType)
		temp = arm.ServiceBusTopicEventSubscriptionDestination_EndpointType(temp1)
		result.EndpointType = temp
	}

	// Set property "Properties":
	if destination.ResourceReference != nil {
		result.Properties = &arm.ServiceBusTopicEventSubscriptionDestinationProperties{}
	}
	if destination.ResourceReference != nil {
		resourceIdARMID, err := resolved.ResolvedReferences.Lookup(*destination.ResourceReference)
		if err != nil {
			return nil, err
		}
		resourceId := resourceIdARMID
		result.Properties.ResourceId = &resourceId
	}
	return result, nil
}

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

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

	// Set property "EndpointType":
	var temp ServiceBusTopicEventSubscriptionDestination_EndpointType
	var temp1 string
	temp1 = string(typedInput.EndpointType)
	temp = ServiceBusTopicEventSubscriptionDestination_EndpointType(temp1)
	destination.EndpointType = &temp

	// no assignment for property "ResourceReference"

	// No error
	return nil
}

// AssignProperties_From_ServiceBusTopicEventSubscriptionDestination populates our ServiceBusTopicEventSubscriptionDestination from the provided source ServiceBusTopicEventSubscriptionDestination
func (destination *ServiceBusTopicEventSubscriptionDestination) AssignProperties_From_ServiceBusTopicEventSubscriptionDestination(source *storage.ServiceBusTopicEventSubscriptionDestination) error {

	// EndpointType
	if source.EndpointType != nil {
		endpointType := *source.EndpointType
		endpointTypeTemp := genruntime.ToEnum(endpointType, serviceBusTopicEventSubscriptionDestination_EndpointType_Values)
		destination.EndpointType = &endpointTypeTemp
	} else {
		destination.EndpointType = nil
	}

	// ResourceReference
	if source.ResourceReference != nil {
		resourceReference := source.ResourceReference.Copy()
		destination.ResourceReference = &resourceReference
	} else {
		destination.ResourceReference = nil
	}

	// No error
	return nil
}

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

	// EndpointType
	if destination.EndpointType != nil {
		endpointType := string(*destination.EndpointType)
		target.EndpointType = &endpointType
	} else {
		target.EndpointType = nil
	}

	// ResourceReference
	if destination.ResourceReference != nil {
		resourceReference := destination.ResourceReference.Copy()
		target.ResourceReference = &resourceReference
	} else {
		target.ResourceReference = nil
	}

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

	// No error
	return nil
}

// Initialize_From_ServiceBusTopicEventSubscriptionDestination_STATUS populates our ServiceBusTopicEventSubscriptionDestination from the provided source ServiceBusTopicEventSubscriptionDestination_STATUS
func (destination *ServiceBusTopicEventSubscriptionDestination) Initialize_From_ServiceBusTopicEventSubscriptionDestination_STATUS(source *ServiceBusTopicEventSubscriptionDestination_STATUS) error {

	// EndpointType
	if source.EndpointType != nil {
		endpointType := genruntime.ToEnum(string(*source.EndpointType), serviceBusTopicEventSubscriptionDestination_EndpointType_Values)
		destination.EndpointType = &endpointType
	} else {
		destination.EndpointType = nil
	}

	// ResourceReference
	if source.ResourceId != nil {
		resourceReference := genruntime.CreateResourceReferenceFromARMID(*source.ResourceId)
		destination.ResourceReference = &resourceReference
	} else {
		destination.ResourceReference = nil
	}

	// No error
	return nil
}

type ServiceBusTopicEventSubscriptionDestination_STATUS struct {
	// EndpointType: Type of the endpoint for the event subscription destination.
	EndpointType *ServiceBusTopicEventSubscriptionDestination_EndpointType_STATUS `json:"endpointType,omitempty"`

	// ResourceId: The Azure Resource Id that represents the endpoint of the Service Bus Topic destination of an event
	// subscription.
	ResourceId *string `json:"resourceId,omitempty"`
}

var _ genruntime.FromARMConverter = &ServiceBusTopicEventSubscriptionDestination_STATUS{}

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

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

	// Set property "EndpointType":
	var temp ServiceBusTopicEventSubscriptionDestination_EndpointType_STATUS
	var temp1 string
	temp1 = string(typedInput.EndpointType)
	temp = ServiceBusTopicEventSubscriptionDestination_EndpointType_STATUS(temp1)
	destination.EndpointType = &temp

	// Set property "ResourceId":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ResourceId != nil {
			resourceId := *typedInput.Properties.ResourceId
			destination.ResourceId = &resourceId
		}
	}

	// No error
	return nil
}

// AssignProperties_From_ServiceBusTopicEventSubscriptionDestination_STATUS populates our ServiceBusTopicEventSubscriptionDestination_STATUS from the provided source ServiceBusTopicEventSubscriptionDestination_STATUS
func (destination *ServiceBusTopicEventSubscriptionDestination_STATUS) AssignProperties_From_ServiceBusTopicEventSubscriptionDestination_STATUS(source *storage.ServiceBusTopicEventSubscriptionDestination_STATUS) error {

	// EndpointType
	if source.EndpointType != nil {
		endpointType := *source.EndpointType
		endpointTypeTemp := genruntime.ToEnum(endpointType, serviceBusTopicEventSubscriptionDestination_EndpointType_STATUS_Values)
		destination.EndpointType = &endpointTypeTemp
	} else {
		destination.EndpointType = nil
	}

	// ResourceId
	destination.ResourceId = genruntime.ClonePointerToString(source.ResourceId)

	// No error
	return nil
}

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

	// EndpointType
	if destination.EndpointType != nil {
		endpointType := string(*destination.EndpointType)
		target.EndpointType = &endpointType
	} else {
		target.EndpointType = nil
	}

	// ResourceId
	target.ResourceId = genruntime.ClonePointerToString(destination.ResourceId)

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

	// No error
	return nil
}

type StorageBlobDeadLetterDestination struct {
	// BlobContainerName: The name of the Storage blob container that is the destination of the deadletter events
	BlobContainerName *string `json:"blobContainerName,omitempty"`

	// +kubebuilder:validation:Required
	// EndpointType: Type of the endpoint for the dead letter destination
	EndpointType *StorageBlobDeadLetterDestination_EndpointType `json:"endpointType,omitempty"`

	// ResourceReference: The Azure Resource ID of the storage account that is the destination of the deadletter events
	ResourceReference *genruntime.ResourceReference `armReference:"ResourceId" json:"resourceReference,omitempty"`
}

var _ genruntime.ARMTransformer = &StorageBlobDeadLetterDestination{}

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

	// Set property "EndpointType":
	if destination.EndpointType != nil {
		var temp arm.StorageBlobDeadLetterDestination_EndpointType
		var temp1 string
		temp1 = string(*destination.EndpointType)
		temp = arm.StorageBlobDeadLetterDestination_EndpointType(temp1)
		result.EndpointType = temp
	}

	// Set property "Properties":
	if destination.BlobContainerName != nil || destination.ResourceReference != nil {
		result.Properties = &arm.StorageBlobDeadLetterDestinationProperties{}
	}
	if destination.BlobContainerName != nil {
		blobContainerName := *destination.BlobContainerName
		result.Properties.BlobContainerName = &blobContainerName
	}
	if destination.ResourceReference != nil {
		resourceIdARMID, err := resolved.ResolvedReferences.Lookup(*destination.ResourceReference)
		if err != nil {
			return nil, err
		}
		resourceId := resourceIdARMID
		result.Properties.ResourceId = &resourceId
	}
	return result, nil
}

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

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

	// Set property "BlobContainerName":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.BlobContainerName != nil {
			blobContainerName := *typedInput.Properties.BlobContainerName
			destination.BlobContainerName = &blobContainerName
		}
	}

	// Set property "EndpointType":
	var temp StorageBlobDeadLetterDestination_EndpointType
	var temp1 string
	temp1 = string(typedInput.EndpointType)
	temp = StorageBlobDeadLetterDestination_EndpointType(temp1)
	destination.EndpointType = &temp

	// no assignment for property "ResourceReference"

	// No error
	return nil
}

// AssignProperties_From_StorageBlobDeadLetterDestination populates our StorageBlobDeadLetterDestination from the provided source StorageBlobDeadLetterDestination
func (destination *StorageBlobDeadLetterDestination) AssignProperties_From_StorageBlobDeadLetterDestination(source *storage.StorageBlobDeadLetterDestination) error {

	// BlobContainerName
	destination.BlobContainerName = genruntime.ClonePointerToString(source.BlobContainerName)

	// EndpointType
	if source.EndpointType != nil {
		endpointType := *source.EndpointType
		endpointTypeTemp := genruntime.ToEnum(endpointType, storageBlobDeadLetterDestination_EndpointType_Values)
		destination.EndpointType = &endpointTypeTemp
	} else {
		destination.EndpointType = nil
	}

	// ResourceReference
	if source.ResourceReference != nil {
		resourceReference := source.ResourceReference.Copy()
		destination.ResourceReference = &resourceReference
	} else {
		destination.ResourceReference = nil
	}

	// No error
	return nil
}

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

	// BlobContainerName
	target.BlobContainerName = genruntime.ClonePointerToString(destination.BlobContainerName)

	// EndpointType
	if destination.EndpointType != nil {
		endpointType := string(*destination.EndpointType)
		target.EndpointType = &endpointType
	} else {
		target.EndpointType = nil
	}

	// ResourceReference
	if destination.ResourceReference != nil {
		resourceReference := destination.ResourceReference.Copy()
		target.ResourceReference = &resourceReference
	} else {
		target.ResourceReference = nil
	}

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

	// No error
	return nil
}

// Initialize_From_StorageBlobDeadLetterDestination_STATUS populates our StorageBlobDeadLetterDestination from the provided source StorageBlobDeadLetterDestination_STATUS
func (destination *StorageBlobDeadLetterDestination) Initialize_From_StorageBlobDeadLetterDestination_STATUS(source *StorageBlobDeadLetterDestination_STATUS) error {

	// BlobContainerName
	destination.BlobContainerName = genruntime.ClonePointerToString(source.BlobContainerName)

	// EndpointType
	if source.EndpointType != nil {
		endpointType := genruntime.ToEnum(string(*source.EndpointType), storageBlobDeadLetterDestination_EndpointType_Values)
		destination.EndpointType = &endpointType
	} else {
		destination.EndpointType = nil
	}

	// ResourceReference
	if source.ResourceId != nil {
		resourceReference := genruntime.CreateResourceReferenceFromARMID(*source.ResourceId)
		destination.ResourceReference = &resourceReference
	} else {
		destination.ResourceReference = nil
	}

	// No error
	return nil
}

type StorageBlobDeadLetterDestination_STATUS struct {
	// BlobContainerName: The name of the Storage blob container that is the destination of the deadletter events
	BlobContainerName *string `json:"blobContainerName,omitempty"`

	// EndpointType: Type of the endpoint for the dead letter destination
	EndpointType *StorageBlobDeadLetterDestination_EndpointType_STATUS `json:"endpointType,omitempty"`

	// ResourceId: The Azure Resource ID of the storage account that is the destination of the deadletter events
	ResourceId *string `json:"resourceId,omitempty"`
}

var _ genruntime.FromARMConverter = &StorageBlobDeadLetterDestination_STATUS{}

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

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

	// Set property "BlobContainerName":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.BlobContainerName != nil {
			blobContainerName := *typedInput.Properties.BlobContainerName
			destination.BlobContainerName = &blobContainerName
		}
	}

	// Set property "EndpointType":
	var temp StorageBlobDeadLetterDestination_EndpointType_STATUS
	var temp1 string
	temp1 = string(typedInput.EndpointType)
	temp = StorageBlobDeadLetterDestination_EndpointType_STATUS(temp1)
	destination.EndpointType = &temp

	// Set property "ResourceId":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ResourceId != nil {
			resourceId := *typedInput.Properties.ResourceId
			destination.ResourceId = &resourceId
		}
	}

	// No error
	return nil
}

// AssignProperties_From_StorageBlobDeadLetterDestination_STATUS populates our StorageBlobDeadLetterDestination_STATUS from the provided source StorageBlobDeadLetterDestination_STATUS
func (destination *StorageBlobDeadLetterDestination_STATUS) AssignProperties_From_StorageBlobDeadLetterDestination_STATUS(source *storage.StorageBlobDeadLetterDestination_STATUS) error {

	// BlobContainerName
	destination.BlobContainerName = genruntime.ClonePointerToString(source.BlobContainerName)

	// EndpointType
	if source.EndpointType != nil {
		endpointType := *source.EndpointType
		endpointTypeTemp := genruntime.ToEnum(endpointType, storageBlobDeadLetterDestination_EndpointType_STATUS_Values)
		destination.EndpointType = &endpointTypeTemp
	} else {
		destination.EndpointType = nil
	}

	// ResourceId
	destination.ResourceId = genruntime.ClonePointerToString(source.ResourceId)

	// No error
	return nil
}

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

	// BlobContainerName
	target.BlobContainerName = genruntime.ClonePointerToString(destination.BlobContainerName)

	// EndpointType
	if destination.EndpointType != nil {
		endpointType := string(*destination.EndpointType)
		target.EndpointType = &endpointType
	} else {
		target.EndpointType = nil
	}

	// ResourceId
	target.ResourceId = genruntime.ClonePointerToString(destination.ResourceId)

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

	// No error
	return nil
}

type StorageQueueEventSubscriptionDestination struct {
	// +kubebuilder:validation:Required
	// EndpointType: Type of the endpoint for the event subscription destination.
	EndpointType *StorageQueueEventSubscriptionDestination_EndpointType `json:"endpointType,omitempty"`

	// QueueName: The name of the Storage queue under a storage account that is the destination of an event subscription.
	QueueName *string `json:"queueName,omitempty"`

	// ResourceReference: The Azure Resource ID of the storage account that contains the queue that is the destination of an
	// event subscription.
	ResourceReference *genruntime.ResourceReference `armReference:"ResourceId" json:"resourceReference,omitempty"`
}

var _ genruntime.ARMTransformer = &StorageQueueEventSubscriptionDestination{}

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

	// Set property "EndpointType":
	if destination.EndpointType != nil {
		var temp arm.StorageQueueEventSubscriptionDestination_EndpointType
		var temp1 string
		temp1 = string(*destination.EndpointType)
		temp = arm.StorageQueueEventSubscriptionDestination_EndpointType(temp1)
		result.EndpointType = temp
	}

	// Set property "Properties":
	if destination.QueueName != nil || destination.ResourceReference != nil {
		result.Properties = &arm.StorageQueueEventSubscriptionDestinationProperties{}
	}
	if destination.QueueName != nil {
		queueName := *destination.QueueName
		result.Properties.QueueName = &queueName
	}
	if destination.ResourceReference != nil {
		resourceIdARMID, err := resolved.ResolvedReferences.Lookup(*destination.ResourceReference)
		if err != nil {
			return nil, err
		}
		resourceId := resourceIdARMID
		result.Properties.ResourceId = &resourceId
	}
	return result, nil
}

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

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

	// Set property "EndpointType":
	var temp StorageQueueEventSubscriptionDestination_EndpointType
	var temp1 string
	temp1 = string(typedInput.EndpointType)
	temp = StorageQueueEventSubscriptionDestination_EndpointType(temp1)
	destination.EndpointType = &temp

	// Set property "QueueName":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.QueueName != nil {
			queueName := *typedInput.Properties.QueueName
			destination.QueueName = &queueName
		}
	}

	// no assignment for property "ResourceReference"

	// No error
	return nil
}

// AssignProperties_From_StorageQueueEventSubscriptionDestination populates our StorageQueueEventSubscriptionDestination from the provided source StorageQueueEventSubscriptionDestination
func (destination *StorageQueueEventSubscriptionDestination) AssignProperties_From_StorageQueueEventSubscriptionDestination(source *storage.StorageQueueEventSubscriptionDestination) error {

	// EndpointType
	if source.EndpointType != nil {
		endpointType := *source.EndpointType
		endpointTypeTemp := genruntime.ToEnum(endpointType, storageQueueEventSubscriptionDestination_EndpointType_Values)
		destination.EndpointType = &endpointTypeTemp
	} else {
		destination.EndpointType = nil
	}

	// QueueName
	destination.QueueName = genruntime.ClonePointerToString(source.QueueName)

	// ResourceReference
	if source.ResourceReference != nil {
		resourceReference := source.ResourceReference.Copy()
		destination.ResourceReference = &resourceReference
	} else {
		destination.ResourceReference = nil
	}

	// No error
	return nil
}

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

	// EndpointType
	if destination.EndpointType != nil {
		endpointType := string(*destination.EndpointType)
		target.EndpointType = &endpointType
	} else {
		target.EndpointType = nil
	}

	// QueueName
	target.QueueName = genruntime.ClonePointerToString(destination.QueueName)

	// ResourceReference
	if destination.ResourceReference != nil {
		resourceReference := destination.ResourceReference.Copy()
		target.ResourceReference = &resourceReference
	} else {
		target.ResourceReference = nil
	}

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

	// No error
	return nil
}

// Initialize_From_StorageQueueEventSubscriptionDestination_STATUS populates our StorageQueueEventSubscriptionDestination from the provided source StorageQueueEventSubscriptionDestination_STATUS
func (destination *StorageQueueEventSubscriptionDestination) Initialize_From_StorageQueueEventSubscriptionDestination_STATUS(source *StorageQueueEventSubscriptionDestination_STATUS) error {

	// EndpointType
	if source.EndpointType != nil {
		endpointType := genruntime.ToEnum(string(*source.EndpointType), storageQueueEventSubscriptionDestination_EndpointType_Values)
		destination.EndpointType = &endpointType
	} else {
		destination.EndpointType = nil
	}

	// QueueName
	destination.QueueName = genruntime.ClonePointerToString(source.QueueName)

	// ResourceReference
	if source.ResourceId != nil {
		resourceReference := genruntime.CreateResourceReferenceFromARMID(*source.ResourceId)
		destination.ResourceReference = &resourceReference
	} else {
		destination.ResourceReference = nil
	}

	// No error
	return nil
}

type StorageQueueEventSubscriptionDestination_STATUS struct {
	// EndpointType: Type of the endpoint for the event subscription destination.
	EndpointType *StorageQueueEventSubscriptionDestination_EndpointType_STATUS `json:"endpointType,omitempty"`

	// QueueName: The name of the Storage queue under a storage account that is the destination of an event subscription.
	QueueName *string `json:"queueName,omitempty"`

	// ResourceId: The Azure Resource ID of the storage account that contains the queue that is the destination of an event
	// subscription.
	ResourceId *string `json:"resourceId,omitempty"`
}

var _ genruntime.FromARMConverter = &StorageQueueEventSubscriptionDestination_STATUS{}

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

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

	// Set property "EndpointType":
	var temp StorageQueueEventSubscriptionDestination_EndpointType_STATUS
	var temp1 string
	temp1 = string(typedInput.EndpointType)
	temp = StorageQueueEventSubscriptionDestination_EndpointType_STATUS(temp1)
	destination.EndpointType = &temp

	// Set property "QueueName":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.QueueName != nil {
			queueName := *typedInput.Properties.QueueName
			destination.QueueName = &queueName
		}
	}

	// Set property "ResourceId":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ResourceId != nil {
			resourceId := *typedInput.Properties.ResourceId
			destination.ResourceId = &resourceId
		}
	}

	// No error
	return nil
}

// AssignProperties_From_StorageQueueEventSubscriptionDestination_STATUS populates our StorageQueueEventSubscriptionDestination_STATUS from the provided source StorageQueueEventSubscriptionDestination_STATUS
func (destination *StorageQueueEventSubscriptionDestination_STATUS) AssignProperties_From_StorageQueueEventSubscriptionDestination_STATUS(source *storage.StorageQueueEventSubscriptionDestination_STATUS) error {

	// EndpointType
	if source.EndpointType != nil {
		endpointType := *source.EndpointType
		endpointTypeTemp := genruntime.ToEnum(endpointType, storageQueueEventSubscriptionDestination_EndpointType_STATUS_Values)
		destination.EndpointType = &endpointTypeTemp
	} else {
		destination.EndpointType = nil
	}

	// QueueName
	destination.QueueName = genruntime.ClonePointerToString(source.QueueName)

	// ResourceId
	destination.ResourceId = genruntime.ClonePointerToString(source.ResourceId)

	// No error
	return nil
}

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

	// EndpointType
	if destination.EndpointType != nil {
		endpointType := string(*destination.EndpointType)
		target.EndpointType = &endpointType
	} else {
		target.EndpointType = nil
	}

	// QueueName
	target.QueueName = genruntime.ClonePointerToString(destination.QueueName)

	// ResourceId
	target.ResourceId = genruntime.ClonePointerToString(destination.ResourceId)

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

	// No error
	return nil
}

type WebHookEventSubscriptionDestination struct {
	// AzureActiveDirectoryApplicationIdOrUri: The Azure Active Directory Application ID or URI to get the access token that
	// will be included as the bearer token in delivery requests.
	AzureActiveDirectoryApplicationIdOrUri *string `json:"azureActiveDirectoryApplicationIdOrUri,omitempty"`

	// AzureActiveDirectoryTenantId: The Azure Active Directory Tenant ID to get the access token that will be included as the
	// bearer token in delivery requests.
	AzureActiveDirectoryTenantId *string `json:"azureActiveDirectoryTenantId,omitempty"`

	// +kubebuilder:validation:Required
	// EndpointType: Type of the endpoint for the event subscription destination.
	EndpointType *WebHookEventSubscriptionDestination_EndpointType `json:"endpointType,omitempty"`

	// EndpointUrl: The URL that represents the endpoint of the destination of an event subscription.
	EndpointUrl *genruntime.SecretReference `json:"endpointUrl,omitempty"`

	// MaxEventsPerBatch: Maximum number of events per batch.
	MaxEventsPerBatch *int `json:"maxEventsPerBatch,omitempty"`

	// PreferredBatchSizeInKilobytes: Preferred batch size in Kilobytes.
	PreferredBatchSizeInKilobytes *int `json:"preferredBatchSizeInKilobytes,omitempty"`
}

var _ genruntime.ARMTransformer = &WebHookEventSubscriptionDestination{}

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

	// Set property "EndpointType":
	if destination.EndpointType != nil {
		var temp arm.WebHookEventSubscriptionDestination_EndpointType
		var temp1 string
		temp1 = string(*destination.EndpointType)
		temp = arm.WebHookEventSubscriptionDestination_EndpointType(temp1)
		result.EndpointType = temp
	}

	// Set property "Properties":
	if destination.AzureActiveDirectoryApplicationIdOrUri != nil ||
		destination.AzureActiveDirectoryTenantId != nil ||
		destination.EndpointUrl != nil ||
		destination.MaxEventsPerBatch != nil ||
		destination.PreferredBatchSizeInKilobytes != nil {
		result.Properties = &arm.WebHookEventSubscriptionDestinationProperties{}
	}
	if destination.AzureActiveDirectoryApplicationIdOrUri != nil {
		azureActiveDirectoryApplicationIdOrUri := *destination.AzureActiveDirectoryApplicationIdOrUri
		result.Properties.AzureActiveDirectoryApplicationIdOrUri = &azureActiveDirectoryApplicationIdOrUri
	}
	if destination.AzureActiveDirectoryTenantId != nil {
		azureActiveDirectoryTenantId := *destination.AzureActiveDirectoryTenantId
		result.Properties.AzureActiveDirectoryTenantId = &azureActiveDirectoryTenantId
	}
	if destination.EndpointUrl != nil {
		endpointUrlSecret, err := resolved.ResolvedSecrets.Lookup(*destination.EndpointUrl)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property EndpointUrl")
		}
		endpointUrl := endpointUrlSecret
		result.Properties.EndpointUrl = &endpointUrl
	}
	if destination.MaxEventsPerBatch != nil {
		maxEventsPerBatch := *destination.MaxEventsPerBatch
		result.Properties.MaxEventsPerBatch = &maxEventsPerBatch
	}
	if destination.PreferredBatchSizeInKilobytes != nil {
		preferredBatchSizeInKilobytes := *destination.PreferredBatchSizeInKilobytes
		result.Properties.PreferredBatchSizeInKilobytes = &preferredBatchSizeInKilobytes
	}
	return result, nil
}

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

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

	// Set property "AzureActiveDirectoryApplicationIdOrUri":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AzureActiveDirectoryApplicationIdOrUri != nil {
			azureActiveDirectoryApplicationIdOrUri := *typedInput.Properties.AzureActiveDirectoryApplicationIdOrUri
			destination.AzureActiveDirectoryApplicationIdOrUri = &azureActiveDirectoryApplicationIdOrUri
		}
	}

	// Set property "AzureActiveDirectoryTenantId":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AzureActiveDirectoryTenantId != nil {
			azureActiveDirectoryTenantId := *typedInput.Properties.AzureActiveDirectoryTenantId
			destination.AzureActiveDirectoryTenantId = &azureActiveDirectoryTenantId
		}
	}

	// Set property "EndpointType":
	var temp WebHookEventSubscriptionDestination_EndpointType
	var temp1 string
	temp1 = string(typedInput.EndpointType)
	temp = WebHookEventSubscriptionDestination_EndpointType(temp1)
	destination.EndpointType = &temp

	// no assignment for property "EndpointUrl"

	// Set property "MaxEventsPerBatch":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.MaxEventsPerBatch != nil {
			maxEventsPerBatch := *typedInput.Properties.MaxEventsPerBatch
			destination.MaxEventsPerBatch = &maxEventsPerBatch
		}
	}

	// Set property "PreferredBatchSizeInKilobytes":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PreferredBatchSizeInKilobytes != nil {
			preferredBatchSizeInKilobytes := *typedInput.Properties.PreferredBatchSizeInKilobytes
			destination.PreferredBatchSizeInKilobytes = &preferredBatchSizeInKilobytes
		}
	}

	// No error
	return nil
}

// AssignProperties_From_WebHookEventSubscriptionDestination populates our WebHookEventSubscriptionDestination from the provided source WebHookEventSubscriptionDestination
func (destination *WebHookEventSubscriptionDestination) AssignProperties_From_WebHookEventSubscriptionDestination(source *storage.WebHookEventSubscriptionDestination) error {

	// AzureActiveDirectoryApplicationIdOrUri
	destination.AzureActiveDirectoryApplicationIdOrUri = genruntime.ClonePointerToString(source.AzureActiveDirectoryApplicationIdOrUri)

	// AzureActiveDirectoryTenantId
	destination.AzureActiveDirectoryTenantId = genruntime.ClonePointerToString(source.AzureActiveDirectoryTenantId)

	// EndpointType
	if source.EndpointType != nil {
		endpointType := *source.EndpointType
		endpointTypeTemp := genruntime.ToEnum(endpointType, webHookEventSubscriptionDestination_EndpointType_Values)
		destination.EndpointType = &endpointTypeTemp
	} else {
		destination.EndpointType = nil
	}

	// EndpointUrl
	if source.EndpointUrl != nil {
		endpointUrl := source.EndpointUrl.Copy()
		destination.EndpointUrl = &endpointUrl
	} else {
		destination.EndpointUrl = nil
	}

	// MaxEventsPerBatch
	destination.MaxEventsPerBatch = genruntime.ClonePointerToInt(source.MaxEventsPerBatch)

	// PreferredBatchSizeInKilobytes
	destination.PreferredBatchSizeInKilobytes = genruntime.ClonePointerToInt(source.PreferredBatchSizeInKilobytes)

	// No error
	return nil
}

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

	// AzureActiveDirectoryApplicationIdOrUri
	target.AzureActiveDirectoryApplicationIdOrUri = genruntime.ClonePointerToString(destination.AzureActiveDirectoryApplicationIdOrUri)

	// AzureActiveDirectoryTenantId
	target.AzureActiveDirectoryTenantId = genruntime.ClonePointerToString(destination.AzureActiveDirectoryTenantId)

	// EndpointType
	if destination.EndpointType != nil {
		endpointType := string(*destination.EndpointType)
		target.EndpointType = &endpointType
	} else {
		target.EndpointType = nil
	}

	// EndpointUrl
	if destination.EndpointUrl != nil {
		endpointUrl := destination.EndpointUrl.Copy()
		target.EndpointUrl = &endpointUrl
	} else {
		target.EndpointUrl = nil
	}

	// MaxEventsPerBatch
	target.MaxEventsPerBatch = genruntime.ClonePointerToInt(destination.MaxEventsPerBatch)

	// PreferredBatchSizeInKilobytes
	target.PreferredBatchSizeInKilobytes = genruntime.ClonePointerToInt(destination.PreferredBatchSizeInKilobytes)

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

	// No error
	return nil
}

// Initialize_From_WebHookEventSubscriptionDestination_STATUS populates our WebHookEventSubscriptionDestination from the provided source WebHookEventSubscriptionDestination_STATUS
func (destination *WebHookEventSubscriptionDestination) Initialize_From_WebHookEventSubscriptionDestination_STATUS(source *WebHookEventSubscriptionDestination_STATUS) error {

	// AzureActiveDirectoryApplicationIdOrUri
	destination.AzureActiveDirectoryApplicationIdOrUri = genruntime.ClonePointerToString(source.AzureActiveDirectoryApplicationIdOrUri)

	// AzureActiveDirectoryTenantId
	destination.AzureActiveDirectoryTenantId = genruntime.ClonePointerToString(source.AzureActiveDirectoryTenantId)

	// EndpointType
	if source.EndpointType != nil {
		endpointType := genruntime.ToEnum(string(*source.EndpointType), webHookEventSubscriptionDestination_EndpointType_Values)
		destination.EndpointType = &endpointType
	} else {
		destination.EndpointType = nil
	}

	// MaxEventsPerBatch
	destination.MaxEventsPerBatch = genruntime.ClonePointerToInt(source.MaxEventsPerBatch)

	// PreferredBatchSizeInKilobytes
	destination.PreferredBatchSizeInKilobytes = genruntime.ClonePointerToInt(source.PreferredBatchSizeInKilobytes)

	// No error
	return nil
}

type WebHookEventSubscriptionDestination_STATUS struct {
	// AzureActiveDirectoryApplicationIdOrUri: The Azure Active Directory Application ID or URI to get the access token that
	// will be included as the bearer token in delivery requests.
	AzureActiveDirectoryApplicationIdOrUri *string `json:"azureActiveDirectoryApplicationIdOrUri,omitempty"`

	// AzureActiveDirectoryTenantId: The Azure Active Directory Tenant ID to get the access token that will be included as the
	// bearer token in delivery requests.
	AzureActiveDirectoryTenantId *string `json:"azureActiveDirectoryTenantId,omitempty"`

	// EndpointBaseUrl: The base URL that represents the endpoint of the destination of an event subscription.
	EndpointBaseUrl *string `json:"endpointBaseUrl,omitempty"`

	// EndpointType: Type of the endpoint for the event subscription destination.
	EndpointType *WebHookEventSubscriptionDestination_EndpointType_STATUS `json:"endpointType,omitempty"`

	// MaxEventsPerBatch: Maximum number of events per batch.
	MaxEventsPerBatch *int `json:"maxEventsPerBatch,omitempty"`

	// PreferredBatchSizeInKilobytes: Preferred batch size in Kilobytes.
	PreferredBatchSizeInKilobytes *int `json:"preferredBatchSizeInKilobytes,omitempty"`
}

var _ genruntime.FromARMConverter = &WebHookEventSubscriptionDestination_STATUS{}

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

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

	// Set property "AzureActiveDirectoryApplicationIdOrUri":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AzureActiveDirectoryApplicationIdOrUri != nil {
			azureActiveDirectoryApplicationIdOrUri := *typedInput.Properties.AzureActiveDirectoryApplicationIdOrUri
			destination.AzureActiveDirectoryApplicationIdOrUri = &azureActiveDirectoryApplicationIdOrUri
		}
	}

	// Set property "AzureActiveDirectoryTenantId":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AzureActiveDirectoryTenantId != nil {
			azureActiveDirectoryTenantId := *typedInput.Properties.AzureActiveDirectoryTenantId
			destination.AzureActiveDirectoryTenantId = &azureActiveDirectoryTenantId
		}
	}

	// Set property "EndpointBaseUrl":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EndpointBaseUrl != nil {
			endpointBaseUrl := *typedInput.Properties.EndpointBaseUrl
			destination.EndpointBaseUrl = &endpointBaseUrl
		}
	}

	// Set property "EndpointType":
	var temp WebHookEventSubscriptionDestination_EndpointType_STATUS
	var temp1 string
	temp1 = string(typedInput.EndpointType)
	temp = WebHookEventSubscriptionDestination_EndpointType_STATUS(temp1)
	destination.EndpointType = &temp

	// Set property "MaxEventsPerBatch":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.MaxEventsPerBatch != nil {
			maxEventsPerBatch := *typedInput.Properties.MaxEventsPerBatch
			destination.MaxEventsPerBatch = &maxEventsPerBatch
		}
	}

	// Set property "PreferredBatchSizeInKilobytes":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PreferredBatchSizeInKilobytes != nil {
			preferredBatchSizeInKilobytes := *typedInput.Properties.PreferredBatchSizeInKilobytes
			destination.PreferredBatchSizeInKilobytes = &preferredBatchSizeInKilobytes
		}
	}

	// No error
	return nil
}

// AssignProperties_From_WebHookEventSubscriptionDestination_STATUS populates our WebHookEventSubscriptionDestination_STATUS from the provided source WebHookEventSubscriptionDestination_STATUS
func (destination *WebHookEventSubscriptionDestination_STATUS) AssignProperties_From_WebHookEventSubscriptionDestination_STATUS(source *storage.WebHookEventSubscriptionDestination_STATUS) error {

	// AzureActiveDirectoryApplicationIdOrUri
	destination.AzureActiveDirectoryApplicationIdOrUri = genruntime.ClonePointerToString(source.AzureActiveDirectoryApplicationIdOrUri)

	// AzureActiveDirectoryTenantId
	destination.AzureActiveDirectoryTenantId = genruntime.ClonePointerToString(source.AzureActiveDirectoryTenantId)

	// EndpointBaseUrl
	destination.EndpointBaseUrl = genruntime.ClonePointerToString(source.EndpointBaseUrl)

	// EndpointType
	if source.EndpointType != nil {
		endpointType := *source.EndpointType
		endpointTypeTemp := genruntime.ToEnum(endpointType, webHookEventSubscriptionDestination_EndpointType_STATUS_Values)
		destination.EndpointType = &endpointTypeTemp
	} else {
		destination.EndpointType = nil
	}

	// MaxEventsPerBatch
	destination.MaxEventsPerBatch = genruntime.ClonePointerToInt(source.MaxEventsPerBatch)

	// PreferredBatchSizeInKilobytes
	destination.PreferredBatchSizeInKilobytes = genruntime.ClonePointerToInt(source.PreferredBatchSizeInKilobytes)

	// No error
	return nil
}

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

	// AzureActiveDirectoryApplicationIdOrUri
	target.AzureActiveDirectoryApplicationIdOrUri = genruntime.ClonePointerToString(destination.AzureActiveDirectoryApplicationIdOrUri)

	// AzureActiveDirectoryTenantId
	target.AzureActiveDirectoryTenantId = genruntime.ClonePointerToString(destination.AzureActiveDirectoryTenantId)

	// EndpointBaseUrl
	target.EndpointBaseUrl = genruntime.ClonePointerToString(destination.EndpointBaseUrl)

	// EndpointType
	if destination.EndpointType != nil {
		endpointType := string(*destination.EndpointType)
		target.EndpointType = &endpointType
	} else {
		target.EndpointType = nil
	}

	// MaxEventsPerBatch
	target.MaxEventsPerBatch = genruntime.ClonePointerToInt(destination.MaxEventsPerBatch)

	// PreferredBatchSizeInKilobytes
	target.PreferredBatchSizeInKilobytes = genruntime.ClonePointerToInt(destination.PreferredBatchSizeInKilobytes)

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

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"AzureFunction"}
type AzureFunctionEventSubscriptionDestination_EndpointType string

const AzureFunctionEventSubscriptionDestination_EndpointType_AzureFunction = AzureFunctionEventSubscriptionDestination_EndpointType("AzureFunction")

// Mapping from string to AzureFunctionEventSubscriptionDestination_EndpointType
var azureFunctionEventSubscriptionDestination_EndpointType_Values = map[string]AzureFunctionEventSubscriptionDestination_EndpointType{
	"azurefunction": AzureFunctionEventSubscriptionDestination_EndpointType_AzureFunction,
}

type AzureFunctionEventSubscriptionDestination_EndpointType_STATUS string

const AzureFunctionEventSubscriptionDestination_EndpointType_STATUS_AzureFunction = AzureFunctionEventSubscriptionDestination_EndpointType_STATUS("AzureFunction")

// Mapping from string to AzureFunctionEventSubscriptionDestination_EndpointType_STATUS
var azureFunctionEventSubscriptionDestination_EndpointType_STATUS_Values = map[string]AzureFunctionEventSubscriptionDestination_EndpointType_STATUS{
	"azurefunction": AzureFunctionEventSubscriptionDestination_EndpointType_STATUS_AzureFunction,
}

type BoolEqualsAdvancedFilter struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// +kubebuilder:validation:Required
	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *BoolEqualsAdvancedFilter_OperatorType `json:"operatorType,omitempty"`

	// Value: The boolean filter value.
	Value *bool `json:"value,omitempty"`
}

var _ genruntime.ARMTransformer = &BoolEqualsAdvancedFilter{}

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

	// Set property "Key":
	if filter.Key != nil {
		key := *filter.Key
		result.Key = &key
	}

	// Set property "OperatorType":
	if filter.OperatorType != nil {
		var temp arm.BoolEqualsAdvancedFilter_OperatorType
		var temp1 string
		temp1 = string(*filter.OperatorType)
		temp = arm.BoolEqualsAdvancedFilter_OperatorType(temp1)
		result.OperatorType = temp
	}

	// Set property "Value":
	if filter.Value != nil {
		value := *filter.Value
		result.Value = &value
	}
	return result, nil
}

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp BoolEqualsAdvancedFilter_OperatorType
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = BoolEqualsAdvancedFilter_OperatorType(temp1)
	filter.OperatorType = &temp

	// Set property "Value":
	if typedInput.Value != nil {
		value := *typedInput.Value
		filter.Value = &value
	}

	// No error
	return nil
}

// AssignProperties_From_BoolEqualsAdvancedFilter populates our BoolEqualsAdvancedFilter from the provided source BoolEqualsAdvancedFilter
func (filter *BoolEqualsAdvancedFilter) AssignProperties_From_BoolEqualsAdvancedFilter(source *storage.BoolEqualsAdvancedFilter) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, boolEqualsAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Value
	if source.Value != nil {
		value := *source.Value
		filter.Value = &value
	} else {
		filter.Value = nil
	}

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Value
	if filter.Value != nil {
		value := *filter.Value
		destination.Value = &value
	} else {
		destination.Value = nil
	}

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

	// No error
	return nil
}

// Initialize_From_BoolEqualsAdvancedFilter_STATUS populates our BoolEqualsAdvancedFilter from the provided source BoolEqualsAdvancedFilter_STATUS
func (filter *BoolEqualsAdvancedFilter) Initialize_From_BoolEqualsAdvancedFilter_STATUS(source *BoolEqualsAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := genruntime.ToEnum(string(*source.OperatorType), boolEqualsAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorType
	} else {
		filter.OperatorType = nil
	}

	// Value
	if source.Value != nil {
		value := *source.Value
		filter.Value = &value
	} else {
		filter.Value = nil
	}

	// No error
	return nil
}

type BoolEqualsAdvancedFilter_STATUS struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *BoolEqualsAdvancedFilter_OperatorType_STATUS `json:"operatorType,omitempty"`

	// Value: The boolean filter value.
	Value *bool `json:"value,omitempty"`
}

var _ genruntime.FromARMConverter = &BoolEqualsAdvancedFilter_STATUS{}

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp BoolEqualsAdvancedFilter_OperatorType_STATUS
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = BoolEqualsAdvancedFilter_OperatorType_STATUS(temp1)
	filter.OperatorType = &temp

	// Set property "Value":
	if typedInput.Value != nil {
		value := *typedInput.Value
		filter.Value = &value
	}

	// No error
	return nil
}

// AssignProperties_From_BoolEqualsAdvancedFilter_STATUS populates our BoolEqualsAdvancedFilter_STATUS from the provided source BoolEqualsAdvancedFilter_STATUS
func (filter *BoolEqualsAdvancedFilter_STATUS) AssignProperties_From_BoolEqualsAdvancedFilter_STATUS(source *storage.BoolEqualsAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, boolEqualsAdvancedFilter_OperatorType_STATUS_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Value
	if source.Value != nil {
		value := *source.Value
		filter.Value = &value
	} else {
		filter.Value = nil
	}

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Value
	if filter.Value != nil {
		value := *filter.Value
		destination.Value = &value
	} else {
		destination.Value = nil
	}

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

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"EventHub"}
type EventHubEventSubscriptionDestination_EndpointType string

const EventHubEventSubscriptionDestination_EndpointType_EventHub = EventHubEventSubscriptionDestination_EndpointType("EventHub")

// Mapping from string to EventHubEventSubscriptionDestination_EndpointType
var eventHubEventSubscriptionDestination_EndpointType_Values = map[string]EventHubEventSubscriptionDestination_EndpointType{
	"eventhub": EventHubEventSubscriptionDestination_EndpointType_EventHub,
}

type EventHubEventSubscriptionDestination_EndpointType_STATUS string

const EventHubEventSubscriptionDestination_EndpointType_STATUS_EventHub = EventHubEventSubscriptionDestination_EndpointType_STATUS("EventHub")

// Mapping from string to EventHubEventSubscriptionDestination_EndpointType_STATUS
var eventHubEventSubscriptionDestination_EndpointType_STATUS_Values = map[string]EventHubEventSubscriptionDestination_EndpointType_STATUS{
	"eventhub": EventHubEventSubscriptionDestination_EndpointType_STATUS_EventHub,
}

// +kubebuilder:validation:Enum={"HybridConnection"}
type HybridConnectionEventSubscriptionDestination_EndpointType string

const HybridConnectionEventSubscriptionDestination_EndpointType_HybridConnection = HybridConnectionEventSubscriptionDestination_EndpointType("HybridConnection")

// Mapping from string to HybridConnectionEventSubscriptionDestination_EndpointType
var hybridConnectionEventSubscriptionDestination_EndpointType_Values = map[string]HybridConnectionEventSubscriptionDestination_EndpointType{
	"hybridconnection": HybridConnectionEventSubscriptionDestination_EndpointType_HybridConnection,
}

type HybridConnectionEventSubscriptionDestination_EndpointType_STATUS string

const HybridConnectionEventSubscriptionDestination_EndpointType_STATUS_HybridConnection = HybridConnectionEventSubscriptionDestination_EndpointType_STATUS("HybridConnection")

// Mapping from string to HybridConnectionEventSubscriptionDestination_EndpointType_STATUS
var hybridConnectionEventSubscriptionDestination_EndpointType_STATUS_Values = map[string]HybridConnectionEventSubscriptionDestination_EndpointType_STATUS{
	"hybridconnection": HybridConnectionEventSubscriptionDestination_EndpointType_STATUS_HybridConnection,
}

type NumberGreaterThanAdvancedFilter struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// +kubebuilder:validation:Required
	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *NumberGreaterThanAdvancedFilter_OperatorType `json:"operatorType,omitempty"`

	// Value: The filter value.
	Value *float64 `json:"value,omitempty"`
}

var _ genruntime.ARMTransformer = &NumberGreaterThanAdvancedFilter{}

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

	// Set property "Key":
	if filter.Key != nil {
		key := *filter.Key
		result.Key = &key
	}

	// Set property "OperatorType":
	if filter.OperatorType != nil {
		var temp arm.NumberGreaterThanAdvancedFilter_OperatorType
		var temp1 string
		temp1 = string(*filter.OperatorType)
		temp = arm.NumberGreaterThanAdvancedFilter_OperatorType(temp1)
		result.OperatorType = temp
	}

	// Set property "Value":
	if filter.Value != nil {
		value := *filter.Value
		result.Value = &value
	}
	return result, nil
}

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp NumberGreaterThanAdvancedFilter_OperatorType
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = NumberGreaterThanAdvancedFilter_OperatorType(temp1)
	filter.OperatorType = &temp

	// Set property "Value":
	if typedInput.Value != nil {
		value := *typedInput.Value
		filter.Value = &value
	}

	// No error
	return nil
}

// AssignProperties_From_NumberGreaterThanAdvancedFilter populates our NumberGreaterThanAdvancedFilter from the provided source NumberGreaterThanAdvancedFilter
func (filter *NumberGreaterThanAdvancedFilter) AssignProperties_From_NumberGreaterThanAdvancedFilter(source *storage.NumberGreaterThanAdvancedFilter) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, numberGreaterThanAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Value
	if source.Value != nil {
		value := *source.Value
		filter.Value = &value
	} else {
		filter.Value = nil
	}

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Value
	if filter.Value != nil {
		value := *filter.Value
		destination.Value = &value
	} else {
		destination.Value = nil
	}

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

	// No error
	return nil
}

// Initialize_From_NumberGreaterThanAdvancedFilter_STATUS populates our NumberGreaterThanAdvancedFilter from the provided source NumberGreaterThanAdvancedFilter_STATUS
func (filter *NumberGreaterThanAdvancedFilter) Initialize_From_NumberGreaterThanAdvancedFilter_STATUS(source *NumberGreaterThanAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := genruntime.ToEnum(string(*source.OperatorType), numberGreaterThanAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorType
	} else {
		filter.OperatorType = nil
	}

	// Value
	if source.Value != nil {
		value := *source.Value
		filter.Value = &value
	} else {
		filter.Value = nil
	}

	// No error
	return nil
}

type NumberGreaterThanAdvancedFilter_STATUS struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *NumberGreaterThanAdvancedFilter_OperatorType_STATUS `json:"operatorType,omitempty"`

	// Value: The filter value.
	Value *float64 `json:"value,omitempty"`
}

var _ genruntime.FromARMConverter = &NumberGreaterThanAdvancedFilter_STATUS{}

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp NumberGreaterThanAdvancedFilter_OperatorType_STATUS
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = NumberGreaterThanAdvancedFilter_OperatorType_STATUS(temp1)
	filter.OperatorType = &temp

	// Set property "Value":
	if typedInput.Value != nil {
		value := *typedInput.Value
		filter.Value = &value
	}

	// No error
	return nil
}

// AssignProperties_From_NumberGreaterThanAdvancedFilter_STATUS populates our NumberGreaterThanAdvancedFilter_STATUS from the provided source NumberGreaterThanAdvancedFilter_STATUS
func (filter *NumberGreaterThanAdvancedFilter_STATUS) AssignProperties_From_NumberGreaterThanAdvancedFilter_STATUS(source *storage.NumberGreaterThanAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, numberGreaterThanAdvancedFilter_OperatorType_STATUS_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Value
	if source.Value != nil {
		value := *source.Value
		filter.Value = &value
	} else {
		filter.Value = nil
	}

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Value
	if filter.Value != nil {
		value := *filter.Value
		destination.Value = &value
	} else {
		destination.Value = nil
	}

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

	// No error
	return nil
}

type NumberGreaterThanOrEqualsAdvancedFilter struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// +kubebuilder:validation:Required
	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *NumberGreaterThanOrEqualsAdvancedFilter_OperatorType `json:"operatorType,omitempty"`

	// Value: The filter value.
	Value *float64 `json:"value,omitempty"`
}

var _ genruntime.ARMTransformer = &NumberGreaterThanOrEqualsAdvancedFilter{}

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

	// Set property "Key":
	if filter.Key != nil {
		key := *filter.Key
		result.Key = &key
	}

	// Set property "OperatorType":
	if filter.OperatorType != nil {
		var temp arm.NumberGreaterThanOrEqualsAdvancedFilter_OperatorType
		var temp1 string
		temp1 = string(*filter.OperatorType)
		temp = arm.NumberGreaterThanOrEqualsAdvancedFilter_OperatorType(temp1)
		result.OperatorType = temp
	}

	// Set property "Value":
	if filter.Value != nil {
		value := *filter.Value
		result.Value = &value
	}
	return result, nil
}

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp NumberGreaterThanOrEqualsAdvancedFilter_OperatorType
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = NumberGreaterThanOrEqualsAdvancedFilter_OperatorType(temp1)
	filter.OperatorType = &temp

	// Set property "Value":
	if typedInput.Value != nil {
		value := *typedInput.Value
		filter.Value = &value
	}

	// No error
	return nil
}

// AssignProperties_From_NumberGreaterThanOrEqualsAdvancedFilter populates our NumberGreaterThanOrEqualsAdvancedFilter from the provided source NumberGreaterThanOrEqualsAdvancedFilter
func (filter *NumberGreaterThanOrEqualsAdvancedFilter) AssignProperties_From_NumberGreaterThanOrEqualsAdvancedFilter(source *storage.NumberGreaterThanOrEqualsAdvancedFilter) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, numberGreaterThanOrEqualsAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Value
	if source.Value != nil {
		value := *source.Value
		filter.Value = &value
	} else {
		filter.Value = nil
	}

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Value
	if filter.Value != nil {
		value := *filter.Value
		destination.Value = &value
	} else {
		destination.Value = nil
	}

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

	// No error
	return nil
}

// Initialize_From_NumberGreaterThanOrEqualsAdvancedFilter_STATUS populates our NumberGreaterThanOrEqualsAdvancedFilter from the provided source NumberGreaterThanOrEqualsAdvancedFilter_STATUS
func (filter *NumberGreaterThanOrEqualsAdvancedFilter) Initialize_From_NumberGreaterThanOrEqualsAdvancedFilter_STATUS(source *NumberGreaterThanOrEqualsAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := genruntime.ToEnum(string(*source.OperatorType), numberGreaterThanOrEqualsAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorType
	} else {
		filter.OperatorType = nil
	}

	// Value
	if source.Value != nil {
		value := *source.Value
		filter.Value = &value
	} else {
		filter.Value = nil
	}

	// No error
	return nil
}

type NumberGreaterThanOrEqualsAdvancedFilter_STATUS struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS `json:"operatorType,omitempty"`

	// Value: The filter value.
	Value *float64 `json:"value,omitempty"`
}

var _ genruntime.FromARMConverter = &NumberGreaterThanOrEqualsAdvancedFilter_STATUS{}

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS(temp1)
	filter.OperatorType = &temp

	// Set property "Value":
	if typedInput.Value != nil {
		value := *typedInput.Value
		filter.Value = &value
	}

	// No error
	return nil
}

// AssignProperties_From_NumberGreaterThanOrEqualsAdvancedFilter_STATUS populates our NumberGreaterThanOrEqualsAdvancedFilter_STATUS from the provided source NumberGreaterThanOrEqualsAdvancedFilter_STATUS
func (filter *NumberGreaterThanOrEqualsAdvancedFilter_STATUS) AssignProperties_From_NumberGreaterThanOrEqualsAdvancedFilter_STATUS(source *storage.NumberGreaterThanOrEqualsAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, numberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Value
	if source.Value != nil {
		value := *source.Value
		filter.Value = &value
	} else {
		filter.Value = nil
	}

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Value
	if filter.Value != nil {
		value := *filter.Value
		destination.Value = &value
	} else {
		destination.Value = nil
	}

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

	// No error
	return nil
}

type NumberInAdvancedFilter struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// +kubebuilder:validation:Required
	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *NumberInAdvancedFilter_OperatorType `json:"operatorType,omitempty"`

	// Values: The set of filter values.
	Values []float64 `json:"values,omitempty"`
}

var _ genruntime.ARMTransformer = &NumberInAdvancedFilter{}

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

	// Set property "Key":
	if filter.Key != nil {
		key := *filter.Key
		result.Key = &key
	}

	// Set property "OperatorType":
	if filter.OperatorType != nil {
		var temp arm.NumberInAdvancedFilter_OperatorType
		var temp1 string
		temp1 = string(*filter.OperatorType)
		temp = arm.NumberInAdvancedFilter_OperatorType(temp1)
		result.OperatorType = temp
	}

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

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp NumberInAdvancedFilter_OperatorType
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = NumberInAdvancedFilter_OperatorType(temp1)
	filter.OperatorType = &temp

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

	// No error
	return nil
}

// AssignProperties_From_NumberInAdvancedFilter populates our NumberInAdvancedFilter from the provided source NumberInAdvancedFilter
func (filter *NumberInAdvancedFilter) AssignProperties_From_NumberInAdvancedFilter(source *storage.NumberInAdvancedFilter) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, numberInAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Values
	if source.Values != nil {
		valueList := make([]float64, len(source.Values))
		for valueIndex, valueItem := range source.Values {
			valueList[valueIndex] = valueItem
		}
		filter.Values = valueList
	} else {
		filter.Values = nil
	}

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Values
	if filter.Values != nil {
		valueList := make([]float64, len(filter.Values))
		for valueIndex, valueItem := range filter.Values {
			valueList[valueIndex] = valueItem
		}
		destination.Values = valueList
	} else {
		destination.Values = nil
	}

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

	// No error
	return nil
}

// Initialize_From_NumberInAdvancedFilter_STATUS populates our NumberInAdvancedFilter from the provided source NumberInAdvancedFilter_STATUS
func (filter *NumberInAdvancedFilter) Initialize_From_NumberInAdvancedFilter_STATUS(source *NumberInAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := genruntime.ToEnum(string(*source.OperatorType), numberInAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorType
	} else {
		filter.OperatorType = nil
	}

	// Values
	if source.Values != nil {
		valueList := make([]float64, len(source.Values))
		for valueIndex, valueItem := range source.Values {
			valueList[valueIndex] = valueItem
		}
		filter.Values = valueList
	} else {
		filter.Values = nil
	}

	// No error
	return nil
}

type NumberInAdvancedFilter_STATUS struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *NumberInAdvancedFilter_OperatorType_STATUS `json:"operatorType,omitempty"`

	// Values: The set of filter values.
	Values []float64 `json:"values,omitempty"`
}

var _ genruntime.FromARMConverter = &NumberInAdvancedFilter_STATUS{}

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp NumberInAdvancedFilter_OperatorType_STATUS
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = NumberInAdvancedFilter_OperatorType_STATUS(temp1)
	filter.OperatorType = &temp

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

	// No error
	return nil
}

// AssignProperties_From_NumberInAdvancedFilter_STATUS populates our NumberInAdvancedFilter_STATUS from the provided source NumberInAdvancedFilter_STATUS
func (filter *NumberInAdvancedFilter_STATUS) AssignProperties_From_NumberInAdvancedFilter_STATUS(source *storage.NumberInAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, numberInAdvancedFilter_OperatorType_STATUS_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Values
	if source.Values != nil {
		valueList := make([]float64, len(source.Values))
		for valueIndex, valueItem := range source.Values {
			valueList[valueIndex] = valueItem
		}
		filter.Values = valueList
	} else {
		filter.Values = nil
	}

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Values
	if filter.Values != nil {
		valueList := make([]float64, len(filter.Values))
		for valueIndex, valueItem := range filter.Values {
			valueList[valueIndex] = valueItem
		}
		destination.Values = valueList
	} else {
		destination.Values = nil
	}

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

	// No error
	return nil
}

type NumberLessThanAdvancedFilter struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// +kubebuilder:validation:Required
	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *NumberLessThanAdvancedFilter_OperatorType `json:"operatorType,omitempty"`

	// Value: The filter value.
	Value *float64 `json:"value,omitempty"`
}

var _ genruntime.ARMTransformer = &NumberLessThanAdvancedFilter{}

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

	// Set property "Key":
	if filter.Key != nil {
		key := *filter.Key
		result.Key = &key
	}

	// Set property "OperatorType":
	if filter.OperatorType != nil {
		var temp arm.NumberLessThanAdvancedFilter_OperatorType
		var temp1 string
		temp1 = string(*filter.OperatorType)
		temp = arm.NumberLessThanAdvancedFilter_OperatorType(temp1)
		result.OperatorType = temp
	}

	// Set property "Value":
	if filter.Value != nil {
		value := *filter.Value
		result.Value = &value
	}
	return result, nil
}

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp NumberLessThanAdvancedFilter_OperatorType
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = NumberLessThanAdvancedFilter_OperatorType(temp1)
	filter.OperatorType = &temp

	// Set property "Value":
	if typedInput.Value != nil {
		value := *typedInput.Value
		filter.Value = &value
	}

	// No error
	return nil
}

// AssignProperties_From_NumberLessThanAdvancedFilter populates our NumberLessThanAdvancedFilter from the provided source NumberLessThanAdvancedFilter
func (filter *NumberLessThanAdvancedFilter) AssignProperties_From_NumberLessThanAdvancedFilter(source *storage.NumberLessThanAdvancedFilter) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, numberLessThanAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Value
	if source.Value != nil {
		value := *source.Value
		filter.Value = &value
	} else {
		filter.Value = nil
	}

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Value
	if filter.Value != nil {
		value := *filter.Value
		destination.Value = &value
	} else {
		destination.Value = nil
	}

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

	// No error
	return nil
}

// Initialize_From_NumberLessThanAdvancedFilter_STATUS populates our NumberLessThanAdvancedFilter from the provided source NumberLessThanAdvancedFilter_STATUS
func (filter *NumberLessThanAdvancedFilter) Initialize_From_NumberLessThanAdvancedFilter_STATUS(source *NumberLessThanAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := genruntime.ToEnum(string(*source.OperatorType), numberLessThanAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorType
	} else {
		filter.OperatorType = nil
	}

	// Value
	if source.Value != nil {
		value := *source.Value
		filter.Value = &value
	} else {
		filter.Value = nil
	}

	// No error
	return nil
}

type NumberLessThanAdvancedFilter_STATUS struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *NumberLessThanAdvancedFilter_OperatorType_STATUS `json:"operatorType,omitempty"`

	// Value: The filter value.
	Value *float64 `json:"value,omitempty"`
}

var _ genruntime.FromARMConverter = &NumberLessThanAdvancedFilter_STATUS{}

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp NumberLessThanAdvancedFilter_OperatorType_STATUS
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = NumberLessThanAdvancedFilter_OperatorType_STATUS(temp1)
	filter.OperatorType = &temp

	// Set property "Value":
	if typedInput.Value != nil {
		value := *typedInput.Value
		filter.Value = &value
	}

	// No error
	return nil
}

// AssignProperties_From_NumberLessThanAdvancedFilter_STATUS populates our NumberLessThanAdvancedFilter_STATUS from the provided source NumberLessThanAdvancedFilter_STATUS
func (filter *NumberLessThanAdvancedFilter_STATUS) AssignProperties_From_NumberLessThanAdvancedFilter_STATUS(source *storage.NumberLessThanAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, numberLessThanAdvancedFilter_OperatorType_STATUS_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Value
	if source.Value != nil {
		value := *source.Value
		filter.Value = &value
	} else {
		filter.Value = nil
	}

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Value
	if filter.Value != nil {
		value := *filter.Value
		destination.Value = &value
	} else {
		destination.Value = nil
	}

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

	// No error
	return nil
}

type NumberLessThanOrEqualsAdvancedFilter struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// +kubebuilder:validation:Required
	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *NumberLessThanOrEqualsAdvancedFilter_OperatorType `json:"operatorType,omitempty"`

	// Value: The filter value.
	Value *float64 `json:"value,omitempty"`
}

var _ genruntime.ARMTransformer = &NumberLessThanOrEqualsAdvancedFilter{}

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

	// Set property "Key":
	if filter.Key != nil {
		key := *filter.Key
		result.Key = &key
	}

	// Set property "OperatorType":
	if filter.OperatorType != nil {
		var temp arm.NumberLessThanOrEqualsAdvancedFilter_OperatorType
		var temp1 string
		temp1 = string(*filter.OperatorType)
		temp = arm.NumberLessThanOrEqualsAdvancedFilter_OperatorType(temp1)
		result.OperatorType = temp
	}

	// Set property "Value":
	if filter.Value != nil {
		value := *filter.Value
		result.Value = &value
	}
	return result, nil
}

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp NumberLessThanOrEqualsAdvancedFilter_OperatorType
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = NumberLessThanOrEqualsAdvancedFilter_OperatorType(temp1)
	filter.OperatorType = &temp

	// Set property "Value":
	if typedInput.Value != nil {
		value := *typedInput.Value
		filter.Value = &value
	}

	// No error
	return nil
}

// AssignProperties_From_NumberLessThanOrEqualsAdvancedFilter populates our NumberLessThanOrEqualsAdvancedFilter from the provided source NumberLessThanOrEqualsAdvancedFilter
func (filter *NumberLessThanOrEqualsAdvancedFilter) AssignProperties_From_NumberLessThanOrEqualsAdvancedFilter(source *storage.NumberLessThanOrEqualsAdvancedFilter) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, numberLessThanOrEqualsAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Value
	if source.Value != nil {
		value := *source.Value
		filter.Value = &value
	} else {
		filter.Value = nil
	}

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Value
	if filter.Value != nil {
		value := *filter.Value
		destination.Value = &value
	} else {
		destination.Value = nil
	}

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

	// No error
	return nil
}

// Initialize_From_NumberLessThanOrEqualsAdvancedFilter_STATUS populates our NumberLessThanOrEqualsAdvancedFilter from the provided source NumberLessThanOrEqualsAdvancedFilter_STATUS
func (filter *NumberLessThanOrEqualsAdvancedFilter) Initialize_From_NumberLessThanOrEqualsAdvancedFilter_STATUS(source *NumberLessThanOrEqualsAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := genruntime.ToEnum(string(*source.OperatorType), numberLessThanOrEqualsAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorType
	} else {
		filter.OperatorType = nil
	}

	// Value
	if source.Value != nil {
		value := *source.Value
		filter.Value = &value
	} else {
		filter.Value = nil
	}

	// No error
	return nil
}

type NumberLessThanOrEqualsAdvancedFilter_STATUS struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *NumberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS `json:"operatorType,omitempty"`

	// Value: The filter value.
	Value *float64 `json:"value,omitempty"`
}

var _ genruntime.FromARMConverter = &NumberLessThanOrEqualsAdvancedFilter_STATUS{}

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp NumberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = NumberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS(temp1)
	filter.OperatorType = &temp

	// Set property "Value":
	if typedInput.Value != nil {
		value := *typedInput.Value
		filter.Value = &value
	}

	// No error
	return nil
}

// AssignProperties_From_NumberLessThanOrEqualsAdvancedFilter_STATUS populates our NumberLessThanOrEqualsAdvancedFilter_STATUS from the provided source NumberLessThanOrEqualsAdvancedFilter_STATUS
func (filter *NumberLessThanOrEqualsAdvancedFilter_STATUS) AssignProperties_From_NumberLessThanOrEqualsAdvancedFilter_STATUS(source *storage.NumberLessThanOrEqualsAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, numberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Value
	if source.Value != nil {
		value := *source.Value
		filter.Value = &value
	} else {
		filter.Value = nil
	}

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Value
	if filter.Value != nil {
		value := *filter.Value
		destination.Value = &value
	} else {
		destination.Value = nil
	}

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

	// No error
	return nil
}

type NumberNotInAdvancedFilter struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// +kubebuilder:validation:Required
	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *NumberNotInAdvancedFilter_OperatorType `json:"operatorType,omitempty"`

	// Values: The set of filter values.
	Values []float64 `json:"values,omitempty"`
}

var _ genruntime.ARMTransformer = &NumberNotInAdvancedFilter{}

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

	// Set property "Key":
	if filter.Key != nil {
		key := *filter.Key
		result.Key = &key
	}

	// Set property "OperatorType":
	if filter.OperatorType != nil {
		var temp arm.NumberNotInAdvancedFilter_OperatorType
		var temp1 string
		temp1 = string(*filter.OperatorType)
		temp = arm.NumberNotInAdvancedFilter_OperatorType(temp1)
		result.OperatorType = temp
	}

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

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp NumberNotInAdvancedFilter_OperatorType
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = NumberNotInAdvancedFilter_OperatorType(temp1)
	filter.OperatorType = &temp

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

	// No error
	return nil
}

// AssignProperties_From_NumberNotInAdvancedFilter populates our NumberNotInAdvancedFilter from the provided source NumberNotInAdvancedFilter
func (filter *NumberNotInAdvancedFilter) AssignProperties_From_NumberNotInAdvancedFilter(source *storage.NumberNotInAdvancedFilter) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, numberNotInAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Values
	if source.Values != nil {
		valueList := make([]float64, len(source.Values))
		for valueIndex, valueItem := range source.Values {
			valueList[valueIndex] = valueItem
		}
		filter.Values = valueList
	} else {
		filter.Values = nil
	}

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Values
	if filter.Values != nil {
		valueList := make([]float64, len(filter.Values))
		for valueIndex, valueItem := range filter.Values {
			valueList[valueIndex] = valueItem
		}
		destination.Values = valueList
	} else {
		destination.Values = nil
	}

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

	// No error
	return nil
}

// Initialize_From_NumberNotInAdvancedFilter_STATUS populates our NumberNotInAdvancedFilter from the provided source NumberNotInAdvancedFilter_STATUS
func (filter *NumberNotInAdvancedFilter) Initialize_From_NumberNotInAdvancedFilter_STATUS(source *NumberNotInAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := genruntime.ToEnum(string(*source.OperatorType), numberNotInAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorType
	} else {
		filter.OperatorType = nil
	}

	// Values
	if source.Values != nil {
		valueList := make([]float64, len(source.Values))
		for valueIndex, valueItem := range source.Values {
			valueList[valueIndex] = valueItem
		}
		filter.Values = valueList
	} else {
		filter.Values = nil
	}

	// No error
	return nil
}

type NumberNotInAdvancedFilter_STATUS struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *NumberNotInAdvancedFilter_OperatorType_STATUS `json:"operatorType,omitempty"`

	// Values: The set of filter values.
	Values []float64 `json:"values,omitempty"`
}

var _ genruntime.FromARMConverter = &NumberNotInAdvancedFilter_STATUS{}

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp NumberNotInAdvancedFilter_OperatorType_STATUS
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = NumberNotInAdvancedFilter_OperatorType_STATUS(temp1)
	filter.OperatorType = &temp

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

	// No error
	return nil
}

// AssignProperties_From_NumberNotInAdvancedFilter_STATUS populates our NumberNotInAdvancedFilter_STATUS from the provided source NumberNotInAdvancedFilter_STATUS
func (filter *NumberNotInAdvancedFilter_STATUS) AssignProperties_From_NumberNotInAdvancedFilter_STATUS(source *storage.NumberNotInAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, numberNotInAdvancedFilter_OperatorType_STATUS_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Values
	if source.Values != nil {
		valueList := make([]float64, len(source.Values))
		for valueIndex, valueItem := range source.Values {
			valueList[valueIndex] = valueItem
		}
		filter.Values = valueList
	} else {
		filter.Values = nil
	}

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Values
	if filter.Values != nil {
		valueList := make([]float64, len(filter.Values))
		for valueIndex, valueItem := range filter.Values {
			valueList[valueIndex] = valueItem
		}
		destination.Values = valueList
	} else {
		destination.Values = nil
	}

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

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"ServiceBusQueue"}
type ServiceBusQueueEventSubscriptionDestination_EndpointType string

const ServiceBusQueueEventSubscriptionDestination_EndpointType_ServiceBusQueue = ServiceBusQueueEventSubscriptionDestination_EndpointType("ServiceBusQueue")

// Mapping from string to ServiceBusQueueEventSubscriptionDestination_EndpointType
var serviceBusQueueEventSubscriptionDestination_EndpointType_Values = map[string]ServiceBusQueueEventSubscriptionDestination_EndpointType{
	"servicebusqueue": ServiceBusQueueEventSubscriptionDestination_EndpointType_ServiceBusQueue,
}

type ServiceBusQueueEventSubscriptionDestination_EndpointType_STATUS string

const ServiceBusQueueEventSubscriptionDestination_EndpointType_STATUS_ServiceBusQueue = ServiceBusQueueEventSubscriptionDestination_EndpointType_STATUS("ServiceBusQueue")

// Mapping from string to ServiceBusQueueEventSubscriptionDestination_EndpointType_STATUS
var serviceBusQueueEventSubscriptionDestination_EndpointType_STATUS_Values = map[string]ServiceBusQueueEventSubscriptionDestination_EndpointType_STATUS{
	"servicebusqueue": ServiceBusQueueEventSubscriptionDestination_EndpointType_STATUS_ServiceBusQueue,
}

// +kubebuilder:validation:Enum={"ServiceBusTopic"}
type ServiceBusTopicEventSubscriptionDestination_EndpointType string

const ServiceBusTopicEventSubscriptionDestination_EndpointType_ServiceBusTopic = ServiceBusTopicEventSubscriptionDestination_EndpointType("ServiceBusTopic")

// Mapping from string to ServiceBusTopicEventSubscriptionDestination_EndpointType
var serviceBusTopicEventSubscriptionDestination_EndpointType_Values = map[string]ServiceBusTopicEventSubscriptionDestination_EndpointType{
	"servicebustopic": ServiceBusTopicEventSubscriptionDestination_EndpointType_ServiceBusTopic,
}

type ServiceBusTopicEventSubscriptionDestination_EndpointType_STATUS string

const ServiceBusTopicEventSubscriptionDestination_EndpointType_STATUS_ServiceBusTopic = ServiceBusTopicEventSubscriptionDestination_EndpointType_STATUS("ServiceBusTopic")

// Mapping from string to ServiceBusTopicEventSubscriptionDestination_EndpointType_STATUS
var serviceBusTopicEventSubscriptionDestination_EndpointType_STATUS_Values = map[string]ServiceBusTopicEventSubscriptionDestination_EndpointType_STATUS{
	"servicebustopic": ServiceBusTopicEventSubscriptionDestination_EndpointType_STATUS_ServiceBusTopic,
}

// +kubebuilder:validation:Enum={"StorageBlob"}
type StorageBlobDeadLetterDestination_EndpointType string

const StorageBlobDeadLetterDestination_EndpointType_StorageBlob = StorageBlobDeadLetterDestination_EndpointType("StorageBlob")

// Mapping from string to StorageBlobDeadLetterDestination_EndpointType
var storageBlobDeadLetterDestination_EndpointType_Values = map[string]StorageBlobDeadLetterDestination_EndpointType{
	"storageblob": StorageBlobDeadLetterDestination_EndpointType_StorageBlob,
}

type StorageBlobDeadLetterDestination_EndpointType_STATUS string

const StorageBlobDeadLetterDestination_EndpointType_STATUS_StorageBlob = StorageBlobDeadLetterDestination_EndpointType_STATUS("StorageBlob")

// Mapping from string to StorageBlobDeadLetterDestination_EndpointType_STATUS
var storageBlobDeadLetterDestination_EndpointType_STATUS_Values = map[string]StorageBlobDeadLetterDestination_EndpointType_STATUS{
	"storageblob": StorageBlobDeadLetterDestination_EndpointType_STATUS_StorageBlob,
}

// +kubebuilder:validation:Enum={"StorageQueue"}
type StorageQueueEventSubscriptionDestination_EndpointType string

const StorageQueueEventSubscriptionDestination_EndpointType_StorageQueue = StorageQueueEventSubscriptionDestination_EndpointType("StorageQueue")

// Mapping from string to StorageQueueEventSubscriptionDestination_EndpointType
var storageQueueEventSubscriptionDestination_EndpointType_Values = map[string]StorageQueueEventSubscriptionDestination_EndpointType{
	"storagequeue": StorageQueueEventSubscriptionDestination_EndpointType_StorageQueue,
}

type StorageQueueEventSubscriptionDestination_EndpointType_STATUS string

const StorageQueueEventSubscriptionDestination_EndpointType_STATUS_StorageQueue = StorageQueueEventSubscriptionDestination_EndpointType_STATUS("StorageQueue")

// Mapping from string to StorageQueueEventSubscriptionDestination_EndpointType_STATUS
var storageQueueEventSubscriptionDestination_EndpointType_STATUS_Values = map[string]StorageQueueEventSubscriptionDestination_EndpointType_STATUS{
	"storagequeue": StorageQueueEventSubscriptionDestination_EndpointType_STATUS_StorageQueue,
}

type StringBeginsWithAdvancedFilter struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// +kubebuilder:validation:Required
	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *StringBeginsWithAdvancedFilter_OperatorType `json:"operatorType,omitempty"`

	// Values: The set of filter values.
	Values []string `json:"values,omitempty"`
}

var _ genruntime.ARMTransformer = &StringBeginsWithAdvancedFilter{}

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

	// Set property "Key":
	if filter.Key != nil {
		key := *filter.Key
		result.Key = &key
	}

	// Set property "OperatorType":
	if filter.OperatorType != nil {
		var temp arm.StringBeginsWithAdvancedFilter_OperatorType
		var temp1 string
		temp1 = string(*filter.OperatorType)
		temp = arm.StringBeginsWithAdvancedFilter_OperatorType(temp1)
		result.OperatorType = temp
	}

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

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp StringBeginsWithAdvancedFilter_OperatorType
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = StringBeginsWithAdvancedFilter_OperatorType(temp1)
	filter.OperatorType = &temp

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

	// No error
	return nil
}

// AssignProperties_From_StringBeginsWithAdvancedFilter populates our StringBeginsWithAdvancedFilter from the provided source StringBeginsWithAdvancedFilter
func (filter *StringBeginsWithAdvancedFilter) AssignProperties_From_StringBeginsWithAdvancedFilter(source *storage.StringBeginsWithAdvancedFilter) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, stringBeginsWithAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Values
	filter.Values = genruntime.CloneSliceOfString(source.Values)

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Values
	destination.Values = genruntime.CloneSliceOfString(filter.Values)

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

	// No error
	return nil
}

// Initialize_From_StringBeginsWithAdvancedFilter_STATUS populates our StringBeginsWithAdvancedFilter from the provided source StringBeginsWithAdvancedFilter_STATUS
func (filter *StringBeginsWithAdvancedFilter) Initialize_From_StringBeginsWithAdvancedFilter_STATUS(source *StringBeginsWithAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := genruntime.ToEnum(string(*source.OperatorType), stringBeginsWithAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorType
	} else {
		filter.OperatorType = nil
	}

	// Values
	filter.Values = genruntime.CloneSliceOfString(source.Values)

	// No error
	return nil
}

type StringBeginsWithAdvancedFilter_STATUS struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *StringBeginsWithAdvancedFilter_OperatorType_STATUS `json:"operatorType,omitempty"`

	// Values: The set of filter values.
	Values []string `json:"values,omitempty"`
}

var _ genruntime.FromARMConverter = &StringBeginsWithAdvancedFilter_STATUS{}

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp StringBeginsWithAdvancedFilter_OperatorType_STATUS
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = StringBeginsWithAdvancedFilter_OperatorType_STATUS(temp1)
	filter.OperatorType = &temp

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

	// No error
	return nil
}

// AssignProperties_From_StringBeginsWithAdvancedFilter_STATUS populates our StringBeginsWithAdvancedFilter_STATUS from the provided source StringBeginsWithAdvancedFilter_STATUS
func (filter *StringBeginsWithAdvancedFilter_STATUS) AssignProperties_From_StringBeginsWithAdvancedFilter_STATUS(source *storage.StringBeginsWithAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, stringBeginsWithAdvancedFilter_OperatorType_STATUS_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Values
	filter.Values = genruntime.CloneSliceOfString(source.Values)

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Values
	destination.Values = genruntime.CloneSliceOfString(filter.Values)

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

	// No error
	return nil
}

type StringContainsAdvancedFilter struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// +kubebuilder:validation:Required
	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *StringContainsAdvancedFilter_OperatorType `json:"operatorType,omitempty"`

	// Values: The set of filter values.
	Values []string `json:"values,omitempty"`
}

var _ genruntime.ARMTransformer = &StringContainsAdvancedFilter{}

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

	// Set property "Key":
	if filter.Key != nil {
		key := *filter.Key
		result.Key = &key
	}

	// Set property "OperatorType":
	if filter.OperatorType != nil {
		var temp arm.StringContainsAdvancedFilter_OperatorType
		var temp1 string
		temp1 = string(*filter.OperatorType)
		temp = arm.StringContainsAdvancedFilter_OperatorType(temp1)
		result.OperatorType = temp
	}

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

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp StringContainsAdvancedFilter_OperatorType
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = StringContainsAdvancedFilter_OperatorType(temp1)
	filter.OperatorType = &temp

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

	// No error
	return nil
}

// AssignProperties_From_StringContainsAdvancedFilter populates our StringContainsAdvancedFilter from the provided source StringContainsAdvancedFilter
func (filter *StringContainsAdvancedFilter) AssignProperties_From_StringContainsAdvancedFilter(source *storage.StringContainsAdvancedFilter) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, stringContainsAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Values
	filter.Values = genruntime.CloneSliceOfString(source.Values)

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Values
	destination.Values = genruntime.CloneSliceOfString(filter.Values)

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

	// No error
	return nil
}

// Initialize_From_StringContainsAdvancedFilter_STATUS populates our StringContainsAdvancedFilter from the provided source StringContainsAdvancedFilter_STATUS
func (filter *StringContainsAdvancedFilter) Initialize_From_StringContainsAdvancedFilter_STATUS(source *StringContainsAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := genruntime.ToEnum(string(*source.OperatorType), stringContainsAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorType
	} else {
		filter.OperatorType = nil
	}

	// Values
	filter.Values = genruntime.CloneSliceOfString(source.Values)

	// No error
	return nil
}

type StringContainsAdvancedFilter_STATUS struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *StringContainsAdvancedFilter_OperatorType_STATUS `json:"operatorType,omitempty"`

	// Values: The set of filter values.
	Values []string `json:"values,omitempty"`
}

var _ genruntime.FromARMConverter = &StringContainsAdvancedFilter_STATUS{}

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp StringContainsAdvancedFilter_OperatorType_STATUS
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = StringContainsAdvancedFilter_OperatorType_STATUS(temp1)
	filter.OperatorType = &temp

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

	// No error
	return nil
}

// AssignProperties_From_StringContainsAdvancedFilter_STATUS populates our StringContainsAdvancedFilter_STATUS from the provided source StringContainsAdvancedFilter_STATUS
func (filter *StringContainsAdvancedFilter_STATUS) AssignProperties_From_StringContainsAdvancedFilter_STATUS(source *storage.StringContainsAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, stringContainsAdvancedFilter_OperatorType_STATUS_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Values
	filter.Values = genruntime.CloneSliceOfString(source.Values)

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Values
	destination.Values = genruntime.CloneSliceOfString(filter.Values)

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

	// No error
	return nil
}

type StringEndsWithAdvancedFilter struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// +kubebuilder:validation:Required
	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *StringEndsWithAdvancedFilter_OperatorType `json:"operatorType,omitempty"`

	// Values: The set of filter values.
	Values []string `json:"values,omitempty"`
}

var _ genruntime.ARMTransformer = &StringEndsWithAdvancedFilter{}

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

	// Set property "Key":
	if filter.Key != nil {
		key := *filter.Key
		result.Key = &key
	}

	// Set property "OperatorType":
	if filter.OperatorType != nil {
		var temp arm.StringEndsWithAdvancedFilter_OperatorType
		var temp1 string
		temp1 = string(*filter.OperatorType)
		temp = arm.StringEndsWithAdvancedFilter_OperatorType(temp1)
		result.OperatorType = temp
	}

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

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp StringEndsWithAdvancedFilter_OperatorType
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = StringEndsWithAdvancedFilter_OperatorType(temp1)
	filter.OperatorType = &temp

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

	// No error
	return nil
}

// AssignProperties_From_StringEndsWithAdvancedFilter populates our StringEndsWithAdvancedFilter from the provided source StringEndsWithAdvancedFilter
func (filter *StringEndsWithAdvancedFilter) AssignProperties_From_StringEndsWithAdvancedFilter(source *storage.StringEndsWithAdvancedFilter) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, stringEndsWithAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Values
	filter.Values = genruntime.CloneSliceOfString(source.Values)

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Values
	destination.Values = genruntime.CloneSliceOfString(filter.Values)

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

	// No error
	return nil
}

// Initialize_From_StringEndsWithAdvancedFilter_STATUS populates our StringEndsWithAdvancedFilter from the provided source StringEndsWithAdvancedFilter_STATUS
func (filter *StringEndsWithAdvancedFilter) Initialize_From_StringEndsWithAdvancedFilter_STATUS(source *StringEndsWithAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := genruntime.ToEnum(string(*source.OperatorType), stringEndsWithAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorType
	} else {
		filter.OperatorType = nil
	}

	// Values
	filter.Values = genruntime.CloneSliceOfString(source.Values)

	// No error
	return nil
}

type StringEndsWithAdvancedFilter_STATUS struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *StringEndsWithAdvancedFilter_OperatorType_STATUS `json:"operatorType,omitempty"`

	// Values: The set of filter values.
	Values []string `json:"values,omitempty"`
}

var _ genruntime.FromARMConverter = &StringEndsWithAdvancedFilter_STATUS{}

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp StringEndsWithAdvancedFilter_OperatorType_STATUS
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = StringEndsWithAdvancedFilter_OperatorType_STATUS(temp1)
	filter.OperatorType = &temp

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

	// No error
	return nil
}

// AssignProperties_From_StringEndsWithAdvancedFilter_STATUS populates our StringEndsWithAdvancedFilter_STATUS from the provided source StringEndsWithAdvancedFilter_STATUS
func (filter *StringEndsWithAdvancedFilter_STATUS) AssignProperties_From_StringEndsWithAdvancedFilter_STATUS(source *storage.StringEndsWithAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, stringEndsWithAdvancedFilter_OperatorType_STATUS_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Values
	filter.Values = genruntime.CloneSliceOfString(source.Values)

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Values
	destination.Values = genruntime.CloneSliceOfString(filter.Values)

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

	// No error
	return nil
}

type StringInAdvancedFilter struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// +kubebuilder:validation:Required
	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *StringInAdvancedFilter_OperatorType `json:"operatorType,omitempty"`

	// Values: The set of filter values.
	Values []string `json:"values,omitempty"`
}

var _ genruntime.ARMTransformer = &StringInAdvancedFilter{}

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

	// Set property "Key":
	if filter.Key != nil {
		key := *filter.Key
		result.Key = &key
	}

	// Set property "OperatorType":
	if filter.OperatorType != nil {
		var temp arm.StringInAdvancedFilter_OperatorType
		var temp1 string
		temp1 = string(*filter.OperatorType)
		temp = arm.StringInAdvancedFilter_OperatorType(temp1)
		result.OperatorType = temp
	}

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

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp StringInAdvancedFilter_OperatorType
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = StringInAdvancedFilter_OperatorType(temp1)
	filter.OperatorType = &temp

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

	// No error
	return nil
}

// AssignProperties_From_StringInAdvancedFilter populates our StringInAdvancedFilter from the provided source StringInAdvancedFilter
func (filter *StringInAdvancedFilter) AssignProperties_From_StringInAdvancedFilter(source *storage.StringInAdvancedFilter) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, stringInAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Values
	filter.Values = genruntime.CloneSliceOfString(source.Values)

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Values
	destination.Values = genruntime.CloneSliceOfString(filter.Values)

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

	// No error
	return nil
}

// Initialize_From_StringInAdvancedFilter_STATUS populates our StringInAdvancedFilter from the provided source StringInAdvancedFilter_STATUS
func (filter *StringInAdvancedFilter) Initialize_From_StringInAdvancedFilter_STATUS(source *StringInAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := genruntime.ToEnum(string(*source.OperatorType), stringInAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorType
	} else {
		filter.OperatorType = nil
	}

	// Values
	filter.Values = genruntime.CloneSliceOfString(source.Values)

	// No error
	return nil
}

type StringInAdvancedFilter_STATUS struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *StringInAdvancedFilter_OperatorType_STATUS `json:"operatorType,omitempty"`

	// Values: The set of filter values.
	Values []string `json:"values,omitempty"`
}

var _ genruntime.FromARMConverter = &StringInAdvancedFilter_STATUS{}

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp StringInAdvancedFilter_OperatorType_STATUS
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = StringInAdvancedFilter_OperatorType_STATUS(temp1)
	filter.OperatorType = &temp

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

	// No error
	return nil
}

// AssignProperties_From_StringInAdvancedFilter_STATUS populates our StringInAdvancedFilter_STATUS from the provided source StringInAdvancedFilter_STATUS
func (filter *StringInAdvancedFilter_STATUS) AssignProperties_From_StringInAdvancedFilter_STATUS(source *storage.StringInAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, stringInAdvancedFilter_OperatorType_STATUS_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Values
	filter.Values = genruntime.CloneSliceOfString(source.Values)

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Values
	destination.Values = genruntime.CloneSliceOfString(filter.Values)

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

	// No error
	return nil
}

type StringNotInAdvancedFilter struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// +kubebuilder:validation:Required
	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *StringNotInAdvancedFilter_OperatorType `json:"operatorType,omitempty"`

	// Values: The set of filter values.
	Values []string `json:"values,omitempty"`
}

var _ genruntime.ARMTransformer = &StringNotInAdvancedFilter{}

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

	// Set property "Key":
	if filter.Key != nil {
		key := *filter.Key
		result.Key = &key
	}

	// Set property "OperatorType":
	if filter.OperatorType != nil {
		var temp arm.StringNotInAdvancedFilter_OperatorType
		var temp1 string
		temp1 = string(*filter.OperatorType)
		temp = arm.StringNotInAdvancedFilter_OperatorType(temp1)
		result.OperatorType = temp
	}

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

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp StringNotInAdvancedFilter_OperatorType
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = StringNotInAdvancedFilter_OperatorType(temp1)
	filter.OperatorType = &temp

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

	// No error
	return nil
}

// AssignProperties_From_StringNotInAdvancedFilter populates our StringNotInAdvancedFilter from the provided source StringNotInAdvancedFilter
func (filter *StringNotInAdvancedFilter) AssignProperties_From_StringNotInAdvancedFilter(source *storage.StringNotInAdvancedFilter) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, stringNotInAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Values
	filter.Values = genruntime.CloneSliceOfString(source.Values)

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Values
	destination.Values = genruntime.CloneSliceOfString(filter.Values)

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

	// No error
	return nil
}

// Initialize_From_StringNotInAdvancedFilter_STATUS populates our StringNotInAdvancedFilter from the provided source StringNotInAdvancedFilter_STATUS
func (filter *StringNotInAdvancedFilter) Initialize_From_StringNotInAdvancedFilter_STATUS(source *StringNotInAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := genruntime.ToEnum(string(*source.OperatorType), stringNotInAdvancedFilter_OperatorType_Values)
		filter.OperatorType = &operatorType
	} else {
		filter.OperatorType = nil
	}

	// Values
	filter.Values = genruntime.CloneSliceOfString(source.Values)

	// No error
	return nil
}

type StringNotInAdvancedFilter_STATUS struct {
	// Key: The field/property in the event based on which you want to filter.
	Key *string `json:"key,omitempty"`

	// OperatorType: The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
	OperatorType *StringNotInAdvancedFilter_OperatorType_STATUS `json:"operatorType,omitempty"`

	// Values: The set of filter values.
	Values []string `json:"values,omitempty"`
}

var _ genruntime.FromARMConverter = &StringNotInAdvancedFilter_STATUS{}

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

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

	// Set property "Key":
	if typedInput.Key != nil {
		key := *typedInput.Key
		filter.Key = &key
	}

	// Set property "OperatorType":
	var temp StringNotInAdvancedFilter_OperatorType_STATUS
	var temp1 string
	temp1 = string(typedInput.OperatorType)
	temp = StringNotInAdvancedFilter_OperatorType_STATUS(temp1)
	filter.OperatorType = &temp

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

	// No error
	return nil
}

// AssignProperties_From_StringNotInAdvancedFilter_STATUS populates our StringNotInAdvancedFilter_STATUS from the provided source StringNotInAdvancedFilter_STATUS
func (filter *StringNotInAdvancedFilter_STATUS) AssignProperties_From_StringNotInAdvancedFilter_STATUS(source *storage.StringNotInAdvancedFilter_STATUS) error {

	// Key
	filter.Key = genruntime.ClonePointerToString(source.Key)

	// OperatorType
	if source.OperatorType != nil {
		operatorType := *source.OperatorType
		operatorTypeTemp := genruntime.ToEnum(operatorType, stringNotInAdvancedFilter_OperatorType_STATUS_Values)
		filter.OperatorType = &operatorTypeTemp
	} else {
		filter.OperatorType = nil
	}

	// Values
	filter.Values = genruntime.CloneSliceOfString(source.Values)

	// No error
	return nil
}

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

	// Key
	destination.Key = genruntime.ClonePointerToString(filter.Key)

	// OperatorType
	if filter.OperatorType != nil {
		operatorType := string(*filter.OperatorType)
		destination.OperatorType = &operatorType
	} else {
		destination.OperatorType = nil
	}

	// Values
	destination.Values = genruntime.CloneSliceOfString(filter.Values)

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

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"WebHook"}
type WebHookEventSubscriptionDestination_EndpointType string

const WebHookEventSubscriptionDestination_EndpointType_WebHook = WebHookEventSubscriptionDestination_EndpointType("WebHook")

// Mapping from string to WebHookEventSubscriptionDestination_EndpointType
var webHookEventSubscriptionDestination_EndpointType_Values = map[string]WebHookEventSubscriptionDestination_EndpointType{
	"webhook": WebHookEventSubscriptionDestination_EndpointType_WebHook,
}

type WebHookEventSubscriptionDestination_EndpointType_STATUS string

const WebHookEventSubscriptionDestination_EndpointType_STATUS_WebHook = WebHookEventSubscriptionDestination_EndpointType_STATUS("WebHook")

// Mapping from string to WebHookEventSubscriptionDestination_EndpointType_STATUS
var webHookEventSubscriptionDestination_EndpointType_STATUS_Values = map[string]WebHookEventSubscriptionDestination_EndpointType_STATUS{
	"webhook": WebHookEventSubscriptionDestination_EndpointType_STATUS_WebHook,
}

// +kubebuilder:validation:Enum={"BoolEquals"}
type BoolEqualsAdvancedFilter_OperatorType string

const BoolEqualsAdvancedFilter_OperatorType_BoolEquals = BoolEqualsAdvancedFilter_OperatorType("BoolEquals")

// Mapping from string to BoolEqualsAdvancedFilter_OperatorType
var boolEqualsAdvancedFilter_OperatorType_Values = map[string]BoolEqualsAdvancedFilter_OperatorType{
	"boolequals": BoolEqualsAdvancedFilter_OperatorType_BoolEquals,
}

type BoolEqualsAdvancedFilter_OperatorType_STATUS string

const BoolEqualsAdvancedFilter_OperatorType_STATUS_BoolEquals = BoolEqualsAdvancedFilter_OperatorType_STATUS("BoolEquals")

// Mapping from string to BoolEqualsAdvancedFilter_OperatorType_STATUS
var boolEqualsAdvancedFilter_OperatorType_STATUS_Values = map[string]BoolEqualsAdvancedFilter_OperatorType_STATUS{
	"boolequals": BoolEqualsAdvancedFilter_OperatorType_STATUS_BoolEquals,
}

// +kubebuilder:validation:Enum={"NumberGreaterThan"}
type NumberGreaterThanAdvancedFilter_OperatorType string

const NumberGreaterThanAdvancedFilter_OperatorType_NumberGreaterThan = NumberGreaterThanAdvancedFilter_OperatorType("NumberGreaterThan")

// Mapping from string to NumberGreaterThanAdvancedFilter_OperatorType
var numberGreaterThanAdvancedFilter_OperatorType_Values = map[string]NumberGreaterThanAdvancedFilter_OperatorType{
	"numbergreaterthan": NumberGreaterThanAdvancedFilter_OperatorType_NumberGreaterThan,
}

type NumberGreaterThanAdvancedFilter_OperatorType_STATUS string

const NumberGreaterThanAdvancedFilter_OperatorType_STATUS_NumberGreaterThan = NumberGreaterThanAdvancedFilter_OperatorType_STATUS("NumberGreaterThan")

// Mapping from string to NumberGreaterThanAdvancedFilter_OperatorType_STATUS
var numberGreaterThanAdvancedFilter_OperatorType_STATUS_Values = map[string]NumberGreaterThanAdvancedFilter_OperatorType_STATUS{
	"numbergreaterthan": NumberGreaterThanAdvancedFilter_OperatorType_STATUS_NumberGreaterThan,
}

// +kubebuilder:validation:Enum={"NumberGreaterThanOrEquals"}
type NumberGreaterThanOrEqualsAdvancedFilter_OperatorType string

const NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_NumberGreaterThanOrEquals = NumberGreaterThanOrEqualsAdvancedFilter_OperatorType("NumberGreaterThanOrEquals")

// Mapping from string to NumberGreaterThanOrEqualsAdvancedFilter_OperatorType
var numberGreaterThanOrEqualsAdvancedFilter_OperatorType_Values = map[string]NumberGreaterThanOrEqualsAdvancedFilter_OperatorType{
	"numbergreaterthanorequals": NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_NumberGreaterThanOrEquals,
}

type NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS string

const NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS_NumberGreaterThanOrEquals = NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS("NumberGreaterThanOrEquals")

// Mapping from string to NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS
var numberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS_Values = map[string]NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS{
	"numbergreaterthanorequals": NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS_NumberGreaterThanOrEquals,
}

// +kubebuilder:validation:Enum={"NumberIn"}
type NumberInAdvancedFilter_OperatorType string

const NumberInAdvancedFilter_OperatorType_NumberIn = NumberInAdvancedFilter_OperatorType("NumberIn")

// Mapping from string to NumberInAdvancedFilter_OperatorType
var numberInAdvancedFilter_OperatorType_Values = map[string]NumberInAdvancedFilter_OperatorType{
	"numberin": NumberInAdvancedFilter_OperatorType_NumberIn,
}

type NumberInAdvancedFilter_OperatorType_STATUS string

const NumberInAdvancedFilter_OperatorType_STATUS_NumberIn = NumberInAdvancedFilter_OperatorType_STATUS("NumberIn")

// Mapping from string to NumberInAdvancedFilter_OperatorType_STATUS
var numberInAdvancedFilter_OperatorType_STATUS_Values = map[string]NumberInAdvancedFilter_OperatorType_STATUS{
	"numberin": NumberInAdvancedFilter_OperatorType_STATUS_NumberIn,
}

// +kubebuilder:validation:Enum={"NumberLessThan"}
type NumberLessThanAdvancedFilter_OperatorType string

const NumberLessThanAdvancedFilter_OperatorType_NumberLessThan = NumberLessThanAdvancedFilter_OperatorType("NumberLessThan")

// Mapping from string to NumberLessThanAdvancedFilter_OperatorType
var numberLessThanAdvancedFilter_OperatorType_Values = map[string]NumberLessThanAdvancedFilter_OperatorType{
	"numberlessthan": NumberLessThanAdvancedFilter_OperatorType_NumberLessThan,
}

type NumberLessThanAdvancedFilter_OperatorType_STATUS string

const NumberLessThanAdvancedFilter_OperatorType_STATUS_NumberLessThan = NumberLessThanAdvancedFilter_OperatorType_STATUS("NumberLessThan")

// Mapping from string to NumberLessThanAdvancedFilter_OperatorType_STATUS
var numberLessThanAdvancedFilter_OperatorType_STATUS_Values = map[string]NumberLessThanAdvancedFilter_OperatorType_STATUS{
	"numberlessthan": NumberLessThanAdvancedFilter_OperatorType_STATUS_NumberLessThan,
}

// +kubebuilder:validation:Enum={"NumberLessThanOrEquals"}
type NumberLessThanOrEqualsAdvancedFilter_OperatorType string

const NumberLessThanOrEqualsAdvancedFilter_OperatorType_NumberLessThanOrEquals = NumberLessThanOrEqualsAdvancedFilter_OperatorType("NumberLessThanOrEquals")

// Mapping from string to NumberLessThanOrEqualsAdvancedFilter_OperatorType
var numberLessThanOrEqualsAdvancedFilter_OperatorType_Values = map[string]NumberLessThanOrEqualsAdvancedFilter_OperatorType{
	"numberlessthanorequals": NumberLessThanOrEqualsAdvancedFilter_OperatorType_NumberLessThanOrEquals,
}

type NumberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS string

const NumberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS_NumberLessThanOrEquals = NumberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS("NumberLessThanOrEquals")

// Mapping from string to NumberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS
var numberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS_Values = map[string]NumberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS{
	"numberlessthanorequals": NumberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS_NumberLessThanOrEquals,
}

// +kubebuilder:validation:Enum={"NumberNotIn"}
type NumberNotInAdvancedFilter_OperatorType string

const NumberNotInAdvancedFilter_OperatorType_NumberNotIn = NumberNotInAdvancedFilter_OperatorType("NumberNotIn")

// Mapping from string to NumberNotInAdvancedFilter_OperatorType
var numberNotInAdvancedFilter_OperatorType_Values = map[string]NumberNotInAdvancedFilter_OperatorType{
	"numbernotin": NumberNotInAdvancedFilter_OperatorType_NumberNotIn,
}

type NumberNotInAdvancedFilter_OperatorType_STATUS string

const NumberNotInAdvancedFilter_OperatorType_STATUS_NumberNotIn = NumberNotInAdvancedFilter_OperatorType_STATUS("NumberNotIn")

// Mapping from string to NumberNotInAdvancedFilter_OperatorType_STATUS
var numberNotInAdvancedFilter_OperatorType_STATUS_Values = map[string]NumberNotInAdvancedFilter_OperatorType_STATUS{
	"numbernotin": NumberNotInAdvancedFilter_OperatorType_STATUS_NumberNotIn,
}

// +kubebuilder:validation:Enum={"StringBeginsWith"}
type StringBeginsWithAdvancedFilter_OperatorType string

const StringBeginsWithAdvancedFilter_OperatorType_StringBeginsWith = StringBeginsWithAdvancedFilter_OperatorType("StringBeginsWith")

// Mapping from string to StringBeginsWithAdvancedFilter_OperatorType
var stringBeginsWithAdvancedFilter_OperatorType_Values = map[string]StringBeginsWithAdvancedFilter_OperatorType{
	"stringbeginswith": StringBeginsWithAdvancedFilter_OperatorType_StringBeginsWith,
}

type StringBeginsWithAdvancedFilter_OperatorType_STATUS string

const StringBeginsWithAdvancedFilter_OperatorType_STATUS_StringBeginsWith = StringBeginsWithAdvancedFilter_OperatorType_STATUS("StringBeginsWith")

// Mapping from string to StringBeginsWithAdvancedFilter_OperatorType_STATUS
var stringBeginsWithAdvancedFilter_OperatorType_STATUS_Values = map[string]StringBeginsWithAdvancedFilter_OperatorType_STATUS{
	"stringbeginswith": StringBeginsWithAdvancedFilter_OperatorType_STATUS_StringBeginsWith,
}

// +kubebuilder:validation:Enum={"StringContains"}
type StringContainsAdvancedFilter_OperatorType string

const StringContainsAdvancedFilter_OperatorType_StringContains = StringContainsAdvancedFilter_OperatorType("StringContains")

// Mapping from string to StringContainsAdvancedFilter_OperatorType
var stringContainsAdvancedFilter_OperatorType_Values = map[string]StringContainsAdvancedFilter_OperatorType{
	"stringcontains": StringContainsAdvancedFilter_OperatorType_StringContains,
}

type StringContainsAdvancedFilter_OperatorType_STATUS string

const StringContainsAdvancedFilter_OperatorType_STATUS_StringContains = StringContainsAdvancedFilter_OperatorType_STATUS("StringContains")

// Mapping from string to StringContainsAdvancedFilter_OperatorType_STATUS
var stringContainsAdvancedFilter_OperatorType_STATUS_Values = map[string]StringContainsAdvancedFilter_OperatorType_STATUS{
	"stringcontains": StringContainsAdvancedFilter_OperatorType_STATUS_StringContains,
}

// +kubebuilder:validation:Enum={"StringEndsWith"}
type StringEndsWithAdvancedFilter_OperatorType string

const StringEndsWithAdvancedFilter_OperatorType_StringEndsWith = StringEndsWithAdvancedFilter_OperatorType("StringEndsWith")

// Mapping from string to StringEndsWithAdvancedFilter_OperatorType
var stringEndsWithAdvancedFilter_OperatorType_Values = map[string]StringEndsWithAdvancedFilter_OperatorType{
	"stringendswith": StringEndsWithAdvancedFilter_OperatorType_StringEndsWith,
}

type StringEndsWithAdvancedFilter_OperatorType_STATUS string

const StringEndsWithAdvancedFilter_OperatorType_STATUS_StringEndsWith = StringEndsWithAdvancedFilter_OperatorType_STATUS("StringEndsWith")

// Mapping from string to StringEndsWithAdvancedFilter_OperatorType_STATUS
var stringEndsWithAdvancedFilter_OperatorType_STATUS_Values = map[string]StringEndsWithAdvancedFilter_OperatorType_STATUS{
	"stringendswith": StringEndsWithAdvancedFilter_OperatorType_STATUS_StringEndsWith,
}

// +kubebuilder:validation:Enum={"StringIn"}
type StringInAdvancedFilter_OperatorType string

const StringInAdvancedFilter_OperatorType_StringIn = StringInAdvancedFilter_OperatorType("StringIn")

// Mapping from string to StringInAdvancedFilter_OperatorType
var stringInAdvancedFilter_OperatorType_Values = map[string]StringInAdvancedFilter_OperatorType{
	"stringin": StringInAdvancedFilter_OperatorType_StringIn,
}

type StringInAdvancedFilter_OperatorType_STATUS string

const StringInAdvancedFilter_OperatorType_STATUS_StringIn = StringInAdvancedFilter_OperatorType_STATUS("StringIn")

// Mapping from string to StringInAdvancedFilter_OperatorType_STATUS
var stringInAdvancedFilter_OperatorType_STATUS_Values = map[string]StringInAdvancedFilter_OperatorType_STATUS{
	"stringin": StringInAdvancedFilter_OperatorType_STATUS_StringIn,
}

// +kubebuilder:validation:Enum={"StringNotIn"}
type StringNotInAdvancedFilter_OperatorType string

const StringNotInAdvancedFilter_OperatorType_StringNotIn = StringNotInAdvancedFilter_OperatorType("StringNotIn")

// Mapping from string to StringNotInAdvancedFilter_OperatorType
var stringNotInAdvancedFilter_OperatorType_Values = map[string]StringNotInAdvancedFilter_OperatorType{
	"stringnotin": StringNotInAdvancedFilter_OperatorType_StringNotIn,
}

type StringNotInAdvancedFilter_OperatorType_STATUS string

const StringNotInAdvancedFilter_OperatorType_STATUS_StringNotIn = StringNotInAdvancedFilter_OperatorType_STATUS("StringNotIn")

// Mapping from string to StringNotInAdvancedFilter_OperatorType_STATUS
var stringNotInAdvancedFilter_OperatorType_STATUS_Values = map[string]StringNotInAdvancedFilter_OperatorType_STATUS{
	"stringnotin": StringNotInAdvancedFilter_OperatorType_STATUS_StringNotIn,
}

func init() {
	SchemeBuilder.Register(&EventSubscription{}, &EventSubscriptionList{})
}
