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

import (
	"fmt"
	arm "github.com/Azure/azure-service-operator/v2/api/network/v1api20220701/arm"
	storage "github.com/Azure/azure-service-operator/v2/api/network/v1api20220701/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,network}
// +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: /network/resource-manager/Microsoft.Network/stable/2022-07-01/privateEndpoint.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}
type PrivateEndpointsPrivateDnsZoneGroup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              PrivateEndpointsPrivateDnsZoneGroup_Spec   `json:"spec,omitempty"`
	Status            PrivateEndpointsPrivateDnsZoneGroup_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &PrivateEndpointsPrivateDnsZoneGroup{}

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

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

var _ conversion.Convertible = &PrivateEndpointsPrivateDnsZoneGroup{}

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

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

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

	return nil
}

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

	return nil
}

var _ configmaps.Exporter = &PrivateEndpointsPrivateDnsZoneGroup{}

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

var _ secrets.Exporter = &PrivateEndpointsPrivateDnsZoneGroup{}

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

var _ genruntime.KubernetesResource = &PrivateEndpointsPrivateDnsZoneGroup{}

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

// GetAPIVersion returns the ARM API version of the resource. This is always "2022-07-01"
func (group PrivateEndpointsPrivateDnsZoneGroup) GetAPIVersion() string {
	return "2022-07-01"
}

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

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

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.Network/privateEndpoints/privateDnsZoneGroups"
func (group *PrivateEndpointsPrivateDnsZoneGroup) GetType() string {
	return "Microsoft.Network/privateEndpoints/privateDnsZoneGroups"
}

// NewEmptyStatus returns a new empty (blank) status
func (group *PrivateEndpointsPrivateDnsZoneGroup) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &PrivateEndpointsPrivateDnsZoneGroup_STATUS{}
}

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

	ownerGroup, ownerKind := genruntime.LookupOwnerGroupKind(group.Spec)
	return group.Spec.Owner.AsResourceReference(ownerGroup, ownerKind)
}

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

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

	group.Status = st
	return nil
}

// AssignProperties_From_PrivateEndpointsPrivateDnsZoneGroup populates our PrivateEndpointsPrivateDnsZoneGroup from the provided source PrivateEndpointsPrivateDnsZoneGroup
func (group *PrivateEndpointsPrivateDnsZoneGroup) AssignProperties_From_PrivateEndpointsPrivateDnsZoneGroup(source *storage.PrivateEndpointsPrivateDnsZoneGroup) error {

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

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

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

	// No error
	return nil
}

// AssignProperties_To_PrivateEndpointsPrivateDnsZoneGroup populates the provided destination PrivateEndpointsPrivateDnsZoneGroup from our PrivateEndpointsPrivateDnsZoneGroup
func (group *PrivateEndpointsPrivateDnsZoneGroup) AssignProperties_To_PrivateEndpointsPrivateDnsZoneGroup(destination *storage.PrivateEndpointsPrivateDnsZoneGroup) error {

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

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

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

// +kubebuilder:object:root=true
// Generator information:
// - Generated from: /network/resource-manager/Microsoft.Network/stable/2022-07-01/privateEndpoint.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}
type PrivateEndpointsPrivateDnsZoneGroupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PrivateEndpointsPrivateDnsZoneGroup `json:"items"`
}

type PrivateEndpointsPrivateDnsZoneGroup_Spec struct {
	// AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it
	// doesn't have to be.
	AzureName string `json:"azureName,omitempty"`

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

	// PrivateDnsZoneConfigs: A collection of private dns zone configurations of the private dns zone group.
	PrivateDnsZoneConfigs []PrivateDnsZoneConfig `json:"privateDnsZoneConfigs,omitempty"`
}

var _ genruntime.ARMTransformer = &PrivateEndpointsPrivateDnsZoneGroup_Spec{}

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

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

	// Set property "Properties":
	if group.PrivateDnsZoneConfigs != nil {
		result.Properties = &arm.PrivateDnsZoneGroupPropertiesFormat{}
	}
	for _, item := range group.PrivateDnsZoneConfigs {
		item_ARM, err := item.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		result.Properties.PrivateDnsZoneConfigs = append(result.Properties.PrivateDnsZoneConfigs, *item_ARM.(*arm.PrivateDnsZoneConfig))
	}
	return result, nil
}

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

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

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

	// no assignment for property "OperatorSpec"

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

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

	// No error
	return nil
}

