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

import (
	"fmt"
	arm "github.com/Azure/azure-service-operator/v2/api/signalrservice/v1api20211001/arm"
	storage "github.com/Azure/azure-service-operator/v2/api/signalrservice/v1api20211001/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,signalrservice}
// +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: /signalr/resource-manager/Microsoft.SignalRService/SignalRService/stable/2021-10-01/signalr.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}
type SignalR struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              SignalR_Spec   `json:"spec,omitempty"`
	Status            SignalR_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &SignalR{}

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

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

var _ conversion.Convertible = &SignalR{}

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

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

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

	return nil
}

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

	return nil
}

var _ configmaps.Exporter = &SignalR{}

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

var _ secrets.Exporter = &SignalR{}

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

var _ genruntime.KubernetesResource = &SignalR{}

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

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

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

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

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.SignalRService/signalR"
func (signalR *SignalR) GetType() string {
	return "Microsoft.SignalRService/signalR"
}

// NewEmptyStatus returns a new empty (blank) status
func (signalR *SignalR) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &SignalR_STATUS{}
}

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

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

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

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

	signalR.Status = st
	return nil
}

// AssignProperties_From_SignalR populates our SignalR from the provided source SignalR
func (signalR *SignalR) AssignProperties_From_SignalR(source *storage.SignalR) error {

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

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

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

	// No error
	return nil
}

// AssignProperties_To_SignalR populates the provided destination SignalR from our SignalR
func (signalR *SignalR) AssignProperties_To_SignalR(destination *storage.SignalR) error {

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

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

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

// +kubebuilder:object:root=true
// Generator information:
// - Generated from: /signalr/resource-manager/Microsoft.SignalRService/SignalRService/stable/2021-10-01/signalr.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}
type SignalRList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []SignalR `json:"items"`
}

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

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

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

	// Cors: Cross-Origin Resource Sharing (CORS) settings.
	Cors *SignalRCorsSettings `json:"cors,omitempty"`

	// DisableAadAuth: DisableLocalAuth
	// Enable or disable aad auth
	// When set as true, connection with AuthType=aad won't work.
	DisableAadAuth *bool `json:"disableAadAuth,omitempty"`

	// DisableLocalAuth: DisableLocalAuth
	// Enable or disable local auth with AccessKey
	// When set as true, connection with AccessKey=xxx won't work.
	DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"`

	// Features: List of the featureFlags.
	// FeatureFlags that are not included in the parameters for the update operation will not be modified.
	// And the response will only include featureFlags that are explicitly set.
	// When a featureFlag is not explicitly set, its globally default value will be used
	// But keep in mind, the default value doesn't mean "false". It varies in terms of different FeatureFlags.
	Features []SignalRFeature `json:"features,omitempty"`

	// Identity: A class represent managed identities used for request and response
	Identity *ManagedIdentity `json:"identity,omitempty"`

	// Kind: The kind of the service, it can be SignalR or RawWebSockets
	Kind *ServiceKind `json:"kind,omitempty"`

	// Location: The GEO location of the resource. e.g. West US | East US | North Central US | South Central US.
	Location *string `json:"location,omitempty"`

	// NetworkACLs: Network ACLs for the resource
	NetworkACLs *SignalRNetworkACLs `json:"networkACLs,omitempty"`

	// OperatorSpec: The specification for configuring operator behavior. This field is interpreted by the operator and not
	// passed directly to Azure
	OperatorSpec *SignalROperatorSpec `json:"operatorSpec,omitempty"`

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

	// PublicNetworkAccess: Enable or disable public network access. Default to "Enabled".
	// When it's Enabled, network ACLs still apply.
	// When it's Disabled, public network access is always disabled no matter what you set in network ACLs.
	PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"`

	// ResourceLogConfiguration: Resource log configuration of a Microsoft.SignalRService resource.
	ResourceLogConfiguration *ResourceLogConfiguration `json:"resourceLogConfiguration,omitempty"`

	// Sku: The billing information of the resource.
	Sku *ResourceSku `json:"sku,omitempty"`

	// Tags: Tags of the service which is a list of key value pairs that describe the resource.
	Tags map[string]string `json:"tags,omitempty"`

	// Tls: TLS settings for the resource
	Tls *SignalRTlsSettings `json:"tls,omitempty"`

	// Upstream: The settings for the Upstream when the service is in server-less mode.
	Upstream *ServerlessUpstreamSettings `json:"upstream,omitempty"`
}

var _ genruntime.ARMTransformer = &SignalR_Spec{}

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

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

	// Set property "Kind":
	if signalR.Kind != nil {
		var temp string
		temp = string(*signalR.Kind)
		kind := arm.ServiceKind(temp)
		result.Kind = &kind
	}

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

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

	// Set property "Properties":
	if signalR.Cors != nil ||
		signalR.DisableAadAuth != nil ||
		signalR.DisableLocalAuth != nil ||
		signalR.Features != nil ||
		signalR.NetworkACLs != nil ||
		signalR.PublicNetworkAccess != nil ||
		signalR.ResourceLogConfiguration != nil ||
		signalR.Tls != nil ||
		signalR.Upstream != nil {
		result.Properties = &arm.SignalRProperties{}
	}
	if signalR.Cors != nil {
		cors_ARM, err := signalR.Cors.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		cors := *cors_ARM.(*arm.SignalRCorsSettings)
		result.Properties.Cors = &cors
	}
	if signalR.DisableAadAuth != nil {
		disableAadAuth := *signalR.DisableAadAuth
		result.Properties.DisableAadAuth = &disableAadAuth
	}
	if signalR.DisableLocalAuth != nil {
		disableLocalAuth := *signalR.DisableLocalAuth
		result.Properties.DisableLocalAuth = &disableLocalAuth
	}
	for _, item := range signalR.Features {
		item_ARM, err := item.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		result.Properties.Features = append(result.Properties.Features, *item_ARM.(*arm.SignalRFeature))
	}
	if signalR.NetworkACLs != nil {
		networkACLs_ARM, err := signalR.NetworkACLs.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		networkACLs := *networkACLs_ARM.(*arm.SignalRNetworkACLs)
		result.Properties.NetworkACLs = &networkACLs
	}
	if signalR.PublicNetworkAccess != nil {
		publicNetworkAccess := *signalR.PublicNetworkAccess
		result.Properties.PublicNetworkAccess = &publicNetworkAccess
	}
	if signalR.ResourceLogConfiguration != nil {
		resourceLogConfiguration_ARM, err := signalR.ResourceLogConfiguration.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		resourceLogConfiguration := *resourceLogConfiguration_ARM.(*arm.ResourceLogConfiguration)
		result.Properties.ResourceLogConfiguration = &resourceLogConfiguration
	}
	if signalR.Tls != nil {
		tls_ARM, err := signalR.Tls.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		tls := *tls_ARM.(*arm.SignalRTlsSettings)
		result.Properties.Tls = &tls
	}
	if signalR.Upstream != nil {
		upstream_ARM, err := signalR.Upstream.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		upstream := *upstream_ARM.(*arm.ServerlessUpstreamSettings)
		result.Properties.Upstream = &upstream
	}

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

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

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

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

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

	// Set property "Cors":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Cors != nil {
			var cors1 SignalRCorsSettings
			err := cors1.PopulateFromARM(owner, *typedInput.Properties.Cors)
			if err != nil {
				return err
			}
			cors := cors1
			signalR.Cors = &cors
		}
	}

	// Set property "DisableAadAuth":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.DisableAadAuth != nil {
			disableAadAuth := *typedInput.Properties.DisableAadAuth
			signalR.DisableAadAuth = &disableAadAuth
		}
	}

	// Set property "DisableLocalAuth":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.DisableLocalAuth != nil {
			disableLocalAuth := *typedInput.Properties.DisableLocalAuth
			signalR.DisableLocalAuth = &disableLocalAuth
		}
	}

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

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

	// Set property "Kind":
	if typedInput.Kind != nil {
		var temp string
		temp = string(*typedInput.Kind)
		kind := ServiceKind(temp)
		signalR.Kind = &kind
	}

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

	// Set property "NetworkACLs":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.NetworkACLs != nil {
			var networkACLs1 SignalRNetworkACLs
			err := networkACLs1.PopulateFromARM(owner, *typedInput.Properties.NetworkACLs)
			if err != nil {
				return err
			}
			networkACLs := networkACLs1
			signalR.NetworkACLs = &networkACLs
		}
	}

	// no assignment for property "OperatorSpec"

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

	// Set property "PublicNetworkAccess":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PublicNetworkAccess != nil {
			publicNetworkAccess := *typedInput.Properties.PublicNetworkAccess
			signalR.PublicNetworkAccess = &publicNetworkAccess
		}
	}

	// Set property "ResourceLogConfiguration":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ResourceLogConfiguration != nil {
			var resourceLogConfiguration1 ResourceLogConfiguration
			err := resourceLogConfiguration1.PopulateFromARM(owner, *typedInput.Properties.ResourceLogConfiguration)
			if err != nil {
				return err
			}
			resourceLogConfiguration := resourceLogConfiguration1
			signalR.ResourceLogConfiguration = &resourceLogConfiguration
		}
	}

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

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

	// Set property "Tls":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Tls != nil {
			var tls1 SignalRTlsSettings
			err := tls1.PopulateFromARM(owner, *typedInput.Properties.Tls)
			if err != nil {
				return err
			}
			tls := tls1
			signalR.Tls = &tls
		}
	}

	// Set property "Upstream":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Upstream != nil {
			var upstream1 ServerlessUpstreamSettings
			err := upstream1.PopulateFromARM(owner, *typedInput.Properties.Upstream)
			if err != nil {
				return err
			}
			upstream := upstream1
			signalR.Upstream = &upstream
		}
	}

	// No error
	return nil
}

var _ genruntime.ConvertibleSpec = &SignalR_Spec{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.SignalR_Spec{}
	err := signalR.AssignProperties_To_SignalR_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_SignalR_Spec populates our SignalR_Spec from the provided source SignalR_Spec
func (signalR *SignalR_Spec) AssignProperties_From_SignalR_Spec(source *storage.SignalR_Spec) error {

	// AzureName
	signalR.AzureName = source.AzureName

	// Cors
	if source.Cors != nil {
		var cor SignalRCorsSettings
		err := cor.AssignProperties_From_SignalRCorsSettings(source.Cors)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SignalRCorsSettings() to populate field Cors")
		}
		signalR.Cors = &cor
	} else {
		signalR.Cors = nil
	}

	// DisableAadAuth
	if source.DisableAadAuth != nil {
		disableAadAuth := *source.DisableAadAuth
		signalR.DisableAadAuth = &disableAadAuth
	} else {
		signalR.DisableAadAuth = nil
	}

	// DisableLocalAuth
	if source.DisableLocalAuth != nil {
		disableLocalAuth := *source.DisableLocalAuth
		signalR.DisableLocalAuth = &disableLocalAuth
	} else {
		signalR.DisableLocalAuth = nil
	}

	// Features
	if source.Features != nil {
		featureList := make([]SignalRFeature, len(source.Features))
		for featureIndex, featureItem := range source.Features {
			var feature SignalRFeature
			err := feature.AssignProperties_From_SignalRFeature(&featureItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_SignalRFeature() to populate field Features")
			}
			featureList[featureIndex] = feature
		}
		signalR.Features = featureList
	} else {
		signalR.Features = nil
	}

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

	// Kind
	if source.Kind != nil {
		kind := *source.Kind
		kindTemp := genruntime.ToEnum(kind, serviceKind_Values)
		signalR.Kind = &kindTemp
	} else {
		signalR.Kind = nil
	}

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

	// NetworkACLs
	if source.NetworkACLs != nil {
		var networkACL SignalRNetworkACLs
		err := networkACL.AssignProperties_From_SignalRNetworkACLs(source.NetworkACLs)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SignalRNetworkACLs() to populate field NetworkACLs")
		}
		signalR.NetworkACLs = &networkACL
	} else {
		signalR.NetworkACLs = nil
	}

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

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

	// PublicNetworkAccess
	signalR.PublicNetworkAccess = genruntime.ClonePointerToString(source.PublicNetworkAccess)

	// ResourceLogConfiguration
	if source.ResourceLogConfiguration != nil {
		var resourceLogConfiguration ResourceLogConfiguration
		err := resourceLogConfiguration.AssignProperties_From_ResourceLogConfiguration(source.ResourceLogConfiguration)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ResourceLogConfiguration() to populate field ResourceLogConfiguration")
		}
		signalR.ResourceLogConfiguration = &resourceLogConfiguration
	} else {
		signalR.ResourceLogConfiguration = nil
	}

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

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

	// Tls
	if source.Tls != nil {
		var tl SignalRTlsSettings
		err := tl.AssignProperties_From_SignalRTlsSettings(source.Tls)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SignalRTlsSettings() to populate field Tls")
		}
		signalR.Tls = &tl
	} else {
		signalR.Tls = nil
	}

	// Upstream
	if source.Upstream != nil {
		var upstream ServerlessUpstreamSettings
		err := upstream.AssignProperties_From_ServerlessUpstreamSettings(source.Upstream)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ServerlessUpstreamSettings() to populate field Upstream")
		}
		signalR.Upstream = &upstream
	} else {
		signalR.Upstream = nil
	}

	// No error
	return nil
}

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

	// AzureName
	destination.AzureName = signalR.AzureName

	// Cors
	if signalR.Cors != nil {
		var cor storage.SignalRCorsSettings
		err := signalR.Cors.AssignProperties_To_SignalRCorsSettings(&cor)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SignalRCorsSettings() to populate field Cors")
		}
		destination.Cors = &cor
	} else {
		destination.Cors = nil
	}

	// DisableAadAuth
	if signalR.DisableAadAuth != nil {
		disableAadAuth := *signalR.DisableAadAuth
		destination.DisableAadAuth = &disableAadAuth
	} else {
		destination.DisableAadAuth = nil
	}

	// DisableLocalAuth
	if signalR.DisableLocalAuth != nil {
		disableLocalAuth := *signalR.DisableLocalAuth
		destination.DisableLocalAuth = &disableLocalAuth
	} else {
		destination.DisableLocalAuth = nil
	}

	// Features
	if signalR.Features != nil {
		featureList := make([]storage.SignalRFeature, len(signalR.Features))
		for featureIndex, featureItem := range signalR.Features {
			var feature storage.SignalRFeature
			err := featureItem.AssignProperties_To_SignalRFeature(&feature)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_SignalRFeature() to populate field Features")
			}
			featureList[featureIndex] = feature
		}
		destination.Features = featureList
	} else {
		destination.Features = nil
	}

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

	// Kind
	if signalR.Kind != nil {
		kind := string(*signalR.Kind)
		destination.Kind = &kind
	} else {
		destination.Kind = nil
	}

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

	// NetworkACLs
	if signalR.NetworkACLs != nil {
		var networkACL storage.SignalRNetworkACLs
		err := signalR.NetworkACLs.AssignProperties_To_SignalRNetworkACLs(&networkACL)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SignalRNetworkACLs() to populate field NetworkACLs")
		}
		destination.NetworkACLs = &networkACL
	} else {
		destination.NetworkACLs = nil
	}

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

	// OriginalVersion
	destination.OriginalVersion = signalR.OriginalVersion()

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

	// PublicNetworkAccess
	destination.PublicNetworkAccess = genruntime.ClonePointerToString(signalR.PublicNetworkAccess)

	// ResourceLogConfiguration
	if signalR.ResourceLogConfiguration != nil {
		var resourceLogConfiguration storage.ResourceLogConfiguration
		err := signalR.ResourceLogConfiguration.AssignProperties_To_ResourceLogConfiguration(&resourceLogConfiguration)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ResourceLogConfiguration() to populate field ResourceLogConfiguration")
		}
		destination.ResourceLogConfiguration = &resourceLogConfiguration
	} else {
		destination.ResourceLogConfiguration = nil
	}

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

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

	// Tls
	if signalR.Tls != nil {
		var tl storage.SignalRTlsSettings
		err := signalR.Tls.AssignProperties_To_SignalRTlsSettings(&tl)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SignalRTlsSettings() to populate field Tls")
		}
		destination.Tls = &tl
	} else {
		destination.Tls = nil
	}

	// Upstream
	if signalR.Upstream != nil {
		var upstream storage.ServerlessUpstreamSettings
		err := signalR.Upstream.AssignProperties_To_ServerlessUpstreamSettings(&upstream)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ServerlessUpstreamSettings() to populate field Upstream")
		}
		destination.Upstream = &upstream
	} else {
		destination.Upstream = nil
	}

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

	// No error
	return nil
}

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

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

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

	// Cors: Cross-Origin Resource Sharing (CORS) settings.
	Cors *SignalRCorsSettings_STATUS `json:"cors,omitempty"`

	// DisableAadAuth: DisableLocalAuth
	// Enable or disable aad auth
	// When set as true, connection with AuthType=aad won't work.
	DisableAadAuth *bool `json:"disableAadAuth,omitempty"`

	// DisableLocalAuth: DisableLocalAuth
	// Enable or disable local auth with AccessKey
	// When set as true, connection with AccessKey=xxx won't work.
	DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"`

	// ExternalIP: The publicly accessible IP of the resource.
	ExternalIP *string `json:"externalIP,omitempty"`

	// Features: List of the featureFlags.
	// FeatureFlags that are not included in the parameters for the update operation will not be modified.
	// And the response will only include featureFlags that are explicitly set.
	// When a featureFlag is not explicitly set, its globally default value will be used
	// But keep in mind, the default value doesn't mean "false". It varies in terms of different FeatureFlags.
	Features []SignalRFeature_STATUS `json:"features,omitempty"`

	// HostName: FQDN of the service instance.
	HostName *string `json:"hostName,omitempty"`

	// HostNamePrefix: Deprecated.
	HostNamePrefix *string `json:"hostNamePrefix,omitempty"`

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

	// Identity: A class represent managed identities used for request and response
	Identity *ManagedIdentity_STATUS `json:"identity,omitempty"`

	// Kind: The kind of the service, it can be SignalR or RawWebSockets
	Kind *ServiceKind_STATUS `json:"kind,omitempty"`

	// Location: The GEO location of the resource. e.g. West US | East US | North Central US | South Central US.
	Location *string `json:"location,omitempty"`

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

	// NetworkACLs: Network ACLs for the resource
	NetworkACLs *SignalRNetworkACLs_STATUS `json:"networkACLs,omitempty"`

	// PrivateEndpointConnections: Private endpoint connections to the resource.
	PrivateEndpointConnections []PrivateEndpointConnection_STATUS_SignalR_SubResourceEmbedded `json:"privateEndpointConnections,omitempty"`

	// ProvisioningState: Provisioning state of the resource.
	ProvisioningState *ProvisioningState_STATUS `json:"provisioningState,omitempty"`

	// PublicNetworkAccess: Enable or disable public network access. Default to "Enabled".
	// When it's Enabled, network ACLs still apply.
	// When it's Disabled, public network access is always disabled no matter what you set in network ACLs.
	PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"`

	// PublicPort: The publicly accessible port of the resource which is designed for browser/client side usage.
	PublicPort *int `json:"publicPort,omitempty"`

	// ResourceLogConfiguration: Resource log configuration of a Microsoft.SignalRService resource.
	ResourceLogConfiguration *ResourceLogConfiguration_STATUS `json:"resourceLogConfiguration,omitempty"`

	// ServerPort: The publicly accessible port of the resource which is designed for customer server side usage.
	ServerPort *int `json:"serverPort,omitempty"`

	// SharedPrivateLinkResources: The list of shared private link resources.
	SharedPrivateLinkResources []SharedPrivateLinkResource_STATUS_SignalR_SubResourceEmbedded `json:"sharedPrivateLinkResources,omitempty"`

	// Sku: The billing information of the resource.
	Sku *ResourceSku_STATUS `json:"sku,omitempty"`

	// SystemData: Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData_STATUS `json:"systemData,omitempty"`

	// Tags: Tags of the service which is a list of key value pairs that describe the resource.
	Tags map[string]string `json:"tags,omitempty"`

	// Tls: TLS settings for the resource
	Tls *SignalRTlsSettings_STATUS `json:"tls,omitempty"`

	// Type: The type of the resource - e.g. "Microsoft.SignalRService/SignalR"
	Type *string `json:"type,omitempty"`

	// Upstream: The settings for the Upstream when the service is in server-less mode.
	Upstream *ServerlessUpstreamSettings_STATUS `json:"upstream,omitempty"`

	// Version: Version of the resource. Probably you need the same or higher version of client SDKs.
	Version *string `json:"version,omitempty"`
}

