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

import (
	storage "github.com/Azure/azure-service-operator/v2/api/compute/v1api20241101/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"
)

// +kubebuilder:rbac:groups=compute.azure.com,resources=disks,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=compute.azure.com,resources={disks/status,disks/finalizers},verbs=get;update;patch

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories={azure,compute}
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// +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"
// Storage version of v1api20240302.Disk
// Generator information:
// - Generated from: /compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/DiskRP.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}
type Disk struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              Disk_Spec   `json:"spec,omitempty"`
	Status            Disk_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &Disk{}

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

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

var _ configmaps.Exporter = &Disk{}

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

var _ secrets.Exporter = &Disk{}

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

var _ genruntime.KubernetesResource = &Disk{}

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

// GetAPIVersion returns the ARM API version of the resource. This is always "2024-03-02"
func (disk Disk) GetAPIVersion() string {
	return "2024-03-02"
}

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

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

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

// GetSupportedOperations returns the operations supported by the resource
func (disk *Disk) 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/disks"
func (disk *Disk) GetType() string {
	return "Microsoft.Compute/disks"
}

// NewEmptyStatus returns a new empty (blank) status
func (disk *Disk) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &Disk_STATUS{}
}

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

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

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

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

	disk.Status = st
	return nil
}

// Hub marks that this Disk is the hub type for conversion
func (disk *Disk) Hub() {}

// OriginalGVK returns a GroupValueKind for the original API version used to create the resource
func (disk *Disk) OriginalGVK() *schema.GroupVersionKind {
	return &schema.GroupVersionKind{
		Group:   GroupVersion.Group,
		Version: disk.Spec.OriginalVersion,
		Kind:    "Disk",
	}
}

// +kubebuilder:object:root=true
// Storage version of v1api20240302.Disk
// Generator information:
// - Generated from: /compute/resource-manager/Microsoft.Compute/DiskRP/stable/2024-03-02/DiskRP.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}
type DiskList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Disk `json:"items"`
}

// Storage version of v1api20240302.APIVersion
// +kubebuilder:validation:Enum={"2024-03-02"}
type APIVersion string

const APIVersion_Value = APIVersion("2024-03-02")

// Storage version of v1api20240302.Disk_Spec
type Disk_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"`
	BurstingEnabled    *bool         `json:"burstingEnabled,omitempty"`
	CompletionPercent  *float64      `json:"completionPercent,omitempty"`
	CreationData       *CreationData `json:"creationData,omitempty"`
	DataAccessAuthMode *string       `json:"dataAccessAuthMode,omitempty"`

	// DiskAccessReference: ARM id of the DiskAccess resource for using private endpoints on disks.
	DiskAccessReference          *genruntime.ResourceReference `armReference:"DiskAccessId" json:"diskAccessReference,omitempty"`
	DiskIOPSReadOnly             *int                          `json:"diskIOPSReadOnly,omitempty"`
	DiskIOPSReadWrite            *int                          `json:"diskIOPSReadWrite,omitempty"`
	DiskMBpsReadOnly             *int                          `json:"diskMBpsReadOnly,omitempty"`
	DiskMBpsReadWrite            *int                          `json:"diskMBpsReadWrite,omitempty"`
	DiskSizeGB                   *int                          `json:"diskSizeGB,omitempty"`
	Encryption                   *Encryption                   `json:"encryption,omitempty"`
	EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
	ExtendedLocation             *ExtendedLocation             `json:"extendedLocation,omitempty"`
	HyperVGeneration             *string                       `json:"hyperVGeneration,omitempty"`
	Location                     *string                       `json:"location,omitempty"`
	MaxShares                    *int                          `json:"maxShares,omitempty"`
	NetworkAccessPolicy          *string                       `json:"networkAccessPolicy,omitempty"`
	OperatorSpec                 *DiskOperatorSpec             `json:"operatorSpec,omitempty"`
	OptimizedForFrequentAttach   *bool                         `json:"optimizedForFrequentAttach,omitempty"`
	OriginalVersion              string                        `json:"originalVersion,omitempty"`
	OsType                       *string                       `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"`
	PropertyBag           genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
	PublicNetworkAccess   *string                            `json:"publicNetworkAccess,omitempty"`
	PurchasePlan          *DiskPurchasePlan                  `json:"purchasePlan,omitempty"`
	SecurityProfile       *DiskSecurityProfile               `json:"securityProfile,omitempty"`
	Sku                   *DiskSku                           `json:"sku,omitempty"`
	SupportedCapabilities *SupportedCapabilities             `json:"supportedCapabilities,omitempty"`
	SupportsHibernation   *bool                              `json:"supportsHibernation,omitempty"`
	Tags                  map[string]string                  `json:"tags,omitempty"`
	Tier                  *string                            `json:"tier,omitempty"`
	Zones                 []string                           `json:"zones,omitempty"`
}

