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

import (
	"fmt"
	arm "github.com/Azure/azure-service-operator/v2/api/notificationhubs/v1api20230901/arm"
	storage "github.com/Azure/azure-service-operator/v2/api/notificationhubs/v1api20230901/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,notificationhubs}
// +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: /notificationhubs/resource-manager/Microsoft.NotificationHubs/NotificationHubs/stable/2023-09-01/notificationhubs.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}
type NotificationHub struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              NotificationHub_Spec   `json:"spec,omitempty"`
	Status            NotificationHub_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &NotificationHub{}

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

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

var _ conversion.Convertible = &NotificationHub{}

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

	return notificationHub.AssignProperties_From_NotificationHub(source)
}

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

	return notificationHub.AssignProperties_To_NotificationHub(destination)
}

var _ configmaps.Exporter = &NotificationHub{}

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

var _ secrets.Exporter = &NotificationHub{}

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

var _ genruntime.ImportableResource = &NotificationHub{}

// InitializeSpec initializes the spec for this resource from the given status
func (notificationHub *NotificationHub) InitializeSpec(status genruntime.ConvertibleStatus) error {
	if s, ok := status.(*NotificationHub_STATUS); ok {
		return notificationHub.Spec.Initialize_From_NotificationHub_STATUS(s)
	}

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

var _ genruntime.KubernetesResource = &NotificationHub{}

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

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

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

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

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.NotificationHubs/namespaces/notificationHubs"
func (notificationHub *NotificationHub) GetType() string {
	return "Microsoft.NotificationHubs/namespaces/notificationHubs"
}

// NewEmptyStatus returns a new empty (blank) status
func (notificationHub *NotificationHub) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &NotificationHub_STATUS{}
}

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

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

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

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

	notificationHub.Status = st
	return nil
}

// AssignProperties_From_NotificationHub populates our NotificationHub from the provided source NotificationHub
func (notificationHub *NotificationHub) AssignProperties_From_NotificationHub(source *storage.NotificationHub) error {

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

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

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

	// No error
	return nil
}

// AssignProperties_To_NotificationHub populates the provided destination NotificationHub from our NotificationHub
func (notificationHub *NotificationHub) AssignProperties_To_NotificationHub(destination *storage.NotificationHub) error {

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

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

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

// +kubebuilder:object:root=true
// Generator information:
// - Generated from: /notificationhubs/resource-manager/Microsoft.NotificationHubs/NotificationHubs/stable/2023-09-01/notificationhubs.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}
type NotificationHubList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []NotificationHub `json:"items"`
}

type NotificationHub_Spec struct {
	// +kubebuilder:validation:MaxLength=265
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:Pattern="^[a-zA-Z][a-zA-Z0-9-./_]*$"
	// AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it
	// doesn't have to be.
	AzureName string `json:"azureName,omitempty"`

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

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

	// Properties: NotificationHub properties.
	Properties *NotificationHubProperties `json:"properties,omitempty"`

	// Sku: The Sku description for a namespace
	Sku *Sku `json:"sku,omitempty"`

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

var _ genruntime.ARMTransformer = &NotificationHub_Spec{}

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

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

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

	// Set property "Properties":
	if notificationHub.Properties != nil {
		properties_ARM, err := notificationHub.Properties.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		properties := *properties_ARM.(*arm.NotificationHubProperties)
		result.Properties = &properties
	}

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

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

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

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

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

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

	// no assignment for property "OperatorSpec"

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

	// Set property "Properties":
	if typedInput.Properties != nil {
		var properties1 NotificationHubProperties
		err := properties1.PopulateFromARM(owner, *typedInput.Properties)
		if err != nil {
			return err
		}
		properties := properties1
		notificationHub.Properties = &properties
	}

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

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

	// No error
	return nil
}

var _ genruntime.ConvertibleSpec = &NotificationHub_Spec{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.NotificationHub_Spec{}
	err := notificationHub.AssignProperties_To_NotificationHub_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_NotificationHub_Spec populates our NotificationHub_Spec from the provided source NotificationHub_Spec
func (notificationHub *NotificationHub_Spec) AssignProperties_From_NotificationHub_Spec(source *storage.NotificationHub_Spec) error {

	// AzureName
	notificationHub.AzureName = source.AzureName

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

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

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

	// Properties
	if source.Properties != nil {
		var property NotificationHubProperties
		err := property.AssignProperties_From_NotificationHubProperties(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NotificationHubProperties() to populate field Properties")
		}
		notificationHub.Properties = &property
	} else {
		notificationHub.Properties = nil
	}

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

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

	// No error
	return nil
}

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

	// AzureName
	destination.AzureName = notificationHub.AzureName

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

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

	// OriginalVersion
	destination.OriginalVersion = notificationHub.OriginalVersion()

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

	// Properties
	if notificationHub.Properties != nil {
		var property storage.NotificationHubProperties
		err := notificationHub.Properties.AssignProperties_To_NotificationHubProperties(&property)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NotificationHubProperties() to populate field Properties")
		}
		destination.Properties = &property
	} else {
		destination.Properties = nil
	}

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

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

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

	// No error
	return nil
}

// Initialize_From_NotificationHub_STATUS populates our NotificationHub_Spec from the provided source NotificationHub_STATUS
func (notificationHub *NotificationHub_Spec) Initialize_From_NotificationHub_STATUS(source *NotificationHub_STATUS) error {

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

	// Properties
	if source.Properties != nil {
		var property NotificationHubProperties
		err := property.Initialize_From_NotificationHubProperties_STATUS(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_NotificationHubProperties_STATUS() to populate field Properties")
		}
		notificationHub.Properties = &property
	} else {
		notificationHub.Properties = nil
	}

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

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

	// No error
	return nil
}

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

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

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

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

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

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

	// Properties: NotificationHub properties.
	Properties *NotificationHubProperties_STATUS `json:"properties,omitempty"`

	// Sku: The Sku description for a namespace
	Sku *Sku_STATUS `json:"sku,omitempty"`

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

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

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

var _ genruntime.ConvertibleStatus = &NotificationHub_STATUS{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.NotificationHub_STATUS{}
	err := notificationHub.AssignProperties_To_NotificationHub_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 = &NotificationHub_STATUS{}

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

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

	// no assignment for property "Conditions"

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

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

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

	// Set property "Properties":
	if typedInput.Properties != nil {
		var properties1 NotificationHubProperties_STATUS
		err := properties1.PopulateFromARM(owner, *typedInput.Properties)
		if err != nil {
			return err
		}
		properties := properties1
		notificationHub.Properties = &properties
	}

	// Set property "Sku":
	if typedInput.Sku != nil {
		var sku1 Sku_STATUS
		err := sku1.PopulateFromARM(owner, *typedInput.Sku)
		if err != nil {
			return err
		}
		sku := sku1
		notificationHub.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
		notificationHub.SystemData = &systemData
	}

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

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

	// No error
	return nil
}

// AssignProperties_From_NotificationHub_STATUS populates our NotificationHub_STATUS from the provided source NotificationHub_STATUS
func (notificationHub *NotificationHub_STATUS) AssignProperties_From_NotificationHub_STATUS(source *storage.NotificationHub_STATUS) error {

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

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

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

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

	// Properties
	if source.Properties != nil {
		var property NotificationHubProperties_STATUS
		err := property.AssignProperties_From_NotificationHubProperties_STATUS(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NotificationHubProperties_STATUS() to populate field Properties")
		}
		notificationHub.Properties = &property
	} else {
		notificationHub.Properties = nil
	}

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

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

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

	// No error
	return nil
}

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

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

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

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

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

	// Properties
	if notificationHub.Properties != nil {
		var property storage.NotificationHubProperties_STATUS
		err := notificationHub.Properties.AssignProperties_To_NotificationHubProperties_STATUS(&property)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NotificationHubProperties_STATUS() to populate field Properties")
		}
		destination.Properties = &property
	} else {
		destination.Properties = nil
	}

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

	// SystemData
	if notificationHub.SystemData != nil {
		var systemDatum storage.SystemData_STATUS
		err := notificationHub.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(notificationHub.Tags)

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

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

	// No error
	return nil
}

// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure
type NotificationHubOperatorSpec 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 *NotificationHubOperatorSecrets `json:"secrets,omitempty"`
}

// AssignProperties_From_NotificationHubOperatorSpec populates our NotificationHubOperatorSpec from the provided source NotificationHubOperatorSpec
func (operator *NotificationHubOperatorSpec) AssignProperties_From_NotificationHubOperatorSpec(source *storage.NotificationHubOperatorSpec) 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 NotificationHubOperatorSecrets
		err := secret.AssignProperties_From_NotificationHubOperatorSecrets(source.Secrets)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NotificationHubOperatorSecrets() to populate field Secrets")
		}
		operator.Secrets = &secret
	} else {
		operator.Secrets = nil
	}

	// No error
	return nil
}

// AssignProperties_To_NotificationHubOperatorSpec populates the provided destination NotificationHubOperatorSpec from our NotificationHubOperatorSpec
func (operator *NotificationHubOperatorSpec) AssignProperties_To_NotificationHubOperatorSpec(destination *storage.NotificationHubOperatorSpec) 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.NotificationHubOperatorSecrets
		err := operator.Secrets.AssignProperties_To_NotificationHubOperatorSecrets(&secret)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NotificationHubOperatorSecrets() 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
}

// NotificationHub properties.
type NotificationHubProperties struct {
	// AdmCredential: Description of a NotificationHub AdmCredential.
	AdmCredential *AdmCredential `json:"admCredential,omitempty"`

	// ApnsCredential: Description of a NotificationHub ApnsCredential.
	ApnsCredential *ApnsCredential `json:"apnsCredential,omitempty"`

	// BaiduCredential: Description of a NotificationHub BaiduCredential.
	BaiduCredential *BaiduCredential `json:"baiduCredential,omitempty"`

	// BrowserCredential: Description of a NotificationHub BrowserCredential.
	BrowserCredential *BrowserCredential `json:"browserCredential,omitempty"`

	// GcmCredential: Description of a NotificationHub GcmCredential.
	GcmCredential *GcmCredential `json:"gcmCredential,omitempty"`

	// MpnsCredential: Description of a NotificationHub MpnsCredential.
	MpnsCredential *MpnsCredential `json:"mpnsCredential,omitempty"`

	// Name: Gets or sets the NotificationHub name.
	Name *string `json:"name,omitempty"`

	// RegistrationTtl: Gets or sets the RegistrationTtl of the created NotificationHub
	RegistrationTtl *string `json:"registrationTtl,omitempty"`

	// WnsCredential: Description of a NotificationHub WnsCredential.
	WnsCredential *WnsCredential `json:"wnsCredential,omitempty"`

	// XiaomiCredential: Description of a NotificationHub XiaomiCredential.
	XiaomiCredential *XiaomiCredential `json:"xiaomiCredential,omitempty"`
}

var _ genruntime.ARMTransformer = &NotificationHubProperties{}

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

	// Set property "AdmCredential":
	if properties.AdmCredential != nil {
		admCredential_ARM, err := properties.AdmCredential.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		admCredential := *admCredential_ARM.(*arm.AdmCredential)
		result.AdmCredential = &admCredential
	}

	// Set property "ApnsCredential":
	if properties.ApnsCredential != nil {
		apnsCredential_ARM, err := properties.ApnsCredential.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		apnsCredential := *apnsCredential_ARM.(*arm.ApnsCredential)
		result.ApnsCredential = &apnsCredential
	}

	// Set property "BaiduCredential":
	if properties.BaiduCredential != nil {
		baiduCredential_ARM, err := properties.BaiduCredential.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		baiduCredential := *baiduCredential_ARM.(*arm.BaiduCredential)
		result.BaiduCredential = &baiduCredential
	}

	// Set property "BrowserCredential":
	if properties.BrowserCredential != nil {
		browserCredential_ARM, err := properties.BrowserCredential.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		browserCredential := *browserCredential_ARM.(*arm.BrowserCredential)
		result.BrowserCredential = &browserCredential
	}

	// Set property "GcmCredential":
	if properties.GcmCredential != nil {
		gcmCredential_ARM, err := properties.GcmCredential.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		gcmCredential := *gcmCredential_ARM.(*arm.GcmCredential)
		result.GcmCredential = &gcmCredential
	}

	// Set property "MpnsCredential":
	if properties.MpnsCredential != nil {
		mpnsCredential_ARM, err := properties.MpnsCredential.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		mpnsCredential := *mpnsCredential_ARM.(*arm.MpnsCredential)
		result.MpnsCredential = &mpnsCredential
	}

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

	// Set property "RegistrationTtl":
	if properties.RegistrationTtl != nil {
		registrationTtl := *properties.RegistrationTtl
		result.RegistrationTtl = &registrationTtl
	}

	// Set property "WnsCredential":
	if properties.WnsCredential != nil {
		wnsCredential_ARM, err := properties.WnsCredential.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		wnsCredential := *wnsCredential_ARM.(*arm.WnsCredential)
		result.WnsCredential = &wnsCredential
	}

	// Set property "XiaomiCredential":
	if properties.XiaomiCredential != nil {
		xiaomiCredential_ARM, err := properties.XiaomiCredential.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		xiaomiCredential := *xiaomiCredential_ARM.(*arm.XiaomiCredential)
		result.XiaomiCredential = &xiaomiCredential
	}
	return result, nil
}

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

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

	// Set property "AdmCredential":
	if typedInput.AdmCredential != nil {
		var admCredential1 AdmCredential
		err := admCredential1.PopulateFromARM(owner, *typedInput.AdmCredential)
		if err != nil {
			return err
		}
		admCredential := admCredential1
		properties.AdmCredential = &admCredential
	}

	// Set property "ApnsCredential":
	if typedInput.ApnsCredential != nil {
		var apnsCredential1 ApnsCredential
		err := apnsCredential1.PopulateFromARM(owner, *typedInput.ApnsCredential)
		if err != nil {
			return err
		}
		apnsCredential := apnsCredential1
		properties.ApnsCredential = &apnsCredential
	}

	// Set property "BaiduCredential":
	if typedInput.BaiduCredential != nil {
		var baiduCredential1 BaiduCredential
		err := baiduCredential1.PopulateFromARM(owner, *typedInput.BaiduCredential)
		if err != nil {
			return err
		}
		baiduCredential := baiduCredential1
		properties.BaiduCredential = &baiduCredential
	}

	// Set property "BrowserCredential":
	if typedInput.BrowserCredential != nil {
		var browserCredential1 BrowserCredential
		err := browserCredential1.PopulateFromARM(owner, *typedInput.BrowserCredential)
		if err != nil {
			return err
		}
		browserCredential := browserCredential1
		properties.BrowserCredential = &browserCredential
	}

	// Set property "GcmCredential":
	if typedInput.GcmCredential != nil {
		var gcmCredential1 GcmCredential
		err := gcmCredential1.PopulateFromARM(owner, *typedInput.GcmCredential)
		if err != nil {
			return err
		}
		gcmCredential := gcmCredential1
		properties.GcmCredential = &gcmCredential
	}

	// Set property "MpnsCredential":
	if typedInput.MpnsCredential != nil {
		var mpnsCredential1 MpnsCredential
		err := mpnsCredential1.PopulateFromARM(owner, *typedInput.MpnsCredential)
		if err != nil {
			return err
		}
		mpnsCredential := mpnsCredential1
		properties.MpnsCredential = &mpnsCredential
	}

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

	// Set property "RegistrationTtl":
	if typedInput.RegistrationTtl != nil {
		registrationTtl := *typedInput.RegistrationTtl
		properties.RegistrationTtl = &registrationTtl
	}

	// Set property "WnsCredential":
	if typedInput.WnsCredential != nil {
		var wnsCredential1 WnsCredential
		err := wnsCredential1.PopulateFromARM(owner, *typedInput.WnsCredential)
		if err != nil {
			return err
		}
		wnsCredential := wnsCredential1
		properties.WnsCredential = &wnsCredential
	}

	// Set property "XiaomiCredential":
	if typedInput.XiaomiCredential != nil {
		var xiaomiCredential1 XiaomiCredential
		err := xiaomiCredential1.PopulateFromARM(owner, *typedInput.XiaomiCredential)
		if err != nil {
			return err
		}
		xiaomiCredential := xiaomiCredential1
		properties.XiaomiCredential = &xiaomiCredential
	}

	// No error
	return nil
}