var _ genruntime.ConvertibleStatus = &SignalR_STATUS{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.SignalR_STATUS{}
	err := signalR.AssignProperties_To_SignalR_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 = &SignalR_STATUS{}

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

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

	// no assignment for property "Conditions"

	// Set property "Cors":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Cors != nil {
			var cors1 SignalRCorsSettings_STATUS
			err := cors1.PopulateFromARM(owner, *typedInput.Properties.Cors)
			if err != nil {
				return err
			}
			cors := cors1
			signalR.Cors = &cors
		}
	}

	// Set property "DisableAadAuth":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.DisableAadAuth != nil {
			disableAadAuth := *typedInput.Properties.DisableAadAuth
			signalR.DisableAadAuth = &disableAadAuth
		}
	}

	// Set property "DisableLocalAuth":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.DisableLocalAuth != nil {
			disableLocalAuth := *typedInput.Properties.DisableLocalAuth
			signalR.DisableLocalAuth = &disableLocalAuth
		}
	}

	// Set property "ExternalIP":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ExternalIP != nil {
			externalIP := *typedInput.Properties.ExternalIP
			signalR.ExternalIP = &externalIP
		}
	}

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

	// Set property "HostName":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.HostName != nil {
			hostName := *typedInput.Properties.HostName
			signalR.HostName = &hostName
		}
	}

	// Set property "HostNamePrefix":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.HostNamePrefix != nil {
			hostNamePrefix := *typedInput.Properties.HostNamePrefix
			signalR.HostNamePrefix = &hostNamePrefix
		}
	}

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

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

	// Set property "Kind":
	if typedInput.Kind != nil {
		var temp string
		temp = string(*typedInput.Kind)
		kind := ServiceKind_STATUS(temp)
		signalR.Kind = &kind
	}

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

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

	// Set property "NetworkACLs":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.NetworkACLs != nil {
			var networkACLs1 SignalRNetworkACLs_STATUS
			err := networkACLs1.PopulateFromARM(owner, *typedInput.Properties.NetworkACLs)
			if err != nil {
				return err
			}
			networkACLs := networkACLs1
			signalR.NetworkACLs = &networkACLs
		}
	}

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

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

	// Set property "PublicNetworkAccess":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PublicNetworkAccess != nil {
			publicNetworkAccess := *typedInput.Properties.PublicNetworkAccess
			signalR.PublicNetworkAccess = &publicNetworkAccess
		}
	}

	// Set property "PublicPort":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PublicPort != nil {
			publicPort := *typedInput.Properties.PublicPort
			signalR.PublicPort = &publicPort
		}
	}

	// Set property "ResourceLogConfiguration":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ResourceLogConfiguration != nil {
			var resourceLogConfiguration1 ResourceLogConfiguration_STATUS
			err := resourceLogConfiguration1.PopulateFromARM(owner, *typedInput.Properties.ResourceLogConfiguration)
			if err != nil {
				return err
			}
			resourceLogConfiguration := resourceLogConfiguration1
			signalR.ResourceLogConfiguration = &resourceLogConfiguration
		}
	}

	// Set property "ServerPort":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ServerPort != nil {
			serverPort := *typedInput.Properties.ServerPort
			signalR.ServerPort = &serverPort
		}
	}

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

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

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

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

	// Set property "Tls":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Tls != nil {
			var tls1 SignalRTlsSettings_STATUS
			err := tls1.PopulateFromARM(owner, *typedInput.Properties.Tls)
			if err != nil {
				return err
			}
			tls := tls1
			signalR.Tls = &tls
		}
	}

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

	// Set property "Upstream":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Upstream != nil {
			var upstream1 ServerlessUpstreamSettings_STATUS
			err := upstream1.PopulateFromARM(owner, *typedInput.Properties.Upstream)
			if err != nil {
				return err
			}
			upstream := upstream1
			signalR.Upstream = &upstream
		}
	}

	// Set property "Version":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Version != nil {
			version := *typedInput.Properties.Version
			signalR.Version = &version
		}
	}

	// No error
	return nil
}

// AssignProperties_From_SignalR_STATUS populates our SignalR_STATUS from the provided source SignalR_STATUS
func (signalR *SignalR_STATUS) AssignProperties_From_SignalR_STATUS(source *storage.SignalR_STATUS) error {

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

	// Cors
	if source.Cors != nil {
		var cor SignalRCorsSettings_STATUS
		err := cor.AssignProperties_From_SignalRCorsSettings_STATUS(source.Cors)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SignalRCorsSettings_STATUS() to populate field Cors")
		}
		signalR.Cors = &cor
	} else {
		signalR.Cors = nil
	}

	// DisableAadAuth
	if source.DisableAadAuth != nil {
		disableAadAuth := *source.DisableAadAuth
		signalR.DisableAadAuth = &disableAadAuth
	} else {
		signalR.DisableAadAuth = nil
	}

	// DisableLocalAuth
	if source.DisableLocalAuth != nil {
		disableLocalAuth := *source.DisableLocalAuth
		signalR.DisableLocalAuth = &disableLocalAuth
	} else {
		signalR.DisableLocalAuth = nil
	}

	// ExternalIP
	signalR.ExternalIP = genruntime.ClonePointerToString(source.ExternalIP)

	// Features
	if source.Features != nil {
		featureList := make([]SignalRFeature_STATUS, len(source.Features))
		for featureIndex, featureItem := range source.Features {
			var feature SignalRFeature_STATUS
			err := feature.AssignProperties_From_SignalRFeature_STATUS(&featureItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_SignalRFeature_STATUS() to populate field Features")
			}
			featureList[featureIndex] = feature
		}
		signalR.Features = featureList
	} else {
		signalR.Features = nil
	}

	// HostName
	signalR.HostName = genruntime.ClonePointerToString(source.HostName)

	// HostNamePrefix
	signalR.HostNamePrefix = genruntime.ClonePointerToString(source.HostNamePrefix)

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

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

	// Kind
	if source.Kind != nil {
		kind := *source.Kind
		kindTemp := genruntime.ToEnum(kind, serviceKind_STATUS_Values)
		signalR.Kind = &kindTemp
	} else {
		signalR.Kind = nil
	}

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

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

	// NetworkACLs
	if source.NetworkACLs != nil {
		var networkACL SignalRNetworkACLs_STATUS
		err := networkACL.AssignProperties_From_SignalRNetworkACLs_STATUS(source.NetworkACLs)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SignalRNetworkACLs_STATUS() to populate field NetworkACLs")
		}
		signalR.NetworkACLs = &networkACL
	} else {
		signalR.NetworkACLs = nil
	}

	// PrivateEndpointConnections
	if source.PrivateEndpointConnections != nil {
		privateEndpointConnectionList := make([]PrivateEndpointConnection_STATUS_SignalR_SubResourceEmbedded, len(source.PrivateEndpointConnections))
		for privateEndpointConnectionIndex, privateEndpointConnectionItem := range source.PrivateEndpointConnections {
			var privateEndpointConnection PrivateEndpointConnection_STATUS_SignalR_SubResourceEmbedded
			err := privateEndpointConnection.AssignProperties_From_PrivateEndpointConnection_STATUS_SignalR_SubResourceEmbedded(&privateEndpointConnectionItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_PrivateEndpointConnection_STATUS_SignalR_SubResourceEmbedded() to populate field PrivateEndpointConnections")
			}
			privateEndpointConnectionList[privateEndpointConnectionIndex] = privateEndpointConnection
		}
		signalR.PrivateEndpointConnections = privateEndpointConnectionList
	} else {
		signalR.PrivateEndpointConnections = nil
	}

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

	// PublicNetworkAccess
	signalR.PublicNetworkAccess = genruntime.ClonePointerToString(source.PublicNetworkAccess)

	// PublicPort
	signalR.PublicPort = genruntime.ClonePointerToInt(source.PublicPort)

	// ResourceLogConfiguration
	if source.ResourceLogConfiguration != nil {
		var resourceLogConfiguration ResourceLogConfiguration_STATUS
		err := resourceLogConfiguration.AssignProperties_From_ResourceLogConfiguration_STATUS(source.ResourceLogConfiguration)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ResourceLogConfiguration_STATUS() to populate field ResourceLogConfiguration")
		}
		signalR.ResourceLogConfiguration = &resourceLogConfiguration
	} else {
		signalR.ResourceLogConfiguration = nil
	}

	// ServerPort
	signalR.ServerPort = genruntime.ClonePointerToInt(source.ServerPort)

	// SharedPrivateLinkResources
	if source.SharedPrivateLinkResources != nil {
		sharedPrivateLinkResourceList := make([]SharedPrivateLinkResource_STATUS_SignalR_SubResourceEmbedded, len(source.SharedPrivateLinkResources))
		for sharedPrivateLinkResourceIndex, sharedPrivateLinkResourceItem := range source.SharedPrivateLinkResources {
			var sharedPrivateLinkResource SharedPrivateLinkResource_STATUS_SignalR_SubResourceEmbedded
			err := sharedPrivateLinkResource.AssignProperties_From_SharedPrivateLinkResource_STATUS_SignalR_SubResourceEmbedded(&sharedPrivateLinkResourceItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_SharedPrivateLinkResource_STATUS_SignalR_SubResourceEmbedded() to populate field SharedPrivateLinkResources")
			}
			sharedPrivateLinkResourceList[sharedPrivateLinkResourceIndex] = sharedPrivateLinkResource
		}
		signalR.SharedPrivateLinkResources = sharedPrivateLinkResourceList
	} else {
		signalR.SharedPrivateLinkResources = nil
	}

	// Sku
	if source.Sku != nil {
		var sku ResourceSku_STATUS
		err := sku.AssignProperties_From_ResourceSku_STATUS(source.Sku)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ResourceSku_STATUS() to populate field Sku")
		}
		signalR.Sku = &sku
	} else {
		signalR.Sku = 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")
		}
		signalR.SystemData = &systemDatum
	} else {
		signalR.SystemData = nil
	}

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

	// Tls
	if source.Tls != nil {
		var tl SignalRTlsSettings_STATUS
		err := tl.AssignProperties_From_SignalRTlsSettings_STATUS(source.Tls)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SignalRTlsSettings_STATUS() to populate field Tls")
		}
		signalR.Tls = &tl
	} else {
		signalR.Tls = nil
	}

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

	// Upstream
	if source.Upstream != nil {
		var upstream ServerlessUpstreamSettings_STATUS
		err := upstream.AssignProperties_From_ServerlessUpstreamSettings_STATUS(source.Upstream)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ServerlessUpstreamSettings_STATUS() to populate field Upstream")
		}
		signalR.Upstream = &upstream
	} else {
		signalR.Upstream = nil
	}

	// Version
	signalR.Version = genruntime.ClonePointerToString(source.Version)

	// No error
	return nil
}

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

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

	// Cors
	if signalR.Cors != nil {
		var cor storage.SignalRCorsSettings_STATUS
		err := signalR.Cors.AssignProperties_To_SignalRCorsSettings_STATUS(&cor)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SignalRCorsSettings_STATUS() to populate field Cors")
		}
		destination.Cors = &cor
	} else {
		destination.Cors = nil
	}

	// DisableAadAuth
	if signalR.DisableAadAuth != nil {
		disableAadAuth := *signalR.DisableAadAuth
		destination.DisableAadAuth = &disableAadAuth
	} else {
		destination.DisableAadAuth = nil
	}

	// DisableLocalAuth
	if signalR.DisableLocalAuth != nil {
		disableLocalAuth := *signalR.DisableLocalAuth
		destination.DisableLocalAuth = &disableLocalAuth
	} else {
		destination.DisableLocalAuth = nil
	}

	// ExternalIP
	destination.ExternalIP = genruntime.ClonePointerToString(signalR.ExternalIP)

	// Features
	if signalR.Features != nil {
		featureList := make([]storage.SignalRFeature_STATUS, len(signalR.Features))
		for featureIndex, featureItem := range signalR.Features {
			var feature storage.SignalRFeature_STATUS
			err := featureItem.AssignProperties_To_SignalRFeature_STATUS(&feature)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_SignalRFeature_STATUS() to populate field Features")
			}
			featureList[featureIndex] = feature
		}
		destination.Features = featureList
	} else {
		destination.Features = nil
	}

	// HostName
	destination.HostName = genruntime.ClonePointerToString(signalR.HostName)

	// HostNamePrefix
	destination.HostNamePrefix = genruntime.ClonePointerToString(signalR.HostNamePrefix)

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

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

	// Kind
	if signalR.Kind != nil {
		kind := string(*signalR.Kind)
		destination.Kind = &kind
	} else {
		destination.Kind = nil
	}

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

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

	// NetworkACLs
	if signalR.NetworkACLs != nil {
		var networkACL storage.SignalRNetworkACLs_STATUS
		err := signalR.NetworkACLs.AssignProperties_To_SignalRNetworkACLs_STATUS(&networkACL)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SignalRNetworkACLs_STATUS() to populate field NetworkACLs")
		}
		destination.NetworkACLs = &networkACL
	} else {
		destination.NetworkACLs = nil
	}

	// PrivateEndpointConnections
	if signalR.PrivateEndpointConnections != nil {
		privateEndpointConnectionList := make([]storage.PrivateEndpointConnection_STATUS_SignalR_SubResourceEmbedded, len(signalR.PrivateEndpointConnections))
		for privateEndpointConnectionIndex, privateEndpointConnectionItem := range signalR.PrivateEndpointConnections {
			var privateEndpointConnection storage.PrivateEndpointConnection_STATUS_SignalR_SubResourceEmbedded
			err := privateEndpointConnectionItem.AssignProperties_To_PrivateEndpointConnection_STATUS_SignalR_SubResourceEmbedded(&privateEndpointConnection)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_PrivateEndpointConnection_STATUS_SignalR_SubResourceEmbedded() to populate field PrivateEndpointConnections")
			}
			privateEndpointConnectionList[privateEndpointConnectionIndex] = privateEndpointConnection
		}
		destination.PrivateEndpointConnections = privateEndpointConnectionList
	} else {
		destination.PrivateEndpointConnections = nil
	}

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

	// PublicNetworkAccess
	destination.PublicNetworkAccess = genruntime.ClonePointerToString(signalR.PublicNetworkAccess)

	// PublicPort
	destination.PublicPort = genruntime.ClonePointerToInt(signalR.PublicPort)

	// ResourceLogConfiguration
	if signalR.ResourceLogConfiguration != nil {
		var resourceLogConfiguration storage.ResourceLogConfiguration_STATUS
		err := signalR.ResourceLogConfiguration.AssignProperties_To_ResourceLogConfiguration_STATUS(&resourceLogConfiguration)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ResourceLogConfiguration_STATUS() to populate field ResourceLogConfiguration")
		}
		destination.ResourceLogConfiguration = &resourceLogConfiguration
	} else {
		destination.ResourceLogConfiguration = nil
	}

	// ServerPort
	destination.ServerPort = genruntime.ClonePointerToInt(signalR.ServerPort)

	// SharedPrivateLinkResources
	if signalR.SharedPrivateLinkResources != nil {
		sharedPrivateLinkResourceList := make([]storage.SharedPrivateLinkResource_STATUS_SignalR_SubResourceEmbedded, len(signalR.SharedPrivateLinkResources))
		for sharedPrivateLinkResourceIndex, sharedPrivateLinkResourceItem := range signalR.SharedPrivateLinkResources {
			var sharedPrivateLinkResource storage.SharedPrivateLinkResource_STATUS_SignalR_SubResourceEmbedded
			err := sharedPrivateLinkResourceItem.AssignProperties_To_SharedPrivateLinkResource_STATUS_SignalR_SubResourceEmbedded(&sharedPrivateLinkResource)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_SharedPrivateLinkResource_STATUS_SignalR_SubResourceEmbedded() to populate field SharedPrivateLinkResources")
			}
			sharedPrivateLinkResourceList[sharedPrivateLinkResourceIndex] = sharedPrivateLinkResource
		}
		destination.SharedPrivateLinkResources = sharedPrivateLinkResourceList
	} else {
		destination.SharedPrivateLinkResources = nil
	}

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

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

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

	// Tls
	if signalR.Tls != nil {
		var tl storage.SignalRTlsSettings_STATUS
		err := signalR.Tls.AssignProperties_To_SignalRTlsSettings_STATUS(&tl)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SignalRTlsSettings_STATUS() to populate field Tls")
		}
		destination.Tls = &tl
	} else {
		destination.Tls = nil
	}

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

	// Upstream
	if signalR.Upstream != nil {
		var upstream storage.ServerlessUpstreamSettings_STATUS
		err := signalR.Upstream.AssignProperties_To_ServerlessUpstreamSettings_STATUS(&upstream)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ServerlessUpstreamSettings_STATUS() to populate field Upstream")
		}
		destination.Upstream = &upstream
	} else {
		destination.Upstream = nil
	}

	// Version
	destination.Version = genruntime.ClonePointerToString(signalR.Version)

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

	// No error
	return nil
}

