// 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/keyvault/v1api20230701/arm"
	storage "github.com/Azure/azure-service-operator/v2/api/keyvault/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,keyvault}
// +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: /keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/keyvault.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}
type Vault struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              Vault_Spec   `json:"spec,omitempty"`
	Status            Vault_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &Vault{}

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

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

var _ conversion.Convertible = &Vault{}

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

	return vault.AssignProperties_From_Vault(source)
}

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

	return vault.AssignProperties_To_Vault(destination)
}

var _ configmaps.Exporter = &Vault{}

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

var _ secrets.Exporter = &Vault{}

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

var _ genruntime.ImportableResource = &Vault{}

// InitializeSpec initializes the spec for this resource from the given status
func (vault *Vault) InitializeSpec(status genruntime.ConvertibleStatus) error {
	if s, ok := status.(*Vault_STATUS); ok {
		return vault.Spec.Initialize_From_Vault_STATUS(s)
	}

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

var _ genruntime.KubernetesResource = &Vault{}

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

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

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

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

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.KeyVault/vaults"
func (vault *Vault) GetType() string {
	return "Microsoft.KeyVault/vaults"
}

// NewEmptyStatus returns a new empty (blank) status
func (vault *Vault) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &Vault_STATUS{}
}

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

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

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

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

	vault.Status = st
	return nil
}

// AssignProperties_From_Vault populates our Vault from the provided source Vault
func (vault *Vault) AssignProperties_From_Vault(source *storage.Vault) error {

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

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

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

	// No error
	return nil
}

// AssignProperties_To_Vault populates the provided destination Vault from our Vault
func (vault *Vault) AssignProperties_To_Vault(destination *storage.Vault) error {

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

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

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

// +kubebuilder:object:root=true
// Generator information:
// - Generated from: /keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/keyvault.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}
type VaultList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Vault `json:"items"`
}

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

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

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

	// +kubebuilder:validation:Required
	// Location: The supported Azure location where the key vault should be created.
	Location *string `json:"location,omitempty"`

	// OperatorSpec: The specification for configuring operator behavior. This field is interpreted by the operator and not
	// passed directly to Azure
	OperatorSpec *VaultOperatorSpec `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"`

	// +kubebuilder:validation:Required
	// Properties: Properties of the vault
	Properties *VaultProperties `json:"properties,omitempty"`

	// Tags: The tags that will be assigned to the key vault.
	Tags map[string]string `json:"tags,omitempty"`
}

var _ genruntime.ARMTransformer = &Vault_Spec{}

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

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

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

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

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

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

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

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

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

	// no assignment for property "OperatorSpec"

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

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

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

	// No error
	return nil
}

var _ genruntime.ConvertibleSpec = &Vault_Spec{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.Vault_Spec{}
	err := vault.AssignProperties_To_Vault_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_Vault_Spec populates our Vault_Spec from the provided source Vault_Spec
func (vault *Vault_Spec) AssignProperties_From_Vault_Spec(source *storage.Vault_Spec) error {

	// AzureName
	vault.AzureName = source.AzureName

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

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

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

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

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

	// No error
	return nil
}

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

	// AzureName
	destination.AzureName = vault.AzureName

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

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

	// OriginalVersion
	destination.OriginalVersion = vault.OriginalVersion()

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

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

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

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

	// No error
	return nil
}

// Initialize_From_Vault_STATUS populates our Vault_Spec from the provided source Vault_STATUS
func (vault *Vault_Spec) Initialize_From_Vault_STATUS(source *Vault_STATUS) error {

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

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

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

	// No error
	return nil
}

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

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

// Resource information with extended details.
type Vault_STATUS struct {
	// Conditions: The observed state of the resource
	Conditions []conditions.Condition `json:"conditions,omitempty"`

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

	// Location: Azure location of the key vault resource.
	Location *string `json:"location,omitempty"`

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

	// Properties: Properties of the vault
	Properties *VaultProperties_STATUS `json:"properties,omitempty"`

	// SystemData: System metadata for the key vault.
	SystemData *SystemData_STATUS `json:"systemData,omitempty"`

	// Tags: Tags assigned to the key vault resource.
	Tags map[string]string `json:"tags,omitempty"`

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

var _ genruntime.ConvertibleStatus = &Vault_STATUS{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.Vault_STATUS{}
	err := vault.AssignProperties_To_Vault_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 = &Vault_STATUS{}

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

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

	// no assignment for property "Conditions"

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

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

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

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

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

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

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

	// No error
	return nil
}

// AssignProperties_From_Vault_STATUS populates our Vault_STATUS from the provided source Vault_STATUS
func (vault *Vault_STATUS) AssignProperties_From_Vault_STATUS(source *storage.Vault_STATUS) error {

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

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

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

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

	// Properties
	if source.Properties != nil {
		var property VaultProperties_STATUS
		err := property.AssignProperties_From_VaultProperties_STATUS(source.Properties)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_VaultProperties_STATUS() to populate field Properties")
		}
		vault.Properties = &property
	} else {
		vault.Properties = 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")
		}
		vault.SystemData = &systemDatum
	} else {
		vault.SystemData = nil
	}

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

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

	// No error
	return nil
}

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

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

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

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

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

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

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

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

	// 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 key vault resource.
type SystemData_STATUS struct {
	// CreatedAt: The timestamp of the key vault resource creation (UTC).
	CreatedAt *string `json:"createdAt,omitempty"`

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

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

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

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

	// LastModifiedByType: The type of identity that last modified the key vault resource.
	LastModifiedByType *IdentityType_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 := IdentityType_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 := IdentityType_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, identityType_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, identityType_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
}

// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure
type VaultOperatorSpec 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_VaultOperatorSpec populates our VaultOperatorSpec from the provided source VaultOperatorSpec
func (operator *VaultOperatorSpec) AssignProperties_From_VaultOperatorSpec(source *storage.VaultOperatorSpec) 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_VaultOperatorSpec populates the provided destination VaultOperatorSpec from our VaultOperatorSpec
func (operator *VaultOperatorSpec) AssignProperties_To_VaultOperatorSpec(destination *storage.VaultOperatorSpec) 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
}

// Properties of the vault
type VaultProperties struct {
	// AccessPolicies: An array of 0 to 1024 identities that have access to the key vault. All identities in the array must use
	// the same tenant ID as the key vault's tenant ID. When `createMode` is set to `recover`, access policies are not
	// required. Otherwise, access policies are required.
	AccessPolicies []AccessPolicyEntry `json:"accessPolicies,omitempty"`

	// CreateMode: The vault's create mode to indicate whether the vault need to be recovered or not.
	CreateMode *VaultProperties_CreateMode `json:"createMode,omitempty"`

	// EnablePurgeProtection: Property specifying whether protection against purge is enabled for this vault. Setting this
	// property to true activates protection against purge for this vault and its content - only the Key Vault service may
	// initiate a hard, irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling this
	// functionality is irreversible - that is, the property does not accept false as its value.
	EnablePurgeProtection *bool `json:"enablePurgeProtection,omitempty"`

	// EnableRbacAuthorization: Property that controls how data actions are authorized. When true, the key vault will use Role
	// Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties
	// will be  ignored. When false, the key vault will use the access policies specified in vault properties, and any policy
	// stored on Azure Resource Manager will be ignored. If null or not specified, the vault is created with the default value
	// of false. Note that management actions are always authorized with RBAC.
	EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty"`

	// EnableSoftDelete: Property to specify whether the 'soft delete' functionality is enabled for this key vault. If it's not
	// set to any value(true or false) when creating new key vault, it will be set to true by default. Once set to true, it
	// cannot be reverted to false.
	EnableSoftDelete *bool `json:"enableSoftDelete,omitempty"`

	// EnabledForDeployment: Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored
	// as secrets from the key vault.
	EnabledForDeployment *bool `json:"enabledForDeployment,omitempty"`

	// EnabledForDiskEncryption: Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the
	// vault and unwrap keys.
	EnabledForDiskEncryption *bool `json:"enabledForDiskEncryption,omitempty"`

	// EnabledForTemplateDeployment: Property to specify whether Azure Resource Manager is permitted to retrieve secrets from
	// the key vault.
	EnabledForTemplateDeployment *bool `json:"enabledForTemplateDeployment,omitempty"`

	// NetworkAcls: Rules governing the accessibility of the key vault from specific network locations.
	NetworkAcls *NetworkRuleSet `json:"networkAcls,omitempty"`

	// ProvisioningState: Provisioning state of the vault.
	ProvisioningState *VaultProperties_ProvisioningState `json:"provisioningState,omitempty"`

	// PublicNetworkAccess: Property to specify whether the vault will accept traffic from public internet. If set to
	// 'disabled' all traffic except private endpoint traffic and that that originates from trusted services will be blocked.
	// This will override the set firewall rules, meaning that even if the firewall rules are present we will not honor the
	// rules.
	PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"`

	// +kubebuilder:validation:Required
	// Sku: SKU details
	Sku *Sku `json:"sku,omitempty"`

	// SoftDeleteRetentionInDays: softDelete data retention days. It accepts >=7 and <=90.
	SoftDeleteRetentionInDays *int `json:"softDeleteRetentionInDays,omitempty"`

	// +kubebuilder:validation:Pattern="^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"
	// TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault.
	TenantId *string `json:"tenantId,omitempty" optionalConfigMapPair:"TenantId"`

	// TenantIdFromConfig: The Azure Active Directory tenant ID that should be used for authenticating requests to the key
	// vault.
	TenantIdFromConfig *genruntime.ConfigMapReference `json:"tenantIdFromConfig,omitempty" optionalConfigMapPair:"TenantId"`

	// VaultUri: The URI of the vault for performing operations on keys and secrets.
	VaultUri *string `json:"vaultUri,omitempty"`
}