var _ genruntime.ConvertibleSpec = &PrivateEndpointsPrivateDnsZoneGroup_Spec{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.PrivateEndpointsPrivateDnsZoneGroup_Spec{}
	err := group.AssignProperties_To_PrivateEndpointsPrivateDnsZoneGroup_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_PrivateEndpointsPrivateDnsZoneGroup_Spec populates our PrivateEndpointsPrivateDnsZoneGroup_Spec from the provided source PrivateEndpointsPrivateDnsZoneGroup_Spec
func (group *PrivateEndpointsPrivateDnsZoneGroup_Spec) AssignProperties_From_PrivateEndpointsPrivateDnsZoneGroup_Spec(source *storage.PrivateEndpointsPrivateDnsZoneGroup_Spec) error {

	// AzureName
	group.AzureName = source.AzureName

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

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

	// PrivateDnsZoneConfigs
	if source.PrivateDnsZoneConfigs != nil {
		privateDnsZoneConfigList := make([]PrivateDnsZoneConfig, len(source.PrivateDnsZoneConfigs))
		for privateDnsZoneConfigIndex, privateDnsZoneConfigItem := range source.PrivateDnsZoneConfigs {
			var privateDnsZoneConfig PrivateDnsZoneConfig
			err := privateDnsZoneConfig.AssignProperties_From_PrivateDnsZoneConfig(&privateDnsZoneConfigItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_PrivateDnsZoneConfig() to populate field PrivateDnsZoneConfigs")
			}
			privateDnsZoneConfigList[privateDnsZoneConfigIndex] = privateDnsZoneConfig
		}
		group.PrivateDnsZoneConfigs = privateDnsZoneConfigList
	} else {
		group.PrivateDnsZoneConfigs = nil
	}

	// No error
	return nil
}

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

	// AzureName
	destination.AzureName = group.AzureName

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

	// OriginalVersion
	destination.OriginalVersion = group.OriginalVersion()

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

	// PrivateDnsZoneConfigs
	if group.PrivateDnsZoneConfigs != nil {
		privateDnsZoneConfigList := make([]storage.PrivateDnsZoneConfig, len(group.PrivateDnsZoneConfigs))
		for privateDnsZoneConfigIndex, privateDnsZoneConfigItem := range group.PrivateDnsZoneConfigs {
			var privateDnsZoneConfig storage.PrivateDnsZoneConfig
			err := privateDnsZoneConfigItem.AssignProperties_To_PrivateDnsZoneConfig(&privateDnsZoneConfig)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_PrivateDnsZoneConfig() to populate field PrivateDnsZoneConfigs")
			}
			privateDnsZoneConfigList[privateDnsZoneConfigIndex] = privateDnsZoneConfig
		}
		destination.PrivateDnsZoneConfigs = privateDnsZoneConfigList
	} else {
		destination.PrivateDnsZoneConfigs = nil
	}

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

	// No error
	return nil
}

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

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

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

	// Etag: A unique read-only string that changes whenever the resource is updated.
	Etag *string `json:"etag,omitempty"`

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

	// Name: Name of the resource that is unique within a resource group. This name can be used to access the resource.
	Name *string `json:"name,omitempty"`

	// PrivateDnsZoneConfigs: A collection of private dns zone configurations of the private dns zone group.
	PrivateDnsZoneConfigs []PrivateDnsZoneConfig_STATUS `json:"privateDnsZoneConfigs,omitempty"`

	// ProvisioningState: The provisioning state of the private dns zone group resource.
	ProvisioningState *PrivateEndpointProvisioningState_STATUS `json:"provisioningState,omitempty"`
}

var _ genruntime.ConvertibleStatus = &PrivateEndpointsPrivateDnsZoneGroup_STATUS{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.PrivateEndpointsPrivateDnsZoneGroup_STATUS{}
	err := group.AssignProperties_To_PrivateEndpointsPrivateDnsZoneGroup_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 = &PrivateEndpointsPrivateDnsZoneGroup_STATUS{}

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

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

	// no assignment for property "Conditions"

	// Set property "Etag":
	if typedInput.Etag != nil {
		etag := *typedInput.Etag
		group.Etag = &etag
	}

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

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

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

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

	// No error
	return nil
}