// A class represent managed identities used for request and response
type ManagedIdentity struct {
	// Type: Represents the identity type: systemAssigned, userAssigned, None
	Type *ManagedIdentityType `json:"type,omitempty"`

	// UserAssignedIdentities: Get or set the user assigned identities
	UserAssignedIdentities []UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedIdentity{}

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

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

	// Set property "UserAssignedIdentities":
	result.UserAssignedIdentities = make(map[string]arm.UserAssignedIdentityDetails, len(identity.UserAssignedIdentities))
	for _, ident := range identity.UserAssignedIdentities {
		identARMID, err := resolved.ResolvedReferences.Lookup(ident.Reference)
		if err != nil {
			return nil, err
		}
		key := identARMID
		result.UserAssignedIdentities[key] = arm.UserAssignedIdentityDetails{}
	}
	return result, nil
}

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

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

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

	// no assignment for property "UserAssignedIdentities"

	// No error
	return nil
}

// AssignProperties_From_ManagedIdentity populates our ManagedIdentity from the provided source ManagedIdentity
func (identity *ManagedIdentity) AssignProperties_From_ManagedIdentity(source *storage.ManagedIdentity) error {

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

	// UserAssignedIdentities
	if source.UserAssignedIdentities != nil {
		userAssignedIdentityList := make([]UserAssignedIdentityDetails, len(source.UserAssignedIdentities))
		for userAssignedIdentityIndex, userAssignedIdentityItem := range source.UserAssignedIdentities {
			var userAssignedIdentity UserAssignedIdentityDetails
			err := userAssignedIdentity.AssignProperties_From_UserAssignedIdentityDetails(&userAssignedIdentityItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_UserAssignedIdentityDetails() to populate field UserAssignedIdentities")
			}
			userAssignedIdentityList[userAssignedIdentityIndex] = userAssignedIdentity
		}
		identity.UserAssignedIdentities = userAssignedIdentityList
	} else {
		identity.UserAssignedIdentities = nil
	}

	// No error
	return nil
}

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

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

	// UserAssignedIdentities
	if identity.UserAssignedIdentities != nil {
		userAssignedIdentityList := make([]storage.UserAssignedIdentityDetails, len(identity.UserAssignedIdentities))
		for userAssignedIdentityIndex, userAssignedIdentityItem := range identity.UserAssignedIdentities {
			var userAssignedIdentity storage.UserAssignedIdentityDetails
			err := userAssignedIdentityItem.AssignProperties_To_UserAssignedIdentityDetails(&userAssignedIdentity)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_UserAssignedIdentityDetails() to populate field UserAssignedIdentities")
			}
			userAssignedIdentityList[userAssignedIdentityIndex] = userAssignedIdentity
		}
		destination.UserAssignedIdentities = userAssignedIdentityList
	} else {
		destination.UserAssignedIdentities = nil
	}

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

	// No error
	return nil
}

