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

import (
	"fmt"
	arm "github.com/Azure/azure-service-operator/v2/api/compute/v1api20200930/arm"
	storage "github.com/Azure/azure-service-operator/v2/api/compute/v1api20200930/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,compute}
// +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: /compute/resource-manager/Microsoft.Compute/DiskRP/stable/2020-09-30/disk.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}
type Snapshot struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              Snapshot_Spec   `json:"spec,omitempty"`
	Status            Snapshot_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &Snapshot{}

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

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

var _ conversion.Convertible = &Snapshot{}

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

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

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

	return nil
}

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

	return nil
}

var _ configmaps.Exporter = &Snapshot{}

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

var _ secrets.Exporter = &Snapshot{}

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

var _ genruntime.KubernetesResource = &Snapshot{}

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

// GetAPIVersion returns the ARM API version of the resource. This is always "2020-09-30"
func (snapshot Snapshot) GetAPIVersion() string {
	return "2020-09-30"
}

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

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

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.Compute/snapshots"
func (snapshot *Snapshot) GetType() string {
	return "Microsoft.Compute/snapshots"
}

// NewEmptyStatus returns a new empty (blank) status
func (snapshot *Snapshot) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &Snapshot_STATUS{}
}

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

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

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

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

	snapshot.Status = st
	return nil
}

// AssignProperties_From_Snapshot populates our Snapshot from the provided source Snapshot
func (snapshot *Snapshot) AssignProperties_From_Snapshot(source *storage.Snapshot) error {

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

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

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

	// No error
	return nil
}

// AssignProperties_To_Snapshot populates the provided destination Snapshot from our Snapshot
func (snapshot *Snapshot) AssignProperties_To_Snapshot(destination *storage.Snapshot) error {

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

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

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

// +kubebuilder:object:root=true
// Generator information:
// - Generated from: /compute/resource-manager/Microsoft.Compute/DiskRP/stable/2020-09-30/disk.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}
type SnapshotList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Snapshot `json:"items"`
}

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

	// +kubebuilder:validation:Required
	// CreationData: Disk source information. CreationData information cannot be changed after the disk has been created.
	CreationData *CreationData `json:"creationData,omitempty"`

	// DiskAccessReference: ARM id of the DiskAccess resource for using private endpoints on disks.
	DiskAccessReference *genruntime.ResourceReference `armReference:"DiskAccessId" json:"diskAccessReference,omitempty"`

	// DiskSizeGB: If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to
	// create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only
	// allowed if the disk is not attached to a running VM, and can only increase the disk's size.
	DiskSizeGB *int `json:"diskSizeGB,omitempty"`

	// Encryption: Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
	Encryption *Encryption `json:"encryption,omitempty"`

	// EncryptionSettingsCollection: Encryption settings collection used be Azure Disk Encryption, can contain multiple
	// encryption settings per disk or snapshot.
	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`

	// ExtendedLocation: The extended location where the snapshot will be created. Extended location cannot be changed.
	ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`

	// HyperVGeneration: The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
	HyperVGeneration *SnapshotProperties_HyperVGeneration `json:"hyperVGeneration,omitempty"`

	// Incremental: Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full
	// snapshots and can be diffed.
	Incremental *bool `json:"incremental,omitempty"`

	// +kubebuilder:validation:Required
	// Location: Resource location
	Location *string `json:"location,omitempty"`

	// NetworkAccessPolicy: Policy for accessing the disk via network.
	NetworkAccessPolicy *NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`

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

	// OsType: The Operating System type.
	OsType *SnapshotProperties_OsType `json:"osType,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"`

	// PurchasePlan: Purchase plan information for the image from which the source disk for the snapshot was originally created.
	PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`

	// Sku: The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for
	// incremental  snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot
	Sku *SnapshotSku `json:"sku,omitempty"`

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