var _ genruntime.ARMTransformer = &VaultProperties{}

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

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

	// Set property "CreateMode":
	if properties.CreateMode != nil {
		var temp string
		temp = string(*properties.CreateMode)
		createMode := arm.VaultProperties_CreateMode(temp)
		result.CreateMode = &createMode
	}

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

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

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

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

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

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

	// Set property "NetworkAcls":
	if properties.NetworkAcls != nil {
		networkAcls_ARM, err := properties.NetworkAcls.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		networkAcls := *networkAcls_ARM.(*arm.NetworkRuleSet)
		result.NetworkAcls = &networkAcls
	}

	// Set property "ProvisioningState":
	if properties.ProvisioningState != nil {
		var temp string
		temp = string(*properties.ProvisioningState)
		provisioningState := arm.VaultProperties_ProvisioningState(temp)
		result.ProvisioningState = &provisioningState
	}

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

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

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

	// Set property "TenantId":
	if properties.TenantId != nil {
		tenantId := *properties.TenantId
		result.TenantId = &tenantId
	}
	if properties.TenantIdFromConfig != nil {
		tenantIdValue, err := resolved.ResolvedConfigMaps.Lookup(*properties.TenantIdFromConfig)
		if err != nil {
			return nil, eris.Wrap(err, "looking up configmap for property TenantId")
		}
		tenantId := tenantIdValue
		result.TenantId = &tenantId
	}

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

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

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

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

	// Set property "CreateMode":
	if typedInput.CreateMode != nil {
		var temp string
		temp = string(*typedInput.CreateMode)
		createMode := VaultProperties_CreateMode(temp)
		properties.CreateMode = &createMode
	}

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

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

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

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

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

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

	// Set property "NetworkAcls":
	if typedInput.NetworkAcls != nil {
		var networkAcls1 NetworkRuleSet
		err := networkAcls1.PopulateFromARM(owner, *typedInput.NetworkAcls)
		if err != nil {
			return err
		}
		networkAcls := networkAcls1
		properties.NetworkAcls = &networkAcls
	}

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

	// Set property "PublicNetworkAccess":
	if typedInput.PublicNetworkAccess != nil {
		publicNetworkAccess := *typedInput.PublicNetworkAccess
		properties.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
		properties.Sku = &sku
	}

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

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

	// no assignment for property "TenantIdFromConfig"

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

	// No error
	return nil
}

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

	// AccessPolicies
	if source.AccessPolicies != nil {
		accessPolicyList := make([]AccessPolicyEntry, len(source.AccessPolicies))
		for accessPolicyIndex, accessPolicyItem := range source.AccessPolicies {
			var accessPolicy AccessPolicyEntry
			err := accessPolicy.AssignProperties_From_AccessPolicyEntry(&accessPolicyItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_AccessPolicyEntry() to populate field AccessPolicies")
			}
			accessPolicyList[accessPolicyIndex] = accessPolicy
		}
		properties.AccessPolicies = accessPolicyList
	} else {
		properties.AccessPolicies = nil
	}

	// CreateMode
	if source.CreateMode != nil {
		createMode := *source.CreateMode
		createModeTemp := genruntime.ToEnum(createMode, vaultProperties_CreateMode_Values)
		properties.CreateMode = &createModeTemp
	} else {
		properties.CreateMode = nil
	}

	// EnablePurgeProtection
	if source.EnablePurgeProtection != nil {
		enablePurgeProtection := *source.EnablePurgeProtection
		properties.EnablePurgeProtection = &enablePurgeProtection
	} else {
		properties.EnablePurgeProtection = nil
	}

	// EnableRbacAuthorization
	if source.EnableRbacAuthorization != nil {
		enableRbacAuthorization := *source.EnableRbacAuthorization
		properties.EnableRbacAuthorization = &enableRbacAuthorization
	} else {
		properties.EnableRbacAuthorization = nil
	}

	// EnableSoftDelete
	if source.EnableSoftDelete != nil {
		enableSoftDelete := *source.EnableSoftDelete
		properties.EnableSoftDelete = &enableSoftDelete
	} else {
		properties.EnableSoftDelete = nil
	}

	// EnabledForDeployment
	if source.EnabledForDeployment != nil {
		enabledForDeployment := *source.EnabledForDeployment
		properties.EnabledForDeployment = &enabledForDeployment
	} else {
		properties.EnabledForDeployment = nil
	}

	// EnabledForDiskEncryption
	if source.EnabledForDiskEncryption != nil {
		enabledForDiskEncryption := *source.EnabledForDiskEncryption
		properties.EnabledForDiskEncryption = &enabledForDiskEncryption
	} else {
		properties.EnabledForDiskEncryption = nil
	}

	// EnabledForTemplateDeployment
	if source.EnabledForTemplateDeployment != nil {
		enabledForTemplateDeployment := *source.EnabledForTemplateDeployment
		properties.EnabledForTemplateDeployment = &enabledForTemplateDeployment
	} else {
		properties.EnabledForTemplateDeployment = nil
	}

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

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

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

	// 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")
		}
		properties.Sku = &sku
	} else {
		properties.Sku = nil
	}

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

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

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

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

	// No error
	return nil
}

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

	// AccessPolicies
	if properties.AccessPolicies != nil {
		accessPolicyList := make([]storage.AccessPolicyEntry, len(properties.AccessPolicies))
		for accessPolicyIndex, accessPolicyItem := range properties.AccessPolicies {
			var accessPolicy storage.AccessPolicyEntry
			err := accessPolicyItem.AssignProperties_To_AccessPolicyEntry(&accessPolicy)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_AccessPolicyEntry() to populate field AccessPolicies")
			}
			accessPolicyList[accessPolicyIndex] = accessPolicy
		}
		destination.AccessPolicies = accessPolicyList
	} else {
		destination.AccessPolicies = nil
	}

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

	// EnablePurgeProtection
	if properties.EnablePurgeProtection != nil {
		enablePurgeProtection := *properties.EnablePurgeProtection
		destination.EnablePurgeProtection = &enablePurgeProtection
	} else {
		destination.EnablePurgeProtection = nil
	}

	// EnableRbacAuthorization
	if properties.EnableRbacAuthorization != nil {
		enableRbacAuthorization := *properties.EnableRbacAuthorization
		destination.EnableRbacAuthorization = &enableRbacAuthorization
	} else {
		destination.EnableRbacAuthorization = nil
	}

	// EnableSoftDelete
	if properties.EnableSoftDelete != nil {
		enableSoftDelete := *properties.EnableSoftDelete
		destination.EnableSoftDelete = &enableSoftDelete
	} else {
		destination.EnableSoftDelete = nil
	}

	// EnabledForDeployment
	if properties.EnabledForDeployment != nil {
		enabledForDeployment := *properties.EnabledForDeployment
		destination.EnabledForDeployment = &enabledForDeployment
	} else {
		destination.EnabledForDeployment = nil
	}

	// EnabledForDiskEncryption
	if properties.EnabledForDiskEncryption != nil {
		enabledForDiskEncryption := *properties.EnabledForDiskEncryption
		destination.EnabledForDiskEncryption = &enabledForDiskEncryption
	} else {
		destination.EnabledForDiskEncryption = nil
	}

	// EnabledForTemplateDeployment
	if properties.EnabledForTemplateDeployment != nil {
		enabledForTemplateDeployment := *properties.EnabledForTemplateDeployment
		destination.EnabledForTemplateDeployment = &enabledForTemplateDeployment
	} else {
		destination.EnabledForTemplateDeployment = nil
	}

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

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

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

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

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

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

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

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

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

	// No error
	return nil
}

// Initialize_From_VaultProperties_STATUS populates our VaultProperties from the provided source VaultProperties_STATUS
func (properties *VaultProperties) Initialize_From_VaultProperties_STATUS(source *VaultProperties_STATUS) error {

	// AccessPolicies
	if source.AccessPolicies != nil {
		accessPolicyList := make([]AccessPolicyEntry, len(source.AccessPolicies))
		for accessPolicyIndex, accessPolicyItem := range source.AccessPolicies {
			var accessPolicy AccessPolicyEntry
			err := accessPolicy.Initialize_From_AccessPolicyEntry_STATUS(&accessPolicyItem)
			if err != nil {
				return eris.Wrap(err, "calling Initialize_From_AccessPolicyEntry_STATUS() to populate field AccessPolicies")
			}
			accessPolicyList[accessPolicyIndex] = accessPolicy
		}
		properties.AccessPolicies = accessPolicyList
	} else {
		properties.AccessPolicies = nil
	}

	// CreateMode
	if source.CreateMode != nil {
		createMode := genruntime.ToEnum(string(*source.CreateMode), vaultProperties_CreateMode_Values)
		properties.CreateMode = &createMode
	} else {
		properties.CreateMode = nil
	}

	// EnablePurgeProtection
	if source.EnablePurgeProtection != nil {
		enablePurgeProtection := *source.EnablePurgeProtection
		properties.EnablePurgeProtection = &enablePurgeProtection
	} else {
		properties.EnablePurgeProtection = nil
	}

	// EnableRbacAuthorization
	if source.EnableRbacAuthorization != nil {
		enableRbacAuthorization := *source.EnableRbacAuthorization
		properties.EnableRbacAuthorization = &enableRbacAuthorization
	} else {
		properties.EnableRbacAuthorization = nil
	}

	// EnableSoftDelete
	if source.EnableSoftDelete != nil {
		enableSoftDelete := *source.EnableSoftDelete
		properties.EnableSoftDelete = &enableSoftDelete
	} else {
		properties.EnableSoftDelete = nil
	}

	// EnabledForDeployment
	if source.EnabledForDeployment != nil {
		enabledForDeployment := *source.EnabledForDeployment
		properties.EnabledForDeployment = &enabledForDeployment
	} else {
		properties.EnabledForDeployment = nil
	}

	// EnabledForDiskEncryption
	if source.EnabledForDiskEncryption != nil {
		enabledForDiskEncryption := *source.EnabledForDiskEncryption
		properties.EnabledForDiskEncryption = &enabledForDiskEncryption
	} else {
		properties.EnabledForDiskEncryption = nil
	}

	// EnabledForTemplateDeployment
	if source.EnabledForTemplateDeployment != nil {
		enabledForTemplateDeployment := *source.EnabledForTemplateDeployment
		properties.EnabledForTemplateDeployment = &enabledForTemplateDeployment
	} else {
		properties.EnabledForTemplateDeployment = nil
	}

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

	// ProvisioningState
	if source.ProvisioningState != nil {
		provisioningState := genruntime.ToEnum(string(*source.ProvisioningState), vaultProperties_ProvisioningState_Values)
		properties.ProvisioningState = &provisioningState
	} else {
		properties.ProvisioningState = nil
	}

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

	// 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")
		}
		properties.Sku = &sku
	} else {
		properties.Sku = nil
	}

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

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

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

	// No error
	return nil
}

// Properties of the vault
type VaultProperties_STATUS struct {
	// AccessPolicies: An array of 0 to 1024 identities that have access to the key vault. All identities in the array must use
	// the same tenant ID as the key vault's tenant ID. When `createMode` is set to `recover`, access policies are not
	// required. Otherwise, access policies are required.
	AccessPolicies []AccessPolicyEntry_STATUS `json:"accessPolicies,omitempty"`

	// CreateMode: The vault's create mode to indicate whether the vault need to be recovered or not.
	CreateMode *VaultProperties_CreateMode_STATUS `json:"createMode,omitempty"`

	// EnablePurgeProtection: Property specifying whether protection against purge is enabled for this vault. Setting this
	// property to true activates protection against purge for this vault and its content - only the Key Vault service may
	// initiate a hard, irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling this
	// functionality is irreversible - that is, the property does not accept false as its value.
	EnablePurgeProtection *bool `json:"enablePurgeProtection,omitempty"`

	// EnableRbacAuthorization: Property that controls how data actions are authorized. When true, the key vault will use Role
	// Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties
	// will be  ignored. When false, the key vault will use the access policies specified in vault properties, and any policy
	// stored on Azure Resource Manager will be ignored. If null or not specified, the vault is created with the default value
	// of false. Note that management actions are always authorized with RBAC.
	EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty"`

	// EnableSoftDelete: Property to specify whether the 'soft delete' functionality is enabled for this key vault. If it's not
	// set to any value(true or false) when creating new key vault, it will be set to true by default. Once set to true, it
	// cannot be reverted to false.
	EnableSoftDelete *bool `json:"enableSoftDelete,omitempty"`

	// EnabledForDeployment: Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored
	// as secrets from the key vault.
	EnabledForDeployment *bool `json:"enabledForDeployment,omitempty"`

	// EnabledForDiskEncryption: Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the
	// vault and unwrap keys.
	EnabledForDiskEncryption *bool `json:"enabledForDiskEncryption,omitempty"`

	// EnabledForTemplateDeployment: Property to specify whether Azure Resource Manager is permitted to retrieve secrets from
	// the key vault.
	EnabledForTemplateDeployment *bool `json:"enabledForTemplateDeployment,omitempty"`

	// HsmPoolResourceId: The resource id of HSM Pool.
	HsmPoolResourceId *string `json:"hsmPoolResourceId,omitempty"`

	// NetworkAcls: Rules governing the accessibility of the key vault from specific network locations.
	NetworkAcls *NetworkRuleSet_STATUS `json:"networkAcls,omitempty"`

	// PrivateEndpointConnections: List of private endpoint connections associated with the key vault.
	PrivateEndpointConnections []PrivateEndpointConnectionItem_STATUS `json:"privateEndpointConnections,omitempty"`

	// ProvisioningState: Provisioning state of the vault.
	ProvisioningState *VaultProperties_ProvisioningState_STATUS `json:"provisioningState,omitempty"`

	// PublicNetworkAccess: Property to specify whether the vault will accept traffic from public internet. If set to
	// 'disabled' all traffic except private endpoint traffic and that that originates from trusted services will be blocked.
	// This will override the set firewall rules, meaning that even if the firewall rules are present we will not honor the
	// rules.
	PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"`

	// Sku: SKU details
	Sku *Sku_STATUS `json:"sku,omitempty"`

	// SoftDeleteRetentionInDays: softDelete data retention days. It accepts >=7 and <=90.
	SoftDeleteRetentionInDays *int `json:"softDeleteRetentionInDays,omitempty"`

	// TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault.
	TenantId *string `json:"tenantId,omitempty"`

	// VaultUri: The URI of the vault for performing operations on keys and secrets.
	VaultUri *string `json:"vaultUri,omitempty"`
}