// AssignProperties_From_NotificationHubProperties populates our NotificationHubProperties from the provided source NotificationHubProperties
func (properties *NotificationHubProperties) AssignProperties_From_NotificationHubProperties(source *storage.NotificationHubProperties) error {

	// AdmCredential
	if source.AdmCredential != nil {
		var admCredential AdmCredential
		err := admCredential.AssignProperties_From_AdmCredential(source.AdmCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_AdmCredential() to populate field AdmCredential")
		}
		properties.AdmCredential = &admCredential
	} else {
		properties.AdmCredential = nil
	}

	// ApnsCredential
	if source.ApnsCredential != nil {
		var apnsCredential ApnsCredential
		err := apnsCredential.AssignProperties_From_ApnsCredential(source.ApnsCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ApnsCredential() to populate field ApnsCredential")
		}
		properties.ApnsCredential = &apnsCredential
	} else {
		properties.ApnsCredential = nil
	}

	// BaiduCredential
	if source.BaiduCredential != nil {
		var baiduCredential BaiduCredential
		err := baiduCredential.AssignProperties_From_BaiduCredential(source.BaiduCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_BaiduCredential() to populate field BaiduCredential")
		}
		properties.BaiduCredential = &baiduCredential
	} else {
		properties.BaiduCredential = nil
	}

	// BrowserCredential
	if source.BrowserCredential != nil {
		var browserCredential BrowserCredential
		err := browserCredential.AssignProperties_From_BrowserCredential(source.BrowserCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_BrowserCredential() to populate field BrowserCredential")
		}
		properties.BrowserCredential = &browserCredential
	} else {
		properties.BrowserCredential = nil
	}

	// GcmCredential
	if source.GcmCredential != nil {
		var gcmCredential GcmCredential
		err := gcmCredential.AssignProperties_From_GcmCredential(source.GcmCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_GcmCredential() to populate field GcmCredential")
		}
		properties.GcmCredential = &gcmCredential
	} else {
		properties.GcmCredential = nil
	}

	// MpnsCredential
	if source.MpnsCredential != nil {
		var mpnsCredential MpnsCredential
		err := mpnsCredential.AssignProperties_From_MpnsCredential(source.MpnsCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_MpnsCredential() to populate field MpnsCredential")
		}
		properties.MpnsCredential = &mpnsCredential
	} else {
		properties.MpnsCredential = nil
	}

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

	// RegistrationTtl
	properties.RegistrationTtl = genruntime.ClonePointerToString(source.RegistrationTtl)

	// WnsCredential
	if source.WnsCredential != nil {
		var wnsCredential WnsCredential
		err := wnsCredential.AssignProperties_From_WnsCredential(source.WnsCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_WnsCredential() to populate field WnsCredential")
		}
		properties.WnsCredential = &wnsCredential
	} else {
		properties.WnsCredential = nil
	}

	// XiaomiCredential
	if source.XiaomiCredential != nil {
		var xiaomiCredential XiaomiCredential
		err := xiaomiCredential.AssignProperties_From_XiaomiCredential(source.XiaomiCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_XiaomiCredential() to populate field XiaomiCredential")
		}
		properties.XiaomiCredential = &xiaomiCredential
	} else {
		properties.XiaomiCredential = nil
	}

	// No error
	return nil
}

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

	// AdmCredential
	if properties.AdmCredential != nil {
		var admCredential storage.AdmCredential
		err := properties.AdmCredential.AssignProperties_To_AdmCredential(&admCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_AdmCredential() to populate field AdmCredential")
		}
		destination.AdmCredential = &admCredential
	} else {
		destination.AdmCredential = nil
	}

	// ApnsCredential
	if properties.ApnsCredential != nil {
		var apnsCredential storage.ApnsCredential
		err := properties.ApnsCredential.AssignProperties_To_ApnsCredential(&apnsCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ApnsCredential() to populate field ApnsCredential")
		}
		destination.ApnsCredential = &apnsCredential
	} else {
		destination.ApnsCredential = nil
	}

	// BaiduCredential
	if properties.BaiduCredential != nil {
		var baiduCredential storage.BaiduCredential
		err := properties.BaiduCredential.AssignProperties_To_BaiduCredential(&baiduCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_BaiduCredential() to populate field BaiduCredential")
		}
		destination.BaiduCredential = &baiduCredential
	} else {
		destination.BaiduCredential = nil
	}

	// BrowserCredential
	if properties.BrowserCredential != nil {
		var browserCredential storage.BrowserCredential
		err := properties.BrowserCredential.AssignProperties_To_BrowserCredential(&browserCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_BrowserCredential() to populate field BrowserCredential")
		}
		destination.BrowserCredential = &browserCredential
	} else {
		destination.BrowserCredential = nil
	}

	// GcmCredential
	if properties.GcmCredential != nil {
		var gcmCredential storage.GcmCredential
		err := properties.GcmCredential.AssignProperties_To_GcmCredential(&gcmCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_GcmCredential() to populate field GcmCredential")
		}
		destination.GcmCredential = &gcmCredential
	} else {
		destination.GcmCredential = nil
	}

	// MpnsCredential
	if properties.MpnsCredential != nil {
		var mpnsCredential storage.MpnsCredential
		err := properties.MpnsCredential.AssignProperties_To_MpnsCredential(&mpnsCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_MpnsCredential() to populate field MpnsCredential")
		}
		destination.MpnsCredential = &mpnsCredential
	} else {
		destination.MpnsCredential = nil
	}

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

	// RegistrationTtl
	destination.RegistrationTtl = genruntime.ClonePointerToString(properties.RegistrationTtl)

	// WnsCredential
	if properties.WnsCredential != nil {
		var wnsCredential storage.WnsCredential
		err := properties.WnsCredential.AssignProperties_To_WnsCredential(&wnsCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_WnsCredential() to populate field WnsCredential")
		}
		destination.WnsCredential = &wnsCredential
	} else {
		destination.WnsCredential = nil
	}

	// XiaomiCredential
	if properties.XiaomiCredential != nil {
		var xiaomiCredential storage.XiaomiCredential
		err := properties.XiaomiCredential.AssignProperties_To_XiaomiCredential(&xiaomiCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_XiaomiCredential() to populate field XiaomiCredential")
		}
		destination.XiaomiCredential = &xiaomiCredential
	} else {
		destination.XiaomiCredential = nil
	}

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

	// No error
	return nil
}

// Initialize_From_NotificationHubProperties_STATUS populates our NotificationHubProperties from the provided source NotificationHubProperties_STATUS
func (properties *NotificationHubProperties) Initialize_From_NotificationHubProperties_STATUS(source *NotificationHubProperties_STATUS) error {

	// AdmCredential
	if source.AdmCredential != nil {
		var admCredential AdmCredential
		err := admCredential.Initialize_From_AdmCredential_STATUS(source.AdmCredential)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_AdmCredential_STATUS() to populate field AdmCredential")
		}
		properties.AdmCredential = &admCredential
	} else {
		properties.AdmCredential = nil
	}

	// ApnsCredential
	if source.ApnsCredential != nil {
		var apnsCredential ApnsCredential
		err := apnsCredential.Initialize_From_ApnsCredential_STATUS(source.ApnsCredential)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_ApnsCredential_STATUS() to populate field ApnsCredential")
		}
		properties.ApnsCredential = &apnsCredential
	} else {
		properties.ApnsCredential = nil
	}

	// BaiduCredential
	if source.BaiduCredential != nil {
		var baiduCredential BaiduCredential
		err := baiduCredential.Initialize_From_BaiduCredential_STATUS(source.BaiduCredential)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_BaiduCredential_STATUS() to populate field BaiduCredential")
		}
		properties.BaiduCredential = &baiduCredential
	} else {
		properties.BaiduCredential = nil
	}

	// BrowserCredential
	if source.BrowserCredential != nil {
		var browserCredential BrowserCredential
		err := browserCredential.Initialize_From_BrowserCredential_STATUS(source.BrowserCredential)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_BrowserCredential_STATUS() to populate field BrowserCredential")
		}
		properties.BrowserCredential = &browserCredential
	} else {
		properties.BrowserCredential = nil
	}

	// GcmCredential
	if source.GcmCredential != nil {
		var gcmCredential GcmCredential
		err := gcmCredential.Initialize_From_GcmCredential_STATUS(source.GcmCredential)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_GcmCredential_STATUS() to populate field GcmCredential")
		}
		properties.GcmCredential = &gcmCredential
	} else {
		properties.GcmCredential = nil
	}

	// MpnsCredential
	if source.MpnsCredential != nil {
		var mpnsCredential MpnsCredential
		err := mpnsCredential.Initialize_From_MpnsCredential_STATUS(source.MpnsCredential)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_MpnsCredential_STATUS() to populate field MpnsCredential")
		}
		properties.MpnsCredential = &mpnsCredential
	} else {
		properties.MpnsCredential = nil
	}

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

	// RegistrationTtl
	properties.RegistrationTtl = genruntime.ClonePointerToString(source.RegistrationTtl)

	// WnsCredential
	if source.WnsCredential != nil {
		var wnsCredential WnsCredential
		err := wnsCredential.Initialize_From_WnsCredential_STATUS(source.WnsCredential)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_WnsCredential_STATUS() to populate field WnsCredential")
		}
		properties.WnsCredential = &wnsCredential
	} else {
		properties.WnsCredential = nil
	}

	// XiaomiCredential
	if source.XiaomiCredential != nil {
		var xiaomiCredential XiaomiCredential
		err := xiaomiCredential.Initialize_From_XiaomiCredential_STATUS(source.XiaomiCredential)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_XiaomiCredential_STATUS() to populate field XiaomiCredential")
		}
		properties.XiaomiCredential = &xiaomiCredential
	} else {
		properties.XiaomiCredential = nil
	}

	// No error
	return nil
}

// NotificationHub properties.
type NotificationHubProperties_STATUS struct {
	// AdmCredential: Description of a NotificationHub AdmCredential.
	AdmCredential *AdmCredential_STATUS `json:"admCredential,omitempty"`

	// ApnsCredential: Description of a NotificationHub ApnsCredential.
	ApnsCredential *ApnsCredential_STATUS `json:"apnsCredential,omitempty"`

	// AuthorizationRules: Gets or sets the AuthorizationRules of the created NotificationHub
	AuthorizationRules []SharedAccessAuthorizationRuleProperties_STATUS `json:"authorizationRules,omitempty"`

	// BaiduCredential: Description of a NotificationHub BaiduCredential.
	BaiduCredential *BaiduCredential_STATUS `json:"baiduCredential,omitempty"`

	// BrowserCredential: Description of a NotificationHub BrowserCredential.
	BrowserCredential     *BrowserCredential_STATUS `json:"browserCredential,omitempty"`
	DailyMaxActiveDevices *int                      `json:"dailyMaxActiveDevices,omitempty"`

	// GcmCredential: Description of a NotificationHub GcmCredential.
	GcmCredential *GcmCredential_STATUS `json:"gcmCredential,omitempty"`

	// MpnsCredential: Description of a NotificationHub MpnsCredential.
	MpnsCredential *MpnsCredential_STATUS `json:"mpnsCredential,omitempty"`

	// Name: Gets or sets the NotificationHub name.
	Name *string `json:"name,omitempty"`

	// RegistrationTtl: Gets or sets the RegistrationTtl of the created NotificationHub
	RegistrationTtl *string `json:"registrationTtl,omitempty"`

	// WnsCredential: Description of a NotificationHub WnsCredential.
	WnsCredential *WnsCredential_STATUS `json:"wnsCredential,omitempty"`

	// XiaomiCredential: Description of a NotificationHub XiaomiCredential.
	XiaomiCredential *XiaomiCredential_STATUS `json:"xiaomiCredential,omitempty"`
}