var _ genruntime.ARMTransformer = &Snapshot_Spec{}

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

	// Set property "ExtendedLocation":
	if snapshot.ExtendedLocation != nil {
		extendedLocation_ARM, err := snapshot.ExtendedLocation.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		extendedLocation := *extendedLocation_ARM.(*arm.ExtendedLocation)
		result.ExtendedLocation = &extendedLocation
	}

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

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

	// Set property "Properties":
	if snapshot.CreationData != nil ||
		snapshot.DiskAccessReference != nil ||
		snapshot.DiskSizeGB != nil ||
		snapshot.Encryption != nil ||
		snapshot.EncryptionSettingsCollection != nil ||
		snapshot.HyperVGeneration != nil ||
		snapshot.Incremental != nil ||
		snapshot.NetworkAccessPolicy != nil ||
		snapshot.OsType != nil ||
		snapshot.PurchasePlan != nil {
		result.Properties = &arm.SnapshotProperties{}
	}
	if snapshot.CreationData != nil {
		creationData_ARM, err := snapshot.CreationData.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		creationData := *creationData_ARM.(*arm.CreationData)
		result.Properties.CreationData = &creationData
	}
	if snapshot.DiskAccessReference != nil {
		diskAccessIdARMID, err := resolved.ResolvedReferences.Lookup(*snapshot.DiskAccessReference)
		if err != nil {
			return nil, err
		}
		diskAccessId := diskAccessIdARMID
		result.Properties.DiskAccessId = &diskAccessId
	}
	if snapshot.DiskSizeGB != nil {
		diskSizeGB := *snapshot.DiskSizeGB
		result.Properties.DiskSizeGB = &diskSizeGB
	}
	if snapshot.Encryption != nil {
		encryption_ARM, err := snapshot.Encryption.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		encryption := *encryption_ARM.(*arm.Encryption)
		result.Properties.Encryption = &encryption
	}
	if snapshot.EncryptionSettingsCollection != nil {
		encryptionSettingsCollection_ARM, err := snapshot.EncryptionSettingsCollection.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		encryptionSettingsCollection := *encryptionSettingsCollection_ARM.(*arm.EncryptionSettingsCollection)
		result.Properties.EncryptionSettingsCollection = &encryptionSettingsCollection
	}
	if snapshot.HyperVGeneration != nil {
		var temp string
		temp = string(*snapshot.HyperVGeneration)
		hyperVGeneration := arm.SnapshotProperties_HyperVGeneration(temp)
		result.Properties.HyperVGeneration = &hyperVGeneration
	}
	if snapshot.Incremental != nil {
		incremental := *snapshot.Incremental
		result.Properties.Incremental = &incremental
	}
	if snapshot.NetworkAccessPolicy != nil {
		var temp string
		temp = string(*snapshot.NetworkAccessPolicy)
		networkAccessPolicy := arm.NetworkAccessPolicy(temp)
		result.Properties.NetworkAccessPolicy = &networkAccessPolicy
	}
	if snapshot.OsType != nil {
		var temp string
		temp = string(*snapshot.OsType)
		osType := arm.SnapshotProperties_OsType(temp)
		result.Properties.OsType = &osType
	}
	if snapshot.PurchasePlan != nil {
		purchasePlan_ARM, err := snapshot.PurchasePlan.ConvertToARM(resolved)
		if err != nil {
			return nil, err
		}
		purchasePlan := *purchasePlan_ARM.(*arm.PurchasePlan)
		result.Properties.PurchasePlan = &purchasePlan
	}

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

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

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

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

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

	// Set property "CreationData":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.CreationData != nil {
			var creationData1 CreationData
			err := creationData1.PopulateFromARM(owner, *typedInput.Properties.CreationData)
			if err != nil {
				return err
			}
			creationData := creationData1
			snapshot.CreationData = &creationData
		}
	}

	// no assignment for property "DiskAccessReference"

	// Set property "DiskSizeGB":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.DiskSizeGB != nil {
			diskSizeGB := *typedInput.Properties.DiskSizeGB
			snapshot.DiskSizeGB = &diskSizeGB
		}
	}

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

	// Set property "EncryptionSettingsCollection":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EncryptionSettingsCollection != nil {
			var encryptionSettingsCollection1 EncryptionSettingsCollection
			err := encryptionSettingsCollection1.PopulateFromARM(owner, *typedInput.Properties.EncryptionSettingsCollection)
			if err != nil {
				return err
			}
			encryptionSettingsCollection := encryptionSettingsCollection1
			snapshot.EncryptionSettingsCollection = &encryptionSettingsCollection
		}
	}

	// Set property "ExtendedLocation":
	if typedInput.ExtendedLocation != nil {
		var extendedLocation1 ExtendedLocation
		err := extendedLocation1.PopulateFromARM(owner, *typedInput.ExtendedLocation)
		if err != nil {
			return err
		}
		extendedLocation := extendedLocation1
		snapshot.ExtendedLocation = &extendedLocation
	}

	// Set property "HyperVGeneration":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.HyperVGeneration != nil {
			var temp string
			temp = string(*typedInput.Properties.HyperVGeneration)
			hyperVGeneration := SnapshotProperties_HyperVGeneration(temp)
			snapshot.HyperVGeneration = &hyperVGeneration
		}
	}

	// Set property "Incremental":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Incremental != nil {
			incremental := *typedInput.Properties.Incremental
			snapshot.Incremental = &incremental
		}
	}

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

	// Set property "NetworkAccessPolicy":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.NetworkAccessPolicy != nil {
			var temp string
			temp = string(*typedInput.Properties.NetworkAccessPolicy)
			networkAccessPolicy := NetworkAccessPolicy(temp)
			snapshot.NetworkAccessPolicy = &networkAccessPolicy
		}
	}

	// no assignment for property "OperatorSpec"

	// Set property "OsType":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.OsType != nil {
			var temp string
			temp = string(*typedInput.Properties.OsType)
			osType := SnapshotProperties_OsType(temp)
			snapshot.OsType = &osType
		}
	}

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

	// Set property "PurchasePlan":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PurchasePlan != nil {
			var purchasePlan1 PurchasePlan
			err := purchasePlan1.PopulateFromARM(owner, *typedInput.Properties.PurchasePlan)
			if err != nil {
				return err
			}
			purchasePlan := purchasePlan1
			snapshot.PurchasePlan = &purchasePlan
		}
	}

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

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

	// No error
	return nil
}