var _ genruntime.FromARMConverter = &VaultProperties_STATUS{}

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

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

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

	// Set property "CreateMode":
	if typedInput.CreateMode != nil {
		var temp string
		temp = string(*typedInput.CreateMode)
		createMode := VaultProperties_CreateMode_STATUS(temp)
		properties.CreateMode = &createMode
	}

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

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

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

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

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

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

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

	// Set property "NetworkAcls":
	if typedInput.NetworkAcls != nil {
		var networkAcls1 NetworkRuleSet_STATUS
		err := networkAcls1.PopulateFromARM(owner, *typedInput.NetworkAcls)
		if err != nil {
			return err
		}
		networkAcls := networkAcls1
		properties.NetworkAcls = &networkAcls
	}

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

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

	// Set property "PublicNetworkAccess":
	if typedInput.PublicNetworkAccess != nil {
		publicNetworkAccess := *typedInput.PublicNetworkAccess
		properties.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
		properties.Sku = &sku
	}

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

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

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

	// No error
	return nil
}

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

	// AccessPolicies
	if source.AccessPolicies != nil {
		accessPolicyList := make([]AccessPolicyEntry_STATUS, len(source.AccessPolicies))
		for accessPolicyIndex, accessPolicyItem := range source.AccessPolicies {
			var accessPolicy AccessPolicyEntry_STATUS
			err := accessPolicy.AssignProperties_From_AccessPolicyEntry_STATUS(&accessPolicyItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_AccessPolicyEntry_STATUS() to populate field AccessPolicies")
			}
			accessPolicyList[accessPolicyIndex] = accessPolicy
		}
		properties.AccessPolicies = accessPolicyList
	} else {
		properties.AccessPolicies = nil
	}

	// CreateMode
	if source.CreateMode != nil {
		createMode := *source.CreateMode
		createModeTemp := genruntime.ToEnum(createMode, vaultProperties_CreateMode_STATUS_Values)
		properties.CreateMode = &createModeTemp
	} else {
		properties.CreateMode = nil
	}

	// EnablePurgeProtection
	if source.EnablePurgeProtection != nil {
		enablePurgeProtection := *source.EnablePurgeProtection
		properties.EnablePurgeProtection = &enablePurgeProtection
	} else {
		properties.EnablePurgeProtection = nil
	}

	// EnableRbacAuthorization
	if source.EnableRbacAuthorization != nil {
		enableRbacAuthorization := *source.EnableRbacAuthorization
		properties.EnableRbacAuthorization = &enableRbacAuthorization
	} else {
		properties.EnableRbacAuthorization = nil
	}

	// EnableSoftDelete
	if source.EnableSoftDelete != nil {
		enableSoftDelete := *source.EnableSoftDelete
		properties.EnableSoftDelete = &enableSoftDelete
	} else {
		properties.EnableSoftDelete = nil
	}

	// EnabledForDeployment
	if source.EnabledForDeployment != nil {
		enabledForDeployment := *source.EnabledForDeployment
		properties.EnabledForDeployment = &enabledForDeployment
	} else {
		properties.EnabledForDeployment = nil
	}

	// EnabledForDiskEncryption
	if source.EnabledForDiskEncryption != nil {
		enabledForDiskEncryption := *source.EnabledForDiskEncryption
		properties.EnabledForDiskEncryption = &enabledForDiskEncryption
	} else {
		properties.EnabledForDiskEncryption = nil
	}

	// EnabledForTemplateDeployment
	if source.EnabledForTemplateDeployment != nil {
		enabledForTemplateDeployment := *source.EnabledForTemplateDeployment
		properties.EnabledForTemplateDeployment = &enabledForTemplateDeployment
	} else {
		properties.EnabledForTemplateDeployment = nil
	}

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

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

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

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

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

	// 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")
		}
		properties.Sku = &sku
	} else {
		properties.Sku = nil
	}

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

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

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

	// No error
	return nil
}

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

	// AccessPolicies
	if properties.AccessPolicies != nil {
		accessPolicyList := make([]storage.AccessPolicyEntry_STATUS, len(properties.AccessPolicies))
		for accessPolicyIndex, accessPolicyItem := range properties.AccessPolicies {
			var accessPolicy storage.AccessPolicyEntry_STATUS
			err := accessPolicyItem.AssignProperties_To_AccessPolicyEntry_STATUS(&accessPolicy)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_AccessPolicyEntry_STATUS() to populate field AccessPolicies")
			}
			accessPolicyList[accessPolicyIndex] = accessPolicy
		}
		destination.AccessPolicies = accessPolicyList
	} else {
		destination.AccessPolicies = nil
	}

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

	// EnablePurgeProtection
	if properties.EnablePurgeProtection != nil {
		enablePurgeProtection := *properties.EnablePurgeProtection
		destination.EnablePurgeProtection = &enablePurgeProtection
	} else {
		destination.EnablePurgeProtection = nil
	}

	// EnableRbacAuthorization
	if properties.EnableRbacAuthorization != nil {
		enableRbacAuthorization := *properties.EnableRbacAuthorization
		destination.EnableRbacAuthorization = &enableRbacAuthorization
	} else {
		destination.EnableRbacAuthorization = nil
	}

	// EnableSoftDelete
	if properties.EnableSoftDelete != nil {
		enableSoftDelete := *properties.EnableSoftDelete
		destination.EnableSoftDelete = &enableSoftDelete
	} else {
		destination.EnableSoftDelete = nil
	}

	// EnabledForDeployment
	if properties.EnabledForDeployment != nil {
		enabledForDeployment := *properties.EnabledForDeployment
		destination.EnabledForDeployment = &enabledForDeployment
	} else {
		destination.EnabledForDeployment = nil
	}

	// EnabledForDiskEncryption
	if properties.EnabledForDiskEncryption != nil {
		enabledForDiskEncryption := *properties.EnabledForDiskEncryption
		destination.EnabledForDiskEncryption = &enabledForDiskEncryption
	} else {
		destination.EnabledForDiskEncryption = nil
	}

	// EnabledForTemplateDeployment
	if properties.EnabledForTemplateDeployment != nil {
		enabledForTemplateDeployment := *properties.EnabledForTemplateDeployment
		destination.EnabledForTemplateDeployment = &enabledForTemplateDeployment
	} else {
		destination.EnabledForTemplateDeployment = nil
	}

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

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

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

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

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

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

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

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

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

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

	// No error
	return nil
}

// An identity that have access to the key vault. All identities in the array must use the same tenant ID as the key
// vault's tenant ID.
type AccessPolicyEntry struct {
	// +kubebuilder:validation:Pattern="^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"
	// ApplicationId:  Application ID of the client making request on behalf of a principal
	ApplicationId *string `json:"applicationId,omitempty" optionalConfigMapPair:"ApplicationId"`

	// ApplicationIdFromConfig:  Application ID of the client making request on behalf of a principal
	ApplicationIdFromConfig *genruntime.ConfigMapReference `json:"applicationIdFromConfig,omitempty" optionalConfigMapPair:"ApplicationId"`

	// ObjectId: The object ID of a user, service principal or security group in the Azure Active Directory tenant for the
	// vault. The object ID must be unique for the list of access policies.
	ObjectId *string `json:"objectId,omitempty" optionalConfigMapPair:"ObjectId"`

	// ObjectIdFromConfig: The object ID of a user, service principal or security group in the Azure Active Directory tenant
	// for the vault. The object ID must be unique for the list of access policies.
	ObjectIdFromConfig *genruntime.ConfigMapReference `json:"objectIdFromConfig,omitempty" optionalConfigMapPair:"ObjectId"`

	// +kubebuilder:validation:Required
	// Permissions: Permissions the identity has for keys, secrets and certificates.
	Permissions *Permissions `json:"permissions,omitempty"`

	// +kubebuilder:validation:Pattern="^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"
	// TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault.
	TenantId *string `json:"tenantId,omitempty" optionalConfigMapPair:"TenantId"`

	// TenantIdFromConfig: The Azure Active Directory tenant ID that should be used for authenticating requests to the key
	// vault.
	TenantIdFromConfig *genruntime.ConfigMapReference `json:"tenantIdFromConfig,omitempty" optionalConfigMapPair:"TenantId"`
}

var _ genruntime.ARMTransformer = &AccessPolicyEntry{}

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

	// Set property "ApplicationId":
	if entry.ApplicationId != nil {
		applicationId := *entry.ApplicationId
		result.ApplicationId = &applicationId
	}
	if entry.ApplicationIdFromConfig != nil {
		applicationIdValue, err := resolved.ResolvedConfigMaps.Lookup(*entry.ApplicationIdFromConfig)
		if err != nil {
			return nil, eris.Wrap(err, "looking up configmap for property ApplicationId")
		}
		applicationId := applicationIdValue
		result.ApplicationId = &applicationId
	}

	// Set property "ObjectId":
	if entry.ObjectId != nil {
		objectId := *entry.ObjectId
		result.ObjectId = &objectId
	}
	if entry.ObjectIdFromConfig != nil {
		objectIdValue, err := resolved.ResolvedConfigMaps.Lookup(*entry.ObjectIdFromConfig)
		if err != nil {
			return nil, eris.Wrap(err, "looking up configmap for property ObjectId")
		}
		objectId := objectIdValue
		result.ObjectId = &objectId
	}

	// Set property "Permissions":
	if entry.Permissions != nil {
		permissions_ARM, err := entry.Permissions.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		permissions := *permissions_ARM.(*arm.Permissions)
		result.Permissions = &permissions
	}

	// Set property "TenantId":
	if entry.TenantId != nil {
		tenantId := *entry.TenantId
		result.TenantId = &tenantId
	}
	if entry.TenantIdFromConfig != nil {
		tenantIdValue, err := resolved.ResolvedConfigMaps.Lookup(*entry.TenantIdFromConfig)
		if err != nil {
			return nil, eris.Wrap(err, "looking up configmap for property TenantId")
		}
		tenantId := tenantIdValue
		result.TenantId = &tenantId
	}
	return result, nil
}

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

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

	// Set property "ApplicationId":
	if typedInput.ApplicationId != nil {
		applicationId := *typedInput.ApplicationId
		entry.ApplicationId = &applicationId
	}

	// no assignment for property "ApplicationIdFromConfig"

	// Set property "ObjectId":
	if typedInput.ObjectId != nil {
		objectId := *typedInput.ObjectId
		entry.ObjectId = &objectId
	}

	// no assignment for property "ObjectIdFromConfig"

	// Set property "Permissions":
	if typedInput.Permissions != nil {
		var permissions1 Permissions
		err := permissions1.PopulateFromARM(owner, *typedInput.Permissions)
		if err != nil {
			return err
		}
		permissions := permissions1
		entry.Permissions = &permissions
	}

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

	// no assignment for property "TenantIdFromConfig"

	// No error
	return nil
}

// AssignProperties_From_AccessPolicyEntry populates our AccessPolicyEntry from the provided source AccessPolicyEntry
func (entry *AccessPolicyEntry) AssignProperties_From_AccessPolicyEntry(source *storage.AccessPolicyEntry) error {

	// ApplicationId
	entry.ApplicationId = genruntime.ClonePointerToString(source.ApplicationId)

	// ApplicationIdFromConfig
	if source.ApplicationIdFromConfig != nil {
		applicationIdFromConfig := source.ApplicationIdFromConfig.Copy()
		entry.ApplicationIdFromConfig = &applicationIdFromConfig
	} else {
		entry.ApplicationIdFromConfig = nil
	}

	// ObjectId
	entry.ObjectId = genruntime.ClonePointerToString(source.ObjectId)

	// ObjectIdFromConfig
	if source.ObjectIdFromConfig != nil {
		objectIdFromConfig := source.ObjectIdFromConfig.Copy()
		entry.ObjectIdFromConfig = &objectIdFromConfig
	} else {
		entry.ObjectIdFromConfig = nil
	}

	// Permissions
	if source.Permissions != nil {
		var permission Permissions
		err := permission.AssignProperties_From_Permissions(source.Permissions)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_Permissions() to populate field Permissions")
		}
		entry.Permissions = &permission
	} else {
		entry.Permissions = nil
	}

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

	// TenantIdFromConfig
	if source.TenantIdFromConfig != nil {
		tenantIdFromConfig := source.TenantIdFromConfig.Copy()
		entry.TenantIdFromConfig = &tenantIdFromConfig
	} else {
		entry.TenantIdFromConfig = nil
	}

	// No error
	return nil
}

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

	// ApplicationId
	destination.ApplicationId = genruntime.ClonePointerToString(entry.ApplicationId)

	// ApplicationIdFromConfig
	if entry.ApplicationIdFromConfig != nil {
		applicationIdFromConfig := entry.ApplicationIdFromConfig.Copy()
		destination.ApplicationIdFromConfig = &applicationIdFromConfig
	} else {
		destination.ApplicationIdFromConfig = nil
	}

	// ObjectId
	destination.ObjectId = genruntime.ClonePointerToString(entry.ObjectId)

	// ObjectIdFromConfig
	if entry.ObjectIdFromConfig != nil {
		objectIdFromConfig := entry.ObjectIdFromConfig.Copy()
		destination.ObjectIdFromConfig = &objectIdFromConfig
	} else {
		destination.ObjectIdFromConfig = nil
	}

	// Permissions
	if entry.Permissions != nil {
		var permission storage.Permissions
		err := entry.Permissions.AssignProperties_To_Permissions(&permission)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_Permissions() to populate field Permissions")
		}
		destination.Permissions = &permission
	} else {
		destination.Permissions = nil
	}

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

	// TenantIdFromConfig
	if entry.TenantIdFromConfig != nil {
		tenantIdFromConfig := entry.TenantIdFromConfig.Copy()
		destination.TenantIdFromConfig = &tenantIdFromConfig
	} else {
		destination.TenantIdFromConfig = nil
	}

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

	// No error
	return nil
}

// Initialize_From_AccessPolicyEntry_STATUS populates our AccessPolicyEntry from the provided source AccessPolicyEntry_STATUS
func (entry *AccessPolicyEntry) Initialize_From_AccessPolicyEntry_STATUS(source *AccessPolicyEntry_STATUS) error {

	// ApplicationId
	entry.ApplicationId = genruntime.ClonePointerToString(source.ApplicationId)

	// ObjectId
	entry.ObjectId = genruntime.ClonePointerToString(source.ObjectId)

	// Permissions
	if source.Permissions != nil {
		var permission Permissions
		err := permission.Initialize_From_Permissions_STATUS(source.Permissions)
		if err != nil {
			return eris.Wrap(err, "calling Initialize_From_Permissions_STATUS() to populate field Permissions")
		}
		entry.Permissions = &permission
	} else {
		entry.Permissions = nil
	}

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

	// No error
	return nil
}

// An identity that have access to the key vault. All identities in the array must use the same tenant ID as the key
// vault's tenant ID.
type AccessPolicyEntry_STATUS struct {
	// ApplicationId:  Application ID of the client making request on behalf of a principal
	ApplicationId *string `json:"applicationId,omitempty"`

	// ObjectId: The object ID of a user, service principal or security group in the Azure Active Directory tenant for the
	// vault. The object ID must be unique for the list of access policies.
	ObjectId *string `json:"objectId,omitempty"`

	// Permissions: Permissions the identity has for keys, secrets and certificates.
	Permissions *Permissions_STATUS `json:"permissions,omitempty"`

	// TenantId: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault.
	TenantId *string `json:"tenantId,omitempty"`
}

