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

import (
	v20220702s "github.com/Azure/azure-service-operator/v2/api/compute/v1api20220702/storage"
	v20241101s "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"
	"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime/schema"
)

// +kubebuilder:rbac:groups=compute.azure.com,resources=virtualmachines,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=compute.azure.com,resources={virtualmachines/status,virtualmachines/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 v1api20220301.VirtualMachine
// Generator information:
// - Generated from: /compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-03-01/virtualMachine.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}
type VirtualMachine struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              VirtualMachine_Spec   `json:"spec,omitempty"`
	Status            VirtualMachine_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &VirtualMachine{}

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

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

var _ configmaps.Exporter = &VirtualMachine{}

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

var _ secrets.Exporter = &VirtualMachine{}

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

var _ genruntime.KubernetesResource = &VirtualMachine{}

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

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

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

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

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

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

// NewEmptyStatus returns a new empty (blank) status
func (machine *VirtualMachine) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &VirtualMachine_STATUS{}
}

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

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

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

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

	machine.Status = st
	return nil
}

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

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

// +kubebuilder:object:root=true
// Storage version of v1api20220301.VirtualMachine
// Generator information:
// - Generated from: /compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-03-01/virtualMachine.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}
type VirtualMachineList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VirtualMachine `json:"items"`
}

// Storage version of v1api20220301.VirtualMachine_Spec
type VirtualMachine_Spec struct {
	AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
	ApplicationProfile     *ApplicationProfile     `json:"applicationProfile,omitempty"`
	AvailabilitySet        *SubResource            `json:"availabilitySet,omitempty"`

	// 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"`
	BillingProfile       *BillingProfile             `json:"billingProfile,omitempty"`
	CapacityReservation  *CapacityReservationProfile `json:"capacityReservation,omitempty"`
	DiagnosticsProfile   *DiagnosticsProfile         `json:"diagnosticsProfile,omitempty"`
	EvictionPolicy       *string                     `json:"evictionPolicy,omitempty"`
	ExtendedLocation     *ExtendedLocation           `json:"extendedLocation,omitempty"`
	ExtensionsTimeBudget *string                     `json:"extensionsTimeBudget,omitempty"`
	HardwareProfile      *HardwareProfile            `json:"hardwareProfile,omitempty"`
	Host                 *SubResource                `json:"host,omitempty"`
	HostGroup            *SubResource                `json:"hostGroup,omitempty"`
	Identity             *VirtualMachineIdentity     `json:"identity,omitempty"`
	LicenseType          *string                     `json:"licenseType,omitempty"`
	Location             *string                     `json:"location,omitempty"`
	NetworkProfile       *NetworkProfile             `json:"networkProfile,omitempty"`
	OperatorSpec         *VirtualMachineOperatorSpec `json:"operatorSpec,omitempty"`
	OriginalVersion      string                      `json:"originalVersion,omitempty"`
	OsProfile            *OSProfile                  `json:"osProfile,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"`
	Plan                    *Plan                              `json:"plan,omitempty"`
	PlatformFaultDomain     *int                               `json:"platformFaultDomain,omitempty"`
	Priority                *string                            `json:"priority,omitempty"`
	PropertyBag             genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
	ProximityPlacementGroup *SubResource                       `json:"proximityPlacementGroup,omitempty"`
	ScheduledEventsProfile  *ScheduledEventsProfile            `json:"scheduledEventsProfile,omitempty"`
	SecurityProfile         *SecurityProfile                   `json:"securityProfile,omitempty"`
	StorageProfile          *StorageProfile                    `json:"storageProfile,omitempty"`
	Tags                    map[string]string                  `json:"tags,omitempty"`
	UserData                *string                            `json:"userData,omitempty"`
	VirtualMachineScaleSet  *SubResource                       `json:"virtualMachineScaleSet,omitempty"`
	Zones                   []string                           `json:"zones,omitempty"`
}

var _ genruntime.ConvertibleSpec = &VirtualMachine_Spec{}

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

	return source.ConvertSpecTo(machine)
}

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

	return destination.ConvertSpecFrom(machine)
}

// Storage version of v1api20220301.VirtualMachine_STATUS
// Describes a Virtual Machine.
type VirtualMachine_STATUS struct {
	AdditionalCapabilities  *AdditionalCapabilities_STATUS     `json:"additionalCapabilities,omitempty"`
	ApplicationProfile      *ApplicationProfile_STATUS         `json:"applicationProfile,omitempty"`
	AvailabilitySet         *SubResource_STATUS                `json:"availabilitySet,omitempty"`
	BillingProfile          *BillingProfile_STATUS             `json:"billingProfile,omitempty"`
	CapacityReservation     *CapacityReservationProfile_STATUS `json:"capacityReservation,omitempty"`
	Conditions              []conditions.Condition             `json:"conditions,omitempty"`
	DiagnosticsProfile      *DiagnosticsProfile_STATUS         `json:"diagnosticsProfile,omitempty"`
	EvictionPolicy          *string                            `json:"evictionPolicy,omitempty"`
	ExtendedLocation        *ExtendedLocation_STATUS           `json:"extendedLocation,omitempty"`
	ExtensionsTimeBudget    *string                            `json:"extensionsTimeBudget,omitempty"`
	HardwareProfile         *HardwareProfile_STATUS            `json:"hardwareProfile,omitempty"`
	Host                    *SubResource_STATUS                `json:"host,omitempty"`
	HostGroup               *SubResource_STATUS                `json:"hostGroup,omitempty"`
	Id                      *string                            `json:"id,omitempty"`
	Identity                *VirtualMachineIdentity_STATUS     `json:"identity,omitempty"`
	InstanceView            *VirtualMachineInstanceView_STATUS `json:"instanceView,omitempty"`
	LicenseType             *string                            `json:"licenseType,omitempty"`
	Location                *string                            `json:"location,omitempty"`
	Name                    *string                            `json:"name,omitempty"`
	NetworkProfile          *NetworkProfile_STATUS             `json:"networkProfile,omitempty"`
	OsProfile               *OSProfile_STATUS                  `json:"osProfile,omitempty"`
	Plan                    *Plan_STATUS                       `json:"plan,omitempty"`
	PlatformFaultDomain     *int                               `json:"platformFaultDomain,omitempty"`
	Priority                *string                            `json:"priority,omitempty"`
	PropertyBag             genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
	ProvisioningState       *string                            `json:"provisioningState,omitempty"`
	ProximityPlacementGroup *SubResource_STATUS                `json:"proximityPlacementGroup,omitempty"`
	Resources               []VirtualMachineExtension_STATUS   `json:"resources,omitempty"`
	ScheduledEventsProfile  *ScheduledEventsProfile_STATUS     `json:"scheduledEventsProfile,omitempty"`
	SecurityProfile         *SecurityProfile_STATUS            `json:"securityProfile,omitempty"`
	StorageProfile          *StorageProfile_STATUS             `json:"storageProfile,omitempty"`
	Tags                    map[string]string                  `json:"tags,omitempty"`
	TimeCreated             *string                            `json:"timeCreated,omitempty"`
	Type                    *string                            `json:"type,omitempty"`
	UserData                *string                            `json:"userData,omitempty"`
	VirtualMachineScaleSet  *SubResource_STATUS                `json:"virtualMachineScaleSet,omitempty"`
	VmId                    *string                            `json:"vmId,omitempty"`
	Zones                   []string                           `json:"zones,omitempty"`
}

var _ genruntime.ConvertibleStatus = &VirtualMachine_STATUS{}

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

	return source.ConvertStatusTo(machine)
}

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

	return destination.ConvertStatusFrom(machine)
}

// Storage version of v1api20220301.AdditionalCapabilities
// Enables or disables a capability on the virtual machine or virtual machine scale set.
type AdditionalCapabilities struct {
	HibernationEnabled *bool                  `json:"hibernationEnabled,omitempty"`
	PropertyBag        genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	UltraSSDEnabled    *bool                  `json:"ultraSSDEnabled,omitempty"`
}

// Storage version of v1api20220301.AdditionalCapabilities_STATUS
// Enables or disables a capability on the virtual machine or virtual machine scale set.
type AdditionalCapabilities_STATUS struct {
	HibernationEnabled *bool                  `json:"hibernationEnabled,omitempty"`
	PropertyBag        genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	UltraSSDEnabled    *bool                  `json:"ultraSSDEnabled,omitempty"`
}