var _ genruntime.ConvertibleSpec = &Snapshot_Spec{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.Snapshot_Spec{}
	err := snapshot.AssignProperties_To_Snapshot_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_Snapshot_Spec populates our Snapshot_Spec from the provided source Snapshot_Spec
func (snapshot *Snapshot_Spec) AssignProperties_From_Snapshot_Spec(source *storage.Snapshot_Spec) error {

	// AzureName
	snapshot.AzureName = source.AzureName

	// CreationData
	if source.CreationData != nil {
		var creationDatum CreationData
		err := creationDatum.AssignProperties_From_CreationData(source.CreationData)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_CreationData() to populate field CreationData")
		}
		snapshot.CreationData = &creationDatum
	} else {
		snapshot.CreationData = nil
	}

	// DiskAccessReference
	if source.DiskAccessReference != nil {
		diskAccessReference := source.DiskAccessReference.Copy()
		snapshot.DiskAccessReference = &diskAccessReference
	} else {
		snapshot.DiskAccessReference = nil
	}

	// DiskSizeGB
	snapshot.DiskSizeGB = genruntime.ClonePointerToInt(source.DiskSizeGB)

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

	// EncryptionSettingsCollection
	if source.EncryptionSettingsCollection != nil {
		var encryptionSettingsCollection EncryptionSettingsCollection
		err := encryptionSettingsCollection.AssignProperties_From_EncryptionSettingsCollection(source.EncryptionSettingsCollection)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EncryptionSettingsCollection() to populate field EncryptionSettingsCollection")
		}
		snapshot.EncryptionSettingsCollection = &encryptionSettingsCollection
	} else {
		snapshot.EncryptionSettingsCollection = nil
	}

	// ExtendedLocation
	if source.ExtendedLocation != nil {
		var extendedLocation ExtendedLocation
		err := extendedLocation.AssignProperties_From_ExtendedLocation(source.ExtendedLocation)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ExtendedLocation() to populate field ExtendedLocation")
		}
		snapshot.ExtendedLocation = &extendedLocation
	} else {
		snapshot.ExtendedLocation = nil
	}

	// HyperVGeneration
	if source.HyperVGeneration != nil {
		hyperVGeneration := *source.HyperVGeneration
		hyperVGenerationTemp := genruntime.ToEnum(hyperVGeneration, snapshotProperties_HyperVGeneration_Values)
		snapshot.HyperVGeneration = &hyperVGenerationTemp
	} else {
		snapshot.HyperVGeneration = nil
	}

	// Incremental
	if source.Incremental != nil {
		incremental := *source.Incremental
		snapshot.Incremental = &incremental
	} else {
		snapshot.Incremental = nil
	}

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

	// NetworkAccessPolicy
	if source.NetworkAccessPolicy != nil {
		networkAccessPolicy := *source.NetworkAccessPolicy
		networkAccessPolicyTemp := genruntime.ToEnum(networkAccessPolicy, networkAccessPolicy_Values)
		snapshot.NetworkAccessPolicy = &networkAccessPolicyTemp
	} else {
		snapshot.NetworkAccessPolicy = nil
	}

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

	// OsType
	if source.OsType != nil {
		osType := *source.OsType
		osTypeTemp := genruntime.ToEnum(osType, snapshotProperties_OsType_Values)
		snapshot.OsType = &osTypeTemp
	} else {
		snapshot.OsType = nil
	}

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

	// PurchasePlan
	if source.PurchasePlan != nil {
		var purchasePlan PurchasePlan
		err := purchasePlan.AssignProperties_From_PurchasePlan(source.PurchasePlan)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_PurchasePlan() to populate field PurchasePlan")
		}
		snapshot.PurchasePlan = &purchasePlan
	} else {
		snapshot.PurchasePlan = nil
	}

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

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

	// No error
	return nil
}

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

	// AzureName
	destination.AzureName = snapshot.AzureName

	// CreationData
	if snapshot.CreationData != nil {
		var creationDatum storage.CreationData
		err := snapshot.CreationData.AssignProperties_To_CreationData(&creationDatum)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_CreationData() to populate field CreationData")
		}
		destination.CreationData = &creationDatum
	} else {
		destination.CreationData = nil
	}

	// DiskAccessReference
	if snapshot.DiskAccessReference != nil {
		diskAccessReference := snapshot.DiskAccessReference.Copy()
		destination.DiskAccessReference = &diskAccessReference
	} else {
		destination.DiskAccessReference = nil
	}

	// DiskSizeGB
	destination.DiskSizeGB = genruntime.ClonePointerToInt(snapshot.DiskSizeGB)

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

	// EncryptionSettingsCollection
	if snapshot.EncryptionSettingsCollection != nil {
		var encryptionSettingsCollection storage.EncryptionSettingsCollection
		err := snapshot.EncryptionSettingsCollection.AssignProperties_To_EncryptionSettingsCollection(&encryptionSettingsCollection)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EncryptionSettingsCollection() to populate field EncryptionSettingsCollection")
		}
		destination.EncryptionSettingsCollection = &encryptionSettingsCollection
	} else {
		destination.EncryptionSettingsCollection = nil
	}

	// ExtendedLocation
	if snapshot.ExtendedLocation != nil {
		var extendedLocation storage.ExtendedLocation
		err := snapshot.ExtendedLocation.AssignProperties_To_ExtendedLocation(&extendedLocation)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ExtendedLocation() to populate field ExtendedLocation")
		}
		destination.ExtendedLocation = &extendedLocation
	} else {
		destination.ExtendedLocation = nil
	}

	// HyperVGeneration
	if snapshot.HyperVGeneration != nil {
		hyperVGeneration := string(*snapshot.HyperVGeneration)
		destination.HyperVGeneration = &hyperVGeneration
	} else {
		destination.HyperVGeneration = nil
	}

	// Incremental
	if snapshot.Incremental != nil {
		incremental := *snapshot.Incremental
		destination.Incremental = &incremental
	} else {
		destination.Incremental = nil
	}

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

	// NetworkAccessPolicy
	if snapshot.NetworkAccessPolicy != nil {
		networkAccessPolicy := string(*snapshot.NetworkAccessPolicy)
		destination.NetworkAccessPolicy = &networkAccessPolicy
	} else {
		destination.NetworkAccessPolicy = nil
	}

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

	// OriginalVersion
	destination.OriginalVersion = snapshot.OriginalVersion()

	// OsType
	if snapshot.OsType != nil {
		osType := string(*snapshot.OsType)
		destination.OsType = &osType
	} else {
		destination.OsType = nil
	}

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

	// PurchasePlan
	if snapshot.PurchasePlan != nil {
		var purchasePlan storage.PurchasePlan
		err := snapshot.PurchasePlan.AssignProperties_To_PurchasePlan(&purchasePlan)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_PurchasePlan() to populate field PurchasePlan")
		}
		destination.PurchasePlan = &purchasePlan
	} else {
		destination.PurchasePlan = nil
	}

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

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

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

	// No error
	return nil
}

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

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

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

	// CreationData: Disk source information. CreationData information cannot be changed after the disk has been created.
	CreationData *CreationData_STATUS `json:"creationData,omitempty"`

	// DiskAccessId: ARM id of the DiskAccess resource for using private endpoints on disks.
	DiskAccessId *string `json:"diskAccessId,omitempty"`

	// DiskSizeBytes: The size of the disk in bytes. This field is read only.
	DiskSizeBytes *int `json:"diskSizeBytes,omitempty"`

	// DiskSizeGB: If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to
	// create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only
	// allowed if the disk is not attached to a running VM, and can only increase the disk's size.
	DiskSizeGB *int `json:"diskSizeGB,omitempty"`

	// DiskState: The state of the snapshot.
	DiskState *DiskState_STATUS `json:"diskState,omitempty"`

	// Encryption: Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
	Encryption *Encryption_STATUS `json:"encryption,omitempty"`

	// EncryptionSettingsCollection: Encryption settings collection used be Azure Disk Encryption, can contain multiple
	// encryption settings per disk or snapshot.
	EncryptionSettingsCollection *EncryptionSettingsCollection_STATUS `json:"encryptionSettingsCollection,omitempty"`

	// ExtendedLocation: The extended location where the snapshot will be created. Extended location cannot be changed.
	ExtendedLocation *ExtendedLocation_STATUS `json:"extendedLocation,omitempty"`

	// HyperVGeneration: The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
	HyperVGeneration *SnapshotProperties_HyperVGeneration_STATUS `json:"hyperVGeneration,omitempty"`

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

	// Incremental: Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full
	// snapshots and can be diffed.
	Incremental *bool `json:"incremental,omitempty"`

	// Location: Resource location
	Location *string `json:"location,omitempty"`

	// ManagedBy: Unused. Always Null.
	ManagedBy *string `json:"managedBy,omitempty"`

	// Name: Resource name
	Name *string `json:"name,omitempty"`

	// NetworkAccessPolicy: Policy for accessing the disk via network.
	NetworkAccessPolicy *NetworkAccessPolicy_STATUS `json:"networkAccessPolicy,omitempty"`

	// OsType: The Operating System type.
	OsType *SnapshotProperties_OsType_STATUS `json:"osType,omitempty"`

	// ProvisioningState: The disk provisioning state.
	ProvisioningState *string `json:"provisioningState,omitempty"`

	// PurchasePlan: Purchase plan information for the image from which the source disk for the snapshot was originally created.
	PurchasePlan *PurchasePlan_STATUS `json:"purchasePlan,omitempty"`

	// Sku: The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for
	// incremental  snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot
	Sku *SnapshotSku_STATUS `json:"sku,omitempty"`

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

	// TimeCreated: The time when the snapshot was created.
	TimeCreated *string `json:"timeCreated,omitempty"`

	// Type: Resource type
	Type *string `json:"type,omitempty"`

	// UniqueId: Unique Guid identifying the resource.
	UniqueId *string `json:"uniqueId,omitempty"`
}

