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

import (
	"fmt"
	arm "github.com/Azure/azure-service-operator/v2/api/containerregistry/v1api20230701/arm"
	storage "github.com/Azure/azure-service-operator/v2/api/containerregistry/v1api20230701/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,containerregistry}
// +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: /containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2023-07-01/containerregistry.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}
type Registry struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              Registry_Spec   `json:"spec,omitempty"`
	Status            Registry_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &Registry{}

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

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

var _ conversion.Convertible = &Registry{}

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

	return registry.AssignProperties_From_Registry(source)
}

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

	return registry.AssignProperties_To_Registry(destination)
}

var _ configmaps.Exporter = &Registry{}

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

var _ secrets.Exporter = &Registry{}

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

var _ genruntime.ImportableResource = &Registry{}

// InitializeSpec initializes the spec for this resource from the given status
func (registry *Registry) InitializeSpec(status genruntime.ConvertibleStatus) error {
	if s, ok := status.(*Registry_STATUS); ok {
		return registry.Spec.Initialize_From_Registry_STATUS(s)
	}

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

var _ genruntime.KubernetesResource = &Registry{}

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

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

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

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

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.ContainerRegistry/registries"
func (registry *Registry) GetType() string {
	return "Microsoft.ContainerRegistry/registries"
}

// NewEmptyStatus returns a new empty (blank) status
func (registry *Registry) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &Registry_STATUS{}
}

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

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

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

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

	registry.Status = st
	return nil
}

// AssignProperties_From_Registry populates our Registry from the provided source Registry
func (registry *Registry) AssignProperties_From_Registry(source *storage.Registry) error {

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

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

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

	// No error
	return nil
}

// AssignProperties_To_Registry populates the provided destination Registry from our Registry
func (registry *Registry) AssignProperties_To_Registry(destination *storage.Registry) error {

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

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

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

// +kubebuilder:object:root=true
// Generator information:
// - Generated from: /containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2023-07-01/containerregistry.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}
type RegistryList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Registry `json:"items"`
}

// +kubebuilder:validation:Enum={"2023-07-01"}
type APIVersion string

const APIVersion_Value = APIVersion("2023-07-01")