// A class represent managed identities used for request and response
type ManagedIdentity_STATUS struct {
	// PrincipalId: Get the principal id for the system assigned identity.
	// Only be used in response.
	PrincipalId *string `json:"principalId,omitempty"`

	// TenantId: Get the tenant id for the system assigned identity.
	// Only be used in response
	TenantId *string `json:"tenantId,omitempty"`

	// Type: Represents the identity type: systemAssigned, userAssigned, None
	Type *ManagedIdentityType_STATUS `json:"type,omitempty"`

	// UserAssignedIdentities: Get or set the user assigned identities
	UserAssignedIdentities map[string]UserAssignedIdentityProperty_STATUS `json:"userAssignedIdentities,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedIdentity_STATUS{}

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

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

	// Set property "PrincipalId":
	if typedInput.PrincipalId != nil {
		principalId := *typedInput.PrincipalId
		identity.PrincipalId = &principalId
	}

	// Set property "TenantId":
	if typedInput.TenantId != nil {
		tenantId := *typedInput.TenantId
		identity.TenantId = &tenantId
	}

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

	// Set property "UserAssignedIdentities":
	if typedInput.UserAssignedIdentities != nil {
		identity.UserAssignedIdentities = make(map[string]UserAssignedIdentityProperty_STATUS, len(typedInput.UserAssignedIdentities))
		for key, value := range typedInput.UserAssignedIdentities {
			var value1 UserAssignedIdentityProperty_STATUS
			err := value1.PopulateFromARM(owner, value)
			if err != nil {
				return err
			}
			identity.UserAssignedIdentities[key] = value1
		}
	}

	// No error
	return nil
}

// AssignProperties_From_ManagedIdentity_STATUS populates our ManagedIdentity_STATUS from the provided source ManagedIdentity_STATUS
func (identity *ManagedIdentity_STATUS) AssignProperties_From_ManagedIdentity_STATUS(source *storage.ManagedIdentity_STATUS) error {

	// PrincipalId
	identity.PrincipalId = genruntime.ClonePointerToString(source.PrincipalId)

	// TenantId
	identity.TenantId = genruntime.ClonePointerToString(source.TenantId)

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

	// UserAssignedIdentities
	if source.UserAssignedIdentities != nil {
		userAssignedIdentityMap := make(map[string]UserAssignedIdentityProperty_STATUS, len(source.UserAssignedIdentities))
		for userAssignedIdentityKey, userAssignedIdentityValue := range source.UserAssignedIdentities {
			var userAssignedIdentity UserAssignedIdentityProperty_STATUS
			err := userAssignedIdentity.AssignProperties_From_UserAssignedIdentityProperty_STATUS(&userAssignedIdentityValue)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_UserAssignedIdentityProperty_STATUS() to populate field UserAssignedIdentities")
			}
			userAssignedIdentityMap[userAssignedIdentityKey] = userAssignedIdentity
		}
		identity.UserAssignedIdentities = userAssignedIdentityMap
	} else {
		identity.UserAssignedIdentities = nil
	}

	// No error
	return nil
}

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

	// PrincipalId
	destination.PrincipalId = genruntime.ClonePointerToString(identity.PrincipalId)

	// TenantId
	destination.TenantId = genruntime.ClonePointerToString(identity.TenantId)

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

	// UserAssignedIdentities
	if identity.UserAssignedIdentities != nil {
		userAssignedIdentityMap := make(map[string]storage.UserAssignedIdentityProperty_STATUS, len(identity.UserAssignedIdentities))
		for userAssignedIdentityKey, userAssignedIdentityValue := range identity.UserAssignedIdentities {
			var userAssignedIdentity storage.UserAssignedIdentityProperty_STATUS
			err := userAssignedIdentityValue.AssignProperties_To_UserAssignedIdentityProperty_STATUS(&userAssignedIdentity)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_UserAssignedIdentityProperty_STATUS() to populate field UserAssignedIdentities")
			}
			userAssignedIdentityMap[userAssignedIdentityKey] = userAssignedIdentity
		}
		destination.UserAssignedIdentities = userAssignedIdentityMap
	} else {
		destination.UserAssignedIdentities = nil
	}

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

	// No error
	return nil
}

// A private endpoint connection to an azure resource
type PrivateEndpointConnection_STATUS_SignalR_SubResourceEmbedded struct {
	// Id: Fully qualified resource Id for the resource.
	Id *string `json:"id,omitempty"`
}

var _ genruntime.FromARMConverter = &PrivateEndpointConnection_STATUS_SignalR_SubResourceEmbedded{}

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

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

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

	// No error
	return nil
}

// AssignProperties_From_PrivateEndpointConnection_STATUS_SignalR_SubResourceEmbedded populates our PrivateEndpointConnection_STATUS_SignalR_SubResourceEmbedded from the provided source PrivateEndpointConnection_STATUS_SignalR_SubResourceEmbedded
func (embedded *PrivateEndpointConnection_STATUS_SignalR_SubResourceEmbedded) AssignProperties_From_PrivateEndpointConnection_STATUS_SignalR_SubResourceEmbedded(source *storage.PrivateEndpointConnection_STATUS_SignalR_SubResourceEmbedded) error {

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

	// No error
	return nil
}

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

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

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

	// No error
	return nil
}

// Provisioning state of the resource.
type ProvisioningState_STATUS string

const (
	ProvisioningState_STATUS_Canceled  = ProvisioningState_STATUS("Canceled")
	ProvisioningState_STATUS_Creating  = ProvisioningState_STATUS("Creating")
	ProvisioningState_STATUS_Deleting  = ProvisioningState_STATUS("Deleting")
	ProvisioningState_STATUS_Failed    = ProvisioningState_STATUS("Failed")
	ProvisioningState_STATUS_Moving    = ProvisioningState_STATUS("Moving")
	ProvisioningState_STATUS_Running   = ProvisioningState_STATUS("Running")
	ProvisioningState_STATUS_Succeeded = ProvisioningState_STATUS("Succeeded")
	ProvisioningState_STATUS_Unknown   = ProvisioningState_STATUS("Unknown")
	ProvisioningState_STATUS_Updating  = ProvisioningState_STATUS("Updating")
)

// Mapping from string to ProvisioningState_STATUS
var provisioningState_STATUS_Values = map[string]ProvisioningState_STATUS{
	"canceled":  ProvisioningState_STATUS_Canceled,
	"creating":  ProvisioningState_STATUS_Creating,
	"deleting":  ProvisioningState_STATUS_Deleting,
	"failed":    ProvisioningState_STATUS_Failed,
	"moving":    ProvisioningState_STATUS_Moving,
	"running":   ProvisioningState_STATUS_Running,
	"succeeded": ProvisioningState_STATUS_Succeeded,
	"unknown":   ProvisioningState_STATUS_Unknown,
	"updating":  ProvisioningState_STATUS_Updating,
}

// Resource log configuration of a Microsoft.SignalRService resource.
type ResourceLogConfiguration struct {
	// Categories: Gets or sets the list of category configurations.
	Categories []ResourceLogCategory `json:"categories,omitempty"`
}

var _ genruntime.ARMTransformer = &ResourceLogConfiguration{}

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

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

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

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

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

	// No error
	return nil
}

// AssignProperties_From_ResourceLogConfiguration populates our ResourceLogConfiguration from the provided source ResourceLogConfiguration
func (configuration *ResourceLogConfiguration) AssignProperties_From_ResourceLogConfiguration(source *storage.ResourceLogConfiguration) error {

	// Categories
	if source.Categories != nil {
		categoryList := make([]ResourceLogCategory, len(source.Categories))
		for categoryIndex, categoryItem := range source.Categories {
			var category ResourceLogCategory
			err := category.AssignProperties_From_ResourceLogCategory(&categoryItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ResourceLogCategory() to populate field Categories")
			}
			categoryList[categoryIndex] = category
		}
		configuration.Categories = categoryList
	} else {
		configuration.Categories = nil
	}

	// No error
	return nil
}

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

	// Categories
	if configuration.Categories != nil {
		categoryList := make([]storage.ResourceLogCategory, len(configuration.Categories))
		for categoryIndex, categoryItem := range configuration.Categories {
			var category storage.ResourceLogCategory
			err := categoryItem.AssignProperties_To_ResourceLogCategory(&category)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ResourceLogCategory() to populate field Categories")
			}
			categoryList[categoryIndex] = category
		}
		destination.Categories = categoryList
	} else {
		destination.Categories = nil
	}

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

	// No error
	return nil
}

// Resource log configuration of a Microsoft.SignalRService resource.
type ResourceLogConfiguration_STATUS struct {
	// Categories: Gets or sets the list of category configurations.
	Categories []ResourceLogCategory_STATUS `json:"categories,omitempty"`
}

var _ genruntime.FromARMConverter = &ResourceLogConfiguration_STATUS{}

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

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

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

	// No error
	return nil
}

// AssignProperties_From_ResourceLogConfiguration_STATUS populates our ResourceLogConfiguration_STATUS from the provided source ResourceLogConfiguration_STATUS
func (configuration *ResourceLogConfiguration_STATUS) AssignProperties_From_ResourceLogConfiguration_STATUS(source *storage.ResourceLogConfiguration_STATUS) error {

	// Categories
	if source.Categories != nil {
		categoryList := make([]ResourceLogCategory_STATUS, len(source.Categories))
		for categoryIndex, categoryItem := range source.Categories {
			var category ResourceLogCategory_STATUS
			err := category.AssignProperties_From_ResourceLogCategory_STATUS(&categoryItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ResourceLogCategory_STATUS() to populate field Categories")
			}
			categoryList[categoryIndex] = category
		}
		configuration.Categories = categoryList
	} else {
		configuration.Categories = nil
	}

	// No error
	return nil
}

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

	// Categories
	if configuration.Categories != nil {
		categoryList := make([]storage.ResourceLogCategory_STATUS, len(configuration.Categories))
		for categoryIndex, categoryItem := range configuration.Categories {
			var category storage.ResourceLogCategory_STATUS
			err := categoryItem.AssignProperties_To_ResourceLogCategory_STATUS(&category)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ResourceLogCategory_STATUS() to populate field Categories")
			}
			categoryList[categoryIndex] = category
		}
		destination.Categories = categoryList
	} else {
		destination.Categories = nil
	}

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

	// No error
	return nil
}

// The billing information of the resource.
type ResourceSku struct {
	// Capacity: Optional, integer. The unit count of the resource. 1 by default.
	// If present, following values are allowed:
	// Free: 1
	// Standard: 1,2,5,10,20,50,100
	Capacity *int `json:"capacity,omitempty"`

	// +kubebuilder:validation:Required
	// Name: The name of the SKU. Required.
	// Allowed values: Standard_S1, Free_F1
	Name *string `json:"name,omitempty"`

	// Tier: Optional tier of this particular SKU. 'Standard' or 'Free'.
	// `Basic` is deprecated, use `Standard` instead.
	Tier *SignalRSkuTier `json:"tier,omitempty"`
}

var _ genruntime.ARMTransformer = &ResourceSku{}

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

	// Set property "Capacity":
	if resourceSku.Capacity != nil {
		capacity := *resourceSku.Capacity
		result.Capacity = &capacity
	}

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

	// Set property "Tier":
	if resourceSku.Tier != nil {
		var temp string
		temp = string(*resourceSku.Tier)
		tier := arm.SignalRSkuTier(temp)
		result.Tier = &tier
	}
	return result, nil
}

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

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

	// Set property "Capacity":
	if typedInput.Capacity != nil {
		capacity := *typedInput.Capacity
		resourceSku.Capacity = &capacity
	}

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

	// Set property "Tier":
	if typedInput.Tier != nil {
		var temp string
		temp = string(*typedInput.Tier)
		tier := SignalRSkuTier(temp)
		resourceSku.Tier = &tier
	}

	// No error
	return nil
}

// AssignProperties_From_ResourceSku populates our ResourceSku from the provided source ResourceSku
func (resourceSku *ResourceSku) AssignProperties_From_ResourceSku(source *storage.ResourceSku) error {

	// Capacity
	resourceSku.Capacity = genruntime.ClonePointerToInt(source.Capacity)

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

	// Tier
	if source.Tier != nil {
		tier := *source.Tier
		tierTemp := genruntime.ToEnum(tier, signalRSkuTier_Values)
		resourceSku.Tier = &tierTemp
	} else {
		resourceSku.Tier = nil
	}

	// No error
	return nil
}

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

	// Capacity
	destination.Capacity = genruntime.ClonePointerToInt(resourceSku.Capacity)

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

	// Tier
	if resourceSku.Tier != nil {
		tier := string(*resourceSku.Tier)
		destination.Tier = &tier
	} else {
		destination.Tier = nil
	}

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

	// No error
	return nil
}

// The billing information of the resource.
type ResourceSku_STATUS struct {
	// Capacity: Optional, integer. The unit count of the resource. 1 by default.
	// If present, following values are allowed:
	// Free: 1
	// Standard: 1,2,5,10,20,50,100
	Capacity *int `json:"capacity,omitempty"`

	// Family: Not used. Retained for future use.
	Family *string `json:"family,omitempty"`

	// Name: The name of the SKU. Required.
	// Allowed values: Standard_S1, Free_F1
	Name *string `json:"name,omitempty"`

	// Size: Not used. Retained for future use.
	Size *string `json:"size,omitempty"`

	// Tier: Optional tier of this particular SKU. 'Standard' or 'Free'.
	// `Basic` is deprecated, use `Standard` instead.
	Tier *SignalRSkuTier_STATUS `json:"tier,omitempty"`
}

var _ genruntime.FromARMConverter = &ResourceSku_STATUS{}

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

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

	// Set property "Capacity":
	if typedInput.Capacity != nil {
		capacity := *typedInput.Capacity
		resourceSku.Capacity = &capacity
	}

	// Set property "Family":
	if typedInput.Family != nil {
		family := *typedInput.Family
		resourceSku.Family = &family
	}

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

	// Set property "Size":
	if typedInput.Size != nil {
		size := *typedInput.Size
		resourceSku.Size = &size
	}

	// Set property "Tier":
	if typedInput.Tier != nil {
		var temp string
		temp = string(*typedInput.Tier)
		tier := SignalRSkuTier_STATUS(temp)
		resourceSku.Tier = &tier
	}

	// No error
	return nil
}

// AssignProperties_From_ResourceSku_STATUS populates our ResourceSku_STATUS from the provided source ResourceSku_STATUS
func (resourceSku *ResourceSku_STATUS) AssignProperties_From_ResourceSku_STATUS(source *storage.ResourceSku_STATUS) error {

	// Capacity
	resourceSku.Capacity = genruntime.ClonePointerToInt(source.Capacity)

	// Family
	resourceSku.Family = genruntime.ClonePointerToString(source.Family)

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

	// Size
	resourceSku.Size = genruntime.ClonePointerToString(source.Size)

	// Tier
	if source.Tier != nil {
		tier := *source.Tier
		tierTemp := genruntime.ToEnum(tier, signalRSkuTier_STATUS_Values)
		resourceSku.Tier = &tierTemp
	} else {
		resourceSku.Tier = nil
	}

	// No error
	return nil
}

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

	// Capacity
	destination.Capacity = genruntime.ClonePointerToInt(resourceSku.Capacity)

	// Family
	destination.Family = genruntime.ClonePointerToString(resourceSku.Family)

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

	// Size
	destination.Size = genruntime.ClonePointerToString(resourceSku.Size)

	// Tier
	if resourceSku.Tier != nil {
		tier := string(*resourceSku.Tier)
		destination.Tier = &tier
	} else {
		destination.Tier = nil
	}

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

	// No error
	return nil
}

// The settings for the Upstream when the service is in server-less mode.
type ServerlessUpstreamSettings struct {
	// Templates: Gets or sets the list of Upstream URL templates. Order matters, and the first matching template takes effects.
	Templates []UpstreamTemplate `json:"templates,omitempty"`
}

var _ genruntime.ARMTransformer = &ServerlessUpstreamSettings{}

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

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

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

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

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

	// No error
	return nil
}

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

	// Templates
	if source.Templates != nil {
		templateList := make([]UpstreamTemplate, len(source.Templates))
		for templateIndex, templateItem := range source.Templates {
			var template UpstreamTemplate
			err := template.AssignProperties_From_UpstreamTemplate(&templateItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_UpstreamTemplate() to populate field Templates")
			}
			templateList[templateIndex] = template
		}
		settings.Templates = templateList
	} else {
		settings.Templates = nil
	}

	// No error
	return nil
}

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

	// Templates
	if settings.Templates != nil {
		templateList := make([]storage.UpstreamTemplate, len(settings.Templates))
		for templateIndex, templateItem := range settings.Templates {
			var template storage.UpstreamTemplate
			err := templateItem.AssignProperties_To_UpstreamTemplate(&template)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_UpstreamTemplate() to populate field Templates")
			}
			templateList[templateIndex] = template
		}
		destination.Templates = templateList
	} else {
		destination.Templates = nil
	}

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

	// No error
	return nil
}

// The settings for the Upstream when the service is in server-less mode.
type ServerlessUpstreamSettings_STATUS struct {
	// Templates: Gets or sets the list of Upstream URL templates. Order matters, and the first matching template takes effects.
	Templates []UpstreamTemplate_STATUS `json:"templates,omitempty"`
}

var _ genruntime.FromARMConverter = &ServerlessUpstreamSettings_STATUS{}

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

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

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

	// No error
	return nil
}

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

	// Templates
	if source.Templates != nil {
		templateList := make([]UpstreamTemplate_STATUS, len(source.Templates))
		for templateIndex, templateItem := range source.Templates {
			var template UpstreamTemplate_STATUS
			err := template.AssignProperties_From_UpstreamTemplate_STATUS(&templateItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_UpstreamTemplate_STATUS() to populate field Templates")
			}
			templateList[templateIndex] = template
		}
		settings.Templates = templateList
	} else {
		settings.Templates = nil
	}

	// No error
	return nil
}

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

	// Templates
	if settings.Templates != nil {
		templateList := make([]storage.UpstreamTemplate_STATUS, len(settings.Templates))
		for templateIndex, templateItem := range settings.Templates {
			var template storage.UpstreamTemplate_STATUS
			err := templateItem.AssignProperties_To_UpstreamTemplate_STATUS(&template)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_UpstreamTemplate_STATUS() to populate field Templates")
			}
			templateList[templateIndex] = template
		}
		destination.Templates = templateList
	} else {
		destination.Templates = nil
	}

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

	// No error
	return nil
}

// The kind of the service, it can be SignalR or RawWebSockets
// +kubebuilder:validation:Enum={"RawWebSockets","SignalR"}
type ServiceKind string

const (
	ServiceKind_RawWebSockets = ServiceKind("RawWebSockets")
	ServiceKind_SignalR       = ServiceKind("SignalR")
)

// Mapping from string to ServiceKind
var serviceKind_Values = map[string]ServiceKind{
	"rawwebsockets": ServiceKind_RawWebSockets,
	"signalr":       ServiceKind_SignalR,
}

// The kind of the service, it can be SignalR or RawWebSockets
type ServiceKind_STATUS string

const (
	ServiceKind_STATUS_RawWebSockets = ServiceKind_STATUS("RawWebSockets")
	ServiceKind_STATUS_SignalR       = ServiceKind_STATUS("SignalR")
)

// Mapping from string to ServiceKind_STATUS
var serviceKind_STATUS_Values = map[string]ServiceKind_STATUS{
	"rawwebsockets": ServiceKind_STATUS_RawWebSockets,
	"signalr":       ServiceKind_STATUS_SignalR,
}

// Describes a Shared Private Link Resource
type SharedPrivateLinkResource_STATUS_SignalR_SubResourceEmbedded struct {
	// Id: Fully qualified resource Id for the resource.
	Id *string `json:"id,omitempty"`
}

var _ genruntime.FromARMConverter = &SharedPrivateLinkResource_STATUS_SignalR_SubResourceEmbedded{}

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

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

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

	// No error
	return nil
}

// AssignProperties_From_SharedPrivateLinkResource_STATUS_SignalR_SubResourceEmbedded populates our SharedPrivateLinkResource_STATUS_SignalR_SubResourceEmbedded from the provided source SharedPrivateLinkResource_STATUS_SignalR_SubResourceEmbedded
func (embedded *SharedPrivateLinkResource_STATUS_SignalR_SubResourceEmbedded) AssignProperties_From_SharedPrivateLinkResource_STATUS_SignalR_SubResourceEmbedded(source *storage.SharedPrivateLinkResource_STATUS_SignalR_SubResourceEmbedded) error {

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

	// No error
	return nil
}

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

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

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

	// No error
	return nil
}

// Cross-Origin Resource Sharing (CORS) settings.
type SignalRCorsSettings struct {
	// AllowedOrigins: Gets or sets the list of origins that should be allowed to make cross-origin calls (for example:
	// http://example.com:12345). Use "*" to allow all. If omitted, allow all by default.
	AllowedOrigins []string `json:"allowedOrigins,omitempty"`
}

var _ genruntime.ARMTransformer = &SignalRCorsSettings{}

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

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

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

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

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

	// No error
	return nil
}

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

	// AllowedOrigins
	settings.AllowedOrigins = genruntime.CloneSliceOfString(source.AllowedOrigins)

	// No error
	return nil
}

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

	// AllowedOrigins
	destination.AllowedOrigins = genruntime.CloneSliceOfString(settings.AllowedOrigins)

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

	// No error
	return nil
}

// Cross-Origin Resource Sharing (CORS) settings.
type SignalRCorsSettings_STATUS struct {
	// AllowedOrigins: Gets or sets the list of origins that should be allowed to make cross-origin calls (for example:
	// http://example.com:12345). Use "*" to allow all. If omitted, allow all by default.
	AllowedOrigins []string `json:"allowedOrigins,omitempty"`
}

var _ genruntime.FromARMConverter = &SignalRCorsSettings_STATUS{}

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

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

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

	// No error
	return nil
}

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

	// AllowedOrigins
	settings.AllowedOrigins = genruntime.CloneSliceOfString(source.AllowedOrigins)

	// No error
	return nil
}

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

	// AllowedOrigins
	destination.AllowedOrigins = genruntime.CloneSliceOfString(settings.AllowedOrigins)

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

	// No error
	return nil
}

// Feature of a resource, which controls the runtime behavior.
type SignalRFeature struct {
	// +kubebuilder:validation:Required
	// Flag: FeatureFlags is the supported features of Azure SignalR service.
	// - ServiceMode: Flag for backend server for SignalR  service. Values allowed: "Default": have your own backend server;
	// "Serverless": your application doesn't have a backend  server; "Classic": for backward compatibility. Support both
	// Default and Serverless mode but not recommended;  "PredefinedOnly": for future use.
	// - EnableConnectivityLogs: "true"/"false", to enable/disable the connectivity log  category respectively.
	// - EnableMessagingLogs: "true"/"false", to enable/disable the connectivity log category  respectively.
	// - EnableLiveTrace: Live Trace allows you to know what's happening inside Azure SignalR service, it will  give you live
	// traces in real time, it will be helpful when you developing your own Azure SignalR based web application  or
	// self-troubleshooting some issues. Please note that live traces are counted as outbound messages that will be charged.
	// Values allowed: "true"/"false", to enable/disable live trace feature.
	Flag *FeatureFlags `json:"flag,omitempty"`

	// Properties: Optional properties related to this feature.
	Properties map[string]string `json:"properties,omitempty"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MaxLength=128
	// +kubebuilder:validation:MinLength=1
	// Value: Value of the feature flag. See Azure SignalR service document https://docs.microsoft.com/azure/azure-signalr/ for
	// allowed values.
	Value *string `json:"value,omitempty"`
}

var _ genruntime.ARMTransformer = &SignalRFeature{}

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

	// Set property "Flag":
	if feature.Flag != nil {
		var temp string
		temp = string(*feature.Flag)
		flag := arm.FeatureFlags(temp)
		result.Flag = &flag
	}

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

	// Set property "Value":
	if feature.Value != nil {
		value := *feature.Value
		result.Value = &value
	}
	return result, nil
}

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

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

	// Set property "Flag":
	if typedInput.Flag != nil {
		var temp string
		temp = string(*typedInput.Flag)
		flag := FeatureFlags(temp)
		feature.Flag = &flag
	}

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

	// Set property "Value":
	if typedInput.Value != nil {
		value := *typedInput.Value
		feature.Value = &value
	}

	// No error
	return nil
}

// AssignProperties_From_SignalRFeature populates our SignalRFeature from the provided source SignalRFeature
func (feature *SignalRFeature) AssignProperties_From_SignalRFeature(source *storage.SignalRFeature) error {

	// Flag
	if source.Flag != nil {
		flag := *source.Flag
		flagTemp := genruntime.ToEnum(flag, featureFlags_Values)
		feature.Flag = &flagTemp
	} else {
		feature.Flag = nil
	}

	// Properties
	feature.Properties = genruntime.CloneMapOfStringToString(source.Properties)

	// Value
	feature.Value = genruntime.ClonePointerToString(source.Value)

	// No error
	return nil
}

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

	// Flag
	if feature.Flag != nil {
		flag := string(*feature.Flag)
		destination.Flag = &flag
	} else {
		destination.Flag = nil
	}

	// Properties
	destination.Properties = genruntime.CloneMapOfStringToString(feature.Properties)

	// Value
	destination.Value = genruntime.ClonePointerToString(feature.Value)

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

	// No error
	return nil
}