var _ genruntime.ConvertibleStatus = &Snapshot_STATUS{}

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

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

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

	return nil
}

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

	// Convert to an intermediate form
	dst = &storage.Snapshot_STATUS{}
	err := snapshot.AssignProperties_To_Snapshot_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 = &Snapshot_STATUS{}

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

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

	// no assignment for property "Conditions"

	// Set property "CreationData":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.CreationData != nil {
			var creationData1 CreationData_STATUS
			err := creationData1.PopulateFromARM(owner, *typedInput.Properties.CreationData)
			if err != nil {
				return err
			}
			creationData := creationData1
			snapshot.CreationData = &creationData
		}
	}

	// Set property "DiskAccessId":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.DiskAccessId != nil {
			diskAccessId := *typedInput.Properties.DiskAccessId
			snapshot.DiskAccessId = &diskAccessId
		}
	}

	// Set property "DiskSizeBytes":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.DiskSizeBytes != nil {
			diskSizeBytes := *typedInput.Properties.DiskSizeBytes
			snapshot.DiskSizeBytes = &diskSizeBytes
		}
	}

	// Set property "DiskSizeGB":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.DiskSizeGB != nil {
			diskSizeGB := *typedInput.Properties.DiskSizeGB
			snapshot.DiskSizeGB = &diskSizeGB
		}
	}

	// Set property "DiskState":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.DiskState != nil {
			var temp string
			temp = string(*typedInput.Properties.DiskState)
			diskState := DiskState_STATUS(temp)
			snapshot.DiskState = &diskState
		}
	}

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

	// Set property "EncryptionSettingsCollection":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.EncryptionSettingsCollection != nil {
			var encryptionSettingsCollection1 EncryptionSettingsCollection_STATUS
			err := encryptionSettingsCollection1.PopulateFromARM(owner, *typedInput.Properties.EncryptionSettingsCollection)
			if err != nil {
				return err
			}
			encryptionSettingsCollection := encryptionSettingsCollection1
			snapshot.EncryptionSettingsCollection = &encryptionSettingsCollection
		}
	}

	// Set property "ExtendedLocation":
	if typedInput.ExtendedLocation != nil {
		var extendedLocation1 ExtendedLocation_STATUS
		err := extendedLocation1.PopulateFromARM(owner, *typedInput.ExtendedLocation)
		if err != nil {
			return err
		}
		extendedLocation := extendedLocation1
		snapshot.ExtendedLocation = &extendedLocation
	}

	// Set property "HyperVGeneration":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.HyperVGeneration != nil {
			var temp string
			temp = string(*typedInput.Properties.HyperVGeneration)
			hyperVGeneration := SnapshotProperties_HyperVGeneration_STATUS(temp)
			snapshot.HyperVGeneration = &hyperVGeneration
		}
	}

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

	// Set property "Incremental":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.Incremental != nil {
			incremental := *typedInput.Properties.Incremental
			snapshot.Incremental = &incremental
		}
	}

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

	// Set property "ManagedBy":
	if typedInput.ManagedBy != nil {
		managedBy := *typedInput.ManagedBy
		snapshot.ManagedBy = &managedBy
	}

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

	// Set property "NetworkAccessPolicy":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.NetworkAccessPolicy != nil {
			var temp string
			temp = string(*typedInput.Properties.NetworkAccessPolicy)
			networkAccessPolicy := NetworkAccessPolicy_STATUS(temp)
			snapshot.NetworkAccessPolicy = &networkAccessPolicy
		}
	}

	// Set property "OsType":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.OsType != nil {
			var temp string
			temp = string(*typedInput.Properties.OsType)
			osType := SnapshotProperties_OsType_STATUS(temp)
			snapshot.OsType = &osType
		}
	}

	// Set property "ProvisioningState":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.ProvisioningState != nil {
			provisioningState := *typedInput.Properties.ProvisioningState
			snapshot.ProvisioningState = &provisioningState
		}
	}

	// Set property "PurchasePlan":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.PurchasePlan != nil {
			var purchasePlan1 PurchasePlan_STATUS
			err := purchasePlan1.PopulateFromARM(owner, *typedInput.Properties.PurchasePlan)
			if err != nil {
				return err
			}
			purchasePlan := purchasePlan1
			snapshot.PurchasePlan = &purchasePlan
		}
	}

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

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

	// Set property "TimeCreated":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.TimeCreated != nil {
			timeCreated := *typedInput.Properties.TimeCreated
			snapshot.TimeCreated = &timeCreated
		}
	}

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

	// Set property "UniqueId":
	// copying flattened property:
	if typedInput.Properties != nil {
		if typedInput.Properties.UniqueId != nil {
			uniqueId := *typedInput.Properties.UniqueId
			snapshot.UniqueId = &uniqueId
		}
	}

	// No error
	return nil
}