var _ genruntime.FromARMConverter = &NotificationHubProperties_STATUS{}

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

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

	// Set property "AdmCredential":
	if typedInput.AdmCredential != nil {
		var admCredential1 AdmCredential_STATUS
		err := admCredential1.PopulateFromARM(owner, *typedInput.AdmCredential)
		if err != nil {
			return err
		}
		admCredential := admCredential1
		properties.AdmCredential = &admCredential
	}

	// Set property "ApnsCredential":
	if typedInput.ApnsCredential != nil {
		var apnsCredential1 ApnsCredential_STATUS
		err := apnsCredential1.PopulateFromARM(owner, *typedInput.ApnsCredential)
		if err != nil {
			return err
		}
		apnsCredential := apnsCredential1
		properties.ApnsCredential = &apnsCredential
	}

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

	// Set property "BaiduCredential":
	if typedInput.BaiduCredential != nil {
		var baiduCredential1 BaiduCredential_STATUS
		err := baiduCredential1.PopulateFromARM(owner, *typedInput.BaiduCredential)
		if err != nil {
			return err
		}
		baiduCredential := baiduCredential1
		properties.BaiduCredential = &baiduCredential
	}

	// Set property "BrowserCredential":
	if typedInput.BrowserCredential != nil {
		var browserCredential1 BrowserCredential_STATUS
		err := browserCredential1.PopulateFromARM(owner, *typedInput.BrowserCredential)
		if err != nil {
			return err
		}
		browserCredential := browserCredential1
		properties.BrowserCredential = &browserCredential
	}

	// Set property "DailyMaxActiveDevices":
	if typedInput.DailyMaxActiveDevices != nil {
		dailyMaxActiveDevices := *typedInput.DailyMaxActiveDevices
		properties.DailyMaxActiveDevices = &dailyMaxActiveDevices
	}

	// Set property "GcmCredential":
	if typedInput.GcmCredential != nil {
		var gcmCredential1 GcmCredential_STATUS
		err := gcmCredential1.PopulateFromARM(owner, *typedInput.GcmCredential)
		if err != nil {
			return err
		}
		gcmCredential := gcmCredential1
		properties.GcmCredential = &gcmCredential
	}

	// Set property "MpnsCredential":
	if typedInput.MpnsCredential != nil {
		var mpnsCredential1 MpnsCredential_STATUS
		err := mpnsCredential1.PopulateFromARM(owner, *typedInput.MpnsCredential)
		if err != nil {
			return err
		}
		mpnsCredential := mpnsCredential1
		properties.MpnsCredential = &mpnsCredential
	}

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

	// Set property "RegistrationTtl":
	if typedInput.RegistrationTtl != nil {
		registrationTtl := *typedInput.RegistrationTtl
		properties.RegistrationTtl = &registrationTtl
	}

	// Set property "WnsCredential":
	if typedInput.WnsCredential != nil {
		var wnsCredential1 WnsCredential_STATUS
		err := wnsCredential1.PopulateFromARM(owner, *typedInput.WnsCredential)
		if err != nil {
			return err
		}
		wnsCredential := wnsCredential1
		properties.WnsCredential = &wnsCredential
	}

	// Set property "XiaomiCredential":
	if typedInput.XiaomiCredential != nil {
		var xiaomiCredential1 XiaomiCredential_STATUS
		err := xiaomiCredential1.PopulateFromARM(owner, *typedInput.XiaomiCredential)
		if err != nil {
			return err
		}
		xiaomiCredential := xiaomiCredential1
		properties.XiaomiCredential = &xiaomiCredential
	}

	// No error
	return nil
}

// AssignProperties_From_NotificationHubProperties_STATUS populates our NotificationHubProperties_STATUS from the provided source NotificationHubProperties_STATUS
func (properties *NotificationHubProperties_STATUS) AssignProperties_From_NotificationHubProperties_STATUS(source *storage.NotificationHubProperties_STATUS) error {

	// AdmCredential
	if source.AdmCredential != nil {
		var admCredential AdmCredential_STATUS
		err := admCredential.AssignProperties_From_AdmCredential_STATUS(source.AdmCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_AdmCredential_STATUS() to populate field AdmCredential")
		}
		properties.AdmCredential = &admCredential
	} else {
		properties.AdmCredential = nil
	}

	// ApnsCredential
	if source.ApnsCredential != nil {
		var apnsCredential ApnsCredential_STATUS
		err := apnsCredential.AssignProperties_From_ApnsCredential_STATUS(source.ApnsCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ApnsCredential_STATUS() to populate field ApnsCredential")
		}
		properties.ApnsCredential = &apnsCredential
	} else {
		properties.ApnsCredential = nil
	}

	// AuthorizationRules
	if source.AuthorizationRules != nil {
		authorizationRuleList := make([]SharedAccessAuthorizationRuleProperties_STATUS, len(source.AuthorizationRules))
		for authorizationRuleIndex, authorizationRuleItem := range source.AuthorizationRules {
			var authorizationRule SharedAccessAuthorizationRuleProperties_STATUS
			err := authorizationRule.AssignProperties_From_SharedAccessAuthorizationRuleProperties_STATUS(&authorizationRuleItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_SharedAccessAuthorizationRuleProperties_STATUS() to populate field AuthorizationRules")
			}
			authorizationRuleList[authorizationRuleIndex] = authorizationRule
		}
		properties.AuthorizationRules = authorizationRuleList
	} else {
		properties.AuthorizationRules = nil
	}

	// BaiduCredential
	if source.BaiduCredential != nil {
		var baiduCredential BaiduCredential_STATUS
		err := baiduCredential.AssignProperties_From_BaiduCredential_STATUS(source.BaiduCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_BaiduCredential_STATUS() to populate field BaiduCredential")
		}
		properties.BaiduCredential = &baiduCredential
	} else {
		properties.BaiduCredential = nil
	}

	// BrowserCredential
	if source.BrowserCredential != nil {
		var browserCredential BrowserCredential_STATUS
		err := browserCredential.AssignProperties_From_BrowserCredential_STATUS(source.BrowserCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_BrowserCredential_STATUS() to populate field BrowserCredential")
		}
		properties.BrowserCredential = &browserCredential
	} else {
		properties.BrowserCredential = nil
	}

	// DailyMaxActiveDevices
	properties.DailyMaxActiveDevices = genruntime.ClonePointerToInt(source.DailyMaxActiveDevices)

	// GcmCredential
	if source.GcmCredential != nil {
		var gcmCredential GcmCredential_STATUS
		err := gcmCredential.AssignProperties_From_GcmCredential_STATUS(source.GcmCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_GcmCredential_STATUS() to populate field GcmCredential")
		}
		properties.GcmCredential = &gcmCredential
	} else {
		properties.GcmCredential = nil
	}

	// MpnsCredential
	if source.MpnsCredential != nil {
		var mpnsCredential MpnsCredential_STATUS
		err := mpnsCredential.AssignProperties_From_MpnsCredential_STATUS(source.MpnsCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_MpnsCredential_STATUS() to populate field MpnsCredential")
		}
		properties.MpnsCredential = &mpnsCredential
	} else {
		properties.MpnsCredential = nil
	}

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

	// RegistrationTtl
	properties.RegistrationTtl = genruntime.ClonePointerToString(source.RegistrationTtl)

	// WnsCredential
	if source.WnsCredential != nil {
		var wnsCredential WnsCredential_STATUS
		err := wnsCredential.AssignProperties_From_WnsCredential_STATUS(source.WnsCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_WnsCredential_STATUS() to populate field WnsCredential")
		}
		properties.WnsCredential = &wnsCredential
	} else {
		properties.WnsCredential = nil
	}

	// XiaomiCredential
	if source.XiaomiCredential != nil {
		var xiaomiCredential XiaomiCredential_STATUS
		err := xiaomiCredential.AssignProperties_From_XiaomiCredential_STATUS(source.XiaomiCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_XiaomiCredential_STATUS() to populate field XiaomiCredential")
		}
		properties.XiaomiCredential = &xiaomiCredential
	} else {
		properties.XiaomiCredential = nil
	}

	// No error
	return nil
}

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

	// AdmCredential
	if properties.AdmCredential != nil {
		var admCredential storage.AdmCredential_STATUS
		err := properties.AdmCredential.AssignProperties_To_AdmCredential_STATUS(&admCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_AdmCredential_STATUS() to populate field AdmCredential")
		}
		destination.AdmCredential = &admCredential
	} else {
		destination.AdmCredential = nil
	}

	// ApnsCredential
	if properties.ApnsCredential != nil {
		var apnsCredential storage.ApnsCredential_STATUS
		err := properties.ApnsCredential.AssignProperties_To_ApnsCredential_STATUS(&apnsCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ApnsCredential_STATUS() to populate field ApnsCredential")
		}
		destination.ApnsCredential = &apnsCredential
	} else {
		destination.ApnsCredential = nil
	}

	// AuthorizationRules
	if properties.AuthorizationRules != nil {
		authorizationRuleList := make([]storage.SharedAccessAuthorizationRuleProperties_STATUS, len(properties.AuthorizationRules))
		for authorizationRuleIndex, authorizationRuleItem := range properties.AuthorizationRules {
			var authorizationRule storage.SharedAccessAuthorizationRuleProperties_STATUS
			err := authorizationRuleItem.AssignProperties_To_SharedAccessAuthorizationRuleProperties_STATUS(&authorizationRule)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_SharedAccessAuthorizationRuleProperties_STATUS() to populate field AuthorizationRules")
			}
			authorizationRuleList[authorizationRuleIndex] = authorizationRule
		}
		destination.AuthorizationRules = authorizationRuleList
	} else {
		destination.AuthorizationRules = nil
	}

	// BaiduCredential
	if properties.BaiduCredential != nil {
		var baiduCredential storage.BaiduCredential_STATUS
		err := properties.BaiduCredential.AssignProperties_To_BaiduCredential_STATUS(&baiduCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_BaiduCredential_STATUS() to populate field BaiduCredential")
		}
		destination.BaiduCredential = &baiduCredential
	} else {
		destination.BaiduCredential = nil
	}

	// BrowserCredential
	if properties.BrowserCredential != nil {
		var browserCredential storage.BrowserCredential_STATUS
		err := properties.BrowserCredential.AssignProperties_To_BrowserCredential_STATUS(&browserCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_BrowserCredential_STATUS() to populate field BrowserCredential")
		}
		destination.BrowserCredential = &browserCredential
	} else {
		destination.BrowserCredential = nil
	}

	// DailyMaxActiveDevices
	destination.DailyMaxActiveDevices = genruntime.ClonePointerToInt(properties.DailyMaxActiveDevices)

	// GcmCredential
	if properties.GcmCredential != nil {
		var gcmCredential storage.GcmCredential_STATUS
		err := properties.GcmCredential.AssignProperties_To_GcmCredential_STATUS(&gcmCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_GcmCredential_STATUS() to populate field GcmCredential")
		}
		destination.GcmCredential = &gcmCredential
	} else {
		destination.GcmCredential = nil
	}

	// MpnsCredential
	if properties.MpnsCredential != nil {
		var mpnsCredential storage.MpnsCredential_STATUS
		err := properties.MpnsCredential.AssignProperties_To_MpnsCredential_STATUS(&mpnsCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_MpnsCredential_STATUS() to populate field MpnsCredential")
		}
		destination.MpnsCredential = &mpnsCredential
	} else {
		destination.MpnsCredential = nil
	}

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

	// RegistrationTtl
	destination.RegistrationTtl = genruntime.ClonePointerToString(properties.RegistrationTtl)

	// WnsCredential
	if properties.WnsCredential != nil {
		var wnsCredential storage.WnsCredential_STATUS
		err := properties.WnsCredential.AssignProperties_To_WnsCredential_STATUS(&wnsCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_WnsCredential_STATUS() to populate field WnsCredential")
		}
		destination.WnsCredential = &wnsCredential
	} else {
		destination.WnsCredential = nil
	}

	// XiaomiCredential
	if properties.XiaomiCredential != nil {
		var xiaomiCredential storage.XiaomiCredential_STATUS
		err := properties.XiaomiCredential.AssignProperties_To_XiaomiCredential_STATUS(&xiaomiCredential)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_XiaomiCredential_STATUS() to populate field XiaomiCredential")
		}
		destination.XiaomiCredential = &xiaomiCredential
	} else {
		destination.XiaomiCredential = nil
	}

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

	// No error
	return nil
}

// Description of a NotificationHub AdmCredential.
type AdmCredential struct {
	// +kubebuilder:validation:Required
	// Properties: Description of a NotificationHub AdmCredential.
	Properties *AdmCredentialProperties `json:"properties,omitempty"`
}

var _ genruntime.ARMTransformer = &AdmCredential{}

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

	// Set property "Properties":
	if credential.Properties != nil {
		properties_ARM, err := credential.Properties.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		properties := *properties_ARM.(*arm.AdmCredentialProperties)
		result.Properties = &properties
	}
	return result, nil
}

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

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

	// Set property "Properties":
	if typedInput.Properties != nil {
		var properties1 AdmCredentialProperties
		err := properties1.PopulateFromARM(owner, *typedInput.Properties)
		if err != nil {
			return err
		}
		properties := properties1
		credential.Properties = &properties
	}

	// No error
	return nil
}