// AssignProperties_From_PrivateEndpointsPrivateDnsZoneGroup_STATUS populates our PrivateEndpointsPrivateDnsZoneGroup_STATUS from the provided source PrivateEndpointsPrivateDnsZoneGroup_STATUS
func (group *PrivateEndpointsPrivateDnsZoneGroup_STATUS) AssignProperties_From_PrivateEndpointsPrivateDnsZoneGroup_STATUS(source *storage.PrivateEndpointsPrivateDnsZoneGroup_STATUS) error {

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

	// Etag
	group.Etag = genruntime.ClonePointerToString(source.Etag)

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

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

	// PrivateDnsZoneConfigs
	if source.PrivateDnsZoneConfigs != nil {
		privateDnsZoneConfigList := make([]PrivateDnsZoneConfig_STATUS, len(source.PrivateDnsZoneConfigs))
		for privateDnsZoneConfigIndex, privateDnsZoneConfigItem := range source.PrivateDnsZoneConfigs {
			var privateDnsZoneConfig PrivateDnsZoneConfig_STATUS
			err := privateDnsZoneConfig.AssignProperties_From_PrivateDnsZoneConfig_STATUS(&privateDnsZoneConfigItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_PrivateDnsZoneConfig_STATUS() to populate field PrivateDnsZoneConfigs")
			}
			privateDnsZoneConfigList[privateDnsZoneConfigIndex] = privateDnsZoneConfig
		}
		group.PrivateDnsZoneConfigs = privateDnsZoneConfigList
	} else {
		group.PrivateDnsZoneConfigs = nil
	}

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

	// No error
	return nil
}

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

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

	// Etag
	destination.Etag = genruntime.ClonePointerToString(group.Etag)

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

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

	// PrivateDnsZoneConfigs
	if group.PrivateDnsZoneConfigs != nil {
		privateDnsZoneConfigList := make([]storage.PrivateDnsZoneConfig_STATUS, len(group.PrivateDnsZoneConfigs))
		for privateDnsZoneConfigIndex, privateDnsZoneConfigItem := range group.PrivateDnsZoneConfigs {
			var privateDnsZoneConfig storage.PrivateDnsZoneConfig_STATUS
			err := privateDnsZoneConfigItem.AssignProperties_To_PrivateDnsZoneConfig_STATUS(&privateDnsZoneConfig)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_PrivateDnsZoneConfig_STATUS() to populate field PrivateDnsZoneConfigs")
			}
			privateDnsZoneConfigList[privateDnsZoneConfigIndex] = privateDnsZoneConfig
		}
		destination.PrivateDnsZoneConfigs = privateDnsZoneConfigList
	} else {
		destination.PrivateDnsZoneConfigs = nil
	}

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

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

	// No error
	return nil
}

// PrivateDnsZoneConfig resource.
type PrivateDnsZoneConfig struct {
	// Name: Name of the resource that is unique within a resource group. This name can be used to access the resource.
	Name *string `json:"name,omitempty"`

	// PrivateDnsZoneReference: The resource id of the private dns zone.
	PrivateDnsZoneReference *genruntime.ResourceReference `armReference:"PrivateDnsZoneId" json:"privateDnsZoneReference,omitempty"`
}

var _ genruntime.ARMTransformer = &PrivateDnsZoneConfig{}

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

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

	// Set property "Properties":
	if config.PrivateDnsZoneReference != nil {
		result.Properties = &arm.PrivateDnsZonePropertiesFormat{}
	}
	if config.PrivateDnsZoneReference != nil {
		privateDnsZoneIdARMID, err := resolved.ResolvedReferences.Lookup(*config.PrivateDnsZoneReference)
		if err != nil {
			return nil, err
		}
		privateDnsZoneId := privateDnsZoneIdARMID
		result.Properties.PrivateDnsZoneId = &privateDnsZoneId
	}
	return result, nil
}

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

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

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

	// no assignment for property "PrivateDnsZoneReference"

	// No error
	return nil
}