// Feature of a resource, which controls the runtime behavior.
type SignalRFeature_STATUS struct {
	// Flag: FeatureFlags is the supported features of Azure SignalR service.
	// - ServiceMode: Flag for backend server for SignalR  service. Values allowed: "Default": have your own backend server;
	// "Serverless": your application doesn't have a backend  server; "Classic": for backward compatibility. Support both
	// Default and Serverless mode but not recommended;  "PredefinedOnly": for future use.
	// - EnableConnectivityLogs: "true"/"false", to enable/disable the connectivity log  category respectively.
	// - EnableMessagingLogs: "true"/"false", to enable/disable the connectivity log category  respectively.
	// - EnableLiveTrace: Live Trace allows you to know what's happening inside Azure SignalR service, it will  give you live
	// traces in real time, it will be helpful when you developing your own Azure SignalR based web application  or
	// self-troubleshooting some issues. Please note that live traces are counted as outbound messages that will be charged.
	// Values allowed: "true"/"false", to enable/disable live trace feature.
	Flag *FeatureFlags_STATUS `json:"flag,omitempty"`

	// Properties: Optional properties related to this feature.
	Properties map[string]string `json:"properties,omitempty"`

	// Value: Value of the feature flag. See Azure SignalR service document https://docs.microsoft.com/azure/azure-signalr/ for
	// allowed values.
	Value *string `json:"value,omitempty"`
}

var _ genruntime.FromARMConverter = &SignalRFeature_STATUS{}

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

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

	// Set property "Flag":
	if typedInput.Flag != nil {
		var temp string
		temp = string(*typedInput.Flag)
		flag := FeatureFlags_STATUS(temp)
		feature.Flag = &flag
	}

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

	// Set property "Value":
	if typedInput.Value != nil {
		value := *typedInput.Value
		feature.Value = &value
	}

	// No error
	return nil
}

// AssignProperties_From_SignalRFeature_STATUS populates our SignalRFeature_STATUS from the provided source SignalRFeature_STATUS
func (feature *SignalRFeature_STATUS) AssignProperties_From_SignalRFeature_STATUS(source *storage.SignalRFeature_STATUS) error {

	// Flag
	if source.Flag != nil {
		flag := *source.Flag
		flagTemp := genruntime.ToEnum(flag, featureFlags_STATUS_Values)
		feature.Flag = &flagTemp
	} else {
		feature.Flag = nil
	}

	// Properties
	feature.Properties = genruntime.CloneMapOfStringToString(source.Properties)

	// Value
	feature.Value = genruntime.ClonePointerToString(source.Value)

	// No error
	return nil
}

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

	// Flag
	if feature.Flag != nil {
		flag := string(*feature.Flag)
		destination.Flag = &flag
	} else {
		destination.Flag = nil
	}

	// Properties
	destination.Properties = genruntime.CloneMapOfStringToString(feature.Properties)

	// Value
	destination.Value = genruntime.ClonePointerToString(feature.Value)

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

	// No error
	return nil
}

// Network ACLs for the resource
type SignalRNetworkACLs struct {
	// DefaultAction: Azure Networking ACL Action.
	DefaultAction *ACLAction `json:"defaultAction,omitempty"`

	// PrivateEndpoints: ACLs for requests from private endpoints
	PrivateEndpoints []PrivateEndpointACL `json:"privateEndpoints,omitempty"`

	// PublicNetwork: Network ACL
	PublicNetwork *NetworkACL `json:"publicNetwork,omitempty"`
}

var _ genruntime.ARMTransformer = &SignalRNetworkACLs{}

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

	// Set property "DefaultAction":
	if acLs.DefaultAction != nil {
		var temp string
		temp = string(*acLs.DefaultAction)
		defaultAction := arm.ACLAction(temp)
		result.DefaultAction = &defaultAction
	}

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

	// Set property "PublicNetwork":
	if acLs.PublicNetwork != nil {
		publicNetwork_ARM, err := acLs.PublicNetwork.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		publicNetwork := *publicNetwork_ARM.(*arm.NetworkACL)
		result.PublicNetwork = &publicNetwork
	}
	return result, nil
}

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

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

	// Set property "DefaultAction":
	if typedInput.DefaultAction != nil {
		var temp string
		temp = string(*typedInput.DefaultAction)
		defaultAction := ACLAction(temp)
		acLs.DefaultAction = &defaultAction
	}

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

	// Set property "PublicNetwork":
	if typedInput.PublicNetwork != nil {
		var publicNetwork1 NetworkACL
		err := publicNetwork1.PopulateFromARM(owner, *typedInput.PublicNetwork)
		if err != nil {
			return err
		}
		publicNetwork := publicNetwork1
		acLs.PublicNetwork = &publicNetwork
	}

	// No error
	return nil
}

// AssignProperties_From_SignalRNetworkACLs populates our SignalRNetworkACLs from the provided source SignalRNetworkACLs
func (acLs *SignalRNetworkACLs) AssignProperties_From_SignalRNetworkACLs(source *storage.SignalRNetworkACLs) error {

	// DefaultAction
	if source.DefaultAction != nil {
		defaultAction := *source.DefaultAction
		defaultActionTemp := genruntime.ToEnum(defaultAction, aCLAction_Values)
		acLs.DefaultAction = &defaultActionTemp
	} else {
		acLs.DefaultAction = nil
	}

	// PrivateEndpoints
	if source.PrivateEndpoints != nil {
		privateEndpointList := make([]PrivateEndpointACL, len(source.PrivateEndpoints))
		for privateEndpointIndex, privateEndpointItem := range source.PrivateEndpoints {
			var privateEndpoint PrivateEndpointACL
			err := privateEndpoint.AssignProperties_From_PrivateEndpointACL(&privateEndpointItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_PrivateEndpointACL() to populate field PrivateEndpoints")
			}
			privateEndpointList[privateEndpointIndex] = privateEndpoint
		}
		acLs.PrivateEndpoints = privateEndpointList
	} else {
		acLs.PrivateEndpoints = nil
	}

	// PublicNetwork
	if source.PublicNetwork != nil {
		var publicNetwork NetworkACL
		err := publicNetwork.AssignProperties_From_NetworkACL(source.PublicNetwork)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NetworkACL() to populate field PublicNetwork")
		}
		acLs.PublicNetwork = &publicNetwork
	} else {
		acLs.PublicNetwork = nil
	}

	// No error
	return nil
}

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

	// DefaultAction
	if acLs.DefaultAction != nil {
		defaultAction := string(*acLs.DefaultAction)
		destination.DefaultAction = &defaultAction
	} else {
		destination.DefaultAction = nil
	}

	// PrivateEndpoints
	if acLs.PrivateEndpoints != nil {
		privateEndpointList := make([]storage.PrivateEndpointACL, len(acLs.PrivateEndpoints))
		for privateEndpointIndex, privateEndpointItem := range acLs.PrivateEndpoints {
			var privateEndpoint storage.PrivateEndpointACL
			err := privateEndpointItem.AssignProperties_To_PrivateEndpointACL(&privateEndpoint)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_PrivateEndpointACL() to populate field PrivateEndpoints")
			}
			privateEndpointList[privateEndpointIndex] = privateEndpoint
		}
		destination.PrivateEndpoints = privateEndpointList
	} else {
		destination.PrivateEndpoints = nil
	}

	// PublicNetwork
	if acLs.PublicNetwork != nil {
		var publicNetwork storage.NetworkACL
		err := acLs.PublicNetwork.AssignProperties_To_NetworkACL(&publicNetwork)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NetworkACL() to populate field PublicNetwork")
		}
		destination.PublicNetwork = &publicNetwork
	} else {
		destination.PublicNetwork = nil
	}

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

	// No error
	return nil
}

// Network ACLs for the resource
type SignalRNetworkACLs_STATUS struct {
	// DefaultAction: Azure Networking ACL Action.
	DefaultAction *ACLAction_STATUS `json:"defaultAction,omitempty"`

	// PrivateEndpoints: ACLs for requests from private endpoints
	PrivateEndpoints []PrivateEndpointACL_STATUS `json:"privateEndpoints,omitempty"`

	// PublicNetwork: Network ACL
	PublicNetwork *NetworkACL_STATUS `json:"publicNetwork,omitempty"`
}

var _ genruntime.FromARMConverter = &SignalRNetworkACLs_STATUS{}

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

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

	// Set property "DefaultAction":
	if typedInput.DefaultAction != nil {
		var temp string
		temp = string(*typedInput.DefaultAction)
		defaultAction := ACLAction_STATUS(temp)
		acLs.DefaultAction = &defaultAction
	}

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

	// Set property "PublicNetwork":
	if typedInput.PublicNetwork != nil {
		var publicNetwork1 NetworkACL_STATUS
		err := publicNetwork1.PopulateFromARM(owner, *typedInput.PublicNetwork)
		if err != nil {
			return err
		}
		publicNetwork := publicNetwork1
		acLs.PublicNetwork = &publicNetwork
	}

	// No error
	return nil
}

// AssignProperties_From_SignalRNetworkACLs_STATUS populates our SignalRNetworkACLs_STATUS from the provided source SignalRNetworkACLs_STATUS
func (acLs *SignalRNetworkACLs_STATUS) AssignProperties_From_SignalRNetworkACLs_STATUS(source *storage.SignalRNetworkACLs_STATUS) error {

	// DefaultAction
	if source.DefaultAction != nil {
		defaultAction := *source.DefaultAction
		defaultActionTemp := genruntime.ToEnum(defaultAction, aCLAction_STATUS_Values)
		acLs.DefaultAction = &defaultActionTemp
	} else {
		acLs.DefaultAction = nil
	}

	// PrivateEndpoints
	if source.PrivateEndpoints != nil {
		privateEndpointList := make([]PrivateEndpointACL_STATUS, len(source.PrivateEndpoints))
		for privateEndpointIndex, privateEndpointItem := range source.PrivateEndpoints {
			var privateEndpoint PrivateEndpointACL_STATUS
			err := privateEndpoint.AssignProperties_From_PrivateEndpointACL_STATUS(&privateEndpointItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_PrivateEndpointACL_STATUS() to populate field PrivateEndpoints")
			}
			privateEndpointList[privateEndpointIndex] = privateEndpoint
		}
		acLs.PrivateEndpoints = privateEndpointList
	} else {
		acLs.PrivateEndpoints = nil
	}

	// PublicNetwork
	if source.PublicNetwork != nil {
		var publicNetwork NetworkACL_STATUS
		err := publicNetwork.AssignProperties_From_NetworkACL_STATUS(source.PublicNetwork)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NetworkACL_STATUS() to populate field PublicNetwork")
		}
		acLs.PublicNetwork = &publicNetwork
	} else {
		acLs.PublicNetwork = nil
	}

	// No error
	return nil
}

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

	// DefaultAction
	if acLs.DefaultAction != nil {
		defaultAction := string(*acLs.DefaultAction)
		destination.DefaultAction = &defaultAction
	} else {
		destination.DefaultAction = nil
	}

	// PrivateEndpoints
	if acLs.PrivateEndpoints != nil {
		privateEndpointList := make([]storage.PrivateEndpointACL_STATUS, len(acLs.PrivateEndpoints))
		for privateEndpointIndex, privateEndpointItem := range acLs.PrivateEndpoints {
			var privateEndpoint storage.PrivateEndpointACL_STATUS
			err := privateEndpointItem.AssignProperties_To_PrivateEndpointACL_STATUS(&privateEndpoint)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_PrivateEndpointACL_STATUS() to populate field PrivateEndpoints")
			}
			privateEndpointList[privateEndpointIndex] = privateEndpoint
		}
		destination.PrivateEndpoints = privateEndpointList
	} else {
		destination.PrivateEndpoints = nil
	}

	// PublicNetwork
	if acLs.PublicNetwork != nil {
		var publicNetwork storage.NetworkACL_STATUS
		err := acLs.PublicNetwork.AssignProperties_To_NetworkACL_STATUS(&publicNetwork)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NetworkACL_STATUS() to populate field PublicNetwork")
		}
		destination.PublicNetwork = &publicNetwork
	} else {
		destination.PublicNetwork = nil
	}

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

	// Secrets: configures where to place Azure generated secrets.
	Secrets *SignalROperatorSecrets `json:"secrets,omitempty"`
}

// AssignProperties_From_SignalROperatorSpec populates our SignalROperatorSpec from the provided source SignalROperatorSpec
func (operator *SignalROperatorSpec) AssignProperties_From_SignalROperatorSpec(source *storage.SignalROperatorSpec) 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
	}

	// Secrets
	if source.Secrets != nil {
		var secret SignalROperatorSecrets
		err := secret.AssignProperties_From_SignalROperatorSecrets(source.Secrets)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_SignalROperatorSecrets() to populate field Secrets")
		}
		operator.Secrets = &secret
	} else {
		operator.Secrets = nil
	}

	// No error
	return nil
}

// AssignProperties_To_SignalROperatorSpec populates the provided destination SignalROperatorSpec from our SignalROperatorSpec
func (operator *SignalROperatorSpec) AssignProperties_To_SignalROperatorSpec(destination *storage.SignalROperatorSpec) 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
	}

	// Secrets
	if operator.Secrets != nil {
		var secret storage.SignalROperatorSecrets
		err := operator.Secrets.AssignProperties_To_SignalROperatorSecrets(&secret)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_SignalROperatorSecrets() to populate field Secrets")
		}
		destination.Secrets = &secret
	} else {
		destination.Secrets = nil
	}

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

	// No error
	return nil
}

// TLS settings for the resource
type SignalRTlsSettings struct {
	// ClientCertEnabled: Request client certificate during TLS handshake if enabled
	ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"`
}

var _ genruntime.ARMTransformer = &SignalRTlsSettings{}

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

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

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

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

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

	// No error
	return nil
}

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

	// ClientCertEnabled
	if source.ClientCertEnabled != nil {
		clientCertEnabled := *source.ClientCertEnabled
		settings.ClientCertEnabled = &clientCertEnabled
	} else {
		settings.ClientCertEnabled = nil
	}

	// No error
	return nil
}

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

	// ClientCertEnabled
	if settings.ClientCertEnabled != nil {
		clientCertEnabled := *settings.ClientCertEnabled
		destination.ClientCertEnabled = &clientCertEnabled
	} else {
		destination.ClientCertEnabled = nil
	}

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

	// No error
	return nil
}

// TLS settings for the resource
type SignalRTlsSettings_STATUS struct {
	// ClientCertEnabled: Request client certificate during TLS handshake if enabled
	ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"`
}

var _ genruntime.FromARMConverter = &SignalRTlsSettings_STATUS{}

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

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

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

	// No error
	return nil
}

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

	// ClientCertEnabled
	if source.ClientCertEnabled != nil {
		clientCertEnabled := *source.ClientCertEnabled
		settings.ClientCertEnabled = &clientCertEnabled
	} else {
		settings.ClientCertEnabled = nil
	}

	// No error
	return nil
}

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

	// ClientCertEnabled
	if settings.ClientCertEnabled != nil {
		clientCertEnabled := *settings.ClientCertEnabled
		destination.ClientCertEnabled = &clientCertEnabled
	} else {
		destination.ClientCertEnabled = nil
	}

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

	// No error
	return nil
}

// Metadata pertaining to creation and last modification of the resource.
type SystemData_STATUS struct {
	// CreatedAt: The timestamp of resource creation (UTC).
	CreatedAt *string `json:"createdAt,omitempty"`

	// CreatedBy: The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// CreatedByType: The type of identity that created the resource.
	CreatedByType *SystemData_CreatedByType_STATUS `json:"createdByType,omitempty"`

	// LastModifiedAt: The timestamp of resource last modification (UTC)
	LastModifiedAt *string `json:"lastModifiedAt,omitempty"`

	// LastModifiedBy: The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// LastModifiedByType: The type of identity that last modified the resource.
	LastModifiedByType *SystemData_LastModifiedByType_STATUS `json:"lastModifiedByType,omitempty"`
}

var _ genruntime.FromARMConverter = &SystemData_STATUS{}

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

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

	// Set property "CreatedAt":
	if typedInput.CreatedAt != nil {
		createdAt := *typedInput.CreatedAt
		data.CreatedAt = &createdAt
	}

	// Set property "CreatedBy":
	if typedInput.CreatedBy != nil {
		createdBy := *typedInput.CreatedBy
		data.CreatedBy = &createdBy
	}

	// Set property "CreatedByType":
	if typedInput.CreatedByType != nil {
		var temp string
		temp = string(*typedInput.CreatedByType)
		createdByType := SystemData_CreatedByType_STATUS(temp)
		data.CreatedByType = &createdByType
	}

	// Set property "LastModifiedAt":
	if typedInput.LastModifiedAt != nil {
		lastModifiedAt := *typedInput.LastModifiedAt
		data.LastModifiedAt = &lastModifiedAt
	}

	// Set property "LastModifiedBy":
	if typedInput.LastModifiedBy != nil {
		lastModifiedBy := *typedInput.LastModifiedBy
		data.LastModifiedBy = &lastModifiedBy
	}

	// Set property "LastModifiedByType":
	if typedInput.LastModifiedByType != nil {
		var temp string
		temp = string(*typedInput.LastModifiedByType)
		lastModifiedByType := SystemData_LastModifiedByType_STATUS(temp)
		data.LastModifiedByType = &lastModifiedByType
	}

	// No error
	return nil
}