// Storage version of v1api20220301.ApplicationProfile
// Contains the list of gallery applications that should be made available to the VM/VMSS
type ApplicationProfile struct {
	GalleryApplications []VMGalleryApplication `json:"galleryApplications,omitempty"`
	PropertyBag         genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.ApplicationProfile_STATUS
// Contains the list of gallery applications that should be made available to the VM/VMSS
type ApplicationProfile_STATUS struct {
	GalleryApplications []VMGalleryApplication_STATUS `json:"galleryApplications,omitempty"`
	PropertyBag         genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.BillingProfile
// Specifies the billing related details of a Azure Spot VM or VMSS.
// Minimum api-version: 2019-03-01.
type BillingProfile struct {
	MaxPrice    *float64               `json:"maxPrice,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.BillingProfile_STATUS
// Specifies the billing related details of a Azure Spot VM or VMSS.
// Minimum api-version: 2019-03-01.
type BillingProfile_STATUS struct {
	MaxPrice    *float64               `json:"maxPrice,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.CapacityReservationProfile
// The parameters of a capacity reservation Profile.
type CapacityReservationProfile struct {
	CapacityReservationGroup *SubResource           `json:"capacityReservationGroup,omitempty"`
	PropertyBag              genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.CapacityReservationProfile_STATUS
// The parameters of a capacity reservation Profile.
type CapacityReservationProfile_STATUS struct {
	CapacityReservationGroup *SubResource_STATUS    `json:"capacityReservationGroup,omitempty"`
	PropertyBag              genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.DiagnosticsProfile
// Specifies the boot diagnostic settings state.
// Minimum api-version: 2015-06-15.
type DiagnosticsProfile struct {
	BootDiagnostics *BootDiagnostics       `json:"bootDiagnostics,omitempty"`
	PropertyBag     genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.DiagnosticsProfile_STATUS
// Specifies the boot diagnostic settings state.
// Minimum api-version: 2015-06-15.
type DiagnosticsProfile_STATUS struct {
	BootDiagnostics *BootDiagnostics_STATUS `json:"bootDiagnostics,omitempty"`
	PropertyBag     genruntime.PropertyBag  `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.HardwareProfile
// Specifies the hardware settings for the virtual machine.
type HardwareProfile struct {
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	VmSize           *string                `json:"vmSize,omitempty"`
	VmSizeProperties *VMSizeProperties      `json:"vmSizeProperties,omitempty"`
}

// Storage version of v1api20220301.HardwareProfile_STATUS
// Specifies the hardware settings for the virtual machine.
type HardwareProfile_STATUS struct {
	PropertyBag      genruntime.PropertyBag   `json:"$propertyBag,omitempty"`
	VmSize           *string                  `json:"vmSize,omitempty"`
	VmSizeProperties *VMSizeProperties_STATUS `json:"vmSizeProperties,omitempty"`
}

// Storage version of v1api20220301.NetworkProfile
// Specifies the network interfaces or the networking configuration of the virtual machine.
type NetworkProfile struct {
	NetworkApiVersion              *string                                       `json:"networkApiVersion,omitempty"`
	NetworkInterfaceConfigurations []VirtualMachineNetworkInterfaceConfiguration `json:"networkInterfaceConfigurations,omitempty"`
	NetworkInterfaces              []NetworkInterfaceReference                   `json:"networkInterfaces,omitempty"`
	PropertyBag                    genruntime.PropertyBag                        `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.NetworkProfile_STATUS
// Specifies the network interfaces or the networking configuration of the virtual machine.
type NetworkProfile_STATUS struct {
	NetworkApiVersion              *string                                              `json:"networkApiVersion,omitempty"`
	NetworkInterfaceConfigurations []VirtualMachineNetworkInterfaceConfiguration_STATUS `json:"networkInterfaceConfigurations,omitempty"`
	NetworkInterfaces              []NetworkInterfaceReference_STATUS                   `json:"networkInterfaces,omitempty"`
	PropertyBag                    genruntime.PropertyBag                               `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.OSProfile
// Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once VM is
// provisioned.
type OSProfile struct {
	AdminPassword               *genruntime.SecretReference `json:"adminPassword,omitempty"`
	AdminUsername               *string                     `json:"adminUsername,omitempty"`
	AllowExtensionOperations    *bool                       `json:"allowExtensionOperations,omitempty"`
	ComputerName                *string                     `json:"computerName,omitempty"`
	CustomData                  *string                     `json:"customData,omitempty"`
	LinuxConfiguration          *LinuxConfiguration         `json:"linuxConfiguration,omitempty"`
	PropertyBag                 genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
	RequireGuestProvisionSignal *bool                       `json:"requireGuestProvisionSignal,omitempty"`
	Secrets                     []VaultSecretGroup          `json:"secrets,omitempty"`
	WindowsConfiguration        *WindowsConfiguration       `json:"windowsConfiguration,omitempty"`
}

// Storage version of v1api20220301.OSProfile_STATUS
// Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once VM is
// provisioned.
type OSProfile_STATUS struct {
	AdminUsername               *string                      `json:"adminUsername,omitempty"`
	AllowExtensionOperations    *bool                        `json:"allowExtensionOperations,omitempty"`
	ComputerName                *string                      `json:"computerName,omitempty"`
	CustomData                  *string                      `json:"customData,omitempty"`
	LinuxConfiguration          *LinuxConfiguration_STATUS   `json:"linuxConfiguration,omitempty"`
	PropertyBag                 genruntime.PropertyBag       `json:"$propertyBag,omitempty"`
	RequireGuestProvisionSignal *bool                        `json:"requireGuestProvisionSignal,omitempty"`
	Secrets                     []VaultSecretGroup_STATUS    `json:"secrets,omitempty"`
	WindowsConfiguration        *WindowsConfiguration_STATUS `json:"windowsConfiguration,omitempty"`
}

// Storage version of v1api20220301.Plan
// Specifies information about the marketplace image used to create the virtual machine. This element is only used for
// marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use.
// In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically,
// Get Started ->. Enter any required information and then click Save.
type Plan 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 v1api20220301.Plan_STATUS
// Specifies information about the marketplace image used to create the virtual machine. This element is only used for
// marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use.
// In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically,
// Get Started ->. Enter any required information and then click Save.
type Plan_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 v1api20220301.ScheduledEventsProfile
type ScheduledEventsProfile struct {
	PropertyBag                  genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	TerminateNotificationProfile *TerminateNotificationProfile `json:"terminateNotificationProfile,omitempty"`
}

// Storage version of v1api20220301.ScheduledEventsProfile_STATUS
type ScheduledEventsProfile_STATUS struct {
	PropertyBag                  genruntime.PropertyBag               `json:"$propertyBag,omitempty"`
	TerminateNotificationProfile *TerminateNotificationProfile_STATUS `json:"terminateNotificationProfile,omitempty"`
}

// Storage version of v1api20220301.SecurityProfile
// Specifies the Security profile settings for the virtual machine or virtual machine scale set.
type SecurityProfile struct {
	EncryptionAtHost *bool                  `json:"encryptionAtHost,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SecurityType     *string                `json:"securityType,omitempty"`
	UefiSettings     *UefiSettings          `json:"uefiSettings,omitempty"`
}

// Storage version of v1api20220301.SecurityProfile_STATUS
// Specifies the Security profile settings for the virtual machine or virtual machine scale set.
type SecurityProfile_STATUS struct {
	EncryptionAtHost *bool                  `json:"encryptionAtHost,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SecurityType     *string                `json:"securityType,omitempty"`
	UefiSettings     *UefiSettings_STATUS   `json:"uefiSettings,omitempty"`
}

// Storage version of v1api20220301.StorageProfile
// Specifies the storage settings for the virtual machine disks.
type StorageProfile struct {
	DataDisks      []DataDisk             `json:"dataDisks,omitempty"`
	ImageReference *ImageReference        `json:"imageReference,omitempty"`
	OsDisk         *OSDisk                `json:"osDisk,omitempty"`
	PropertyBag    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.StorageProfile_STATUS
// Specifies the storage settings for the virtual machine disks.
type StorageProfile_STATUS struct {
	DataDisks      []DataDisk_STATUS      `json:"dataDisks,omitempty"`
	ImageReference *ImageReference_STATUS `json:"imageReference,omitempty"`
	OsDisk         *OSDisk_STATUS         `json:"osDisk,omitempty"`
	PropertyBag    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.VirtualMachineExtension_STATUS
// Describes a Virtual Machine Extension.
type VirtualMachineExtension_STATUS struct {
	AutoUpgradeMinorVersion       *bool                                       `json:"autoUpgradeMinorVersion,omitempty"`
	EnableAutomaticUpgrade        *bool                                       `json:"enableAutomaticUpgrade,omitempty"`
	ForceUpdateTag                *string                                     `json:"forceUpdateTag,omitempty"`
	Id                            *string                                     `json:"id,omitempty"`
	InstanceView                  *VirtualMachineExtensionInstanceView_STATUS `json:"instanceView,omitempty"`
	Location                      *string                                     `json:"location,omitempty"`
	Name                          *string                                     `json:"name,omitempty"`
	PropertiesType                *string                                     `json:"properties_type,omitempty"`
	PropertyBag                   genruntime.PropertyBag                      `json:"$propertyBag,omitempty"`
	ProtectedSettingsFromKeyVault *KeyVaultSecretReference_STATUS             `json:"protectedSettingsFromKeyVault,omitempty"`
	ProvisioningState             *string                                     `json:"provisioningState,omitempty"`
	Publisher                     *string                                     `json:"publisher,omitempty"`
	Settings                      map[string]v1.JSON                          `json:"settings,omitempty"`
	SuppressFailures              *bool                                       `json:"suppressFailures,omitempty"`
	Tags                          map[string]string                           `json:"tags,omitempty"`
	Type                          *string                                     `json:"type,omitempty"`
	TypeHandlerVersion            *string                                     `json:"typeHandlerVersion,omitempty"`
}

// Storage version of v1api20220301.VirtualMachineIdentity
// Identity for the virtual machine.
type VirtualMachineIdentity struct {
	PropertyBag            genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	Type                   *string                       `json:"type,omitempty"`
	UserAssignedIdentities []UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"`
}

// Storage version of v1api20220301.VirtualMachineIdentity_STATUS
// Identity for the virtual machine.
type VirtualMachineIdentity_STATUS struct {
	PrincipalId            *string                                                         `json:"principalId,omitempty"`
	PropertyBag            genruntime.PropertyBag                                          `json:"$propertyBag,omitempty"`
	TenantId               *string                                                         `json:"tenantId,omitempty"`
	Type                   *string                                                         `json:"type,omitempty"`
	UserAssignedIdentities map[string]VirtualMachineIdentity_UserAssignedIdentities_STATUS `json:"userAssignedIdentities,omitempty"`
}

// Storage version of v1api20220301.VirtualMachineInstanceView_STATUS
// The instance view of a virtual machine.
type VirtualMachineInstanceView_STATUS struct {
	AssignedHost              *string                                      `json:"assignedHost,omitempty"`
	BootDiagnostics           *BootDiagnosticsInstanceView_STATUS          `json:"bootDiagnostics,omitempty"`
	ComputerName              *string                                      `json:"computerName,omitempty"`
	Disks                     []DiskInstanceView_STATUS                    `json:"disks,omitempty"`
	Extensions                []VirtualMachineExtensionInstanceView_STATUS `json:"extensions,omitempty"`
	HyperVGeneration          *string                                      `json:"hyperVGeneration,omitempty"`
	MaintenanceRedeployStatus *MaintenanceRedeployStatus_STATUS            `json:"maintenanceRedeployStatus,omitempty"`
	OsName                    *string                                      `json:"osName,omitempty"`
	OsVersion                 *string                                      `json:"osVersion,omitempty"`
	PatchStatus               *VirtualMachinePatchStatus_STATUS            `json:"patchStatus,omitempty"`
	PlatformFaultDomain       *int                                         `json:"platformFaultDomain,omitempty"`
	PlatformUpdateDomain      *int                                         `json:"platformUpdateDomain,omitempty"`
	PropertyBag               genruntime.PropertyBag                       `json:"$propertyBag,omitempty"`
	RdpThumbPrint             *string                                      `json:"rdpThumbPrint,omitempty"`
	Statuses                  []InstanceViewStatus_STATUS                  `json:"statuses,omitempty"`
	VmAgent                   *VirtualMachineAgentInstanceView_STATUS      `json:"vmAgent,omitempty"`
	VmHealth                  *VirtualMachineHealthStatus_STATUS           `json:"vmHealth,omitempty"`
}

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

// Storage version of v1api20220301.BootDiagnostics
// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
// You can easily view the output of your console log.
// Azure also enables you to see a screenshot of the
// VM from the hypervisor.
type BootDiagnostics struct {
	Enabled     *bool                  `json:"enabled,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	StorageUri  *string                `json:"storageUri,omitempty"`
}

// Storage version of v1api20220301.BootDiagnostics_STATUS
// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
// You can easily view the output of your console log.
// Azure also enables you to see a screenshot of the
// VM from the hypervisor.
type BootDiagnostics_STATUS struct {
	Enabled     *bool                  `json:"enabled,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	StorageUri  *string                `json:"storageUri,omitempty"`
}

// Storage version of v1api20220301.BootDiagnosticsInstanceView_STATUS
// The instance view of a virtual machine boot diagnostics.
type BootDiagnosticsInstanceView_STATUS struct {
	ConsoleScreenshotBlobUri *string                    `json:"consoleScreenshotBlobUri,omitempty"`
	PropertyBag              genruntime.PropertyBag     `json:"$propertyBag,omitempty"`
	SerialConsoleLogBlobUri  *string                    `json:"serialConsoleLogBlobUri,omitempty"`
	Status                   *InstanceViewStatus_STATUS `json:"status,omitempty"`
}

// Storage version of v1api20220301.DataDisk
// Describes a data disk.
type DataDisk struct {
	Caching                 *string                `json:"caching,omitempty"`
	CreateOption            *string                `json:"createOption,omitempty"`
	DeleteOption            *string                `json:"deleteOption,omitempty"`
	DetachOption            *string                `json:"detachOption,omitempty"`
	DiskSizeGB              *int                   `json:"diskSizeGB,omitempty"`
	Image                   *VirtualHardDisk       `json:"image,omitempty"`
	Lun                     *int                   `json:"lun,omitempty"`
	ManagedDisk             *ManagedDiskParameters `json:"managedDisk,omitempty"`
	Name                    *string                `json:"name,omitempty"`
	PropertyBag             genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ToBeDetached            *bool                  `json:"toBeDetached,omitempty"`
	Vhd                     *VirtualHardDisk       `json:"vhd,omitempty"`
	WriteAcceleratorEnabled *bool                  `json:"writeAcceleratorEnabled,omitempty"`
}

// Storage version of v1api20220301.DataDisk_STATUS
// Describes a data disk.
type DataDisk_STATUS struct {
	Caching                 *string                       `json:"caching,omitempty"`
	CreateOption            *string                       `json:"createOption,omitempty"`
	DeleteOption            *string                       `json:"deleteOption,omitempty"`
	DetachOption            *string                       `json:"detachOption,omitempty"`
	DiskIOPSReadWrite       *int                          `json:"diskIOPSReadWrite,omitempty"`
	DiskMBpsReadWrite       *int                          `json:"diskMBpsReadWrite,omitempty"`
	DiskSizeGB              *int                          `json:"diskSizeGB,omitempty"`
	Image                   *VirtualHardDisk_STATUS       `json:"image,omitempty"`
	Lun                     *int                          `json:"lun,omitempty"`
	ManagedDisk             *ManagedDiskParameters_STATUS `json:"managedDisk,omitempty"`
	Name                    *string                       `json:"name,omitempty"`
	PropertyBag             genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	ToBeDetached            *bool                         `json:"toBeDetached,omitempty"`
	Vhd                     *VirtualHardDisk_STATUS       `json:"vhd,omitempty"`
	WriteAcceleratorEnabled *bool                         `json:"writeAcceleratorEnabled,omitempty"`
}

// Storage version of v1api20220301.DiskInstanceView_STATUS
// The instance view of the disk.
type DiskInstanceView_STATUS struct {
	EncryptionSettings []DiskEncryptionSettings_STATUS `json:"encryptionSettings,omitempty"`
	Name               *string                         `json:"name,omitempty"`
	PropertyBag        genruntime.PropertyBag          `json:"$propertyBag,omitempty"`
	Statuses           []InstanceViewStatus_STATUS     `json:"statuses,omitempty"`
}

// Storage version of v1api20220301.ImageReference
// Specifies information about the image to use. You can specify information about platform images, marketplace images, or
// virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual
// machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set
// when you create the scale set.
type ImageReference struct {
	CommunityGalleryImageId *string                `json:"communityGalleryImageId,omitempty"`
	Offer                   *string                `json:"offer,omitempty"`
	PropertyBag             genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Publisher               *string                `json:"publisher,omitempty"`

	// Reference: Resource Id
	Reference            *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"`
	SharedGalleryImageId *string                       `json:"sharedGalleryImageId,omitempty"`
	Sku                  *string                       `json:"sku,omitempty"`
	Version              *string                       `json:"version,omitempty"`
}

// Storage version of v1api20220301.ImageReference_STATUS
// Specifies information about the image to use. You can specify information about platform images, marketplace images, or
// virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual
// machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set
// when you create the scale set.
type ImageReference_STATUS struct {
	CommunityGalleryImageId *string                `json:"communityGalleryImageId,omitempty"`
	ExactVersion            *string                `json:"exactVersion,omitempty"`
	Id                      *string                `json:"id,omitempty"`
	Offer                   *string                `json:"offer,omitempty"`
	PropertyBag             genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Publisher               *string                `json:"publisher,omitempty"`
	SharedGalleryImageId    *string                `json:"sharedGalleryImageId,omitempty"`
	Sku                     *string                `json:"sku,omitempty"`
	Version                 *string                `json:"version,omitempty"`
}

// Storage version of v1api20220301.InstanceViewStatus_STATUS
// Instance view status.
type InstanceViewStatus_STATUS struct {
	Code          *string                `json:"code,omitempty"`
	DisplayStatus *string                `json:"displayStatus,omitempty"`
	Level         *string                `json:"level,omitempty"`
	Message       *string                `json:"message,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Time          *string                `json:"time,omitempty"`
}

// AssignProperties_From_InstanceViewStatus_STATUS populates our InstanceViewStatus_STATUS from the provided source InstanceViewStatus_STATUS
func (status *InstanceViewStatus_STATUS) AssignProperties_From_InstanceViewStatus_STATUS(source *v20241101s.InstanceViewStatus_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

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

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

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

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

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

	// No error
	return nil
}

// AssignProperties_To_InstanceViewStatus_STATUS populates the provided destination InstanceViewStatus_STATUS from our InstanceViewStatus_STATUS
func (status *InstanceViewStatus_STATUS) AssignProperties_To_InstanceViewStatus_STATUS(destination *v20241101s.InstanceViewStatus_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(status.PropertyBag)

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

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

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

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

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

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

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

	// No error
	return nil
}

// Storage version of v1api20220301.LinuxConfiguration
// Specifies the Linux operating system settings on the virtual machine.
// For a list of supported Linux
// distributions, see [Linux on Azure-Endorsed
// Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros).
type LinuxConfiguration struct {
	DisablePasswordAuthentication *bool                  `json:"disablePasswordAuthentication,omitempty"`
	PatchSettings                 *LinuxPatchSettings    `json:"patchSettings,omitempty"`
	PropertyBag                   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ProvisionVMAgent              *bool                  `json:"provisionVMAgent,omitempty"`
	Ssh                           *SshConfiguration      `json:"ssh,omitempty"`
}

// Storage version of v1api20220301.LinuxConfiguration_STATUS
// Specifies the Linux operating system settings on the virtual machine.
// For a list of supported Linux
// distributions, see [Linux on Azure-Endorsed
// Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros).
type LinuxConfiguration_STATUS struct {
	DisablePasswordAuthentication *bool                      `json:"disablePasswordAuthentication,omitempty"`
	PatchSettings                 *LinuxPatchSettings_STATUS `json:"patchSettings,omitempty"`
	PropertyBag                   genruntime.PropertyBag     `json:"$propertyBag,omitempty"`
	ProvisionVMAgent              *bool                      `json:"provisionVMAgent,omitempty"`
	Ssh                           *SshConfiguration_STATUS   `json:"ssh,omitempty"`
}

// Storage version of v1api20220301.MaintenanceRedeployStatus_STATUS
// Maintenance Operation Status.
type MaintenanceRedeployStatus_STATUS struct {
	IsCustomerInitiatedMaintenanceAllowed *bool                  `json:"isCustomerInitiatedMaintenanceAllowed,omitempty"`
	LastOperationMessage                  *string                `json:"lastOperationMessage,omitempty"`
	LastOperationResultCode               *string                `json:"lastOperationResultCode,omitempty"`
	MaintenanceWindowEndTime              *string                `json:"maintenanceWindowEndTime,omitempty"`
	MaintenanceWindowStartTime            *string                `json:"maintenanceWindowStartTime,omitempty"`
	PreMaintenanceWindowEndTime           *string                `json:"preMaintenanceWindowEndTime,omitempty"`
	PreMaintenanceWindowStartTime         *string                `json:"preMaintenanceWindowStartTime,omitempty"`
	PropertyBag                           genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.NetworkInterfaceReference
// Describes a network interface reference.
type NetworkInterfaceReference struct {
	DeleteOption *string                `json:"deleteOption,omitempty"`
	Primary      *bool                  `json:"primary,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`

	// Reference: Resource Id
	Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"`
}

// Storage version of v1api20220301.NetworkInterfaceReference_STATUS
// Describes a network interface reference.
type NetworkInterfaceReference_STATUS struct {
	DeleteOption *string                `json:"deleteOption,omitempty"`
	Id           *string                `json:"id,omitempty"`
	Primary      *bool                  `json:"primary,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.OSDisk
// Specifies information about the operating system disk used by the virtual machine.
// For more information about
// disks, see [About disks and VHDs for Azure virtual
// machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).
type OSDisk struct {
	Caching                 *string                 `json:"caching,omitempty"`
	CreateOption            *string                 `json:"createOption,omitempty"`
	DeleteOption            *string                 `json:"deleteOption,omitempty"`
	DiffDiskSettings        *DiffDiskSettings       `json:"diffDiskSettings,omitempty"`
	DiskSizeGB              *int                    `json:"diskSizeGB,omitempty"`
	EncryptionSettings      *DiskEncryptionSettings `json:"encryptionSettings,omitempty"`
	Image                   *VirtualHardDisk        `json:"image,omitempty"`
	ManagedDisk             *ManagedDiskParameters  `json:"managedDisk,omitempty"`
	Name                    *string                 `json:"name,omitempty"`
	OsType                  *string                 `json:"osType,omitempty"`
	PropertyBag             genruntime.PropertyBag  `json:"$propertyBag,omitempty"`
	Vhd                     *VirtualHardDisk        `json:"vhd,omitempty"`
	WriteAcceleratorEnabled *bool                   `json:"writeAcceleratorEnabled,omitempty"`
}

// Storage version of v1api20220301.OSDisk_STATUS
// Specifies information about the operating system disk used by the virtual machine.
// For more information about
// disks, see [About disks and VHDs for Azure virtual
// machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).
type OSDisk_STATUS struct {
	Caching                 *string                        `json:"caching,omitempty"`
	CreateOption            *string                        `json:"createOption,omitempty"`
	DeleteOption            *string                        `json:"deleteOption,omitempty"`
	DiffDiskSettings        *DiffDiskSettings_STATUS       `json:"diffDiskSettings,omitempty"`
	DiskSizeGB              *int                           `json:"diskSizeGB,omitempty"`
	EncryptionSettings      *DiskEncryptionSettings_STATUS `json:"encryptionSettings,omitempty"`
	Image                   *VirtualHardDisk_STATUS        `json:"image,omitempty"`
	ManagedDisk             *ManagedDiskParameters_STATUS  `json:"managedDisk,omitempty"`
	Name                    *string                        `json:"name,omitempty"`
	OsType                  *string                        `json:"osType,omitempty"`
	PropertyBag             genruntime.PropertyBag         `json:"$propertyBag,omitempty"`
	Vhd                     *VirtualHardDisk_STATUS        `json:"vhd,omitempty"`
	WriteAcceleratorEnabled *bool                          `json:"writeAcceleratorEnabled,omitempty"`
}

// Storage version of v1api20220301.TerminateNotificationProfile
type TerminateNotificationProfile struct {
	Enable           *bool                  `json:"enable,omitempty"`
	NotBeforeTimeout *string                `json:"notBeforeTimeout,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.TerminateNotificationProfile_STATUS
type TerminateNotificationProfile_STATUS struct {
	Enable           *bool                  `json:"enable,omitempty"`
	NotBeforeTimeout *string                `json:"notBeforeTimeout,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.UefiSettings
// Specifies the security settings like secure boot and vTPM used while creating the virtual machine.
// Minimum
// api-version: 2020-12-01
type UefiSettings struct {
	PropertyBag       genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SecureBootEnabled *bool                  `json:"secureBootEnabled,omitempty"`
	VTpmEnabled       *bool                  `json:"vTpmEnabled,omitempty"`
}

// Storage version of v1api20220301.UefiSettings_STATUS
// Specifies the security settings like secure boot and vTPM used while creating the virtual machine.
// Minimum
// api-version: 2020-12-01
type UefiSettings_STATUS struct {
	PropertyBag       genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SecureBootEnabled *bool                  `json:"secureBootEnabled,omitempty"`
	VTpmEnabled       *bool                  `json:"vTpmEnabled,omitempty"`
}

// Storage version of v1api20220301.UserAssignedIdentityDetails
// Information about the user assigned identity for the resource
type UserAssignedIdentityDetails struct {
	PropertyBag genruntime.PropertyBag       `json:"$propertyBag,omitempty"`
	Reference   genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"`
}

// AssignProperties_From_UserAssignedIdentityDetails populates our UserAssignedIdentityDetails from the provided source UserAssignedIdentityDetails
func (details *UserAssignedIdentityDetails) AssignProperties_From_UserAssignedIdentityDetails(source *v20220702s.UserAssignedIdentityDetails) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

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

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

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

	// No error
	return nil
}

// AssignProperties_To_UserAssignedIdentityDetails populates the provided destination UserAssignedIdentityDetails from our UserAssignedIdentityDetails
func (details *UserAssignedIdentityDetails) AssignProperties_To_UserAssignedIdentityDetails(destination *v20220702s.UserAssignedIdentityDetails) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(details.PropertyBag)

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

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

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

	// No error
	return nil
}

// Storage version of v1api20220301.VaultSecretGroup
// Describes a set of certificates which are all in the same Key Vault.
type VaultSecretGroup struct {
	PropertyBag       genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SourceVault       *SubResource           `json:"sourceVault,omitempty"`
	VaultCertificates []VaultCertificate     `json:"vaultCertificates,omitempty"`
}

// Storage version of v1api20220301.VaultSecretGroup_STATUS
// Describes a set of certificates which are all in the same Key Vault.
type VaultSecretGroup_STATUS struct {
	PropertyBag       genruntime.PropertyBag    `json:"$propertyBag,omitempty"`
	SourceVault       *SubResource_STATUS       `json:"sourceVault,omitempty"`
	VaultCertificates []VaultCertificate_STATUS `json:"vaultCertificates,omitempty"`
}

// Storage version of v1api20220301.VirtualMachineAgentInstanceView_STATUS
// The instance view of the VM Agent running on the virtual machine.
type VirtualMachineAgentInstanceView_STATUS struct {
	ExtensionHandlers []VirtualMachineExtensionHandlerInstanceView_STATUS `json:"extensionHandlers,omitempty"`
	PropertyBag       genruntime.PropertyBag                              `json:"$propertyBag,omitempty"`
	Statuses          []InstanceViewStatus_STATUS                         `json:"statuses,omitempty"`
	VmAgentVersion    *string                                             `json:"vmAgentVersion,omitempty"`
}

// Storage version of v1api20220301.VirtualMachineHealthStatus_STATUS
// The health status of the VM.
type VirtualMachineHealthStatus_STATUS struct {
	PropertyBag genruntime.PropertyBag     `json:"$propertyBag,omitempty"`
	Status      *InstanceViewStatus_STATUS `json:"status,omitempty"`
}

// Storage version of v1api20220301.VirtualMachineIdentity_UserAssignedIdentities_STATUS
type VirtualMachineIdentity_UserAssignedIdentities_STATUS struct {
	ClientId    *string                `json:"clientId,omitempty"`
	PrincipalId *string                `json:"principalId,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.VirtualMachineNetworkInterfaceConfiguration
// Describes a virtual machine network interface configurations.
type VirtualMachineNetworkInterfaceConfiguration struct {
	DeleteOption                *string                                                 `json:"deleteOption,omitempty"`
	DnsSettings                 *VirtualMachineNetworkInterfaceDnsSettingsConfiguration `json:"dnsSettings,omitempty"`
	DscpConfiguration           *SubResource                                            `json:"dscpConfiguration,omitempty"`
	EnableAcceleratedNetworking *bool                                                   `json:"enableAcceleratedNetworking,omitempty"`
	EnableFpga                  *bool                                                   `json:"enableFpga,omitempty"`
	EnableIPForwarding          *bool                                                   `json:"enableIPForwarding,omitempty"`
	IpConfigurations            []VirtualMachineNetworkInterfaceIPConfiguration         `json:"ipConfigurations,omitempty"`
	Name                        *string                                                 `json:"name,omitempty"`
	NetworkSecurityGroup        *SubResource                                            `json:"networkSecurityGroup,omitempty"`
	Primary                     *bool                                                   `json:"primary,omitempty"`
	PropertyBag                 genruntime.PropertyBag                                  `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.VirtualMachineNetworkInterfaceConfiguration_STATUS
// Describes a virtual machine network interface configurations.
type VirtualMachineNetworkInterfaceConfiguration_STATUS struct {
	DeleteOption                *string                                                        `json:"deleteOption,omitempty"`
	DnsSettings                 *VirtualMachineNetworkInterfaceDnsSettingsConfiguration_STATUS `json:"dnsSettings,omitempty"`
	DscpConfiguration           *SubResource_STATUS                                            `json:"dscpConfiguration,omitempty"`
	EnableAcceleratedNetworking *bool                                                          `json:"enableAcceleratedNetworking,omitempty"`
	EnableFpga                  *bool                                                          `json:"enableFpga,omitempty"`
	EnableIPForwarding          *bool                                                          `json:"enableIPForwarding,omitempty"`
	IpConfigurations            []VirtualMachineNetworkInterfaceIPConfiguration_STATUS         `json:"ipConfigurations,omitempty"`
	Name                        *string                                                        `json:"name,omitempty"`
	NetworkSecurityGroup        *SubResource_STATUS                                            `json:"networkSecurityGroup,omitempty"`
	Primary                     *bool                                                          `json:"primary,omitempty"`
	PropertyBag                 genruntime.PropertyBag                                         `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.VirtualMachinePatchStatus_STATUS
// The status of virtual machine patch operations.
type VirtualMachinePatchStatus_STATUS struct {
	AvailablePatchSummary        *AvailablePatchSummary_STATUS        `json:"availablePatchSummary,omitempty"`
	ConfigurationStatuses        []InstanceViewStatus_STATUS          `json:"configurationStatuses,omitempty"`
	LastPatchInstallationSummary *LastPatchInstallationSummary_STATUS `json:"lastPatchInstallationSummary,omitempty"`
	PropertyBag                  genruntime.PropertyBag               `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.VMGalleryApplication
// Specifies the required information to reference a compute gallery application version
type VMGalleryApplication struct {
	ConfigurationReference *string `json:"configurationReference,omitempty"`
	EnableAutomaticUpgrade *bool   `json:"enableAutomaticUpgrade,omitempty"`
	Order                  *int    `json:"order,omitempty"`

	// +kubebuilder:validation:Required
	// PackageReferenceReference: Specifies the GalleryApplicationVersion resource id on the form of
	// /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}
	PackageReferenceReference       *genruntime.ResourceReference `armReference:"PackageReferenceId" json:"packageReferenceReference,omitempty"`
	PropertyBag                     genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	Tags                            *string                       `json:"tags,omitempty"`
	TreatFailureAsDeploymentFailure *bool                         `json:"treatFailureAsDeploymentFailure,omitempty"`
}

// Storage version of v1api20220301.VMGalleryApplication_STATUS
// Specifies the required information to reference a compute gallery application version
type VMGalleryApplication_STATUS struct {
	ConfigurationReference          *string                `json:"configurationReference,omitempty"`
	EnableAutomaticUpgrade          *bool                  `json:"enableAutomaticUpgrade,omitempty"`
	Order                           *int                   `json:"order,omitempty"`
	PackageReferenceId              *string                `json:"packageReferenceId,omitempty"`
	PropertyBag                     genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tags                            *string                `json:"tags,omitempty"`
	TreatFailureAsDeploymentFailure *bool                  `json:"treatFailureAsDeploymentFailure,omitempty"`
}

// Storage version of v1api20220301.VMSizeProperties
// Specifies VM Size Property settings on the virtual machine.
type VMSizeProperties struct {
	PropertyBag    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	VCPUsAvailable *int                   `json:"vCPUsAvailable,omitempty"`
	VCPUsPerCore   *int                   `json:"vCPUsPerCore,omitempty"`
}

// Storage version of v1api20220301.VMSizeProperties_STATUS
// Specifies VM Size Property settings on the virtual machine.
type VMSizeProperties_STATUS struct {
	PropertyBag    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	VCPUsAvailable *int                   `json:"vCPUsAvailable,omitempty"`
	VCPUsPerCore   *int                   `json:"vCPUsPerCore,omitempty"`
}

// Storage version of v1api20220301.WindowsConfiguration
// Specifies Windows operating system settings on the virtual machine.
type WindowsConfiguration struct {
	AdditionalUnattendContent []AdditionalUnattendContent `json:"additionalUnattendContent,omitempty"`
	EnableAutomaticUpdates    *bool                       `json:"enableAutomaticUpdates,omitempty"`
	PatchSettings             *PatchSettings              `json:"patchSettings,omitempty"`
	PropertyBag               genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
	ProvisionVMAgent          *bool                       `json:"provisionVMAgent,omitempty"`
	TimeZone                  *string                     `json:"timeZone,omitempty"`
	WinRM                     *WinRMConfiguration         `json:"winRM,omitempty"`
}

// Storage version of v1api20220301.WindowsConfiguration_STATUS
// Specifies Windows operating system settings on the virtual machine.
type WindowsConfiguration_STATUS struct {
	AdditionalUnattendContent []AdditionalUnattendContent_STATUS `json:"additionalUnattendContent,omitempty"`
	EnableAutomaticUpdates    *bool                              `json:"enableAutomaticUpdates,omitempty"`
	PatchSettings             *PatchSettings_STATUS              `json:"patchSettings,omitempty"`
	PropertyBag               genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
	ProvisionVMAgent          *bool                              `json:"provisionVMAgent,omitempty"`
	TimeZone                  *string                            `json:"timeZone,omitempty"`
	WinRM                     *WinRMConfiguration_STATUS         `json:"winRM,omitempty"`
}

// Storage version of v1api20220301.AdditionalUnattendContent
// Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows
// Setup. Contents are defined by setting name, component name, and the pass in which the content is applied.
type AdditionalUnattendContent struct {
	ComponentName *string                `json:"componentName,omitempty"`
	Content       *string                `json:"content,omitempty"`
	PassName      *string                `json:"passName,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SettingName   *string                `json:"settingName,omitempty"`
}

// Storage version of v1api20220301.AdditionalUnattendContent_STATUS
// Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows
// Setup. Contents are defined by setting name, component name, and the pass in which the content is applied.
type AdditionalUnattendContent_STATUS struct {
	ComponentName *string                `json:"componentName,omitempty"`
	Content       *string                `json:"content,omitempty"`
	PassName      *string                `json:"passName,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SettingName   *string                `json:"settingName,omitempty"`
}

type augmentConversionForInstanceViewStatus_STATUS interface {
	AssignPropertiesFrom(src *v20241101s.InstanceViewStatus_STATUS) error
	AssignPropertiesTo(dst *v20241101s.InstanceViewStatus_STATUS) error
}

type augmentConversionForUserAssignedIdentityDetails interface {
	AssignPropertiesFrom(src *v20220702s.UserAssignedIdentityDetails) error
	AssignPropertiesTo(dst *v20220702s.UserAssignedIdentityDetails) error
}

// Storage version of v1api20220301.AvailablePatchSummary_STATUS
// Describes the properties of an virtual machine instance view for available patch summary.
type AvailablePatchSummary_STATUS struct {
	AssessmentActivityId          *string                `json:"assessmentActivityId,omitempty"`
	CriticalAndSecurityPatchCount *int                   `json:"criticalAndSecurityPatchCount,omitempty"`
	Error                         *ApiError_STATUS       `json:"error,omitempty"`
	LastModifiedTime              *string                `json:"lastModifiedTime,omitempty"`
	OtherPatchCount               *int                   `json:"otherPatchCount,omitempty"`
	PropertyBag                   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	RebootPending                 *bool                  `json:"rebootPending,omitempty"`
	StartTime                     *string                `json:"startTime,omitempty"`
	Status                        *string                `json:"status,omitempty"`
}

// Storage version of v1api20220301.DiffDiskSettings
// Describes the parameters of ephemeral disk settings that can be specified for operating system disk.
// NOTE: The
// ephemeral disk settings can only be specified for managed disk.
type DiffDiskSettings struct {
	Option      *string                `json:"option,omitempty"`
	Placement   *string                `json:"placement,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.DiffDiskSettings_STATUS
// Describes the parameters of ephemeral disk settings that can be specified for operating system disk.
// NOTE: The
// ephemeral disk settings can only be specified for managed disk.
type DiffDiskSettings_STATUS struct {
	Option      *string                `json:"option,omitempty"`
	Placement   *string                `json:"placement,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.DiskEncryptionSettings
// Describes a Encryption Settings for a Disk
type DiskEncryptionSettings struct {
	DiskEncryptionKey *KeyVaultSecretReference `json:"diskEncryptionKey,omitempty"`
	Enabled           *bool                    `json:"enabled,omitempty"`
	KeyEncryptionKey  *KeyVaultKeyReference    `json:"keyEncryptionKey,omitempty"`
	PropertyBag       genruntime.PropertyBag   `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.DiskEncryptionSettings_STATUS
// Describes a Encryption Settings for a Disk
type DiskEncryptionSettings_STATUS struct {
	DiskEncryptionKey *KeyVaultSecretReference_STATUS `json:"diskEncryptionKey,omitempty"`
	Enabled           *bool                           `json:"enabled,omitempty"`
	KeyEncryptionKey  *KeyVaultKeyReference_STATUS    `json:"keyEncryptionKey,omitempty"`
	PropertyBag       genruntime.PropertyBag          `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.LastPatchInstallationSummary_STATUS
// Describes the properties of the last installed patch summary.
type LastPatchInstallationSummary_STATUS struct {
	Error                     *ApiError_STATUS       `json:"error,omitempty"`
	ExcludedPatchCount        *int                   `json:"excludedPatchCount,omitempty"`
	FailedPatchCount          *int                   `json:"failedPatchCount,omitempty"`
	InstallationActivityId    *string                `json:"installationActivityId,omitempty"`
	InstalledPatchCount       *int                   `json:"installedPatchCount,omitempty"`
	LastModifiedTime          *string                `json:"lastModifiedTime,omitempty"`
	MaintenanceWindowExceeded *bool                  `json:"maintenanceWindowExceeded,omitempty"`
	NotSelectedPatchCount     *int                   `json:"notSelectedPatchCount,omitempty"`
	PendingPatchCount         *int                   `json:"pendingPatchCount,omitempty"`
	PropertyBag               genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	StartTime                 *string                `json:"startTime,omitempty"`
	Status                    *string                `json:"status,omitempty"`
}

// Storage version of v1api20220301.LinuxPatchSettings
// Specifies settings related to VM Guest Patching on Linux.
type LinuxPatchSettings struct {
	AssessmentMode              *string                                       `json:"assessmentMode,omitempty"`
	AutomaticByPlatformSettings *LinuxVMGuestPatchAutomaticByPlatformSettings `json:"automaticByPlatformSettings,omitempty"`
	PatchMode                   *string                                       `json:"patchMode,omitempty"`
	PropertyBag                 genruntime.PropertyBag                        `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.LinuxPatchSettings_STATUS
// Specifies settings related to VM Guest Patching on Linux.
type LinuxPatchSettings_STATUS struct {
	AssessmentMode              *string                                              `json:"assessmentMode,omitempty"`
	AutomaticByPlatformSettings *LinuxVMGuestPatchAutomaticByPlatformSettings_STATUS `json:"automaticByPlatformSettings,omitempty"`
	PatchMode                   *string                                              `json:"patchMode,omitempty"`
	PropertyBag                 genruntime.PropertyBag                               `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.ManagedDiskParameters
// The parameters of a managed disk.
type ManagedDiskParameters struct {
	DiskEncryptionSet *SubResource           `json:"diskEncryptionSet,omitempty"`
	PropertyBag       genruntime.PropertyBag `json:"$propertyBag,omitempty"`

	// Reference: Resource Id
	Reference          *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"`
	SecurityProfile    *VMDiskSecurityProfile        `json:"securityProfile,omitempty"`
	StorageAccountType *string                       `json:"storageAccountType,omitempty"`
}

// Storage version of v1api20220301.ManagedDiskParameters_STATUS
// The parameters of a managed disk.
type ManagedDiskParameters_STATUS struct {
	DiskEncryptionSet  *SubResource_STATUS           `json:"diskEncryptionSet,omitempty"`
	Id                 *string                       `json:"id,omitempty"`
	PropertyBag        genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	SecurityProfile    *VMDiskSecurityProfile_STATUS `json:"securityProfile,omitempty"`
	StorageAccountType *string                       `json:"storageAccountType,omitempty"`
}

// Storage version of v1api20220301.PatchSettings
// Specifies settings related to VM Guest Patching on Windows.
type PatchSettings struct {
	AssessmentMode              *string                                         `json:"assessmentMode,omitempty"`
	AutomaticByPlatformSettings *WindowsVMGuestPatchAutomaticByPlatformSettings `json:"automaticByPlatformSettings,omitempty"`
	EnableHotpatching           *bool                                           `json:"enableHotpatching,omitempty"`
	PatchMode                   *string                                         `json:"patchMode,omitempty"`
	PropertyBag                 genruntime.PropertyBag                          `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.PatchSettings_STATUS
// Specifies settings related to VM Guest Patching on Windows.
type PatchSettings_STATUS struct {
	AssessmentMode              *string                                                `json:"assessmentMode,omitempty"`
	AutomaticByPlatformSettings *WindowsVMGuestPatchAutomaticByPlatformSettings_STATUS `json:"automaticByPlatformSettings,omitempty"`
	EnableHotpatching           *bool                                                  `json:"enableHotpatching,omitempty"`
	PatchMode                   *string                                                `json:"patchMode,omitempty"`
	PropertyBag                 genruntime.PropertyBag                                 `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.SshConfiguration
// SSH configuration for Linux based VMs running on Azure
type SshConfiguration struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	PublicKeys  []SshPublicKeySpec     `json:"publicKeys,omitempty"`
}

// Storage version of v1api20220301.SshConfiguration_STATUS
// SSH configuration for Linux based VMs running on Azure
type SshConfiguration_STATUS struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	PublicKeys  []SshPublicKey_STATUS  `json:"publicKeys,omitempty"`
}

// Storage version of v1api20220301.VaultCertificate
// Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM.
type VaultCertificate struct {
	CertificateStore *string                `json:"certificateStore,omitempty"`
	CertificateUrl   *string                `json:"certificateUrl,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.VaultCertificate_STATUS
// Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM.
type VaultCertificate_STATUS struct {
	CertificateStore *string                `json:"certificateStore,omitempty"`
	CertificateUrl   *string                `json:"certificateUrl,omitempty"`
	PropertyBag      genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.VirtualHardDisk
// Describes the uri of a disk.
type VirtualHardDisk struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Uri         *string                `json:"uri,omitempty"`
}

// Storage version of v1api20220301.VirtualHardDisk_STATUS
// Describes the uri of a disk.
type VirtualHardDisk_STATUS struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Uri         *string                `json:"uri,omitempty"`
}

// Storage version of v1api20220301.VirtualMachineExtensionHandlerInstanceView_STATUS
// The instance view of a virtual machine extension handler.
type VirtualMachineExtensionHandlerInstanceView_STATUS struct {
	PropertyBag        genruntime.PropertyBag     `json:"$propertyBag,omitempty"`
	Status             *InstanceViewStatus_STATUS `json:"status,omitempty"`
	Type               *string                    `json:"type,omitempty"`
	TypeHandlerVersion *string                    `json:"typeHandlerVersion,omitempty"`
}

// Storage version of v1api20220301.VirtualMachineNetworkInterfaceDnsSettingsConfiguration
// Describes a virtual machines network configuration's DNS settings.
type VirtualMachineNetworkInterfaceDnsSettingsConfiguration struct {
	DnsServers  []string               `json:"dnsServers,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.VirtualMachineNetworkInterfaceDnsSettingsConfiguration_STATUS
// Describes a virtual machines network configuration's DNS settings.
type VirtualMachineNetworkInterfaceDnsSettingsConfiguration_STATUS struct {
	DnsServers  []string               `json:"dnsServers,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.VirtualMachineNetworkInterfaceIPConfiguration
// Describes a virtual machine network profile's IP configuration.
type VirtualMachineNetworkInterfaceIPConfiguration struct {
	ApplicationGatewayBackendAddressPools []SubResource                               `json:"applicationGatewayBackendAddressPools,omitempty"`
	ApplicationSecurityGroups             []SubResource                               `json:"applicationSecurityGroups,omitempty"`
	LoadBalancerBackendAddressPools       []SubResource                               `json:"loadBalancerBackendAddressPools,omitempty"`
	Name                                  *string                                     `json:"name,omitempty"`
	Primary                               *bool                                       `json:"primary,omitempty"`
	PrivateIPAddressVersion               *string                                     `json:"privateIPAddressVersion,omitempty"`
	PropertyBag                           genruntime.PropertyBag                      `json:"$propertyBag,omitempty"`
	PublicIPAddressConfiguration          *VirtualMachinePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
	Subnet                                *SubResource                                `json:"subnet,omitempty"`
}

// Storage version of v1api20220301.VirtualMachineNetworkInterfaceIPConfiguration_STATUS
// Describes a virtual machine network profile's IP configuration.
type VirtualMachineNetworkInterfaceIPConfiguration_STATUS struct {
	ApplicationGatewayBackendAddressPools []SubResource_STATUS                               `json:"applicationGatewayBackendAddressPools,omitempty"`
	ApplicationSecurityGroups             []SubResource_STATUS                               `json:"applicationSecurityGroups,omitempty"`
	LoadBalancerBackendAddressPools       []SubResource_STATUS                               `json:"loadBalancerBackendAddressPools,omitempty"`
	Name                                  *string                                            `json:"name,omitempty"`
	Primary                               *bool                                              `json:"primary,omitempty"`
	PrivateIPAddressVersion               *string                                            `json:"privateIPAddressVersion,omitempty"`
	PropertyBag                           genruntime.PropertyBag                             `json:"$propertyBag,omitempty"`
	PublicIPAddressConfiguration          *VirtualMachinePublicIPAddressConfiguration_STATUS `json:"publicIPAddressConfiguration,omitempty"`
	Subnet                                *SubResource_STATUS                                `json:"subnet,omitempty"`
}

// Storage version of v1api20220301.WinRMConfiguration
// Describes Windows Remote Management configuration of the VM
type WinRMConfiguration struct {
	Listeners   []WinRMListener        `json:"listeners,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.WinRMConfiguration_STATUS
// Describes Windows Remote Management configuration of the VM
type WinRMConfiguration_STATUS struct {
	Listeners   []WinRMListener_STATUS `json:"listeners,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.ApiError_STATUS
// Api error.
type ApiError_STATUS struct {
	Code        *string                `json:"code,omitempty"`
	Details     []ApiErrorBase_STATUS  `json:"details,omitempty"`
	Innererror  *InnerError_STATUS     `json:"innererror,omitempty"`
	Message     *string                `json:"message,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Target      *string                `json:"target,omitempty"`
}

// AssignProperties_From_ApiError_STATUS populates our ApiError_STATUS from the provided source ApiError_STATUS
func (error *ApiError_STATUS) AssignProperties_From_ApiError_STATUS(source *v20220702s.ApiError_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Code
	error.Code = genruntime.ClonePointerToString(source.Code)

	// Details
	if source.Details != nil {
		detailList := make([]ApiErrorBase_STATUS, len(source.Details))
		for detailIndex, detailItem := range source.Details {
			var detail ApiErrorBase_STATUS
			err := detail.AssignProperties_From_ApiErrorBase_STATUS(&detailItem)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_From_ApiErrorBase_STATUS() to populate field Details")
			}
			detailList[detailIndex] = detail
		}
		error.Details = detailList
	} else {
		error.Details = nil
	}

	// Innererror
	if source.Innererror != nil {
		var innererror InnerError_STATUS
		err := innererror.AssignProperties_From_InnerError_STATUS(source.Innererror)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_From_InnerError_STATUS() to populate field Innererror")
		}
		error.Innererror = &innererror
	} else {
		error.Innererror = nil
	}

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

	// Target
	error.Target = genruntime.ClonePointerToString(source.Target)

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

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

	// No error
	return nil
}

// AssignProperties_To_ApiError_STATUS populates the provided destination ApiError_STATUS from our ApiError_STATUS
func (error *ApiError_STATUS) AssignProperties_To_ApiError_STATUS(destination *v20220702s.ApiError_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(error.PropertyBag)

	// Code
	destination.Code = genruntime.ClonePointerToString(error.Code)

	// Details
	if error.Details != nil {
		detailList := make([]v20220702s.ApiErrorBase_STATUS, len(error.Details))
		for detailIndex, detailItem := range error.Details {
			var detail v20220702s.ApiErrorBase_STATUS
			err := detailItem.AssignProperties_To_ApiErrorBase_STATUS(&detail)
			if err != nil {
				return eris.Wrap(err, "calling AssignProperties_To_ApiErrorBase_STATUS() to populate field Details")
			}
			detailList[detailIndex] = detail
		}
		destination.Details = detailList
	} else {
		destination.Details = nil
	}

	// Innererror
	if error.Innererror != nil {
		var innererror v20220702s.InnerError_STATUS
		err := error.Innererror.AssignProperties_To_InnerError_STATUS(&innererror)
		if err != nil {
			return eris.Wrap(err, "calling AssignProperties_To_InnerError_STATUS() to populate field Innererror")
		}
		destination.Innererror = &innererror
	} else {
		destination.Innererror = nil
	}

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

	// Target
	destination.Target = genruntime.ClonePointerToString(error.Target)

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

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

	// No error
	return nil
}

// Storage version of v1api20220301.KeyVaultKeyReference
// Describes a reference to Key Vault Key
type KeyVaultKeyReference struct {
	KeyUrl      *string                `json:"keyUrl,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SourceVault *SubResource           `json:"sourceVault,omitempty"`
}

// Storage version of v1api20220301.KeyVaultKeyReference_STATUS
// Describes a reference to Key Vault Key
type KeyVaultKeyReference_STATUS struct {
	KeyUrl      *string                `json:"keyUrl,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SourceVault *SubResource_STATUS    `json:"sourceVault,omitempty"`
}

// Storage version of v1api20220301.LinuxVMGuestPatchAutomaticByPlatformSettings
// Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Linux patch settings.
type LinuxVMGuestPatchAutomaticByPlatformSettings struct {
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	RebootSetting *string                `json:"rebootSetting,omitempty"`
}

// Storage version of v1api20220301.LinuxVMGuestPatchAutomaticByPlatformSettings_STATUS
// Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Linux patch settings.
type LinuxVMGuestPatchAutomaticByPlatformSettings_STATUS struct {
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	RebootSetting *string                `json:"rebootSetting,omitempty"`
}

// Storage version of v1api20220301.SshPublicKey_STATUS
// Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed.
type SshPublicKey_STATUS struct {
	KeyData     *string                `json:"keyData,omitempty"`
	Path        *string                `json:"path,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.SshPublicKeySpec
// Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed.
type SshPublicKeySpec struct {
	KeyData     *string                `json:"keyData,omitempty"`
	Path        *string                `json:"path,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.VirtualMachinePublicIPAddressConfiguration
// Describes a virtual machines IP Configuration's PublicIPAddress configuration
type VirtualMachinePublicIPAddressConfiguration struct {
	DeleteOption             *string                                                `json:"deleteOption,omitempty"`
	DnsSettings              *VirtualMachinePublicIPAddressDnsSettingsConfiguration `json:"dnsSettings,omitempty"`
	IdleTimeoutInMinutes     *int                                                   `json:"idleTimeoutInMinutes,omitempty"`
	IpTags                   []VirtualMachineIpTag                                  `json:"ipTags,omitempty"`
	Name                     *string                                                `json:"name,omitempty"`
	PropertyBag              genruntime.PropertyBag                                 `json:"$propertyBag,omitempty"`
	PublicIPAddressVersion   *string                                                `json:"publicIPAddressVersion,omitempty"`
	PublicIPAllocationMethod *string                                                `json:"publicIPAllocationMethod,omitempty"`
	PublicIPPrefix           *SubResource                                           `json:"publicIPPrefix,omitempty"`
	Sku                      *PublicIPAddressSku                                    `json:"sku,omitempty"`
}

// Storage version of v1api20220301.VirtualMachinePublicIPAddressConfiguration_STATUS
// Describes a virtual machines IP Configuration's PublicIPAddress configuration
type VirtualMachinePublicIPAddressConfiguration_STATUS struct {
	DeleteOption             *string                                                       `json:"deleteOption,omitempty"`
	DnsSettings              *VirtualMachinePublicIPAddressDnsSettingsConfiguration_STATUS `json:"dnsSettings,omitempty"`
	IdleTimeoutInMinutes     *int                                                          `json:"idleTimeoutInMinutes,omitempty"`
	IpTags                   []VirtualMachineIpTag_STATUS                                  `json:"ipTags,omitempty"`
	Name                     *string                                                       `json:"name,omitempty"`
	PropertyBag              genruntime.PropertyBag                                        `json:"$propertyBag,omitempty"`
	PublicIPAddressVersion   *string                                                       `json:"publicIPAddressVersion,omitempty"`
	PublicIPAllocationMethod *string                                                       `json:"publicIPAllocationMethod,omitempty"`
	PublicIPPrefix           *SubResource_STATUS                                           `json:"publicIPPrefix,omitempty"`
	Sku                      *PublicIPAddressSku_STATUS                                    `json:"sku,omitempty"`
}

// Storage version of v1api20220301.VMDiskSecurityProfile
// Specifies the security profile settings for the managed disk.
// NOTE: It can only be set for Confidential VMs
type VMDiskSecurityProfile struct {
	DiskEncryptionSet      *SubResource           `json:"diskEncryptionSet,omitempty"`
	PropertyBag            genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SecurityEncryptionType *string                `json:"securityEncryptionType,omitempty"`
}

// Storage version of v1api20220301.VMDiskSecurityProfile_STATUS
// Specifies the security profile settings for the managed disk.
// NOTE: It can only be set for Confidential VMs
type VMDiskSecurityProfile_STATUS struct {
	DiskEncryptionSet      *SubResource_STATUS    `json:"diskEncryptionSet,omitempty"`
	PropertyBag            genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SecurityEncryptionType *string                `json:"securityEncryptionType,omitempty"`
}

// Storage version of v1api20220301.WindowsVMGuestPatchAutomaticByPlatformSettings
// Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Windows patch settings.
type WindowsVMGuestPatchAutomaticByPlatformSettings struct {
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	RebootSetting *string                `json:"rebootSetting,omitempty"`
}

// Storage version of v1api20220301.WindowsVMGuestPatchAutomaticByPlatformSettings_STATUS
// Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Windows patch settings.
type WindowsVMGuestPatchAutomaticByPlatformSettings_STATUS struct {
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	RebootSetting *string                `json:"rebootSetting,omitempty"`
}

// Storage version of v1api20220301.WinRMListener
// Describes Protocol and thumbprint of Windows Remote Management listener
type WinRMListener struct {
	CertificateUrl *string                `json:"certificateUrl,omitempty"`
	PropertyBag    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Protocol       *string                `json:"protocol,omitempty"`
}

// Storage version of v1api20220301.WinRMListener_STATUS
// Describes Protocol and thumbprint of Windows Remote Management listener
type WinRMListener_STATUS struct {
	CertificateUrl *string                `json:"certificateUrl,omitempty"`
	PropertyBag    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Protocol       *string                `json:"protocol,omitempty"`
}

// Storage version of v1api20220301.ApiErrorBase_STATUS
// Api error base.
type ApiErrorBase_STATUS struct {
	Code        *string                `json:"code,omitempty"`
	Message     *string                `json:"message,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Target      *string                `json:"target,omitempty"`
}

// AssignProperties_From_ApiErrorBase_STATUS populates our ApiErrorBase_STATUS from the provided source ApiErrorBase_STATUS
func (base *ApiErrorBase_STATUS) AssignProperties_From_ApiErrorBase_STATUS(source *v20220702s.ApiErrorBase_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Code
	base.Code = genruntime.ClonePointerToString(source.Code)

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

	// Target
	base.Target = genruntime.ClonePointerToString(source.Target)

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

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

	// No error
	return nil
}

// AssignProperties_To_ApiErrorBase_STATUS populates the provided destination ApiErrorBase_STATUS from our ApiErrorBase_STATUS
func (base *ApiErrorBase_STATUS) AssignProperties_To_ApiErrorBase_STATUS(destination *v20220702s.ApiErrorBase_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(base.PropertyBag)

	// Code
	destination.Code = genruntime.ClonePointerToString(base.Code)

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

	// Target
	destination.Target = genruntime.ClonePointerToString(base.Target)

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

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

	// No error
	return nil
}

type augmentConversionForApiError_STATUS interface {
	AssignPropertiesFrom(src *v20220702s.ApiError_STATUS) error
	AssignPropertiesTo(dst *v20220702s.ApiError_STATUS) error
}

// Storage version of v1api20220301.InnerError_STATUS
// Inner error details.
type InnerError_STATUS struct {
	Errordetail   *string                `json:"errordetail,omitempty"`
	Exceptiontype *string                `json:"exceptiontype,omitempty"`
	PropertyBag   genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// AssignProperties_From_InnerError_STATUS populates our InnerError_STATUS from the provided source InnerError_STATUS
func (error *InnerError_STATUS) AssignProperties_From_InnerError_STATUS(source *v20220702s.InnerError_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Errordetail
	error.Errordetail = genruntime.ClonePointerToString(source.Errordetail)

	// Exceptiontype
	error.Exceptiontype = genruntime.ClonePointerToString(source.Exceptiontype)

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

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

	// No error
	return nil
}

// AssignProperties_To_InnerError_STATUS populates the provided destination InnerError_STATUS from our InnerError_STATUS
func (error *InnerError_STATUS) AssignProperties_To_InnerError_STATUS(destination *v20220702s.InnerError_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(error.PropertyBag)

	// Errordetail
	destination.Errordetail = genruntime.ClonePointerToString(error.Errordetail)

	// Exceptiontype
	destination.Exceptiontype = genruntime.ClonePointerToString(error.Exceptiontype)

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

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

	// No error
	return nil
}

// Storage version of v1api20220301.PublicIPAddressSku
// Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.
type PublicIPAddressSku struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tier        *string                `json:"tier,omitempty"`
}

// Storage version of v1api20220301.PublicIPAddressSku_STATUS
// Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.
type PublicIPAddressSku_STATUS struct {
	Name        *string                `json:"name,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tier        *string                `json:"tier,omitempty"`
}

// Storage version of v1api20220301.VirtualMachineIpTag
// Contains the IP tag associated with the public IP address.
type VirtualMachineIpTag struct {
	IpTagType   *string                `json:"ipTagType,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tag         *string                `json:"tag,omitempty"`
}

// Storage version of v1api20220301.VirtualMachineIpTag_STATUS
// Contains the IP tag associated with the public IP address.
type VirtualMachineIpTag_STATUS struct {
	IpTagType   *string                `json:"ipTagType,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tag         *string                `json:"tag,omitempty"`
}

// Storage version of v1api20220301.VirtualMachinePublicIPAddressDnsSettingsConfiguration
// Describes a virtual machines network configuration's DNS settings.
type VirtualMachinePublicIPAddressDnsSettingsConfiguration struct {
	DomainNameLabel *string                `json:"domainNameLabel,omitempty"`
	PropertyBag     genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20220301.VirtualMachinePublicIPAddressDnsSettingsConfiguration_STATUS
// Describes a virtual machines network configuration's DNS settings.
type VirtualMachinePublicIPAddressDnsSettingsConfiguration_STATUS struct {
	DomainNameLabel *string                `json:"domainNameLabel,omitempty"`
	PropertyBag     genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

type augmentConversionForApiErrorBase_STATUS interface {
	AssignPropertiesFrom(src *v20220702s.ApiErrorBase_STATUS) error
	AssignPropertiesTo(dst *v20220702s.ApiErrorBase_STATUS) error
}

type augmentConversionForInnerError_STATUS interface {
	AssignPropertiesFrom(src *v20220702s.InnerError_STATUS) error
	AssignPropertiesTo(dst *v20220702s.InnerError_STATUS) error
}

func init() {
	SchemeBuilder.Register(&VirtualMachine{}, &VirtualMachineList{})
}