type Registry_Spec struct {
	// AdminUserEnabled: The value that indicates whether the admin user is enabled.
	AdminUserEnabled *bool `json:"adminUserEnabled,omitempty"`

	// +kubebuilder:validation:MaxLength=50
	// +kubebuilder:validation:MinLength=5
	// +kubebuilder:validation:Pattern="^[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"`

	// DataEndpointEnabled: Enable a single data endpoint per region for serving data.
	DataEndpointEnabled *bool `json:"dataEndpointEnabled,omitempty"`

	// Encryption: The encryption settings of container registry.
	Encryption *EncryptionProperty `json:"encryption,omitempty"`

	// Identity: The identity of the container registry.
	Identity *IdentityProperties `json:"identity,omitempty"`

	// +kubebuilder:validation:Required
	// Location: The location of the resource. This cannot be changed after the resource is created.
	Location *string `json:"location,omitempty"`

	// NetworkRuleBypassOptions: Whether to allow trusted Azure services to access a network restricted registry.
	NetworkRuleBypassOptions *RegistryProperties_NetworkRuleBypassOptions `json:"networkRuleBypassOptions,omitempty"`

	// NetworkRuleSet: The network rule set for a container registry.
	NetworkRuleSet *NetworkRuleSet `json:"networkRuleSet,omitempty"`

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

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

	// Policies: The policies for a container registry.
	Policies *Policies `json:"policies,omitempty"`

	// PublicNetworkAccess: Whether or not public network access is allowed for the container registry.
	PublicNetworkAccess *RegistryProperties_PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`

	// +kubebuilder:validation:Required
	// Sku: The SKU of the container registry.
	Sku *Sku `json:"sku,omitempty"`

	// Tags: The tags of the resource.
	Tags map[string]string `json:"tags,omitempty"`

	// ZoneRedundancy: Whether or not zone redundancy is enabled for this container registry
	ZoneRedundancy *RegistryProperties_ZoneRedundancy `json:"zoneRedundancy,omitempty"`
}

var _ genruntime.ARMTransformer = &Registry_Spec{}

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

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

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

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

	// Set property "Properties":
	if registry.AdminUserEnabled != nil ||
		registry.DataEndpointEnabled != nil ||
		registry.Encryption != nil ||
		registry.NetworkRuleBypassOptions != nil ||
		registry.NetworkRuleSet != nil ||
		registry.Policies != nil ||
		registry.PublicNetworkAccess != nil ||
		registry.ZoneRedundancy != nil {
		result.Properties = &arm.RegistryProperties{}
	}
	if registry.AdminUserEnabled != nil {
		adminUserEnabled := *registry.AdminUserEnabled
		result.Properties.AdminUserEnabled = &adminUserEnabled
	}
	if registry.DataEndpointEnabled != nil {
		dataEndpointEnabled := *registry.DataEndpointEnabled
		result.Properties.DataEndpointEnabled = &dataEndpointEnabled
	}
	if registry.Encryption != nil {
		encryption_ARM, err := registry.Encryption.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		encryption := *encryption_ARM.(*arm.EncryptionProperty)
		result.Properties.Encryption = &encryption
	}
	if registry.NetworkRuleBypassOptions != nil {
		var temp string
		temp = string(*registry.NetworkRuleBypassOptions)
		networkRuleBypassOptions := arm.RegistryProperties_NetworkRuleBypassOptions(temp)
		result.Properties.NetworkRuleBypassOptions = &networkRuleBypassOptions
	}
	if registry.NetworkRuleSet != nil {
		networkRuleSet_ARM, err := registry.NetworkRuleSet.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		networkRuleSet := *networkRuleSet_ARM.(*arm.NetworkRuleSet)
		result.Properties.NetworkRuleSet = &networkRuleSet
	}
	if registry.Policies != nil {
		policies_ARM, err := registry.Policies.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		policies := *policies_ARM.(*arm.Policies)
		result.Properties.Policies = &policies
	}
	if registry.PublicNetworkAccess != nil {
		var temp string
		temp = string(*registry.PublicNetworkAccess)
		publicNetworkAccess := arm.RegistryProperties_PublicNetworkAccess(temp)
		result.Properties.PublicNetworkAccess = &publicNetworkAccess
	}
	if registry.ZoneRedundancy != nil {
		var temp string
		temp = string(*registry.ZoneRedundancy)
		zoneRedundancy := arm.RegistryProperties_ZoneRedundancy(temp)
		result.Properties.ZoneRedundancy = &zoneRedundancy
	}

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

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

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

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

	// Set property "AdminUserEnabled":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AdminUserEnabled != nil {
			adminUserEnabled := *typedInput.Properties.AdminUserEnabled
			registry.AdminUserEnabled = &adminUserEnabled
		}
	}

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

	// Set property "DataEndpointEnabled":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.DataEndpointEnabled != nil {
			dataEndpointEnabled := *typedInput.Properties.DataEndpointEnabled
			registry.DataEndpointEnabled = &dataEndpointEnabled
		}
	}

	// Set property "Encryption":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Encryption != nil {
			var encryption1 EncryptionProperty
			err := encryption1.PopulateFromARM(owner, *typedInput.Properties.Encryption)
			if err != nil {
				return err
			}
			encryption := encryption1
			registry.Encryption = &encryption
		}
	}

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

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

	// Set property "NetworkRuleBypassOptions":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.NetworkRuleBypassOptions != nil {
			var temp string
			temp = string(*typedInput.Properties.NetworkRuleBypassOptions)
			networkRuleBypassOptions := RegistryProperties_NetworkRuleBypassOptions(temp)
			registry.NetworkRuleBypassOptions = &networkRuleBypassOptions
		}
	}

	// Set property "NetworkRuleSet":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.NetworkRuleSet != nil {
			var networkRuleSet1 NetworkRuleSet
			err := networkRuleSet1.PopulateFromARM(owner, *typedInput.Properties.NetworkRuleSet)
			if err != nil {
				return err
			}
			networkRuleSet := networkRuleSet1
			registry.NetworkRuleSet = &networkRuleSet
		}
	}

	// no assignment for property "OperatorSpec"

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

	// Set property "Policies":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Policies != nil {
			var policies1 Policies
			err := policies1.PopulateFromARM(owner, *typedInput.Properties.Policies)
			if err != nil {
				return err
			}
			policies := policies1
			registry.Policies = &policies
		}
	}

	// Set property "PublicNetworkAccess":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PublicNetworkAccess != nil {
			var temp string
			temp = string(*typedInput.Properties.PublicNetworkAccess)
			publicNetworkAccess := RegistryProperties_PublicNetworkAccess(temp)
			registry.PublicNetworkAccess = &publicNetworkAccess
		}
	}

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

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

	// Set property "ZoneRedundancy":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ZoneRedundancy != nil {
			var temp string
			temp = string(*typedInput.Properties.ZoneRedundancy)
			zoneRedundancy := RegistryProperties_ZoneRedundancy(temp)
			registry.ZoneRedundancy = &zoneRedundancy
		}
	}

	// No error
	return nil
}

var _ genruntime.ConvertibleSpec = &Registry_Spec{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.Registry_Spec{}
	err := registry.AssignProperties_To_Registry_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_Registry_Spec populates our Registry_Spec from the provided source Registry_Spec
func (registry *Registry_Spec) AssignProperties_From_Registry_Spec(source *storage.Registry_Spec) error {

	// AdminUserEnabled
	if source.AdminUserEnabled != nil {
		adminUserEnabled := *source.AdminUserEnabled
		registry.AdminUserEnabled = &adminUserEnabled
	} else {
		registry.AdminUserEnabled = nil
	}

	// AzureName
	registry.AzureName = source.AzureName

	// DataEndpointEnabled
	if source.DataEndpointEnabled != nil {
		dataEndpointEnabled := *source.DataEndpointEnabled
		registry.DataEndpointEnabled = &dataEndpointEnabled
	} else {
		registry.DataEndpointEnabled = nil
	}

	// Encryption
	if source.Encryption != nil {
		var encryption EncryptionProperty
		err := encryption.AssignProperties_From_EncryptionProperty(source.Encryption)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EncryptionProperty() to populate field Encryption")
		}
		registry.Encryption = &encryption
	} else {
		registry.Encryption = nil
	}

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

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

	// NetworkRuleBypassOptions
	if source.NetworkRuleBypassOptions != nil {
		networkRuleBypassOption := *source.NetworkRuleBypassOptions
		networkRuleBypassOptionTemp := genruntime.ToEnum(networkRuleBypassOption, registryProperties_NetworkRuleBypassOptions_Values)
		registry.NetworkRuleBypassOptions = &networkRuleBypassOptionTemp
	} else {
		registry.NetworkRuleBypassOptions = nil
	}

	// NetworkRuleSet
	if source.NetworkRuleSet != nil {
		var networkRuleSet NetworkRuleSet
		err := networkRuleSet.AssignProperties_From_NetworkRuleSet(source.NetworkRuleSet)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NetworkRuleSet() to populate field NetworkRuleSet")
		}
		registry.NetworkRuleSet = &networkRuleSet
	} else {
		registry.NetworkRuleSet = nil
	}

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

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

	// Policies
	if source.Policies != nil {
		var policy Policies
		err := policy.AssignProperties_From_Policies(source.Policies)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_Policies() to populate field Policies")
		}
		registry.Policies = &policy
	} else {
		registry.Policies = nil
	}

	// PublicNetworkAccess
	if source.PublicNetworkAccess != nil {
		publicNetworkAccess := *source.PublicNetworkAccess
		publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, registryProperties_PublicNetworkAccess_Values)
		registry.PublicNetworkAccess = &publicNetworkAccessTemp
	} else {
		registry.PublicNetworkAccess = 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")
		}
		registry.Sku = &sku
	} else {
		registry.Sku = nil
	}

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

	// ZoneRedundancy
	if source.ZoneRedundancy != nil {
		zoneRedundancy := *source.ZoneRedundancy
		zoneRedundancyTemp := genruntime.ToEnum(zoneRedundancy, registryProperties_ZoneRedundancy_Values)
		registry.ZoneRedundancy = &zoneRedundancyTemp
	} else {
		registry.ZoneRedundancy = nil
	}

	// No error
	return nil
}

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

	// AdminUserEnabled
	if registry.AdminUserEnabled != nil {
		adminUserEnabled := *registry.AdminUserEnabled
		destination.AdminUserEnabled = &adminUserEnabled
	} else {
		destination.AdminUserEnabled = nil
	}

	// AzureName
	destination.AzureName = registry.AzureName

	// DataEndpointEnabled
	if registry.DataEndpointEnabled != nil {
		dataEndpointEnabled := *registry.DataEndpointEnabled
		destination.DataEndpointEnabled = &dataEndpointEnabled
	} else {
		destination.DataEndpointEnabled = nil
	}

	// Encryption
	if registry.Encryption != nil {
		var encryption storage.EncryptionProperty
		err := registry.Encryption.AssignProperties_To_EncryptionProperty(&encryption)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EncryptionProperty() to populate field Encryption")
		}
		destination.Encryption = &encryption
	} else {
		destination.Encryption = nil
	}

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

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

	// NetworkRuleBypassOptions
	if registry.NetworkRuleBypassOptions != nil {
		networkRuleBypassOption := string(*registry.NetworkRuleBypassOptions)
		destination.NetworkRuleBypassOptions = &networkRuleBypassOption
	} else {
		destination.NetworkRuleBypassOptions = nil
	}

	// NetworkRuleSet
	if registry.NetworkRuleSet != nil {
		var networkRuleSet storage.NetworkRuleSet
		err := registry.NetworkRuleSet.AssignProperties_To_NetworkRuleSet(&networkRuleSet)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NetworkRuleSet() to populate field NetworkRuleSet")
		}
		destination.NetworkRuleSet = &networkRuleSet
	} else {
		destination.NetworkRuleSet = nil
	}

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

	// OriginalVersion
	destination.OriginalVersion = registry.OriginalVersion()

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

	// Policies
	if registry.Policies != nil {
		var policy storage.Policies
		err := registry.Policies.AssignProperties_To_Policies(&policy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_Policies() to populate field Policies")
		}
		destination.Policies = &policy
	} else {
		destination.Policies = nil
	}

	// PublicNetworkAccess
	if registry.PublicNetworkAccess != nil {
		publicNetworkAccess := string(*registry.PublicNetworkAccess)
		destination.PublicNetworkAccess = &publicNetworkAccess
	} else {
		destination.PublicNetworkAccess = nil
	}

	// Sku
	if registry.Sku != nil {
		var sku storage.Sku
		err := registry.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(registry.Tags)

	// ZoneRedundancy
	if registry.ZoneRedundancy != nil {
		zoneRedundancy := string(*registry.ZoneRedundancy)
		destination.ZoneRedundancy = &zoneRedundancy
	} else {
		destination.ZoneRedundancy = nil
	}

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

	// No error
	return nil
}

// Initialize_From_Registry_STATUS populates our Registry_Spec from the provided source Registry_STATUS
func (registry *Registry_Spec) Initialize_From_Registry_STATUS(source *Registry_STATUS) error {

	// AdminUserEnabled
	if source.AdminUserEnabled != nil {
		adminUserEnabled := *source.AdminUserEnabled
		registry.AdminUserEnabled = &adminUserEnabled
	} else {
		registry.AdminUserEnabled = nil
	}

	// DataEndpointEnabled
	if source.DataEndpointEnabled != nil {
		dataEndpointEnabled := *source.DataEndpointEnabled
		registry.DataEndpointEnabled = &dataEndpointEnabled
	} else {
		registry.DataEndpointEnabled = nil
	}

	// Encryption
	if source.Encryption != nil {
		var encryption EncryptionProperty
		err := encryption.Initialize_From_EncryptionProperty_STATUS(source.Encryption)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_EncryptionProperty_STATUS() to populate field Encryption")
		}
		registry.Encryption = &encryption
	} else {
		registry.Encryption = nil
	}

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

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

	// NetworkRuleBypassOptions
	if source.NetworkRuleBypassOptions != nil {
		networkRuleBypassOption := genruntime.ToEnum(string(*source.NetworkRuleBypassOptions), registryProperties_NetworkRuleBypassOptions_Values)
		registry.NetworkRuleBypassOptions = &networkRuleBypassOption
	} else {
		registry.NetworkRuleBypassOptions = nil
	}

	// NetworkRuleSet
	if source.NetworkRuleSet != nil {
		var networkRuleSet NetworkRuleSet
		err := networkRuleSet.Initialize_From_NetworkRuleSet_STATUS(source.NetworkRuleSet)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_NetworkRuleSet_STATUS() to populate field NetworkRuleSet")
		}
		registry.NetworkRuleSet = &networkRuleSet
	} else {
		registry.NetworkRuleSet = nil
	}

	// Policies
	if source.Policies != nil {
		var policy Policies
		err := policy.Initialize_From_Policies_STATUS(source.Policies)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_Policies_STATUS() to populate field Policies")
		}
		registry.Policies = &policy
	} else {
		registry.Policies = nil
	}

	// PublicNetworkAccess
	if source.PublicNetworkAccess != nil {
		publicNetworkAccess := genruntime.ToEnum(string(*source.PublicNetworkAccess), registryProperties_PublicNetworkAccess_Values)
		registry.PublicNetworkAccess = &publicNetworkAccess
	} else {
		registry.PublicNetworkAccess = 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")
		}
		registry.Sku = &sku
	} else {
		registry.Sku = nil
	}

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

	// ZoneRedundancy
	if source.ZoneRedundancy != nil {
		zoneRedundancy := genruntime.ToEnum(string(*source.ZoneRedundancy), registryProperties_ZoneRedundancy_Values)
		registry.ZoneRedundancy = &zoneRedundancy
	} else {
		registry.ZoneRedundancy = nil
	}

	// No error
	return nil
}

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

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

// An object that represents a container registry.
type Registry_STATUS struct {
	// AdminUserEnabled: The value that indicates whether the admin user is enabled.
	AdminUserEnabled *bool `json:"adminUserEnabled,omitempty"`

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

	// CreationDate: The creation date of the container registry in ISO8601 format.
	CreationDate *string `json:"creationDate,omitempty"`

	// DataEndpointEnabled: Enable a single data endpoint per region for serving data.
	DataEndpointEnabled *bool `json:"dataEndpointEnabled,omitempty"`

	// DataEndpointHostNames: List of host names that will serve data when dataEndpointEnabled is true.
	DataEndpointHostNames []string `json:"dataEndpointHostNames,omitempty"`

	// Encryption: The encryption settings of container registry.
	Encryption *EncryptionProperty_STATUS `json:"encryption,omitempty"`

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

	// Identity: The identity of the container registry.
	Identity *IdentityProperties_STATUS `json:"identity,omitempty"`

	// Location: The location of the resource. This cannot be changed after the resource is created.
	Location *string `json:"location,omitempty"`

	// LoginServer: The URL that can be used to log into the container registry.
	LoginServer *string `json:"loginServer,omitempty"`

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

	// NetworkRuleBypassOptions: Whether to allow trusted Azure services to access a network restricted registry.
	NetworkRuleBypassOptions *RegistryProperties_NetworkRuleBypassOptions_STATUS `json:"networkRuleBypassOptions,omitempty"`

	// NetworkRuleSet: The network rule set for a container registry.
	NetworkRuleSet *NetworkRuleSet_STATUS `json:"networkRuleSet,omitempty"`

	// Policies: The policies for a container registry.
	Policies *Policies_STATUS `json:"policies,omitempty"`

	// PrivateEndpointConnections: List of private endpoint connections for a container registry.
	PrivateEndpointConnections []PrivateEndpointConnection_STATUS `json:"privateEndpointConnections,omitempty"`

	// ProvisioningState: The provisioning state of the container registry at the time the operation was called.
	ProvisioningState *RegistryProperties_ProvisioningState_STATUS `json:"provisioningState,omitempty"`

	// PublicNetworkAccess: Whether or not public network access is allowed for the container registry.
	PublicNetworkAccess *RegistryProperties_PublicNetworkAccess_STATUS `json:"publicNetworkAccess,omitempty"`

	// Sku: The SKU of the container registry.
	Sku *Sku_STATUS `json:"sku,omitempty"`

	// Status: The status of the container registry at the time the operation was called.
	Status *Status_STATUS `json:"status,omitempty"`

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

	// Tags: The tags of the resource.
	Tags map[string]string `json:"tags,omitempty"`

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

	// ZoneRedundancy: Whether or not zone redundancy is enabled for this container registry
	ZoneRedundancy *RegistryProperties_ZoneRedundancy_STATUS `json:"zoneRedundancy,omitempty"`
}

var _ genruntime.ConvertibleStatus = &Registry_STATUS{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.Registry_STATUS{}
	err := registry.AssignProperties_To_Registry_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 = &Registry_STATUS{}

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

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

	// Set property "AdminUserEnabled":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.AdminUserEnabled != nil {
			adminUserEnabled := *typedInput.Properties.AdminUserEnabled
			registry.AdminUserEnabled = &adminUserEnabled
		}
	}

	// no assignment for property "Conditions"

	// Set property "CreationDate":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.CreationDate != nil {
			creationDate := *typedInput.Properties.CreationDate
			registry.CreationDate = &creationDate
		}
	}

	// Set property "DataEndpointEnabled":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.DataEndpointEnabled != nil {
			dataEndpointEnabled := *typedInput.Properties.DataEndpointEnabled
			registry.DataEndpointEnabled = &dataEndpointEnabled
		}
	}

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

	// Set property "Encryption":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Encryption != nil {
			var encryption1 EncryptionProperty_STATUS
			err := encryption1.PopulateFromARM(owner, *typedInput.Properties.Encryption)
			if err != nil {
				return err
			}
			encryption := encryption1
			registry.Encryption = &encryption
		}
	}

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

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

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

	// Set property "LoginServer":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.LoginServer != nil {
			loginServer := *typedInput.Properties.LoginServer
			registry.LoginServer = &loginServer
		}
	}

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

	// Set property "NetworkRuleBypassOptions":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.NetworkRuleBypassOptions != nil {
			var temp string
			temp = string(*typedInput.Properties.NetworkRuleBypassOptions)
			networkRuleBypassOptions := RegistryProperties_NetworkRuleBypassOptions_STATUS(temp)
			registry.NetworkRuleBypassOptions = &networkRuleBypassOptions
		}
	}

	// Set property "NetworkRuleSet":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.NetworkRuleSet != nil {
			var networkRuleSet1 NetworkRuleSet_STATUS
			err := networkRuleSet1.PopulateFromARM(owner, *typedInput.Properties.NetworkRuleSet)
			if err != nil {
				return err
			}
			networkRuleSet := networkRuleSet1
			registry.NetworkRuleSet = &networkRuleSet
		}
	}

	// Set property "Policies":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Policies != nil {
			var policies1 Policies_STATUS
			err := policies1.PopulateFromARM(owner, *typedInput.Properties.Policies)
			if err != nil {
				return err
			}
			policies := policies1
			registry.Policies = &policies
		}
	}

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

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

	// Set property "PublicNetworkAccess":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PublicNetworkAccess != nil {
			var temp string
			temp = string(*typedInput.Properties.PublicNetworkAccess)
			publicNetworkAccess := RegistryProperties_PublicNetworkAccess_STATUS(temp)
			registry.PublicNetworkAccess = &publicNetworkAccess
		}
	}

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

	// Set property "Status":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Status != nil {
			var status1 Status_STATUS
			err := status1.PopulateFromARM(owner, *typedInput.Properties.Status)
			if err != nil {
				return err
			}
			status := status1
			registry.Status = &status
		}
	}

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

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

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

	// Set property "ZoneRedundancy":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ZoneRedundancy != nil {
			var temp string
			temp = string(*typedInput.Properties.ZoneRedundancy)
			zoneRedundancy := RegistryProperties_ZoneRedundancy_STATUS(temp)
			registry.ZoneRedundancy = &zoneRedundancy
		}
	}

	// No error
	return nil
}

// AssignProperties_From_Registry_STATUS populates our Registry_STATUS from the provided source Registry_STATUS
func (registry *Registry_STATUS) AssignProperties_From_Registry_STATUS(source *storage.Registry_STATUS) error {

	// AdminUserEnabled
	if source.AdminUserEnabled != nil {
		adminUserEnabled := *source.AdminUserEnabled
		registry.AdminUserEnabled = &adminUserEnabled
	} else {
		registry.AdminUserEnabled = nil
	}

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

	// CreationDate
	registry.CreationDate = genruntime.ClonePointerToString(source.CreationDate)

	// DataEndpointEnabled
	if source.DataEndpointEnabled != nil {
		dataEndpointEnabled := *source.DataEndpointEnabled
		registry.DataEndpointEnabled = &dataEndpointEnabled
	} else {
		registry.DataEndpointEnabled = nil
	}

	// DataEndpointHostNames
	registry.DataEndpointHostNames = genruntime.CloneSliceOfString(source.DataEndpointHostNames)

	// Encryption
	if source.Encryption != nil {
		var encryption EncryptionProperty_STATUS
		err := encryption.AssignProperties_From_EncryptionProperty_STATUS(source.Encryption)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EncryptionProperty_STATUS() to populate field Encryption")
		}
		registry.Encryption = &encryption
	} else {
		registry.Encryption = nil
	}

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

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

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

	// LoginServer
	registry.LoginServer = genruntime.ClonePointerToString(source.LoginServer)

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

	// NetworkRuleBypassOptions
	if source.NetworkRuleBypassOptions != nil {
		networkRuleBypassOption := *source.NetworkRuleBypassOptions
		networkRuleBypassOptionTemp := genruntime.ToEnum(networkRuleBypassOption, registryProperties_NetworkRuleBypassOptions_STATUS_Values)
		registry.NetworkRuleBypassOptions = &networkRuleBypassOptionTemp
	} else {
		registry.NetworkRuleBypassOptions = nil
	}

	// NetworkRuleSet
	if source.NetworkRuleSet != nil {
		var networkRuleSet NetworkRuleSet_STATUS
		err := networkRuleSet.AssignProperties_From_NetworkRuleSet_STATUS(source.NetworkRuleSet)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_NetworkRuleSet_STATUS() to populate field NetworkRuleSet")
		}
		registry.NetworkRuleSet = &networkRuleSet
	} else {
		registry.NetworkRuleSet = nil
	}

	// Policies
	if source.Policies != nil {
		var policy Policies_STATUS
		err := policy.AssignProperties_From_Policies_STATUS(source.Policies)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_Policies_STATUS() to populate field Policies")
		}
		registry.Policies = &policy
	} else {
		registry.Policies = nil
	}

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

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

	// PublicNetworkAccess
	if source.PublicNetworkAccess != nil {
		publicNetworkAccess := *source.PublicNetworkAccess
		publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, registryProperties_PublicNetworkAccess_STATUS_Values)
		registry.PublicNetworkAccess = &publicNetworkAccessTemp
	} else {
		registry.PublicNetworkAccess = 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")
		}
		registry.Sku = &sku
	} else {
		registry.Sku = nil
	}

	// Status
	if source.Status != nil {
		var status Status_STATUS
		err := status.AssignProperties_From_Status_STATUS(source.Status)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_Status_STATUS() to populate field Status")
		}
		registry.Status = &status
	} else {
		registry.Status = 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")
		}
		registry.SystemData = &systemDatum
	} else {
		registry.SystemData = nil
	}

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

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

	// ZoneRedundancy
	if source.ZoneRedundancy != nil {
		zoneRedundancy := *source.ZoneRedundancy
		zoneRedundancyTemp := genruntime.ToEnum(zoneRedundancy, registryProperties_ZoneRedundancy_STATUS_Values)
		registry.ZoneRedundancy = &zoneRedundancyTemp
	} else {
		registry.ZoneRedundancy = nil
	}

	// No error
	return nil
}

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

	// AdminUserEnabled
	if registry.AdminUserEnabled != nil {
		adminUserEnabled := *registry.AdminUserEnabled
		destination.AdminUserEnabled = &adminUserEnabled
	} else {
		destination.AdminUserEnabled = nil
	}

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

	// CreationDate
	destination.CreationDate = genruntime.ClonePointerToString(registry.CreationDate)

	// DataEndpointEnabled
	if registry.DataEndpointEnabled != nil {
		dataEndpointEnabled := *registry.DataEndpointEnabled
		destination.DataEndpointEnabled = &dataEndpointEnabled
	} else {
		destination.DataEndpointEnabled = nil
	}

	// DataEndpointHostNames
	destination.DataEndpointHostNames = genruntime.CloneSliceOfString(registry.DataEndpointHostNames)

	// Encryption
	if registry.Encryption != nil {
		var encryption storage.EncryptionProperty_STATUS
		err := registry.Encryption.AssignProperties_To_EncryptionProperty_STATUS(&encryption)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EncryptionProperty_STATUS() to populate field Encryption")
		}
		destination.Encryption = &encryption
	} else {
		destination.Encryption = nil
	}

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

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

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

	// LoginServer
	destination.LoginServer = genruntime.ClonePointerToString(registry.LoginServer)

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

	// NetworkRuleBypassOptions
	if registry.NetworkRuleBypassOptions != nil {
		networkRuleBypassOption := string(*registry.NetworkRuleBypassOptions)
		destination.NetworkRuleBypassOptions = &networkRuleBypassOption
	} else {
		destination.NetworkRuleBypassOptions = nil
	}

	// NetworkRuleSet
	if registry.NetworkRuleSet != nil {
		var networkRuleSet storage.NetworkRuleSet_STATUS
		err := registry.NetworkRuleSet.AssignProperties_To_NetworkRuleSet_STATUS(&networkRuleSet)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_NetworkRuleSet_STATUS() to populate field NetworkRuleSet")
		}
		destination.NetworkRuleSet = &networkRuleSet
	} else {
		destination.NetworkRuleSet = nil
	}

	// Policies
	if registry.Policies != nil {
		var policy storage.Policies_STATUS
		err := registry.Policies.AssignProperties_To_Policies_STATUS(&policy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_Policies_STATUS() to populate field Policies")
		}
		destination.Policies = &policy
	} else {
		destination.Policies = nil
	}

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

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

	// PublicNetworkAccess
	if registry.PublicNetworkAccess != nil {
		publicNetworkAccess := string(*registry.PublicNetworkAccess)
		destination.PublicNetworkAccess = &publicNetworkAccess
	} else {
		destination.PublicNetworkAccess = nil
	}

	// Sku
	if registry.Sku != nil {
		var sku storage.Sku_STATUS
		err := registry.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
	}

	// Status
	if registry.Status != nil {
		var status storage.Status_STATUS
		err := registry.Status.AssignProperties_To_Status_STATUS(&status)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_Status_STATUS() to populate field Status")
		}
		destination.Status = &status
	} else {
		destination.Status = nil
	}

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

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

	// ZoneRedundancy
	if registry.ZoneRedundancy != nil {
		zoneRedundancy := string(*registry.ZoneRedundancy)
		destination.ZoneRedundancy = &zoneRedundancy
	} else {
		destination.ZoneRedundancy = nil
	}

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

	// No error
	return nil
}

type EncryptionProperty struct {
	// KeyVaultProperties: Key vault properties.
	KeyVaultProperties *KeyVaultProperties `json:"keyVaultProperties,omitempty"`

	// Status: Indicates whether or not the encryption is enabled for container registry.
	Status *EncryptionProperty_Status `json:"status,omitempty"`
}

var _ genruntime.ARMTransformer = &EncryptionProperty{}

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

	// Set property "KeyVaultProperties":
	if property.KeyVaultProperties != nil {
		keyVaultProperties_ARM, err := property.KeyVaultProperties.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		keyVaultProperties := *keyVaultProperties_ARM.(*arm.KeyVaultProperties)
		result.KeyVaultProperties = &keyVaultProperties
	}

	// Set property "Status":
	if property.Status != nil {
		var temp string
		temp = string(*property.Status)
		status := arm.EncryptionProperty_Status(temp)
		result.Status = &status
	}
	return result, nil
}

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

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

	// Set property "KeyVaultProperties":
	if typedInput.KeyVaultProperties != nil {
		var keyVaultProperties1 KeyVaultProperties
		err := keyVaultProperties1.PopulateFromARM(owner, *typedInput.KeyVaultProperties)
		if err != nil {
			return err
		}
		keyVaultProperties := keyVaultProperties1
		property.KeyVaultProperties = &keyVaultProperties
	}

	// Set property "Status":
	if typedInput.Status != nil {
		var temp string
		temp = string(*typedInput.Status)
		status := EncryptionProperty_Status(temp)
		property.Status = &status
	}

	// No error
	return nil
}

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

	// KeyVaultProperties
	if source.KeyVaultProperties != nil {
		var keyVaultProperty KeyVaultProperties
		err := keyVaultProperty.AssignProperties_From_KeyVaultProperties(source.KeyVaultProperties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_KeyVaultProperties() to populate field KeyVaultProperties")
		}
		property.KeyVaultProperties = &keyVaultProperty
	} else {
		property.KeyVaultProperties = nil
	}

	// Status
	if source.Status != nil {
		status := *source.Status
		statusTemp := genruntime.ToEnum(status, encryptionProperty_Status_Values)
		property.Status = &statusTemp
	} else {
		property.Status = nil
	}

	// No error
	return nil
}

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

	// KeyVaultProperties
	if property.KeyVaultProperties != nil {
		var keyVaultProperty storage.KeyVaultProperties
		err := property.KeyVaultProperties.AssignProperties_To_KeyVaultProperties(&keyVaultProperty)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_KeyVaultProperties() to populate field KeyVaultProperties")
		}
		destination.KeyVaultProperties = &keyVaultProperty
	} else {
		destination.KeyVaultProperties = nil
	}

	// Status
	if property.Status != nil {
		status := string(*property.Status)
		destination.Status = &status
	} else {
		destination.Status = nil
	}

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

	// No error
	return nil
}

// Initialize_From_EncryptionProperty_STATUS populates our EncryptionProperty from the provided source EncryptionProperty_STATUS
func (property *EncryptionProperty) Initialize_From_EncryptionProperty_STATUS(source *EncryptionProperty_STATUS) error {

	// KeyVaultProperties
	if source.KeyVaultProperties != nil {
		var keyVaultProperty KeyVaultProperties
		err := keyVaultProperty.Initialize_From_KeyVaultProperties_STATUS(source.KeyVaultProperties)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_KeyVaultProperties_STATUS() to populate field KeyVaultProperties")
		}
		property.KeyVaultProperties = &keyVaultProperty
	} else {
		property.KeyVaultProperties = nil
	}

	// Status
	if source.Status != nil {
		status := genruntime.ToEnum(string(*source.Status), encryptionProperty_Status_Values)
		property.Status = &status
	} else {
		property.Status = nil
	}

	// No error
	return nil
}

type EncryptionProperty_STATUS struct {
	// KeyVaultProperties: Key vault properties.
	KeyVaultProperties *KeyVaultProperties_STATUS `json:"keyVaultProperties,omitempty"`

	// Status: Indicates whether or not the encryption is enabled for container registry.
	Status *EncryptionProperty_Status_STATUS `json:"status,omitempty"`
}

var _ genruntime.FromARMConverter = &EncryptionProperty_STATUS{}

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

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

	// Set property "KeyVaultProperties":
	if typedInput.KeyVaultProperties != nil {
		var keyVaultProperties1 KeyVaultProperties_STATUS
		err := keyVaultProperties1.PopulateFromARM(owner, *typedInput.KeyVaultProperties)
		if err != nil {
			return err
		}
		keyVaultProperties := keyVaultProperties1
		property.KeyVaultProperties = &keyVaultProperties
	}

	// Set property "Status":
	if typedInput.Status != nil {
		var temp string
		temp = string(*typedInput.Status)
		status := EncryptionProperty_Status_STATUS(temp)
		property.Status = &status
	}

	// No error
	return nil
}

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

	// KeyVaultProperties
	if source.KeyVaultProperties != nil {
		var keyVaultProperty KeyVaultProperties_STATUS
		err := keyVaultProperty.AssignProperties_From_KeyVaultProperties_STATUS(source.KeyVaultProperties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_KeyVaultProperties_STATUS() to populate field KeyVaultProperties")
		}
		property.KeyVaultProperties = &keyVaultProperty
	} else {
		property.KeyVaultProperties = nil
	}

	// Status
	if source.Status != nil {
		status := *source.Status
		statusTemp := genruntime.ToEnum(status, encryptionProperty_Status_STATUS_Values)
		property.Status = &statusTemp
	} else {
		property.Status = nil
	}

	// No error
	return nil
}

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

	// KeyVaultProperties
	if property.KeyVaultProperties != nil {
		var keyVaultProperty storage.KeyVaultProperties_STATUS
		err := property.KeyVaultProperties.AssignProperties_To_KeyVaultProperties_STATUS(&keyVaultProperty)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_KeyVaultProperties_STATUS() to populate field KeyVaultProperties")
		}
		destination.KeyVaultProperties = &keyVaultProperty
	} else {
		destination.KeyVaultProperties = nil
	}

	// Status
	if property.Status != nil {
		status := string(*property.Status)
		destination.Status = &status
	} else {
		destination.Status = nil
	}

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

	// No error
	return nil
}

// Managed identity for the resource.
type IdentityProperties struct {
	// Type: The identity type.
	Type *IdentityProperties_Type `json:"type,omitempty"`

	// UserAssignedIdentities: The list of user identities associated with the resource. The user identity
	// dictionary key references will be ARM resource ids in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/
	// providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
	UserAssignedIdentities []UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"`
}