var _ genruntime.FromARMConverter = &AccessPolicyEntry_STATUS{}

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

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

	// Set property "ApplicationId":
	if typedInput.ApplicationId != nil {
		applicationId := *typedInput.ApplicationId
		entry.ApplicationId = &applicationId
	}

	// Set property "ObjectId":
	if typedInput.ObjectId != nil {
		objectId := *typedInput.ObjectId
		entry.ObjectId = &objectId
	}

	// Set property "Permissions":
	if typedInput.Permissions != nil {
		var permissions1 Permissions_STATUS
		err := permissions1.PopulateFromARM(owner, *typedInput.Permissions)
		if err != nil {
			return err
		}
		permissions := permissions1
		entry.Permissions = &permissions
	}

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

	// No error
	return nil
}

// AssignProperties_From_AccessPolicyEntry_STATUS populates our AccessPolicyEntry_STATUS from the provided source AccessPolicyEntry_STATUS
func (entry *AccessPolicyEntry_STATUS) AssignProperties_From_AccessPolicyEntry_STATUS(source *storage.AccessPolicyEntry_STATUS) error {

	// ApplicationId
	entry.ApplicationId = genruntime.ClonePointerToString(source.ApplicationId)

	// ObjectId
	entry.ObjectId = genruntime.ClonePointerToString(source.ObjectId)

	// Permissions
	if source.Permissions != nil {
		var permission Permissions_STATUS
		err := permission.AssignProperties_From_Permissions_STATUS(source.Permissions)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_Permissions_STATUS() to populate field Permissions")
		}
		entry.Permissions = &permission
	} else {
		entry.Permissions = nil
	}

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

	// No error
	return nil
}

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

	// ApplicationId
	destination.ApplicationId = genruntime.ClonePointerToString(entry.ApplicationId)

	// ObjectId
	destination.ObjectId = genruntime.ClonePointerToString(entry.ObjectId)

	// Permissions
	if entry.Permissions != nil {
		var permission storage.Permissions_STATUS
		err := entry.Permissions.AssignProperties_To_Permissions_STATUS(&permission)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_Permissions_STATUS() to populate field Permissions")
		}
		destination.Permissions = &permission
	} else {
		destination.Permissions = nil
	}

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

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

	// No error
	return nil
}

// The type of identity.
type IdentityType_STATUS string

const (
	IdentityType_STATUS_Application     = IdentityType_STATUS("Application")
	IdentityType_STATUS_Key             = IdentityType_STATUS("Key")
	IdentityType_STATUS_ManagedIdentity = IdentityType_STATUS("ManagedIdentity")
	IdentityType_STATUS_User            = IdentityType_STATUS("User")
)

// Mapping from string to IdentityType_STATUS
var identityType_STATUS_Values = map[string]IdentityType_STATUS{
	"application":     IdentityType_STATUS_Application,
	"key":             IdentityType_STATUS_Key,
	"managedidentity": IdentityType_STATUS_ManagedIdentity,
	"user":            IdentityType_STATUS_User,
}

// A set of rules governing the network accessibility of a vault.
type NetworkRuleSet struct {
	// Bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'.  If not specified the
	// default is 'AzureServices'.
	Bypass *NetworkRuleSet_Bypass `json:"bypass,omitempty"`

	// DefaultAction: The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after
	// the bypass property has been evaluated.
	DefaultAction *NetworkRuleSet_DefaultAction `json:"defaultAction,omitempty"`

	// IpRules: The list of IP address rules.
	IpRules []IPRule `json:"ipRules,omitempty"`

	// VirtualNetworkRules: The list of virtual network rules.
	VirtualNetworkRules []VirtualNetworkRule `json:"virtualNetworkRules,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 "Bypass":
	if ruleSet.Bypass != nil {
		var temp string
		temp = string(*ruleSet.Bypass)
		bypass := arm.NetworkRuleSet_Bypass(temp)
		result.Bypass = &bypass
	}

	// 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))
	}

	// Set property "VirtualNetworkRules":
	for _, item := range ruleSet.VirtualNetworkRules {
		item_ARM, err := item.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		result.VirtualNetworkRules = append(result.VirtualNetworkRules, *item_ARM.(*arm.VirtualNetworkRule))
	}
	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 "Bypass":
	if typedInput.Bypass != nil {
		var temp string
		temp = string(*typedInput.Bypass)
		bypass := NetworkRuleSet_Bypass(temp)
		ruleSet.Bypass = &bypass
	}

	// 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)
	}

	// Set property "VirtualNetworkRules":
	for _, item := range typedInput.VirtualNetworkRules {
		var item1 VirtualNetworkRule
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		ruleSet.VirtualNetworkRules = append(ruleSet.VirtualNetworkRules, 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 {

	// Bypass
	if source.Bypass != nil {
		bypass := *source.Bypass
		bypassTemp := genruntime.ToEnum(bypass, networkRuleSet_Bypass_Values)
		ruleSet.Bypass = &bypassTemp
	} else {
		ruleSet.Bypass = nil
	}

	// 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
	}

	// VirtualNetworkRules
	if source.VirtualNetworkRules != nil {
		virtualNetworkRuleList := make([]VirtualNetworkRule, len(source.VirtualNetworkRules))
		for virtualNetworkRuleIndex, virtualNetworkRuleItem := range source.VirtualNetworkRules {
			var virtualNetworkRule VirtualNetworkRule
			err := virtualNetworkRule.AssignProperties_From_VirtualNetworkRule(&virtualNetworkRuleItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_VirtualNetworkRule() to populate field VirtualNetworkRules")
			}
			virtualNetworkRuleList[virtualNetworkRuleIndex] = virtualNetworkRule
		}
		ruleSet.VirtualNetworkRules = virtualNetworkRuleList
	} else {
		ruleSet.VirtualNetworkRules = 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()

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

	// 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
	}

	// VirtualNetworkRules
	if ruleSet.VirtualNetworkRules != nil {
		virtualNetworkRuleList := make([]storage.VirtualNetworkRule, len(ruleSet.VirtualNetworkRules))
		for virtualNetworkRuleIndex, virtualNetworkRuleItem := range ruleSet.VirtualNetworkRules {
			var virtualNetworkRule storage.VirtualNetworkRule
			err := virtualNetworkRuleItem.AssignProperties_To_VirtualNetworkRule(&virtualNetworkRule)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_VirtualNetworkRule() to populate field VirtualNetworkRules")
			}
			virtualNetworkRuleList[virtualNetworkRuleIndex] = virtualNetworkRule
		}
		destination.VirtualNetworkRules = virtualNetworkRuleList
	} else {
		destination.VirtualNetworkRules = 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 {

	// Bypass
	if source.Bypass != nil {
		bypass := genruntime.ToEnum(string(*source.Bypass), networkRuleSet_Bypass_Values)
		ruleSet.Bypass = &bypass
	} else {
		ruleSet.Bypass = nil
	}

	// 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
	}

	// VirtualNetworkRules
	if source.VirtualNetworkRules != nil {
		virtualNetworkRuleList := make([]VirtualNetworkRule, len(source.VirtualNetworkRules))
		for virtualNetworkRuleIndex, virtualNetworkRuleItem := range source.VirtualNetworkRules {
			var virtualNetworkRule VirtualNetworkRule
			err := virtualNetworkRule.Initialize_From_VirtualNetworkRule_STATUS(&virtualNetworkRuleItem)
			if err != nil {
				return eris.Wrap(err, "calling Initialize_From_VirtualNetworkRule_STATUS() to populate field VirtualNetworkRules")
			}
			virtualNetworkRuleList[virtualNetworkRuleIndex] = virtualNetworkRule
		}
		ruleSet.VirtualNetworkRules = virtualNetworkRuleList
	} else {
		ruleSet.VirtualNetworkRules = nil
	}

	// No error
	return nil
}

// A set of rules governing the network accessibility of a vault.
type NetworkRuleSet_STATUS struct {
	// Bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'.  If not specified the
	// default is 'AzureServices'.
	Bypass *NetworkRuleSet_Bypass_STATUS `json:"bypass,omitempty"`

	// DefaultAction: The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after
	// the bypass property has been evaluated.
	DefaultAction *NetworkRuleSet_DefaultAction_STATUS `json:"defaultAction,omitempty"`

	// IpRules: The list of IP address rules.
	IpRules []IPRule_STATUS `json:"ipRules,omitempty"`

	// VirtualNetworkRules: The list of virtual network rules.
	VirtualNetworkRules []VirtualNetworkRule_STATUS `json:"virtualNetworkRules,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 "Bypass":
	if typedInput.Bypass != nil {
		var temp string
		temp = string(*typedInput.Bypass)
		bypass := NetworkRuleSet_Bypass_STATUS(temp)
		ruleSet.Bypass = &bypass
	}

	// 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)
	}

	// Set property "VirtualNetworkRules":
	for _, item := range typedInput.VirtualNetworkRules {
		var item1 VirtualNetworkRule_STATUS
		err := item1.PopulateFromARM(owner, item)
		if err != nil {
			return err
		}
		ruleSet.VirtualNetworkRules = append(ruleSet.VirtualNetworkRules, 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 {

	// Bypass
	if source.Bypass != nil {
		bypass := *source.Bypass
		bypassTemp := genruntime.ToEnum(bypass, networkRuleSet_Bypass_STATUS_Values)
		ruleSet.Bypass = &bypassTemp
	} else {
		ruleSet.Bypass = nil
	}

	// 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
	}

	// VirtualNetworkRules
	if source.VirtualNetworkRules != nil {
		virtualNetworkRuleList := make([]VirtualNetworkRule_STATUS, len(source.VirtualNetworkRules))
		for virtualNetworkRuleIndex, virtualNetworkRuleItem := range source.VirtualNetworkRules {
			var virtualNetworkRule VirtualNetworkRule_STATUS
			err := virtualNetworkRule.AssignProperties_From_VirtualNetworkRule_STATUS(&virtualNetworkRuleItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_VirtualNetworkRule_STATUS() to populate field VirtualNetworkRules")
			}
			virtualNetworkRuleList[virtualNetworkRuleIndex] = virtualNetworkRule
		}
		ruleSet.VirtualNetworkRules = virtualNetworkRuleList
	} else {
		ruleSet.VirtualNetworkRules = 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()

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

	// 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
	}

	// VirtualNetworkRules
	if ruleSet.VirtualNetworkRules != nil {
		virtualNetworkRuleList := make([]storage.VirtualNetworkRule_STATUS, len(ruleSet.VirtualNetworkRules))
		for virtualNetworkRuleIndex, virtualNetworkRuleItem := range ruleSet.VirtualNetworkRules {
			var virtualNetworkRule storage.VirtualNetworkRule_STATUS
			err := virtualNetworkRuleItem.AssignProperties_To_VirtualNetworkRule_STATUS(&virtualNetworkRule)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_VirtualNetworkRule_STATUS() to populate field VirtualNetworkRules")
			}
			virtualNetworkRuleList[virtualNetworkRuleIndex] = virtualNetworkRule
		}
		destination.VirtualNetworkRules = virtualNetworkRuleList
	} else {
		destination.VirtualNetworkRules = nil
	}

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

	// No error
	return nil
}

// Private endpoint connection item.
type PrivateEndpointConnectionItem_STATUS struct {
	// Etag: Modified whenever there is a change in the state of private endpoint connection.
	Etag *string `json:"etag,omitempty"`

	// Id: Id of private endpoint connection.
	Id *string `json:"id,omitempty"`

	// PrivateEndpoint: Properties of the private endpoint object.
	PrivateEndpoint *PrivateEndpoint_STATUS `json:"privateEndpoint,omitempty"`

	// PrivateLinkServiceConnectionState: Approval state of the private link connection.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState_STATUS `json:"privateLinkServiceConnectionState,omitempty"`

	// ProvisioningState: Provisioning state of the private endpoint connection.
	ProvisioningState *PrivateEndpointConnectionProvisioningState_STATUS `json:"provisioningState,omitempty"`
}

var _ genruntime.FromARMConverter = &PrivateEndpointConnectionItem_STATUS{}

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

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

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

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

	// Set property "PrivateEndpoint":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PrivateEndpoint != nil {
			var privateEndpoint1 PrivateEndpoint_STATUS
			err := privateEndpoint1.PopulateFromARM(owner, *typedInput.Properties.PrivateEndpoint)
			if err != nil {
				return err
			}
			privateEndpoint := privateEndpoint1
			item.PrivateEndpoint = &privateEndpoint
		}
	}

	// Set property "PrivateLinkServiceConnectionState":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PrivateLinkServiceConnectionState != nil {
			var privateLinkServiceConnectionState1 PrivateLinkServiceConnectionState_STATUS
			err := privateLinkServiceConnectionState1.PopulateFromARM(owner, *typedInput.Properties.PrivateLinkServiceConnectionState)
			if err != nil {
				return err
			}
			privateLinkServiceConnectionState := privateLinkServiceConnectionState1
			item.PrivateLinkServiceConnectionState = &privateLinkServiceConnectionState
		}
	}

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

	// No error
	return nil
}