// AssignProperties_From_AdmCredential populates our AdmCredential from the provided source AdmCredential
func (credential *AdmCredential) AssignProperties_From_AdmCredential(source *storage.AdmCredential) error {

	// Properties
	if source.Properties != nil {
		var property AdmCredentialProperties
		err := property.AssignProperties_From_AdmCredentialProperties(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_AdmCredentialProperties() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

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

	// Properties
	if credential.Properties != nil {
		var property storage.AdmCredentialProperties
		err := credential.Properties.AssignProperties_To_AdmCredentialProperties(&property)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_AdmCredentialProperties() to populate field Properties")
		}
		destination.Properties = &property
	} else {
		destination.Properties = nil
	}

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

	// No error
	return nil
}

// Initialize_From_AdmCredential_STATUS populates our AdmCredential from the provided source AdmCredential_STATUS
func (credential *AdmCredential) Initialize_From_AdmCredential_STATUS(source *AdmCredential_STATUS) error {

	// Properties
	if source.Properties != nil {
		var property AdmCredentialProperties
		err := property.Initialize_From_AdmCredentialProperties_STATUS(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_AdmCredentialProperties_STATUS() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

// Description of a NotificationHub AdmCredential.
type AdmCredential_STATUS struct {
	// Properties: Description of a NotificationHub AdmCredential.
	Properties *AdmCredentialProperties_STATUS `json:"properties,omitempty"`
}

var _ genruntime.FromARMConverter = &AdmCredential_STATUS{}

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

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

	// Set property "Properties":
	if typedInput.Properties != nil {
		var properties1 AdmCredentialProperties_STATUS
		err := properties1.PopulateFromARM(owner, *typedInput.Properties)
		if err != nil {
			return err
		}
		properties := properties1
		credential.Properties = &properties
	}

	// No error
	return nil
}

// AssignProperties_From_AdmCredential_STATUS populates our AdmCredential_STATUS from the provided source AdmCredential_STATUS
func (credential *AdmCredential_STATUS) AssignProperties_From_AdmCredential_STATUS(source *storage.AdmCredential_STATUS) error {

	// Properties
	if source.Properties != nil {
		var property AdmCredentialProperties_STATUS
		err := property.AssignProperties_From_AdmCredentialProperties_STATUS(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_AdmCredentialProperties_STATUS() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

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

	// Properties
	if credential.Properties != nil {
		var property storage.AdmCredentialProperties_STATUS
		err := credential.Properties.AssignProperties_To_AdmCredentialProperties_STATUS(&property)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_AdmCredentialProperties_STATUS() to populate field Properties")
		}
		destination.Properties = &property
	} else {
		destination.Properties = nil
	}

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

	// No error
	return nil
}

// Description of a NotificationHub ApnsCredential.
type ApnsCredential struct {
	// +kubebuilder:validation:Required
	// Properties: Description of a NotificationHub ApnsCredential.
	Properties *ApnsCredentialProperties `json:"properties,omitempty"`
}

var _ genruntime.ARMTransformer = &ApnsCredential{}

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

	// Set property "Properties":
	if credential.Properties != nil {
		properties_ARM, err := credential.Properties.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		properties := *properties_ARM.(*arm.ApnsCredentialProperties)
		result.Properties = &properties
	}
	return result, nil
}

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

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

	// Set property "Properties":
	if typedInput.Properties != nil {
		var properties1 ApnsCredentialProperties
		err := properties1.PopulateFromARM(owner, *typedInput.Properties)
		if err != nil {
			return err
		}
		properties := properties1
		credential.Properties = &properties
	}

	// No error
	return nil
}

// AssignProperties_From_ApnsCredential populates our ApnsCredential from the provided source ApnsCredential
func (credential *ApnsCredential) AssignProperties_From_ApnsCredential(source *storage.ApnsCredential) error {

	// Properties
	if source.Properties != nil {
		var property ApnsCredentialProperties
		err := property.AssignProperties_From_ApnsCredentialProperties(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ApnsCredentialProperties() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

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

	// Properties
	if credential.Properties != nil {
		var property storage.ApnsCredentialProperties
		err := credential.Properties.AssignProperties_To_ApnsCredentialProperties(&property)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ApnsCredentialProperties() to populate field Properties")
		}
		destination.Properties = &property
	} else {
		destination.Properties = nil
	}

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

	// No error
	return nil
}

// Initialize_From_ApnsCredential_STATUS populates our ApnsCredential from the provided source ApnsCredential_STATUS
func (credential *ApnsCredential) Initialize_From_ApnsCredential_STATUS(source *ApnsCredential_STATUS) error {

	// Properties
	if source.Properties != nil {
		var property ApnsCredentialProperties
		err := property.Initialize_From_ApnsCredentialProperties_STATUS(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_ApnsCredentialProperties_STATUS() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

// Description of a NotificationHub ApnsCredential.
type ApnsCredential_STATUS struct {
	// Properties: Description of a NotificationHub ApnsCredential.
	Properties *ApnsCredentialProperties_STATUS `json:"properties,omitempty"`
}

var _ genruntime.FromARMConverter = &ApnsCredential_STATUS{}

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

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

	// Set property "Properties":
	if typedInput.Properties != nil {
		var properties1 ApnsCredentialProperties_STATUS
		err := properties1.PopulateFromARM(owner, *typedInput.Properties)
		if err != nil {
			return err
		}
		properties := properties1
		credential.Properties = &properties
	}

	// No error
	return nil
}

// AssignProperties_From_ApnsCredential_STATUS populates our ApnsCredential_STATUS from the provided source ApnsCredential_STATUS
func (credential *ApnsCredential_STATUS) AssignProperties_From_ApnsCredential_STATUS(source *storage.ApnsCredential_STATUS) error {

	// Properties
	if source.Properties != nil {
		var property ApnsCredentialProperties_STATUS
		err := property.AssignProperties_From_ApnsCredentialProperties_STATUS(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ApnsCredentialProperties_STATUS() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

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

	// Properties
	if credential.Properties != nil {
		var property storage.ApnsCredentialProperties_STATUS
		err := credential.Properties.AssignProperties_To_ApnsCredentialProperties_STATUS(&property)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ApnsCredentialProperties_STATUS() to populate field Properties")
		}
		destination.Properties = &property
	} else {
		destination.Properties = nil
	}

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

	// No error
	return nil
}

// Description of a NotificationHub BaiduCredential.
type BaiduCredential struct {
	// +kubebuilder:validation:Required
	// Properties: Description of a NotificationHub BaiduCredential.
	Properties *BaiduCredentialProperties `json:"properties,omitempty"`
}

var _ genruntime.ARMTransformer = &BaiduCredential{}

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

	// Set property "Properties":
	if credential.Properties != nil {
		properties_ARM, err := credential.Properties.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		properties := *properties_ARM.(*arm.BaiduCredentialProperties)
		result.Properties = &properties
	}
	return result, nil
}

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

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

	// Set property "Properties":
	if typedInput.Properties != nil {
		var properties1 BaiduCredentialProperties
		err := properties1.PopulateFromARM(owner, *typedInput.Properties)
		if err != nil {
			return err
		}
		properties := properties1
		credential.Properties = &properties
	}

	// No error
	return nil
}

// AssignProperties_From_BaiduCredential populates our BaiduCredential from the provided source BaiduCredential
func (credential *BaiduCredential) AssignProperties_From_BaiduCredential(source *storage.BaiduCredential) error {

	// Properties
	if source.Properties != nil {
		var property BaiduCredentialProperties
		err := property.AssignProperties_From_BaiduCredentialProperties(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_BaiduCredentialProperties() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

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

	// Properties
	if credential.Properties != nil {
		var property storage.BaiduCredentialProperties
		err := credential.Properties.AssignProperties_To_BaiduCredentialProperties(&property)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_BaiduCredentialProperties() to populate field Properties")
		}
		destination.Properties = &property
	} else {
		destination.Properties = nil
	}

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

	// No error
	return nil
}

// Initialize_From_BaiduCredential_STATUS populates our BaiduCredential from the provided source BaiduCredential_STATUS
func (credential *BaiduCredential) Initialize_From_BaiduCredential_STATUS(source *BaiduCredential_STATUS) error {

	// Properties
	if source.Properties != nil {
		var property BaiduCredentialProperties
		err := property.Initialize_From_BaiduCredentialProperties_STATUS(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_BaiduCredentialProperties_STATUS() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

// Description of a NotificationHub BaiduCredential.
type BaiduCredential_STATUS struct {
	// Properties: Description of a NotificationHub BaiduCredential.
	Properties *BaiduCredentialProperties_STATUS `json:"properties,omitempty"`
}

var _ genruntime.FromARMConverter = &BaiduCredential_STATUS{}

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

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

	// Set property "Properties":
	if typedInput.Properties != nil {
		var properties1 BaiduCredentialProperties_STATUS
		err := properties1.PopulateFromARM(owner, *typedInput.Properties)
		if err != nil {
			return err
		}
		properties := properties1
		credential.Properties = &properties
	}

	// No error
	return nil
}

// AssignProperties_From_BaiduCredential_STATUS populates our BaiduCredential_STATUS from the provided source BaiduCredential_STATUS
func (credential *BaiduCredential_STATUS) AssignProperties_From_BaiduCredential_STATUS(source *storage.BaiduCredential_STATUS) error {

	// Properties
	if source.Properties != nil {
		var property BaiduCredentialProperties_STATUS
		err := property.AssignProperties_From_BaiduCredentialProperties_STATUS(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_BaiduCredentialProperties_STATUS() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

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

	// Properties
	if credential.Properties != nil {
		var property storage.BaiduCredentialProperties_STATUS
		err := credential.Properties.AssignProperties_To_BaiduCredentialProperties_STATUS(&property)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_BaiduCredentialProperties_STATUS() to populate field Properties")
		}
		destination.Properties = &property
	} else {
		destination.Properties = nil
	}

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

	// No error
	return nil
}

// Description of a NotificationHub BrowserCredential.
type BrowserCredential struct {
	// +kubebuilder:validation:Required
	// Properties: Description of a NotificationHub BrowserCredential.
	Properties *BrowserCredentialProperties `json:"properties,omitempty"`
}

var _ genruntime.ARMTransformer = &BrowserCredential{}

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

	// Set property "Properties":
	if credential.Properties != nil {
		properties_ARM, err := credential.Properties.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		properties := *properties_ARM.(*arm.BrowserCredentialProperties)
		result.Properties = &properties
	}
	return result, nil
}

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

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

	// Set property "Properties":
	if typedInput.Properties != nil {
		var properties1 BrowserCredentialProperties
		err := properties1.PopulateFromARM(owner, *typedInput.Properties)
		if err != nil {
			return err
		}
		properties := properties1
		credential.Properties = &properties
	}

	// No error
	return nil
}

// AssignProperties_From_BrowserCredential populates our BrowserCredential from the provided source BrowserCredential
func (credential *BrowserCredential) AssignProperties_From_BrowserCredential(source *storage.BrowserCredential) error {

	// Properties
	if source.Properties != nil {
		var property BrowserCredentialProperties
		err := property.AssignProperties_From_BrowserCredentialProperties(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_BrowserCredentialProperties() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

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

	// Properties
	if credential.Properties != nil {
		var property storage.BrowserCredentialProperties
		err := credential.Properties.AssignProperties_To_BrowserCredentialProperties(&property)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_BrowserCredentialProperties() to populate field Properties")
		}
		destination.Properties = &property
	} else {
		destination.Properties = nil
	}

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

	// No error
	return nil
}

// Initialize_From_BrowserCredential_STATUS populates our BrowserCredential from the provided source BrowserCredential_STATUS
func (credential *BrowserCredential) Initialize_From_BrowserCredential_STATUS(source *BrowserCredential_STATUS) error {

	// Properties
	if source.Properties != nil {
		var property BrowserCredentialProperties
		err := property.Initialize_From_BrowserCredentialProperties_STATUS(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_BrowserCredentialProperties_STATUS() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

// Description of a NotificationHub BrowserCredential.
type BrowserCredential_STATUS struct {
	// Properties: Description of a NotificationHub BrowserCredential.
	Properties *BrowserCredentialProperties_STATUS `json:"properties,omitempty"`
}

var _ genruntime.FromARMConverter = &BrowserCredential_STATUS{}

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

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

	// Set property "Properties":
	if typedInput.Properties != nil {
		var properties1 BrowserCredentialProperties_STATUS
		err := properties1.PopulateFromARM(owner, *typedInput.Properties)
		if err != nil {
			return err
		}
		properties := properties1
		credential.Properties = &properties
	}

	// No error
	return nil
}

// AssignProperties_From_BrowserCredential_STATUS populates our BrowserCredential_STATUS from the provided source BrowserCredential_STATUS
func (credential *BrowserCredential_STATUS) AssignProperties_From_BrowserCredential_STATUS(source *storage.BrowserCredential_STATUS) error {

	// Properties
	if source.Properties != nil {
		var property BrowserCredentialProperties_STATUS
		err := property.AssignProperties_From_BrowserCredentialProperties_STATUS(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_BrowserCredentialProperties_STATUS() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

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

	// Properties
	if credential.Properties != nil {
		var property storage.BrowserCredentialProperties_STATUS
		err := credential.Properties.AssignProperties_To_BrowserCredentialProperties_STATUS(&property)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_BrowserCredentialProperties_STATUS() to populate field Properties")
		}
		destination.Properties = &property
	} else {
		destination.Properties = nil
	}

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

	// No error
	return nil
}

// Description of a NotificationHub GcmCredential.
type GcmCredential struct {
	// +kubebuilder:validation:Required
	// Properties: Description of a NotificationHub GcmCredential.
	Properties *GcmCredentialProperties `json:"properties,omitempty"`
}

var _ genruntime.ARMTransformer = &GcmCredential{}

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

	// Set property "Properties":
	if credential.Properties != nil {
		properties_ARM, err := credential.Properties.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		properties := *properties_ARM.(*arm.GcmCredentialProperties)
		result.Properties = &properties
	}
	return result, nil
}

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

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

	// Set property "Properties":
	if typedInput.Properties != nil {
		var properties1 GcmCredentialProperties
		err := properties1.PopulateFromARM(owner, *typedInput.Properties)
		if err != nil {
			return err
		}
		properties := properties1
		credential.Properties = &properties
	}

	// No error
	return nil
}

// AssignProperties_From_GcmCredential populates our GcmCredential from the provided source GcmCredential
func (credential *GcmCredential) AssignProperties_From_GcmCredential(source *storage.GcmCredential) error {

	// Properties
	if source.Properties != nil {
		var property GcmCredentialProperties
		err := property.AssignProperties_From_GcmCredentialProperties(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_GcmCredentialProperties() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

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

	// Properties
	if credential.Properties != nil {
		var property storage.GcmCredentialProperties
		err := credential.Properties.AssignProperties_To_GcmCredentialProperties(&property)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_GcmCredentialProperties() to populate field Properties")
		}
		destination.Properties = &property
	} else {
		destination.Properties = nil
	}

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

	// No error
	return nil
}

// Initialize_From_GcmCredential_STATUS populates our GcmCredential from the provided source GcmCredential_STATUS
func (credential *GcmCredential) Initialize_From_GcmCredential_STATUS(source *GcmCredential_STATUS) error {

	// Properties
	if source.Properties != nil {
		var property GcmCredentialProperties
		err := property.Initialize_From_GcmCredentialProperties_STATUS(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_GcmCredentialProperties_STATUS() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

// Description of a NotificationHub GcmCredential.
type GcmCredential_STATUS struct {
	// Properties: Description of a NotificationHub GcmCredential.
	Properties *GcmCredentialProperties_STATUS `json:"properties,omitempty"`
}

var _ genruntime.FromARMConverter = &GcmCredential_STATUS{}

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

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

	// Set property "Properties":
	if typedInput.Properties != nil {
		var properties1 GcmCredentialProperties_STATUS
		err := properties1.PopulateFromARM(owner, *typedInput.Properties)
		if err != nil {
			return err
		}
		properties := properties1
		credential.Properties = &properties
	}

	// No error
	return nil
}

// AssignProperties_From_GcmCredential_STATUS populates our GcmCredential_STATUS from the provided source GcmCredential_STATUS
func (credential *GcmCredential_STATUS) AssignProperties_From_GcmCredential_STATUS(source *storage.GcmCredential_STATUS) error {

	// Properties
	if source.Properties != nil {
		var property GcmCredentialProperties_STATUS
		err := property.AssignProperties_From_GcmCredentialProperties_STATUS(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_GcmCredentialProperties_STATUS() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

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

	// Properties
	if credential.Properties != nil {
		var property storage.GcmCredentialProperties_STATUS
		err := credential.Properties.AssignProperties_To_GcmCredentialProperties_STATUS(&property)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_GcmCredentialProperties_STATUS() to populate field Properties")
		}
		destination.Properties = &property
	} else {
		destination.Properties = nil
	}

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

	// No error
	return nil
}

// Description of a NotificationHub MpnsCredential.
type MpnsCredential struct {
	// +kubebuilder:validation:Required
	// Properties: Description of a NotificationHub MpnsCredential.
	Properties *MpnsCredentialProperties `json:"properties,omitempty"`
}

var _ genruntime.ARMTransformer = &MpnsCredential{}

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

	// Set property "Properties":
	if credential.Properties != nil {
		properties_ARM, err := credential.Properties.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		properties := *properties_ARM.(*arm.MpnsCredentialProperties)
		result.Properties = &properties
	}
	return result, nil
}

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

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

	// Set property "Properties":
	if typedInput.Properties != nil {
		var properties1 MpnsCredentialProperties
		err := properties1.PopulateFromARM(owner, *typedInput.Properties)
		if err != nil {
			return err
		}
		properties := properties1
		credential.Properties = &properties
	}

	// No error
	return nil
}

// AssignProperties_From_MpnsCredential populates our MpnsCredential from the provided source MpnsCredential
func (credential *MpnsCredential) AssignProperties_From_MpnsCredential(source *storage.MpnsCredential) error {

	// Properties
	if source.Properties != nil {
		var property MpnsCredentialProperties
		err := property.AssignProperties_From_MpnsCredentialProperties(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_MpnsCredentialProperties() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

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

	// Properties
	if credential.Properties != nil {
		var property storage.MpnsCredentialProperties
		err := credential.Properties.AssignProperties_To_MpnsCredentialProperties(&property)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_MpnsCredentialProperties() to populate field Properties")
		}
		destination.Properties = &property
	} else {
		destination.Properties = nil
	}

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

	// No error
	return nil
}

// Initialize_From_MpnsCredential_STATUS populates our MpnsCredential from the provided source MpnsCredential_STATUS
func (credential *MpnsCredential) Initialize_From_MpnsCredential_STATUS(source *MpnsCredential_STATUS) error {

	// Properties
	if source.Properties != nil {
		var property MpnsCredentialProperties
		err := property.Initialize_From_MpnsCredentialProperties_STATUS(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_MpnsCredentialProperties_STATUS() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

// Description of a NotificationHub MpnsCredential.
type MpnsCredential_STATUS struct {
	// Properties: Description of a NotificationHub MpnsCredential.
	Properties *MpnsCredentialProperties_STATUS `json:"properties,omitempty"`
}

var _ genruntime.FromARMConverter = &MpnsCredential_STATUS{}

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

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

	// Set property "Properties":
	if typedInput.Properties != nil {
		var properties1 MpnsCredentialProperties_STATUS
		err := properties1.PopulateFromARM(owner, *typedInput.Properties)
		if err != nil {
			return err
		}
		properties := properties1
		credential.Properties = &properties
	}

	// No error
	return nil
}

// AssignProperties_From_MpnsCredential_STATUS populates our MpnsCredential_STATUS from the provided source MpnsCredential_STATUS
func (credential *MpnsCredential_STATUS) AssignProperties_From_MpnsCredential_STATUS(source *storage.MpnsCredential_STATUS) error {

	// Properties
	if source.Properties != nil {
		var property MpnsCredentialProperties_STATUS
		err := property.AssignProperties_From_MpnsCredentialProperties_STATUS(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_MpnsCredentialProperties_STATUS() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

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

	// Properties
	if credential.Properties != nil {
		var property storage.MpnsCredentialProperties_STATUS
		err := credential.Properties.AssignProperties_To_MpnsCredentialProperties_STATUS(&property)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_MpnsCredentialProperties_STATUS() to populate field Properties")
		}
		destination.Properties = &property
	} else {
		destination.Properties = nil
	}

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

	// No error
	return nil
}

type NotificationHubOperatorSecrets 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_NotificationHubOperatorSecrets populates our NotificationHubOperatorSecrets from the provided source NotificationHubOperatorSecrets
func (secrets *NotificationHubOperatorSecrets) AssignProperties_From_NotificationHubOperatorSecrets(source *storage.NotificationHubOperatorSecrets) 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_NotificationHubOperatorSecrets populates the provided destination NotificationHubOperatorSecrets from our NotificationHubOperatorSecrets
func (secrets *NotificationHubOperatorSecrets) AssignProperties_To_NotificationHubOperatorSecrets(destination *storage.NotificationHubOperatorSecrets) 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
}

// Description of a NotificationHub WnsCredential.
type WnsCredential struct {
	// +kubebuilder:validation:Required
	// Properties: Description of a NotificationHub WnsCredential.
	Properties *WnsCredentialProperties `json:"properties,omitempty"`
}

var _ genruntime.ARMTransformer = &WnsCredential{}

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

	// Set property "Properties":
	if credential.Properties != nil {
		properties_ARM, err := credential.Properties.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		properties := *properties_ARM.(*arm.WnsCredentialProperties)
		result.Properties = &properties
	}
	return result, nil
}

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

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

	// Set property "Properties":
	if typedInput.Properties != nil {
		var properties1 WnsCredentialProperties
		err := properties1.PopulateFromARM(owner, *typedInput.Properties)
		if err != nil {
			return err
		}
		properties := properties1
		credential.Properties = &properties
	}

	// No error
	return nil
}

// AssignProperties_From_WnsCredential populates our WnsCredential from the provided source WnsCredential
func (credential *WnsCredential) AssignProperties_From_WnsCredential(source *storage.WnsCredential) error {

	// Properties
	if source.Properties != nil {
		var property WnsCredentialProperties
		err := property.AssignProperties_From_WnsCredentialProperties(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_WnsCredentialProperties() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

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

	// Properties
	if credential.Properties != nil {
		var property storage.WnsCredentialProperties
		err := credential.Properties.AssignProperties_To_WnsCredentialProperties(&property)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_WnsCredentialProperties() to populate field Properties")
		}
		destination.Properties = &property
	} else {
		destination.Properties = nil
	}

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

	// No error
	return nil
}

// Initialize_From_WnsCredential_STATUS populates our WnsCredential from the provided source WnsCredential_STATUS
func (credential *WnsCredential) Initialize_From_WnsCredential_STATUS(source *WnsCredential_STATUS) error {

	// Properties
	if source.Properties != nil {
		var property WnsCredentialProperties
		err := property.Initialize_From_WnsCredentialProperties_STATUS(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_WnsCredentialProperties_STATUS() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

// Description of a NotificationHub WnsCredential.
type WnsCredential_STATUS struct {
	// Properties: Description of a NotificationHub WnsCredential.
	Properties *WnsCredentialProperties_STATUS `json:"properties,omitempty"`
}

var _ genruntime.FromARMConverter = &WnsCredential_STATUS{}

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

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

	// Set property "Properties":
	if typedInput.Properties != nil {
		var properties1 WnsCredentialProperties_STATUS
		err := properties1.PopulateFromARM(owner, *typedInput.Properties)
		if err != nil {
			return err
		}
		properties := properties1
		credential.Properties = &properties
	}

	// No error
	return nil
}

// AssignProperties_From_WnsCredential_STATUS populates our WnsCredential_STATUS from the provided source WnsCredential_STATUS
func (credential *WnsCredential_STATUS) AssignProperties_From_WnsCredential_STATUS(source *storage.WnsCredential_STATUS) error {

	// Properties
	if source.Properties != nil {
		var property WnsCredentialProperties_STATUS
		err := property.AssignProperties_From_WnsCredentialProperties_STATUS(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_WnsCredentialProperties_STATUS() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

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

	// Properties
	if credential.Properties != nil {
		var property storage.WnsCredentialProperties_STATUS
		err := credential.Properties.AssignProperties_To_WnsCredentialProperties_STATUS(&property)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_WnsCredentialProperties_STATUS() to populate field Properties")
		}
		destination.Properties = &property
	} else {
		destination.Properties = nil
	}

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

	// No error
	return nil
}

// Description of a NotificationHub XiaomiCredential.
type XiaomiCredential struct {
	// +kubebuilder:validation:Required
	// Properties: Description of a NotificationHub XiaomiCredentialProperties.
	Properties *XiaomiCredentialProperties `json:"properties,omitempty"`
}

var _ genruntime.ARMTransformer = &XiaomiCredential{}

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

	// Set property "Properties":
	if credential.Properties != nil {
		properties_ARM, err := credential.Properties.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		properties := *properties_ARM.(*arm.XiaomiCredentialProperties)
		result.Properties = &properties
	}
	return result, nil
}

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

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

	// Set property "Properties":
	if typedInput.Properties != nil {
		var properties1 XiaomiCredentialProperties
		err := properties1.PopulateFromARM(owner, *typedInput.Properties)
		if err != nil {
			return err
		}
		properties := properties1
		credential.Properties = &properties
	}

	// No error
	return nil
}

// AssignProperties_From_XiaomiCredential populates our XiaomiCredential from the provided source XiaomiCredential
func (credential *XiaomiCredential) AssignProperties_From_XiaomiCredential(source *storage.XiaomiCredential) error {

	// Properties
	if source.Properties != nil {
		var property XiaomiCredentialProperties
		err := property.AssignProperties_From_XiaomiCredentialProperties(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_XiaomiCredentialProperties() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

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

	// Properties
	if credential.Properties != nil {
		var property storage.XiaomiCredentialProperties
		err := credential.Properties.AssignProperties_To_XiaomiCredentialProperties(&property)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_XiaomiCredentialProperties() to populate field Properties")
		}
		destination.Properties = &property
	} else {
		destination.Properties = nil
	}

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

	// No error
	return nil
}

// Initialize_From_XiaomiCredential_STATUS populates our XiaomiCredential from the provided source XiaomiCredential_STATUS
func (credential *XiaomiCredential) Initialize_From_XiaomiCredential_STATUS(source *XiaomiCredential_STATUS) error {

	// Properties
	if source.Properties != nil {
		var property XiaomiCredentialProperties
		err := property.Initialize_From_XiaomiCredentialProperties_STATUS(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_XiaomiCredentialProperties_STATUS() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

// Description of a NotificationHub XiaomiCredential.
type XiaomiCredential_STATUS struct {
	// Properties: Description of a NotificationHub XiaomiCredentialProperties.
	Properties *XiaomiCredentialProperties_STATUS `json:"properties,omitempty"`
}

var _ genruntime.FromARMConverter = &XiaomiCredential_STATUS{}

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

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

	// Set property "Properties":
	if typedInput.Properties != nil {
		var properties1 XiaomiCredentialProperties_STATUS
		err := properties1.PopulateFromARM(owner, *typedInput.Properties)
		if err != nil {
			return err
		}
		properties := properties1
		credential.Properties = &properties
	}

	// No error
	return nil
}

// AssignProperties_From_XiaomiCredential_STATUS populates our XiaomiCredential_STATUS from the provided source XiaomiCredential_STATUS
func (credential *XiaomiCredential_STATUS) AssignProperties_From_XiaomiCredential_STATUS(source *storage.XiaomiCredential_STATUS) error {

	// Properties
	if source.Properties != nil {
		var property XiaomiCredentialProperties_STATUS
		err := property.AssignProperties_From_XiaomiCredentialProperties_STATUS(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_XiaomiCredentialProperties_STATUS() to populate field Properties")
		}
		credential.Properties = &property
	} else {
		credential.Properties = nil
	}

	// No error
	return nil
}

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

	// Properties
	if credential.Properties != nil {
		var property storage.XiaomiCredentialProperties_STATUS
		err := credential.Properties.AssignProperties_To_XiaomiCredentialProperties_STATUS(&property)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_XiaomiCredentialProperties_STATUS() to populate field Properties")
		}
		destination.Properties = &property
	} else {
		destination.Properties = nil
	}

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

	// No error
	return nil
}

// Description of a NotificationHub AdmCredential.
type AdmCredentialProperties struct {
	// +kubebuilder:validation:Required
	// AuthTokenUrl: Gets or sets the URL of the authorization token.
	AuthTokenUrl *genruntime.SecretReference `json:"authTokenUrl,omitempty"`

	// +kubebuilder:validation:Required
	// ClientId: Gets or sets the client identifier.
	ClientId *genruntime.SecretReference `json:"clientId,omitempty"`

	// +kubebuilder:validation:Required
	// ClientSecret: Gets or sets the credential secret access key.
	ClientSecret *genruntime.SecretReference `json:"clientSecret,omitempty"`
}

var _ genruntime.ARMTransformer = &AdmCredentialProperties{}

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

	// Set property "AuthTokenUrl":
	if properties.AuthTokenUrl != nil {
		authTokenUrlSecret, err := resolved.ResolvedSecrets.Lookup(*properties.AuthTokenUrl)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property AuthTokenUrl")
		}
		authTokenUrl := authTokenUrlSecret
		result.AuthTokenUrl = &authTokenUrl
	}

	// Set property "ClientId":
	if properties.ClientId != nil {
		clientIdSecret, err := resolved.ResolvedSecrets.Lookup(*properties.ClientId)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property ClientId")
		}
		clientId := clientIdSecret
		result.ClientId = &clientId
	}

	// Set property "ClientSecret":
	if properties.ClientSecret != nil {
		clientSecretSecret, err := resolved.ResolvedSecrets.Lookup(*properties.ClientSecret)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property ClientSecret")
		}
		clientSecret := clientSecretSecret
		result.ClientSecret = &clientSecret
	}
	return result, nil
}

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

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

	// no assignment for property "AuthTokenUrl"

	// no assignment for property "ClientId"

	// no assignment for property "ClientSecret"

	// No error
	return nil
}

// AssignProperties_From_AdmCredentialProperties populates our AdmCredentialProperties from the provided source AdmCredentialProperties
func (properties *AdmCredentialProperties) AssignProperties_From_AdmCredentialProperties(source *storage.AdmCredentialProperties) error {

	// AuthTokenUrl
	if source.AuthTokenUrl != nil {
		authTokenUrl := source.AuthTokenUrl.Copy()
		properties.AuthTokenUrl = &authTokenUrl
	} else {
		properties.AuthTokenUrl = nil
	}

	// ClientId
	if source.ClientId != nil {
		clientId := source.ClientId.Copy()
		properties.ClientId = &clientId
	} else {
		properties.ClientId = nil
	}

	// ClientSecret
	if source.ClientSecret != nil {
		clientSecret := source.ClientSecret.Copy()
		properties.ClientSecret = &clientSecret
	} else {
		properties.ClientSecret = nil
	}

	// No error
	return nil
}

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

	// AuthTokenUrl
	if properties.AuthTokenUrl != nil {
		authTokenUrl := properties.AuthTokenUrl.Copy()
		destination.AuthTokenUrl = &authTokenUrl
	} else {
		destination.AuthTokenUrl = nil
	}

	// ClientId
	if properties.ClientId != nil {
		clientId := properties.ClientId.Copy()
		destination.ClientId = &clientId
	} else {
		destination.ClientId = nil
	}

	// ClientSecret
	if properties.ClientSecret != nil {
		clientSecret := properties.ClientSecret.Copy()
		destination.ClientSecret = &clientSecret
	} else {
		destination.ClientSecret = nil
	}

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

	// No error
	return nil
}

// Initialize_From_AdmCredentialProperties_STATUS populates our AdmCredentialProperties from the provided source AdmCredentialProperties_STATUS
func (properties *AdmCredentialProperties) Initialize_From_AdmCredentialProperties_STATUS(source *AdmCredentialProperties_STATUS) error {

	// No error
	return nil
}

// Description of a NotificationHub AdmCredential.
type AdmCredentialProperties_STATUS struct {
}

var _ genruntime.FromARMConverter = &AdmCredentialProperties_STATUS{}

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

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

	// No error
	return nil
}

// AssignProperties_From_AdmCredentialProperties_STATUS populates our AdmCredentialProperties_STATUS from the provided source AdmCredentialProperties_STATUS
func (properties *AdmCredentialProperties_STATUS) AssignProperties_From_AdmCredentialProperties_STATUS(source *storage.AdmCredentialProperties_STATUS) error {

	// No error
	return nil
}

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

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

	// No error
	return nil
}

// Description of a NotificationHub ApnsCredential.
type ApnsCredentialProperties struct {
	// ApnsCertificate: Gets or sets the APNS certificate.
	ApnsCertificate *genruntime.SecretReference `json:"apnsCertificate,omitempty"`

	// AppId: Gets or sets the issuer (iss) registered claim key, whose value is
	// your 10-character Team ID, obtained from your developer account
	AppId *genruntime.SecretReference `json:"appId,omitempty"`

	// AppName: Gets or sets the name of the application
	AppName *genruntime.SecretReference `json:"appName,omitempty"`

	// CertificateKey: Gets or sets the certificate key.
	CertificateKey *genruntime.SecretReference `json:"certificateKey,omitempty"`

	// +kubebuilder:validation:Required
	// Endpoint: Gets or sets the endpoint of this credential.
	Endpoint *genruntime.SecretReference `json:"endpoint,omitempty"`

	// KeyId: Gets or sets a 10-character key identifier (kid) key, obtained from
	// your developer account
	KeyId *genruntime.SecretReference `json:"keyId,omitempty"`

	// Thumbprint: Gets or sets the APNS certificate Thumbprint
	Thumbprint *genruntime.SecretReference `json:"thumbprint,omitempty"`

	// Token: Gets or sets provider Authentication Token, obtained through your
	// developer account
	Token *genruntime.SecretReference `json:"token,omitempty"`
}

var _ genruntime.ARMTransformer = &ApnsCredentialProperties{}

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

	// Set property "ApnsCertificate":
	if properties.ApnsCertificate != nil {
		apnsCertificateSecret, err := resolved.ResolvedSecrets.Lookup(*properties.ApnsCertificate)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property ApnsCertificate")
		}
		apnsCertificate := apnsCertificateSecret
		result.ApnsCertificate = &apnsCertificate
	}

	// Set property "AppId":
	if properties.AppId != nil {
		appIdSecret, err := resolved.ResolvedSecrets.Lookup(*properties.AppId)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property AppId")
		}
		appId := appIdSecret
		result.AppId = &appId
	}

	// Set property "AppName":
	if properties.AppName != nil {
		appNameSecret, err := resolved.ResolvedSecrets.Lookup(*properties.AppName)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property AppName")
		}
		appName := appNameSecret
		result.AppName = &appName
	}

	// Set property "CertificateKey":
	if properties.CertificateKey != nil {
		certificateKeySecret, err := resolved.ResolvedSecrets.Lookup(*properties.CertificateKey)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property CertificateKey")
		}
		certificateKey := certificateKeySecret
		result.CertificateKey = &certificateKey
	}

	// Set property "Endpoint":
	if properties.Endpoint != nil {
		endpointSecret, err := resolved.ResolvedSecrets.Lookup(*properties.Endpoint)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property Endpoint")
		}
		endpoint := endpointSecret
		result.Endpoint = &endpoint
	}

	// Set property "KeyId":
	if properties.KeyId != nil {
		keyIdSecret, err := resolved.ResolvedSecrets.Lookup(*properties.KeyId)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property KeyId")
		}
		keyId := keyIdSecret
		result.KeyId = &keyId
	}

	// Set property "Thumbprint":
	if properties.Thumbprint != nil {
		thumbprintSecret, err := resolved.ResolvedSecrets.Lookup(*properties.Thumbprint)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property Thumbprint")
		}
		thumbprint := thumbprintSecret
		result.Thumbprint = &thumbprint
	}

	// Set property "Token":
	if properties.Token != nil {
		tokenSecret, err := resolved.ResolvedSecrets.Lookup(*properties.Token)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property Token")
		}
		token := tokenSecret
		result.Token = &token
	}
	return result, nil
}

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

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

	// no assignment for property "ApnsCertificate"

	// no assignment for property "AppId"

	// no assignment for property "AppName"

	// no assignment for property "CertificateKey"

	// no assignment for property "Endpoint"

	// no assignment for property "KeyId"

	// no assignment for property "Thumbprint"

	// no assignment for property "Token"

	// No error
	return nil
}