// AssignProperties_From_SystemData_STATUS populates our SystemData_STATUS from the provided source SystemData_STATUS
func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *storage.SystemData_STATUS) error {

	// CreatedAt
	data.CreatedAt = genruntime.ClonePointerToString(source.CreatedAt)

	// CreatedBy
	data.CreatedBy = genruntime.ClonePointerToString(source.CreatedBy)

	// CreatedByType
	if source.CreatedByType != nil {
		createdByType := *source.CreatedByType
		createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values)
		data.CreatedByType = &createdByTypeTemp
	} else {
		data.CreatedByType = nil
	}

	// LastModifiedAt
	data.LastModifiedAt = genruntime.ClonePointerToString(source.LastModifiedAt)

	// LastModifiedBy
	data.LastModifiedBy = genruntime.ClonePointerToString(source.LastModifiedBy)

	// LastModifiedByType
	if source.LastModifiedByType != nil {
		lastModifiedByType := *source.LastModifiedByType
		lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values)
		data.LastModifiedByType = &lastModifiedByTypeTemp
	} else {
		data.LastModifiedByType = nil
	}

	// No error
	return nil
}

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

	// CreatedAt
	destination.CreatedAt = genruntime.ClonePointerToString(data.CreatedAt)

	// CreatedBy
	destination.CreatedBy = genruntime.ClonePointerToString(data.CreatedBy)

	// CreatedByType
	if data.CreatedByType != nil {
		createdByType := string(*data.CreatedByType)
		destination.CreatedByType = &createdByType
	} else {
		destination.CreatedByType = nil
	}

	// LastModifiedAt
	destination.LastModifiedAt = genruntime.ClonePointerToString(data.LastModifiedAt)

	// LastModifiedBy
	destination.LastModifiedBy = genruntime.ClonePointerToString(data.LastModifiedBy)

	// LastModifiedByType
	if data.LastModifiedByType != nil {
		lastModifiedByType := string(*data.LastModifiedByType)
		destination.LastModifiedByType = &lastModifiedByType
	} else {
		destination.LastModifiedByType = nil
	}

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

	// No error
	return nil
}

// Azure Networking ACL Action.
// +kubebuilder:validation:Enum={"Allow","Deny"}
type ACLAction string

const (
	ACLAction_Allow = ACLAction("Allow")
	ACLAction_Deny  = ACLAction("Deny")
)

// Mapping from string to ACLAction
var aCLAction_Values = map[string]ACLAction{
	"allow": ACLAction_Allow,
	"deny":  ACLAction_Deny,
}

// Azure Networking ACL Action.
type ACLAction_STATUS string

const (
	ACLAction_STATUS_Allow = ACLAction_STATUS("Allow")
	ACLAction_STATUS_Deny  = ACLAction_STATUS("Deny")
)

// Mapping from string to ACLAction_STATUS
var aCLAction_STATUS_Values = map[string]ACLAction_STATUS{
	"allow": ACLAction_STATUS_Allow,
	"deny":  ACLAction_STATUS_Deny,
}

// FeatureFlags is the supported features of Azure SignalR service.
// - ServiceMode: Flag for backend server for SignalR
// service. Values allowed: "Default": have your own backend server; "Serverless": your application doesn't have a backend
// server; "Classic": for backward compatibility. Support both Default and Serverless mode but not recommended;
// "PredefinedOnly": for future use.
// - EnableConnectivityLogs: "true"/"false", to enable/disable the connectivity log
// category respectively.
// - EnableMessagingLogs: "true"/"false", to enable/disable the connectivity log category
// respectively.
// - EnableLiveTrace: Live Trace allows you to know what's happening inside Azure SignalR service, it will
// give you live traces in real time, it will be helpful when you developing your own Azure SignalR based web application
// or self-troubleshooting some issues. Please note that live traces are counted as outbound messages that will be charged.
// Values allowed: "true"/"false", to enable/disable live trace feature.
// +kubebuilder:validation:Enum={"EnableConnectivityLogs","EnableLiveTrace","EnableMessagingLogs","ServiceMode"}
type FeatureFlags string

const (
	FeatureFlags_EnableConnectivityLogs = FeatureFlags("EnableConnectivityLogs")
	FeatureFlags_EnableLiveTrace        = FeatureFlags("EnableLiveTrace")
	FeatureFlags_EnableMessagingLogs    = FeatureFlags("EnableMessagingLogs")
	FeatureFlags_ServiceMode            = FeatureFlags("ServiceMode")
)

// Mapping from string to FeatureFlags
var featureFlags_Values = map[string]FeatureFlags{
	"enableconnectivitylogs": FeatureFlags_EnableConnectivityLogs,
	"enablelivetrace":        FeatureFlags_EnableLiveTrace,
	"enablemessaginglogs":    FeatureFlags_EnableMessagingLogs,
	"servicemode":            FeatureFlags_ServiceMode,
}

// FeatureFlags is the supported features of Azure SignalR service.
// - ServiceMode: Flag for backend server for SignalR
// service. Values allowed: "Default": have your own backend server; "Serverless": your application doesn't have a backend
// server; "Classic": for backward compatibility. Support both Default and Serverless mode but not recommended;
// "PredefinedOnly": for future use.
// - EnableConnectivityLogs: "true"/"false", to enable/disable the connectivity log
// category respectively.
// - EnableMessagingLogs: "true"/"false", to enable/disable the connectivity log category
// respectively.
// - EnableLiveTrace: Live Trace allows you to know what's happening inside Azure SignalR service, it will
// give you live traces in real time, it will be helpful when you developing your own Azure SignalR based web application
// or self-troubleshooting some issues. Please note that live traces are counted as outbound messages that will be charged.
// Values allowed: "true"/"false", to enable/disable live trace feature.
type FeatureFlags_STATUS string

const (
	FeatureFlags_STATUS_EnableConnectivityLogs = FeatureFlags_STATUS("EnableConnectivityLogs")
	FeatureFlags_STATUS_EnableLiveTrace        = FeatureFlags_STATUS("EnableLiveTrace")
	FeatureFlags_STATUS_EnableMessagingLogs    = FeatureFlags_STATUS("EnableMessagingLogs")
	FeatureFlags_STATUS_ServiceMode            = FeatureFlags_STATUS("ServiceMode")
)

// Mapping from string to FeatureFlags_STATUS
var featureFlags_STATUS_Values = map[string]FeatureFlags_STATUS{
	"enableconnectivitylogs": FeatureFlags_STATUS_EnableConnectivityLogs,
	"enablelivetrace":        FeatureFlags_STATUS_EnableLiveTrace,
	"enablemessaginglogs":    FeatureFlags_STATUS_EnableMessagingLogs,
	"servicemode":            FeatureFlags_STATUS_ServiceMode,
}

// Represents the identity type: systemAssigned, userAssigned, None
// +kubebuilder:validation:Enum={"None","SystemAssigned","UserAssigned"}
type ManagedIdentityType string

const (
	ManagedIdentityType_None           = ManagedIdentityType("None")
	ManagedIdentityType_SystemAssigned = ManagedIdentityType("SystemAssigned")
	ManagedIdentityType_UserAssigned   = ManagedIdentityType("UserAssigned")
)

// Mapping from string to ManagedIdentityType
var managedIdentityType_Values = map[string]ManagedIdentityType{
	"none":           ManagedIdentityType_None,
	"systemassigned": ManagedIdentityType_SystemAssigned,
	"userassigned":   ManagedIdentityType_UserAssigned,
}

// Represents the identity type: systemAssigned, userAssigned, None
type ManagedIdentityType_STATUS string

const (
	ManagedIdentityType_STATUS_None           = ManagedIdentityType_STATUS("None")
	ManagedIdentityType_STATUS_SystemAssigned = ManagedIdentityType_STATUS("SystemAssigned")
	ManagedIdentityType_STATUS_UserAssigned   = ManagedIdentityType_STATUS("UserAssigned")
)

// Mapping from string to ManagedIdentityType_STATUS
var managedIdentityType_STATUS_Values = map[string]ManagedIdentityType_STATUS{
	"none":           ManagedIdentityType_STATUS_None,
	"systemassigned": ManagedIdentityType_STATUS_SystemAssigned,
	"userassigned":   ManagedIdentityType_STATUS_UserAssigned,
}

// Network ACL
type NetworkACL struct {
	// Allow: Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.
	Allow []SignalRRequestType `json:"allow,omitempty"`

	// Deny: Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.
	Deny []SignalRRequestType `json:"deny,omitempty"`
}

var _ genruntime.ARMTransformer = &NetworkACL{}

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

	// Set property "Allow":
	for _, item := range networkACL.Allow {
		var temp string
		temp = string(item)
		result.Allow = append(result.Allow, arm.SignalRRequestType(temp))
	}

	// Set property "Deny":
	for _, item := range networkACL.Deny {
		var temp string
		temp = string(item)
		result.Deny = append(result.Deny, arm.SignalRRequestType(temp))
	}
	return result, nil
}

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

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

	// Set property "Allow":
	for _, item := range typedInput.Allow {
		var temp string
		temp = string(item)
		networkACL.Allow = append(networkACL.Allow, SignalRRequestType(temp))
	}

	// Set property "Deny":
	for _, item := range typedInput.Deny {
		var temp string
		temp = string(item)
		networkACL.Deny = append(networkACL.Deny, SignalRRequestType(temp))
	}

	// No error
	return nil
}

// AssignProperties_From_NetworkACL populates our NetworkACL from the provided source NetworkACL
func (networkACL *NetworkACL) AssignProperties_From_NetworkACL(source *storage.NetworkACL) error {

	// Allow
	if source.Allow != nil {
		allowList := make([]SignalRRequestType, len(source.Allow))
		for allowIndex, allowItem := range source.Allow {
			allowList[allowIndex] = genruntime.ToEnum(allowItem, signalRRequestType_Values)
		}
		networkACL.Allow = allowList
	} else {
		networkACL.Allow = nil
	}

	// Deny
	if source.Deny != nil {
		denyList := make([]SignalRRequestType, len(source.Deny))
		for denyIndex, denyItem := range source.Deny {
			denyList[denyIndex] = genruntime.ToEnum(denyItem, signalRRequestType_Values)
		}
		networkACL.Deny = denyList
	} else {
		networkACL.Deny = nil
	}

	// No error
	return nil
}

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

	// Allow
	if networkACL.Allow != nil {
		allowList := make([]string, len(networkACL.Allow))
		for allowIndex, allowItem := range networkACL.Allow {
			allowList[allowIndex] = string(allowItem)
		}
		destination.Allow = allowList
	} else {
		destination.Allow = nil
	}

	// Deny
	if networkACL.Deny != nil {
		denyList := make([]string, len(networkACL.Deny))
		for denyIndex, denyItem := range networkACL.Deny {
			denyList[denyIndex] = string(denyItem)
		}
		destination.Deny = denyList
	} else {
		destination.Deny = nil
	}

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

	// No error
	return nil
}

// Network ACL
type NetworkACL_STATUS struct {
	// Allow: Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.
	Allow []SignalRRequestType_STATUS `json:"allow,omitempty"`

	// Deny: Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.
	Deny []SignalRRequestType_STATUS `json:"deny,omitempty"`
}

var _ genruntime.FromARMConverter = &NetworkACL_STATUS{}

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

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

	// Set property "Allow":
	for _, item := range typedInput.Allow {
		var temp string
		temp = string(item)
		networkACL.Allow = append(networkACL.Allow, SignalRRequestType_STATUS(temp))
	}

	// Set property "Deny":
	for _, item := range typedInput.Deny {
		var temp string
		temp = string(item)
		networkACL.Deny = append(networkACL.Deny, SignalRRequestType_STATUS(temp))
	}

	// No error
	return nil
}

// AssignProperties_From_NetworkACL_STATUS populates our NetworkACL_STATUS from the provided source NetworkACL_STATUS
func (networkACL *NetworkACL_STATUS) AssignProperties_From_NetworkACL_STATUS(source *storage.NetworkACL_STATUS) error {

	// Allow
	if source.Allow != nil {
		allowList := make([]SignalRRequestType_STATUS, len(source.Allow))
		for allowIndex, allowItem := range source.Allow {
			allowList[allowIndex] = genruntime.ToEnum(allowItem, signalRRequestType_STATUS_Values)
		}
		networkACL.Allow = allowList
	} else {
		networkACL.Allow = nil
	}

	// Deny
	if source.Deny != nil {
		denyList := make([]SignalRRequestType_STATUS, len(source.Deny))
		for denyIndex, denyItem := range source.Deny {
			denyList[denyIndex] = genruntime.ToEnum(denyItem, signalRRequestType_STATUS_Values)
		}
		networkACL.Deny = denyList
	} else {
		networkACL.Deny = nil
	}

	// No error
	return nil
}

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

	// Allow
	if networkACL.Allow != nil {
		allowList := make([]string, len(networkACL.Allow))
		for allowIndex, allowItem := range networkACL.Allow {
			allowList[allowIndex] = string(allowItem)
		}
		destination.Allow = allowList
	} else {
		destination.Allow = nil
	}

	// Deny
	if networkACL.Deny != nil {
		denyList := make([]string, len(networkACL.Deny))
		for denyIndex, denyItem := range networkACL.Deny {
			denyList[denyIndex] = string(denyItem)
		}
		destination.Deny = denyList
	} else {
		destination.Deny = nil
	}

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

	// No error
	return nil
}

// ACL for a private endpoint
type PrivateEndpointACL struct {
	// Allow: Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.
	Allow []SignalRRequestType `json:"allow,omitempty"`

	// Deny: Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.
	Deny []SignalRRequestType `json:"deny,omitempty"`

	// +kubebuilder:validation:Required
	// Name: Name of the private endpoint connection
	Name *string `json:"name,omitempty"`
}

var _ genruntime.ARMTransformer = &PrivateEndpointACL{}

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

	// Set property "Allow":
	for _, item := range endpointACL.Allow {
		var temp string
		temp = string(item)
		result.Allow = append(result.Allow, arm.SignalRRequestType(temp))
	}

	// Set property "Deny":
	for _, item := range endpointACL.Deny {
		var temp string
		temp = string(item)
		result.Deny = append(result.Deny, arm.SignalRRequestType(temp))
	}

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

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

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

	// Set property "Allow":
	for _, item := range typedInput.Allow {
		var temp string
		temp = string(item)
		endpointACL.Allow = append(endpointACL.Allow, SignalRRequestType(temp))
	}

	// Set property "Deny":
	for _, item := range typedInput.Deny {
		var temp string
		temp = string(item)
		endpointACL.Deny = append(endpointACL.Deny, SignalRRequestType(temp))
	}

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

	// No error
	return nil
}

// AssignProperties_From_PrivateEndpointACL populates our PrivateEndpointACL from the provided source PrivateEndpointACL
func (endpointACL *PrivateEndpointACL) AssignProperties_From_PrivateEndpointACL(source *storage.PrivateEndpointACL) error {

	// Allow
	if source.Allow != nil {
		allowList := make([]SignalRRequestType, len(source.Allow))
		for allowIndex, allowItem := range source.Allow {
			allowList[allowIndex] = genruntime.ToEnum(allowItem, signalRRequestType_Values)
		}
		endpointACL.Allow = allowList
	} else {
		endpointACL.Allow = nil
	}

	// Deny
	if source.Deny != nil {
		denyList := make([]SignalRRequestType, len(source.Deny))
		for denyIndex, denyItem := range source.Deny {
			denyList[denyIndex] = genruntime.ToEnum(denyItem, signalRRequestType_Values)
		}
		endpointACL.Deny = denyList
	} else {
		endpointACL.Deny = nil
	}

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

	// No error
	return nil
}

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

	// Allow
	if endpointACL.Allow != nil {
		allowList := make([]string, len(endpointACL.Allow))
		for allowIndex, allowItem := range endpointACL.Allow {
			allowList[allowIndex] = string(allowItem)
		}
		destination.Allow = allowList
	} else {
		destination.Allow = nil
	}

	// Deny
	if endpointACL.Deny != nil {
		denyList := make([]string, len(endpointACL.Deny))
		for denyIndex, denyItem := range endpointACL.Deny {
			denyList[denyIndex] = string(denyItem)
		}
		destination.Deny = denyList
	} else {
		destination.Deny = nil
	}

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

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

	// No error
	return nil
}