// AssignProperties_From_PrivateEndpointConnectionItem_STATUS populates our PrivateEndpointConnectionItem_STATUS from the provided source PrivateEndpointConnectionItem_STATUS
func (item *PrivateEndpointConnectionItem_STATUS) AssignProperties_From_PrivateEndpointConnectionItem_STATUS(source *storage.PrivateEndpointConnectionItem_STATUS) error {

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

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

	// PrivateEndpoint
	if source.PrivateEndpoint != nil {
		var privateEndpoint PrivateEndpoint_STATUS
		err := privateEndpoint.AssignProperties_From_PrivateEndpoint_STATUS(source.PrivateEndpoint)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_PrivateEndpoint_STATUS() to populate field PrivateEndpoint")
		}
		item.PrivateEndpoint = &privateEndpoint
	} else {
		item.PrivateEndpoint = nil
	}

	// PrivateLinkServiceConnectionState
	if source.PrivateLinkServiceConnectionState != nil {
		var privateLinkServiceConnectionState PrivateLinkServiceConnectionState_STATUS
		err := privateLinkServiceConnectionState.AssignProperties_From_PrivateLinkServiceConnectionState_STATUS(source.PrivateLinkServiceConnectionState)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_PrivateLinkServiceConnectionState_STATUS() to populate field PrivateLinkServiceConnectionState")
		}
		item.PrivateLinkServiceConnectionState = &privateLinkServiceConnectionState
	} else {
		item.PrivateLinkServiceConnectionState = nil
	}

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

	// No error
	return nil
}

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

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

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

	// PrivateEndpoint
	if item.PrivateEndpoint != nil {
		var privateEndpoint storage.PrivateEndpoint_STATUS
		err := item.PrivateEndpoint.AssignProperties_To_PrivateEndpoint_STATUS(&privateEndpoint)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_PrivateEndpoint_STATUS() to populate field PrivateEndpoint")
		}
		destination.PrivateEndpoint = &privateEndpoint
	} else {
		destination.PrivateEndpoint = nil
	}

	// PrivateLinkServiceConnectionState
	if item.PrivateLinkServiceConnectionState != nil {
		var privateLinkServiceConnectionState storage.PrivateLinkServiceConnectionState_STATUS
		err := item.PrivateLinkServiceConnectionState.AssignProperties_To_PrivateLinkServiceConnectionState_STATUS(&privateLinkServiceConnectionState)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_PrivateLinkServiceConnectionState_STATUS() to populate field PrivateLinkServiceConnectionState")
		}
		destination.PrivateLinkServiceConnectionState = &privateLinkServiceConnectionState
	} else {
		destination.PrivateLinkServiceConnectionState = nil
	}

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

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

	// No error
	return nil
}

// SKU details
type Sku struct {
	// +kubebuilder:validation:Required
	// Family: SKU family name
	Family *Sku_Family `json:"family,omitempty"`

	// +kubebuilder:validation:Required
	// Name: SKU name to specify whether the key vault is a standard vault or a premium vault.
	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 "Family":
	if sku.Family != nil {
		var temp string
		temp = string(*sku.Family)
		family := arm.Sku_Family(temp)
		result.Family = &family
	}

	// 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 "Family":
	if typedInput.Family != nil {
		var temp string
		temp = string(*typedInput.Family)
		family := Sku_Family(temp)
		sku.Family = &family
	}

	// 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 {

	// Family
	if source.Family != nil {
		family := *source.Family
		familyTemp := genruntime.ToEnum(family, sku_Family_Values)
		sku.Family = &familyTemp
	} else {
		sku.Family = nil
	}

	// 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()

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

	// 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 {

	// Family
	if source.Family != nil {
		family := genruntime.ToEnum(string(*source.Family), sku_Family_Values)
		sku.Family = &family
	} else {
		sku.Family = nil
	}

	// 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
}