var _ genruntime.ARMTransformer = &IdentityProperties{}

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

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

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

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

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

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

	// no assignment for property "UserAssignedIdentities"

	// No error
	return nil
}

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

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

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

	// No error
	return nil
}

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

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

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

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

	// No error
	return nil
}

// Initialize_From_IdentityProperties_STATUS populates our IdentityProperties from the provided source IdentityProperties_STATUS
func (properties *IdentityProperties) Initialize_From_IdentityProperties_STATUS(source *IdentityProperties_STATUS) error {

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

	// UserAssignedIdentities
	if source.UserAssignedIdentities != nil {
		userAssignedIdentityList := make([]UserAssignedIdentityDetails, 0, len(source.UserAssignedIdentities))
		for userAssignedIdentitiesKey := range source.UserAssignedIdentities {
			userAssignedIdentitiesRef := genruntime.CreateResourceReferenceFromARMID(userAssignedIdentitiesKey)
			userAssignedIdentityList = append(userAssignedIdentityList, UserAssignedIdentityDetails{Reference: userAssignedIdentitiesRef})
		}
		properties.UserAssignedIdentities = userAssignedIdentityList
	} else {
		properties.UserAssignedIdentities = nil
	}

	// No error
	return nil
}

// Managed identity for the resource.
type IdentityProperties_STATUS struct {
	// PrincipalId: The principal ID of resource identity.
	PrincipalId *string `json:"principalId,omitempty"`

	// TenantId: The tenant ID of resource.
	TenantId *string `json:"tenantId,omitempty"`

	// Type: The identity type.
	Type *IdentityProperties_Type_STATUS `json:"type,omitempty"`

	// UserAssignedIdentities: The list of user identities associated with the resource. The user identity
	// dictionary key references will be ARM resource ids in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/
	// providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
	UserAssignedIdentities map[string]UserIdentityProperties_STATUS `json:"userAssignedIdentities,omitempty"`
}