// AssignProperties_From_ApnsCredentialProperties populates our ApnsCredentialProperties from the provided source ApnsCredentialProperties
func (properties *ApnsCredentialProperties) AssignProperties_From_ApnsCredentialProperties(source *storage.ApnsCredentialProperties) error {

	// ApnsCertificate
	if source.ApnsCertificate != nil {
		apnsCertificate := source.ApnsCertificate.Copy()
		properties.ApnsCertificate = &apnsCertificate
	} else {
		properties.ApnsCertificate = nil
	}

	// AppId
	if source.AppId != nil {
		appId := source.AppId.Copy()
		properties.AppId = &appId
	} else {
		properties.AppId = nil
	}

	// AppName
	if source.AppName != nil {
		appName := source.AppName.Copy()
		properties.AppName = &appName
	} else {
		properties.AppName = nil
	}

	// CertificateKey
	if source.CertificateKey != nil {
		certificateKey := source.CertificateKey.Copy()
		properties.CertificateKey = &certificateKey
	} else {
		properties.CertificateKey = nil
	}

	// Endpoint
	if source.Endpoint != nil {
		endpoint := source.Endpoint.Copy()
		properties.Endpoint = &endpoint
	} else {
		properties.Endpoint = nil
	}

	// KeyId
	if source.KeyId != nil {
		keyId := source.KeyId.Copy()
		properties.KeyId = &keyId
	} else {
		properties.KeyId = nil
	}

	// Thumbprint
	if source.Thumbprint != nil {
		thumbprint := source.Thumbprint.Copy()
		properties.Thumbprint = &thumbprint
	} else {
		properties.Thumbprint = nil
	}

	// Token
	if source.Token != nil {
		token := source.Token.Copy()
		properties.Token = &token
	} else {
		properties.Token = nil
	}

	// No error
	return nil
}

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

	// ApnsCertificate
	if properties.ApnsCertificate != nil {
		apnsCertificate := properties.ApnsCertificate.Copy()
		destination.ApnsCertificate = &apnsCertificate
	} else {
		destination.ApnsCertificate = nil
	}

	// AppId
	if properties.AppId != nil {
		appId := properties.AppId.Copy()
		destination.AppId = &appId
	} else {
		destination.AppId = nil
	}

	// AppName
	if properties.AppName != nil {
		appName := properties.AppName.Copy()
		destination.AppName = &appName
	} else {
		destination.AppName = nil
	}

	// CertificateKey
	if properties.CertificateKey != nil {
		certificateKey := properties.CertificateKey.Copy()
		destination.CertificateKey = &certificateKey
	} else {
		destination.CertificateKey = nil
	}

	// Endpoint
	if properties.Endpoint != nil {
		endpoint := properties.Endpoint.Copy()
		destination.Endpoint = &endpoint
	} else {
		destination.Endpoint = nil
	}

	// KeyId
	if properties.KeyId != nil {
		keyId := properties.KeyId.Copy()
		destination.KeyId = &keyId
	} else {
		destination.KeyId = nil
	}

	// Thumbprint
	if properties.Thumbprint != nil {
		thumbprint := properties.Thumbprint.Copy()
		destination.Thumbprint = &thumbprint
	} else {
		destination.Thumbprint = nil
	}

	// Token
	if properties.Token != nil {
		token := properties.Token.Copy()
		destination.Token = &token
	} else {
		destination.Token = nil
	}

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

	// No error
	return nil
}