// SKU details
type Sku_STATUS struct {
	// Family: SKU family name
	Family *Sku_Family_STATUS `json:"family,omitempty"`

	// Name: SKU name to specify whether the key vault is a standard vault or a premium vault.
	Name *Sku_Name_STATUS `json:"name,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 "Family":
	if typedInput.Family != nil {
		var temp string
		temp = string(*typedInput.Family)
		family := Sku_Family_STATUS(temp)
		sku.Family = &family
	}

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

	// 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 {

	// Family
	if source.Family != nil {
		family := *source.Family
		familyTemp := genruntime.ToEnum(family, sku_Family_STATUS_Values)
		sku.Family = &familyTemp
	} else {
		sku.Family = nil
	}

	// Name
	if source.Name != nil {
		name := *source.Name
		nameTemp := genruntime.ToEnum(name, sku_Name_STATUS_Values)
		sku.Name = &nameTemp
	} else {
		sku.Name = 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()

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

	// 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
}

// +kubebuilder:validation:Enum={"createOrRecover","default","purgeThenCreate","recover"}
type VaultProperties_CreateMode string

const (
	VaultProperties_CreateMode_CreateOrRecover = VaultProperties_CreateMode("createOrRecover")
	VaultProperties_CreateMode_Default         = VaultProperties_CreateMode("default")
	VaultProperties_CreateMode_PurgeThenCreate = VaultProperties_CreateMode("purgeThenCreate")
	VaultProperties_CreateMode_Recover         = VaultProperties_CreateMode("recover")
)

// Mapping from string to VaultProperties_CreateMode
var vaultProperties_CreateMode_Values = map[string]VaultProperties_CreateMode{
	"createorrecover": VaultProperties_CreateMode_CreateOrRecover,
	"default":         VaultProperties_CreateMode_Default,
	"purgethencreate": VaultProperties_CreateMode_PurgeThenCreate,
	"recover":         VaultProperties_CreateMode_Recover,
}

type VaultProperties_CreateMode_STATUS string

const (
	VaultProperties_CreateMode_STATUS_CreateOrRecover = VaultProperties_CreateMode_STATUS("createOrRecover")
	VaultProperties_CreateMode_STATUS_Default         = VaultProperties_CreateMode_STATUS("default")
	VaultProperties_CreateMode_STATUS_PurgeThenCreate = VaultProperties_CreateMode_STATUS("purgeThenCreate")
	VaultProperties_CreateMode_STATUS_Recover         = VaultProperties_CreateMode_STATUS("recover")
)

// Mapping from string to VaultProperties_CreateMode_STATUS
var vaultProperties_CreateMode_STATUS_Values = map[string]VaultProperties_CreateMode_STATUS{
	"createorrecover": VaultProperties_CreateMode_STATUS_CreateOrRecover,
	"default":         VaultProperties_CreateMode_STATUS_Default,
	"purgethencreate": VaultProperties_CreateMode_STATUS_PurgeThenCreate,
	"recover":         VaultProperties_CreateMode_STATUS_Recover,
}

// +kubebuilder:validation:Enum={"RegisteringDns","Succeeded"}
type VaultProperties_ProvisioningState string

const (
	VaultProperties_ProvisioningState_RegisteringDns = VaultProperties_ProvisioningState("RegisteringDns")
	VaultProperties_ProvisioningState_Succeeded      = VaultProperties_ProvisioningState("Succeeded")
)

// Mapping from string to VaultProperties_ProvisioningState
var vaultProperties_ProvisioningState_Values = map[string]VaultProperties_ProvisioningState{
	"registeringdns": VaultProperties_ProvisioningState_RegisteringDns,
	"succeeded":      VaultProperties_ProvisioningState_Succeeded,
}

type VaultProperties_ProvisioningState_STATUS string

const (
	VaultProperties_ProvisioningState_STATUS_RegisteringDns = VaultProperties_ProvisioningState_STATUS("RegisteringDns")
	VaultProperties_ProvisioningState_STATUS_Succeeded      = VaultProperties_ProvisioningState_STATUS("Succeeded")
)

// Mapping from string to VaultProperties_ProvisioningState_STATUS
var vaultProperties_ProvisioningState_STATUS_Values = map[string]VaultProperties_ProvisioningState_STATUS{
	"registeringdns": VaultProperties_ProvisioningState_STATUS_RegisteringDns,
	"succeeded":      VaultProperties_ProvisioningState_STATUS_Succeeded,
}

// A rule governing the accessibility of a vault from a specific ip address or ip range.
type IPRule struct {
	// +kubebuilder:validation:Required
	// Value: An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all
	// addresses that start with 124.56.78).
	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 "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 "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 {

	// 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()

	// 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 {

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

	// No error
	return nil
}

// A rule governing the accessibility of a vault from a specific ip address or ip range.
type IPRule_STATUS struct {
	// Value: An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all
	// addresses that start with 124.56.78).
	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 "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 {

	// 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()

	// 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
}

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

const (
	NetworkRuleSet_Bypass_AzureServices = NetworkRuleSet_Bypass("AzureServices")
	NetworkRuleSet_Bypass_None          = NetworkRuleSet_Bypass("None")
)

// Mapping from string to NetworkRuleSet_Bypass
var networkRuleSet_Bypass_Values = map[string]NetworkRuleSet_Bypass{
	"azureservices": NetworkRuleSet_Bypass_AzureServices,
	"none":          NetworkRuleSet_Bypass_None,
}

type NetworkRuleSet_Bypass_STATUS string

const (
	NetworkRuleSet_Bypass_STATUS_AzureServices = NetworkRuleSet_Bypass_STATUS("AzureServices")
	NetworkRuleSet_Bypass_STATUS_None          = NetworkRuleSet_Bypass_STATUS("None")
)

// Mapping from string to NetworkRuleSet_Bypass_STATUS
var networkRuleSet_Bypass_STATUS_Values = map[string]NetworkRuleSet_Bypass_STATUS{
	"azureservices": NetworkRuleSet_Bypass_STATUS_AzureServices,
	"none":          NetworkRuleSet_Bypass_STATUS_None,
}

// +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,
}

// Permissions the identity has for keys, secrets, certificates and storage.
type Permissions struct {
	// Certificates: Permissions to certificates
	Certificates []Permissions_Certificates `json:"certificates,omitempty"`

	// Keys: Permissions to keys
	Keys []Permissions_Keys `json:"keys,omitempty"`

	// Secrets: Permissions to secrets
	Secrets []Permissions_Secrets `json:"secrets,omitempty"`

	// Storage: Permissions to storage accounts
	Storage []Permissions_Storage `json:"storage,omitempty"`
}

var _ genruntime.ARMTransformer = &Permissions{}

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

	// Set property "Certificates":
	for _, item := range permissions.Certificates {
		var temp string
		temp = string(item)
		result.Certificates = append(result.Certificates, arm.Permissions_Certificates(temp))
	}

	// Set property "Keys":
	for _, item := range permissions.Keys {
		var temp string
		temp = string(item)
		result.Keys = append(result.Keys, arm.Permissions_Keys(temp))
	}

	// Set property "Secrets":
	for _, item := range permissions.Secrets {
		var temp string
		temp = string(item)
		result.Secrets = append(result.Secrets, arm.Permissions_Secrets(temp))
	}

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

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

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

	// Set property "Certificates":
	for _, item := range typedInput.Certificates {
		var temp string
		temp = string(item)
		permissions.Certificates = append(permissions.Certificates, Permissions_Certificates(temp))
	}

	// Set property "Keys":
	for _, item := range typedInput.Keys {
		var temp string
		temp = string(item)
		permissions.Keys = append(permissions.Keys, Permissions_Keys(temp))
	}

	// Set property "Secrets":
	for _, item := range typedInput.Secrets {
		var temp string
		temp = string(item)
		permissions.Secrets = append(permissions.Secrets, Permissions_Secrets(temp))
	}

	// Set property "Storage":
	for _, item := range typedInput.Storage {
		var temp string
		temp = string(item)
		permissions.Storage = append(permissions.Storage, Permissions_Storage(temp))
	}

	// No error
	return nil
}

// AssignProperties_From_Permissions populates our Permissions from the provided source Permissions
func (permissions *Permissions) AssignProperties_From_Permissions(source *storage.Permissions) error {

	// Certificates
	if source.Certificates != nil {
		certificateList := make([]Permissions_Certificates, len(source.Certificates))
		for certificateIndex, certificateItem := range source.Certificates {
			certificateList[certificateIndex] = genruntime.ToEnum(certificateItem, permissions_Certificates_Values)
		}
		permissions.Certificates = certificateList
	} else {
		permissions.Certificates = nil
	}

	// Keys
	if source.Keys != nil {
		keyList := make([]Permissions_Keys, len(source.Keys))
		for keyIndex, keyItem := range source.Keys {
			keyList[keyIndex] = genruntime.ToEnum(keyItem, permissions_Keys_Values)
		}
		permissions.Keys = keyList
	} else {
		permissions.Keys = nil
	}

	// Secrets
	if source.Secrets != nil {
		secretList := make([]Permissions_Secrets, len(source.Secrets))
		for secretIndex, secretItem := range source.Secrets {
			secretList[secretIndex] = genruntime.ToEnum(secretItem, permissions_Secrets_Values)
		}
		permissions.Secrets = secretList
	} else {
		permissions.Secrets = nil
	}

	// Storage
	if source.Storage != nil {
		storageList := make([]Permissions_Storage, len(source.Storage))
		for storageIndex, storageItem := range source.Storage {
			storageList[storageIndex] = genruntime.ToEnum(storageItem, permissions_Storage_Values)
		}
		permissions.Storage = storageList
	} else {
		permissions.Storage = nil
	}

	// No error
	return nil
}

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

	// Certificates
	if permissions.Certificates != nil {
		certificateList := make([]string, len(permissions.Certificates))
		for certificateIndex, certificateItem := range permissions.Certificates {
			certificateList[certificateIndex] = string(certificateItem)
		}
		destination.Certificates = certificateList
	} else {
		destination.Certificates = nil
	}

	// Keys
	if permissions.Keys != nil {
		keyList := make([]string, len(permissions.Keys))
		for keyIndex, keyItem := range permissions.Keys {
			keyList[keyIndex] = string(keyItem)
		}
		destination.Keys = keyList
	} else {
		destination.Keys = nil
	}

	// Secrets
	if permissions.Secrets != nil {
		secretList := make([]string, len(permissions.Secrets))
		for secretIndex, secretItem := range permissions.Secrets {
			secretList[secretIndex] = string(secretItem)
		}
		destination.Secrets = secretList
	} else {
		destination.Secrets = nil
	}

	// Storage
	if permissions.Storage != nil {
		storageList := make([]string, len(permissions.Storage))
		for storageIndex, storageItem := range permissions.Storage {
			storageList[storageIndex] = string(storageItem)
		}
		destination.Storage = storageList
	} else {
		destination.Storage = nil
	}

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

	// No error
	return nil
}

// Initialize_From_Permissions_STATUS populates our Permissions from the provided source Permissions_STATUS
func (permissions *Permissions) Initialize_From_Permissions_STATUS(source *Permissions_STATUS) error {

	// Certificates
	if source.Certificates != nil {
		certificateList := make([]Permissions_Certificates, len(source.Certificates))
		for certificateIndex, certificateItem := range source.Certificates {
			certificate := genruntime.ToEnum(string(certificateItem), permissions_Certificates_Values)
			certificateList[certificateIndex] = certificate
		}
		permissions.Certificates = certificateList
	} else {
		permissions.Certificates = nil
	}

	// Keys
	if source.Keys != nil {
		keyList := make([]Permissions_Keys, len(source.Keys))
		for keyIndex, keyItem := range source.Keys {
			key := genruntime.ToEnum(string(keyItem), permissions_Keys_Values)
			keyList[keyIndex] = key
		}
		permissions.Keys = keyList
	} else {
		permissions.Keys = nil
	}

	// Secrets
	if source.Secrets != nil {
		secretList := make([]Permissions_Secrets, len(source.Secrets))
		for secretIndex, secretItem := range source.Secrets {
			secret := genruntime.ToEnum(string(secretItem), permissions_Secrets_Values)
			secretList[secretIndex] = secret
		}
		permissions.Secrets = secretList
	} else {
		permissions.Secrets = nil
	}

	// Storage
	if source.Storage != nil {
		storageList := make([]Permissions_Storage, len(source.Storage))
		for storageIndex, storageItem := range source.Storage {
			storage := genruntime.ToEnum(string(storageItem), permissions_Storage_Values)
			storageList[storageIndex] = storage
		}
		permissions.Storage = storageList
	} else {
		permissions.Storage = nil
	}

	// No error
	return nil
}

// Permissions the identity has for keys, secrets, certificates and storage.
type Permissions_STATUS struct {
	// Certificates: Permissions to certificates
	Certificates []Permissions_Certificates_STATUS `json:"certificates,omitempty"`

	// Keys: Permissions to keys
	Keys []Permissions_Keys_STATUS `json:"keys,omitempty"`

	// Secrets: Permissions to secrets
	Secrets []Permissions_Secrets_STATUS `json:"secrets,omitempty"`

	// Storage: Permissions to storage accounts
	Storage []Permissions_Storage_STATUS `json:"storage,omitempty"`
}

var _ genruntime.FromARMConverter = &Permissions_STATUS{}

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

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

	// Set property "Certificates":
	for _, item := range typedInput.Certificates {
		var temp string
		temp = string(item)
		permissions.Certificates = append(permissions.Certificates, Permissions_Certificates_STATUS(temp))
	}

	// Set property "Keys":
	for _, item := range typedInput.Keys {
		var temp string
		temp = string(item)
		permissions.Keys = append(permissions.Keys, Permissions_Keys_STATUS(temp))
	}

	// Set property "Secrets":
	for _, item := range typedInput.Secrets {
		var temp string
		temp = string(item)
		permissions.Secrets = append(permissions.Secrets, Permissions_Secrets_STATUS(temp))
	}

	// Set property "Storage":
	for _, item := range typedInput.Storage {
		var temp string
		temp = string(item)
		permissions.Storage = append(permissions.Storage, Permissions_Storage_STATUS(temp))
	}

	// No error
	return nil
}

// AssignProperties_From_Permissions_STATUS populates our Permissions_STATUS from the provided source Permissions_STATUS
func (permissions *Permissions_STATUS) AssignProperties_From_Permissions_STATUS(source *storage.Permissions_STATUS) error {

	// Certificates
	if source.Certificates != nil {
		certificateList := make([]Permissions_Certificates_STATUS, len(source.Certificates))
		for certificateIndex, certificateItem := range source.Certificates {
			certificateList[certificateIndex] = genruntime.ToEnum(certificateItem, permissions_Certificates_STATUS_Values)
		}
		permissions.Certificates = certificateList
	} else {
		permissions.Certificates = nil
	}

	// Keys
	if source.Keys != nil {
		keyList := make([]Permissions_Keys_STATUS, len(source.Keys))
		for keyIndex, keyItem := range source.Keys {
			keyList[keyIndex] = genruntime.ToEnum(keyItem, permissions_Keys_STATUS_Values)
		}
		permissions.Keys = keyList
	} else {
		permissions.Keys = nil
	}

	// Secrets
	if source.Secrets != nil {
		secretList := make([]Permissions_Secrets_STATUS, len(source.Secrets))
		for secretIndex, secretItem := range source.Secrets {
			secretList[secretIndex] = genruntime.ToEnum(secretItem, permissions_Secrets_STATUS_Values)
		}
		permissions.Secrets = secretList
	} else {
		permissions.Secrets = nil
	}

	// Storage
	if source.Storage != nil {
		storageList := make([]Permissions_Storage_STATUS, len(source.Storage))
		for storageIndex, storageItem := range source.Storage {
			storageList[storageIndex] = genruntime.ToEnum(storageItem, permissions_Storage_STATUS_Values)
		}
		permissions.Storage = storageList
	} else {
		permissions.Storage = nil
	}

	// No error
	return nil
}

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

	// Certificates
	if permissions.Certificates != nil {
		certificateList := make([]string, len(permissions.Certificates))
		for certificateIndex, certificateItem := range permissions.Certificates {
			certificateList[certificateIndex] = string(certificateItem)
		}
		destination.Certificates = certificateList
	} else {
		destination.Certificates = nil
	}

	// Keys
	if permissions.Keys != nil {
		keyList := make([]string, len(permissions.Keys))
		for keyIndex, keyItem := range permissions.Keys {
			keyList[keyIndex] = string(keyItem)
		}
		destination.Keys = keyList
	} else {
		destination.Keys = nil
	}

	// Secrets
	if permissions.Secrets != nil {
		secretList := make([]string, len(permissions.Secrets))
		for secretIndex, secretItem := range permissions.Secrets {
			secretList[secretIndex] = string(secretItem)
		}
		destination.Secrets = secretList
	} else {
		destination.Secrets = nil
	}

	// Storage
	if permissions.Storage != nil {
		storageList := make([]string, len(permissions.Storage))
		for storageIndex, storageItem := range permissions.Storage {
			storageList[storageIndex] = string(storageItem)
		}
		destination.Storage = storageList
	} else {
		destination.Storage = nil
	}

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

	// No error
	return nil
}

// Private endpoint object properties.
type PrivateEndpoint_STATUS struct {
	// Id: Full identifier of the private endpoint resource.
	Id *string `json:"id,omitempty"`
}

var _ genruntime.FromARMConverter = &PrivateEndpoint_STATUS{}

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

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

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

	// No error
	return nil
}

// AssignProperties_From_PrivateEndpoint_STATUS populates our PrivateEndpoint_STATUS from the provided source PrivateEndpoint_STATUS
func (endpoint *PrivateEndpoint_STATUS) AssignProperties_From_PrivateEndpoint_STATUS(source *storage.PrivateEndpoint_STATUS) error {

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

	// No error
	return nil
}

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

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

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

	// No error
	return nil
}

// The current provisioning state.
type PrivateEndpointConnectionProvisioningState_STATUS string

const (
	PrivateEndpointConnectionProvisioningState_STATUS_Creating     = PrivateEndpointConnectionProvisioningState_STATUS("Creating")
	PrivateEndpointConnectionProvisioningState_STATUS_Deleting     = PrivateEndpointConnectionProvisioningState_STATUS("Deleting")
	PrivateEndpointConnectionProvisioningState_STATUS_Disconnected = PrivateEndpointConnectionProvisioningState_STATUS("Disconnected")
	PrivateEndpointConnectionProvisioningState_STATUS_Failed       = PrivateEndpointConnectionProvisioningState_STATUS("Failed")
	PrivateEndpointConnectionProvisioningState_STATUS_Succeeded    = PrivateEndpointConnectionProvisioningState_STATUS("Succeeded")
	PrivateEndpointConnectionProvisioningState_STATUS_Updating     = PrivateEndpointConnectionProvisioningState_STATUS("Updating")
)

// Mapping from string to PrivateEndpointConnectionProvisioningState_STATUS
var privateEndpointConnectionProvisioningState_STATUS_Values = map[string]PrivateEndpointConnectionProvisioningState_STATUS{
	"creating":     PrivateEndpointConnectionProvisioningState_STATUS_Creating,
	"deleting":     PrivateEndpointConnectionProvisioningState_STATUS_Deleting,
	"disconnected": PrivateEndpointConnectionProvisioningState_STATUS_Disconnected,
	"failed":       PrivateEndpointConnectionProvisioningState_STATUS_Failed,
	"succeeded":    PrivateEndpointConnectionProvisioningState_STATUS_Succeeded,
	"updating":     PrivateEndpointConnectionProvisioningState_STATUS_Updating,
}

// An object that represents the approval state of the private link connection.
type PrivateLinkServiceConnectionState_STATUS struct {
	// ActionsRequired: A message indicating if changes on the service provider require any updates on the consumer.
	ActionsRequired *PrivateLinkServiceConnectionState_ActionsRequired_STATUS `json:"actionsRequired,omitempty"`

	// Description: The reason for approval or rejection.
	Description *string `json:"description,omitempty"`

	// Status: Indicates whether the connection has been approved, rejected or removed by the key vault owner.
	Status *PrivateEndpointServiceConnectionStatus_STATUS `json:"status,omitempty"`
}

var _ genruntime.FromARMConverter = &PrivateLinkServiceConnectionState_STATUS{}

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

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

	// Set property "ActionsRequired":
	if typedInput.ActionsRequired != nil {
		var temp string
		temp = string(*typedInput.ActionsRequired)
		actionsRequired := PrivateLinkServiceConnectionState_ActionsRequired_STATUS(temp)
		state.ActionsRequired = &actionsRequired
	}

	// Set property "Description":
	if typedInput.Description != nil {
		description := *typedInput.Description
		state.Description = &description
	}

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

	// No error
	return nil
}

// AssignProperties_From_PrivateLinkServiceConnectionState_STATUS populates our PrivateLinkServiceConnectionState_STATUS from the provided source PrivateLinkServiceConnectionState_STATUS
func (state *PrivateLinkServiceConnectionState_STATUS) AssignProperties_From_PrivateLinkServiceConnectionState_STATUS(source *storage.PrivateLinkServiceConnectionState_STATUS) error {

	// ActionsRequired
	if source.ActionsRequired != nil {
		actionsRequired := *source.ActionsRequired
		actionsRequiredTemp := genruntime.ToEnum(actionsRequired, privateLinkServiceConnectionState_ActionsRequired_STATUS_Values)
		state.ActionsRequired = &actionsRequiredTemp
	} else {
		state.ActionsRequired = nil
	}

	// Description
	state.Description = genruntime.ClonePointerToString(source.Description)

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

	// No error
	return nil
}

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

	// ActionsRequired
	if state.ActionsRequired != nil {
		actionsRequired := string(*state.ActionsRequired)
		destination.ActionsRequired = &actionsRequired
	} else {
		destination.ActionsRequired = nil
	}

	// Description
	destination.Description = genruntime.ClonePointerToString(state.Description)

	// Status
	if state.Status != nil {
		status := string(*state.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={"A"}
type Sku_Family string

const Sku_Family_A = Sku_Family("A")

// Mapping from string to Sku_Family
var sku_Family_Values = map[string]Sku_Family{
	"a": Sku_Family_A,
}

type Sku_Family_STATUS string

const Sku_Family_STATUS_A = Sku_Family_STATUS("A")

// Mapping from string to Sku_Family_STATUS
var sku_Family_STATUS_Values = map[string]Sku_Family_STATUS{
	"a": Sku_Family_STATUS_A,
}

// +kubebuilder:validation:Enum={"premium","standard"}
type Sku_Name string

const (
	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{
	"premium":  Sku_Name_Premium,
	"standard": Sku_Name_Standard,
}

type Sku_Name_STATUS string

const (
	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{
	"premium":  Sku_Name_STATUS_Premium,
	"standard": Sku_Name_STATUS_Standard,
}

// A rule governing the accessibility of a vault from a specific virtual network.
type VirtualNetworkRule struct {
	// IgnoreMissingVnetServiceEndpoint: Property to specify whether NRP will ignore the check if parent subnet has
	// serviceEndpoints configured.
	IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"`

	// +kubebuilder:validation:Required
	// Reference: Full resource id of a vnet subnet, such as
	// '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'.
	Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"`
}