var _ genruntime.FromARMConverter = &IdentityProperties_STATUS{}

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

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

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

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

	// No error
	return nil
}

// The network rule set for a container registry.
type NetworkRuleSet struct {
	// +kubebuilder:validation:Required
	// DefaultAction: The default action of allow or deny when no other rules match.
	DefaultAction *NetworkRuleSet_DefaultAction `json:"defaultAction,omitempty"`

	// IpRules: The IP ACL rules.
	IpRules []IPRule `json:"ipRules,omitempty"`
}

var _ genruntime.ARMTransformer = &NetworkRuleSet{}

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

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

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

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

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

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

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

	// No error
	return nil
}

// AssignProperties_From_NetworkRuleSet populates our NetworkRuleSet from the provided source NetworkRuleSet
func (ruleSet *NetworkRuleSet) AssignProperties_From_NetworkRuleSet(source *storage.NetworkRuleSet) error {

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

	// IpRules
	if source.IpRules != nil {
		ipRuleList := make([]IPRule, len(source.IpRules))
		for ipRuleIndex, ipRuleItem := range source.IpRules {
			var ipRule IPRule
			err := ipRule.AssignProperties_From_IPRule(&ipRuleItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_IPRule() to populate field IpRules")
			}
			ipRuleList[ipRuleIndex] = ipRule
		}
		ruleSet.IpRules = ipRuleList
	} else {
		ruleSet.IpRules = nil
	}

	// No error
	return nil
}

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

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

	// IpRules
	if ruleSet.IpRules != nil {
		ipRuleList := make([]storage.IPRule, len(ruleSet.IpRules))
		for ipRuleIndex, ipRuleItem := range ruleSet.IpRules {
			var ipRule storage.IPRule
			err := ipRuleItem.AssignProperties_To_IPRule(&ipRule)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_IPRule() to populate field IpRules")
			}
			ipRuleList[ipRuleIndex] = ipRule
		}
		destination.IpRules = ipRuleList
	} else {
		destination.IpRules = nil
	}

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

	// No error
	return nil
}

// Initialize_From_NetworkRuleSet_STATUS populates our NetworkRuleSet from the provided source NetworkRuleSet_STATUS
func (ruleSet *NetworkRuleSet) Initialize_From_NetworkRuleSet_STATUS(source *NetworkRuleSet_STATUS) error {

	// DefaultAction
	if source.DefaultAction != nil {
		defaultAction := genruntime.ToEnum(string(*source.DefaultAction), networkRuleSet_DefaultAction_Values)
		ruleSet.DefaultAction = &defaultAction
	} else {
		ruleSet.DefaultAction = nil
	}

	// IpRules
	if source.IpRules != nil {
		ipRuleList := make([]IPRule, len(source.IpRules))
		for ipRuleIndex, ipRuleItem := range source.IpRules {
			var ipRule IPRule
			err := ipRule.Initialize_From_IPRule_STATUS(&ipRuleItem)
			if err != nil {
				return eris.Wrap(err, "calling Initialize_From_IPRule_STATUS() to populate field IpRules")
			}
			ipRuleList[ipRuleIndex] = ipRule
		}
		ruleSet.IpRules = ipRuleList
	} else {
		ruleSet.IpRules = nil
	}

	// No error
	return nil
}

// The network rule set for a container registry.
type NetworkRuleSet_STATUS struct {
	// DefaultAction: The default action of allow or deny when no other rules match.
	DefaultAction *NetworkRuleSet_DefaultAction_STATUS `json:"defaultAction,omitempty"`

	// IpRules: The IP ACL rules.
	IpRules []IPRule_STATUS `json:"ipRules,omitempty"`
}

var _ genruntime.FromARMConverter = &NetworkRuleSet_STATUS{}

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

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

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

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

	// No error
	return nil
}

// AssignProperties_From_NetworkRuleSet_STATUS populates our NetworkRuleSet_STATUS from the provided source NetworkRuleSet_STATUS
func (ruleSet *NetworkRuleSet_STATUS) AssignProperties_From_NetworkRuleSet_STATUS(source *storage.NetworkRuleSet_STATUS) error {

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

	// IpRules
	if source.IpRules != nil {
		ipRuleList := make([]IPRule_STATUS, len(source.IpRules))
		for ipRuleIndex, ipRuleItem := range source.IpRules {
			var ipRule IPRule_STATUS
			err := ipRule.AssignProperties_From_IPRule_STATUS(&ipRuleItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_IPRule_STATUS() to populate field IpRules")
			}
			ipRuleList[ipRuleIndex] = ipRule
		}
		ruleSet.IpRules = ipRuleList
	} else {
		ruleSet.IpRules = nil
	}

	// No error
	return nil
}

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

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

	// IpRules
	if ruleSet.IpRules != nil {
		ipRuleList := make([]storage.IPRule_STATUS, len(ruleSet.IpRules))
		for ipRuleIndex, ipRuleItem := range ruleSet.IpRules {
			var ipRule storage.IPRule_STATUS
			err := ipRuleItem.AssignProperties_To_IPRule_STATUS(&ipRule)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_IPRule_STATUS() to populate field IpRules")
			}
			ipRuleList[ipRuleIndex] = ipRule
		}
		destination.IpRules = ipRuleList
	} else {
		destination.IpRules = nil
	}

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

	// No error
	return nil
}

// The policies for a container registry.
type Policies struct {
	// ExportPolicy: The export policy for a container registry.
	ExportPolicy *ExportPolicy `json:"exportPolicy,omitempty"`

	// QuarantinePolicy: The quarantine policy for a container registry.
	QuarantinePolicy *QuarantinePolicy `json:"quarantinePolicy,omitempty"`

	// RetentionPolicy: The retention policy for a container registry.
	RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"`

	// TrustPolicy: The content trust policy for a container registry.
	TrustPolicy *TrustPolicy `json:"trustPolicy,omitempty"`
}

var _ genruntime.ARMTransformer = &Policies{}

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

	// Set property "ExportPolicy":
	if policies.ExportPolicy != nil {
		exportPolicy_ARM, err := policies.ExportPolicy.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		exportPolicy := *exportPolicy_ARM.(*arm.ExportPolicy)
		result.ExportPolicy = &exportPolicy
	}

	// Set property "QuarantinePolicy":
	if policies.QuarantinePolicy != nil {
		quarantinePolicy_ARM, err := policies.QuarantinePolicy.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		quarantinePolicy := *quarantinePolicy_ARM.(*arm.QuarantinePolicy)
		result.QuarantinePolicy = &quarantinePolicy
	}

	// Set property "RetentionPolicy":
	if policies.RetentionPolicy != nil {
		retentionPolicy_ARM, err := policies.RetentionPolicy.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		retentionPolicy := *retentionPolicy_ARM.(*arm.RetentionPolicy)
		result.RetentionPolicy = &retentionPolicy
	}

	// Set property "TrustPolicy":
	if policies.TrustPolicy != nil {
		trustPolicy_ARM, err := policies.TrustPolicy.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		trustPolicy := *trustPolicy_ARM.(*arm.TrustPolicy)
		result.TrustPolicy = &trustPolicy
	}
	return result, nil
}

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

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

	// Set property "ExportPolicy":
	if typedInput.ExportPolicy != nil {
		var exportPolicy1 ExportPolicy
		err := exportPolicy1.PopulateFromARM(owner, *typedInput.ExportPolicy)
		if err != nil {
			return err
		}
		exportPolicy := exportPolicy1
		policies.ExportPolicy = &exportPolicy
	}

	// Set property "QuarantinePolicy":
	if typedInput.QuarantinePolicy != nil {
		var quarantinePolicy1 QuarantinePolicy
		err := quarantinePolicy1.PopulateFromARM(owner, *typedInput.QuarantinePolicy)
		if err != nil {
			return err
		}
		quarantinePolicy := quarantinePolicy1
		policies.QuarantinePolicy = &quarantinePolicy
	}

	// Set property "RetentionPolicy":
	if typedInput.RetentionPolicy != nil {
		var retentionPolicy1 RetentionPolicy
		err := retentionPolicy1.PopulateFromARM(owner, *typedInput.RetentionPolicy)
		if err != nil {
			return err
		}
		retentionPolicy := retentionPolicy1
		policies.RetentionPolicy = &retentionPolicy
	}

	// Set property "TrustPolicy":
	if typedInput.TrustPolicy != nil {
		var trustPolicy1 TrustPolicy
		err := trustPolicy1.PopulateFromARM(owner, *typedInput.TrustPolicy)
		if err != nil {
			return err
		}
		trustPolicy := trustPolicy1
		policies.TrustPolicy = &trustPolicy
	}

	// No error
	return nil
}

// AssignProperties_From_Policies populates our Policies from the provided source Policies
func (policies *Policies) AssignProperties_From_Policies(source *storage.Policies) error {

	// ExportPolicy
	if source.ExportPolicy != nil {
		var exportPolicy ExportPolicy
		err := exportPolicy.AssignProperties_From_ExportPolicy(source.ExportPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ExportPolicy() to populate field ExportPolicy")
		}
		policies.ExportPolicy = &exportPolicy
	} else {
		policies.ExportPolicy = nil
	}

	// QuarantinePolicy
	if source.QuarantinePolicy != nil {
		var quarantinePolicy QuarantinePolicy
		err := quarantinePolicy.AssignProperties_From_QuarantinePolicy(source.QuarantinePolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_QuarantinePolicy() to populate field QuarantinePolicy")
		}
		policies.QuarantinePolicy = &quarantinePolicy
	} else {
		policies.QuarantinePolicy = nil
	}

	// RetentionPolicy
	if source.RetentionPolicy != nil {
		var retentionPolicy RetentionPolicy
		err := retentionPolicy.AssignProperties_From_RetentionPolicy(source.RetentionPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_RetentionPolicy() to populate field RetentionPolicy")
		}
		policies.RetentionPolicy = &retentionPolicy
	} else {
		policies.RetentionPolicy = nil
	}

	// TrustPolicy
	if source.TrustPolicy != nil {
		var trustPolicy TrustPolicy
		err := trustPolicy.AssignProperties_From_TrustPolicy(source.TrustPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_TrustPolicy() to populate field TrustPolicy")
		}
		policies.TrustPolicy = &trustPolicy
	} else {
		policies.TrustPolicy = nil
	}

	// No error
	return nil
}

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

	// ExportPolicy
	if policies.ExportPolicy != nil {
		var exportPolicy storage.ExportPolicy
		err := policies.ExportPolicy.AssignProperties_To_ExportPolicy(&exportPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ExportPolicy() to populate field ExportPolicy")
		}
		destination.ExportPolicy = &exportPolicy
	} else {
		destination.ExportPolicy = nil
	}

	// QuarantinePolicy
	if policies.QuarantinePolicy != nil {
		var quarantinePolicy storage.QuarantinePolicy
		err := policies.QuarantinePolicy.AssignProperties_To_QuarantinePolicy(&quarantinePolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_QuarantinePolicy() to populate field QuarantinePolicy")
		}
		destination.QuarantinePolicy = &quarantinePolicy
	} else {
		destination.QuarantinePolicy = nil
	}

	// RetentionPolicy
	if policies.RetentionPolicy != nil {
		var retentionPolicy storage.RetentionPolicy
		err := policies.RetentionPolicy.AssignProperties_To_RetentionPolicy(&retentionPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_RetentionPolicy() to populate field RetentionPolicy")
		}
		destination.RetentionPolicy = &retentionPolicy
	} else {
		destination.RetentionPolicy = nil
	}

	// TrustPolicy
	if policies.TrustPolicy != nil {
		var trustPolicy storage.TrustPolicy
		err := policies.TrustPolicy.AssignProperties_To_TrustPolicy(&trustPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_TrustPolicy() to populate field TrustPolicy")
		}
		destination.TrustPolicy = &trustPolicy
	} else {
		destination.TrustPolicy = nil
	}

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

	// No error
	return nil
}