// AssignProperties_From_Snapshot_STATUS populates our Snapshot_STATUS from the provided source Snapshot_STATUS
func (snapshot *Snapshot_STATUS) AssignProperties_From_Snapshot_STATUS(source *storage.Snapshot_STATUS) error {

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

	// CreationData
	if source.CreationData != nil {
		var creationDatum CreationData_STATUS
		err := creationDatum.AssignProperties_From_CreationData_STATUS(source.CreationData)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_CreationData_STATUS() to populate field CreationData")
		}
		snapshot.CreationData = &creationDatum
	} else {
		snapshot.CreationData = nil
	}

	// DiskAccessId
	snapshot.DiskAccessId = genruntime.ClonePointerToString(source.DiskAccessId)

	// DiskSizeBytes
	snapshot.DiskSizeBytes = genruntime.ClonePointerToInt(source.DiskSizeBytes)

	// DiskSizeGB
	snapshot.DiskSizeGB = genruntime.ClonePointerToInt(source.DiskSizeGB)

	// DiskState
	if source.DiskState != nil {
		diskState := *source.DiskState
		diskStateTemp := genruntime.ToEnum(diskState, diskState_STATUS_Values)
		snapshot.DiskState = &diskStateTemp
	} else {
		snapshot.DiskState = nil
	}

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

	// EncryptionSettingsCollection
	if source.EncryptionSettingsCollection != nil {
		var encryptionSettingsCollection EncryptionSettingsCollection_STATUS
		err := encryptionSettingsCollection.AssignProperties_From_EncryptionSettingsCollection_STATUS(source.EncryptionSettingsCollection)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_EncryptionSettingsCollection_STATUS() to populate field EncryptionSettingsCollection")
		}
		snapshot.EncryptionSettingsCollection = &encryptionSettingsCollection
	} else {
		snapshot.EncryptionSettingsCollection = nil
	}

	// ExtendedLocation
	if source.ExtendedLocation != nil {
		var extendedLocation ExtendedLocation_STATUS
		err := extendedLocation.AssignProperties_From_ExtendedLocation_STATUS(source.ExtendedLocation)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_ExtendedLocation_STATUS() to populate field ExtendedLocation")
		}
		snapshot.ExtendedLocation = &extendedLocation
	} else {
		snapshot.ExtendedLocation = nil
	}

	// HyperVGeneration
	if source.HyperVGeneration != nil {
		hyperVGeneration := *source.HyperVGeneration
		hyperVGenerationTemp := genruntime.ToEnum(hyperVGeneration, snapshotProperties_HyperVGeneration_STATUS_Values)
		snapshot.HyperVGeneration = &hyperVGenerationTemp
	} else {
		snapshot.HyperVGeneration = nil
	}

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

	// Incremental
	if source.Incremental != nil {
		incremental := *source.Incremental
		snapshot.Incremental = &incremental
	} else {
		snapshot.Incremental = nil
	}

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

	// ManagedBy
	snapshot.ManagedBy = genruntime.ClonePointerToString(source.ManagedBy)

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

	// NetworkAccessPolicy
	if source.NetworkAccessPolicy != nil {
		networkAccessPolicy := *source.NetworkAccessPolicy
		networkAccessPolicyTemp := genruntime.ToEnum(networkAccessPolicy, networkAccessPolicy_STATUS_Values)
		snapshot.NetworkAccessPolicy = &networkAccessPolicyTemp
	} else {
		snapshot.NetworkAccessPolicy = nil
	}

	// OsType
	if source.OsType != nil {
		osType := *source.OsType
		osTypeTemp := genruntime.ToEnum(osType, snapshotProperties_OsType_STATUS_Values)
		snapshot.OsType = &osTypeTemp
	} else {
		snapshot.OsType = nil
	}

	// ProvisioningState
	snapshot.ProvisioningState = genruntime.ClonePointerToString(source.ProvisioningState)

	// PurchasePlan
	if source.PurchasePlan != nil {
		var purchasePlan PurchasePlan_STATUS
		err := purchasePlan.AssignProperties_From_PurchasePlan_STATUS(source.PurchasePlan)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_PurchasePlan_STATUS() to populate field PurchasePlan")
		}
		snapshot.PurchasePlan = &purchasePlan
	} else {
		snapshot.PurchasePlan = nil
	}

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

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

	// TimeCreated
	snapshot.TimeCreated = genruntime.ClonePointerToString(source.TimeCreated)

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

	// UniqueId
	snapshot.UniqueId = genruntime.ClonePointerToString(source.UniqueId)

	// No error
	return nil
}

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

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

	// CreationData
	if snapshot.CreationData != nil {
		var creationDatum storage.CreationData_STATUS
		err := snapshot.CreationData.AssignProperties_To_CreationData_STATUS(&creationDatum)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_CreationData_STATUS() to populate field CreationData")
		}
		destination.CreationData = &creationDatum
	} else {
		destination.CreationData = nil
	}

	// DiskAccessId
	destination.DiskAccessId = genruntime.ClonePointerToString(snapshot.DiskAccessId)

	// DiskSizeBytes
	destination.DiskSizeBytes = genruntime.ClonePointerToInt(snapshot.DiskSizeBytes)

	// DiskSizeGB
	destination.DiskSizeGB = genruntime.ClonePointerToInt(snapshot.DiskSizeGB)

	// DiskState
	if snapshot.DiskState != nil {
		diskState := string(*snapshot.DiskState)
		destination.DiskState = &diskState
	} else {
		destination.DiskState = nil
	}

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

	// EncryptionSettingsCollection
	if snapshot.EncryptionSettingsCollection != nil {
		var encryptionSettingsCollection storage.EncryptionSettingsCollection_STATUS
		err := snapshot.EncryptionSettingsCollection.AssignProperties_To_EncryptionSettingsCollection_STATUS(&encryptionSettingsCollection)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_EncryptionSettingsCollection_STATUS() to populate field EncryptionSettingsCollection")
		}
		destination.EncryptionSettingsCollection = &encryptionSettingsCollection
	} else {
		destination.EncryptionSettingsCollection = nil
	}

	// ExtendedLocation
	if snapshot.ExtendedLocation != nil {
		var extendedLocation storage.ExtendedLocation_STATUS
		err := snapshot.ExtendedLocation.AssignProperties_To_ExtendedLocation_STATUS(&extendedLocation)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_ExtendedLocation_STATUS() to populate field ExtendedLocation")
		}
		destination.ExtendedLocation = &extendedLocation
	} else {
		destination.ExtendedLocation = nil
	}

	// HyperVGeneration
	if snapshot.HyperVGeneration != nil {
		hyperVGeneration := string(*snapshot.HyperVGeneration)
		destination.HyperVGeneration = &hyperVGeneration
	} else {
		destination.HyperVGeneration = nil
	}

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

	// Incremental
	if snapshot.Incremental != nil {
		incremental := *snapshot.Incremental
		destination.Incremental = &incremental
	} else {
		destination.Incremental = nil
	}

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

	// ManagedBy
	destination.ManagedBy = genruntime.ClonePointerToString(snapshot.ManagedBy)

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

	// NetworkAccessPolicy
	if snapshot.NetworkAccessPolicy != nil {
		networkAccessPolicy := string(*snapshot.NetworkAccessPolicy)
		destination.NetworkAccessPolicy = &networkAccessPolicy
	} else {
		destination.NetworkAccessPolicy = nil
	}

	// OsType
	if snapshot.OsType != nil {
		osType := string(*snapshot.OsType)
		destination.OsType = &osType
	} else {
		destination.OsType = nil
	}

	// ProvisioningState
	destination.ProvisioningState = genruntime.ClonePointerToString(snapshot.ProvisioningState)

	// PurchasePlan
	if snapshot.PurchasePlan != nil {
		var purchasePlan storage.PurchasePlan_STATUS
		err := snapshot.PurchasePlan.AssignProperties_To_PurchasePlan_STATUS(&purchasePlan)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_PurchasePlan_STATUS() to populate field PurchasePlan")
		}
		destination.PurchasePlan = &purchasePlan
	} else {
		destination.PurchasePlan = nil
	}

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

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

	// TimeCreated
	destination.TimeCreated = genruntime.ClonePointerToString(snapshot.TimeCreated)

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

	// UniqueId
	destination.UniqueId = genruntime.ClonePointerToString(snapshot.UniqueId)

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

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

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

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

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"V1","V2"}
type SnapshotProperties_HyperVGeneration string