// Initialize_From_ApnsCredentialProperties_STATUS populates our ApnsCredentialProperties from the provided source ApnsCredentialProperties_STATUS
func (properties *ApnsCredentialProperties) Initialize_From_ApnsCredentialProperties_STATUS(source *ApnsCredentialProperties_STATUS) error {

	// No error
	return nil
}

// Description of a NotificationHub ApnsCredential.
type ApnsCredentialProperties_STATUS struct {
}

var _ genruntime.FromARMConverter = &ApnsCredentialProperties_STATUS{}

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

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

	// No error
	return nil
}

// AssignProperties_From_ApnsCredentialProperties_STATUS populates our ApnsCredentialProperties_STATUS from the provided source ApnsCredentialProperties_STATUS
func (properties *ApnsCredentialProperties_STATUS) AssignProperties_From_ApnsCredentialProperties_STATUS(source *storage.ApnsCredentialProperties_STATUS) error {

	// No error
	return nil
}

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

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

	// No error
	return nil
}

// Description of a NotificationHub BaiduCredential.
type BaiduCredentialProperties struct {
	// +kubebuilder:validation:Required
	// BaiduApiKey: Gets or sets baidu Api Key.
	BaiduApiKey *genruntime.SecretReference `json:"baiduApiKey,omitempty"`

	// +kubebuilder:validation:Required
	// BaiduEndPoint: Gets or sets baidu Endpoint.
	BaiduEndPoint *genruntime.SecretReference `json:"baiduEndPoint,omitempty"`

	// +kubebuilder:validation:Required
	// BaiduSecretKey: Gets or sets baidu Secret Key
	BaiduSecretKey *genruntime.SecretReference `json:"baiduSecretKey,omitempty"`
}