// Initialize_From_Policies_STATUS populates our Policies from the provided source Policies_STATUS
func (policies *Policies) Initialize_From_Policies_STATUS(source *Policies_STATUS) error {

	// ExportPolicy
	if source.ExportPolicy != nil {
		var exportPolicy ExportPolicy
		err := exportPolicy.Initialize_From_ExportPolicy_STATUS(source.ExportPolicy)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_ExportPolicy_STATUS() to populate field ExportPolicy")
		}
		policies.ExportPolicy = &exportPolicy
	} else {
		policies.ExportPolicy = nil
	}

	// QuarantinePolicy
	if source.QuarantinePolicy != nil {
		var quarantinePolicy QuarantinePolicy
		err := quarantinePolicy.Initialize_From_QuarantinePolicy_STATUS(source.QuarantinePolicy)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_QuarantinePolicy_STATUS() to populate field QuarantinePolicy")
		}
		policies.QuarantinePolicy = &quarantinePolicy
	} else {
		policies.QuarantinePolicy = nil
	}

	// RetentionPolicy
	if source.RetentionPolicy != nil {
		var retentionPolicy RetentionPolicy
		err := retentionPolicy.Initialize_From_RetentionPolicy_STATUS(source.RetentionPolicy)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_RetentionPolicy_STATUS() to populate field RetentionPolicy")
		}
		policies.RetentionPolicy = &retentionPolicy
	} else {
		policies.RetentionPolicy = nil
	}

	// TrustPolicy
	if source.TrustPolicy != nil {
		var trustPolicy TrustPolicy
		err := trustPolicy.Initialize_From_TrustPolicy_STATUS(source.TrustPolicy)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_TrustPolicy_STATUS() to populate field TrustPolicy")
		}
		policies.TrustPolicy = &trustPolicy
	} else {
		policies.TrustPolicy = nil
	}

	// No error
	return nil
}

// The policies for a container registry.
type Policies_STATUS struct {
	// ExportPolicy: The export policy for a container registry.
	ExportPolicy *ExportPolicy_STATUS `json:"exportPolicy,omitempty"`

	// QuarantinePolicy: The quarantine policy for a container registry.
	QuarantinePolicy *QuarantinePolicy_STATUS `json:"quarantinePolicy,omitempty"`

	// RetentionPolicy: The retention policy for a container registry.
	RetentionPolicy *RetentionPolicy_STATUS `json:"retentionPolicy,omitempty"`

	// TrustPolicy: The content trust policy for a container registry.
	TrustPolicy *TrustPolicy_STATUS `json:"trustPolicy,omitempty"`
}

var _ genruntime.FromARMConverter = &Policies_STATUS{}

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

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

	// Set property "ExportPolicy":
	if typedInput.ExportPolicy != nil {
		var exportPolicy1 ExportPolicy_STATUS
		err := exportPolicy1.PopulateFromARM(owner, *typedInput.ExportPolicy)
		if err != nil {
			return err
		}
		exportPolicy := exportPolicy1
		policies.ExportPolicy = &exportPolicy
	}

	// Set property "QuarantinePolicy":
	if typedInput.QuarantinePolicy != nil {
		var quarantinePolicy1 QuarantinePolicy_STATUS
		err := quarantinePolicy1.PopulateFromARM(owner, *typedInput.QuarantinePolicy)
		if err != nil {
			return err
		}
		quarantinePolicy := quarantinePolicy1
		policies.QuarantinePolicy = &quarantinePolicy
	}

	// Set property "RetentionPolicy":
	if typedInput.RetentionPolicy != nil {
		var retentionPolicy1 RetentionPolicy_STATUS
		err := retentionPolicy1.PopulateFromARM(owner, *typedInput.RetentionPolicy)
		if err != nil {
			return err
		}
		retentionPolicy := retentionPolicy1
		policies.RetentionPolicy = &retentionPolicy
	}

	// Set property "TrustPolicy":
	if typedInput.TrustPolicy != nil {
		var trustPolicy1 TrustPolicy_STATUS
		err := trustPolicy1.PopulateFromARM(owner, *typedInput.TrustPolicy)
		if err != nil {
			return err
		}
		trustPolicy := trustPolicy1
		policies.TrustPolicy = &trustPolicy
	}

	// No error
	return nil
}

// AssignProperties_From_Policies_STATUS populates our Policies_STATUS from the provided source Policies_STATUS
func (policies *Policies_STATUS) AssignProperties_From_Policies_STATUS(source *storage.Policies_STATUS) error {

	// ExportPolicy
	if source.ExportPolicy != nil {
		var exportPolicy ExportPolicy_STATUS
		err := exportPolicy.AssignProperties_From_ExportPolicy_STATUS(source.ExportPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ExportPolicy_STATUS() to populate field ExportPolicy")
		}
		policies.ExportPolicy = &exportPolicy
	} else {
		policies.ExportPolicy = nil
	}

	// QuarantinePolicy
	if source.QuarantinePolicy != nil {
		var quarantinePolicy QuarantinePolicy_STATUS
		err := quarantinePolicy.AssignProperties_From_QuarantinePolicy_STATUS(source.QuarantinePolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_QuarantinePolicy_STATUS() to populate field QuarantinePolicy")
		}
		policies.QuarantinePolicy = &quarantinePolicy
	} else {
		policies.QuarantinePolicy = nil
	}

	// RetentionPolicy
	if source.RetentionPolicy != nil {
		var retentionPolicy RetentionPolicy_STATUS
		err := retentionPolicy.AssignProperties_From_RetentionPolicy_STATUS(source.RetentionPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_RetentionPolicy_STATUS() to populate field RetentionPolicy")
		}
		policies.RetentionPolicy = &retentionPolicy
	} else {
		policies.RetentionPolicy = nil
	}

	// TrustPolicy
	if source.TrustPolicy != nil {
		var trustPolicy TrustPolicy_STATUS
		err := trustPolicy.AssignProperties_From_TrustPolicy_STATUS(source.TrustPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_TrustPolicy_STATUS() to populate field TrustPolicy")
		}
		policies.TrustPolicy = &trustPolicy
	} else {
		policies.TrustPolicy = nil
	}

	// No error
	return nil
}

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

	// ExportPolicy
	if policies.ExportPolicy != nil {
		var exportPolicy storage.ExportPolicy_STATUS
		err := policies.ExportPolicy.AssignProperties_To_ExportPolicy_STATUS(&exportPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ExportPolicy_STATUS() to populate field ExportPolicy")
		}
		destination.ExportPolicy = &exportPolicy
	} else {
		destination.ExportPolicy = nil
	}

	// QuarantinePolicy
	if policies.QuarantinePolicy != nil {
		var quarantinePolicy storage.QuarantinePolicy_STATUS
		err := policies.QuarantinePolicy.AssignProperties_To_QuarantinePolicy_STATUS(&quarantinePolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_QuarantinePolicy_STATUS() to populate field QuarantinePolicy")
		}
		destination.QuarantinePolicy = &quarantinePolicy
	} else {
		destination.QuarantinePolicy = nil
	}

	// RetentionPolicy
	if policies.RetentionPolicy != nil {
		var retentionPolicy storage.RetentionPolicy_STATUS
		err := policies.RetentionPolicy.AssignProperties_To_RetentionPolicy_STATUS(&retentionPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_RetentionPolicy_STATUS() to populate field RetentionPolicy")
		}
		destination.RetentionPolicy = &retentionPolicy
	} else {
		destination.RetentionPolicy = nil
	}

	// TrustPolicy
	if policies.TrustPolicy != nil {
		var trustPolicy storage.TrustPolicy_STATUS
		err := policies.TrustPolicy.AssignProperties_To_TrustPolicy_STATUS(&trustPolicy)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_TrustPolicy_STATUS() to populate field TrustPolicy")
		}
		destination.TrustPolicy = &trustPolicy
	} else {
		destination.TrustPolicy = nil
	}

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

	// No error
	return nil
}

// An object that represents a private endpoint connection for a container registry.
type PrivateEndpointConnection_STATUS struct {
	// Id: The resource ID.
	Id *string `json:"id,omitempty"`
}

var _ genruntime.FromARMConverter = &PrivateEndpointConnection_STATUS{}

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

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

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

	// No error
	return nil
}

// AssignProperties_From_PrivateEndpointConnection_STATUS populates our PrivateEndpointConnection_STATUS from the provided source PrivateEndpointConnection_STATUS
func (connection *PrivateEndpointConnection_STATUS) AssignProperties_From_PrivateEndpointConnection_STATUS(source *storage.PrivateEndpointConnection_STATUS) error {

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

	// No error
	return nil
}

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

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

	// 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 RegistryOperatorSpec 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_RegistryOperatorSpec populates our RegistryOperatorSpec from the provided source RegistryOperatorSpec
func (operator *RegistryOperatorSpec) AssignProperties_From_RegistryOperatorSpec(source *storage.RegistryOperatorSpec) 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_RegistryOperatorSpec populates the provided destination RegistryOperatorSpec from our RegistryOperatorSpec
func (operator *RegistryOperatorSpec) AssignProperties_To_RegistryOperatorSpec(destination *storage.RegistryOperatorSpec) error {
	// Create a new property bag
	propertyBag := genruntime.NewPropertyBag()

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

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

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

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"AzureServices","None"}
type RegistryProperties_NetworkRuleBypassOptions string

const (
	RegistryProperties_NetworkRuleBypassOptions_AzureServices = RegistryProperties_NetworkRuleBypassOptions("AzureServices")
	RegistryProperties_NetworkRuleBypassOptions_None          = RegistryProperties_NetworkRuleBypassOptions("None")
)

// Mapping from string to RegistryProperties_NetworkRuleBypassOptions
var registryProperties_NetworkRuleBypassOptions_Values = map[string]RegistryProperties_NetworkRuleBypassOptions{
	"azureservices": RegistryProperties_NetworkRuleBypassOptions_AzureServices,
	"none":          RegistryProperties_NetworkRuleBypassOptions_None,
}

type RegistryProperties_NetworkRuleBypassOptions_STATUS string

const (
	RegistryProperties_NetworkRuleBypassOptions_STATUS_AzureServices = RegistryProperties_NetworkRuleBypassOptions_STATUS("AzureServices")
	RegistryProperties_NetworkRuleBypassOptions_STATUS_None          = RegistryProperties_NetworkRuleBypassOptions_STATUS("None")
)

// Mapping from string to RegistryProperties_NetworkRuleBypassOptions_STATUS
var registryProperties_NetworkRuleBypassOptions_STATUS_Values = map[string]RegistryProperties_NetworkRuleBypassOptions_STATUS{
	"azureservices": RegistryProperties_NetworkRuleBypassOptions_STATUS_AzureServices,
	"none":          RegistryProperties_NetworkRuleBypassOptions_STATUS_None,
}

type RegistryProperties_ProvisioningState_STATUS string

const (
	RegistryProperties_ProvisioningState_STATUS_Canceled  = RegistryProperties_ProvisioningState_STATUS("Canceled")
	RegistryProperties_ProvisioningState_STATUS_Creating  = RegistryProperties_ProvisioningState_STATUS("Creating")
	RegistryProperties_ProvisioningState_STATUS_Deleting  = RegistryProperties_ProvisioningState_STATUS("Deleting")
	RegistryProperties_ProvisioningState_STATUS_Failed    = RegistryProperties_ProvisioningState_STATUS("Failed")
	RegistryProperties_ProvisioningState_STATUS_Succeeded = RegistryProperties_ProvisioningState_STATUS("Succeeded")
	RegistryProperties_ProvisioningState_STATUS_Updating  = RegistryProperties_ProvisioningState_STATUS("Updating")
)