// ACL for a private endpoint
type PrivateEndpointACL_STATUS struct {
	// Allow: Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.
	Allow []SignalRRequestType_STATUS `json:"allow,omitempty"`

	// Deny: Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI.
	Deny []SignalRRequestType_STATUS `json:"deny,omitempty"`

	// Name: Name of the private endpoint connection
	Name *string `json:"name,omitempty"`
}

var _ genruntime.FromARMConverter = &PrivateEndpointACL_STATUS{}

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

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

	// Set property "Allow":
	for _, item := range typedInput.Allow {
		var temp string
		temp = string(item)
		endpointACL.Allow = append(endpointACL.Allow, SignalRRequestType_STATUS(temp))
	}

	// Set property "Deny":
	for _, item := range typedInput.Deny {
		var temp string
		temp = string(item)
		endpointACL.Deny = append(endpointACL.Deny, SignalRRequestType_STATUS(temp))
	}

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

	// No error
	return nil
}

// AssignProperties_From_PrivateEndpointACL_STATUS populates our PrivateEndpointACL_STATUS from the provided source PrivateEndpointACL_STATUS
func (endpointACL *PrivateEndpointACL_STATUS) AssignProperties_From_PrivateEndpointACL_STATUS(source *storage.PrivateEndpointACL_STATUS) error {

	// Allow
	if source.Allow != nil {
		allowList := make([]SignalRRequestType_STATUS, len(source.Allow))
		for allowIndex, allowItem := range source.Allow {
			allowList[allowIndex] = genruntime.ToEnum(allowItem, signalRRequestType_STATUS_Values)
		}
		endpointACL.Allow = allowList
	} else {
		endpointACL.Allow = nil
	}

	// Deny
	if source.Deny != nil {
		denyList := make([]SignalRRequestType_STATUS, len(source.Deny))
		for denyIndex, denyItem := range source.Deny {
			denyList[denyIndex] = genruntime.ToEnum(denyItem, signalRRequestType_STATUS_Values)
		}
		endpointACL.Deny = denyList
	} else {
		endpointACL.Deny = nil
	}

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

	// No error
	return nil
}

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

	// Allow
	if endpointACL.Allow != nil {
		allowList := make([]string, len(endpointACL.Allow))
		for allowIndex, allowItem := range endpointACL.Allow {
			allowList[allowIndex] = string(allowItem)
		}
		destination.Allow = allowList
	} else {
		destination.Allow = nil
	}

	// Deny
	if endpointACL.Deny != nil {
		denyList := make([]string, len(endpointACL.Deny))
		for denyIndex, denyItem := range endpointACL.Deny {
			denyList[denyIndex] = string(denyItem)
		}
		destination.Deny = denyList
	} else {
		destination.Deny = nil
	}

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

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

	// No error
	return nil
}

// Resource log category configuration of a Microsoft.SignalRService resource.
type ResourceLogCategory struct {
	// Enabled: Indicates whether or the resource log category is enabled.
	// Available values: true, false.
	// Case insensitive.
	Enabled *string `json:"enabled,omitempty"`

	// Name: Gets or sets the resource log category's name.
	// Available values: ConnectivityLogs, MessagingLogs.
	// Case insensitive.
	Name *string `json:"name,omitempty"`
}

var _ genruntime.ARMTransformer = &ResourceLogCategory{}

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

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

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

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

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

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

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

	// No error
	return nil
}

// AssignProperties_From_ResourceLogCategory populates our ResourceLogCategory from the provided source ResourceLogCategory
func (category *ResourceLogCategory) AssignProperties_From_ResourceLogCategory(source *storage.ResourceLogCategory) error {

	// Enabled
	category.Enabled = genruntime.ClonePointerToString(source.Enabled)

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

	// No error
	return nil
}

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

	// Enabled
	destination.Enabled = genruntime.ClonePointerToString(category.Enabled)

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

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

	// No error
	return nil
}

// Resource log category configuration of a Microsoft.SignalRService resource.
type ResourceLogCategory_STATUS struct {
	// Enabled: Indicates whether or the resource log category is enabled.
	// Available values: true, false.
	// Case insensitive.
	Enabled *string `json:"enabled,omitempty"`

	// Name: Gets or sets the resource log category's name.
	// Available values: ConnectivityLogs, MessagingLogs.
	// Case insensitive.
	Name *string `json:"name,omitempty"`
}

var _ genruntime.FromARMConverter = &ResourceLogCategory_STATUS{}

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

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

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

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

	// No error
	return nil
}

// AssignProperties_From_ResourceLogCategory_STATUS populates our ResourceLogCategory_STATUS from the provided source ResourceLogCategory_STATUS
func (category *ResourceLogCategory_STATUS) AssignProperties_From_ResourceLogCategory_STATUS(source *storage.ResourceLogCategory_STATUS) error {

	// Enabled
	category.Enabled = genruntime.ClonePointerToString(source.Enabled)

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

	// No error
	return nil
}

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

	// Enabled
	destination.Enabled = genruntime.ClonePointerToString(category.Enabled)

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

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

	// No error
	return nil
}

type SignalROperatorSecrets struct {
	// PrimaryConnectionString: indicates where the PrimaryConnectionString secret should be placed. If omitted, the secret
	// will not be retrieved from Azure.
	PrimaryConnectionString *genruntime.SecretDestination `json:"primaryConnectionString,omitempty"`

	// PrimaryKey: indicates where the PrimaryKey secret should be placed. If omitted, the secret will not be retrieved from
	// Azure.
	PrimaryKey *genruntime.SecretDestination `json:"primaryKey,omitempty"`

	// SecondaryConnectionString: indicates where the SecondaryConnectionString secret should be placed. If omitted, the secret
	// will not be retrieved from Azure.
	SecondaryConnectionString *genruntime.SecretDestination `json:"secondaryConnectionString,omitempty"`

	// SecondaryKey: indicates where the SecondaryKey secret should be placed. If omitted, the secret will not be retrieved
	// from Azure.
	SecondaryKey *genruntime.SecretDestination `json:"secondaryKey,omitempty"`
}

// AssignProperties_From_SignalROperatorSecrets populates our SignalROperatorSecrets from the provided source SignalROperatorSecrets
func (secrets *SignalROperatorSecrets) AssignProperties_From_SignalROperatorSecrets(source *storage.SignalROperatorSecrets) error {

	// PrimaryConnectionString
	if source.PrimaryConnectionString != nil {
		primaryConnectionString := source.PrimaryConnectionString.Copy()
		secrets.PrimaryConnectionString = &primaryConnectionString
	} else {
		secrets.PrimaryConnectionString = nil
	}

	// PrimaryKey
	if source.PrimaryKey != nil {
		primaryKey := source.PrimaryKey.Copy()
		secrets.PrimaryKey = &primaryKey
	} else {
		secrets.PrimaryKey = nil
	}

	// SecondaryConnectionString
	if source.SecondaryConnectionString != nil {
		secondaryConnectionString := source.SecondaryConnectionString.Copy()
		secrets.SecondaryConnectionString = &secondaryConnectionString
	} else {
		secrets.SecondaryConnectionString = nil
	}

	// SecondaryKey
	if source.SecondaryKey != nil {
		secondaryKey := source.SecondaryKey.Copy()
		secrets.SecondaryKey = &secondaryKey
	} else {
		secrets.SecondaryKey = nil
	}

	// No error
	return nil
}

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

	// PrimaryConnectionString
	if secrets.PrimaryConnectionString != nil {
		primaryConnectionString := secrets.PrimaryConnectionString.Copy()
		destination.PrimaryConnectionString = &primaryConnectionString
	} else {
		destination.PrimaryConnectionString = nil
	}

	// PrimaryKey
	if secrets.PrimaryKey != nil {
		primaryKey := secrets.PrimaryKey.Copy()
		destination.PrimaryKey = &primaryKey
	} else {
		destination.PrimaryKey = nil
	}

	// SecondaryConnectionString
	if secrets.SecondaryConnectionString != nil {
		secondaryConnectionString := secrets.SecondaryConnectionString.Copy()
		destination.SecondaryConnectionString = &secondaryConnectionString
	} else {
		destination.SecondaryConnectionString = nil
	}

	// SecondaryKey
	if secrets.SecondaryKey != nil {
		secondaryKey := secrets.SecondaryKey.Copy()
		destination.SecondaryKey = &secondaryKey
	} else {
		destination.SecondaryKey = nil
	}

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

	// No error
	return nil
}

// Optional tier of this particular SKU. 'Standard' or 'Free'.
// `Basic` is deprecated, use `Standard` instead.
// +kubebuilder:validation:Enum={"Basic","Free","Premium","Standard"}
type SignalRSkuTier string

const (
	SignalRSkuTier_Basic    = SignalRSkuTier("Basic")
	SignalRSkuTier_Free     = SignalRSkuTier("Free")
	SignalRSkuTier_Premium  = SignalRSkuTier("Premium")
	SignalRSkuTier_Standard = SignalRSkuTier("Standard")
)

// Mapping from string to SignalRSkuTier
var signalRSkuTier_Values = map[string]SignalRSkuTier{
	"basic":    SignalRSkuTier_Basic,
	"free":     SignalRSkuTier_Free,
	"premium":  SignalRSkuTier_Premium,
	"standard": SignalRSkuTier_Standard,
}

// Optional tier of this particular SKU. 'Standard' or 'Free'.
// `Basic` is deprecated, use `Standard` instead.
type SignalRSkuTier_STATUS string

const (
	SignalRSkuTier_STATUS_Basic    = SignalRSkuTier_STATUS("Basic")
	SignalRSkuTier_STATUS_Free     = SignalRSkuTier_STATUS("Free")
	SignalRSkuTier_STATUS_Premium  = SignalRSkuTier_STATUS("Premium")
	SignalRSkuTier_STATUS_Standard = SignalRSkuTier_STATUS("Standard")
)

// Mapping from string to SignalRSkuTier_STATUS
var signalRSkuTier_STATUS_Values = map[string]SignalRSkuTier_STATUS{
	"basic":    SignalRSkuTier_STATUS_Basic,
	"free":     SignalRSkuTier_STATUS_Free,
	"premium":  SignalRSkuTier_STATUS_Premium,
	"standard": SignalRSkuTier_STATUS_Standard,
}

type SystemData_CreatedByType_STATUS string

const (
	SystemData_CreatedByType_STATUS_Application     = SystemData_CreatedByType_STATUS("Application")
	SystemData_CreatedByType_STATUS_Key             = SystemData_CreatedByType_STATUS("Key")
	SystemData_CreatedByType_STATUS_ManagedIdentity = SystemData_CreatedByType_STATUS("ManagedIdentity")
	SystemData_CreatedByType_STATUS_User            = SystemData_CreatedByType_STATUS("User")
)

// Mapping from string to SystemData_CreatedByType_STATUS
var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{
	"application":     SystemData_CreatedByType_STATUS_Application,
	"key":             SystemData_CreatedByType_STATUS_Key,
	"managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity,
	"user":            SystemData_CreatedByType_STATUS_User,
}

type SystemData_LastModifiedByType_STATUS string

const (
	SystemData_LastModifiedByType_STATUS_Application     = SystemData_LastModifiedByType_STATUS("Application")
	SystemData_LastModifiedByType_STATUS_Key             = SystemData_LastModifiedByType_STATUS("Key")
	SystemData_LastModifiedByType_STATUS_ManagedIdentity = SystemData_LastModifiedByType_STATUS("ManagedIdentity")
	SystemData_LastModifiedByType_STATUS_User            = SystemData_LastModifiedByType_STATUS("User")
)

// Mapping from string to SystemData_LastModifiedByType_STATUS
var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{
	"application":     SystemData_LastModifiedByType_STATUS_Application,
	"key":             SystemData_LastModifiedByType_STATUS_Key,
	"managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity,
	"user":            SystemData_LastModifiedByType_STATUS_User,
}

// Upstream template item settings. It defines the Upstream URL of the incoming requests.
// The template defines the pattern
// of the event, the hub or the category of the incoming request that matches current URL template.
type UpstreamTemplate struct {
	// Auth: Upstream auth settings. If not set, no auth is used for upstream messages.
	Auth *UpstreamAuthSettings `json:"auth,omitempty"`

	// CategoryPattern: Gets or sets the matching pattern for category names. If not set, it matches any category.
	// There are 3 kind of patterns supported:
	// 1. "*", it to matches any category name
	// 2. Combine multiple categories with ",", for example "connections,messages", it matches category "connections" and
	// "messages"
	// 3. The single category name, for example, "connections", it matches the category "connections"
	CategoryPattern *string `json:"categoryPattern,omitempty"`

	// EventPattern: Gets or sets the matching pattern for event names. If not set, it matches any event.
	// There are 3 kind of patterns supported:
	// 1. "*", it to matches any event name
	// 2. Combine multiple events with ",", for example "connect,disconnect", it matches event "connect" and "disconnect"
	// 3. The single event name, for example, "connect", it matches "connect"
	EventPattern *string `json:"eventPattern,omitempty"`

	// HubPattern: Gets or sets the matching pattern for hub names. If not set, it matches any hub.
	// There are 3 kind of patterns supported:
	// 1. "*", it to matches any hub name
	// 2. Combine multiple hubs with ",", for example "hub1,hub2", it matches "hub1" and "hub2"
	// 3. The single hub name, for example, "hub1", it matches "hub1"
	HubPattern *string `json:"hubPattern,omitempty"`

	// +kubebuilder:validation:Required
	// UrlTemplate: Gets or sets the Upstream URL template. You can use 3 predefined parameters {hub}, {category} {event}
	// inside the template, the value of the Upstream URL is dynamically calculated when the client request comes in.
	// For example, if the urlTemplate is `http://example.com/{hub}/api/{event}`, with a client request from hub `chat`
	// connects, it will first POST to this URL: `http://example.com/chat/api/connect`.
	UrlTemplate *string `json:"urlTemplate,omitempty"`
}

var _ genruntime.ARMTransformer = &UpstreamTemplate{}

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

	// Set property "Auth":
	if template.Auth != nil {
		auth_ARM, err := template.Auth.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		auth := *auth_ARM.(*arm.UpstreamAuthSettings)
		result.Auth = &auth
	}

	// Set property "CategoryPattern":
	if template.CategoryPattern != nil {
		categoryPattern := *template.CategoryPattern
		result.CategoryPattern = &categoryPattern
	}

	// Set property "EventPattern":
	if template.EventPattern != nil {
		eventPattern := *template.EventPattern
		result.EventPattern = &eventPattern
	}

	// Set property "HubPattern":
	if template.HubPattern != nil {
		hubPattern := *template.HubPattern
		result.HubPattern = &hubPattern
	}

	// Set property "UrlTemplate":
	if template.UrlTemplate != nil {
		urlTemplate := *template.UrlTemplate
		result.UrlTemplate = &urlTemplate
	}
	return result, nil
}

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

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

	// Set property "Auth":
	if typedInput.Auth != nil {
		var auth1 UpstreamAuthSettings
		err := auth1.PopulateFromARM(owner, *typedInput.Auth)
		if err != nil {
			return err
		}
		auth := auth1
		template.Auth = &auth
	}

	// Set property "CategoryPattern":
	if typedInput.CategoryPattern != nil {
		categoryPattern := *typedInput.CategoryPattern
		template.CategoryPattern = &categoryPattern
	}

	// Set property "EventPattern":
	if typedInput.EventPattern != nil {
		eventPattern := *typedInput.EventPattern
		template.EventPattern = &eventPattern
	}

	// Set property "HubPattern":
	if typedInput.HubPattern != nil {
		hubPattern := *typedInput.HubPattern
		template.HubPattern = &hubPattern
	}

	// Set property "UrlTemplate":
	if typedInput.UrlTemplate != nil {
		urlTemplate := *typedInput.UrlTemplate
		template.UrlTemplate = &urlTemplate
	}

	// No error
	return nil
}