var _ genruntime.ARMTransformer = &BaiduCredentialProperties{}

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

	// Set property "BaiduApiKey":
	if properties.BaiduApiKey != nil {
		baiduApiKeySecret, err := resolved.ResolvedSecrets.Lookup(*properties.BaiduApiKey)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property BaiduApiKey")
		}
		baiduApiKey := baiduApiKeySecret
		result.BaiduApiKey = &baiduApiKey
	}

	// Set property "BaiduEndPoint":
	if properties.BaiduEndPoint != nil {
		baiduEndPointSecret, err := resolved.ResolvedSecrets.Lookup(*properties.BaiduEndPoint)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property BaiduEndPoint")
		}
		baiduEndPoint := baiduEndPointSecret
		result.BaiduEndPoint = &baiduEndPoint
	}

	// Set property "BaiduSecretKey":
	if properties.BaiduSecretKey != nil {
		baiduSecretKeySecret, err := resolved.ResolvedSecrets.Lookup(*properties.BaiduSecretKey)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property BaiduSecretKey")
		}
		baiduSecretKey := baiduSecretKeySecret
		result.BaiduSecretKey = &baiduSecretKey
	}
	return result, nil
}

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

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

	// no assignment for property "BaiduApiKey"

	// no assignment for property "BaiduEndPoint"

	// no assignment for property "BaiduSecretKey"

	// No error
	return nil
}

// AssignProperties_From_BaiduCredentialProperties populates our BaiduCredentialProperties from the provided source BaiduCredentialProperties
func (properties *BaiduCredentialProperties) AssignProperties_From_BaiduCredentialProperties(source *storage.BaiduCredentialProperties) error {

	// BaiduApiKey
	if source.BaiduApiKey != nil {
		baiduApiKey := source.BaiduApiKey.Copy()
		properties.BaiduApiKey = &baiduApiKey
	} else {
		properties.BaiduApiKey = nil
	}

	// BaiduEndPoint
	if source.BaiduEndPoint != nil {
		baiduEndPoint := source.BaiduEndPoint.Copy()
		properties.BaiduEndPoint = &baiduEndPoint
	} else {
		properties.BaiduEndPoint = nil
	}

	// BaiduSecretKey
	if source.BaiduSecretKey != nil {
		baiduSecretKey := source.BaiduSecretKey.Copy()
		properties.BaiduSecretKey = &baiduSecretKey
	} else {
		properties.BaiduSecretKey = nil
	}

	// No error
	return nil
}

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

	// BaiduApiKey
	if properties.BaiduApiKey != nil {
		baiduApiKey := properties.BaiduApiKey.Copy()
		destination.BaiduApiKey = &baiduApiKey
	} else {
		destination.BaiduApiKey = nil
	}

	// BaiduEndPoint
	if properties.BaiduEndPoint != nil {
		baiduEndPoint := properties.BaiduEndPoint.Copy()
		destination.BaiduEndPoint = &baiduEndPoint
	} else {
		destination.BaiduEndPoint = nil
	}

	// BaiduSecretKey
	if properties.BaiduSecretKey != nil {
		baiduSecretKey := properties.BaiduSecretKey.Copy()
		destination.BaiduSecretKey = &baiduSecretKey
	} else {
		destination.BaiduSecretKey = nil
	}

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

	// No error
	return nil
}

// Initialize_From_BaiduCredentialProperties_STATUS populates our BaiduCredentialProperties from the provided source BaiduCredentialProperties_STATUS
func (properties *BaiduCredentialProperties) Initialize_From_BaiduCredentialProperties_STATUS(source *BaiduCredentialProperties_STATUS) error {

	// No error
	return nil
}

// Description of a NotificationHub BaiduCredential.
type BaiduCredentialProperties_STATUS struct {
}

var _ genruntime.FromARMConverter = &BaiduCredentialProperties_STATUS{}

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

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

	// No error
	return nil
}

// AssignProperties_From_BaiduCredentialProperties_STATUS populates our BaiduCredentialProperties_STATUS from the provided source BaiduCredentialProperties_STATUS
func (properties *BaiduCredentialProperties_STATUS) AssignProperties_From_BaiduCredentialProperties_STATUS(source *storage.BaiduCredentialProperties_STATUS) error {

	// No error
	return nil
}

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

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

	// No error
	return nil
}

// Description of a NotificationHub BrowserCredential.
type BrowserCredentialProperties struct {
	// +kubebuilder:validation:Required
	// Subject: Gets or sets web push subject.
	Subject *genruntime.SecretReference `json:"subject,omitempty"`

	// +kubebuilder:validation:Required
	// VapidPrivateKey: Gets or sets VAPID private key.
	VapidPrivateKey *genruntime.SecretReference `json:"vapidPrivateKey,omitempty"`

	// +kubebuilder:validation:Required
	// VapidPublicKey: Gets or sets VAPID public key.
	VapidPublicKey *genruntime.SecretReference `json:"vapidPublicKey,omitempty"`
}

var _ genruntime.ARMTransformer = &BrowserCredentialProperties{}

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

	// Set property "Subject":
	if properties.Subject != nil {
		subjectSecret, err := resolved.ResolvedSecrets.Lookup(*properties.Subject)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property Subject")
		}
		subject := subjectSecret
		result.Subject = &subject
	}

	// Set property "VapidPrivateKey":
	if properties.VapidPrivateKey != nil {
		vapidPrivateKeySecret, err := resolved.ResolvedSecrets.Lookup(*properties.VapidPrivateKey)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property VapidPrivateKey")
		}
		vapidPrivateKey := vapidPrivateKeySecret
		result.VapidPrivateKey = &vapidPrivateKey
	}

	// Set property "VapidPublicKey":
	if properties.VapidPublicKey != nil {
		vapidPublicKeySecret, err := resolved.ResolvedSecrets.Lookup(*properties.VapidPublicKey)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property VapidPublicKey")
		}
		vapidPublicKey := vapidPublicKeySecret
		result.VapidPublicKey = &vapidPublicKey
	}
	return result, nil
}

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

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

	// no assignment for property "Subject"

	// no assignment for property "VapidPrivateKey"

	// no assignment for property "VapidPublicKey"

	// No error
	return nil
}

// AssignProperties_From_BrowserCredentialProperties populates our BrowserCredentialProperties from the provided source BrowserCredentialProperties
func (properties *BrowserCredentialProperties) AssignProperties_From_BrowserCredentialProperties(source *storage.BrowserCredentialProperties) error {

	// Subject
	if source.Subject != nil {
		subject := source.Subject.Copy()
		properties.Subject = &subject
	} else {
		properties.Subject = nil
	}

	// VapidPrivateKey
	if source.VapidPrivateKey != nil {
		vapidPrivateKey := source.VapidPrivateKey.Copy()
		properties.VapidPrivateKey = &vapidPrivateKey
	} else {
		properties.VapidPrivateKey = nil
	}

	// VapidPublicKey
	if source.VapidPublicKey != nil {
		vapidPublicKey := source.VapidPublicKey.Copy()
		properties.VapidPublicKey = &vapidPublicKey
	} else {
		properties.VapidPublicKey = nil
	}

	// No error
	return nil
}

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

	// Subject
	if properties.Subject != nil {
		subject := properties.Subject.Copy()
		destination.Subject = &subject
	} else {
		destination.Subject = nil
	}

	// VapidPrivateKey
	if properties.VapidPrivateKey != nil {
		vapidPrivateKey := properties.VapidPrivateKey.Copy()
		destination.VapidPrivateKey = &vapidPrivateKey
	} else {
		destination.VapidPrivateKey = nil
	}

	// VapidPublicKey
	if properties.VapidPublicKey != nil {
		vapidPublicKey := properties.VapidPublicKey.Copy()
		destination.VapidPublicKey = &vapidPublicKey
	} else {
		destination.VapidPublicKey = nil
	}

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

	// No error
	return nil
}

// Initialize_From_BrowserCredentialProperties_STATUS populates our BrowserCredentialProperties from the provided source BrowserCredentialProperties_STATUS
func (properties *BrowserCredentialProperties) Initialize_From_BrowserCredentialProperties_STATUS(source *BrowserCredentialProperties_STATUS) error {

	// No error
	return nil
}

// Description of a NotificationHub BrowserCredential.
type BrowserCredentialProperties_STATUS struct {
}

var _ genruntime.FromARMConverter = &BrowserCredentialProperties_STATUS{}

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

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

	// No error
	return nil
}

// AssignProperties_From_BrowserCredentialProperties_STATUS populates our BrowserCredentialProperties_STATUS from the provided source BrowserCredentialProperties_STATUS
func (properties *BrowserCredentialProperties_STATUS) AssignProperties_From_BrowserCredentialProperties_STATUS(source *storage.BrowserCredentialProperties_STATUS) error {

	// No error
	return nil
}

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

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

	// No error
	return nil
}

// Description of a NotificationHub GcmCredential.
type GcmCredentialProperties struct {
	// GcmEndpoint: Gets or sets the GCM endpoint.
	GcmEndpoint *genruntime.SecretReference `json:"gcmEndpoint,omitempty"`

	// +kubebuilder:validation:Required
	// GoogleApiKey: Gets or sets the Google API key.
	GoogleApiKey *genruntime.SecretReference `json:"googleApiKey,omitempty"`
}

var _ genruntime.ARMTransformer = &GcmCredentialProperties{}

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

	// Set property "GcmEndpoint":
	if properties.GcmEndpoint != nil {
		gcmEndpointSecret, err := resolved.ResolvedSecrets.Lookup(*properties.GcmEndpoint)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property GcmEndpoint")
		}
		gcmEndpoint := gcmEndpointSecret
		result.GcmEndpoint = &gcmEndpoint
	}

	// Set property "GoogleApiKey":
	if properties.GoogleApiKey != nil {
		googleApiKeySecret, err := resolved.ResolvedSecrets.Lookup(*properties.GoogleApiKey)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property GoogleApiKey")
		}
		googleApiKey := googleApiKeySecret
		result.GoogleApiKey = &googleApiKey
	}
	return result, nil
}

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

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

	// no assignment for property "GcmEndpoint"

	// no assignment for property "GoogleApiKey"

	// No error
	return nil
}

// AssignProperties_From_GcmCredentialProperties populates our GcmCredentialProperties from the provided source GcmCredentialProperties
func (properties *GcmCredentialProperties) AssignProperties_From_GcmCredentialProperties(source *storage.GcmCredentialProperties) error {

	// GcmEndpoint
	if source.GcmEndpoint != nil {
		gcmEndpoint := source.GcmEndpoint.Copy()
		properties.GcmEndpoint = &gcmEndpoint
	} else {
		properties.GcmEndpoint = nil
	}

	// GoogleApiKey
	if source.GoogleApiKey != nil {
		googleApiKey := source.GoogleApiKey.Copy()
		properties.GoogleApiKey = &googleApiKey
	} else {
		properties.GoogleApiKey = nil
	}

	// No error
	return nil
}

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

	// GcmEndpoint
	if properties.GcmEndpoint != nil {
		gcmEndpoint := properties.GcmEndpoint.Copy()
		destination.GcmEndpoint = &gcmEndpoint
	} else {
		destination.GcmEndpoint = nil
	}

	// GoogleApiKey
	if properties.GoogleApiKey != nil {
		googleApiKey := properties.GoogleApiKey.Copy()
		destination.GoogleApiKey = &googleApiKey
	} else {
		destination.GoogleApiKey = nil
	}

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

	// No error
	return nil
}

// Initialize_From_GcmCredentialProperties_STATUS populates our GcmCredentialProperties from the provided source GcmCredentialProperties_STATUS
func (properties *GcmCredentialProperties) Initialize_From_GcmCredentialProperties_STATUS(source *GcmCredentialProperties_STATUS) error {

	// No error
	return nil
}

// Description of a NotificationHub GcmCredential.
type GcmCredentialProperties_STATUS struct {
}

var _ genruntime.FromARMConverter = &GcmCredentialProperties_STATUS{}

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

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

	// No error
	return nil
}

// AssignProperties_From_GcmCredentialProperties_STATUS populates our GcmCredentialProperties_STATUS from the provided source GcmCredentialProperties_STATUS
func (properties *GcmCredentialProperties_STATUS) AssignProperties_From_GcmCredentialProperties_STATUS(source *storage.GcmCredentialProperties_STATUS) error {

	// No error
	return nil
}

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

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

	// No error
	return nil
}

// Description of a NotificationHub MpnsCredential.
type MpnsCredentialProperties struct {
	// +kubebuilder:validation:Required
	// CertificateKey: Gets or sets the certificate key for this credential.
	CertificateKey *genruntime.SecretReference `json:"certificateKey,omitempty"`

	// +kubebuilder:validation:Required
	// MpnsCertificate: Gets or sets the MPNS certificate.
	MpnsCertificate *genruntime.SecretReference `json:"mpnsCertificate,omitempty"`

	// +kubebuilder:validation:Required
	// Thumbprint: Gets or sets the MPNS certificate Thumbprint
	Thumbprint *genruntime.SecretReference `json:"thumbprint,omitempty"`
}