// Mapping from string to RegistryProperties_ProvisioningState_STATUS
var registryProperties_ProvisioningState_STATUS_Values = map[string]RegistryProperties_ProvisioningState_STATUS{
	"canceled":  RegistryProperties_ProvisioningState_STATUS_Canceled,
	"creating":  RegistryProperties_ProvisioningState_STATUS_Creating,
	"deleting":  RegistryProperties_ProvisioningState_STATUS_Deleting,
	"failed":    RegistryProperties_ProvisioningState_STATUS_Failed,
	"succeeded": RegistryProperties_ProvisioningState_STATUS_Succeeded,
	"updating":  RegistryProperties_ProvisioningState_STATUS_Updating,
}

// +kubebuilder:validation:Enum={"Disabled","Enabled"}
type RegistryProperties_PublicNetworkAccess string

const (
	RegistryProperties_PublicNetworkAccess_Disabled = RegistryProperties_PublicNetworkAccess("Disabled")
	RegistryProperties_PublicNetworkAccess_Enabled  = RegistryProperties_PublicNetworkAccess("Enabled")
)

// Mapping from string to RegistryProperties_PublicNetworkAccess
var registryProperties_PublicNetworkAccess_Values = map[string]RegistryProperties_PublicNetworkAccess{
	"disabled": RegistryProperties_PublicNetworkAccess_Disabled,
	"enabled":  RegistryProperties_PublicNetworkAccess_Enabled,
}

type RegistryProperties_PublicNetworkAccess_STATUS string

const (
	RegistryProperties_PublicNetworkAccess_STATUS_Disabled = RegistryProperties_PublicNetworkAccess_STATUS("Disabled")
	RegistryProperties_PublicNetworkAccess_STATUS_Enabled  = RegistryProperties_PublicNetworkAccess_STATUS("Enabled")
)

// Mapping from string to RegistryProperties_PublicNetworkAccess_STATUS
var registryProperties_PublicNetworkAccess_STATUS_Values = map[string]RegistryProperties_PublicNetworkAccess_STATUS{
	"disabled": RegistryProperties_PublicNetworkAccess_STATUS_Disabled,
	"enabled":  RegistryProperties_PublicNetworkAccess_STATUS_Enabled,
}

// +kubebuilder:validation:Enum={"Disabled","Enabled"}
type RegistryProperties_ZoneRedundancy string

const (
	RegistryProperties_ZoneRedundancy_Disabled = RegistryProperties_ZoneRedundancy("Disabled")
	RegistryProperties_ZoneRedundancy_Enabled  = RegistryProperties_ZoneRedundancy("Enabled")
)

// Mapping from string to RegistryProperties_ZoneRedundancy
var registryProperties_ZoneRedundancy_Values = map[string]RegistryProperties_ZoneRedundancy{
	"disabled": RegistryProperties_ZoneRedundancy_Disabled,
	"enabled":  RegistryProperties_ZoneRedundancy_Enabled,
}

type RegistryProperties_ZoneRedundancy_STATUS string

const (
	RegistryProperties_ZoneRedundancy_STATUS_Disabled = RegistryProperties_ZoneRedundancy_STATUS("Disabled")
	RegistryProperties_ZoneRedundancy_STATUS_Enabled  = RegistryProperties_ZoneRedundancy_STATUS("Enabled")
)

// Mapping from string to RegistryProperties_ZoneRedundancy_STATUS
var registryProperties_ZoneRedundancy_STATUS_Values = map[string]RegistryProperties_ZoneRedundancy_STATUS{
	"disabled": RegistryProperties_ZoneRedundancy_STATUS_Disabled,
	"enabled":  RegistryProperties_ZoneRedundancy_STATUS_Enabled,
}

// The SKU of a container registry.
type Sku struct {
	// +kubebuilder:validation:Required
	// Name: The SKU name of the container registry. Required for registry creation.
	Name *Sku_Name `json:"name,omitempty"`
}

var _ genruntime.ARMTransformer = &Sku{}

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

	// Set property "Name":
	if sku.Name != nil {
		var temp string
		temp = string(*sku.Name)
		name := arm.Sku_Name(temp)
		result.Name = &name
	}
	return result, nil
}

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

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

	// Set property "Name":
	if typedInput.Name != nil {
		var temp string
		temp = string(*typedInput.Name)
		name := Sku_Name(temp)
		sku.Name = &name
	}

	// No error
	return nil
}

// AssignProperties_From_Sku populates our Sku from the provided source Sku
func (sku *Sku) AssignProperties_From_Sku(source *storage.Sku) error {

	// Name
	if source.Name != nil {
		name := *source.Name
		nameTemp := genruntime.ToEnum(name, sku_Name_Values)
		sku.Name = &nameTemp
	} else {
		sku.Name = nil
	}

	// No error
	return nil
}

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

	// Name
	if sku.Name != nil {
		name := string(*sku.Name)
		destination.Name = &name
	} else {
		destination.Name = nil
	}

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

	// No error
	return nil
}

// Initialize_From_Sku_STATUS populates our Sku from the provided source Sku_STATUS
func (sku *Sku) Initialize_From_Sku_STATUS(source *Sku_STATUS) error {

	// Name
	if source.Name != nil {
		name := genruntime.ToEnum(string(*source.Name), sku_Name_Values)
		sku.Name = &name
	} else {
		sku.Name = nil
	}

	// No error
	return nil
}

// The SKU of a container registry.
type Sku_STATUS struct {
	// Name: The SKU name of the container registry. Required for registry creation.
	Name *Sku_Name_STATUS `json:"name,omitempty"`

	// Tier: The SKU tier based on the SKU name.
	Tier *Sku_Tier_STATUS `json:"tier,omitempty"`
}

var _ genruntime.FromARMConverter = &Sku_STATUS{}

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

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

	// Set property "Name":
	if typedInput.Name != nil {
		var temp string
		temp = string(*typedInput.Name)
		name := Sku_Name_STATUS(temp)
		sku.Name = &name
	}

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

	// No error
	return nil
}

// AssignProperties_From_Sku_STATUS populates our Sku_STATUS from the provided source Sku_STATUS
func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *storage.Sku_STATUS) error {

	// Name
	if source.Name != nil {
		name := *source.Name
		nameTemp := genruntime.ToEnum(name, sku_Name_STATUS_Values)
		sku.Name = &nameTemp
	} else {
		sku.Name = nil
	}

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

	// No error
	return nil
}

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

	// Name
	if sku.Name != nil {
		name := string(*sku.Name)
		destination.Name = &name
	} else {
		destination.Name = nil
	}

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

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

	// No error
	return nil
}

// The status of an Azure resource at the time the operation was called.
type Status_STATUS struct {
	// DisplayStatus: The short label for the status.
	DisplayStatus *string `json:"displayStatus,omitempty"`

	// Message: The detailed message for the status, including alerts and error messages.
	Message *string `json:"message,omitempty"`

	// Timestamp: The timestamp when the status was changed to the current value.
	Timestamp *string `json:"timestamp,omitempty"`
}

var _ genruntime.FromARMConverter = &Status_STATUS{}

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

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

	// Set property "DisplayStatus":
	if typedInput.DisplayStatus != nil {
		displayStatus := *typedInput.DisplayStatus
		status.DisplayStatus = &displayStatus
	}

	// Set property "Message":
	if typedInput.Message != nil {
		message := *typedInput.Message
		status.Message = &message
	}

	// Set property "Timestamp":
	if typedInput.Timestamp != nil {
		timestamp := *typedInput.Timestamp
		status.Timestamp = &timestamp
	}

	// No error
	return nil
}

// AssignProperties_From_Status_STATUS populates our Status_STATUS from the provided source Status_STATUS
func (status *Status_STATUS) AssignProperties_From_Status_STATUS(source *storage.Status_STATUS) error {

	// DisplayStatus
	status.DisplayStatus = genruntime.ClonePointerToString(source.DisplayStatus)

	// Message
	status.Message = genruntime.ClonePointerToString(source.Message)

	// Timestamp
	status.Timestamp = genruntime.ClonePointerToString(source.Timestamp)

	// No error
	return nil
}

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

	// DisplayStatus
	destination.DisplayStatus = genruntime.ClonePointerToString(status.DisplayStatus)

	// Message
	destination.Message = genruntime.ClonePointerToString(status.Message)

	// Timestamp
	destination.Timestamp = genruntime.ClonePointerToString(status.Timestamp)

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

	// No error
	return nil
}

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

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

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

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

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

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

var _ genruntime.FromARMConverter = &SystemData_STATUS{}

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

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

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

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

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

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

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

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

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"disabled","enabled"}
type EncryptionProperty_Status string

const (
	EncryptionProperty_Status_Disabled = EncryptionProperty_Status("disabled")
	EncryptionProperty_Status_Enabled  = EncryptionProperty_Status("enabled")
)

// Mapping from string to EncryptionProperty_Status
var encryptionProperty_Status_Values = map[string]EncryptionProperty_Status{
	"disabled": EncryptionProperty_Status_Disabled,
	"enabled":  EncryptionProperty_Status_Enabled,
}

type EncryptionProperty_Status_STATUS string

const (
	EncryptionProperty_Status_STATUS_Disabled = EncryptionProperty_Status_STATUS("disabled")
	EncryptionProperty_Status_STATUS_Enabled  = EncryptionProperty_Status_STATUS("enabled")
)

// Mapping from string to EncryptionProperty_Status_STATUS
var encryptionProperty_Status_STATUS_Values = map[string]EncryptionProperty_Status_STATUS{
	"disabled": EncryptionProperty_Status_STATUS_Disabled,
	"enabled":  EncryptionProperty_Status_STATUS_Enabled,
}

// The export policy for a container registry.
type ExportPolicy struct {
	// Status: The value that indicates whether the policy is enabled or not.
	Status *ExportPolicy_Status `json:"status,omitempty"`
}

var _ genruntime.ARMTransformer = &ExportPolicy{}

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

	// Set property "Status":
	if policy.Status != nil {
		var temp string
		temp = string(*policy.Status)
		status := arm.ExportPolicy_Status(temp)
		result.Status = &status
	}
	return result, nil
}

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

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

	// Set property "Status":
	if typedInput.Status != nil {
		var temp string
		temp = string(*typedInput.Status)
		status := ExportPolicy_Status(temp)
		policy.Status = &status
	}

	// No error
	return nil
}

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

	// Status
	if source.Status != nil {
		status := *source.Status
		statusTemp := genruntime.ToEnum(status, exportPolicy_Status_Values)
		policy.Status = &statusTemp
	} else {
		policy.Status = nil
	}

	// No error
	return nil
}

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

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

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

	// No error
	return nil
}

// Initialize_From_ExportPolicy_STATUS populates our ExportPolicy from the provided source ExportPolicy_STATUS
func (policy *ExportPolicy) Initialize_From_ExportPolicy_STATUS(source *ExportPolicy_STATUS) error {

	// Status
	if source.Status != nil {
		status := genruntime.ToEnum(string(*source.Status), exportPolicy_Status_Values)
		policy.Status = &status
	} else {
		policy.Status = nil
	}

	// No error
	return nil
}

// The export policy for a container registry.
type ExportPolicy_STATUS struct {
	// Status: The value that indicates whether the policy is enabled or not.
	Status *ExportPolicy_Status_STATUS `json:"status,omitempty"`
}

var _ genruntime.FromARMConverter = &ExportPolicy_STATUS{}

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

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

	// Set property "Status":
	if typedInput.Status != nil {
		var temp string
		temp = string(*typedInput.Status)
		status := ExportPolicy_Status_STATUS(temp)
		policy.Status = &status
	}

	// No error
	return nil
}

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

	// Status
	if source.Status != nil {
		status := *source.Status
		statusTemp := genruntime.ToEnum(status, exportPolicy_Status_STATUS_Values)
		policy.Status = &statusTemp
	} else {
		policy.Status = nil
	}

	// No error
	return nil
}

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

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

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

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"None","SystemAssigned","SystemAssigned, UserAssigned","UserAssigned"}
type IdentityProperties_Type string

const (
	IdentityProperties_Type_None                       = IdentityProperties_Type("None")
	IdentityProperties_Type_SystemAssigned             = IdentityProperties_Type("SystemAssigned")
	IdentityProperties_Type_SystemAssignedUserAssigned = IdentityProperties_Type("SystemAssigned, UserAssigned")
	IdentityProperties_Type_UserAssigned               = IdentityProperties_Type("UserAssigned")
)

// Mapping from string to IdentityProperties_Type
var identityProperties_Type_Values = map[string]IdentityProperties_Type{
	"none":                         IdentityProperties_Type_None,
	"systemassigned":               IdentityProperties_Type_SystemAssigned,
	"systemassigned, userassigned": IdentityProperties_Type_SystemAssignedUserAssigned,
	"userassigned":                 IdentityProperties_Type_UserAssigned,
}