const (
	SnapshotProperties_HyperVGeneration_V1 = SnapshotProperties_HyperVGeneration("V1")
	SnapshotProperties_HyperVGeneration_V2 = SnapshotProperties_HyperVGeneration("V2")
)

// Mapping from string to SnapshotProperties_HyperVGeneration
var snapshotProperties_HyperVGeneration_Values = map[string]SnapshotProperties_HyperVGeneration{
	"v1": SnapshotProperties_HyperVGeneration_V1,
	"v2": SnapshotProperties_HyperVGeneration_V2,
}

type SnapshotProperties_HyperVGeneration_STATUS string

const (
	SnapshotProperties_HyperVGeneration_STATUS_V1 = SnapshotProperties_HyperVGeneration_STATUS("V1")
	SnapshotProperties_HyperVGeneration_STATUS_V2 = SnapshotProperties_HyperVGeneration_STATUS("V2")
)

// Mapping from string to SnapshotProperties_HyperVGeneration_STATUS
var snapshotProperties_HyperVGeneration_STATUS_Values = map[string]SnapshotProperties_HyperVGeneration_STATUS{
	"v1": SnapshotProperties_HyperVGeneration_STATUS_V1,
	"v2": SnapshotProperties_HyperVGeneration_STATUS_V2,
}