// AssignProperties_From_PrivateDnsZoneConfig populates our PrivateDnsZoneConfig from the provided source PrivateDnsZoneConfig
func (config *PrivateDnsZoneConfig) AssignProperties_From_PrivateDnsZoneConfig(source *storage.PrivateDnsZoneConfig) error {

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

	// PrivateDnsZoneReference
	if source.PrivateDnsZoneReference != nil {
		privateDnsZoneReference := source.PrivateDnsZoneReference.Copy()
		config.PrivateDnsZoneReference = &privateDnsZoneReference
	} else {
		config.PrivateDnsZoneReference = nil
	}

	// No error
	return nil
}

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

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

	// PrivateDnsZoneReference
	if config.PrivateDnsZoneReference != nil {
		privateDnsZoneReference := config.PrivateDnsZoneReference.Copy()
		destination.PrivateDnsZoneReference = &privateDnsZoneReference
	} else {
		destination.PrivateDnsZoneReference = nil
	}

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

	// No error
	return nil
}

// PrivateDnsZoneConfig resource.
type PrivateDnsZoneConfig_STATUS struct {
	// Name: Name of the resource that is unique within a resource group. This name can be used to access the resource.
	Name *string `json:"name,omitempty"`

	// PrivateDnsZoneId: The resource id of the private dns zone.
	PrivateDnsZoneId *string `json:"privateDnsZoneId,omitempty"`

	// RecordSets: A collection of information regarding a recordSet, holding information to identify private resources.
	RecordSets []RecordSet_STATUS `json:"recordSets,omitempty"`
}

var _ genruntime.FromARMConverter = &PrivateDnsZoneConfig_STATUS{}

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

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

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

	// Set property "PrivateDnsZoneId":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PrivateDnsZoneId != nil {
			privateDnsZoneId := *typedInput.Properties.PrivateDnsZoneId
			config.PrivateDnsZoneId = &privateDnsZoneId
		}
	}

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

	// No error
	return nil
}

// AssignProperties_From_PrivateDnsZoneConfig_STATUS populates our PrivateDnsZoneConfig_STATUS from the provided source PrivateDnsZoneConfig_STATUS
func (config *PrivateDnsZoneConfig_STATUS) AssignProperties_From_PrivateDnsZoneConfig_STATUS(source *storage.PrivateDnsZoneConfig_STATUS) error {

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

	// PrivateDnsZoneId
	config.PrivateDnsZoneId = genruntime.ClonePointerToString(source.PrivateDnsZoneId)

	// RecordSets
	if source.RecordSets != nil {
		recordSetList := make([]RecordSet_STATUS, len(source.RecordSets))
		for recordSetIndex, recordSetItem := range source.RecordSets {
			var recordSet RecordSet_STATUS
			err := recordSet.AssignProperties_From_RecordSet_STATUS(&recordSetItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_RecordSet_STATUS() to populate field RecordSets")
			}
			recordSetList[recordSetIndex] = recordSet
		}
		config.RecordSets = recordSetList
	} else {
		config.RecordSets = nil
	}

	// No error
	return nil
}

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

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

	// PrivateDnsZoneId
	destination.PrivateDnsZoneId = genruntime.ClonePointerToString(config.PrivateDnsZoneId)

	// RecordSets
	if config.RecordSets != nil {
		recordSetList := make([]storage.RecordSet_STATUS, len(config.RecordSets))
		for recordSetIndex, recordSetItem := range config.RecordSets {
			var recordSet storage.RecordSet_STATUS
			err := recordSetItem.AssignProperties_To_RecordSet_STATUS(&recordSet)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_RecordSet_STATUS() to populate field RecordSets")
			}
			recordSetList[recordSetIndex] = recordSet
		}
		destination.RecordSets = recordSetList
	} else {
		destination.RecordSets = nil
	}

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

	// No error
	return nil
}

// The current provisioning state.
type PrivateEndpointProvisioningState_STATUS string

const (
	PrivateEndpointProvisioningState_STATUS_Deleting  = PrivateEndpointProvisioningState_STATUS("Deleting")
	PrivateEndpointProvisioningState_STATUS_Failed    = PrivateEndpointProvisioningState_STATUS("Failed")
	PrivateEndpointProvisioningState_STATUS_Succeeded = PrivateEndpointProvisioningState_STATUS("Succeeded")
	PrivateEndpointProvisioningState_STATUS_Updating  = PrivateEndpointProvisioningState_STATUS("Updating")
)