type IdentityProperties_Type_STATUS string

const (
	IdentityProperties_Type_STATUS_None                       = IdentityProperties_Type_STATUS("None")
	IdentityProperties_Type_STATUS_SystemAssigned             = IdentityProperties_Type_STATUS("SystemAssigned")
	IdentityProperties_Type_STATUS_SystemAssignedUserAssigned = IdentityProperties_Type_STATUS("SystemAssigned, UserAssigned")
	IdentityProperties_Type_STATUS_UserAssigned               = IdentityProperties_Type_STATUS("UserAssigned")
)

// Mapping from string to IdentityProperties_Type_STATUS
var identityProperties_Type_STATUS_Values = map[string]IdentityProperties_Type_STATUS{
	"none":                         IdentityProperties_Type_STATUS_None,
	"systemassigned":               IdentityProperties_Type_STATUS_SystemAssigned,
	"systemassigned, userassigned": IdentityProperties_Type_STATUS_SystemAssignedUserAssigned,
	"userassigned":                 IdentityProperties_Type_STATUS_UserAssigned,
}

// IP rule with specific IP or IP range in CIDR format.
type IPRule struct {
	// Action: The action of IP ACL rule.
	Action *IPRule_Action `json:"action,omitempty"`

	// +kubebuilder:validation:Required
	// Value: Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
	Value *string `json:"value,omitempty"`
}

var _ genruntime.ARMTransformer = &IPRule{}

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

	// Set property "Action":
	if rule.Action != nil {
		var temp string
		temp = string(*rule.Action)
		action := arm.IPRule_Action(temp)
		result.Action = &action
	}

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

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

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

	// Set property "Action":
	if typedInput.Action != nil {
		var temp string
		temp = string(*typedInput.Action)
		action := IPRule_Action(temp)
		rule.Action = &action
	}

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

	// No error
	return nil
}

// AssignProperties_From_IPRule populates our IPRule from the provided source IPRule
func (rule *IPRule) AssignProperties_From_IPRule(source *storage.IPRule) error {

	// Action
	if source.Action != nil {
		action := *source.Action
		actionTemp := genruntime.ToEnum(action, iPRule_Action_Values)
		rule.Action = &actionTemp
	} else {
		rule.Action = nil
	}

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

	// No error
	return nil
}

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

	// Action
	if rule.Action != nil {
		action := string(*rule.Action)
		destination.Action = &action
	} else {
		destination.Action = nil
	}

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

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

	// No error
	return nil
}

// Initialize_From_IPRule_STATUS populates our IPRule from the provided source IPRule_STATUS
func (rule *IPRule) Initialize_From_IPRule_STATUS(source *IPRule_STATUS) error {

	// Action
	if source.Action != nil {
		action := genruntime.ToEnum(string(*source.Action), iPRule_Action_Values)
		rule.Action = &action
	} else {
		rule.Action = nil
	}

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

	// No error
	return nil
}

// IP rule with specific IP or IP range in CIDR format.
type IPRule_STATUS struct {
	// Action: The action of IP ACL rule.
	Action *IPRule_Action_STATUS `json:"action,omitempty"`

	// Value: Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
	Value *string `json:"value,omitempty"`
}

var _ genruntime.FromARMConverter = &IPRule_STATUS{}

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

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

	// Set property "Action":
	if typedInput.Action != nil {
		var temp string
		temp = string(*typedInput.Action)
		action := IPRule_Action_STATUS(temp)
		rule.Action = &action
	}

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

	// No error
	return nil
}

// AssignProperties_From_IPRule_STATUS populates our IPRule_STATUS from the provided source IPRule_STATUS
func (rule *IPRule_STATUS) AssignProperties_From_IPRule_STATUS(source *storage.IPRule_STATUS) error {

	// Action
	if source.Action != nil {
		action := *source.Action
		actionTemp := genruntime.ToEnum(action, iPRule_Action_STATUS_Values)
		rule.Action = &actionTemp
	} else {
		rule.Action = nil
	}

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

	// No error
	return nil
}

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

	// Action
	if rule.Action != nil {
		action := string(*rule.Action)
		destination.Action = &action
	} else {
		destination.Action = nil
	}

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

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

	// No error
	return nil
}

type KeyVaultProperties struct {
	// Identity: The client id of the identity which will be used to access key vault.
	Identity *string `json:"identity,omitempty" optionalConfigMapPair:"Identity"`

	// IdentityFromConfig: The client id of the identity which will be used to access key vault.
	IdentityFromConfig *genruntime.ConfigMapReference `json:"identityFromConfig,omitempty" optionalConfigMapPair:"Identity"`

	// KeyIdentifier: Key vault uri to access the encryption key.
	KeyIdentifier *string `json:"keyIdentifier,omitempty"`
}

var _ genruntime.ARMTransformer = &KeyVaultProperties{}

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

	// Set property "Identity":
	if properties.Identity != nil {
		identity := *properties.Identity
		result.Identity = &identity
	}
	if properties.IdentityFromConfig != nil {
		identityValue, err := resolved.ResolvedConfigMaps.Lookup(*properties.IdentityFromConfig)
		if err != nil {
			return nil, eris.Wrap(err, "looking up configmap for property Identity")
		}
		identity := identityValue
		result.Identity = &identity
	}

	// Set property "KeyIdentifier":
	if properties.KeyIdentifier != nil {
		keyIdentifier := *properties.KeyIdentifier
		result.KeyIdentifier = &keyIdentifier
	}
	return result, nil
}

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

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

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

	// no assignment for property "IdentityFromConfig"

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

	// No error
	return nil
}

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

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

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

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

	// No error
	return nil
}

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

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

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

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

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

	// No error
	return nil
}

// Initialize_From_KeyVaultProperties_STATUS populates our KeyVaultProperties from the provided source KeyVaultProperties_STATUS
func (properties *KeyVaultProperties) Initialize_From_KeyVaultProperties_STATUS(source *KeyVaultProperties_STATUS) error {

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

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

	// No error
	return nil
}

type KeyVaultProperties_STATUS struct {
	// Identity: The client id of the identity which will be used to access key vault.
	Identity *string `json:"identity,omitempty"`

	// KeyIdentifier: Key vault uri to access the encryption key.
	KeyIdentifier *string `json:"keyIdentifier,omitempty"`

	// KeyRotationEnabled: Auto key rotation status for a CMK enabled registry.
	KeyRotationEnabled *bool `json:"keyRotationEnabled,omitempty"`

	// LastKeyRotationTimestamp: Timestamp of the last successful key rotation.
	LastKeyRotationTimestamp *string `json:"lastKeyRotationTimestamp,omitempty"`

	// VersionedKeyIdentifier: The fully qualified key identifier that includes the version of the key that is actually used
	// for encryption.
	VersionedKeyIdentifier *string `json:"versionedKeyIdentifier,omitempty"`
}

var _ genruntime.FromARMConverter = &KeyVaultProperties_STATUS{}

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

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

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

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

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

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

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

	// No error
	return nil
}

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

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

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

	// KeyRotationEnabled
	if source.KeyRotationEnabled != nil {
		keyRotationEnabled := *source.KeyRotationEnabled
		properties.KeyRotationEnabled = &keyRotationEnabled
	} else {
		properties.KeyRotationEnabled = nil
	}

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

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

	// No error
	return nil
}

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

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

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

	// KeyRotationEnabled
	if properties.KeyRotationEnabled != nil {
		keyRotationEnabled := *properties.KeyRotationEnabled
		destination.KeyRotationEnabled = &keyRotationEnabled
	} else {
		destination.KeyRotationEnabled = nil
	}

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

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

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

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"Allow","Deny"}
type NetworkRuleSet_DefaultAction string

const (
	NetworkRuleSet_DefaultAction_Allow = NetworkRuleSet_DefaultAction("Allow")
	NetworkRuleSet_DefaultAction_Deny  = NetworkRuleSet_DefaultAction("Deny")
)

// Mapping from string to NetworkRuleSet_DefaultAction
var networkRuleSet_DefaultAction_Values = map[string]NetworkRuleSet_DefaultAction{
	"allow": NetworkRuleSet_DefaultAction_Allow,
	"deny":  NetworkRuleSet_DefaultAction_Deny,
}

type NetworkRuleSet_DefaultAction_STATUS string

const (
	NetworkRuleSet_DefaultAction_STATUS_Allow = NetworkRuleSet_DefaultAction_STATUS("Allow")
	NetworkRuleSet_DefaultAction_STATUS_Deny  = NetworkRuleSet_DefaultAction_STATUS("Deny")
)

// Mapping from string to NetworkRuleSet_DefaultAction_STATUS
var networkRuleSet_DefaultAction_STATUS_Values = map[string]NetworkRuleSet_DefaultAction_STATUS{
	"allow": NetworkRuleSet_DefaultAction_STATUS_Allow,
	"deny":  NetworkRuleSet_DefaultAction_STATUS_Deny,
}

// The quarantine policy for a container registry.
type QuarantinePolicy struct {
	// Status: The value that indicates whether the policy is enabled or not.
	Status *QuarantinePolicy_Status `json:"status,omitempty"`
}

var _ genruntime.ARMTransformer = &QuarantinePolicy{}

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

	// Set property "Status":
	if policy.Status != nil {
		var temp string
		temp = string(*policy.Status)
		status := arm.QuarantinePolicy_Status(temp)
		result.Status = &status
	}
	return result, nil
}

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

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

	// Set property "Status":
	if typedInput.Status != nil {
		var temp string
		temp = string(*typedInput.Status)
		status := QuarantinePolicy_Status(temp)
		policy.Status = &status
	}

	// No error
	return nil
}

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

	// Status
	if source.Status != nil {
		status := *source.Status
		statusTemp := genruntime.ToEnum(status, quarantinePolicy_Status_Values)
		policy.Status = &statusTemp
	} else {
		policy.Status = nil
	}

	// No error
	return nil
}

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

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

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

	// No error
	return nil
}

// Initialize_From_QuarantinePolicy_STATUS populates our QuarantinePolicy from the provided source QuarantinePolicy_STATUS
func (policy *QuarantinePolicy) Initialize_From_QuarantinePolicy_STATUS(source *QuarantinePolicy_STATUS) error {

	// Status
	if source.Status != nil {
		status := genruntime.ToEnum(string(*source.Status), quarantinePolicy_Status_Values)
		policy.Status = &status
	} else {
		policy.Status = nil
	}

	// No error
	return nil
}

// The quarantine policy for a container registry.
type QuarantinePolicy_STATUS struct {
	// Status: The value that indicates whether the policy is enabled or not.
	Status *QuarantinePolicy_Status_STATUS `json:"status,omitempty"`
}

var _ genruntime.FromARMConverter = &QuarantinePolicy_STATUS{}

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

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

	// Set property "Status":
	if typedInput.Status != nil {
		var temp string
		temp = string(*typedInput.Status)
		status := QuarantinePolicy_Status_STATUS(temp)
		policy.Status = &status
	}

	// No error
	return nil
}

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

	// Status
	if source.Status != nil {
		status := *source.Status
		statusTemp := genruntime.ToEnum(status, quarantinePolicy_Status_STATUS_Values)
		policy.Status = &statusTemp
	} else {
		policy.Status = nil
	}

	// No error
	return nil
}

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

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

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

	// No error
	return nil
}

// The retention policy for a container registry.
type RetentionPolicy struct {
	// Days: The number of days to retain an untagged manifest after which it gets purged.
	Days *int `json:"days,omitempty"`

	// Status: The value that indicates whether the policy is enabled or not.
	Status *RetentionPolicy_Status `json:"status,omitempty"`
}

var _ genruntime.ARMTransformer = &RetentionPolicy{}

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

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

	// Set property "Status":
	if policy.Status != nil {
		var temp string
		temp = string(*policy.Status)
		status := arm.RetentionPolicy_Status(temp)
		result.Status = &status
	}
	return result, nil
}

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

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

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

	// Set property "Status":
	if typedInput.Status != nil {
		var temp string
		temp = string(*typedInput.Status)
		status := RetentionPolicy_Status(temp)
		policy.Status = &status
	}

	// No error
	return nil
}

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

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

	// Status
	if source.Status != nil {
		status := *source.Status
		statusTemp := genruntime.ToEnum(status, retentionPolicy_Status_Values)
		policy.Status = &statusTemp
	} else {
		policy.Status = nil
	}

	// No error
	return nil
}

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

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

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

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

	// No error
	return nil
}