var _ genruntime.ARMTransformer = &MpnsCredentialProperties{}

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

	// Set property "CertificateKey":
	if properties.CertificateKey != nil {
		certificateKeySecret, err := resolved.ResolvedSecrets.Lookup(*properties.CertificateKey)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property CertificateKey")
		}
		certificateKey := certificateKeySecret
		result.CertificateKey = &certificateKey
	}

	// Set property "MpnsCertificate":
	if properties.MpnsCertificate != nil {
		mpnsCertificateSecret, err := resolved.ResolvedSecrets.Lookup(*properties.MpnsCertificate)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property MpnsCertificate")
		}
		mpnsCertificate := mpnsCertificateSecret
		result.MpnsCertificate = &mpnsCertificate
	}

	// Set property "Thumbprint":
	if properties.Thumbprint != nil {
		thumbprintSecret, err := resolved.ResolvedSecrets.Lookup(*properties.Thumbprint)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property Thumbprint")
		}
		thumbprint := thumbprintSecret
		result.Thumbprint = &thumbprint
	}
	return result, nil
}

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

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

	// no assignment for property "CertificateKey"

	// no assignment for property "MpnsCertificate"

	// no assignment for property "Thumbprint"

	// No error
	return nil
}

// AssignProperties_From_MpnsCredentialProperties populates our MpnsCredentialProperties from the provided source MpnsCredentialProperties
func (properties *MpnsCredentialProperties) AssignProperties_From_MpnsCredentialProperties(source *storage.MpnsCredentialProperties) error {

	// CertificateKey
	if source.CertificateKey != nil {
		certificateKey := source.CertificateKey.Copy()
		properties.CertificateKey = &certificateKey
	} else {
		properties.CertificateKey = nil
	}

	// MpnsCertificate
	if source.MpnsCertificate != nil {
		mpnsCertificate := source.MpnsCertificate.Copy()
		properties.MpnsCertificate = &mpnsCertificate
	} else {
		properties.MpnsCertificate = nil
	}

	// Thumbprint
	if source.Thumbprint != nil {
		thumbprint := source.Thumbprint.Copy()
		properties.Thumbprint = &thumbprint
	} else {
		properties.Thumbprint = nil
	}

	// No error
	return nil
}

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

	// CertificateKey
	if properties.CertificateKey != nil {
		certificateKey := properties.CertificateKey.Copy()
		destination.CertificateKey = &certificateKey
	} else {
		destination.CertificateKey = nil
	}

	// MpnsCertificate
	if properties.MpnsCertificate != nil {
		mpnsCertificate := properties.MpnsCertificate.Copy()
		destination.MpnsCertificate = &mpnsCertificate
	} else {
		destination.MpnsCertificate = nil
	}

	// Thumbprint
	if properties.Thumbprint != nil {
		thumbprint := properties.Thumbprint.Copy()
		destination.Thumbprint = &thumbprint
	} else {
		destination.Thumbprint = nil
	}

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

	// No error
	return nil
}

// Initialize_From_MpnsCredentialProperties_STATUS populates our MpnsCredentialProperties from the provided source MpnsCredentialProperties_STATUS
func (properties *MpnsCredentialProperties) Initialize_From_MpnsCredentialProperties_STATUS(source *MpnsCredentialProperties_STATUS) error {

	// No error
	return nil
}

// Description of a NotificationHub MpnsCredential.
type MpnsCredentialProperties_STATUS struct {
}

var _ genruntime.FromARMConverter = &MpnsCredentialProperties_STATUS{}

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

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

	// No error
	return nil
}

// AssignProperties_From_MpnsCredentialProperties_STATUS populates our MpnsCredentialProperties_STATUS from the provided source MpnsCredentialProperties_STATUS
func (properties *MpnsCredentialProperties_STATUS) AssignProperties_From_MpnsCredentialProperties_STATUS(source *storage.MpnsCredentialProperties_STATUS) error {

	// No error
	return nil
}

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

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

	// No error
	return nil
}

// Description of a NotificationHub WnsCredential.
type WnsCredentialProperties struct {
	// CertificateKey: Ges or sets the WNS Certificate Key.
	CertificateKey *genruntime.SecretReference `json:"certificateKey,omitempty"`

	// PackageSid: Gets or sets the package ID for this credential.
	PackageSid *genruntime.SecretReference `json:"packageSid,omitempty"`

	// SecretKey: Gets or sets the secret key.
	SecretKey *genruntime.SecretReference `json:"secretKey,omitempty"`

	// WindowsLiveEndpoint: Gets or sets the Windows Live endpoint.
	WindowsLiveEndpoint *genruntime.SecretReference `json:"windowsLiveEndpoint,omitempty"`

	// WnsCertificate: Gets or sets the WNS Certificate.
	WnsCertificate *genruntime.SecretReference `json:"wnsCertificate,omitempty"`
}

var _ genruntime.ARMTransformer = &WnsCredentialProperties{}

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

	// Set property "CertificateKey":
	if properties.CertificateKey != nil {
		certificateKeySecret, err := resolved.ResolvedSecrets.Lookup(*properties.CertificateKey)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property CertificateKey")
		}
		certificateKey := certificateKeySecret
		result.CertificateKey = &certificateKey
	}

	// Set property "PackageSid":
	if properties.PackageSid != nil {
		packageSidSecret, err := resolved.ResolvedSecrets.Lookup(*properties.PackageSid)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property PackageSid")
		}
		packageSid := packageSidSecret
		result.PackageSid = &packageSid
	}

	// Set property "SecretKey":
	if properties.SecretKey != nil {
		secretKeySecret, err := resolved.ResolvedSecrets.Lookup(*properties.SecretKey)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property SecretKey")
		}
		secretKey := secretKeySecret
		result.SecretKey = &secretKey
	}

	// Set property "WindowsLiveEndpoint":
	if properties.WindowsLiveEndpoint != nil {
		windowsLiveEndpointSecret, err := resolved.ResolvedSecrets.Lookup(*properties.WindowsLiveEndpoint)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property WindowsLiveEndpoint")
		}
		windowsLiveEndpoint := windowsLiveEndpointSecret
		result.WindowsLiveEndpoint = &windowsLiveEndpoint
	}

	// Set property "WnsCertificate":
	if properties.WnsCertificate != nil {
		wnsCertificateSecret, err := resolved.ResolvedSecrets.Lookup(*properties.WnsCertificate)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property WnsCertificate")
		}
		wnsCertificate := wnsCertificateSecret
		result.WnsCertificate = &wnsCertificate
	}
	return result, nil
}

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

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

	// no assignment for property "CertificateKey"

	// no assignment for property "PackageSid"

	// no assignment for property "SecretKey"

	// no assignment for property "WindowsLiveEndpoint"

	// no assignment for property "WnsCertificate"

	// No error
	return nil
}

// AssignProperties_From_WnsCredentialProperties populates our WnsCredentialProperties from the provided source WnsCredentialProperties
func (properties *WnsCredentialProperties) AssignProperties_From_WnsCredentialProperties(source *storage.WnsCredentialProperties) error {

	// CertificateKey
	if source.CertificateKey != nil {
		certificateKey := source.CertificateKey.Copy()
		properties.CertificateKey = &certificateKey
	} else {
		properties.CertificateKey = nil
	}

	// PackageSid
	if source.PackageSid != nil {
		packageSid := source.PackageSid.Copy()
		properties.PackageSid = &packageSid
	} else {
		properties.PackageSid = nil
	}

	// SecretKey
	if source.SecretKey != nil {
		secretKey := source.SecretKey.Copy()
		properties.SecretKey = &secretKey
	} else {
		properties.SecretKey = nil
	}

	// WindowsLiveEndpoint
	if source.WindowsLiveEndpoint != nil {
		windowsLiveEndpoint := source.WindowsLiveEndpoint.Copy()
		properties.WindowsLiveEndpoint = &windowsLiveEndpoint
	} else {
		properties.WindowsLiveEndpoint = nil
	}

	// WnsCertificate
	if source.WnsCertificate != nil {
		wnsCertificate := source.WnsCertificate.Copy()
		properties.WnsCertificate = &wnsCertificate
	} else {
		properties.WnsCertificate = nil
	}

	// No error
	return nil
}

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

	// CertificateKey
	if properties.CertificateKey != nil {
		certificateKey := properties.CertificateKey.Copy()
		destination.CertificateKey = &certificateKey
	} else {
		destination.CertificateKey = nil
	}

	// PackageSid
	if properties.PackageSid != nil {
		packageSid := properties.PackageSid.Copy()
		destination.PackageSid = &packageSid
	} else {
		destination.PackageSid = nil
	}

	// SecretKey
	if properties.SecretKey != nil {
		secretKey := properties.SecretKey.Copy()
		destination.SecretKey = &secretKey
	} else {
		destination.SecretKey = nil
	}

	// WindowsLiveEndpoint
	if properties.WindowsLiveEndpoint != nil {
		windowsLiveEndpoint := properties.WindowsLiveEndpoint.Copy()
		destination.WindowsLiveEndpoint = &windowsLiveEndpoint
	} else {
		destination.WindowsLiveEndpoint = nil
	}

	// WnsCertificate
	if properties.WnsCertificate != nil {
		wnsCertificate := properties.WnsCertificate.Copy()
		destination.WnsCertificate = &wnsCertificate
	} else {
		destination.WnsCertificate = nil
	}

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

	// No error
	return nil
}

// Initialize_From_WnsCredentialProperties_STATUS populates our WnsCredentialProperties from the provided source WnsCredentialProperties_STATUS
func (properties *WnsCredentialProperties) Initialize_From_WnsCredentialProperties_STATUS(source *WnsCredentialProperties_STATUS) error {

	// No error
	return nil
}

// Description of a NotificationHub WnsCredential.
type WnsCredentialProperties_STATUS struct {
}

var _ genruntime.FromARMConverter = &WnsCredentialProperties_STATUS{}

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

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

	// No error
	return nil
}

// AssignProperties_From_WnsCredentialProperties_STATUS populates our WnsCredentialProperties_STATUS from the provided source WnsCredentialProperties_STATUS
func (properties *WnsCredentialProperties_STATUS) AssignProperties_From_WnsCredentialProperties_STATUS(source *storage.WnsCredentialProperties_STATUS) error {

	// No error
	return nil
}

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

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

	// No error
	return nil
}

// Description of a NotificationHub XiaomiCredentialProperties.
type XiaomiCredentialProperties struct {
	// AppSecret: Gets or sets app secret.
	AppSecret *genruntime.SecretReference `json:"appSecret,omitempty"`

	// Endpoint: Gets or sets xiaomi service endpoint.
	Endpoint *genruntime.SecretReference `json:"endpoint,omitempty"`
}

var _ genruntime.ARMTransformer = &XiaomiCredentialProperties{}

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

	// Set property "AppSecret":
	if properties.AppSecret != nil {
		appSecretSecret, err := resolved.ResolvedSecrets.Lookup(*properties.AppSecret)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property AppSecret")
		}
		appSecret := appSecretSecret
		result.AppSecret = &appSecret
	}

	// Set property "Endpoint":
	if properties.Endpoint != nil {
		endpointSecret, err := resolved.ResolvedSecrets.Lookup(*properties.Endpoint)
		if err != nil {
			return nil, eris.Wrap(err, "looking up secret for property Endpoint")
		}
		endpoint := endpointSecret
		result.Endpoint = &endpoint
	}
	return result, nil
}

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

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

	// no assignment for property "AppSecret"

	// no assignment for property "Endpoint"

	// No error
	return nil
}

// AssignProperties_From_XiaomiCredentialProperties populates our XiaomiCredentialProperties from the provided source XiaomiCredentialProperties
func (properties *XiaomiCredentialProperties) AssignProperties_From_XiaomiCredentialProperties(source *storage.XiaomiCredentialProperties) error {

	// AppSecret
	if source.AppSecret != nil {
		appSecret := source.AppSecret.Copy()
		properties.AppSecret = &appSecret
	} else {
		properties.AppSecret = nil
	}

	// Endpoint
	if source.Endpoint != nil {
		endpoint := source.Endpoint.Copy()
		properties.Endpoint = &endpoint
	} else {
		properties.Endpoint = nil
	}

	// No error
	return nil
}

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

	// AppSecret
	if properties.AppSecret != nil {
		appSecret := properties.AppSecret.Copy()
		destination.AppSecret = &appSecret
	} else {
		destination.AppSecret = nil
	}

	// Endpoint
	if properties.Endpoint != nil {
		endpoint := properties.Endpoint.Copy()
		destination.Endpoint = &endpoint
	} else {
		destination.Endpoint = nil
	}

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

	// No error
	return nil
}

// Initialize_From_XiaomiCredentialProperties_STATUS populates our XiaomiCredentialProperties from the provided source XiaomiCredentialProperties_STATUS
func (properties *XiaomiCredentialProperties) Initialize_From_XiaomiCredentialProperties_STATUS(source *XiaomiCredentialProperties_STATUS) error {

	// No error
	return nil
}

// Description of a NotificationHub XiaomiCredentialProperties.
type XiaomiCredentialProperties_STATUS struct {
}

var _ genruntime.FromARMConverter = &XiaomiCredentialProperties_STATUS{}

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

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

	// No error
	return nil
}

// AssignProperties_From_XiaomiCredentialProperties_STATUS populates our XiaomiCredentialProperties_STATUS from the provided source XiaomiCredentialProperties_STATUS
func (properties *XiaomiCredentialProperties_STATUS) AssignProperties_From_XiaomiCredentialProperties_STATUS(source *storage.XiaomiCredentialProperties_STATUS) error {

	// No error
	return nil
}

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

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

	// No error
	return nil
}

func init() {
	SchemeBuilder.Register(&NotificationHub{}, &NotificationHubList{})
}