var _ genruntime.ConvertibleSpec = &Disk_Spec{}

// ConvertSpecFrom populates our Disk_Spec from the provided source
func (disk *Disk_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error {
	if source == disk {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec")
	}

	return source.ConvertSpecTo(disk)
}

// ConvertSpecTo populates the provided destination from our Disk_Spec
func (disk *Disk_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error {
	if destination == disk {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec")
	}

	return destination.ConvertSpecFrom(disk)
}

// Storage version of v1api20240302.Disk_STATUS
// Disk resource.
type Disk_STATUS struct {
	BurstingEnabled              *bool                                `json:"burstingEnabled,omitempty"`
	BurstingEnabledTime          *string                              `json:"burstingEnabledTime,omitempty"`
	CompletionPercent            *float64                             `json:"completionPercent,omitempty"`
	Conditions                   []conditions.Condition               `json:"conditions,omitempty"`
	CreationData                 *CreationData_STATUS                 `json:"creationData,omitempty"`
	DataAccessAuthMode           *string                              `json:"dataAccessAuthMode,omitempty"`
	DiskAccessId                 *string                              `json:"diskAccessId,omitempty"`
	DiskIOPSReadOnly             *int                                 `json:"diskIOPSReadOnly,omitempty"`
	DiskIOPSReadWrite            *int                                 `json:"diskIOPSReadWrite,omitempty"`
	DiskMBpsReadOnly             *int                                 `json:"diskMBpsReadOnly,omitempty"`
	DiskMBpsReadWrite            *int                                 `json:"diskMBpsReadWrite,omitempty"`
	DiskSizeBytes                *int                                 `json:"diskSizeBytes,omitempty"`
	DiskSizeGB                   *int                                 `json:"diskSizeGB,omitempty"`
	DiskState                    *string                              `json:"diskState,omitempty"`
	Encryption                   *Encryption_STATUS                   `json:"encryption,omitempty"`
	EncryptionSettingsCollection *EncryptionSettingsCollection_STATUS `json:"encryptionSettingsCollection,omitempty"`
	ExtendedLocation             *ExtendedLocation_STATUS             `json:"extendedLocation,omitempty"`
	HyperVGeneration             *string                              `json:"hyperVGeneration,omitempty"`
	Id                           *string                              `json:"id,omitempty"`
	LastOwnershipUpdateTime      *string                              `json:"LastOwnershipUpdateTime,omitempty"`
	Location                     *string                              `json:"location,omitempty"`
	ManagedBy                    *string                              `json:"managedBy,omitempty"`
	ManagedByExtended            []string                             `json:"managedByExtended,omitempty"`
	MaxShares                    *int                                 `json:"maxShares,omitempty"`
	Name                         *string                              `json:"name,omitempty"`
	NetworkAccessPolicy          *string                              `json:"networkAccessPolicy,omitempty"`
	OptimizedForFrequentAttach   *bool                                `json:"optimizedForFrequentAttach,omitempty"`
	OsType                       *string                              `json:"osType,omitempty"`
	PropertyBag                  genruntime.PropertyBag               `json:"$propertyBag,omitempty"`
	PropertyUpdatesInProgress    *PropertyUpdatesInProgress_STATUS    `json:"propertyUpdatesInProgress,omitempty"`
	ProvisioningState            *string                              `json:"provisioningState,omitempty"`
	PublicNetworkAccess          *string                              `json:"publicNetworkAccess,omitempty"`
	PurchasePlan                 *DiskPurchasePlan_STATUS             `json:"purchasePlan,omitempty"`
	SecurityProfile              *DiskSecurityProfile_STATUS          `json:"securityProfile,omitempty"`
	ShareInfo                    []ShareInfoElement_STATUS            `json:"shareInfo,omitempty"`
	Sku                          *DiskSku_STATUS                      `json:"sku,omitempty"`
	SupportedCapabilities        *SupportedCapabilities_STATUS        `json:"supportedCapabilities,omitempty"`
	SupportsHibernation          *bool                                `json:"supportsHibernation,omitempty"`
	SystemData                   *SystemData_STATUS                   `json:"systemData,omitempty"`
	Tags                         map[string]string                    `json:"tags,omitempty"`
	Tier                         *string                              `json:"tier,omitempty"`
	TimeCreated                  *string                              `json:"timeCreated,omitempty"`
	Type                         *string                              `json:"type,omitempty"`
	UniqueId                     *string                              `json:"uniqueId,omitempty"`
	Zones                        []string                             `json:"zones,omitempty"`
}

var _ genruntime.ConvertibleStatus = &Disk_STATUS{}

// ConvertStatusFrom populates our Disk_STATUS from the provided source
func (disk *Disk_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error {
	if source == disk {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus")
	}

	return source.ConvertStatusTo(disk)
}

// ConvertStatusTo populates the provided destination from our Disk_STATUS
func (disk *Disk_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error {
	if destination == disk {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus")
	}

	return destination.ConvertStatusFrom(disk)
}

// Storage version of v1api20240302.CreationData
// Data used when creating a disk.
type CreationData struct {
	CreateOption *string `json:"createOption,omitempty"`

	// ElasticSanResourceReference: Required if createOption is CopyFromSanSnapshot. This is the ARM id of the source elastic
	// san volume snapshot.
	ElasticSanResourceReference   *genruntime.ResourceReference `armReference:"ElasticSanResourceId" json:"elasticSanResourceReference,omitempty"`
	GalleryImageReference         *ImageDiskReference           `json:"galleryImageReference,omitempty"`
	ImageReference                *ImageDiskReference           `json:"imageReference,omitempty"`
	LogicalSectorSize             *int                          `json:"logicalSectorSize,omitempty"`
	PerformancePlus               *bool                         `json:"performancePlus,omitempty"`
	PropertyBag                   genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	ProvisionedBandwidthCopySpeed *string                       `json:"provisionedBandwidthCopySpeed,omitempty"`
	SecurityDataUri               *string                       `json:"securityDataUri,omitempty"`

	// SourceResourceReference: If createOption is Copy, this is the ARM id of the source snapshot or disk.
	SourceResourceReference *genruntime.ResourceReference `armReference:"SourceResourceId" json:"sourceResourceReference,omitempty"`
	SourceUri               *string                       `json:"sourceUri,omitempty"`
	StorageAccountId        *string                       `json:"storageAccountId,omitempty"`
	UploadSizeBytes         *int                          `json:"uploadSizeBytes,omitempty"`
}

// Storage version of v1api20240302.CreationData_STATUS
// Data used when creating a disk.
type CreationData_STATUS struct {
	CreateOption                  *string                    `json:"createOption,omitempty"`
	ElasticSanResourceId          *string                    `json:"elasticSanResourceId,omitempty"`
	GalleryImageReference         *ImageDiskReference_STATUS `json:"galleryImageReference,omitempty"`
	ImageReference                *ImageDiskReference_STATUS `json:"imageReference,omitempty"`
	LogicalSectorSize             *int                       `json:"logicalSectorSize,omitempty"`
	PerformancePlus               *bool                      `json:"performancePlus,omitempty"`
	PropertyBag                   genruntime.PropertyBag     `json:"$propertyBag,omitempty"`
	ProvisionedBandwidthCopySpeed *string                    `json:"provisionedBandwidthCopySpeed,omitempty"`
	SecurityDataUri               *string                    `json:"securityDataUri,omitempty"`
	SourceResourceId              *string                    `json:"sourceResourceId,omitempty"`
	SourceUniqueId                *string                    `json:"sourceUniqueId,omitempty"`
	SourceUri                     *string                    `json:"sourceUri,omitempty"`
	StorageAccountId              *string                    `json:"storageAccountId,omitempty"`
	UploadSizeBytes               *int                       `json:"uploadSizeBytes,omitempty"`
}

// Storage version of v1api20240302.DiskOperatorSpec
// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure
type DiskOperatorSpec struct {
	ConfigMapExpressions []*core.DestinationExpression `json:"configMapExpressions,omitempty"`
	PropertyBag          genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	SecretExpressions    []*core.DestinationExpression `json:"secretExpressions,omitempty"`
}

// Storage version of v1api20240302.DiskPurchasePlan
// Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
type DiskPurchasePlan struct {
	Name          *string                `json:"name,omitempty"`
	Product       *string                `json:"product,omitempty"`
	PromotionCode *string                `json:"promotionCode,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Publisher     *string                `json:"publisher,omitempty"`
}

// Storage version of v1api20240302.DiskPurchasePlan_STATUS
// Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
type DiskPurchasePlan_STATUS struct {
	Name          *string                `json:"name,omitempty"`
	Product       *string                `json:"product,omitempty"`
	PromotionCode *string                `json:"promotionCode,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Publisher     *string                `json:"publisher,omitempty"`
}

// Storage version of v1api20240302.DiskSecurityProfile
// Contains the security related information for the resource.
type DiskSecurityProfile struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`

	// SecureVMDiskEncryptionSetReference: ResourceId of the disk encryption set associated to Confidential VM supported disk
	// encrypted with customer managed key
	SecureVMDiskEncryptionSetReference *genruntime.ResourceReference `armReference:"SecureVMDiskEncryptionSetId" json:"secureVMDiskEncryptionSetReference,omitempty"`
	SecurityType                       *string                       `json:"securityType,omitempty"`
}

// Storage version of v1api20240302.DiskSecurityProfile_STATUS
// Contains the security related information for the resource.
type DiskSecurityProfile_STATUS struct {
	PropertyBag                 genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SecureVMDiskEncryptionSetId *string                `json:"secureVMDiskEncryptionSetId,omitempty"`
	SecurityType                *string                `json:"securityType,omitempty"`
}

// Storage version of v1api20240302.DiskSku
// The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or
// PremiumV2_LRS.
type DiskSku struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240302.DiskSku_STATUS
// The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or
// PremiumV2_LRS.
type DiskSku_STATUS struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tier        *string                `json:"tier,omitempty"`
}

// Storage version of v1api20240302.Encryption
// Encryption at rest settings for disk or snapshot
type Encryption struct {
	// DiskEncryptionSetReference: ResourceId of the disk encryption set to use for enabling encryption at rest.
	DiskEncryptionSetReference *genruntime.ResourceReference `armReference:"DiskEncryptionSetId" json:"diskEncryptionSetReference,omitempty"`
	PropertyBag                genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	Type                       *string                       `json:"type,omitempty"`
}

// Storage version of v1api20240302.Encryption_STATUS
// Encryption at rest settings for disk or snapshot
type Encryption_STATUS struct {
	DiskEncryptionSetId *string                `json:"diskEncryptionSetId,omitempty"`
	PropertyBag         genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Type                *string                `json:"type,omitempty"`
}

// Storage version of v1api20240302.EncryptionSettingsCollection
// Encryption settings for disk or snapshot
type EncryptionSettingsCollection struct {
	Enabled                   *bool                       `json:"enabled,omitempty"`
	EncryptionSettings        []EncryptionSettingsElement `json:"encryptionSettings,omitempty"`
	EncryptionSettingsVersion *string                     `json:"encryptionSettingsVersion,omitempty"`
	PropertyBag               genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240302.EncryptionSettingsCollection_STATUS
// Encryption settings for disk or snapshot
type EncryptionSettingsCollection_STATUS struct {
	Enabled                   *bool                              `json:"enabled,omitempty"`
	EncryptionSettings        []EncryptionSettingsElement_STATUS `json:"encryptionSettings,omitempty"`
	EncryptionSettingsVersion *string                            `json:"encryptionSettingsVersion,omitempty"`
	PropertyBag               genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240302.ExtendedLocation
// The complex type of the extended location.
type ExtendedLocation struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Type        *string                `json:"type,omitempty"`
}

// Storage version of v1api20240302.ExtendedLocation_STATUS
// The complex type of the extended location.
type ExtendedLocation_STATUS struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Type        *string                `json:"type,omitempty"`
}

// Storage version of v1api20240302.PropertyUpdatesInProgress_STATUS
// Properties of the disk for which update is pending.
type PropertyUpdatesInProgress_STATUS struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TargetTier  *string                `json:"targetTier,omitempty"`
}

// Storage version of v1api20240302.ShareInfoElement_STATUS
type ShareInfoElement_STATUS struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	VmUri       *string                `json:"vmUri,omitempty"`
}

// Storage version of v1api20240302.SupportedCapabilities
// List of supported capabilities persisted on the disk resource for VM use.
type SupportedCapabilities struct {
	AcceleratedNetwork  *bool                  `json:"acceleratedNetwork,omitempty"`
	Architecture        *string                `json:"architecture,omitempty"`
	DiskControllerTypes *string                `json:"diskControllerTypes,omitempty"`
	PropertyBag         genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240302.SupportedCapabilities_STATUS
// List of supported capabilities persisted on the disk resource for VM use.
type SupportedCapabilities_STATUS struct {
	AcceleratedNetwork  *bool                  `json:"acceleratedNetwork,omitempty"`
	Architecture        *string                `json:"architecture,omitempty"`
	DiskControllerTypes *string                `json:"diskControllerTypes,omitempty"`
	PropertyBag         genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240302.SystemData_STATUS
// Metadata pertaining to creation and last modification of the resource.
type SystemData_STATUS struct {
	CreatedAt          *string                `json:"createdAt,omitempty"`
	CreatedBy          *string                `json:"createdBy,omitempty"`
	CreatedByType      *string                `json:"createdByType,omitempty"`
	LastModifiedAt     *string                `json:"lastModifiedAt,omitempty"`
	LastModifiedBy     *string                `json:"lastModifiedBy,omitempty"`
	LastModifiedByType *string                `json:"lastModifiedByType,omitempty"`
	PropertyBag        genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

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

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

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

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

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

	// Invoke the augmentConversionForSystemData_STATUS interface (if implemented) to customize the conversion
	var dataAsAny any = data
	if augmentedData, ok := dataAsAny.(augmentConversionForSystemData_STATUS); ok {
		err := augmentedData.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// 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 {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(data.PropertyBag)

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

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

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

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

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

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

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

	// Invoke the augmentConversionForSystemData_STATUS interface (if implemented) to customize the conversion
	var dataAsAny any = data
	if augmentedData, ok := dataAsAny.(augmentConversionForSystemData_STATUS); ok {
		err := augmentedData.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

type augmentConversionForSystemData_STATUS interface {
	AssignPropertiesFrom(src *storage.SystemData_STATUS) error
	AssignPropertiesTo(dst *storage.SystemData_STATUS) error
}

// Storage version of v1api20240302.EncryptionSettingsElement
// Encryption settings for one disk volume.
type EncryptionSettingsElement struct {
	DiskEncryptionKey *KeyVaultAndSecretReference `json:"diskEncryptionKey,omitempty"`
	KeyEncryptionKey  *KeyVaultAndKeyReference    `json:"keyEncryptionKey,omitempty"`
	PropertyBag       genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240302.EncryptionSettingsElement_STATUS
// Encryption settings for one disk volume.
type EncryptionSettingsElement_STATUS struct {
	DiskEncryptionKey *KeyVaultAndSecretReference_STATUS `json:"diskEncryptionKey,omitempty"`
	KeyEncryptionKey  *KeyVaultAndKeyReference_STATUS    `json:"keyEncryptionKey,omitempty"`
	PropertyBag       genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240302.ImageDiskReference
// The source image used for creating the disk.
type ImageDiskReference struct {
	CommunityGalleryImageId *string                `json:"communityGalleryImageId,omitempty"`
	Lun                     *int                   `json:"lun,omitempty"`
	PropertyBag             genruntime.PropertyBag `json:"$propertyBag,omitempty"`

	// Reference: A relative uri containing either a Platform Image Repository, user image, or Azure Compute Gallery image
	// reference.
	Reference            *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"`
	SharedGalleryImageId *string                       `json:"sharedGalleryImageId,omitempty"`
}

// Storage version of v1api20240302.ImageDiskReference_STATUS
// The source image used for creating the disk.
type ImageDiskReference_STATUS struct {
	CommunityGalleryImageId *string                `json:"communityGalleryImageId,omitempty"`
	Id                      *string                `json:"id,omitempty"`
	Lun                     *int                   `json:"lun,omitempty"`
	PropertyBag             genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SharedGalleryImageId    *string                `json:"sharedGalleryImageId,omitempty"`
}

// Storage version of v1api20240302.KeyVaultAndKeyReference
// Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey
type KeyVaultAndKeyReference struct {
	KeyUrl      *string                `json:"keyUrl,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SourceVault *SourceVault           `json:"sourceVault,omitempty"`
}

// Storage version of v1api20240302.KeyVaultAndKeyReference_STATUS
// Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey
type KeyVaultAndKeyReference_STATUS struct {
	KeyUrl      *string                `json:"keyUrl,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SourceVault *SourceVault_STATUS    `json:"sourceVault,omitempty"`
}

// Storage version of v1api20240302.KeyVaultAndSecretReference
// Key Vault Secret Url and vault id of the encryption key
type KeyVaultAndSecretReference struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SecretUrl   *string                `json:"secretUrl,omitempty"`
	SourceVault *SourceVault           `json:"sourceVault,omitempty"`
}

// Storage version of v1api20240302.KeyVaultAndSecretReference_STATUS
// Key Vault Secret Url and vault id of the encryption key
type KeyVaultAndSecretReference_STATUS struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SecretUrl   *string                `json:"secretUrl,omitempty"`
	SourceVault *SourceVault_STATUS    `json:"sourceVault,omitempty"`
}

func init() {
	SchemeBuilder.Register(&Disk{}, &DiskList{})
}