// Initialize_From_RetentionPolicy_STATUS populates our RetentionPolicy from the provided source RetentionPolicy_STATUS
func (policy *RetentionPolicy) Initialize_From_RetentionPolicy_STATUS(source *RetentionPolicy_STATUS) error {

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

	// Status
	if source.Status != nil {
		status := genruntime.ToEnum(string(*source.Status), retentionPolicy_Status_Values)
		policy.Status = &status
	} else {
		policy.Status = nil
	}

	// No error
	return nil
}

// The retention policy for a container registry.
type RetentionPolicy_STATUS struct {
	// Days: The number of days to retain an untagged manifest after which it gets purged.
	Days *int `json:"days,omitempty"`

	// LastUpdatedTime: The timestamp when the policy was last updated.
	LastUpdatedTime *string `json:"lastUpdatedTime,omitempty"`

	// Status: The value that indicates whether the policy is enabled or not.
	Status *RetentionPolicy_Status_STATUS `json:"status,omitempty"`
}

var _ genruntime.FromARMConverter = &RetentionPolicy_STATUS{}

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

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

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

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

	// Set property "Status":
	if typedInput.Status != nil {
		var temp string
		temp = string(*typedInput.Status)
		status := RetentionPolicy_Status_STATUS(temp)
		policy.Status = &status
	}

	// No error
	return nil
}

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

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

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

	// Status
	if source.Status != nil {
		status := *source.Status
		statusTemp := genruntime.ToEnum(status, retentionPolicy_Status_STATUS_Values)
		policy.Status = &statusTemp
	} else {
		policy.Status = nil
	}

	// No error
	return nil
}

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

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

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

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

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

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"Basic","Classic","Premium","Standard"}
type Sku_Name string

const (
	Sku_Name_Basic    = Sku_Name("Basic")
	Sku_Name_Classic  = Sku_Name("Classic")
	Sku_Name_Premium  = Sku_Name("Premium")
	Sku_Name_Standard = Sku_Name("Standard")
)

// Mapping from string to Sku_Name
var sku_Name_Values = map[string]Sku_Name{
	"basic":    Sku_Name_Basic,
	"classic":  Sku_Name_Classic,
	"premium":  Sku_Name_Premium,
	"standard": Sku_Name_Standard,
}

type Sku_Name_STATUS string

const (
	Sku_Name_STATUS_Basic    = Sku_Name_STATUS("Basic")
	Sku_Name_STATUS_Classic  = Sku_Name_STATUS("Classic")
	Sku_Name_STATUS_Premium  = Sku_Name_STATUS("Premium")
	Sku_Name_STATUS_Standard = Sku_Name_STATUS("Standard")
)

// Mapping from string to Sku_Name_STATUS
var sku_Name_STATUS_Values = map[string]Sku_Name_STATUS{
	"basic":    Sku_Name_STATUS_Basic,
	"classic":  Sku_Name_STATUS_Classic,
	"premium":  Sku_Name_STATUS_Premium,
	"standard": Sku_Name_STATUS_Standard,
}

type Sku_Tier_STATUS string

const (
	Sku_Tier_STATUS_Basic    = Sku_Tier_STATUS("Basic")
	Sku_Tier_STATUS_Classic  = Sku_Tier_STATUS("Classic")
	Sku_Tier_STATUS_Premium  = Sku_Tier_STATUS("Premium")
	Sku_Tier_STATUS_Standard = Sku_Tier_STATUS("Standard")
)

// Mapping from string to Sku_Tier_STATUS
var sku_Tier_STATUS_Values = map[string]Sku_Tier_STATUS{
	"basic":    Sku_Tier_STATUS_Basic,
	"classic":  Sku_Tier_STATUS_Classic,
	"premium":  Sku_Tier_STATUS_Premium,
	"standard": Sku_Tier_STATUS_Standard,
}

type SystemData_CreatedByType_STATUS string

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

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

type SystemData_LastModifiedByType_STATUS string

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

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

// The content trust policy for a container registry.
type TrustPolicy struct {
	// Status: The value that indicates whether the policy is enabled or not.
	Status *TrustPolicy_Status `json:"status,omitempty"`

	// Type: The type of trust policy.
	Type *TrustPolicy_Type `json:"type,omitempty"`
}

var _ genruntime.ARMTransformer = &TrustPolicy{}

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

	// Set property "Status":
	if policy.Status != nil {
		var temp string
		temp = string(*policy.Status)
		status := arm.TrustPolicy_Status(temp)
		result.Status = &status
	}

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

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

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

	// Set property "Status":
	if typedInput.Status != nil {
		var temp string
		temp = string(*typedInput.Status)
		status := TrustPolicy_Status(temp)
		policy.Status = &status
	}

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

	// No error
	return nil
}

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

	// Status
	if source.Status != nil {
		status := *source.Status
		statusTemp := genruntime.ToEnum(status, trustPolicy_Status_Values)
		policy.Status = &statusTemp
	} else {
		policy.Status = nil
	}

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

	// No error
	return nil
}

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

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

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

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

	// No error
	return nil
}

// Initialize_From_TrustPolicy_STATUS populates our TrustPolicy from the provided source TrustPolicy_STATUS
func (policy *TrustPolicy) Initialize_From_TrustPolicy_STATUS(source *TrustPolicy_STATUS) error {

	// Status
	if source.Status != nil {
		status := genruntime.ToEnum(string(*source.Status), trustPolicy_Status_Values)
		policy.Status = &status
	} else {
		policy.Status = nil
	}

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

	// No error
	return nil
}

// The content trust policy for a container registry.
type TrustPolicy_STATUS struct {
	// Status: The value that indicates whether the policy is enabled or not.
	Status *TrustPolicy_Status_STATUS `json:"status,omitempty"`

	// Type: The type of trust policy.
	Type *TrustPolicy_Type_STATUS `json:"type,omitempty"`
}

var _ genruntime.FromARMConverter = &TrustPolicy_STATUS{}

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

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

	// Set property "Status":
	if typedInput.Status != nil {
		var temp string
		temp = string(*typedInput.Status)
		status := TrustPolicy_Status_STATUS(temp)
		policy.Status = &status
	}

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

	// No error
	return nil
}

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

	// Status
	if source.Status != nil {
		status := *source.Status
		statusTemp := genruntime.ToEnum(status, trustPolicy_Status_STATUS_Values)
		policy.Status = &statusTemp
	} else {
		policy.Status = nil
	}

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

	// No error
	return nil
}

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

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

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

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

	// No error
	return nil
}

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

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

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

	// No error
	return nil
}

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

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

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

	// No error
	return nil
}

type UserIdentityProperties_STATUS struct {
	// ClientId: The client id of user assigned identity.
	ClientId *string `json:"clientId,omitempty"`

	// PrincipalId: The principal id of user assigned identity.
	PrincipalId *string `json:"principalId,omitempty"`
}

var _ genruntime.FromARMConverter = &UserIdentityProperties_STATUS{}

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

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

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

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

	// No error
	return nil
}

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

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

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

	// No error
	return nil
}

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

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

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

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

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"disabled","enabled"}
type ExportPolicy_Status string

const (
	ExportPolicy_Status_Disabled = ExportPolicy_Status("disabled")
	ExportPolicy_Status_Enabled  = ExportPolicy_Status("enabled")
)

// Mapping from string to ExportPolicy_Status
var exportPolicy_Status_Values = map[string]ExportPolicy_Status{
	"disabled": ExportPolicy_Status_Disabled,
	"enabled":  ExportPolicy_Status_Enabled,
}

type ExportPolicy_Status_STATUS string

const (
	ExportPolicy_Status_STATUS_Disabled = ExportPolicy_Status_STATUS("disabled")
	ExportPolicy_Status_STATUS_Enabled  = ExportPolicy_Status_STATUS("enabled")
)

// Mapping from string to ExportPolicy_Status_STATUS
var exportPolicy_Status_STATUS_Values = map[string]ExportPolicy_Status_STATUS{
	"disabled": ExportPolicy_Status_STATUS_Disabled,
	"enabled":  ExportPolicy_Status_STATUS_Enabled,
}

// +kubebuilder:validation:Enum={"Allow"}
type IPRule_Action string

const IPRule_Action_Allow = IPRule_Action("Allow")

// Mapping from string to IPRule_Action
var iPRule_Action_Values = map[string]IPRule_Action{
	"allow": IPRule_Action_Allow,
}

type IPRule_Action_STATUS string

const IPRule_Action_STATUS_Allow = IPRule_Action_STATUS("Allow")

// Mapping from string to IPRule_Action_STATUS
var iPRule_Action_STATUS_Values = map[string]IPRule_Action_STATUS{
	"allow": IPRule_Action_STATUS_Allow,
}

// +kubebuilder:validation:Enum={"disabled","enabled"}
type QuarantinePolicy_Status string

const (
	QuarantinePolicy_Status_Disabled = QuarantinePolicy_Status("disabled")
	QuarantinePolicy_Status_Enabled  = QuarantinePolicy_Status("enabled")
)

// Mapping from string to QuarantinePolicy_Status
var quarantinePolicy_Status_Values = map[string]QuarantinePolicy_Status{
	"disabled": QuarantinePolicy_Status_Disabled,
	"enabled":  QuarantinePolicy_Status_Enabled,
}

type QuarantinePolicy_Status_STATUS string

const (
	QuarantinePolicy_Status_STATUS_Disabled = QuarantinePolicy_Status_STATUS("disabled")
	QuarantinePolicy_Status_STATUS_Enabled  = QuarantinePolicy_Status_STATUS("enabled")
)

// Mapping from string to QuarantinePolicy_Status_STATUS
var quarantinePolicy_Status_STATUS_Values = map[string]QuarantinePolicy_Status_STATUS{
	"disabled": QuarantinePolicy_Status_STATUS_Disabled,
	"enabled":  QuarantinePolicy_Status_STATUS_Enabled,
}

// +kubebuilder:validation:Enum={"disabled","enabled"}
type RetentionPolicy_Status string

const (
	RetentionPolicy_Status_Disabled = RetentionPolicy_Status("disabled")
	RetentionPolicy_Status_Enabled  = RetentionPolicy_Status("enabled")
)

// Mapping from string to RetentionPolicy_Status
var retentionPolicy_Status_Values = map[string]RetentionPolicy_Status{
	"disabled": RetentionPolicy_Status_Disabled,
	"enabled":  RetentionPolicy_Status_Enabled,
}

type RetentionPolicy_Status_STATUS string

const (
	RetentionPolicy_Status_STATUS_Disabled = RetentionPolicy_Status_STATUS("disabled")
	RetentionPolicy_Status_STATUS_Enabled  = RetentionPolicy_Status_STATUS("enabled")
)

// Mapping from string to RetentionPolicy_Status_STATUS
var retentionPolicy_Status_STATUS_Values = map[string]RetentionPolicy_Status_STATUS{
	"disabled": RetentionPolicy_Status_STATUS_Disabled,
	"enabled":  RetentionPolicy_Status_STATUS_Enabled,
}

// +kubebuilder:validation:Enum={"disabled","enabled"}
type TrustPolicy_Status string

const (
	TrustPolicy_Status_Disabled = TrustPolicy_Status("disabled")
	TrustPolicy_Status_Enabled  = TrustPolicy_Status("enabled")
)

// Mapping from string to TrustPolicy_Status
var trustPolicy_Status_Values = map[string]TrustPolicy_Status{
	"disabled": TrustPolicy_Status_Disabled,
	"enabled":  TrustPolicy_Status_Enabled,
}

type TrustPolicy_Status_STATUS string

const (
	TrustPolicy_Status_STATUS_Disabled = TrustPolicy_Status_STATUS("disabled")
	TrustPolicy_Status_STATUS_Enabled  = TrustPolicy_Status_STATUS("enabled")
)

// Mapping from string to TrustPolicy_Status_STATUS
var trustPolicy_Status_STATUS_Values = map[string]TrustPolicy_Status_STATUS{
	"disabled": TrustPolicy_Status_STATUS_Disabled,
	"enabled":  TrustPolicy_Status_STATUS_Enabled,
}

// +kubebuilder:validation:Enum={"Notary"}
type TrustPolicy_Type string

const TrustPolicy_Type_Notary = TrustPolicy_Type("Notary")

// Mapping from string to TrustPolicy_Type
var trustPolicy_Type_Values = map[string]TrustPolicy_Type{
	"notary": TrustPolicy_Type_Notary,
}

type TrustPolicy_Type_STATUS string

const TrustPolicy_Type_STATUS_Notary = TrustPolicy_Type_STATUS("Notary")

// Mapping from string to TrustPolicy_Type_STATUS
var trustPolicy_Type_STATUS_Values = map[string]TrustPolicy_Type_STATUS{
	"notary": TrustPolicy_Type_STATUS_Notary,
}

func init() {
	SchemeBuilder.Register(&Registry{}, &RegistryList{})
}