// +kubebuilder:validation:Enum={"Linux","Windows"}
type SnapshotProperties_OsType string

const (
	SnapshotProperties_OsType_Linux   = SnapshotProperties_OsType("Linux")
	SnapshotProperties_OsType_Windows = SnapshotProperties_OsType("Windows")
)

// Mapping from string to SnapshotProperties_OsType
var snapshotProperties_OsType_Values = map[string]SnapshotProperties_OsType{
	"linux":   SnapshotProperties_OsType_Linux,
	"windows": SnapshotProperties_OsType_Windows,
}

type SnapshotProperties_OsType_STATUS string

const (
	SnapshotProperties_OsType_STATUS_Linux   = SnapshotProperties_OsType_STATUS("Linux")
	SnapshotProperties_OsType_STATUS_Windows = SnapshotProperties_OsType_STATUS("Windows")
)

// Mapping from string to SnapshotProperties_OsType_STATUS
var snapshotProperties_OsType_STATUS_Values = map[string]SnapshotProperties_OsType_STATUS{
	"linux":   SnapshotProperties_OsType_STATUS_Linux,
	"windows": SnapshotProperties_OsType_STATUS_Windows,
}

// The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental
// snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot
type SnapshotSku struct {
	// Name: The sku name.
	Name *SnapshotSku_Name `json:"name,omitempty"`
}