var _ genruntime.ARMTransformer = &VirtualNetworkRule{}

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

	// Set property "Id":
	if rule.Reference != nil {
		referenceARMID, err := resolved.ResolvedReferences.Lookup(*rule.Reference)
		if err != nil {
			return nil, err
		}
		reference := referenceARMID
		result.Id = &reference
	}

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

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

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

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

	// no assignment for property "Reference"

	// No error
	return nil
}

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

	// IgnoreMissingVnetServiceEndpoint
	if source.IgnoreMissingVnetServiceEndpoint != nil {
		ignoreMissingVnetServiceEndpoint := *source.IgnoreMissingVnetServiceEndpoint
		rule.IgnoreMissingVnetServiceEndpoint = &ignoreMissingVnetServiceEndpoint
	} else {
		rule.IgnoreMissingVnetServiceEndpoint = nil
	}

	// Reference
	if source.Reference != nil {
		reference := source.Reference.Copy()
		rule.Reference = &reference
	} else {
		rule.Reference = nil
	}

	// No error
	return nil
}

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

	// IgnoreMissingVnetServiceEndpoint
	if rule.IgnoreMissingVnetServiceEndpoint != nil {
		ignoreMissingVnetServiceEndpoint := *rule.IgnoreMissingVnetServiceEndpoint
		destination.IgnoreMissingVnetServiceEndpoint = &ignoreMissingVnetServiceEndpoint
	} else {
		destination.IgnoreMissingVnetServiceEndpoint = nil
	}

	// Reference
	if rule.Reference != nil {
		reference := rule.Reference.Copy()
		destination.Reference = &reference
	} else {
		destination.Reference = nil
	}

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

	// No error
	return nil
}

// Initialize_From_VirtualNetworkRule_STATUS populates our VirtualNetworkRule from the provided source VirtualNetworkRule_STATUS
func (rule *VirtualNetworkRule) Initialize_From_VirtualNetworkRule_STATUS(source *VirtualNetworkRule_STATUS) error {

	// IgnoreMissingVnetServiceEndpoint
	if source.IgnoreMissingVnetServiceEndpoint != nil {
		ignoreMissingVnetServiceEndpoint := *source.IgnoreMissingVnetServiceEndpoint
		rule.IgnoreMissingVnetServiceEndpoint = &ignoreMissingVnetServiceEndpoint
	} else {
		rule.IgnoreMissingVnetServiceEndpoint = nil
	}

	// Reference
	if source.Id != nil {
		reference := genruntime.CreateResourceReferenceFromARMID(*source.Id)
		rule.Reference = &reference
	} else {
		rule.Reference = nil
	}

	// No error
	return nil
}

// A rule governing the accessibility of a vault from a specific virtual network.
type VirtualNetworkRule_STATUS struct {
	// Id: Full resource id of a vnet subnet, such as
	// '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'.
	Id *string `json:"id,omitempty"`

	// IgnoreMissingVnetServiceEndpoint: Property to specify whether NRP will ignore the check if parent subnet has
	// serviceEndpoints configured.
	IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"`
}

var _ genruntime.FromARMConverter = &VirtualNetworkRule_STATUS{}

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

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

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

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

	// No error
	return nil
}

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

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

	// IgnoreMissingVnetServiceEndpoint
	if source.IgnoreMissingVnetServiceEndpoint != nil {
		ignoreMissingVnetServiceEndpoint := *source.IgnoreMissingVnetServiceEndpoint
		rule.IgnoreMissingVnetServiceEndpoint = &ignoreMissingVnetServiceEndpoint
	} else {
		rule.IgnoreMissingVnetServiceEndpoint = nil
	}

	// No error
	return nil
}

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

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

	// IgnoreMissingVnetServiceEndpoint
	if rule.IgnoreMissingVnetServiceEndpoint != nil {
		ignoreMissingVnetServiceEndpoint := *rule.IgnoreMissingVnetServiceEndpoint
		destination.IgnoreMissingVnetServiceEndpoint = &ignoreMissingVnetServiceEndpoint
	} else {
		destination.IgnoreMissingVnetServiceEndpoint = nil
	}

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

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"all","backup","create","delete","deleteissuers","get","getissuers","import","list","listissuers","managecontacts","manageissuers","purge","recover","restore","setissuers","update"}
type Permissions_Certificates string

const (
	Permissions_Certificates_All            = Permissions_Certificates("all")
	Permissions_Certificates_Backup         = Permissions_Certificates("backup")
	Permissions_Certificates_Create         = Permissions_Certificates("create")
	Permissions_Certificates_Delete         = Permissions_Certificates("delete")
	Permissions_Certificates_Deleteissuers  = Permissions_Certificates("deleteissuers")
	Permissions_Certificates_Get            = Permissions_Certificates("get")
	Permissions_Certificates_Getissuers     = Permissions_Certificates("getissuers")
	Permissions_Certificates_Import         = Permissions_Certificates("import")
	Permissions_Certificates_List           = Permissions_Certificates("list")
	Permissions_Certificates_Listissuers    = Permissions_Certificates("listissuers")
	Permissions_Certificates_Managecontacts = Permissions_Certificates("managecontacts")
	Permissions_Certificates_Manageissuers  = Permissions_Certificates("manageissuers")
	Permissions_Certificates_Purge          = Permissions_Certificates("purge")
	Permissions_Certificates_Recover        = Permissions_Certificates("recover")
	Permissions_Certificates_Restore        = Permissions_Certificates("restore")
	Permissions_Certificates_Setissuers     = Permissions_Certificates("setissuers")
	Permissions_Certificates_Update         = Permissions_Certificates("update")
)

// Mapping from string to Permissions_Certificates
var permissions_Certificates_Values = map[string]Permissions_Certificates{
	"all":            Permissions_Certificates_All,
	"backup":         Permissions_Certificates_Backup,
	"create":         Permissions_Certificates_Create,
	"delete":         Permissions_Certificates_Delete,
	"deleteissuers":  Permissions_Certificates_Deleteissuers,
	"get":            Permissions_Certificates_Get,
	"getissuers":     Permissions_Certificates_Getissuers,
	"import":         Permissions_Certificates_Import,
	"list":           Permissions_Certificates_List,
	"listissuers":    Permissions_Certificates_Listissuers,
	"managecontacts": Permissions_Certificates_Managecontacts,
	"manageissuers":  Permissions_Certificates_Manageissuers,
	"purge":          Permissions_Certificates_Purge,
	"recover":        Permissions_Certificates_Recover,
	"restore":        Permissions_Certificates_Restore,
	"setissuers":     Permissions_Certificates_Setissuers,
	"update":         Permissions_Certificates_Update,
}

type Permissions_Certificates_STATUS string

const (
	Permissions_Certificates_STATUS_All            = Permissions_Certificates_STATUS("all")
	Permissions_Certificates_STATUS_Backup         = Permissions_Certificates_STATUS("backup")
	Permissions_Certificates_STATUS_Create         = Permissions_Certificates_STATUS("create")
	Permissions_Certificates_STATUS_Delete         = Permissions_Certificates_STATUS("delete")
	Permissions_Certificates_STATUS_Deleteissuers  = Permissions_Certificates_STATUS("deleteissuers")
	Permissions_Certificates_STATUS_Get            = Permissions_Certificates_STATUS("get")
	Permissions_Certificates_STATUS_Getissuers     = Permissions_Certificates_STATUS("getissuers")
	Permissions_Certificates_STATUS_Import         = Permissions_Certificates_STATUS("import")
	Permissions_Certificates_STATUS_List           = Permissions_Certificates_STATUS("list")
	Permissions_Certificates_STATUS_Listissuers    = Permissions_Certificates_STATUS("listissuers")
	Permissions_Certificates_STATUS_Managecontacts = Permissions_Certificates_STATUS("managecontacts")
	Permissions_Certificates_STATUS_Manageissuers  = Permissions_Certificates_STATUS("manageissuers")
	Permissions_Certificates_STATUS_Purge          = Permissions_Certificates_STATUS("purge")
	Permissions_Certificates_STATUS_Recover        = Permissions_Certificates_STATUS("recover")
	Permissions_Certificates_STATUS_Restore        = Permissions_Certificates_STATUS("restore")
	Permissions_Certificates_STATUS_Setissuers     = Permissions_Certificates_STATUS("setissuers")
	Permissions_Certificates_STATUS_Update         = Permissions_Certificates_STATUS("update")
)

// Mapping from string to Permissions_Certificates_STATUS
var permissions_Certificates_STATUS_Values = map[string]Permissions_Certificates_STATUS{
	"all":            Permissions_Certificates_STATUS_All,
	"backup":         Permissions_Certificates_STATUS_Backup,
	"create":         Permissions_Certificates_STATUS_Create,
	"delete":         Permissions_Certificates_STATUS_Delete,
	"deleteissuers":  Permissions_Certificates_STATUS_Deleteissuers,
	"get":            Permissions_Certificates_STATUS_Get,
	"getissuers":     Permissions_Certificates_STATUS_Getissuers,
	"import":         Permissions_Certificates_STATUS_Import,
	"list":           Permissions_Certificates_STATUS_List,
	"listissuers":    Permissions_Certificates_STATUS_Listissuers,
	"managecontacts": Permissions_Certificates_STATUS_Managecontacts,
	"manageissuers":  Permissions_Certificates_STATUS_Manageissuers,
	"purge":          Permissions_Certificates_STATUS_Purge,
	"recover":        Permissions_Certificates_STATUS_Recover,
	"restore":        Permissions_Certificates_STATUS_Restore,
	"setissuers":     Permissions_Certificates_STATUS_Setissuers,
	"update":         Permissions_Certificates_STATUS_Update,
}

// +kubebuilder:validation:Enum={"all","backup","create","decrypt","delete","encrypt","get","getrotationpolicy","import","list","purge","recover","release","restore","rotate","setrotationpolicy","sign","unwrapKey","update","verify","wrapKey"}
type Permissions_Keys string

const (
	Permissions_Keys_All               = Permissions_Keys("all")
	Permissions_Keys_Backup            = Permissions_Keys("backup")
	Permissions_Keys_Create            = Permissions_Keys("create")
	Permissions_Keys_Decrypt           = Permissions_Keys("decrypt")
	Permissions_Keys_Delete            = Permissions_Keys("delete")
	Permissions_Keys_Encrypt           = Permissions_Keys("encrypt")
	Permissions_Keys_Get               = Permissions_Keys("get")
	Permissions_Keys_Getrotationpolicy = Permissions_Keys("getrotationpolicy")
	Permissions_Keys_Import            = Permissions_Keys("import")
	Permissions_Keys_List              = Permissions_Keys("list")
	Permissions_Keys_Purge             = Permissions_Keys("purge")
	Permissions_Keys_Recover           = Permissions_Keys("recover")
	Permissions_Keys_Release           = Permissions_Keys("release")
	Permissions_Keys_Restore           = Permissions_Keys("restore")
	Permissions_Keys_Rotate            = Permissions_Keys("rotate")
	Permissions_Keys_Setrotationpolicy = Permissions_Keys("setrotationpolicy")
	Permissions_Keys_Sign              = Permissions_Keys("sign")
	Permissions_Keys_UnwrapKey         = Permissions_Keys("unwrapKey")
	Permissions_Keys_Update            = Permissions_Keys("update")
	Permissions_Keys_Verify            = Permissions_Keys("verify")
	Permissions_Keys_WrapKey           = Permissions_Keys("wrapKey")
)

// Mapping from string to Permissions_Keys
var permissions_Keys_Values = map[string]Permissions_Keys{
	"all":               Permissions_Keys_All,
	"backup":            Permissions_Keys_Backup,
	"create":            Permissions_Keys_Create,
	"decrypt":           Permissions_Keys_Decrypt,
	"delete":            Permissions_Keys_Delete,
	"encrypt":           Permissions_Keys_Encrypt,
	"get":               Permissions_Keys_Get,
	"getrotationpolicy": Permissions_Keys_Getrotationpolicy,
	"import":            Permissions_Keys_Import,
	"list":              Permissions_Keys_List,
	"purge":             Permissions_Keys_Purge,
	"recover":           Permissions_Keys_Recover,
	"release":           Permissions_Keys_Release,
	"restore":           Permissions_Keys_Restore,
	"rotate":            Permissions_Keys_Rotate,
	"setrotationpolicy": Permissions_Keys_Setrotationpolicy,
	"sign":              Permissions_Keys_Sign,
	"unwrapkey":         Permissions_Keys_UnwrapKey,
	"update":            Permissions_Keys_Update,
	"verify":            Permissions_Keys_Verify,
	"wrapkey":           Permissions_Keys_WrapKey,
}