// AssignProperties_From_UpstreamTemplate populates our UpstreamTemplate from the provided source UpstreamTemplate
func (template *UpstreamTemplate) AssignProperties_From_UpstreamTemplate(source *storage.UpstreamTemplate) error {

	// Auth
	if source.Auth != nil {
		var auth UpstreamAuthSettings
		err := auth.AssignProperties_From_UpstreamAuthSettings(source.Auth)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_UpstreamAuthSettings() to populate field Auth")
		}
		template.Auth = &auth
	} else {
		template.Auth = nil
	}

	// CategoryPattern
	template.CategoryPattern = genruntime.ClonePointerToString(source.CategoryPattern)

	// EventPattern
	template.EventPattern = genruntime.ClonePointerToString(source.EventPattern)

	// HubPattern
	template.HubPattern = genruntime.ClonePointerToString(source.HubPattern)

	// UrlTemplate
	template.UrlTemplate = genruntime.ClonePointerToString(source.UrlTemplate)

	// No error
	return nil
}

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

	// Auth
	if template.Auth != nil {
		var auth storage.UpstreamAuthSettings
		err := template.Auth.AssignProperties_To_UpstreamAuthSettings(&auth)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_UpstreamAuthSettings() to populate field Auth")
		}
		destination.Auth = &auth
	} else {
		destination.Auth = nil
	}

	// CategoryPattern
	destination.CategoryPattern = genruntime.ClonePointerToString(template.CategoryPattern)

	// EventPattern
	destination.EventPattern = genruntime.ClonePointerToString(template.EventPattern)

	// HubPattern
	destination.HubPattern = genruntime.ClonePointerToString(template.HubPattern)

	// UrlTemplate
	destination.UrlTemplate = genruntime.ClonePointerToString(template.UrlTemplate)

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

	// No error
	return nil
}

// Upstream template item settings. It defines the Upstream URL of the incoming requests.
// The template defines the pattern
// of the event, the hub or the category of the incoming request that matches current URL template.
type UpstreamTemplate_STATUS struct {
	// Auth: Upstream auth settings. If not set, no auth is used for upstream messages.
	Auth *UpstreamAuthSettings_STATUS `json:"auth,omitempty"`

	// CategoryPattern: Gets or sets the matching pattern for category names. If not set, it matches any category.
	// There are 3 kind of patterns supported:
	// 1. "*", it to matches any category name
	// 2. Combine multiple categories with ",", for example "connections,messages", it matches category "connections" and
	// "messages"
	// 3. The single category name, for example, "connections", it matches the category "connections"
	CategoryPattern *string `json:"categoryPattern,omitempty"`

	// EventPattern: Gets or sets the matching pattern for event names. If not set, it matches any event.
	// There are 3 kind of patterns supported:
	// 1. "*", it to matches any event name
	// 2. Combine multiple events with ",", for example "connect,disconnect", it matches event "connect" and "disconnect"
	// 3. The single event name, for example, "connect", it matches "connect"
	EventPattern *string `json:"eventPattern,omitempty"`

	// HubPattern: Gets or sets the matching pattern for hub names. If not set, it matches any hub.
	// There are 3 kind of patterns supported:
	// 1. "*", it to matches any hub name
	// 2. Combine multiple hubs with ",", for example "hub1,hub2", it matches "hub1" and "hub2"
	// 3. The single hub name, for example, "hub1", it matches "hub1"
	HubPattern *string `json:"hubPattern,omitempty"`

	// UrlTemplate: Gets or sets the Upstream URL template. You can use 3 predefined parameters {hub}, {category} {event}
	// inside the template, the value of the Upstream URL is dynamically calculated when the client request comes in.
	// For example, if the urlTemplate is `http://example.com/{hub}/api/{event}`, with a client request from hub `chat`
	// connects, it will first POST to this URL: `http://example.com/chat/api/connect`.
	UrlTemplate *string `json:"urlTemplate,omitempty"`
}

var _ genruntime.FromARMConverter = &UpstreamTemplate_STATUS{}

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

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

	// Set property "Auth":
	if typedInput.Auth != nil {
		var auth1 UpstreamAuthSettings_STATUS
		err := auth1.PopulateFromARM(owner, *typedInput.Auth)
		if err != nil {
			return err
		}
		auth := auth1
		template.Auth = &auth
	}

	// Set property "CategoryPattern":
	if typedInput.CategoryPattern != nil {
		categoryPattern := *typedInput.CategoryPattern
		template.CategoryPattern = &categoryPattern
	}

	// Set property "EventPattern":
	if typedInput.EventPattern != nil {
		eventPattern := *typedInput.EventPattern
		template.EventPattern = &eventPattern
	}

	// Set property "HubPattern":
	if typedInput.HubPattern != nil {
		hubPattern := *typedInput.HubPattern
		template.HubPattern = &hubPattern
	}

	// Set property "UrlTemplate":
	if typedInput.UrlTemplate != nil {
		urlTemplate := *typedInput.UrlTemplate
		template.UrlTemplate = &urlTemplate
	}

	// No error
	return nil
}

// AssignProperties_From_UpstreamTemplate_STATUS populates our UpstreamTemplate_STATUS from the provided source UpstreamTemplate_STATUS
func (template *UpstreamTemplate_STATUS) AssignProperties_From_UpstreamTemplate_STATUS(source *storage.UpstreamTemplate_STATUS) error {

	// Auth
	if source.Auth != nil {
		var auth UpstreamAuthSettings_STATUS
		err := auth.AssignProperties_From_UpstreamAuthSettings_STATUS(source.Auth)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_UpstreamAuthSettings_STATUS() to populate field Auth")
		}
		template.Auth = &auth
	} else {
		template.Auth = nil
	}

	// CategoryPattern
	template.CategoryPattern = genruntime.ClonePointerToString(source.CategoryPattern)

	// EventPattern
	template.EventPattern = genruntime.ClonePointerToString(source.EventPattern)

	// HubPattern
	template.HubPattern = genruntime.ClonePointerToString(source.HubPattern)

	// UrlTemplate
	template.UrlTemplate = genruntime.ClonePointerToString(source.UrlTemplate)

	// No error
	return nil
}

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

	// Auth
	if template.Auth != nil {
		var auth storage.UpstreamAuthSettings_STATUS
		err := template.Auth.AssignProperties_To_UpstreamAuthSettings_STATUS(&auth)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_UpstreamAuthSettings_STATUS() to populate field Auth")
		}
		destination.Auth = &auth
	} else {
		destination.Auth = nil
	}

	// CategoryPattern
	destination.CategoryPattern = genruntime.ClonePointerToString(template.CategoryPattern)

	// EventPattern
	destination.EventPattern = genruntime.ClonePointerToString(template.EventPattern)

	// HubPattern
	destination.HubPattern = genruntime.ClonePointerToString(template.HubPattern)

	// UrlTemplate
	destination.UrlTemplate = genruntime.ClonePointerToString(template.UrlTemplate)

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

	// No error
	return nil
}

// Information about the user assigned identity for the resource
type UserAssignedIdentityDetails struct {
	Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"`
}

// AssignProperties_From_UserAssignedIdentityDetails populates our UserAssignedIdentityDetails from the provided source UserAssignedIdentityDetails
func (details *UserAssignedIdentityDetails) AssignProperties_From_UserAssignedIdentityDetails(source *storage.UserAssignedIdentityDetails) error {

	// Reference
	details.Reference = source.Reference.Copy()

	// No error
	return nil
}

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

	// Reference
	destination.Reference = details.Reference.Copy()

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

	// No error
	return nil
}

// Properties of user assigned identity.
type UserAssignedIdentityProperty_STATUS struct {
	// ClientId: Get the client id for the user assigned identity
	ClientId *string `json:"clientId,omitempty"`

	// PrincipalId: Get the principal id for the user assigned identity
	PrincipalId *string `json:"principalId,omitempty"`
}

var _ genruntime.FromARMConverter = &UserAssignedIdentityProperty_STATUS{}

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

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

	// Set property "ClientId":
	if typedInput.ClientId != nil {
		clientId := *typedInput.ClientId
		property.ClientId = &clientId
	}

	// Set property "PrincipalId":
	if typedInput.PrincipalId != nil {
		principalId := *typedInput.PrincipalId
		property.PrincipalId = &principalId
	}

	// No error
	return nil
}

// AssignProperties_From_UserAssignedIdentityProperty_STATUS populates our UserAssignedIdentityProperty_STATUS from the provided source UserAssignedIdentityProperty_STATUS
func (property *UserAssignedIdentityProperty_STATUS) AssignProperties_From_UserAssignedIdentityProperty_STATUS(source *storage.UserAssignedIdentityProperty_STATUS) error {

	// ClientId
	property.ClientId = genruntime.ClonePointerToString(source.ClientId)

	// PrincipalId
	property.PrincipalId = genruntime.ClonePointerToString(source.PrincipalId)

	// No error
	return nil
}

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

	// ClientId
	destination.ClientId = genruntime.ClonePointerToString(property.ClientId)

	// PrincipalId
	destination.PrincipalId = genruntime.ClonePointerToString(property.PrincipalId)

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

	// No error
	return nil
}

// The incoming request type to the service
// +kubebuilder:validation:Enum={"ClientConnection","RESTAPI","ServerConnection","Trace"}
type SignalRRequestType string

const (
	SignalRRequestType_ClientConnection = SignalRRequestType("ClientConnection")
	SignalRRequestType_RESTAPI          = SignalRRequestType("RESTAPI")
	SignalRRequestType_ServerConnection = SignalRRequestType("ServerConnection")
	SignalRRequestType_Trace            = SignalRRequestType("Trace")
)

// Mapping from string to SignalRRequestType
var signalRRequestType_Values = map[string]SignalRRequestType{
	"clientconnection": SignalRRequestType_ClientConnection,
	"restapi":          SignalRRequestType_RESTAPI,
	"serverconnection": SignalRRequestType_ServerConnection,
	"trace":            SignalRRequestType_Trace,
}

// The incoming request type to the service
type SignalRRequestType_STATUS string

const (
	SignalRRequestType_STATUS_ClientConnection = SignalRRequestType_STATUS("ClientConnection")
	SignalRRequestType_STATUS_RESTAPI          = SignalRRequestType_STATUS("RESTAPI")
	SignalRRequestType_STATUS_ServerConnection = SignalRRequestType_STATUS("ServerConnection")
	SignalRRequestType_STATUS_Trace            = SignalRRequestType_STATUS("Trace")
)

// Mapping from string to SignalRRequestType_STATUS
var signalRRequestType_STATUS_Values = map[string]SignalRRequestType_STATUS{
	"clientconnection": SignalRRequestType_STATUS_ClientConnection,
	"restapi":          SignalRRequestType_STATUS_RESTAPI,
	"serverconnection": SignalRRequestType_STATUS_ServerConnection,
	"trace":            SignalRRequestType_STATUS_Trace,
}

// Upstream auth settings. If not set, no auth is used for upstream messages.
type UpstreamAuthSettings struct {
	// ManagedIdentity: Managed identity settings for upstream.
	ManagedIdentity *ManagedIdentitySettings `json:"managedIdentity,omitempty"`

	// Type: Upstream auth type enum.
	Type *UpstreamAuthType `json:"type,omitempty"`
}

var _ genruntime.ARMTransformer = &UpstreamAuthSettings{}

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

	// Set property "ManagedIdentity":
	if settings.ManagedIdentity != nil {
		managedIdentity_ARM, err := settings.ManagedIdentity.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		managedIdentity := *managedIdentity_ARM.(*arm.ManagedIdentitySettings)
		result.ManagedIdentity = &managedIdentity
	}

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

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

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

	// Set property "ManagedIdentity":
	if typedInput.ManagedIdentity != nil {
		var managedIdentity1 ManagedIdentitySettings
		err := managedIdentity1.PopulateFromARM(owner, *typedInput.ManagedIdentity)
		if err != nil {
			return err
		}
		managedIdentity := managedIdentity1
		settings.ManagedIdentity = &managedIdentity
	}

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

	// No error
	return nil
}

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

	// ManagedIdentity
	if source.ManagedIdentity != nil {
		var managedIdentity ManagedIdentitySettings
		err := managedIdentity.AssignProperties_From_ManagedIdentitySettings(source.ManagedIdentity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedIdentitySettings() to populate field ManagedIdentity")
		}
		settings.ManagedIdentity = &managedIdentity
	} else {
		settings.ManagedIdentity = nil
	}

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

	// No error
	return nil
}

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

	// ManagedIdentity
	if settings.ManagedIdentity != nil {
		var managedIdentity storage.ManagedIdentitySettings
		err := settings.ManagedIdentity.AssignProperties_To_ManagedIdentitySettings(&managedIdentity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedIdentitySettings() to populate field ManagedIdentity")
		}
		destination.ManagedIdentity = &managedIdentity
	} else {
		destination.ManagedIdentity = nil
	}

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

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

	// No error
	return nil
}

// Upstream auth settings. If not set, no auth is used for upstream messages.
type UpstreamAuthSettings_STATUS struct {
	// ManagedIdentity: Managed identity settings for upstream.
	ManagedIdentity *ManagedIdentitySettings_STATUS `json:"managedIdentity,omitempty"`

	// Type: Upstream auth type enum.
	Type *UpstreamAuthType_STATUS `json:"type,omitempty"`
}

var _ genruntime.FromARMConverter = &UpstreamAuthSettings_STATUS{}

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

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

	// Set property "ManagedIdentity":
	if typedInput.ManagedIdentity != nil {
		var managedIdentity1 ManagedIdentitySettings_STATUS
		err := managedIdentity1.PopulateFromARM(owner, *typedInput.ManagedIdentity)
		if err != nil {
			return err
		}
		managedIdentity := managedIdentity1
		settings.ManagedIdentity = &managedIdentity
	}

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

	// No error
	return nil
}

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

	// ManagedIdentity
	if source.ManagedIdentity != nil {
		var managedIdentity ManagedIdentitySettings_STATUS
		err := managedIdentity.AssignProperties_From_ManagedIdentitySettings_STATUS(source.ManagedIdentity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ManagedIdentitySettings_STATUS() to populate field ManagedIdentity")
		}
		settings.ManagedIdentity = &managedIdentity
	} else {
		settings.ManagedIdentity = nil
	}

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

	// No error
	return nil
}

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

	// ManagedIdentity
	if settings.ManagedIdentity != nil {
		var managedIdentity storage.ManagedIdentitySettings_STATUS
		err := settings.ManagedIdentity.AssignProperties_To_ManagedIdentitySettings_STATUS(&managedIdentity)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ManagedIdentitySettings_STATUS() to populate field ManagedIdentity")
		}
		destination.ManagedIdentity = &managedIdentity
	} else {
		destination.ManagedIdentity = nil
	}

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

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

	// No error
	return nil
}

// Managed identity settings for upstream.
type ManagedIdentitySettings struct {
	// Resource: The Resource indicating the App ID URI of the target resource.
	// It also appears in the aud (audience) claim of the issued token.
	Resource *string `json:"resource,omitempty"`
}

var _ genruntime.ARMTransformer = &ManagedIdentitySettings{}

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

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

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

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

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

	// No error
	return nil
}

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

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

	// No error
	return nil
}

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

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

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

	// No error
	return nil
}

// Managed identity settings for upstream.
type ManagedIdentitySettings_STATUS struct {
	// Resource: The Resource indicating the App ID URI of the target resource.
	// It also appears in the aud (audience) claim of the issued token.
	Resource *string `json:"resource,omitempty"`
}

var _ genruntime.FromARMConverter = &ManagedIdentitySettings_STATUS{}

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

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

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

	// No error
	return nil
}

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

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

	// No error
	return nil
}

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

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

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

	// No error
	return nil
}

// Upstream auth type enum.
// +kubebuilder:validation:Enum={"ManagedIdentity","None"}
type UpstreamAuthType string

const (
	UpstreamAuthType_ManagedIdentity = UpstreamAuthType("ManagedIdentity")
	UpstreamAuthType_None            = UpstreamAuthType("None")
)

// Mapping from string to UpstreamAuthType
var upstreamAuthType_Values = map[string]UpstreamAuthType{
	"managedidentity": UpstreamAuthType_ManagedIdentity,
	"none":            UpstreamAuthType_None,
}

// Upstream auth type enum.
type UpstreamAuthType_STATUS string

const (
	UpstreamAuthType_STATUS_ManagedIdentity = UpstreamAuthType_STATUS("ManagedIdentity")
	UpstreamAuthType_STATUS_None            = UpstreamAuthType_STATUS("None")
)

// Mapping from string to UpstreamAuthType_STATUS
var upstreamAuthType_STATUS_Values = map[string]UpstreamAuthType_STATUS{
	"managedidentity": UpstreamAuthType_STATUS_ManagedIdentity,
	"none":            UpstreamAuthType_STATUS_None,
}

func init() {
	SchemeBuilder.Register(&SignalR{}, &SignalRList{})
}