// Mapping from string to PrivateEndpointProvisioningState_STATUS
var privateEndpointProvisioningState_STATUS_Values = map[string]PrivateEndpointProvisioningState_STATUS{
	"deleting":  PrivateEndpointProvisioningState_STATUS_Deleting,
	"failed":    PrivateEndpointProvisioningState_STATUS_Failed,
	"succeeded": PrivateEndpointProvisioningState_STATUS_Succeeded,
	"updating":  PrivateEndpointProvisioningState_STATUS_Updating,
}

// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure
type PrivateEndpointsPrivateDnsZoneGroupOperatorSpec struct {
	// ConfigMapExpressions: configures where to place operator written dynamic ConfigMaps (created with CEL expressions).
	ConfigMapExpressions []*core.DestinationExpression `json:"configMapExpressions,omitempty"`

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

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

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

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

	// No error
	return nil
}

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

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

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

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

	// No error
	return nil
}

// A collective group of information about the record set information.
type RecordSet_STATUS struct {
	// Fqdn: Fqdn that resolves to private endpoint ip address.
	Fqdn *string `json:"fqdn,omitempty"`

	// IpAddresses: The private ip address of the private endpoint.
	IpAddresses []string `json:"ipAddresses,omitempty"`

	// ProvisioningState: The provisioning state of the recordset.
	ProvisioningState *PrivateEndpointProvisioningState_STATUS `json:"provisioningState,omitempty"`

	// RecordSetName: Recordset name.
	RecordSetName *string `json:"recordSetName,omitempty"`

	// RecordType: Resource record type.
	RecordType *string `json:"recordType,omitempty"`

	// Ttl: Recordset time to live.
	Ttl *int `json:"ttl,omitempty"`
}

var _ genruntime.FromARMConverter = &RecordSet_STATUS{}

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

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

	// Set property "Fqdn":
	if typedInput.Fqdn != nil {
		fqdn := *typedInput.Fqdn
		recordSet.Fqdn = &fqdn
	}

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

	// Set property "ProvisioningState":
	if typedInput.ProvisioningState != nil {
		var temp string
		temp = string(*typedInput.ProvisioningState)
		provisioningState := PrivateEndpointProvisioningState_STATUS(temp)
		recordSet.ProvisioningState = &provisioningState
	}

	// Set property "RecordSetName":
	if typedInput.RecordSetName != nil {
		recordSetName := *typedInput.RecordSetName
		recordSet.RecordSetName = &recordSetName
	}

	// Set property "RecordType":
	if typedInput.RecordType != nil {
		recordType := *typedInput.RecordType
		recordSet.RecordType = &recordType
	}

	// Set property "Ttl":
	if typedInput.Ttl != nil {
		ttl := *typedInput.Ttl
		recordSet.Ttl = &ttl
	}

	// No error
	return nil
}

// AssignProperties_From_RecordSet_STATUS populates our RecordSet_STATUS from the provided source RecordSet_STATUS
func (recordSet *RecordSet_STATUS) AssignProperties_From_RecordSet_STATUS(source *storage.RecordSet_STATUS) error {

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

	// IpAddresses
	recordSet.IpAddresses = genruntime.CloneSliceOfString(source.IpAddresses)

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

	// RecordSetName
	recordSet.RecordSetName = genruntime.ClonePointerToString(source.RecordSetName)

	// RecordType
	recordSet.RecordType = genruntime.ClonePointerToString(source.RecordType)

	// Ttl
	recordSet.Ttl = genruntime.ClonePointerToInt(source.Ttl)

	// No error
	return nil
}

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

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

	// IpAddresses
	destination.IpAddresses = genruntime.CloneSliceOfString(recordSet.IpAddresses)

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

	// RecordSetName
	destination.RecordSetName = genruntime.ClonePointerToString(recordSet.RecordSetName)

	// RecordType
	destination.RecordType = genruntime.ClonePointerToString(recordSet.RecordType)

	// Ttl
	destination.Ttl = genruntime.ClonePointerToInt(recordSet.Ttl)

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

	// No error
	return nil
}

func init() {
	SchemeBuilder.Register(&PrivateEndpointsPrivateDnsZoneGroup{}, &PrivateEndpointsPrivateDnsZoneGroupList{})
}