var _ genruntime.ARMTransformer = &SnapshotSku{}

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

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

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

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

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

	// No error
	return nil
}

// AssignProperties_From_SnapshotSku populates our SnapshotSku from the provided source SnapshotSku
func (snapshotSku *SnapshotSku) AssignProperties_From_SnapshotSku(source *storage.SnapshotSku) error {

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

	// No error
	return nil
}

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

	// Name
	if snapshotSku.Name != nil {
		name := string(*snapshotSku.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
}

// The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental
// snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot
type SnapshotSku_STATUS struct {
	// Name: The sku name.
	Name *SnapshotSku_Name_STATUS `json:"name,omitempty"`

	// Tier: The sku tier.
	Tier *string `json:"tier,omitempty"`
}

var _ genruntime.FromARMConverter = &SnapshotSku_STATUS{}

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

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

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

	// Set property "Tier":
	if typedInput.Tier != nil {
		tier := *typedInput.Tier
		snapshotSku.Tier = &tier
	}

	// No error
	return nil
}

// AssignProperties_From_SnapshotSku_STATUS populates our SnapshotSku_STATUS from the provided source SnapshotSku_STATUS
func (snapshotSku *SnapshotSku_STATUS) AssignProperties_From_SnapshotSku_STATUS(source *storage.SnapshotSku_STATUS) error {

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

	// Tier
	snapshotSku.Tier = genruntime.ClonePointerToString(source.Tier)

	// No error
	return nil
}

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

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

	// Tier
	destination.Tier = genruntime.ClonePointerToString(snapshotSku.Tier)

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

	// No error
	return nil
}

// +kubebuilder:validation:Enum={"Premium_LRS","Standard_LRS","Standard_ZRS"}
type SnapshotSku_Name string

const (
	SnapshotSku_Name_Premium_LRS  = SnapshotSku_Name("Premium_LRS")
	SnapshotSku_Name_Standard_LRS = SnapshotSku_Name("Standard_LRS")
	SnapshotSku_Name_Standard_ZRS = SnapshotSku_Name("Standard_ZRS")
)

// Mapping from string to SnapshotSku_Name
var snapshotSku_Name_Values = map[string]SnapshotSku_Name{
	"premium_lrs":  SnapshotSku_Name_Premium_LRS,
	"standard_lrs": SnapshotSku_Name_Standard_LRS,
	"standard_zrs": SnapshotSku_Name_Standard_ZRS,
}

type SnapshotSku_Name_STATUS string

const (
	SnapshotSku_Name_STATUS_Premium_LRS  = SnapshotSku_Name_STATUS("Premium_LRS")
	SnapshotSku_Name_STATUS_Standard_LRS = SnapshotSku_Name_STATUS("Standard_LRS")
	SnapshotSku_Name_STATUS_Standard_ZRS = SnapshotSku_Name_STATUS("Standard_ZRS")
)

// Mapping from string to SnapshotSku_Name_STATUS
var snapshotSku_Name_STATUS_Values = map[string]SnapshotSku_Name_STATUS{
	"premium_lrs":  SnapshotSku_Name_STATUS_Premium_LRS,
	"standard_lrs": SnapshotSku_Name_STATUS_Standard_LRS,
	"standard_zrs": SnapshotSku_Name_STATUS_Standard_ZRS,
}

func init() {
	SchemeBuilder.Register(&Snapshot{}, &SnapshotList{})
}