type Permissions_Keys_STATUS string

const (
	Permissions_Keys_STATUS_All               = Permissions_Keys_STATUS("all")
	Permissions_Keys_STATUS_Backup            = Permissions_Keys_STATUS("backup")
	Permissions_Keys_STATUS_Create            = Permissions_Keys_STATUS("create")
	Permissions_Keys_STATUS_Decrypt           = Permissions_Keys_STATUS("decrypt")
	Permissions_Keys_STATUS_Delete            = Permissions_Keys_STATUS("delete")
	Permissions_Keys_STATUS_Encrypt           = Permissions_Keys_STATUS("encrypt")
	Permissions_Keys_STATUS_Get               = Permissions_Keys_STATUS("get")
	Permissions_Keys_STATUS_Getrotationpolicy = Permissions_Keys_STATUS("getrotationpolicy")
	Permissions_Keys_STATUS_Import            = Permissions_Keys_STATUS("import")
	Permissions_Keys_STATUS_List              = Permissions_Keys_STATUS("list")
	Permissions_Keys_STATUS_Purge             = Permissions_Keys_STATUS("purge")
	Permissions_Keys_STATUS_Recover           = Permissions_Keys_STATUS("recover")
	Permissions_Keys_STATUS_Release           = Permissions_Keys_STATUS("release")
	Permissions_Keys_STATUS_Restore           = Permissions_Keys_STATUS("restore")
	Permissions_Keys_STATUS_Rotate            = Permissions_Keys_STATUS("rotate")
	Permissions_Keys_STATUS_Setrotationpolicy = Permissions_Keys_STATUS("setrotationpolicy")
	Permissions_Keys_STATUS_Sign              = Permissions_Keys_STATUS("sign")
	Permissions_Keys_STATUS_UnwrapKey         = Permissions_Keys_STATUS("unwrapKey")
	Permissions_Keys_STATUS_Update            = Permissions_Keys_STATUS("update")
	Permissions_Keys_STATUS_Verify            = Permissions_Keys_STATUS("verify")
	Permissions_Keys_STATUS_WrapKey           = Permissions_Keys_STATUS("wrapKey")
)

// Mapping from string to Permissions_Keys_STATUS
var permissions_Keys_STATUS_Values = map[string]Permissions_Keys_STATUS{
	"all":               Permissions_Keys_STATUS_All,
	"backup":            Permissions_Keys_STATUS_Backup,
	"create":            Permissions_Keys_STATUS_Create,
	"decrypt":           Permissions_Keys_STATUS_Decrypt,
	"delete":            Permissions_Keys_STATUS_Delete,
	"encrypt":           Permissions_Keys_STATUS_Encrypt,
	"get":               Permissions_Keys_STATUS_Get,
	"getrotationpolicy": Permissions_Keys_STATUS_Getrotationpolicy,
	"import":            Permissions_Keys_STATUS_Import,
	"list":              Permissions_Keys_STATUS_List,
	"purge":             Permissions_Keys_STATUS_Purge,
	"recover":           Permissions_Keys_STATUS_Recover,
	"release":           Permissions_Keys_STATUS_Release,
	"restore":           Permissions_Keys_STATUS_Restore,
	"rotate":            Permissions_Keys_STATUS_Rotate,
	"setrotationpolicy": Permissions_Keys_STATUS_Setrotationpolicy,
	"sign":              Permissions_Keys_STATUS_Sign,
	"unwrapkey":         Permissions_Keys_STATUS_UnwrapKey,
	"update":            Permissions_Keys_STATUS_Update,
	"verify":            Permissions_Keys_STATUS_Verify,
	"wrapkey":           Permissions_Keys_STATUS_WrapKey,
}

// +kubebuilder:validation:Enum={"all","backup","delete","get","list","purge","recover","restore","set"}
type Permissions_Secrets string

const (
	Permissions_Secrets_All     = Permissions_Secrets("all")
	Permissions_Secrets_Backup  = Permissions_Secrets("backup")
	Permissions_Secrets_Delete  = Permissions_Secrets("delete")
	Permissions_Secrets_Get     = Permissions_Secrets("get")
	Permissions_Secrets_List    = Permissions_Secrets("list")
	Permissions_Secrets_Purge   = Permissions_Secrets("purge")
	Permissions_Secrets_Recover = Permissions_Secrets("recover")
	Permissions_Secrets_Restore = Permissions_Secrets("restore")
	Permissions_Secrets_Set     = Permissions_Secrets("set")
)

// Mapping from string to Permissions_Secrets
var permissions_Secrets_Values = map[string]Permissions_Secrets{
	"all":     Permissions_Secrets_All,
	"backup":  Permissions_Secrets_Backup,
	"delete":  Permissions_Secrets_Delete,
	"get":     Permissions_Secrets_Get,
	"list":    Permissions_Secrets_List,
	"purge":   Permissions_Secrets_Purge,
	"recover": Permissions_Secrets_Recover,
	"restore": Permissions_Secrets_Restore,
	"set":     Permissions_Secrets_Set,
}

type Permissions_Secrets_STATUS string

const (
	Permissions_Secrets_STATUS_All     = Permissions_Secrets_STATUS("all")
	Permissions_Secrets_STATUS_Backup  = Permissions_Secrets_STATUS("backup")
	Permissions_Secrets_STATUS_Delete  = Permissions_Secrets_STATUS("delete")
	Permissions_Secrets_STATUS_Get     = Permissions_Secrets_STATUS("get")
	Permissions_Secrets_STATUS_List    = Permissions_Secrets_STATUS("list")
	Permissions_Secrets_STATUS_Purge   = Permissions_Secrets_STATUS("purge")
	Permissions_Secrets_STATUS_Recover = Permissions_Secrets_STATUS("recover")
	Permissions_Secrets_STATUS_Restore = Permissions_Secrets_STATUS("restore")
	Permissions_Secrets_STATUS_Set     = Permissions_Secrets_STATUS("set")
)

// Mapping from string to Permissions_Secrets_STATUS
var permissions_Secrets_STATUS_Values = map[string]Permissions_Secrets_STATUS{
	"all":     Permissions_Secrets_STATUS_All,
	"backup":  Permissions_Secrets_STATUS_Backup,
	"delete":  Permissions_Secrets_STATUS_Delete,
	"get":     Permissions_Secrets_STATUS_Get,
	"list":    Permissions_Secrets_STATUS_List,
	"purge":   Permissions_Secrets_STATUS_Purge,
	"recover": Permissions_Secrets_STATUS_Recover,
	"restore": Permissions_Secrets_STATUS_Restore,
	"set":     Permissions_Secrets_STATUS_Set,
}

// +kubebuilder:validation:Enum={"all","backup","delete","deletesas","get","getsas","list","listsas","purge","recover","regeneratekey","restore","set","setsas","update"}
type Permissions_Storage string

const (
	Permissions_Storage_All           = Permissions_Storage("all")
	Permissions_Storage_Backup        = Permissions_Storage("backup")
	Permissions_Storage_Delete        = Permissions_Storage("delete")
	Permissions_Storage_Deletesas     = Permissions_Storage("deletesas")
	Permissions_Storage_Get           = Permissions_Storage("get")
	Permissions_Storage_Getsas        = Permissions_Storage("getsas")
	Permissions_Storage_List          = Permissions_Storage("list")
	Permissions_Storage_Listsas       = Permissions_Storage("listsas")
	Permissions_Storage_Purge         = Permissions_Storage("purge")
	Permissions_Storage_Recover       = Permissions_Storage("recover")
	Permissions_Storage_Regeneratekey = Permissions_Storage("regeneratekey")
	Permissions_Storage_Restore       = Permissions_Storage("restore")
	Permissions_Storage_Set           = Permissions_Storage("set")
	Permissions_Storage_Setsas        = Permissions_Storage("setsas")
	Permissions_Storage_Update        = Permissions_Storage("update")
)

// Mapping from string to Permissions_Storage
var permissions_Storage_Values = map[string]Permissions_Storage{
	"all":           Permissions_Storage_All,
	"backup":        Permissions_Storage_Backup,
	"delete":        Permissions_Storage_Delete,
	"deletesas":     Permissions_Storage_Deletesas,
	"get":           Permissions_Storage_Get,
	"getsas":        Permissions_Storage_Getsas,
	"list":          Permissions_Storage_List,
	"listsas":       Permissions_Storage_Listsas,
	"purge":         Permissions_Storage_Purge,
	"recover":       Permissions_Storage_Recover,
	"regeneratekey": Permissions_Storage_Regeneratekey,
	"restore":       Permissions_Storage_Restore,
	"set":           Permissions_Storage_Set,
	"setsas":        Permissions_Storage_Setsas,
	"update":        Permissions_Storage_Update,
}

type Permissions_Storage_STATUS string

const (
	Permissions_Storage_STATUS_All           = Permissions_Storage_STATUS("all")
	Permissions_Storage_STATUS_Backup        = Permissions_Storage_STATUS("backup")
	Permissions_Storage_STATUS_Delete        = Permissions_Storage_STATUS("delete")
	Permissions_Storage_STATUS_Deletesas     = Permissions_Storage_STATUS("deletesas")
	Permissions_Storage_STATUS_Get           = Permissions_Storage_STATUS("get")
	Permissions_Storage_STATUS_Getsas        = Permissions_Storage_STATUS("getsas")
	Permissions_Storage_STATUS_List          = Permissions_Storage_STATUS("list")
	Permissions_Storage_STATUS_Listsas       = Permissions_Storage_STATUS("listsas")
	Permissions_Storage_STATUS_Purge         = Permissions_Storage_STATUS("purge")
	Permissions_Storage_STATUS_Recover       = Permissions_Storage_STATUS("recover")
	Permissions_Storage_STATUS_Regeneratekey = Permissions_Storage_STATUS("regeneratekey")
	Permissions_Storage_STATUS_Restore       = Permissions_Storage_STATUS("restore")
	Permissions_Storage_STATUS_Set           = Permissions_Storage_STATUS("set")
	Permissions_Storage_STATUS_Setsas        = Permissions_Storage_STATUS("setsas")
	Permissions_Storage_STATUS_Update        = Permissions_Storage_STATUS("update")
)

// Mapping from string to Permissions_Storage_STATUS
var permissions_Storage_STATUS_Values = map[string]Permissions_Storage_STATUS{
	"all":           Permissions_Storage_STATUS_All,
	"backup":        Permissions_Storage_STATUS_Backup,
	"delete":        Permissions_Storage_STATUS_Delete,
	"deletesas":     Permissions_Storage_STATUS_Deletesas,
	"get":           Permissions_Storage_STATUS_Get,
	"getsas":        Permissions_Storage_STATUS_Getsas,
	"list":          Permissions_Storage_STATUS_List,
	"listsas":       Permissions_Storage_STATUS_Listsas,
	"purge":         Permissions_Storage_STATUS_Purge,
	"recover":       Permissions_Storage_STATUS_Recover,
	"regeneratekey": Permissions_Storage_STATUS_Regeneratekey,
	"restore":       Permissions_Storage_STATUS_Restore,
	"set":           Permissions_Storage_STATUS_Set,
	"setsas":        Permissions_Storage_STATUS_Setsas,
	"update":        Permissions_Storage_STATUS_Update,
}

// The private endpoint connection status.
type PrivateEndpointServiceConnectionStatus_STATUS string

const (
	PrivateEndpointServiceConnectionStatus_STATUS_Approved     = PrivateEndpointServiceConnectionStatus_STATUS("Approved")
	PrivateEndpointServiceConnectionStatus_STATUS_Disconnected = PrivateEndpointServiceConnectionStatus_STATUS("Disconnected")
	PrivateEndpointServiceConnectionStatus_STATUS_Pending      = PrivateEndpointServiceConnectionStatus_STATUS("Pending")
	PrivateEndpointServiceConnectionStatus_STATUS_Rejected     = PrivateEndpointServiceConnectionStatus_STATUS("Rejected")
)

// Mapping from string to PrivateEndpointServiceConnectionStatus_STATUS
var privateEndpointServiceConnectionStatus_STATUS_Values = map[string]PrivateEndpointServiceConnectionStatus_STATUS{
	"approved":     PrivateEndpointServiceConnectionStatus_STATUS_Approved,
	"disconnected": PrivateEndpointServiceConnectionStatus_STATUS_Disconnected,
	"pending":      PrivateEndpointServiceConnectionStatus_STATUS_Pending,
	"rejected":     PrivateEndpointServiceConnectionStatus_STATUS_Rejected,
}

type PrivateLinkServiceConnectionState_ActionsRequired_STATUS string

const PrivateLinkServiceConnectionState_ActionsRequired_STATUS_None = PrivateLinkServiceConnectionState_ActionsRequired_STATUS("None")

// Mapping from string to PrivateLinkServiceConnectionState_ActionsRequired_STATUS
var privateLinkServiceConnectionState_ActionsRequired_STATUS_Values = map[string]PrivateLinkServiceConnectionState_ActionsRequired_STATUS{
	"none": PrivateLinkServiceConnectionState_ActionsRequired_STATUS_None,
}

func init() {
	SchemeBuilder.Register(&Vault{}, &VaultList{})
}
