diff --git a/docs/hugo/content/reference/_index.md b/docs/hugo/content/reference/_index.md index 4dbf67941ee..efb912a3d83 100644 --- a/docs/hugo/content/reference/_index.md +++ b/docs/hugo/content/reference/_index.md @@ -143,6 +143,14 @@ These resource versions are deprecated and will be removed in an upcoming ASO re To install the CRDs for these resources, your ASO configuration must include `compute.azure.com/*` as a one of the configured CRD patterns. See [CRD Management in ASO](https://azure.github.io/azure-service-operator/guide/crd-management/) for details on doing this for both [Helm](https://azure.github.io/azure-service-operator/guide/crd-management/#helm) and [YAML](https://azure.github.io/azure-service-operator/guide/crd-management/#yaml) based installations. +### Next Release + +Development of these new resources is complete and they will be available in the next release of ASO. + +| Resource | ARM Version | CRD Version | Supported From | Sample | +|-------------------|-------------|---------------|----------------|---------------------------------------------------------------------------------------------------------------------------------| +| DiskEncryptionSet | 2022-07-02 | v1api20220702 | v2.3.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/compute/v1api/v1api20220702_diskencryptionset.yaml) | + ### Released These resource(s) are available for use in the current release of ASO. Different versions of a given resource reflect different versions of the Azure ARM API. diff --git a/docs/hugo/content/reference/compute/_index.md b/docs/hugo/content/reference/compute/_index.md index 026c53919b4..c2e46ff0773 100644 --- a/docs/hugo/content/reference/compute/_index.md +++ b/docs/hugo/content/reference/compute/_index.md @@ -5,6 +5,14 @@ no_list: true --- To install the CRDs for these resources, your ASO configuration must include `compute.azure.com/*` as a one of the configured CRD patterns. See [CRD Management in ASO](https://azure.github.io/azure-service-operator/guide/crd-management/) for details on doing this for both [Helm](https://azure.github.io/azure-service-operator/guide/crd-management/#helm) and [YAML](https://azure.github.io/azure-service-operator/guide/crd-management/#yaml) based installations. +### Next Release + +Development of these new resources is complete and they will be available in the next release of ASO. + +| Resource | ARM Version | CRD Version | Supported From | Sample | +|-------------------|-------------|---------------|----------------|---------------------------------------------------------------------------------------------------------------------------------| +| DiskEncryptionSet | 2022-07-02 | v1api20220702 | v2.3.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/compute/v1api/v1api20220702_diskencryptionset.yaml) | + ### Released These resource(s) are available for use in the current release of ASO. Different versions of a given resource reflect different versions of the Azure ARM API. diff --git a/v2/api/compute/customizations/disk_encryption_set_extension_types_gen.go b/v2/api/compute/customizations/disk_encryption_set_extension_types_gen.go new file mode 100644 index 00000000000..f3ce73aaefe --- /dev/null +++ b/v2/api/compute/customizations/disk_encryption_set_extension_types_gen.go @@ -0,0 +1,20 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package customizations + +import ( + v20220702 "github.com/Azure/azure-service-operator/v2/api/compute/v1api20220702" + v20220702s "github.com/Azure/azure-service-operator/v2/api/compute/v1api20220702storage" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) + +type DiskEncryptionSetExtension struct { +} + +// GetExtendedResources Returns the KubernetesResource slice for Resource versions +func (extension *DiskEncryptionSetExtension) GetExtendedResources() []genruntime.KubernetesResource { + return []genruntime.KubernetesResource{ + &v20220702.DiskEncryptionSet{}, + &v20220702s.DiskEncryptionSet{}} +} diff --git a/v2/api/compute/customizations/structure.txt b/v2/api/compute/customizations/structure.txt index 3428cb0ae69..aaf8d8c86f1 100644 --- a/v2/api/compute/customizations/structure.txt +++ b/v2/api/compute/customizations/structure.txt @@ -1,5 +1,6 @@ // Code generated by azure-service-operator-codegen. DO NOT EDIT. github.com/Azure/azure-service-operator/v2/api/compute/customizations +├── DiskEncryptionSetExtension: Object (0 properties) ├── DiskExtension: Object (0 properties) ├── ImageExtension: Object (0 properties) ├── SnapshotExtension: Object (0 properties) diff --git a/v2/api/compute/v1api20200930storage/disk_types_gen.go b/v2/api/compute/v1api20200930storage/disk_types_gen.go index 53c3a50340c..698cc86ed76 100644 --- a/v2/api/compute/v1api20200930storage/disk_types_gen.go +++ b/v2/api/compute/v1api20200930storage/disk_types_gen.go @@ -5,6 +5,7 @@ package v1api20200930storage import ( v20201201s "github.com/Azure/azure-service-operator/v2/api/compute/v1api20201201storage" + v20220702s "github.com/Azure/azure-service-operator/v2/api/compute/v1api20220702storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" "github.com/pkg/errors" @@ -591,6 +592,72 @@ type SourceVault struct { Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"` } +// AssignProperties_From_SourceVault populates our SourceVault from the provided source SourceVault +func (vault *SourceVault) AssignProperties_From_SourceVault(source *v20220702s.SourceVault) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Reference + if source.Reference != nil { + reference := source.Reference.Copy() + vault.Reference = &reference + } else { + vault.Reference = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + vault.PropertyBag = propertyBag + } else { + vault.PropertyBag = nil + } + + // Invoke the augmentConversionForSourceVault interface (if implemented) to customize the conversion + var vaultAsAny any = vault + if augmentedVault, ok := vaultAsAny.(augmentConversionForSourceVault); ok { + err := augmentedVault.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_SourceVault populates the provided destination SourceVault from our SourceVault +func (vault *SourceVault) AssignProperties_To_SourceVault(destination *v20220702s.SourceVault) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(vault.PropertyBag) + + // Reference + if vault.Reference != nil { + reference := vault.Reference.Copy() + destination.Reference = &reference + } else { + destination.Reference = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForSourceVault interface (if implemented) to customize the conversion + var vaultAsAny any = vault + if augmentedVault, ok := vaultAsAny.(augmentConversionForSourceVault); ok { + err := augmentedVault.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20200930.SourceVault_STATUS // The vault id is an Azure Resource Manager Resource id in the form // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} @@ -599,6 +666,72 @@ type SourceVault_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// AssignProperties_From_SourceVault_STATUS populates our SourceVault_STATUS from the provided source SourceVault_STATUS +func (vault *SourceVault_STATUS) AssignProperties_From_SourceVault_STATUS(source *v20220702s.SourceVault_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // Id + vault.Id = genruntime.ClonePointerToString(source.Id) + + // Update the property bag + if len(propertyBag) > 0 { + vault.PropertyBag = propertyBag + } else { + vault.PropertyBag = nil + } + + // Invoke the augmentConversionForSourceVault_STATUS interface (if implemented) to customize the conversion + var vaultAsAny any = vault + if augmentedVault, ok := vaultAsAny.(augmentConversionForSourceVault_STATUS); ok { + err := augmentedVault.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_SourceVault_STATUS populates the provided destination SourceVault_STATUS from our SourceVault_STATUS +func (vault *SourceVault_STATUS) AssignProperties_To_SourceVault_STATUS(destination *v20220702s.SourceVault_STATUS) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(vault.PropertyBag) + + // Id + destination.Id = genruntime.ClonePointerToString(vault.Id) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForSourceVault_STATUS interface (if implemented) to customize the conversion + var vaultAsAny any = vault + if augmentedVault, ok := vaultAsAny.(augmentConversionForSourceVault_STATUS); ok { + err := augmentedVault.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + +type augmentConversionForSourceVault interface { + AssignPropertiesFrom(src *v20220702s.SourceVault) error + AssignPropertiesTo(dst *v20220702s.SourceVault) error +} + +type augmentConversionForSourceVault_STATUS interface { + AssignPropertiesFrom(src *v20220702s.SourceVault_STATUS) error + AssignPropertiesTo(dst *v20220702s.SourceVault_STATUS) error +} + func init() { SchemeBuilder.Register(&Disk{}, &DiskList{}) } diff --git a/v2/api/compute/v1api20200930storage/disk_types_gen_test.go b/v2/api/compute/v1api20200930storage/disk_types_gen_test.go index 06619b3b3fe..21a75df574a 100644 --- a/v2/api/compute/v1api20200930storage/disk_types_gen_test.go +++ b/v2/api/compute/v1api20200930storage/disk_types_gen_test.go @@ -6,6 +6,7 @@ package v1api20200930storage import ( "encoding/json" v20201201s "github.com/Azure/azure-service-operator/v2/api/compute/v1api20201201storage" + v20220702s "github.com/Azure/azure-service-operator/v2/api/compute/v1api20220702storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -1773,6 +1774,48 @@ func AddRelatedPropertyGeneratorsForKeyVaultAndSecretReference_STATUS(gens map[s gens["SourceVault"] = gen.PtrOf(SourceVault_STATUSGenerator()) } +func Test_SourceVault_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SourceVault to SourceVault via AssignProperties_To_SourceVault & AssignProperties_From_SourceVault returns original", + prop.ForAll(RunPropertyAssignmentTestForSourceVault, SourceVaultGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSourceVault tests if a specific instance of SourceVault can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForSourceVault(subject SourceVault) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.SourceVault + err := copied.AssignProperties_To_SourceVault(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SourceVault + err = actual.AssignProperties_From_SourceVault(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_SourceVault_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1827,6 +1870,48 @@ func SourceVaultGenerator() gopter.Gen { return sourceVaultGenerator } +func Test_SourceVault_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SourceVault_STATUS to SourceVault_STATUS via AssignProperties_To_SourceVault_STATUS & AssignProperties_From_SourceVault_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForSourceVault_STATUS, SourceVault_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSourceVault_STATUS tests if a specific instance of SourceVault_STATUS can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForSourceVault_STATUS(subject SourceVault_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.SourceVault_STATUS + err := copied.AssignProperties_To_SourceVault_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SourceVault_STATUS + err = actual.AssignProperties_From_SourceVault_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_SourceVault_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/compute/v1api20200930storage/structure.txt b/v2/api/compute/v1api20200930storage/structure.txt index 777558e49ee..07c58318e51 100644 --- a/v2/api/compute/v1api20200930storage/structure.txt +++ b/v2/api/compute/v1api20200930storage/structure.txt @@ -300,4 +300,6 @@ github.com/Azure/azure-service-operator/v2/api/compute/v1api20200930storage │ ├── Type: *string │ └── UniqueId: *string ├── augmentConversionForExtendedLocation: Interface -└── augmentConversionForExtendedLocation_STATUS: Interface +├── augmentConversionForExtendedLocation_STATUS: Interface +├── augmentConversionForSourceVault: Interface +└── augmentConversionForSourceVault_STATUS: Interface diff --git a/v2/api/compute/v1api20220301storage/structure.txt b/v2/api/compute/v1api20220301storage/structure.txt index d604e3b40c6..d7f021f9dfc 100644 --- a/v2/api/compute/v1api20220301storage/structure.txt +++ b/v2/api/compute/v1api20220301storage/structure.txt @@ -938,673 +938,677 @@ github.com/Azure/azure-service-operator/v2/api/compute/v1api20220301storage │ │ └── PropertyBag: genruntime.PropertyBag │ ├── VmId: *string │ └── Zones: string[] -└── VirtualMachineScaleSet: Resource - ├── Owner: github.com/Azure/azure-service-operator/v2/api/resources/v1apiv20191001.ResourceGroup - ├── Spec: Object (25 properties) - │ ├── AdditionalCapabilities: *Object (3 properties) - │ │ ├── HibernationEnabled: *bool - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ └── UltraSSDEnabled: *bool - │ ├── AutomaticRepairsPolicy: *Object (4 properties) - │ │ ├── Enabled: *bool - │ │ ├── GracePeriod: *string - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ └── RepairAction: *string - │ ├── AzureName: string - │ ├── DoNotRunExtensionsOnOverprovisionedVMs: *bool - │ ├── ExtendedLocation: *Object (3 properties) - │ │ ├── Name: *string - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ └── Type: *string - │ ├── HostGroup: *Object (2 properties) - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ └── Reference: *genruntime.ResourceReference - │ ├── Identity: *Object (3 properties) - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ ├── Type: *string - │ │ └── UserAssignedIdentities: Object (2 properties)[] - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ └── Reference: genruntime.ResourceReference - │ ├── Location: *string - │ ├── OrchestrationMode: *string - │ ├── OriginalVersion: string - │ ├── Overprovision: *bool - │ ├── Owner: *genruntime.KnownResourceReference - │ ├── Plan: *Object (5 properties) - │ │ ├── Name: *string - │ │ ├── Product: *string - │ │ ├── PromotionCode: *string - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ └── Publisher: *string - │ ├── PlatformFaultDomainCount: *int - │ ├── PropertyBag: genruntime.PropertyBag - │ ├── ProximityPlacementGroup: *Object (2 properties) - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ └── Reference: *genruntime.ResourceReference - │ ├── ScaleInPolicy: *Object (3 properties) - │ │ ├── ForceDeletion: *bool - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ └── Rules: string[] - │ ├── SinglePlacementGroup: *bool - │ ├── Sku: *Object (4 properties) - │ │ ├── Capacity: *int - │ │ ├── Name: *string - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ └── Tier: *string - │ ├── SpotRestorePolicy: *Object (3 properties) - │ │ ├── Enabled: *bool - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ └── RestoreTimeout: *string - │ ├── Tags: map[string]string - │ ├── UpgradePolicy: *Object (4 properties) - │ │ ├── AutomaticOSUpgradePolicy: *Object (4 properties) - │ │ │ ├── DisableAutomaticRollback: *bool - │ │ │ ├── EnableAutomaticOSUpgrade: *bool - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ └── UseRollingUpgradePolicy: *bool - │ │ ├── Mode: *string - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ └── RollingUpgradePolicy: *Object (7 properties) - │ │ ├── EnableCrossZoneUpgrade: *bool - │ │ ├── MaxBatchInstancePercent: *int - │ │ ├── MaxUnhealthyInstancePercent: *int - │ │ ├── MaxUnhealthyUpgradedInstancePercent: *int - │ │ ├── PauseTimeBetweenBatches: *string - │ │ ├── PrioritizeUnhealthyInstances: *bool - │ │ └── PropertyBag: genruntime.PropertyBag - │ ├── VirtualMachineProfile: *Object (16 properties) - │ │ ├── ApplicationProfile: *Object (2 properties) - │ │ │ ├── GalleryApplications: Object (7 properties)[] - │ │ │ │ ├── ConfigurationReference: *string - │ │ │ │ ├── EnableAutomaticUpgrade: *bool - │ │ │ │ ├── Order: *int - │ │ │ │ ├── PackageReferenceReference: *genruntime.ResourceReference - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ ├── Tags: *string - │ │ │ │ └── TreatFailureAsDeploymentFailure: *bool - │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ ├── BillingProfile: *Object (2 properties) - │ │ │ ├── MaxPrice: *float64 - │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ ├── CapacityReservation: *Object (2 properties) - │ │ │ ├── CapacityReservationGroup: *Object (2 properties) - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ └── Reference: *genruntime.ResourceReference - │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ ├── DiagnosticsProfile: *Object (2 properties) - │ │ │ ├── BootDiagnostics: *Object (3 properties) - │ │ │ │ ├── Enabled: *bool - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ └── StorageUri: *string - │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ ├── EvictionPolicy: *string - │ │ ├── ExtensionProfile: *Object (3 properties) - │ │ │ ├── Extensions: Object (13 properties)[] - │ │ │ │ ├── AutoUpgradeMinorVersion: *bool - │ │ │ │ ├── EnableAutomaticUpgrade: *bool - │ │ │ │ ├── ForceUpdateTag: *string - │ │ │ │ ├── Name: *string - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ ├── ProtectedSettings: map[string]v1.JSON - │ │ │ │ ├── ProtectedSettingsFromKeyVault: *Object (3 properties) - │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ ├── SecretUrl: *string - │ │ │ │ │ └── SourceVault: *Object (2 properties) - │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ └── Reference: *genruntime.ResourceReference - │ │ │ │ ├── ProvisionAfterExtensions: string[] - │ │ │ │ ├── Publisher: *string - │ │ │ │ ├── Settings: map[string]v1.JSON - │ │ │ │ ├── SuppressFailures: *bool - │ │ │ │ ├── Type: *string - │ │ │ │ └── TypeHandlerVersion: *string - │ │ │ ├── ExtensionsTimeBudget: *string - │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ ├── HardwareProfile: *Object (2 properties) - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ └── VmSizeProperties: *Object (3 properties) - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ ├── VCPUsAvailable: *int - │ │ │ └── VCPUsPerCore: *int - │ │ ├── LicenseType: *string - │ │ ├── NetworkProfile: *Object (4 properties) - │ │ │ ├── HealthProbe: *Object (2 properties) - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ └── Reference: *genruntime.ResourceReference - │ │ │ ├── NetworkApiVersion: *string - │ │ │ ├── NetworkInterfaceConfigurations: Object (11 properties)[] - │ │ │ │ ├── DeleteOption: *string - │ │ │ │ ├── DnsSettings: *Object (2 properties) - │ │ │ │ │ ├── DnsServers: string[] - │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ │ ├── EnableAcceleratedNetworking: *bool - │ │ │ │ ├── EnableFpga: *bool - │ │ │ │ ├── EnableIPForwarding: *bool - │ │ │ │ ├── IpConfigurations: Object (11 properties)[] - │ │ │ │ │ ├── ApplicationGatewayBackendAddressPools: Object (2 properties)[] - │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ │ └── Reference: *genruntime.ResourceReference - │ │ │ │ │ ├── ApplicationSecurityGroups: Object (2 properties)[] - │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ │ └── Reference: *genruntime.ResourceReference - │ │ │ │ │ ├── LoadBalancerBackendAddressPools: Object (2 properties)[] - │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ │ └── Reference: *genruntime.ResourceReference - │ │ │ │ │ ├── LoadBalancerInboundNatPools: Object (2 properties)[] - │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ │ └── Reference: *genruntime.ResourceReference - │ │ │ │ │ ├── Name: *string - │ │ │ │ │ ├── Primary: *bool - │ │ │ │ │ ├── PrivateIPAddressVersion: *string - │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ ├── PublicIPAddressConfiguration: *Object (9 properties) - │ │ │ │ │ │ ├── DeleteOption: *string - │ │ │ │ │ │ ├── DnsSettings: *Object (2 properties) - │ │ │ │ │ │ │ ├── DomainNameLabel: *string - │ │ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ │ ├── IdleTimeoutInMinutes: *int - │ │ │ │ │ │ ├── IpTags: Object (3 properties)[] - │ │ │ │ │ │ │ ├── IpTagType: *string - │ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ │ │ └── Tag: *string - │ │ │ │ │ │ ├── Name: *string - │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ │ ├── PublicIPAddressVersion: *string - │ │ │ │ │ │ ├── PublicIPPrefix: *Object (2 properties) - │ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ │ │ └── Reference: *genruntime.ResourceReference - │ │ │ │ │ │ └── Sku: *Object (3 properties) - │ │ │ │ │ │ ├── Name: *string - │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ │ └── Tier: *string - │ │ │ │ │ ├── Reference: *genruntime.ResourceReference - │ │ │ │ │ └── Subnet: *Object (2 properties) - │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ └── Reference: *genruntime.ResourceReference - │ │ │ │ ├── Name: *string - │ │ │ │ ├── NetworkSecurityGroup: *Object (2 properties) - │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ └── Reference: *genruntime.ResourceReference - │ │ │ │ ├── Primary: *bool - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ └── Reference: *genruntime.ResourceReference - │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ ├── OsProfile: *Object (9 properties) - │ │ │ ├── AdminPassword: *genruntime.SecretReference - │ │ │ ├── AdminUsername: *string - │ │ │ ├── AllowExtensionOperations: *bool - │ │ │ ├── ComputerNamePrefix: *string - │ │ │ ├── CustomData: *string - │ │ │ ├── LinuxConfiguration: *Object (5 properties) - │ │ │ │ ├── DisablePasswordAuthentication: *bool - │ │ │ │ ├── PatchSettings: *Object (4 properties) - │ │ │ │ │ ├── AssessmentMode: *string - │ │ │ │ │ ├── AutomaticByPlatformSettings: *Object (2 properties) - │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ │ └── RebootSetting: *string - │ │ │ │ │ ├── PatchMode: *string - │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ ├── ProvisionVMAgent: *bool - │ │ │ │ └── Ssh: *Object (2 properties) - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ └── PublicKeys: Object (3 properties)[] - │ │ │ │ ├── KeyData: *string - │ │ │ │ ├── Path: *string - │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ ├── Secrets: Object (3 properties)[] - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ ├── SourceVault: *Object (2 properties) - │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ └── Reference: *genruntime.ResourceReference - │ │ │ │ └── VaultCertificates: Object (3 properties)[] - │ │ │ │ ├── CertificateStore: *string - │ │ │ │ ├── CertificateUrl: *string - │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ └── WindowsConfiguration: *Object (7 properties) - │ │ │ ├── AdditionalUnattendContent: Object (5 properties)[] - │ │ │ │ ├── ComponentName: *string - │ │ │ │ ├── Content: *string - │ │ │ │ ├── PassName: *string - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ └── SettingName: *string - │ │ │ ├── EnableAutomaticUpdates: *bool - │ │ │ ├── PatchSettings: *Object (5 properties) - │ │ │ │ ├── AssessmentMode: *string - │ │ │ │ ├── AutomaticByPlatformSettings: *Object (2 properties) - │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ └── RebootSetting: *string - │ │ │ │ ├── EnableHotpatching: *bool - │ │ │ │ ├── PatchMode: *string - │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ ├── ProvisionVMAgent: *bool - │ │ │ ├── TimeZone: *string - │ │ │ └── WinRM: *Object (2 properties) - │ │ │ ├── Listeners: Object (3 properties)[] - │ │ │ │ ├── CertificateUrl: *string - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ └── Protocol: *string - │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ ├── Priority: *string - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ ├── ScheduledEventsProfile: *Object (2 properties) - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ └── TerminateNotificationProfile: *Object (3 properties) - │ │ │ ├── Enable: *bool - │ │ │ ├── NotBeforeTimeout: *string - │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ ├── SecurityProfile: *Object (4 properties) - │ │ │ ├── EncryptionAtHost: *bool - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ ├── SecurityType: *string - │ │ │ └── UefiSettings: *Object (3 properties) - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ ├── SecureBootEnabled: *bool - │ │ │ └── VTpmEnabled: *bool - │ │ ├── StorageProfile: *Object (4 properties) - │ │ │ ├── DataDisks: Object (11 properties)[] - │ │ │ │ ├── Caching: *string - │ │ │ │ ├── CreateOption: *string - │ │ │ │ ├── DeleteOption: *string - │ │ │ │ ├── DiskIOPSReadWrite: *int - │ │ │ │ ├── DiskMBpsReadWrite: *int - │ │ │ │ ├── DiskSizeGB: *int - │ │ │ │ ├── Lun: *int - │ │ │ │ ├── ManagedDisk: *Object (4 properties) - │ │ │ │ │ ├── DiskEncryptionSet: *Object (2 properties) - │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ │ └── Reference: *genruntime.ResourceReference - │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ ├── SecurityProfile: *Object (3 properties) - │ │ │ │ │ │ ├── DiskEncryptionSet: *Object (2 properties) - │ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ │ │ └── Reference: *genruntime.ResourceReference - │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ │ └── SecurityEncryptionType: *string - │ │ │ │ │ └── StorageAccountType: *string - │ │ │ │ ├── Name: *string - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ └── WriteAcceleratorEnabled: *bool - │ │ │ ├── ImageReference: *Object (8 properties) - │ │ │ │ ├── CommunityGalleryImageId: *string - │ │ │ │ ├── Offer: *string - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ ├── Publisher: *string - │ │ │ │ ├── Reference: *genruntime.ResourceReference - │ │ │ │ ├── SharedGalleryImageId: *string - │ │ │ │ ├── Sku: *string - │ │ │ │ └── Version: *string - │ │ │ ├── OsDisk: *Object (12 properties) - │ │ │ │ ├── Caching: *string - │ │ │ │ ├── CreateOption: *string - │ │ │ │ ├── DeleteOption: *string - │ │ │ │ ├── DiffDiskSettings: *Object (3 properties) - │ │ │ │ │ ├── Option: *string - │ │ │ │ │ ├── Placement: *string - │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ │ ├── DiskSizeGB: *int - │ │ │ │ ├── Image: *Object (2 properties) - │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ └── Uri: *string - │ │ │ │ ├── ManagedDisk: *Object (4 properties) - │ │ │ │ │ ├── DiskEncryptionSet: *Object (2 properties) - │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ │ └── Reference: *genruntime.ResourceReference - │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ ├── SecurityProfile: *Object (3 properties) - │ │ │ │ │ │ ├── DiskEncryptionSet: *Object (2 properties) - │ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ │ │ └── Reference: *genruntime.ResourceReference - │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ │ └── SecurityEncryptionType: *string - │ │ │ │ │ └── StorageAccountType: *string - │ │ │ │ ├── Name: *string - │ │ │ │ ├── OsType: *string - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ ├── VhdContainers: string[] - │ │ │ │ └── WriteAcceleratorEnabled: *bool - │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ └── UserData: *string - │ ├── ZoneBalance: *bool - │ └── Zones: string[] - └── Status: Object (29 properties) - ├── AdditionalCapabilities: *Object (3 properties) - │ ├── HibernationEnabled: *bool - │ ├── PropertyBag: genruntime.PropertyBag - │ └── UltraSSDEnabled: *bool - ├── AutomaticRepairsPolicy: *Object (4 properties) - │ ├── Enabled: *bool - │ ├── GracePeriod: *string - │ ├── PropertyBag: genruntime.PropertyBag - │ └── RepairAction: *string - ├── Conditions: conditions.Condition[] - ├── DoNotRunExtensionsOnOverprovisionedVMs: *bool - ├── ExtendedLocation: *Object (3 properties) - │ ├── Name: *string - │ ├── PropertyBag: genruntime.PropertyBag - │ └── Type: *string - ├── HostGroup: *Object (2 properties) - │ ├── Id: *string - │ └── PropertyBag: genruntime.PropertyBag - ├── Id: *string - ├── Identity: *Object (5 properties) - │ ├── PrincipalId: *string - │ ├── PropertyBag: genruntime.PropertyBag - │ ├── TenantId: *string - │ ├── Type: *string - │ └── UserAssignedIdentities: map[string]Object (3 properties) - │ ├── ClientId: *string - │ ├── PrincipalId: *string - │ └── PropertyBag: genruntime.PropertyBag - ├── Location: *string - ├── Name: *string - ├── OrchestrationMode: *string - ├── Overprovision: *bool - ├── Plan: *Object (5 properties) - │ ├── Name: *string - │ ├── Product: *string - │ ├── PromotionCode: *string - │ ├── PropertyBag: genruntime.PropertyBag - │ └── Publisher: *string - ├── PlatformFaultDomainCount: *int - ├── PropertyBag: genruntime.PropertyBag - ├── ProvisioningState: *string - ├── ProximityPlacementGroup: *Object (2 properties) - │ ├── Id: *string - │ └── PropertyBag: genruntime.PropertyBag - ├── ScaleInPolicy: *Object (3 properties) - │ ├── ForceDeletion: *bool - │ ├── PropertyBag: genruntime.PropertyBag - │ └── Rules: string[] - ├── SinglePlacementGroup: *bool - ├── Sku: *Object (4 properties) - │ ├── Capacity: *int - │ ├── Name: *string - │ ├── PropertyBag: genruntime.PropertyBag - │ └── Tier: *string - ├── SpotRestorePolicy: *Object (3 properties) - │ ├── Enabled: *bool - │ ├── PropertyBag: genruntime.PropertyBag - │ └── RestoreTimeout: *string - ├── Tags: map[string]string - ├── TimeCreated: *string - ├── Type: *string - ├── UniqueId: *string - ├── UpgradePolicy: *Object (4 properties) - │ ├── AutomaticOSUpgradePolicy: *Object (4 properties) - │ │ ├── DisableAutomaticRollback: *bool - │ │ ├── EnableAutomaticOSUpgrade: *bool - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ └── UseRollingUpgradePolicy: *bool - │ ├── Mode: *string - │ ├── PropertyBag: genruntime.PropertyBag - │ └── RollingUpgradePolicy: *Object (7 properties) - │ ├── EnableCrossZoneUpgrade: *bool - │ ├── MaxBatchInstancePercent: *int - │ ├── MaxUnhealthyInstancePercent: *int - │ ├── MaxUnhealthyUpgradedInstancePercent: *int - │ ├── PauseTimeBetweenBatches: *string - │ ├── PrioritizeUnhealthyInstances: *bool - │ └── PropertyBag: genruntime.PropertyBag - ├── VirtualMachineProfile: *Object (16 properties) - │ ├── ApplicationProfile: *Object (2 properties) - │ │ ├── GalleryApplications: Object (7 properties)[] - │ │ │ ├── ConfigurationReference: *string - │ │ │ ├── EnableAutomaticUpgrade: *bool - │ │ │ ├── Order: *int - │ │ │ ├── PackageReferenceId: *string - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ ├── Tags: *string - │ │ │ └── TreatFailureAsDeploymentFailure: *bool - │ │ └── PropertyBag: genruntime.PropertyBag - │ ├── BillingProfile: *Object (2 properties) - │ │ ├── MaxPrice: *float64 - │ │ └── PropertyBag: genruntime.PropertyBag - │ ├── CapacityReservation: *Object (2 properties) - │ │ ├── CapacityReservationGroup: *Object (2 properties) - │ │ │ ├── Id: *string - │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ └── PropertyBag: genruntime.PropertyBag - │ ├── DiagnosticsProfile: *Object (2 properties) - │ │ ├── BootDiagnostics: *Object (3 properties) - │ │ │ ├── Enabled: *bool - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ └── StorageUri: *string - │ │ └── PropertyBag: genruntime.PropertyBag - │ ├── EvictionPolicy: *string - │ ├── ExtensionProfile: *Object (3 properties) - │ │ ├── Extensions: Object (16 properties)[] - │ │ │ ├── AutoUpgradeMinorVersion: *bool - │ │ │ ├── EnableAutomaticUpgrade: *bool - │ │ │ ├── ForceUpdateTag: *string - │ │ │ ├── Id: *string - │ │ │ ├── Name: *string - │ │ │ ├── PropertiesType: *string - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ ├── ProtectedSettings: map[string]v1.JSON - │ │ │ ├── ProtectedSettingsFromKeyVault: *Object (3 properties) - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ ├── SecretUrl: *string - │ │ │ │ └── SourceVault: *Object (2 properties) - │ │ │ │ ├── Id: *string - │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ ├── ProvisionAfterExtensions: string[] - │ │ │ ├── ProvisioningState: *string - │ │ │ ├── Publisher: *string - │ │ │ ├── Settings: map[string]v1.JSON - │ │ │ ├── SuppressFailures: *bool - │ │ │ ├── Type: *string - │ │ │ └── TypeHandlerVersion: *string - │ │ ├── ExtensionsTimeBudget: *string - │ │ └── PropertyBag: genruntime.PropertyBag - │ ├── HardwareProfile: *Object (2 properties) - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ └── VmSizeProperties: *Object (3 properties) - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ ├── VCPUsAvailable: *int - │ │ └── VCPUsPerCore: *int - │ ├── LicenseType: *string - │ ├── NetworkProfile: *Object (4 properties) - │ │ ├── HealthProbe: *Object (2 properties) - │ │ │ ├── Id: *string - │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ ├── NetworkApiVersion: *string - │ │ ├── NetworkInterfaceConfigurations: Object (11 properties)[] - │ │ │ ├── DeleteOption: *string - │ │ │ ├── DnsSettings: *Object (2 properties) - │ │ │ │ ├── DnsServers: string[] - │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ ├── EnableAcceleratedNetworking: *bool - │ │ │ ├── EnableFpga: *bool - │ │ │ ├── EnableIPForwarding: *bool - │ │ │ ├── Id: *string - │ │ │ ├── IpConfigurations: Object (11 properties)[] - │ │ │ │ ├── ApplicationGatewayBackendAddressPools: Object (2 properties)[] - │ │ │ │ │ ├── Id: *string - │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ │ ├── ApplicationSecurityGroups: Object (2 properties)[] - │ │ │ │ │ ├── Id: *string - │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ │ ├── Id: *string - │ │ │ │ ├── LoadBalancerBackendAddressPools: Object (2 properties)[] - │ │ │ │ │ ├── Id: *string - │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ │ ├── LoadBalancerInboundNatPools: Object (2 properties)[] - │ │ │ │ │ ├── Id: *string - │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ │ ├── Name: *string - │ │ │ │ ├── Primary: *bool - │ │ │ │ ├── PrivateIPAddressVersion: *string - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ ├── PublicIPAddressConfiguration: *Object (9 properties) - │ │ │ │ │ ├── DeleteOption: *string - │ │ │ │ │ ├── DnsSettings: *Object (2 properties) - │ │ │ │ │ │ ├── DomainNameLabel: *string - │ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ ├── IdleTimeoutInMinutes: *int - │ │ │ │ │ ├── IpTags: Object (3 properties)[] - │ │ │ │ │ │ ├── IpTagType: *string - │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ │ └── Tag: *string - │ │ │ │ │ ├── Name: *string - │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ ├── PublicIPAddressVersion: *string - │ │ │ │ │ ├── PublicIPPrefix: *Object (2 properties) - │ │ │ │ │ │ ├── Id: *string - │ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ └── Sku: *Object (3 properties) - │ │ │ │ │ ├── Name: *string - │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ └── Tier: *string - │ │ │ │ └── Subnet: *Object (2 properties) - │ │ │ │ ├── Id: *string - │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ ├── Name: *string - │ │ │ ├── NetworkSecurityGroup: *Object (2 properties) - │ │ │ │ ├── Id: *string - │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ ├── Primary: *bool - │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ └── PropertyBag: genruntime.PropertyBag - │ ├── OsProfile: *Object (8 properties) - │ │ ├── AdminUsername: *string - │ │ ├── AllowExtensionOperations: *bool - │ │ ├── ComputerNamePrefix: *string - │ │ ├── CustomData: *string - │ │ ├── LinuxConfiguration: *Object (5 properties) - │ │ │ ├── DisablePasswordAuthentication: *bool - │ │ │ ├── PatchSettings: *Object (4 properties) - │ │ │ │ ├── AssessmentMode: *string - │ │ │ │ ├── AutomaticByPlatformSettings: *Object (2 properties) - │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ └── RebootSetting: *string - │ │ │ │ ├── PatchMode: *string - │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ ├── ProvisionVMAgent: *bool - │ │ │ └── Ssh: *Object (2 properties) - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ └── PublicKeys: Object (3 properties)[] - │ │ │ ├── KeyData: *string - │ │ │ ├── Path: *string - │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ ├── Secrets: Object (3 properties)[] - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ ├── SourceVault: *Object (2 properties) - │ │ │ │ ├── Id: *string - │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ └── VaultCertificates: Object (3 properties)[] - │ │ │ ├── CertificateStore: *string - │ │ │ ├── CertificateUrl: *string - │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ └── WindowsConfiguration: *Object (7 properties) - │ │ ├── AdditionalUnattendContent: Object (5 properties)[] - │ │ │ ├── ComponentName: *string - │ │ │ ├── Content: *string - │ │ │ ├── PassName: *string - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ └── SettingName: *string - │ │ ├── EnableAutomaticUpdates: *bool - │ │ ├── PatchSettings: *Object (5 properties) - │ │ │ ├── AssessmentMode: *string - │ │ │ ├── AutomaticByPlatformSettings: *Object (2 properties) - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ └── RebootSetting: *string - │ │ │ ├── EnableHotpatching: *bool - │ │ │ ├── PatchMode: *string - │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ ├── ProvisionVMAgent: *bool - │ │ ├── TimeZone: *string - │ │ └── WinRM: *Object (2 properties) - │ │ ├── Listeners: Object (3 properties)[] - │ │ │ ├── CertificateUrl: *string - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ └── Protocol: *string - │ │ └── PropertyBag: genruntime.PropertyBag - │ ├── Priority: *string - │ ├── PropertyBag: genruntime.PropertyBag - │ ├── ScheduledEventsProfile: *Object (2 properties) - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ └── TerminateNotificationProfile: *Object (3 properties) - │ │ ├── Enable: *bool - │ │ ├── NotBeforeTimeout: *string - │ │ └── PropertyBag: genruntime.PropertyBag - │ ├── SecurityProfile: *Object (4 properties) - │ │ ├── EncryptionAtHost: *bool - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ ├── SecurityType: *string - │ │ └── UefiSettings: *Object (3 properties) - │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ ├── SecureBootEnabled: *bool - │ │ └── VTpmEnabled: *bool - │ ├── StorageProfile: *Object (4 properties) - │ │ ├── DataDisks: Object (11 properties)[] - │ │ │ ├── Caching: *string - │ │ │ ├── CreateOption: *string - │ │ │ ├── DeleteOption: *string - │ │ │ ├── DiskIOPSReadWrite: *int - │ │ │ ├── DiskMBpsReadWrite: *int - │ │ │ ├── DiskSizeGB: *int - │ │ │ ├── Lun: *int - │ │ │ ├── ManagedDisk: *Object (4 properties) - │ │ │ │ ├── DiskEncryptionSet: *Object (2 properties) - │ │ │ │ │ ├── Id: *string - │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ ├── SecurityProfile: *Object (3 properties) - │ │ │ │ │ ├── DiskEncryptionSet: *Object (2 properties) - │ │ │ │ │ │ ├── Id: *string - │ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ └── SecurityEncryptionType: *string - │ │ │ │ └── StorageAccountType: *string - │ │ │ ├── Name: *string - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ └── WriteAcceleratorEnabled: *bool - │ │ ├── ImageReference: *Object (9 properties) - │ │ │ ├── CommunityGalleryImageId: *string - │ │ │ ├── ExactVersion: *string - │ │ │ ├── Id: *string - │ │ │ ├── Offer: *string - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ ├── Publisher: *string - │ │ │ ├── SharedGalleryImageId: *string - │ │ │ ├── Sku: *string - │ │ │ └── Version: *string - │ │ ├── OsDisk: *Object (12 properties) - │ │ │ ├── Caching: *string - │ │ │ ├── CreateOption: *string - │ │ │ ├── DeleteOption: *string - │ │ │ ├── DiffDiskSettings: *Object (3 properties) - │ │ │ │ ├── Option: *string - │ │ │ │ ├── Placement: *string - │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ ├── DiskSizeGB: *int - │ │ │ ├── Image: *Object (2 properties) - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ └── Uri: *string - │ │ │ ├── ManagedDisk: *Object (4 properties) - │ │ │ │ ├── DiskEncryptionSet: *Object (2 properties) - │ │ │ │ │ ├── Id: *string - │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ ├── SecurityProfile: *Object (3 properties) - │ │ │ │ │ ├── DiskEncryptionSet: *Object (2 properties) - │ │ │ │ │ │ ├── Id: *string - │ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ │ │ └── SecurityEncryptionType: *string - │ │ │ │ └── StorageAccountType: *string - │ │ │ ├── Name: *string - │ │ │ ├── OsType: *string - │ │ │ ├── PropertyBag: genruntime.PropertyBag - │ │ │ ├── VhdContainers: string[] - │ │ │ └── WriteAcceleratorEnabled: *bool - │ │ └── PropertyBag: genruntime.PropertyBag - │ └── UserData: *string - ├── ZoneBalance: *bool - └── Zones: string[] +├── VirtualMachineScaleSet: Resource +│ ├── Owner: github.com/Azure/azure-service-operator/v2/api/resources/v1apiv20191001.ResourceGroup +│ ├── Spec: Object (25 properties) +│ │ ├── AdditionalCapabilities: *Object (3 properties) +│ │ │ ├── HibernationEnabled: *bool +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── UltraSSDEnabled: *bool +│ │ ├── AutomaticRepairsPolicy: *Object (4 properties) +│ │ │ ├── Enabled: *bool +│ │ │ ├── GracePeriod: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── RepairAction: *string +│ │ ├── AzureName: string +│ │ ├── DoNotRunExtensionsOnOverprovisionedVMs: *bool +│ │ ├── ExtendedLocation: *Object (3 properties) +│ │ │ ├── Name: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Type: *string +│ │ ├── HostGroup: *Object (2 properties) +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Reference: *genruntime.ResourceReference +│ │ ├── Identity: *Object (3 properties) +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── Type: *string +│ │ │ └── UserAssignedIdentities: Object (2 properties)[] +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Reference: genruntime.ResourceReference +│ │ ├── Location: *string +│ │ ├── OrchestrationMode: *string +│ │ ├── OriginalVersion: string +│ │ ├── Overprovision: *bool +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ ├── Plan: *Object (5 properties) +│ │ │ ├── Name: *string +│ │ │ ├── Product: *string +│ │ │ ├── PromotionCode: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Publisher: *string +│ │ ├── PlatformFaultDomainCount: *int +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── ProximityPlacementGroup: *Object (2 properties) +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Reference: *genruntime.ResourceReference +│ │ ├── ScaleInPolicy: *Object (3 properties) +│ │ │ ├── ForceDeletion: *bool +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Rules: string[] +│ │ ├── SinglePlacementGroup: *bool +│ │ ├── Sku: *Object (4 properties) +│ │ │ ├── Capacity: *int +│ │ │ ├── Name: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── Tier: *string +│ │ ├── SpotRestorePolicy: *Object (3 properties) +│ │ │ ├── Enabled: *bool +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── RestoreTimeout: *string +│ │ ├── Tags: map[string]string +│ │ ├── UpgradePolicy: *Object (4 properties) +│ │ │ ├── AutomaticOSUpgradePolicy: *Object (4 properties) +│ │ │ │ ├── DisableAutomaticRollback: *bool +│ │ │ │ ├── EnableAutomaticOSUpgrade: *bool +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── UseRollingUpgradePolicy: *bool +│ │ │ ├── Mode: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── RollingUpgradePolicy: *Object (7 properties) +│ │ │ ├── EnableCrossZoneUpgrade: *bool +│ │ │ ├── MaxBatchInstancePercent: *int +│ │ │ ├── MaxUnhealthyInstancePercent: *int +│ │ │ ├── MaxUnhealthyUpgradedInstancePercent: *int +│ │ │ ├── PauseTimeBetweenBatches: *string +│ │ │ ├── PrioritizeUnhealthyInstances: *bool +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── VirtualMachineProfile: *Object (16 properties) +│ │ │ ├── ApplicationProfile: *Object (2 properties) +│ │ │ │ ├── GalleryApplications: Object (7 properties)[] +│ │ │ │ │ ├── ConfigurationReference: *string +│ │ │ │ │ ├── EnableAutomaticUpgrade: *bool +│ │ │ │ │ ├── Order: *int +│ │ │ │ │ ├── PackageReferenceReference: *genruntime.ResourceReference +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── Tags: *string +│ │ │ │ │ └── TreatFailureAsDeploymentFailure: *bool +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ ├── BillingProfile: *Object (2 properties) +│ │ │ │ ├── MaxPrice: *float64 +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ ├── CapacityReservation: *Object (2 properties) +│ │ │ │ ├── CapacityReservationGroup: *Object (2 properties) +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ └── Reference: *genruntime.ResourceReference +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ ├── DiagnosticsProfile: *Object (2 properties) +│ │ │ │ ├── BootDiagnostics: *Object (3 properties) +│ │ │ │ │ ├── Enabled: *bool +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ └── StorageUri: *string +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ ├── EvictionPolicy: *string +│ │ │ ├── ExtensionProfile: *Object (3 properties) +│ │ │ │ ├── Extensions: Object (13 properties)[] +│ │ │ │ │ ├── AutoUpgradeMinorVersion: *bool +│ │ │ │ │ ├── EnableAutomaticUpgrade: *bool +│ │ │ │ │ ├── ForceUpdateTag: *string +│ │ │ │ │ ├── Name: *string +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── ProtectedSettings: map[string]v1.JSON +│ │ │ │ │ ├── ProtectedSettingsFromKeyVault: *Object (3 properties) +│ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ ├── SecretUrl: *string +│ │ │ │ │ │ └── SourceVault: *Object (2 properties) +│ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ └── Reference: *genruntime.ResourceReference +│ │ │ │ │ ├── ProvisionAfterExtensions: string[] +│ │ │ │ │ ├── Publisher: *string +│ │ │ │ │ ├── Settings: map[string]v1.JSON +│ │ │ │ │ ├── SuppressFailures: *bool +│ │ │ │ │ ├── Type: *string +│ │ │ │ │ └── TypeHandlerVersion: *string +│ │ │ │ ├── ExtensionsTimeBudget: *string +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ ├── HardwareProfile: *Object (2 properties) +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── VmSizeProperties: *Object (3 properties) +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── VCPUsAvailable: *int +│ │ │ │ └── VCPUsPerCore: *int +│ │ │ ├── LicenseType: *string +│ │ │ ├── NetworkProfile: *Object (4 properties) +│ │ │ │ ├── HealthProbe: *Object (2 properties) +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ └── Reference: *genruntime.ResourceReference +│ │ │ │ ├── NetworkApiVersion: *string +│ │ │ │ ├── NetworkInterfaceConfigurations: Object (11 properties)[] +│ │ │ │ │ ├── DeleteOption: *string +│ │ │ │ │ ├── DnsSettings: *Object (2 properties) +│ │ │ │ │ │ ├── DnsServers: string[] +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── EnableAcceleratedNetworking: *bool +│ │ │ │ │ ├── EnableFpga: *bool +│ │ │ │ │ ├── EnableIPForwarding: *bool +│ │ │ │ │ ├── IpConfigurations: Object (11 properties)[] +│ │ │ │ │ │ ├── ApplicationGatewayBackendAddressPools: Object (2 properties)[] +│ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ │ └── Reference: *genruntime.ResourceReference +│ │ │ │ │ │ ├── ApplicationSecurityGroups: Object (2 properties)[] +│ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ │ └── Reference: *genruntime.ResourceReference +│ │ │ │ │ │ ├── LoadBalancerBackendAddressPools: Object (2 properties)[] +│ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ │ └── Reference: *genruntime.ResourceReference +│ │ │ │ │ │ ├── LoadBalancerInboundNatPools: Object (2 properties)[] +│ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ │ └── Reference: *genruntime.ResourceReference +│ │ │ │ │ │ ├── Name: *string +│ │ │ │ │ │ ├── Primary: *bool +│ │ │ │ │ │ ├── PrivateIPAddressVersion: *string +│ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ ├── PublicIPAddressConfiguration: *Object (9 properties) +│ │ │ │ │ │ │ ├── DeleteOption: *string +│ │ │ │ │ │ │ ├── DnsSettings: *Object (2 properties) +│ │ │ │ │ │ │ │ ├── DomainNameLabel: *string +│ │ │ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ │ ├── IdleTimeoutInMinutes: *int +│ │ │ │ │ │ │ ├── IpTags: Object (3 properties)[] +│ │ │ │ │ │ │ │ ├── IpTagType: *string +│ │ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ │ │ └── Tag: *string +│ │ │ │ │ │ │ ├── Name: *string +│ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ │ ├── PublicIPAddressVersion: *string +│ │ │ │ │ │ │ ├── PublicIPPrefix: *Object (2 properties) +│ │ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ │ │ └── Reference: *genruntime.ResourceReference +│ │ │ │ │ │ │ └── Sku: *Object (3 properties) +│ │ │ │ │ │ │ ├── Name: *string +│ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ │ └── Tier: *string +│ │ │ │ │ │ ├── Reference: *genruntime.ResourceReference +│ │ │ │ │ │ └── Subnet: *Object (2 properties) +│ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ └── Reference: *genruntime.ResourceReference +│ │ │ │ │ ├── Name: *string +│ │ │ │ │ ├── NetworkSecurityGroup: *Object (2 properties) +│ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ └── Reference: *genruntime.ResourceReference +│ │ │ │ │ ├── Primary: *bool +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ └── Reference: *genruntime.ResourceReference +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ ├── OsProfile: *Object (9 properties) +│ │ │ │ ├── AdminPassword: *genruntime.SecretReference +│ │ │ │ ├── AdminUsername: *string +│ │ │ │ ├── AllowExtensionOperations: *bool +│ │ │ │ ├── ComputerNamePrefix: *string +│ │ │ │ ├── CustomData: *string +│ │ │ │ ├── LinuxConfiguration: *Object (5 properties) +│ │ │ │ │ ├── DisablePasswordAuthentication: *bool +│ │ │ │ │ ├── PatchSettings: *Object (4 properties) +│ │ │ │ │ │ ├── AssessmentMode: *string +│ │ │ │ │ │ ├── AutomaticByPlatformSettings: *Object (2 properties) +│ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ │ └── RebootSetting: *string +│ │ │ │ │ │ ├── PatchMode: *string +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── ProvisionVMAgent: *bool +│ │ │ │ │ └── Ssh: *Object (2 properties) +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ └── PublicKeys: Object (3 properties)[] +│ │ │ │ │ ├── KeyData: *string +│ │ │ │ │ ├── Path: *string +│ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── Secrets: Object (3 properties)[] +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── SourceVault: *Object (2 properties) +│ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ └── Reference: *genruntime.ResourceReference +│ │ │ │ │ └── VaultCertificates: Object (3 properties)[] +│ │ │ │ │ ├── CertificateStore: *string +│ │ │ │ │ ├── CertificateUrl: *string +│ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── WindowsConfiguration: *Object (7 properties) +│ │ │ │ ├── AdditionalUnattendContent: Object (5 properties)[] +│ │ │ │ │ ├── ComponentName: *string +│ │ │ │ │ ├── Content: *string +│ │ │ │ │ ├── PassName: *string +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ └── SettingName: *string +│ │ │ │ ├── EnableAutomaticUpdates: *bool +│ │ │ │ ├── PatchSettings: *Object (5 properties) +│ │ │ │ │ ├── AssessmentMode: *string +│ │ │ │ │ ├── AutomaticByPlatformSettings: *Object (2 properties) +│ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ └── RebootSetting: *string +│ │ │ │ │ ├── EnableHotpatching: *bool +│ │ │ │ │ ├── PatchMode: *string +│ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── ProvisionVMAgent: *bool +│ │ │ │ ├── TimeZone: *string +│ │ │ │ └── WinRM: *Object (2 properties) +│ │ │ │ ├── Listeners: Object (3 properties)[] +│ │ │ │ │ ├── CertificateUrl: *string +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ └── Protocol: *string +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ ├── Priority: *string +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── ScheduledEventsProfile: *Object (2 properties) +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── TerminateNotificationProfile: *Object (3 properties) +│ │ │ │ ├── Enable: *bool +│ │ │ │ ├── NotBeforeTimeout: *string +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ ├── SecurityProfile: *Object (4 properties) +│ │ │ │ ├── EncryptionAtHost: *bool +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── SecurityType: *string +│ │ │ │ └── UefiSettings: *Object (3 properties) +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── SecureBootEnabled: *bool +│ │ │ │ └── VTpmEnabled: *bool +│ │ │ ├── StorageProfile: *Object (4 properties) +│ │ │ │ ├── DataDisks: Object (11 properties)[] +│ │ │ │ │ ├── Caching: *string +│ │ │ │ │ ├── CreateOption: *string +│ │ │ │ │ ├── DeleteOption: *string +│ │ │ │ │ ├── DiskIOPSReadWrite: *int +│ │ │ │ │ ├── DiskMBpsReadWrite: *int +│ │ │ │ │ ├── DiskSizeGB: *int +│ │ │ │ │ ├── Lun: *int +│ │ │ │ │ ├── ManagedDisk: *Object (4 properties) +│ │ │ │ │ │ ├── DiskEncryptionSet: *Object (2 properties) +│ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ │ └── Reference: *genruntime.ResourceReference +│ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ ├── SecurityProfile: *Object (3 properties) +│ │ │ │ │ │ │ ├── DiskEncryptionSet: *Object (2 properties) +│ │ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ │ │ └── Reference: *genruntime.ResourceReference +│ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ │ └── SecurityEncryptionType: *string +│ │ │ │ │ │ └── StorageAccountType: *string +│ │ │ │ │ ├── Name: *string +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ └── WriteAcceleratorEnabled: *bool +│ │ │ │ ├── ImageReference: *Object (8 properties) +│ │ │ │ │ ├── CommunityGalleryImageId: *string +│ │ │ │ │ ├── Offer: *string +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── Publisher: *string +│ │ │ │ │ ├── Reference: *genruntime.ResourceReference +│ │ │ │ │ ├── SharedGalleryImageId: *string +│ │ │ │ │ ├── Sku: *string +│ │ │ │ │ └── Version: *string +│ │ │ │ ├── OsDisk: *Object (12 properties) +│ │ │ │ │ ├── Caching: *string +│ │ │ │ │ ├── CreateOption: *string +│ │ │ │ │ ├── DeleteOption: *string +│ │ │ │ │ ├── DiffDiskSettings: *Object (3 properties) +│ │ │ │ │ │ ├── Option: *string +│ │ │ │ │ │ ├── Placement: *string +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── DiskSizeGB: *int +│ │ │ │ │ ├── Image: *Object (2 properties) +│ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ └── Uri: *string +│ │ │ │ │ ├── ManagedDisk: *Object (4 properties) +│ │ │ │ │ │ ├── DiskEncryptionSet: *Object (2 properties) +│ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ │ └── Reference: *genruntime.ResourceReference +│ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ ├── SecurityProfile: *Object (3 properties) +│ │ │ │ │ │ │ ├── DiskEncryptionSet: *Object (2 properties) +│ │ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ │ │ └── Reference: *genruntime.ResourceReference +│ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ │ └── SecurityEncryptionType: *string +│ │ │ │ │ │ └── StorageAccountType: *string +│ │ │ │ │ ├── Name: *string +│ │ │ │ │ ├── OsType: *string +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── VhdContainers: string[] +│ │ │ │ │ └── WriteAcceleratorEnabled: *bool +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ └── UserData: *string +│ │ ├── ZoneBalance: *bool +│ │ └── Zones: string[] +│ └── Status: Object (29 properties) +│ ├── AdditionalCapabilities: *Object (3 properties) +│ │ ├── HibernationEnabled: *bool +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── UltraSSDEnabled: *bool +│ ├── AutomaticRepairsPolicy: *Object (4 properties) +│ │ ├── Enabled: *bool +│ │ ├── GracePeriod: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── RepairAction: *string +│ ├── Conditions: conditions.Condition[] +│ ├── DoNotRunExtensionsOnOverprovisionedVMs: *bool +│ ├── ExtendedLocation: *Object (3 properties) +│ │ ├── Name: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── Type: *string +│ ├── HostGroup: *Object (2 properties) +│ │ ├── Id: *string +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── Id: *string +│ ├── Identity: *Object (5 properties) +│ │ ├── PrincipalId: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── TenantId: *string +│ │ ├── Type: *string +│ │ └── UserAssignedIdentities: map[string]Object (3 properties) +│ │ ├── ClientId: *string +│ │ ├── PrincipalId: *string +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── Location: *string +│ ├── Name: *string +│ ├── OrchestrationMode: *string +│ ├── Overprovision: *bool +│ ├── Plan: *Object (5 properties) +│ │ ├── Name: *string +│ │ ├── Product: *string +│ │ ├── PromotionCode: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── Publisher: *string +│ ├── PlatformFaultDomainCount: *int +│ ├── PropertyBag: genruntime.PropertyBag +│ ├── ProvisioningState: *string +│ ├── ProximityPlacementGroup: *Object (2 properties) +│ │ ├── Id: *string +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── ScaleInPolicy: *Object (3 properties) +│ │ ├── ForceDeletion: *bool +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── Rules: string[] +│ ├── SinglePlacementGroup: *bool +│ ├── Sku: *Object (4 properties) +│ │ ├── Capacity: *int +│ │ ├── Name: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── Tier: *string +│ ├── SpotRestorePolicy: *Object (3 properties) +│ │ ├── Enabled: *bool +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── RestoreTimeout: *string +│ ├── Tags: map[string]string +│ ├── TimeCreated: *string +│ ├── Type: *string +│ ├── UniqueId: *string +│ ├── UpgradePolicy: *Object (4 properties) +│ │ ├── AutomaticOSUpgradePolicy: *Object (4 properties) +│ │ │ ├── DisableAutomaticRollback: *bool +│ │ │ ├── EnableAutomaticOSUpgrade: *bool +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── UseRollingUpgradePolicy: *bool +│ │ ├── Mode: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ └── RollingUpgradePolicy: *Object (7 properties) +│ │ ├── EnableCrossZoneUpgrade: *bool +│ │ ├── MaxBatchInstancePercent: *int +│ │ ├── MaxUnhealthyInstancePercent: *int +│ │ ├── MaxUnhealthyUpgradedInstancePercent: *int +│ │ ├── PauseTimeBetweenBatches: *string +│ │ ├── PrioritizeUnhealthyInstances: *bool +│ │ └── PropertyBag: genruntime.PropertyBag +│ ├── VirtualMachineProfile: *Object (16 properties) +│ │ ├── ApplicationProfile: *Object (2 properties) +│ │ │ ├── GalleryApplications: Object (7 properties)[] +│ │ │ │ ├── ConfigurationReference: *string +│ │ │ │ ├── EnableAutomaticUpgrade: *bool +│ │ │ │ ├── Order: *int +│ │ │ │ ├── PackageReferenceId: *string +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── Tags: *string +│ │ │ │ └── TreatFailureAsDeploymentFailure: *bool +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── BillingProfile: *Object (2 properties) +│ │ │ ├── MaxPrice: *float64 +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── CapacityReservation: *Object (2 properties) +│ │ │ ├── CapacityReservationGroup: *Object (2 properties) +│ │ │ │ ├── Id: *string +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── DiagnosticsProfile: *Object (2 properties) +│ │ │ ├── BootDiagnostics: *Object (3 properties) +│ │ │ │ ├── Enabled: *bool +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── StorageUri: *string +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── EvictionPolicy: *string +│ │ ├── ExtensionProfile: *Object (3 properties) +│ │ │ ├── Extensions: Object (16 properties)[] +│ │ │ │ ├── AutoUpgradeMinorVersion: *bool +│ │ │ │ ├── EnableAutomaticUpgrade: *bool +│ │ │ │ ├── ForceUpdateTag: *string +│ │ │ │ ├── Id: *string +│ │ │ │ ├── Name: *string +│ │ │ │ ├── PropertiesType: *string +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── ProtectedSettings: map[string]v1.JSON +│ │ │ │ ├── ProtectedSettingsFromKeyVault: *Object (3 properties) +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── SecretUrl: *string +│ │ │ │ │ └── SourceVault: *Object (2 properties) +│ │ │ │ │ ├── Id: *string +│ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── ProvisionAfterExtensions: string[] +│ │ │ │ ├── ProvisioningState: *string +│ │ │ │ ├── Publisher: *string +│ │ │ │ ├── Settings: map[string]v1.JSON +│ │ │ │ ├── SuppressFailures: *bool +│ │ │ │ ├── Type: *string +│ │ │ │ └── TypeHandlerVersion: *string +│ │ │ ├── ExtensionsTimeBudget: *string +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── HardwareProfile: *Object (2 properties) +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── VmSizeProperties: *Object (3 properties) +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── VCPUsAvailable: *int +│ │ │ └── VCPUsPerCore: *int +│ │ ├── LicenseType: *string +│ │ ├── NetworkProfile: *Object (4 properties) +│ │ │ ├── HealthProbe: *Object (2 properties) +│ │ │ │ ├── Id: *string +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ ├── NetworkApiVersion: *string +│ │ │ ├── NetworkInterfaceConfigurations: Object (11 properties)[] +│ │ │ │ ├── DeleteOption: *string +│ │ │ │ ├── DnsSettings: *Object (2 properties) +│ │ │ │ │ ├── DnsServers: string[] +│ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── EnableAcceleratedNetworking: *bool +│ │ │ │ ├── EnableFpga: *bool +│ │ │ │ ├── EnableIPForwarding: *bool +│ │ │ │ ├── Id: *string +│ │ │ │ ├── IpConfigurations: Object (11 properties)[] +│ │ │ │ │ ├── ApplicationGatewayBackendAddressPools: Object (2 properties)[] +│ │ │ │ │ │ ├── Id: *string +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── ApplicationSecurityGroups: Object (2 properties)[] +│ │ │ │ │ │ ├── Id: *string +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── Id: *string +│ │ │ │ │ ├── LoadBalancerBackendAddressPools: Object (2 properties)[] +│ │ │ │ │ │ ├── Id: *string +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── LoadBalancerInboundNatPools: Object (2 properties)[] +│ │ │ │ │ │ ├── Id: *string +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── Name: *string +│ │ │ │ │ ├── Primary: *bool +│ │ │ │ │ ├── PrivateIPAddressVersion: *string +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── PublicIPAddressConfiguration: *Object (9 properties) +│ │ │ │ │ │ ├── DeleteOption: *string +│ │ │ │ │ │ ├── DnsSettings: *Object (2 properties) +│ │ │ │ │ │ │ ├── DomainNameLabel: *string +│ │ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ ├── IdleTimeoutInMinutes: *int +│ │ │ │ │ │ ├── IpTags: Object (3 properties)[] +│ │ │ │ │ │ │ ├── IpTagType: *string +│ │ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ │ └── Tag: *string +│ │ │ │ │ │ ├── Name: *string +│ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ ├── PublicIPAddressVersion: *string +│ │ │ │ │ │ ├── PublicIPPrefix: *Object (2 properties) +│ │ │ │ │ │ │ ├── Id: *string +│ │ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ └── Sku: *Object (3 properties) +│ │ │ │ │ │ ├── Name: *string +│ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ └── Tier: *string +│ │ │ │ │ └── Subnet: *Object (2 properties) +│ │ │ │ │ ├── Id: *string +│ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── Name: *string +│ │ │ │ ├── NetworkSecurityGroup: *Object (2 properties) +│ │ │ │ │ ├── Id: *string +│ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── Primary: *bool +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── OsProfile: *Object (8 properties) +│ │ │ ├── AdminUsername: *string +│ │ │ ├── AllowExtensionOperations: *bool +│ │ │ ├── ComputerNamePrefix: *string +│ │ │ ├── CustomData: *string +│ │ │ ├── LinuxConfiguration: *Object (5 properties) +│ │ │ │ ├── DisablePasswordAuthentication: *bool +│ │ │ │ ├── PatchSettings: *Object (4 properties) +│ │ │ │ │ ├── AssessmentMode: *string +│ │ │ │ │ ├── AutomaticByPlatformSettings: *Object (2 properties) +│ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ └── RebootSetting: *string +│ │ │ │ │ ├── PatchMode: *string +│ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── ProvisionVMAgent: *bool +│ │ │ │ └── Ssh: *Object (2 properties) +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── PublicKeys: Object (3 properties)[] +│ │ │ │ ├── KeyData: *string +│ │ │ │ ├── Path: *string +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── Secrets: Object (3 properties)[] +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── SourceVault: *Object (2 properties) +│ │ │ │ │ ├── Id: *string +│ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── VaultCertificates: Object (3 properties)[] +│ │ │ │ ├── CertificateStore: *string +│ │ │ │ ├── CertificateUrl: *string +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ └── WindowsConfiguration: *Object (7 properties) +│ │ │ ├── AdditionalUnattendContent: Object (5 properties)[] +│ │ │ │ ├── ComponentName: *string +│ │ │ │ ├── Content: *string +│ │ │ │ ├── PassName: *string +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── SettingName: *string +│ │ │ ├── EnableAutomaticUpdates: *bool +│ │ │ ├── PatchSettings: *Object (5 properties) +│ │ │ │ ├── AssessmentMode: *string +│ │ │ │ ├── AutomaticByPlatformSettings: *Object (2 properties) +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ └── RebootSetting: *string +│ │ │ │ ├── EnableHotpatching: *bool +│ │ │ │ ├── PatchMode: *string +│ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── ProvisionVMAgent: *bool +│ │ │ ├── TimeZone: *string +│ │ │ └── WinRM: *Object (2 properties) +│ │ │ ├── Listeners: Object (3 properties)[] +│ │ │ │ ├── CertificateUrl: *string +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── Protocol: *string +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── Priority: *string +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── ScheduledEventsProfile: *Object (2 properties) +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ └── TerminateNotificationProfile: *Object (3 properties) +│ │ │ ├── Enable: *bool +│ │ │ ├── NotBeforeTimeout: *string +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ ├── SecurityProfile: *Object (4 properties) +│ │ │ ├── EncryptionAtHost: *bool +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── SecurityType: *string +│ │ │ └── UefiSettings: *Object (3 properties) +│ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ ├── SecureBootEnabled: *bool +│ │ │ └── VTpmEnabled: *bool +│ │ ├── StorageProfile: *Object (4 properties) +│ │ │ ├── DataDisks: Object (11 properties)[] +│ │ │ │ ├── Caching: *string +│ │ │ │ ├── CreateOption: *string +│ │ │ │ ├── DeleteOption: *string +│ │ │ │ ├── DiskIOPSReadWrite: *int +│ │ │ │ ├── DiskMBpsReadWrite: *int +│ │ │ │ ├── DiskSizeGB: *int +│ │ │ │ ├── Lun: *int +│ │ │ │ ├── ManagedDisk: *Object (4 properties) +│ │ │ │ │ ├── DiskEncryptionSet: *Object (2 properties) +│ │ │ │ │ │ ├── Id: *string +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── SecurityProfile: *Object (3 properties) +│ │ │ │ │ │ ├── DiskEncryptionSet: *Object (2 properties) +│ │ │ │ │ │ │ ├── Id: *string +│ │ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ └── SecurityEncryptionType: *string +│ │ │ │ │ └── StorageAccountType: *string +│ │ │ │ ├── Name: *string +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ └── WriteAcceleratorEnabled: *bool +│ │ │ ├── ImageReference: *Object (9 properties) +│ │ │ │ ├── CommunityGalleryImageId: *string +│ │ │ │ ├── ExactVersion: *string +│ │ │ │ ├── Id: *string +│ │ │ │ ├── Offer: *string +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── Publisher: *string +│ │ │ │ ├── SharedGalleryImageId: *string +│ │ │ │ ├── Sku: *string +│ │ │ │ └── Version: *string +│ │ │ ├── OsDisk: *Object (12 properties) +│ │ │ │ ├── Caching: *string +│ │ │ │ ├── CreateOption: *string +│ │ │ │ ├── DeleteOption: *string +│ │ │ │ ├── DiffDiskSettings: *Object (3 properties) +│ │ │ │ │ ├── Option: *string +│ │ │ │ │ ├── Placement: *string +│ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── DiskSizeGB: *int +│ │ │ │ ├── Image: *Object (2 properties) +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ └── Uri: *string +│ │ │ │ ├── ManagedDisk: *Object (4 properties) +│ │ │ │ │ ├── DiskEncryptionSet: *Object (2 properties) +│ │ │ │ │ │ ├── Id: *string +│ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ ├── SecurityProfile: *Object (3 properties) +│ │ │ │ │ │ ├── DiskEncryptionSet: *Object (2 properties) +│ │ │ │ │ │ │ ├── Id: *string +│ │ │ │ │ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ │ │ └── SecurityEncryptionType: *string +│ │ │ │ │ └── StorageAccountType: *string +│ │ │ │ ├── Name: *string +│ │ │ │ ├── OsType: *string +│ │ │ │ ├── PropertyBag: genruntime.PropertyBag +│ │ │ │ ├── VhdContainers: string[] +│ │ │ │ └── WriteAcceleratorEnabled: *bool +│ │ │ └── PropertyBag: genruntime.PropertyBag +│ │ └── UserData: *string +│ ├── ZoneBalance: *bool +│ └── Zones: string[] +├── augmentConversionForApiErrorBase_STATUS: Interface +├── augmentConversionForApiError_STATUS: Interface +├── augmentConversionForInnerError_STATUS: Interface +└── augmentConversionForUserAssignedIdentityDetails: Interface diff --git a/v2/api/compute/v1api20220301storage/virtual_machine_types_gen.go b/v2/api/compute/v1api20220301storage/virtual_machine_types_gen.go index 4e9968f3115..b3e44d56cf8 100644 --- a/v2/api/compute/v1api20220301storage/virtual_machine_types_gen.go +++ b/v2/api/compute/v1api20220301storage/virtual_machine_types_gen.go @@ -4,6 +4,7 @@ package v1api20220301storage import ( + v20220702s "github.com/Azure/azure-service-operator/v2/api/compute/v1api20220702storage" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" "github.com/pkg/errors" @@ -813,6 +814,62 @@ type UserAssignedIdentityDetails struct { Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"` } +// AssignProperties_From_UserAssignedIdentityDetails populates our UserAssignedIdentityDetails from the provided source UserAssignedIdentityDetails +func (details *UserAssignedIdentityDetails) AssignProperties_From_UserAssignedIdentityDetails(source *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 errors.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 errors.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 { @@ -994,6 +1051,11 @@ type AdditionalUnattendContent_STATUS struct { SettingName *string `json:"settingName,omitempty"` } +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 { @@ -1243,6 +1305,134 @@ type ApiError_STATUS struct { 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 { + // Shadow the loop variable to avoid aliasing + detailItem := detailItem + var detail ApiErrorBase_STATUS + err := detail.AssignProperties_From_ApiErrorBase_STATUS(&detailItem) + if err != nil { + return errors.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 errors.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 errors.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 { + // Shadow the loop variable to avoid aliasing + detailItem := detailItem + var detail v20220702s.ApiErrorBase_STATUS + err := detailItem.AssignProperties_To_ApiErrorBase_STATUS(&detail) + if err != nil { + return errors.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 errors.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 errors.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 { @@ -1384,6 +1574,79 @@ type ApiErrorBase_STATUS struct { 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 errors.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 errors.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 { @@ -1392,6 +1655,68 @@ type InnerError_STATUS struct { 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 errors.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 errors.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 { @@ -1438,6 +1763,16 @@ type VirtualMachinePublicIPAddressDnsSettingsConfiguration_STATUS struct { 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{}) } diff --git a/v2/api/compute/v1api20220301storage/virtual_machine_types_gen_test.go b/v2/api/compute/v1api20220301storage/virtual_machine_types_gen_test.go index b89aaa95955..220d379b5de 100644 --- a/v2/api/compute/v1api20220301storage/virtual_machine_types_gen_test.go +++ b/v2/api/compute/v1api20220301storage/virtual_machine_types_gen_test.go @@ -5,6 +5,7 @@ package v1api20220301storage import ( "encoding/json" + v20220702s "github.com/Azure/azure-service-operator/v2/api/compute/v1api20220702storage" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/kr/pretty" @@ -3690,6 +3691,48 @@ func AddIndependentPropertyGeneratorsForUefiSettings_STATUS(gens map[string]gopt gens["VTpmEnabled"] = gen.PtrOf(gen.Bool()) } +func Test_UserAssignedIdentityDetails_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from UserAssignedIdentityDetails to UserAssignedIdentityDetails via AssignProperties_To_UserAssignedIdentityDetails & AssignProperties_From_UserAssignedIdentityDetails returns original", + prop.ForAll(RunPropertyAssignmentTestForUserAssignedIdentityDetails, UserAssignedIdentityDetailsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForUserAssignedIdentityDetails tests if a specific instance of UserAssignedIdentityDetails can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForUserAssignedIdentityDetails(subject UserAssignedIdentityDetails) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.UserAssignedIdentityDetails + err := copied.AssignProperties_To_UserAssignedIdentityDetails(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual UserAssignedIdentityDetails + err = actual.AssignProperties_From_UserAssignedIdentityDetails(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_UserAssignedIdentityDetails_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -6657,6 +6700,48 @@ func AddRelatedPropertyGeneratorsForWinRMConfiguration_STATUS(gens map[string]go gens["Listeners"] = gen.SliceOf(WinRMListener_STATUSGenerator()) } +func Test_ApiError_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ApiError_STATUS to ApiError_STATUS via AssignProperties_To_ApiError_STATUS & AssignProperties_From_ApiError_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForApiError_STATUS, ApiError_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForApiError_STATUS tests if a specific instance of ApiError_STATUS can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForApiError_STATUS(subject ApiError_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.ApiError_STATUS + err := copied.AssignProperties_To_ApiError_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ApiError_STATUS + err = actual.AssignProperties_From_ApiError_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ApiError_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -7763,6 +7848,48 @@ func AddIndependentPropertyGeneratorsForWinRMListener_STATUS(gens map[string]gop gens["Protocol"] = gen.PtrOf(gen.AlphaString()) } +func Test_ApiErrorBase_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ApiErrorBase_STATUS to ApiErrorBase_STATUS via AssignProperties_To_ApiErrorBase_STATUS & AssignProperties_From_ApiErrorBase_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForApiErrorBase_STATUS, ApiErrorBase_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForApiErrorBase_STATUS tests if a specific instance of ApiErrorBase_STATUS can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForApiErrorBase_STATUS(subject ApiErrorBase_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.ApiErrorBase_STATUS + err := copied.AssignProperties_To_ApiErrorBase_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ApiErrorBase_STATUS + err = actual.AssignProperties_From_ApiErrorBase_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_ApiErrorBase_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -7826,6 +7953,48 @@ func AddIndependentPropertyGeneratorsForApiErrorBase_STATUS(gens map[string]gopt gens["Target"] = gen.PtrOf(gen.AlphaString()) } +func Test_InnerError_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from InnerError_STATUS to InnerError_STATUS via AssignProperties_To_InnerError_STATUS & AssignProperties_From_InnerError_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForInnerError_STATUS, InnerError_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForInnerError_STATUS tests if a specific instance of InnerError_STATUS can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForInnerError_STATUS(subject InnerError_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.InnerError_STATUS + err := copied.AssignProperties_To_InnerError_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual InnerError_STATUS + err = actual.AssignProperties_From_InnerError_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + func Test_InnerError_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/compute/v1api20220702/disk_encryption_set_spec_arm_types_gen.go b/v2/api/compute/v1api20220702/disk_encryption_set_spec_arm_types_gen.go new file mode 100644 index 00000000000..f2b1f5695bd --- /dev/null +++ b/v2/api/compute/v1api20220702/disk_encryption_set_spec_arm_types_gen.go @@ -0,0 +1,94 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20220702 + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type DiskEncryptionSet_Spec_ARM struct { + // Identity: The managed identity for the disk encryption set. It should be given permission on the key vault before it can + // be used to encrypt disks. + Identity *EncryptionSetIdentity_ARM `json:"identity,omitempty"` + + // Location: Resource location + Location *string `json:"location,omitempty"` + Name string `json:"name,omitempty"` + Properties *EncryptionSetProperties_ARM `json:"properties,omitempty"` + + // Tags: Resource tags + Tags map[string]string `json:"tags,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &DiskEncryptionSet_Spec_ARM{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2022-07-02" +func (encryptionSet DiskEncryptionSet_Spec_ARM) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (encryptionSet *DiskEncryptionSet_Spec_ARM) GetName() string { + return encryptionSet.Name +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Compute/diskEncryptionSets" +func (encryptionSet *DiskEncryptionSet_Spec_ARM) GetType() string { + return "Microsoft.Compute/diskEncryptionSets" +} + +// The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used +// to encrypt disks. +type EncryptionSetIdentity_ARM struct { + // Type: The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. + // Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active + // Directory tenant; it will cause the encrypted resources to lose access to the keys. + Type *EncryptionSetIdentity_Type `json:"type,omitempty"` + UserAssignedIdentities map[string]UserAssignedIdentityDetails_ARM `json:"userAssignedIdentities,omitempty"` +} + +type EncryptionSetProperties_ARM struct { + // ActiveKey: The key vault key which is currently used by this disk encryption set. + ActiveKey *KeyForDiskEncryptionSet_ARM `json:"activeKey,omitempty"` + + // EncryptionType: The type of key used to encrypt the data of the disk. + EncryptionType *DiskEncryptionSetType `json:"encryptionType,omitempty"` + + // FederatedClientId: Multi-tenant application client id to access key vault in a different tenant. Setting the value to + // 'None' will clear the property. + FederatedClientId *string `json:"federatedClientId,omitempty" optionalConfigMapPair:"FederatedClientId"` + + // RotationToLatestKeyVersionEnabled: Set this flag to true to enable auto-updating of this disk encryption set to the + // latest key version. + RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"` +} + +// +kubebuilder:validation:Enum={"None","SystemAssigned","SystemAssigned, UserAssigned","UserAssigned"} +type EncryptionSetIdentity_Type string + +const ( + EncryptionSetIdentity_Type_None = EncryptionSetIdentity_Type("None") + EncryptionSetIdentity_Type_SystemAssigned = EncryptionSetIdentity_Type("SystemAssigned") + EncryptionSetIdentity_Type_SystemAssignedUserAssigned = EncryptionSetIdentity_Type("SystemAssigned, UserAssigned") + EncryptionSetIdentity_Type_UserAssigned = EncryptionSetIdentity_Type("UserAssigned") +) + +// Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots +type KeyForDiskEncryptionSet_ARM struct { + // KeyUrl: Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of + // rotationToLatestKeyVersionEnabled value. + KeyUrl *string `json:"keyUrl,omitempty" optionalConfigMapPair:"KeyUrl"` + + // SourceVault: Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if + // the KeyVault subscription is not the same as the Disk Encryption Set subscription. + SourceVault *SourceVault_ARM `json:"sourceVault,omitempty"` +} + +// Information about the user assigned identity for the resource +type UserAssignedIdentityDetails_ARM struct { +} + +// The vault id is an Azure Resource Manager Resource id in the form +// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} +type SourceVault_ARM struct { + Id *string `json:"id,omitempty"` +} diff --git a/v2/api/compute/v1api20220702/disk_encryption_set_spec_arm_types_gen_test.go b/v2/api/compute/v1api20220702/disk_encryption_set_spec_arm_types_gen_test.go new file mode 100644 index 00000000000..c14b2608533 --- /dev/null +++ b/v2/api/compute/v1api20220702/disk_encryption_set_spec_arm_types_gen_test.go @@ -0,0 +1,442 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20220702 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_DiskEncryptionSet_Spec_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DiskEncryptionSet_Spec_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDiskEncryptionSet_Spec_ARM, DiskEncryptionSet_Spec_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDiskEncryptionSet_Spec_ARM runs a test to see if a specific instance of DiskEncryptionSet_Spec_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForDiskEncryptionSet_Spec_ARM(subject DiskEncryptionSet_Spec_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DiskEncryptionSet_Spec_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DiskEncryptionSet_Spec_ARM instances for property testing - lazily instantiated by +// DiskEncryptionSet_Spec_ARMGenerator() +var diskEncryptionSet_Spec_ARMGenerator gopter.Gen + +// DiskEncryptionSet_Spec_ARMGenerator returns a generator of DiskEncryptionSet_Spec_ARM instances for property testing. +// We first initialize diskEncryptionSet_Spec_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func DiskEncryptionSet_Spec_ARMGenerator() gopter.Gen { + if diskEncryptionSet_Spec_ARMGenerator != nil { + return diskEncryptionSet_Spec_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDiskEncryptionSet_Spec_ARM(generators) + diskEncryptionSet_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(DiskEncryptionSet_Spec_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDiskEncryptionSet_Spec_ARM(generators) + AddRelatedPropertyGeneratorsForDiskEncryptionSet_Spec_ARM(generators) + diskEncryptionSet_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(DiskEncryptionSet_Spec_ARM{}), generators) + + return diskEncryptionSet_Spec_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForDiskEncryptionSet_Spec_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDiskEncryptionSet_Spec_ARM(gens map[string]gopter.Gen) { + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.AlphaString() + gens["Tags"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForDiskEncryptionSet_Spec_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForDiskEncryptionSet_Spec_ARM(gens map[string]gopter.Gen) { + gens["Identity"] = gen.PtrOf(EncryptionSetIdentity_ARMGenerator()) + gens["Properties"] = gen.PtrOf(EncryptionSetProperties_ARMGenerator()) +} + +func Test_EncryptionSetIdentity_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionSetIdentity_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionSetIdentity_ARM, EncryptionSetIdentity_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionSetIdentity_ARM runs a test to see if a specific instance of EncryptionSetIdentity_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionSetIdentity_ARM(subject EncryptionSetIdentity_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionSetIdentity_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionSetIdentity_ARM instances for property testing - lazily instantiated by +// EncryptionSetIdentity_ARMGenerator() +var encryptionSetIdentity_ARMGenerator gopter.Gen + +// EncryptionSetIdentity_ARMGenerator returns a generator of EncryptionSetIdentity_ARM instances for property testing. +// We first initialize encryptionSetIdentity_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func EncryptionSetIdentity_ARMGenerator() gopter.Gen { + if encryptionSetIdentity_ARMGenerator != nil { + return encryptionSetIdentity_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionSetIdentity_ARM(generators) + encryptionSetIdentity_ARMGenerator = gen.Struct(reflect.TypeOf(EncryptionSetIdentity_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionSetIdentity_ARM(generators) + AddRelatedPropertyGeneratorsForEncryptionSetIdentity_ARM(generators) + encryptionSetIdentity_ARMGenerator = gen.Struct(reflect.TypeOf(EncryptionSetIdentity_ARM{}), generators) + + return encryptionSetIdentity_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionSetIdentity_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionSetIdentity_ARM(gens map[string]gopter.Gen) { + gens["Type"] = gen.PtrOf(gen.OneConstOf( + EncryptionSetIdentity_Type_None, + EncryptionSetIdentity_Type_SystemAssigned, + EncryptionSetIdentity_Type_SystemAssignedUserAssigned, + EncryptionSetIdentity_Type_UserAssigned)) +} + +// AddRelatedPropertyGeneratorsForEncryptionSetIdentity_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryptionSetIdentity_ARM(gens map[string]gopter.Gen) { + gens["UserAssignedIdentities"] = gen.MapOf(gen.AlphaString(), UserAssignedIdentityDetails_ARMGenerator()) +} + +func Test_EncryptionSetProperties_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionSetProperties_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionSetProperties_ARM, EncryptionSetProperties_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionSetProperties_ARM runs a test to see if a specific instance of EncryptionSetProperties_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionSetProperties_ARM(subject EncryptionSetProperties_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionSetProperties_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionSetProperties_ARM instances for property testing - lazily instantiated by +// EncryptionSetProperties_ARMGenerator() +var encryptionSetProperties_ARMGenerator gopter.Gen + +// EncryptionSetProperties_ARMGenerator returns a generator of EncryptionSetProperties_ARM instances for property testing. +// We first initialize encryptionSetProperties_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func EncryptionSetProperties_ARMGenerator() gopter.Gen { + if encryptionSetProperties_ARMGenerator != nil { + return encryptionSetProperties_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionSetProperties_ARM(generators) + encryptionSetProperties_ARMGenerator = gen.Struct(reflect.TypeOf(EncryptionSetProperties_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionSetProperties_ARM(generators) + AddRelatedPropertyGeneratorsForEncryptionSetProperties_ARM(generators) + encryptionSetProperties_ARMGenerator = gen.Struct(reflect.TypeOf(EncryptionSetProperties_ARM{}), generators) + + return encryptionSetProperties_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionSetProperties_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionSetProperties_ARM(gens map[string]gopter.Gen) { + gens["EncryptionType"] = gen.PtrOf(gen.OneConstOf(DiskEncryptionSetType_ConfidentialVmEncryptedWithCustomerKey, DiskEncryptionSetType_EncryptionAtRestWithCustomerKey, DiskEncryptionSetType_EncryptionAtRestWithPlatformAndCustomerKeys)) + gens["FederatedClientId"] = gen.PtrOf(gen.AlphaString()) + gens["RotationToLatestKeyVersionEnabled"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForEncryptionSetProperties_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryptionSetProperties_ARM(gens map[string]gopter.Gen) { + gens["ActiveKey"] = gen.PtrOf(KeyForDiskEncryptionSet_ARMGenerator()) +} + +func Test_KeyForDiskEncryptionSet_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyForDiskEncryptionSet_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyForDiskEncryptionSet_ARM, KeyForDiskEncryptionSet_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyForDiskEncryptionSet_ARM runs a test to see if a specific instance of KeyForDiskEncryptionSet_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyForDiskEncryptionSet_ARM(subject KeyForDiskEncryptionSet_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyForDiskEncryptionSet_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyForDiskEncryptionSet_ARM instances for property testing - lazily instantiated by +// KeyForDiskEncryptionSet_ARMGenerator() +var keyForDiskEncryptionSet_ARMGenerator gopter.Gen + +// KeyForDiskEncryptionSet_ARMGenerator returns a generator of KeyForDiskEncryptionSet_ARM instances for property testing. +// We first initialize keyForDiskEncryptionSet_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func KeyForDiskEncryptionSet_ARMGenerator() gopter.Gen { + if keyForDiskEncryptionSet_ARMGenerator != nil { + return keyForDiskEncryptionSet_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet_ARM(generators) + keyForDiskEncryptionSet_ARMGenerator = gen.Struct(reflect.TypeOf(KeyForDiskEncryptionSet_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet_ARM(generators) + AddRelatedPropertyGeneratorsForKeyForDiskEncryptionSet_ARM(generators) + keyForDiskEncryptionSet_ARMGenerator = gen.Struct(reflect.TypeOf(KeyForDiskEncryptionSet_ARM{}), generators) + + return keyForDiskEncryptionSet_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet_ARM(gens map[string]gopter.Gen) { + gens["KeyUrl"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForKeyForDiskEncryptionSet_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForKeyForDiskEncryptionSet_ARM(gens map[string]gopter.Gen) { + gens["SourceVault"] = gen.PtrOf(SourceVault_ARMGenerator()) +} + +func Test_UserAssignedIdentityDetails_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of UserAssignedIdentityDetails_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForUserAssignedIdentityDetails_ARM, UserAssignedIdentityDetails_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForUserAssignedIdentityDetails_ARM runs a test to see if a specific instance of UserAssignedIdentityDetails_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForUserAssignedIdentityDetails_ARM(subject UserAssignedIdentityDetails_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual UserAssignedIdentityDetails_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of UserAssignedIdentityDetails_ARM instances for property testing - lazily instantiated by +// UserAssignedIdentityDetails_ARMGenerator() +var userAssignedIdentityDetails_ARMGenerator gopter.Gen + +// UserAssignedIdentityDetails_ARMGenerator returns a generator of UserAssignedIdentityDetails_ARM instances for property testing. +func UserAssignedIdentityDetails_ARMGenerator() gopter.Gen { + if userAssignedIdentityDetails_ARMGenerator != nil { + return userAssignedIdentityDetails_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + userAssignedIdentityDetails_ARMGenerator = gen.Struct(reflect.TypeOf(UserAssignedIdentityDetails_ARM{}), generators) + + return userAssignedIdentityDetails_ARMGenerator +} + +func Test_SourceVault_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SourceVault_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSourceVault_ARM, SourceVault_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSourceVault_ARM runs a test to see if a specific instance of SourceVault_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForSourceVault_ARM(subject SourceVault_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SourceVault_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SourceVault_ARM instances for property testing - lazily instantiated by SourceVault_ARMGenerator() +var sourceVault_ARMGenerator gopter.Gen + +// SourceVault_ARMGenerator returns a generator of SourceVault_ARM instances for property testing. +func SourceVault_ARMGenerator() gopter.Gen { + if sourceVault_ARMGenerator != nil { + return sourceVault_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSourceVault_ARM(generators) + sourceVault_ARMGenerator = gen.Struct(reflect.TypeOf(SourceVault_ARM{}), generators) + + return sourceVault_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForSourceVault_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSourceVault_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/compute/v1api20220702/disk_encryption_set_status_arm_types_gen.go b/v2/api/compute/v1api20220702/disk_encryption_set_status_arm_types_gen.go new file mode 100644 index 00000000000..fd1dbbb8375 --- /dev/null +++ b/v2/api/compute/v1api20220702/disk_encryption_set_status_arm_types_gen.go @@ -0,0 +1,153 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20220702 + +// disk encryption set resource. +type DiskEncryptionSet_STATUS_ARM struct { + // Id: Resource Id + Id *string `json:"id,omitempty"` + + // Identity: The managed identity for the disk encryption set. It should be given permission on the key vault before it can + // be used to encrypt disks. + Identity *EncryptionSetIdentity_STATUS_ARM `json:"identity,omitempty"` + + // Location: Resource location + Location *string `json:"location,omitempty"` + + // Name: Resource name + Name *string `json:"name,omitempty"` + Properties *EncryptionSetProperties_STATUS_ARM `json:"properties,omitempty"` + + // Tags: Resource tags + Tags map[string]string `json:"tags,omitempty"` + + // Type: Resource type + Type *string `json:"type,omitempty"` +} + +// The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used +// to encrypt disks. +type EncryptionSetIdentity_STATUS_ARM struct { + // PrincipalId: The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the + // x-ms-identity-principal-id header in the PUT request if the resource has a systemAssigned(implicit) identity + PrincipalId *string `json:"principalId,omitempty"` + + // TenantId: The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the + // x-ms-client-tenant-id header in the PUT request if the resource has a systemAssigned(implicit) identity + TenantId *string `json:"tenantId,omitempty"` + + // Type: The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. + // Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active + // Directory tenant; it will cause the encrypted resources to lose access to the keys. + Type *EncryptionSetIdentity_Type_STATUS `json:"type,omitempty"` + + // UserAssignedIdentities: The list of user identities associated with the disk encryption set. The user identity + // dictionary key references will be ARM resource ids in the form: + // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + UserAssignedIdentities map[string]EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM `json:"userAssignedIdentities,omitempty"` +} + +type EncryptionSetProperties_STATUS_ARM struct { + // ActiveKey: The key vault key which is currently used by this disk encryption set. + ActiveKey *KeyForDiskEncryptionSet_STATUS_ARM `json:"activeKey,omitempty"` + + // AutoKeyRotationError: The error that was encountered during auto-key rotation. If an error is present, then auto-key + // rotation will not be attempted until the error on this disk encryption set is fixed. + AutoKeyRotationError *ApiError_STATUS_ARM `json:"autoKeyRotationError,omitempty"` + + // EncryptionType: The type of key used to encrypt the data of the disk. + EncryptionType *DiskEncryptionSetType_STATUS `json:"encryptionType,omitempty"` + + // FederatedClientId: Multi-tenant application client id to access key vault in a different tenant. Setting the value to + // 'None' will clear the property. + FederatedClientId *string `json:"federatedClientId,omitempty"` + + // LastKeyRotationTimestamp: The time when the active key of this disk encryption set was updated. + LastKeyRotationTimestamp *string `json:"lastKeyRotationTimestamp,omitempty"` + + // PreviousKeys: A readonly collection of key vault keys previously used by this disk encryption set while a key rotation + // is in progress. It will be empty if there is no ongoing key rotation. + PreviousKeys []KeyForDiskEncryptionSet_STATUS_ARM `json:"previousKeys,omitempty"` + + // ProvisioningState: The disk encryption set provisioning state. + ProvisioningState *string `json:"provisioningState,omitempty"` + + // RotationToLatestKeyVersionEnabled: Set this flag to true to enable auto-updating of this disk encryption set to the + // latest key version. + RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"` +} + +// Api error. +type ApiError_STATUS_ARM struct { + // Code: The error code. + Code *string `json:"code,omitempty"` + + // Details: The Api error details + Details []ApiErrorBase_STATUS_ARM `json:"details,omitempty"` + + // Innererror: The Api inner error + Innererror *InnerError_STATUS_ARM `json:"innererror,omitempty"` + + // Message: The error message. + Message *string `json:"message,omitempty"` + + // Target: The target of the particular error. + Target *string `json:"target,omitempty"` +} + +type EncryptionSetIdentity_Type_STATUS string + +const ( + EncryptionSetIdentity_Type_STATUS_None = EncryptionSetIdentity_Type_STATUS("None") + EncryptionSetIdentity_Type_STATUS_SystemAssigned = EncryptionSetIdentity_Type_STATUS("SystemAssigned") + EncryptionSetIdentity_Type_STATUS_SystemAssignedUserAssigned = EncryptionSetIdentity_Type_STATUS("SystemAssigned, UserAssigned") + EncryptionSetIdentity_Type_STATUS_UserAssigned = EncryptionSetIdentity_Type_STATUS("UserAssigned") +) + +type EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM struct { + // ClientId: The client id of user assigned identity. + ClientId *string `json:"clientId,omitempty"` + + // PrincipalId: The principal id of user assigned identity. + PrincipalId *string `json:"principalId,omitempty"` +} + +// Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots +type KeyForDiskEncryptionSet_STATUS_ARM struct { + // KeyUrl: Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of + // rotationToLatestKeyVersionEnabled value. + KeyUrl *string `json:"keyUrl,omitempty"` + + // SourceVault: Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if + // the KeyVault subscription is not the same as the Disk Encryption Set subscription. + SourceVault *SourceVault_STATUS_ARM `json:"sourceVault,omitempty"` +} + +// Api error base. +type ApiErrorBase_STATUS_ARM struct { + // Code: The error code. + Code *string `json:"code,omitempty"` + + // Message: The error message. + Message *string `json:"message,omitempty"` + + // Target: The target of the particular error. + Target *string `json:"target,omitempty"` +} + +// Inner error details. +type InnerError_STATUS_ARM struct { + // Errordetail: The internal error message or exception dump. + Errordetail *string `json:"errordetail,omitempty"` + + // Exceptiontype: The exception type. + Exceptiontype *string `json:"exceptiontype,omitempty"` +} + +// The vault id is an Azure Resource Manager Resource id in the form +// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} +type SourceVault_STATUS_ARM struct { + // Id: Resource Id + Id *string `json:"id,omitempty"` +} diff --git a/v2/api/compute/v1api20220702/disk_encryption_set_status_arm_types_gen_test.go b/v2/api/compute/v1api20220702/disk_encryption_set_status_arm_types_gen_test.go new file mode 100644 index 00000000000..39e026b26e1 --- /dev/null +++ b/v2/api/compute/v1api20220702/disk_encryption_set_status_arm_types_gen_test.go @@ -0,0 +1,661 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20220702 + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_DiskEncryptionSet_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DiskEncryptionSet_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDiskEncryptionSet_STATUS_ARM, DiskEncryptionSet_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDiskEncryptionSet_STATUS_ARM runs a test to see if a specific instance of DiskEncryptionSet_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForDiskEncryptionSet_STATUS_ARM(subject DiskEncryptionSet_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DiskEncryptionSet_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DiskEncryptionSet_STATUS_ARM instances for property testing - lazily instantiated by +// DiskEncryptionSet_STATUS_ARMGenerator() +var diskEncryptionSet_STATUS_ARMGenerator gopter.Gen + +// DiskEncryptionSet_STATUS_ARMGenerator returns a generator of DiskEncryptionSet_STATUS_ARM instances for property testing. +// We first initialize diskEncryptionSet_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func DiskEncryptionSet_STATUS_ARMGenerator() gopter.Gen { + if diskEncryptionSet_STATUS_ARMGenerator != nil { + return diskEncryptionSet_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDiskEncryptionSet_STATUS_ARM(generators) + diskEncryptionSet_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(DiskEncryptionSet_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDiskEncryptionSet_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForDiskEncryptionSet_STATUS_ARM(generators) + diskEncryptionSet_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(DiskEncryptionSet_STATUS_ARM{}), generators) + + return diskEncryptionSet_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForDiskEncryptionSet_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDiskEncryptionSet_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Tags"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForDiskEncryptionSet_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForDiskEncryptionSet_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Identity"] = gen.PtrOf(EncryptionSetIdentity_STATUS_ARMGenerator()) + gens["Properties"] = gen.PtrOf(EncryptionSetProperties_STATUS_ARMGenerator()) +} + +func Test_EncryptionSetIdentity_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionSetIdentity_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionSetIdentity_STATUS_ARM, EncryptionSetIdentity_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionSetIdentity_STATUS_ARM runs a test to see if a specific instance of EncryptionSetIdentity_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionSetIdentity_STATUS_ARM(subject EncryptionSetIdentity_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionSetIdentity_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionSetIdentity_STATUS_ARM instances for property testing - lazily instantiated by +// EncryptionSetIdentity_STATUS_ARMGenerator() +var encryptionSetIdentity_STATUS_ARMGenerator gopter.Gen + +// EncryptionSetIdentity_STATUS_ARMGenerator returns a generator of EncryptionSetIdentity_STATUS_ARM instances for property testing. +// We first initialize encryptionSetIdentity_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func EncryptionSetIdentity_STATUS_ARMGenerator() gopter.Gen { + if encryptionSetIdentity_STATUS_ARMGenerator != nil { + return encryptionSetIdentity_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionSetIdentity_STATUS_ARM(generators) + encryptionSetIdentity_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(EncryptionSetIdentity_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionSetIdentity_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForEncryptionSetIdentity_STATUS_ARM(generators) + encryptionSetIdentity_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(EncryptionSetIdentity_STATUS_ARM{}), generators) + + return encryptionSetIdentity_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionSetIdentity_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionSetIdentity_STATUS_ARM(gens map[string]gopter.Gen) { + gens["PrincipalId"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.OneConstOf( + EncryptionSetIdentity_Type_STATUS_None, + EncryptionSetIdentity_Type_STATUS_SystemAssigned, + EncryptionSetIdentity_Type_STATUS_SystemAssignedUserAssigned, + EncryptionSetIdentity_Type_STATUS_UserAssigned)) +} + +// AddRelatedPropertyGeneratorsForEncryptionSetIdentity_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryptionSetIdentity_STATUS_ARM(gens map[string]gopter.Gen) { + gens["UserAssignedIdentities"] = gen.MapOf(gen.AlphaString(), EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARMGenerator()) +} + +func Test_EncryptionSetProperties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionSetProperties_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionSetProperties_STATUS_ARM, EncryptionSetProperties_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionSetProperties_STATUS_ARM runs a test to see if a specific instance of EncryptionSetProperties_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionSetProperties_STATUS_ARM(subject EncryptionSetProperties_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionSetProperties_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionSetProperties_STATUS_ARM instances for property testing - lazily instantiated by +// EncryptionSetProperties_STATUS_ARMGenerator() +var encryptionSetProperties_STATUS_ARMGenerator gopter.Gen + +// EncryptionSetProperties_STATUS_ARMGenerator returns a generator of EncryptionSetProperties_STATUS_ARM instances for property testing. +// We first initialize encryptionSetProperties_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func EncryptionSetProperties_STATUS_ARMGenerator() gopter.Gen { + if encryptionSetProperties_STATUS_ARMGenerator != nil { + return encryptionSetProperties_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionSetProperties_STATUS_ARM(generators) + encryptionSetProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(EncryptionSetProperties_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionSetProperties_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForEncryptionSetProperties_STATUS_ARM(generators) + encryptionSetProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(EncryptionSetProperties_STATUS_ARM{}), generators) + + return encryptionSetProperties_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionSetProperties_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionSetProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["EncryptionType"] = gen.PtrOf(gen.OneConstOf(DiskEncryptionSetType_STATUS_ConfidentialVmEncryptedWithCustomerKey, DiskEncryptionSetType_STATUS_EncryptionAtRestWithCustomerKey, DiskEncryptionSetType_STATUS_EncryptionAtRestWithPlatformAndCustomerKeys)) + gens["FederatedClientId"] = gen.PtrOf(gen.AlphaString()) + gens["LastKeyRotationTimestamp"] = gen.PtrOf(gen.AlphaString()) + gens["ProvisioningState"] = gen.PtrOf(gen.AlphaString()) + gens["RotationToLatestKeyVersionEnabled"] = gen.PtrOf(gen.Bool()) +} + +// AddRelatedPropertyGeneratorsForEncryptionSetProperties_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryptionSetProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["ActiveKey"] = gen.PtrOf(KeyForDiskEncryptionSet_STATUS_ARMGenerator()) + gens["AutoKeyRotationError"] = gen.PtrOf(ApiError_STATUS_ARMGenerator()) + gens["PreviousKeys"] = gen.SliceOf(KeyForDiskEncryptionSet_STATUS_ARMGenerator()) +} + +func Test_ApiError_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ApiError_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForApiError_STATUS_ARM, ApiError_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForApiError_STATUS_ARM runs a test to see if a specific instance of ApiError_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForApiError_STATUS_ARM(subject ApiError_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ApiError_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ApiError_STATUS_ARM instances for property testing - lazily instantiated by +// ApiError_STATUS_ARMGenerator() +var apiError_STATUS_ARMGenerator gopter.Gen + +// ApiError_STATUS_ARMGenerator returns a generator of ApiError_STATUS_ARM instances for property testing. +// We first initialize apiError_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ApiError_STATUS_ARMGenerator() gopter.Gen { + if apiError_STATUS_ARMGenerator != nil { + return apiError_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForApiError_STATUS_ARM(generators) + apiError_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ApiError_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForApiError_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForApiError_STATUS_ARM(generators) + apiError_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ApiError_STATUS_ARM{}), generators) + + return apiError_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForApiError_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForApiError_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Code"] = gen.PtrOf(gen.AlphaString()) + gens["Message"] = gen.PtrOf(gen.AlphaString()) + gens["Target"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForApiError_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForApiError_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Details"] = gen.SliceOf(ApiErrorBase_STATUS_ARMGenerator()) + gens["Innererror"] = gen.PtrOf(InnerError_STATUS_ARMGenerator()) +} + +func Test_EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM, EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM runs a test to see if a specific instance of EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM(subject EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM instances for property testing - lazily +// instantiated by EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARMGenerator() +var encryptionSetIdentity_UserAssignedIdentities_STATUS_ARMGenerator gopter.Gen + +// EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARMGenerator returns a generator of EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM instances for property testing. +func EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARMGenerator() gopter.Gen { + if encryptionSetIdentity_UserAssignedIdentities_STATUS_ARMGenerator != nil { + return encryptionSetIdentity_UserAssignedIdentities_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM(generators) + encryptionSetIdentity_UserAssignedIdentities_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM{}), generators) + + return encryptionSetIdentity_UserAssignedIdentities_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM(gens map[string]gopter.Gen) { + gens["ClientId"] = gen.PtrOf(gen.AlphaString()) + gens["PrincipalId"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_KeyForDiskEncryptionSet_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyForDiskEncryptionSet_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyForDiskEncryptionSet_STATUS_ARM, KeyForDiskEncryptionSet_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyForDiskEncryptionSet_STATUS_ARM runs a test to see if a specific instance of KeyForDiskEncryptionSet_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyForDiskEncryptionSet_STATUS_ARM(subject KeyForDiskEncryptionSet_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyForDiskEncryptionSet_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyForDiskEncryptionSet_STATUS_ARM instances for property testing - lazily instantiated by +// KeyForDiskEncryptionSet_STATUS_ARMGenerator() +var keyForDiskEncryptionSet_STATUS_ARMGenerator gopter.Gen + +// KeyForDiskEncryptionSet_STATUS_ARMGenerator returns a generator of KeyForDiskEncryptionSet_STATUS_ARM instances for property testing. +// We first initialize keyForDiskEncryptionSet_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func KeyForDiskEncryptionSet_STATUS_ARMGenerator() gopter.Gen { + if keyForDiskEncryptionSet_STATUS_ARMGenerator != nil { + return keyForDiskEncryptionSet_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS_ARM(generators) + keyForDiskEncryptionSet_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(KeyForDiskEncryptionSet_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS_ARM(generators) + keyForDiskEncryptionSet_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(KeyForDiskEncryptionSet_STATUS_ARM{}), generators) + + return keyForDiskEncryptionSet_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS_ARM(gens map[string]gopter.Gen) { + gens["KeyUrl"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS_ARM(gens map[string]gopter.Gen) { + gens["SourceVault"] = gen.PtrOf(SourceVault_STATUS_ARMGenerator()) +} + +func Test_ApiErrorBase_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ApiErrorBase_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForApiErrorBase_STATUS_ARM, ApiErrorBase_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForApiErrorBase_STATUS_ARM runs a test to see if a specific instance of ApiErrorBase_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForApiErrorBase_STATUS_ARM(subject ApiErrorBase_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ApiErrorBase_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ApiErrorBase_STATUS_ARM instances for property testing - lazily instantiated by +// ApiErrorBase_STATUS_ARMGenerator() +var apiErrorBase_STATUS_ARMGenerator gopter.Gen + +// ApiErrorBase_STATUS_ARMGenerator returns a generator of ApiErrorBase_STATUS_ARM instances for property testing. +func ApiErrorBase_STATUS_ARMGenerator() gopter.Gen { + if apiErrorBase_STATUS_ARMGenerator != nil { + return apiErrorBase_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForApiErrorBase_STATUS_ARM(generators) + apiErrorBase_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ApiErrorBase_STATUS_ARM{}), generators) + + return apiErrorBase_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForApiErrorBase_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForApiErrorBase_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Code"] = gen.PtrOf(gen.AlphaString()) + gens["Message"] = gen.PtrOf(gen.AlphaString()) + gens["Target"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_InnerError_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of InnerError_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForInnerError_STATUS_ARM, InnerError_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForInnerError_STATUS_ARM runs a test to see if a specific instance of InnerError_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForInnerError_STATUS_ARM(subject InnerError_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual InnerError_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of InnerError_STATUS_ARM instances for property testing - lazily instantiated by +// InnerError_STATUS_ARMGenerator() +var innerError_STATUS_ARMGenerator gopter.Gen + +// InnerError_STATUS_ARMGenerator returns a generator of InnerError_STATUS_ARM instances for property testing. +func InnerError_STATUS_ARMGenerator() gopter.Gen { + if innerError_STATUS_ARMGenerator != nil { + return innerError_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForInnerError_STATUS_ARM(generators) + innerError_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(InnerError_STATUS_ARM{}), generators) + + return innerError_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForInnerError_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForInnerError_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Errordetail"] = gen.PtrOf(gen.AlphaString()) + gens["Exceptiontype"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_SourceVault_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SourceVault_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSourceVault_STATUS_ARM, SourceVault_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSourceVault_STATUS_ARM runs a test to see if a specific instance of SourceVault_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForSourceVault_STATUS_ARM(subject SourceVault_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SourceVault_STATUS_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SourceVault_STATUS_ARM instances for property testing - lazily instantiated by +// SourceVault_STATUS_ARMGenerator() +var sourceVault_STATUS_ARMGenerator gopter.Gen + +// SourceVault_STATUS_ARMGenerator returns a generator of SourceVault_STATUS_ARM instances for property testing. +func SourceVault_STATUS_ARMGenerator() gopter.Gen { + if sourceVault_STATUS_ARMGenerator != nil { + return sourceVault_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSourceVault_STATUS_ARM(generators) + sourceVault_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(SourceVault_STATUS_ARM{}), generators) + + return sourceVault_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForSourceVault_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSourceVault_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/compute/v1api20220702/disk_encryption_set_types_gen.go b/v2/api/compute/v1api20220702/disk_encryption_set_types_gen.go new file mode 100644 index 00000000000..e70b194c4c8 --- /dev/null +++ b/v2/api/compute/v1api20220702/disk_encryption_set_types_gen.go @@ -0,0 +1,2512 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20220702 + +import ( + "fmt" + v20220702s "github.com/Azure/azure-service-operator/v2/api/compute/v1api20220702storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generator information: +// - Generated from: /compute/resource-manager/Microsoft.Compute/DiskRP/stable/2022-07-02/diskEncryptionSet.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName} +type DiskEncryptionSet struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec DiskEncryptionSet_Spec `json:"spec,omitempty"` + Status DiskEncryptionSet_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &DiskEncryptionSet{} + +// GetConditions returns the conditions of the resource +func (encryptionSet *DiskEncryptionSet) GetConditions() conditions.Conditions { + return encryptionSet.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (encryptionSet *DiskEncryptionSet) SetConditions(conditions conditions.Conditions) { + encryptionSet.Status.Conditions = conditions +} + +var _ conversion.Convertible = &DiskEncryptionSet{} + +// ConvertFrom populates our DiskEncryptionSet from the provided hub DiskEncryptionSet +func (encryptionSet *DiskEncryptionSet) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20220702s.DiskEncryptionSet) + if !ok { + return fmt.Errorf("expected compute/v1api20220702storage/DiskEncryptionSet but received %T instead", hub) + } + + return encryptionSet.AssignProperties_From_DiskEncryptionSet(source) +} + +// ConvertTo populates the provided hub DiskEncryptionSet from our DiskEncryptionSet +func (encryptionSet *DiskEncryptionSet) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20220702s.DiskEncryptionSet) + if !ok { + return fmt.Errorf("expected compute/v1api20220702storage/DiskEncryptionSet but received %T instead", hub) + } + + return encryptionSet.AssignProperties_To_DiskEncryptionSet(destination) +} + +// +kubebuilder:webhook:path=/mutate-compute-azure-com-v1api20220702-diskencryptionset,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=compute.azure.com,resources=diskencryptionsets,verbs=create;update,versions=v1api20220702,name=default.v1api20220702.diskencryptionsets.compute.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &DiskEncryptionSet{} + +// Default applies defaults to the DiskEncryptionSet resource +func (encryptionSet *DiskEncryptionSet) Default() { + encryptionSet.defaultImpl() + var temp any = encryptionSet + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (encryptionSet *DiskEncryptionSet) defaultAzureName() { + if encryptionSet.Spec.AzureName == "" { + encryptionSet.Spec.AzureName = encryptionSet.Name + } +} + +// defaultImpl applies the code generated defaults to the DiskEncryptionSet resource +func (encryptionSet *DiskEncryptionSet) defaultImpl() { encryptionSet.defaultAzureName() } + +var _ genruntime.ImportableResource = &DiskEncryptionSet{} + +// InitializeSpec initializes the spec for this resource from the given status +func (encryptionSet *DiskEncryptionSet) InitializeSpec(status genruntime.ConvertibleStatus) error { + if s, ok := status.(*DiskEncryptionSet_STATUS); ok { + return encryptionSet.Spec.Initialize_From_DiskEncryptionSet_STATUS(s) + } + + return fmt.Errorf("expected Status of type DiskEncryptionSet_STATUS but received %T instead", status) +} + +var _ genruntime.KubernetesResource = &DiskEncryptionSet{} + +// AzureName returns the Azure name of the resource +func (encryptionSet *DiskEncryptionSet) AzureName() string { + return encryptionSet.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2022-07-02" +func (encryptionSet DiskEncryptionSet) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (encryptionSet *DiskEncryptionSet) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (encryptionSet *DiskEncryptionSet) GetSpec() genruntime.ConvertibleSpec { + return &encryptionSet.Spec +} + +// GetStatus returns the status of this resource +func (encryptionSet *DiskEncryptionSet) GetStatus() genruntime.ConvertibleStatus { + return &encryptionSet.Status +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Compute/diskEncryptionSets" +func (encryptionSet *DiskEncryptionSet) GetType() string { + return "Microsoft.Compute/diskEncryptionSets" +} + +// NewEmptyStatus returns a new empty (blank) status +func (encryptionSet *DiskEncryptionSet) NewEmptyStatus() genruntime.ConvertibleStatus { + return &DiskEncryptionSet_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (encryptionSet *DiskEncryptionSet) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(encryptionSet.Spec) + return &genruntime.ResourceReference{ + Group: group, + Kind: kind, + Name: encryptionSet.Spec.Owner.Name, + } +} + +// SetStatus sets the status of this resource +func (encryptionSet *DiskEncryptionSet) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*DiskEncryptionSet_STATUS); ok { + encryptionSet.Status = *st + return nil + } + + // Convert status to required version + var st DiskEncryptionSet_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + encryptionSet.Status = st + return nil +} + +// +kubebuilder:webhook:path=/validate-compute-azure-com-v1api20220702-diskencryptionset,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=compute.azure.com,resources=diskencryptionsets,verbs=create;update,versions=v1api20220702,name=validate.v1api20220702.diskencryptionsets.compute.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &DiskEncryptionSet{} + +// ValidateCreate validates the creation of the resource +func (encryptionSet *DiskEncryptionSet) ValidateCreate() (admission.Warnings, error) { + validations := encryptionSet.createValidations() + var temp any = encryptionSet + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (encryptionSet *DiskEncryptionSet) ValidateDelete() (admission.Warnings, error) { + validations := encryptionSet.deleteValidations() + var temp any = encryptionSet + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (encryptionSet *DiskEncryptionSet) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := encryptionSet.updateValidations() + var temp any = encryptionSet + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (encryptionSet *DiskEncryptionSet) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){encryptionSet.validateResourceReferences, encryptionSet.validateOptionalConfigMapReferences} +} + +// deleteValidations validates the deletion of the resource +func (encryptionSet *DiskEncryptionSet) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (encryptionSet *DiskEncryptionSet) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return encryptionSet.validateResourceReferences() + }, + encryptionSet.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return encryptionSet.validateOptionalConfigMapReferences() + }, + } +} + +// validateOptionalConfigMapReferences validates all optional configmap reference pairs to ensure that at most 1 is set +func (encryptionSet *DiskEncryptionSet) validateOptionalConfigMapReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindOptionalConfigMapReferences(&encryptionSet.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateOptionalConfigMapReferences(refs) +} + +// validateResourceReferences validates all resource references +func (encryptionSet *DiskEncryptionSet) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&encryptionSet.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (encryptionSet *DiskEncryptionSet) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*DiskEncryptionSet) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, encryptionSet) +} + +// AssignProperties_From_DiskEncryptionSet populates our DiskEncryptionSet from the provided source DiskEncryptionSet +func (encryptionSet *DiskEncryptionSet) AssignProperties_From_DiskEncryptionSet(source *v20220702s.DiskEncryptionSet) error { + + // ObjectMeta + encryptionSet.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec DiskEncryptionSet_Spec + err := spec.AssignProperties_From_DiskEncryptionSet_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DiskEncryptionSet_Spec() to populate field Spec") + } + encryptionSet.Spec = spec + + // Status + var status DiskEncryptionSet_STATUS + err = status.AssignProperties_From_DiskEncryptionSet_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DiskEncryptionSet_STATUS() to populate field Status") + } + encryptionSet.Status = status + + // No error + return nil +} + +// AssignProperties_To_DiskEncryptionSet populates the provided destination DiskEncryptionSet from our DiskEncryptionSet +func (encryptionSet *DiskEncryptionSet) AssignProperties_To_DiskEncryptionSet(destination *v20220702s.DiskEncryptionSet) error { + + // ObjectMeta + destination.ObjectMeta = *encryptionSet.ObjectMeta.DeepCopy() + + // Spec + var spec v20220702s.DiskEncryptionSet_Spec + err := encryptionSet.Spec.AssignProperties_To_DiskEncryptionSet_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DiskEncryptionSet_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v20220702s.DiskEncryptionSet_STATUS + err = encryptionSet.Status.AssignProperties_To_DiskEncryptionSet_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DiskEncryptionSet_STATUS() to populate field Status") + } + destination.Status = status + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (encryptionSet *DiskEncryptionSet) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: encryptionSet.Spec.OriginalVersion(), + Kind: "DiskEncryptionSet", + } +} + +// +kubebuilder:object:root=true +// Generator information: +// - Generated from: /compute/resource-manager/Microsoft.Compute/DiskRP/stable/2022-07-02/diskEncryptionSet.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName} +type DiskEncryptionSetList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DiskEncryptionSet `json:"items"` +} + +// +kubebuilder:validation:Enum={"2022-07-02"} +type APIVersion string + +const APIVersion_Value = APIVersion("2022-07-02") + +type DiskEncryptionSet_Spec struct { + // ActiveKey: The key vault key which is currently used by this disk encryption set. + ActiveKey *KeyForDiskEncryptionSet `json:"activeKey,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"` + + // EncryptionType: The type of key used to encrypt the data of the disk. + EncryptionType *DiskEncryptionSetType `json:"encryptionType,omitempty"` + + // FederatedClientId: Multi-tenant application client id to access key vault in a different tenant. Setting the value to + // 'None' will clear the property. + FederatedClientId *string `json:"federatedClientId,omitempty" optionalConfigMapPair:"FederatedClientId"` + + // FederatedClientIdFromConfig: Multi-tenant application client id to access key vault in a different tenant. Setting the + // value to 'None' will clear the property. + FederatedClientIdFromConfig *genruntime.ConfigMapReference `json:"federatedClientIdFromConfig,omitempty" optionalConfigMapPair:"FederatedClientId"` + + // Identity: The managed identity for the disk encryption set. It should be given permission on the key vault before it can + // be used to encrypt disks. + Identity *EncryptionSetIdentity `json:"identity,omitempty"` + + // +kubebuilder:validation:Required + // Location: Resource location + Location *string `json:"location,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"` + + // RotationToLatestKeyVersionEnabled: Set this flag to true to enable auto-updating of this disk encryption set to the + // latest key version. + RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"` + + // Tags: Resource tags + Tags map[string]string `json:"tags,omitempty"` +} + +var _ genruntime.ARMTransformer = &DiskEncryptionSet_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (encryptionSet *DiskEncryptionSet_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if encryptionSet == nil { + return nil, nil + } + result := &DiskEncryptionSet_Spec_ARM{} + + // Set property "Identity": + if encryptionSet.Identity != nil { + identity_ARM, err := (*encryptionSet.Identity).ConvertToARM(resolved) + if err != nil { + return nil, err + } + identity := *identity_ARM.(*EncryptionSetIdentity_ARM) + result.Identity = &identity + } + + // Set property "Location": + if encryptionSet.Location != nil { + location := *encryptionSet.Location + result.Location = &location + } + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Properties": + if encryptionSet.ActiveKey != nil || + encryptionSet.EncryptionType != nil || + encryptionSet.FederatedClientId != nil || + encryptionSet.FederatedClientIdFromConfig != nil || + encryptionSet.RotationToLatestKeyVersionEnabled != nil { + result.Properties = &EncryptionSetProperties_ARM{} + } + if encryptionSet.ActiveKey != nil { + activeKey_ARM, err := (*encryptionSet.ActiveKey).ConvertToARM(resolved) + if err != nil { + return nil, err + } + activeKey := *activeKey_ARM.(*KeyForDiskEncryptionSet_ARM) + result.Properties.ActiveKey = &activeKey + } + if encryptionSet.EncryptionType != nil { + encryptionType := *encryptionSet.EncryptionType + result.Properties.EncryptionType = &encryptionType + } + if encryptionSet.FederatedClientId != nil { + federatedClientId := *encryptionSet.FederatedClientId + result.Properties.FederatedClientId = &federatedClientId + } + if encryptionSet.FederatedClientIdFromConfig != nil { + federatedClientIdValue, err := resolved.ResolvedConfigMaps.Lookup(*encryptionSet.FederatedClientIdFromConfig) + if err != nil { + return nil, errors.Wrap(err, "looking up configmap for property FederatedClientId") + } + federatedClientId := federatedClientIdValue + result.Properties.FederatedClientId = &federatedClientId + } + if encryptionSet.RotationToLatestKeyVersionEnabled != nil { + rotationToLatestKeyVersionEnabled := *encryptionSet.RotationToLatestKeyVersionEnabled + result.Properties.RotationToLatestKeyVersionEnabled = &rotationToLatestKeyVersionEnabled + } + + // Set property "Tags": + if encryptionSet.Tags != nil { + result.Tags = make(map[string]string, len(encryptionSet.Tags)) + for key, value := range encryptionSet.Tags { + result.Tags[key] = value + } + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (encryptionSet *DiskEncryptionSet_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &DiskEncryptionSet_Spec_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (encryptionSet *DiskEncryptionSet_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(DiskEncryptionSet_Spec_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected DiskEncryptionSet_Spec_ARM, got %T", armInput) + } + + // Set property "ActiveKey": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ActiveKey != nil { + var activeKey1 KeyForDiskEncryptionSet + err := activeKey1.PopulateFromARM(owner, *typedInput.Properties.ActiveKey) + if err != nil { + return err + } + activeKey := activeKey1 + encryptionSet.ActiveKey = &activeKey + } + } + + // Set property "AzureName": + encryptionSet.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "EncryptionType": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.EncryptionType != nil { + encryptionType := *typedInput.Properties.EncryptionType + encryptionSet.EncryptionType = &encryptionType + } + } + + // Set property "FederatedClientId": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.FederatedClientId != nil { + federatedClientId := *typedInput.Properties.FederatedClientId + encryptionSet.FederatedClientId = &federatedClientId + } + } + + // no assignment for property "FederatedClientIdFromConfig" + + // Set property "Identity": + if typedInput.Identity != nil { + var identity1 EncryptionSetIdentity + err := identity1.PopulateFromARM(owner, *typedInput.Identity) + if err != nil { + return err + } + identity := identity1 + encryptionSet.Identity = &identity + } + + // Set property "Location": + if typedInput.Location != nil { + location := *typedInput.Location + encryptionSet.Location = &location + } + + // Set property "Owner": + encryptionSet.Owner = &genruntime.KnownResourceReference{Name: owner.Name} + + // Set property "RotationToLatestKeyVersionEnabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.RotationToLatestKeyVersionEnabled != nil { + rotationToLatestKeyVersionEnabled := *typedInput.Properties.RotationToLatestKeyVersionEnabled + encryptionSet.RotationToLatestKeyVersionEnabled = &rotationToLatestKeyVersionEnabled + } + } + + // Set property "Tags": + if typedInput.Tags != nil { + encryptionSet.Tags = make(map[string]string, len(typedInput.Tags)) + for key, value := range typedInput.Tags { + encryptionSet.Tags[key] = value + } + } + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &DiskEncryptionSet_Spec{} + +// ConvertSpecFrom populates our DiskEncryptionSet_Spec from the provided source +func (encryptionSet *DiskEncryptionSet_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20220702s.DiskEncryptionSet_Spec) + if ok { + // Populate our instance from source + return encryptionSet.AssignProperties_From_DiskEncryptionSet_Spec(src) + } + + // Convert to an intermediate form + src = &v20220702s.DiskEncryptionSet_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = encryptionSet.AssignProperties_From_DiskEncryptionSet_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our DiskEncryptionSet_Spec +func (encryptionSet *DiskEncryptionSet_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20220702s.DiskEncryptionSet_Spec) + if ok { + // Populate destination from our instance + return encryptionSet.AssignProperties_To_DiskEncryptionSet_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20220702s.DiskEncryptionSet_Spec{} + err := encryptionSet.AssignProperties_To_DiskEncryptionSet_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_DiskEncryptionSet_Spec populates our DiskEncryptionSet_Spec from the provided source DiskEncryptionSet_Spec +func (encryptionSet *DiskEncryptionSet_Spec) AssignProperties_From_DiskEncryptionSet_Spec(source *v20220702s.DiskEncryptionSet_Spec) error { + + // ActiveKey + if source.ActiveKey != nil { + var activeKey KeyForDiskEncryptionSet + err := activeKey.AssignProperties_From_KeyForDiskEncryptionSet(source.ActiveKey) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_KeyForDiskEncryptionSet() to populate field ActiveKey") + } + encryptionSet.ActiveKey = &activeKey + } else { + encryptionSet.ActiveKey = nil + } + + // AzureName + encryptionSet.AzureName = source.AzureName + + // EncryptionType + if source.EncryptionType != nil { + encryptionType := DiskEncryptionSetType(*source.EncryptionType) + encryptionSet.EncryptionType = &encryptionType + } else { + encryptionSet.EncryptionType = nil + } + + // FederatedClientId + encryptionSet.FederatedClientId = genruntime.ClonePointerToString(source.FederatedClientId) + + // FederatedClientIdFromConfig + if source.FederatedClientIdFromConfig != nil { + federatedClientIdFromConfig := source.FederatedClientIdFromConfig.Copy() + encryptionSet.FederatedClientIdFromConfig = &federatedClientIdFromConfig + } else { + encryptionSet.FederatedClientIdFromConfig = nil + } + + // Identity + if source.Identity != nil { + var identity EncryptionSetIdentity + err := identity.AssignProperties_From_EncryptionSetIdentity(source.Identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionSetIdentity() to populate field Identity") + } + encryptionSet.Identity = &identity + } else { + encryptionSet.Identity = nil + } + + // Location + encryptionSet.Location = genruntime.ClonePointerToString(source.Location) + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + encryptionSet.Owner = &owner + } else { + encryptionSet.Owner = nil + } + + // RotationToLatestKeyVersionEnabled + if source.RotationToLatestKeyVersionEnabled != nil { + rotationToLatestKeyVersionEnabled := *source.RotationToLatestKeyVersionEnabled + encryptionSet.RotationToLatestKeyVersionEnabled = &rotationToLatestKeyVersionEnabled + } else { + encryptionSet.RotationToLatestKeyVersionEnabled = nil + } + + // Tags + encryptionSet.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // No error + return nil +} + +// AssignProperties_To_DiskEncryptionSet_Spec populates the provided destination DiskEncryptionSet_Spec from our DiskEncryptionSet_Spec +func (encryptionSet *DiskEncryptionSet_Spec) AssignProperties_To_DiskEncryptionSet_Spec(destination *v20220702s.DiskEncryptionSet_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ActiveKey + if encryptionSet.ActiveKey != nil { + var activeKey v20220702s.KeyForDiskEncryptionSet + err := encryptionSet.ActiveKey.AssignProperties_To_KeyForDiskEncryptionSet(&activeKey) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_KeyForDiskEncryptionSet() to populate field ActiveKey") + } + destination.ActiveKey = &activeKey + } else { + destination.ActiveKey = nil + } + + // AzureName + destination.AzureName = encryptionSet.AzureName + + // EncryptionType + if encryptionSet.EncryptionType != nil { + encryptionType := string(*encryptionSet.EncryptionType) + destination.EncryptionType = &encryptionType + } else { + destination.EncryptionType = nil + } + + // FederatedClientId + destination.FederatedClientId = genruntime.ClonePointerToString(encryptionSet.FederatedClientId) + + // FederatedClientIdFromConfig + if encryptionSet.FederatedClientIdFromConfig != nil { + federatedClientIdFromConfig := encryptionSet.FederatedClientIdFromConfig.Copy() + destination.FederatedClientIdFromConfig = &federatedClientIdFromConfig + } else { + destination.FederatedClientIdFromConfig = nil + } + + // Identity + if encryptionSet.Identity != nil { + var identity v20220702s.EncryptionSetIdentity + err := encryptionSet.Identity.AssignProperties_To_EncryptionSetIdentity(&identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionSetIdentity() to populate field Identity") + } + destination.Identity = &identity + } else { + destination.Identity = nil + } + + // Location + destination.Location = genruntime.ClonePointerToString(encryptionSet.Location) + + // OriginalVersion + destination.OriginalVersion = encryptionSet.OriginalVersion() + + // Owner + if encryptionSet.Owner != nil { + owner := encryptionSet.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // RotationToLatestKeyVersionEnabled + if encryptionSet.RotationToLatestKeyVersionEnabled != nil { + rotationToLatestKeyVersionEnabled := *encryptionSet.RotationToLatestKeyVersionEnabled + destination.RotationToLatestKeyVersionEnabled = &rotationToLatestKeyVersionEnabled + } else { + destination.RotationToLatestKeyVersionEnabled = nil + } + + // Tags + destination.Tags = genruntime.CloneMapOfStringToString(encryptionSet.Tags) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_DiskEncryptionSet_STATUS populates our DiskEncryptionSet_Spec from the provided source DiskEncryptionSet_STATUS +func (encryptionSet *DiskEncryptionSet_Spec) Initialize_From_DiskEncryptionSet_STATUS(source *DiskEncryptionSet_STATUS) error { + + // ActiveKey + if source.ActiveKey != nil { + var activeKey KeyForDiskEncryptionSet + err := activeKey.Initialize_From_KeyForDiskEncryptionSet_STATUS(source.ActiveKey) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_KeyForDiskEncryptionSet_STATUS() to populate field ActiveKey") + } + encryptionSet.ActiveKey = &activeKey + } else { + encryptionSet.ActiveKey = nil + } + + // EncryptionType + if source.EncryptionType != nil { + encryptionType := DiskEncryptionSetType(*source.EncryptionType) + encryptionSet.EncryptionType = &encryptionType + } else { + encryptionSet.EncryptionType = nil + } + + // FederatedClientId + encryptionSet.FederatedClientId = genruntime.ClonePointerToString(source.FederatedClientId) + + // Identity + if source.Identity != nil { + var identity EncryptionSetIdentity + err := identity.Initialize_From_EncryptionSetIdentity_STATUS(source.Identity) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_EncryptionSetIdentity_STATUS() to populate field Identity") + } + encryptionSet.Identity = &identity + } else { + encryptionSet.Identity = nil + } + + // Location + encryptionSet.Location = genruntime.ClonePointerToString(source.Location) + + // RotationToLatestKeyVersionEnabled + if source.RotationToLatestKeyVersionEnabled != nil { + rotationToLatestKeyVersionEnabled := *source.RotationToLatestKeyVersionEnabled + encryptionSet.RotationToLatestKeyVersionEnabled = &rotationToLatestKeyVersionEnabled + } else { + encryptionSet.RotationToLatestKeyVersionEnabled = nil + } + + // Tags + encryptionSet.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (encryptionSet *DiskEncryptionSet_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (encryptionSet *DiskEncryptionSet_Spec) SetAzureName(azureName string) { + encryptionSet.AzureName = azureName +} + +// disk encryption set resource. +type DiskEncryptionSet_STATUS struct { + // ActiveKey: The key vault key which is currently used by this disk encryption set. + ActiveKey *KeyForDiskEncryptionSet_STATUS `json:"activeKey,omitempty"` + + // AutoKeyRotationError: The error that was encountered during auto-key rotation. If an error is present, then auto-key + // rotation will not be attempted until the error on this disk encryption set is fixed. + AutoKeyRotationError *ApiError_STATUS `json:"autoKeyRotationError,omitempty"` + + // Conditions: The observed state of the resource + Conditions []conditions.Condition `json:"conditions,omitempty"` + + // EncryptionType: The type of key used to encrypt the data of the disk. + EncryptionType *DiskEncryptionSetType_STATUS `json:"encryptionType,omitempty"` + + // FederatedClientId: Multi-tenant application client id to access key vault in a different tenant. Setting the value to + // 'None' will clear the property. + FederatedClientId *string `json:"federatedClientId,omitempty"` + + // Id: Resource Id + Id *string `json:"id,omitempty"` + + // Identity: The managed identity for the disk encryption set. It should be given permission on the key vault before it can + // be used to encrypt disks. + Identity *EncryptionSetIdentity_STATUS `json:"identity,omitempty"` + + // LastKeyRotationTimestamp: The time when the active key of this disk encryption set was updated. + LastKeyRotationTimestamp *string `json:"lastKeyRotationTimestamp,omitempty"` + + // Location: Resource location + Location *string `json:"location,omitempty"` + + // Name: Resource name + Name *string `json:"name,omitempty"` + + // PreviousKeys: A readonly collection of key vault keys previously used by this disk encryption set while a key rotation + // is in progress. It will be empty if there is no ongoing key rotation. + PreviousKeys []KeyForDiskEncryptionSet_STATUS `json:"previousKeys,omitempty"` + + // ProvisioningState: The disk encryption set provisioning state. + ProvisioningState *string `json:"provisioningState,omitempty"` + + // RotationToLatestKeyVersionEnabled: Set this flag to true to enable auto-updating of this disk encryption set to the + // latest key version. + RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"` + + // Tags: Resource tags + Tags map[string]string `json:"tags,omitempty"` + + // Type: Resource type + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &DiskEncryptionSet_STATUS{} + +// ConvertStatusFrom populates our DiskEncryptionSet_STATUS from the provided source +func (encryptionSet *DiskEncryptionSet_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + src, ok := source.(*v20220702s.DiskEncryptionSet_STATUS) + if ok { + // Populate our instance from source + return encryptionSet.AssignProperties_From_DiskEncryptionSet_STATUS(src) + } + + // Convert to an intermediate form + src = &v20220702s.DiskEncryptionSet_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = encryptionSet.AssignProperties_From_DiskEncryptionSet_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil +} + +// ConvertStatusTo populates the provided destination from our DiskEncryptionSet_STATUS +func (encryptionSet *DiskEncryptionSet_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + dst, ok := destination.(*v20220702s.DiskEncryptionSet_STATUS) + if ok { + // Populate destination from our instance + return encryptionSet.AssignProperties_To_DiskEncryptionSet_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v20220702s.DiskEncryptionSet_STATUS{} + err := encryptionSet.AssignProperties_To_DiskEncryptionSet_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +var _ genruntime.FromARMConverter = &DiskEncryptionSet_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (encryptionSet *DiskEncryptionSet_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &DiskEncryptionSet_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (encryptionSet *DiskEncryptionSet_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(DiskEncryptionSet_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected DiskEncryptionSet_STATUS_ARM, got %T", armInput) + } + + // Set property "ActiveKey": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ActiveKey != nil { + var activeKey1 KeyForDiskEncryptionSet_STATUS + err := activeKey1.PopulateFromARM(owner, *typedInput.Properties.ActiveKey) + if err != nil { + return err + } + activeKey := activeKey1 + encryptionSet.ActiveKey = &activeKey + } + } + + // Set property "AutoKeyRotationError": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AutoKeyRotationError != nil { + var autoKeyRotationError1 ApiError_STATUS + err := autoKeyRotationError1.PopulateFromARM(owner, *typedInput.Properties.AutoKeyRotationError) + if err != nil { + return err + } + autoKeyRotationError := autoKeyRotationError1 + encryptionSet.AutoKeyRotationError = &autoKeyRotationError + } + } + + // no assignment for property "Conditions" + + // Set property "EncryptionType": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.EncryptionType != nil { + encryptionType := *typedInput.Properties.EncryptionType + encryptionSet.EncryptionType = &encryptionType + } + } + + // Set property "FederatedClientId": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.FederatedClientId != nil { + federatedClientId := *typedInput.Properties.FederatedClientId + encryptionSet.FederatedClientId = &federatedClientId + } + } + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + encryptionSet.Id = &id + } + + // Set property "Identity": + if typedInput.Identity != nil { + var identity1 EncryptionSetIdentity_STATUS + err := identity1.PopulateFromARM(owner, *typedInput.Identity) + if err != nil { + return err + } + identity := identity1 + encryptionSet.Identity = &identity + } + + // Set property "LastKeyRotationTimestamp": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.LastKeyRotationTimestamp != nil { + lastKeyRotationTimestamp := *typedInput.Properties.LastKeyRotationTimestamp + encryptionSet.LastKeyRotationTimestamp = &lastKeyRotationTimestamp + } + } + + // Set property "Location": + if typedInput.Location != nil { + location := *typedInput.Location + encryptionSet.Location = &location + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + encryptionSet.Name = &name + } + + // Set property "PreviousKeys": + // copying flattened property: + if typedInput.Properties != nil { + for _, item := range typedInput.Properties.PreviousKeys { + var item1 KeyForDiskEncryptionSet_STATUS + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + encryptionSet.PreviousKeys = append(encryptionSet.PreviousKeys, item1) + } + } + + // Set property "ProvisioningState": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ProvisioningState != nil { + provisioningState := *typedInput.Properties.ProvisioningState + encryptionSet.ProvisioningState = &provisioningState + } + } + + // Set property "RotationToLatestKeyVersionEnabled": + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.RotationToLatestKeyVersionEnabled != nil { + rotationToLatestKeyVersionEnabled := *typedInput.Properties.RotationToLatestKeyVersionEnabled + encryptionSet.RotationToLatestKeyVersionEnabled = &rotationToLatestKeyVersionEnabled + } + } + + // Set property "Tags": + if typedInput.Tags != nil { + encryptionSet.Tags = make(map[string]string, len(typedInput.Tags)) + for key, value := range typedInput.Tags { + encryptionSet.Tags[key] = value + } + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + encryptionSet.Type = &typeVar + } + + // No error + return nil +} + +// AssignProperties_From_DiskEncryptionSet_STATUS populates our DiskEncryptionSet_STATUS from the provided source DiskEncryptionSet_STATUS +func (encryptionSet *DiskEncryptionSet_STATUS) AssignProperties_From_DiskEncryptionSet_STATUS(source *v20220702s.DiskEncryptionSet_STATUS) error { + + // ActiveKey + if source.ActiveKey != nil { + var activeKey KeyForDiskEncryptionSet_STATUS + err := activeKey.AssignProperties_From_KeyForDiskEncryptionSet_STATUS(source.ActiveKey) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_KeyForDiskEncryptionSet_STATUS() to populate field ActiveKey") + } + encryptionSet.ActiveKey = &activeKey + } else { + encryptionSet.ActiveKey = nil + } + + // AutoKeyRotationError + if source.AutoKeyRotationError != nil { + var autoKeyRotationError ApiError_STATUS + err := autoKeyRotationError.AssignProperties_From_ApiError_STATUS(source.AutoKeyRotationError) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ApiError_STATUS() to populate field AutoKeyRotationError") + } + encryptionSet.AutoKeyRotationError = &autoKeyRotationError + } else { + encryptionSet.AutoKeyRotationError = nil + } + + // Conditions + encryptionSet.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // EncryptionType + if source.EncryptionType != nil { + encryptionType := DiskEncryptionSetType_STATUS(*source.EncryptionType) + encryptionSet.EncryptionType = &encryptionType + } else { + encryptionSet.EncryptionType = nil + } + + // FederatedClientId + encryptionSet.FederatedClientId = genruntime.ClonePointerToString(source.FederatedClientId) + + // Id + encryptionSet.Id = genruntime.ClonePointerToString(source.Id) + + // Identity + if source.Identity != nil { + var identity EncryptionSetIdentity_STATUS + err := identity.AssignProperties_From_EncryptionSetIdentity_STATUS(source.Identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionSetIdentity_STATUS() to populate field Identity") + } + encryptionSet.Identity = &identity + } else { + encryptionSet.Identity = nil + } + + // LastKeyRotationTimestamp + encryptionSet.LastKeyRotationTimestamp = genruntime.ClonePointerToString(source.LastKeyRotationTimestamp) + + // Location + encryptionSet.Location = genruntime.ClonePointerToString(source.Location) + + // Name + encryptionSet.Name = genruntime.ClonePointerToString(source.Name) + + // PreviousKeys + if source.PreviousKeys != nil { + previousKeyList := make([]KeyForDiskEncryptionSet_STATUS, len(source.PreviousKeys)) + for previousKeyIndex, previousKeyItem := range source.PreviousKeys { + // Shadow the loop variable to avoid aliasing + previousKeyItem := previousKeyItem + var previousKey KeyForDiskEncryptionSet_STATUS + err := previousKey.AssignProperties_From_KeyForDiskEncryptionSet_STATUS(&previousKeyItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_KeyForDiskEncryptionSet_STATUS() to populate field PreviousKeys") + } + previousKeyList[previousKeyIndex] = previousKey + } + encryptionSet.PreviousKeys = previousKeyList + } else { + encryptionSet.PreviousKeys = nil + } + + // ProvisioningState + encryptionSet.ProvisioningState = genruntime.ClonePointerToString(source.ProvisioningState) + + // RotationToLatestKeyVersionEnabled + if source.RotationToLatestKeyVersionEnabled != nil { + rotationToLatestKeyVersionEnabled := *source.RotationToLatestKeyVersionEnabled + encryptionSet.RotationToLatestKeyVersionEnabled = &rotationToLatestKeyVersionEnabled + } else { + encryptionSet.RotationToLatestKeyVersionEnabled = nil + } + + // Tags + encryptionSet.Tags = genruntime.CloneMapOfStringToString(source.Tags) + + // Type + encryptionSet.Type = genruntime.ClonePointerToString(source.Type) + + // No error + return nil +} + +// AssignProperties_To_DiskEncryptionSet_STATUS populates the provided destination DiskEncryptionSet_STATUS from our DiskEncryptionSet_STATUS +func (encryptionSet *DiskEncryptionSet_STATUS) AssignProperties_To_DiskEncryptionSet_STATUS(destination *v20220702s.DiskEncryptionSet_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ActiveKey + if encryptionSet.ActiveKey != nil { + var activeKey v20220702s.KeyForDiskEncryptionSet_STATUS + err := encryptionSet.ActiveKey.AssignProperties_To_KeyForDiskEncryptionSet_STATUS(&activeKey) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_KeyForDiskEncryptionSet_STATUS() to populate field ActiveKey") + } + destination.ActiveKey = &activeKey + } else { + destination.ActiveKey = nil + } + + // AutoKeyRotationError + if encryptionSet.AutoKeyRotationError != nil { + var autoKeyRotationError v20220702s.ApiError_STATUS + err := encryptionSet.AutoKeyRotationError.AssignProperties_To_ApiError_STATUS(&autoKeyRotationError) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ApiError_STATUS() to populate field AutoKeyRotationError") + } + destination.AutoKeyRotationError = &autoKeyRotationError + } else { + destination.AutoKeyRotationError = nil + } + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(encryptionSet.Conditions) + + // EncryptionType + if encryptionSet.EncryptionType != nil { + encryptionType := string(*encryptionSet.EncryptionType) + destination.EncryptionType = &encryptionType + } else { + destination.EncryptionType = nil + } + + // FederatedClientId + destination.FederatedClientId = genruntime.ClonePointerToString(encryptionSet.FederatedClientId) + + // Id + destination.Id = genruntime.ClonePointerToString(encryptionSet.Id) + + // Identity + if encryptionSet.Identity != nil { + var identity v20220702s.EncryptionSetIdentity_STATUS + err := encryptionSet.Identity.AssignProperties_To_EncryptionSetIdentity_STATUS(&identity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionSetIdentity_STATUS() to populate field Identity") + } + destination.Identity = &identity + } else { + destination.Identity = nil + } + + // LastKeyRotationTimestamp + destination.LastKeyRotationTimestamp = genruntime.ClonePointerToString(encryptionSet.LastKeyRotationTimestamp) + + // Location + destination.Location = genruntime.ClonePointerToString(encryptionSet.Location) + + // Name + destination.Name = genruntime.ClonePointerToString(encryptionSet.Name) + + // PreviousKeys + if encryptionSet.PreviousKeys != nil { + previousKeyList := make([]v20220702s.KeyForDiskEncryptionSet_STATUS, len(encryptionSet.PreviousKeys)) + for previousKeyIndex, previousKeyItem := range encryptionSet.PreviousKeys { + // Shadow the loop variable to avoid aliasing + previousKeyItem := previousKeyItem + var previousKey v20220702s.KeyForDiskEncryptionSet_STATUS + err := previousKeyItem.AssignProperties_To_KeyForDiskEncryptionSet_STATUS(&previousKey) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_KeyForDiskEncryptionSet_STATUS() to populate field PreviousKeys") + } + previousKeyList[previousKeyIndex] = previousKey + } + destination.PreviousKeys = previousKeyList + } else { + destination.PreviousKeys = nil + } + + // ProvisioningState + destination.ProvisioningState = genruntime.ClonePointerToString(encryptionSet.ProvisioningState) + + // RotationToLatestKeyVersionEnabled + if encryptionSet.RotationToLatestKeyVersionEnabled != nil { + rotationToLatestKeyVersionEnabled := *encryptionSet.RotationToLatestKeyVersionEnabled + destination.RotationToLatestKeyVersionEnabled = &rotationToLatestKeyVersionEnabled + } else { + destination.RotationToLatestKeyVersionEnabled = nil + } + + // Tags + destination.Tags = genruntime.CloneMapOfStringToString(encryptionSet.Tags) + + // Type + destination.Type = genruntime.ClonePointerToString(encryptionSet.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Api error. +type ApiError_STATUS struct { + // Code: The error code. + Code *string `json:"code,omitempty"` + + // Details: The Api error details + Details []ApiErrorBase_STATUS `json:"details,omitempty"` + + // Innererror: The Api inner error + Innererror *InnerError_STATUS `json:"innererror,omitempty"` + + // Message: The error message. + Message *string `json:"message,omitempty"` + + // Target: The target of the particular error. + Target *string `json:"target,omitempty"` +} + +var _ genruntime.FromARMConverter = &ApiError_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (error *ApiError_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ApiError_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (error *ApiError_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ApiError_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ApiError_STATUS_ARM, got %T", armInput) + } + + // Set property "Code": + if typedInput.Code != nil { + code := *typedInput.Code + error.Code = &code + } + + // Set property "Details": + for _, item := range typedInput.Details { + var item1 ApiErrorBase_STATUS + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + error.Details = append(error.Details, item1) + } + + // Set property "Innererror": + if typedInput.Innererror != nil { + var innererror1 InnerError_STATUS + err := innererror1.PopulateFromARM(owner, *typedInput.Innererror) + if err != nil { + return err + } + innererror := innererror1 + error.Innererror = &innererror + } + + // Set property "Message": + if typedInput.Message != nil { + message := *typedInput.Message + error.Message = &message + } + + // Set property "Target": + if typedInput.Target != nil { + target := *typedInput.Target + error.Target = &target + } + + // No error + return nil +} + +// 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 { + + // 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 { + // Shadow the loop variable to avoid aliasing + detailItem := detailItem + var detail ApiErrorBase_STATUS + err := detail.AssignProperties_From_ApiErrorBase_STATUS(&detailItem) + if err != nil { + return errors.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 errors.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) + + // 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 { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // 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 { + // Shadow the loop variable to avoid aliasing + detailItem := detailItem + var detail v20220702s.ApiErrorBase_STATUS + err := detailItem.AssignProperties_To_ApiErrorBase_STATUS(&detail) + if err != nil { + return errors.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 errors.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 + } + + // No error + return nil +} + +// The type of key used to encrypt the data of the disk. +// +kubebuilder:validation:Enum={"ConfidentialVmEncryptedWithCustomerKey","EncryptionAtRestWithCustomerKey","EncryptionAtRestWithPlatformAndCustomerKeys"} +type DiskEncryptionSetType string + +const ( + DiskEncryptionSetType_ConfidentialVmEncryptedWithCustomerKey = DiskEncryptionSetType("ConfidentialVmEncryptedWithCustomerKey") + DiskEncryptionSetType_EncryptionAtRestWithCustomerKey = DiskEncryptionSetType("EncryptionAtRestWithCustomerKey") + DiskEncryptionSetType_EncryptionAtRestWithPlatformAndCustomerKeys = DiskEncryptionSetType("EncryptionAtRestWithPlatformAndCustomerKeys") +) + +// The type of key used to encrypt the data of the disk. +type DiskEncryptionSetType_STATUS string + +const ( + DiskEncryptionSetType_STATUS_ConfidentialVmEncryptedWithCustomerKey = DiskEncryptionSetType_STATUS("ConfidentialVmEncryptedWithCustomerKey") + DiskEncryptionSetType_STATUS_EncryptionAtRestWithCustomerKey = DiskEncryptionSetType_STATUS("EncryptionAtRestWithCustomerKey") + DiskEncryptionSetType_STATUS_EncryptionAtRestWithPlatformAndCustomerKeys = DiskEncryptionSetType_STATUS("EncryptionAtRestWithPlatformAndCustomerKeys") +) + +// The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used +// to encrypt disks. +type EncryptionSetIdentity struct { + // Type: The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. + // Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active + // Directory tenant; it will cause the encrypted resources to lose access to the keys. + Type *EncryptionSetIdentity_Type `json:"type,omitempty"` + + // UserAssignedIdentities: The list of user identities associated with the disk encryption set. The user identity + // dictionary key references will be ARM resource ids in the form: + // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + UserAssignedIdentities []UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"` +} + +var _ genruntime.ARMTransformer = &EncryptionSetIdentity{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (identity *EncryptionSetIdentity) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if identity == nil { + return nil, nil + } + result := &EncryptionSetIdentity_ARM{} + + // Set property "Type": + if identity.Type != nil { + typeVar := *identity.Type + result.Type = &typeVar + } + + // Set property "UserAssignedIdentities": + result.UserAssignedIdentities = make(map[string]UserAssignedIdentityDetails_ARM, len(identity.UserAssignedIdentities)) + for _, ident := range identity.UserAssignedIdentities { + identARMID, err := resolved.ResolvedReferences.Lookup(ident.Reference) + if err != nil { + return nil, err + } + key := identARMID + result.UserAssignedIdentities[key] = UserAssignedIdentityDetails_ARM{} + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (identity *EncryptionSetIdentity) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &EncryptionSetIdentity_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (identity *EncryptionSetIdentity) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(EncryptionSetIdentity_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected EncryptionSetIdentity_ARM, got %T", armInput) + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + identity.Type = &typeVar + } + + // no assignment for property "UserAssignedIdentities" + + // No error + return nil +} + +// AssignProperties_From_EncryptionSetIdentity populates our EncryptionSetIdentity from the provided source EncryptionSetIdentity +func (identity *EncryptionSetIdentity) AssignProperties_From_EncryptionSetIdentity(source *v20220702s.EncryptionSetIdentity) error { + + // Type + if source.Type != nil { + typeVar := EncryptionSetIdentity_Type(*source.Type) + identity.Type = &typeVar + } else { + identity.Type = nil + } + + // UserAssignedIdentities + if source.UserAssignedIdentities != nil { + userAssignedIdentityList := make([]UserAssignedIdentityDetails, len(source.UserAssignedIdentities)) + for userAssignedIdentityIndex, userAssignedIdentityItem := range source.UserAssignedIdentities { + // Shadow the loop variable to avoid aliasing + userAssignedIdentityItem := userAssignedIdentityItem + var userAssignedIdentity UserAssignedIdentityDetails + err := userAssignedIdentity.AssignProperties_From_UserAssignedIdentityDetails(&userAssignedIdentityItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_UserAssignedIdentityDetails() to populate field UserAssignedIdentities") + } + userAssignedIdentityList[userAssignedIdentityIndex] = userAssignedIdentity + } + identity.UserAssignedIdentities = userAssignedIdentityList + } else { + identity.UserAssignedIdentities = nil + } + + // No error + return nil +} + +// AssignProperties_To_EncryptionSetIdentity populates the provided destination EncryptionSetIdentity from our EncryptionSetIdentity +func (identity *EncryptionSetIdentity) AssignProperties_To_EncryptionSetIdentity(destination *v20220702s.EncryptionSetIdentity) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Type + if identity.Type != nil { + typeVar := string(*identity.Type) + destination.Type = &typeVar + } else { + destination.Type = nil + } + + // UserAssignedIdentities + if identity.UserAssignedIdentities != nil { + userAssignedIdentityList := make([]v20220702s.UserAssignedIdentityDetails, len(identity.UserAssignedIdentities)) + for userAssignedIdentityIndex, userAssignedIdentityItem := range identity.UserAssignedIdentities { + // Shadow the loop variable to avoid aliasing + userAssignedIdentityItem := userAssignedIdentityItem + var userAssignedIdentity v20220702s.UserAssignedIdentityDetails + err := userAssignedIdentityItem.AssignProperties_To_UserAssignedIdentityDetails(&userAssignedIdentity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_UserAssignedIdentityDetails() to populate field UserAssignedIdentities") + } + userAssignedIdentityList[userAssignedIdentityIndex] = userAssignedIdentity + } + destination.UserAssignedIdentities = userAssignedIdentityList + } else { + destination.UserAssignedIdentities = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_EncryptionSetIdentity_STATUS populates our EncryptionSetIdentity from the provided source EncryptionSetIdentity_STATUS +func (identity *EncryptionSetIdentity) Initialize_From_EncryptionSetIdentity_STATUS(source *EncryptionSetIdentity_STATUS) error { + + // Type + if source.Type != nil { + typeVar := EncryptionSetIdentity_Type(*source.Type) + identity.Type = &typeVar + } else { + identity.Type = nil + } + + // UserAssignedIdentities + if source.UserAssignedIdentities != nil { + userAssignedIdentityList := make([]UserAssignedIdentityDetails, 0, len(source.UserAssignedIdentities)) + for userAssignedIdentitiesKey := range source.UserAssignedIdentities { + userAssignedIdentitiesRef := genruntime.CreateResourceReferenceFromARMID(userAssignedIdentitiesKey) + userAssignedIdentityList = append(userAssignedIdentityList, UserAssignedIdentityDetails{Reference: userAssignedIdentitiesRef}) + } + identity.UserAssignedIdentities = userAssignedIdentityList + } else { + identity.UserAssignedIdentities = nil + } + + // No error + return nil +} + +// The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used +// to encrypt disks. +type EncryptionSetIdentity_STATUS struct { + // PrincipalId: The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the + // x-ms-identity-principal-id header in the PUT request if the resource has a systemAssigned(implicit) identity + PrincipalId *string `json:"principalId,omitempty"` + + // TenantId: The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the + // x-ms-client-tenant-id header in the PUT request if the resource has a systemAssigned(implicit) identity + TenantId *string `json:"tenantId,omitempty"` + + // Type: The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. + // Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active + // Directory tenant; it will cause the encrypted resources to lose access to the keys. + Type *EncryptionSetIdentity_Type_STATUS `json:"type,omitempty"` + + // UserAssignedIdentities: The list of user identities associated with the disk encryption set. The user identity + // dictionary key references will be ARM resource ids in the form: + // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + UserAssignedIdentities map[string]EncryptionSetIdentity_UserAssignedIdentities_STATUS `json:"userAssignedIdentities,omitempty"` +} + +var _ genruntime.FromARMConverter = &EncryptionSetIdentity_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (identity *EncryptionSetIdentity_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &EncryptionSetIdentity_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (identity *EncryptionSetIdentity_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(EncryptionSetIdentity_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected EncryptionSetIdentity_STATUS_ARM, got %T", armInput) + } + + // Set property "PrincipalId": + if typedInput.PrincipalId != nil { + principalId := *typedInput.PrincipalId + identity.PrincipalId = &principalId + } + + // Set property "TenantId": + if typedInput.TenantId != nil { + tenantId := *typedInput.TenantId + identity.TenantId = &tenantId + } + + // Set property "Type": + if typedInput.Type != nil { + typeVar := *typedInput.Type + identity.Type = &typeVar + } + + // Set property "UserAssignedIdentities": + if typedInput.UserAssignedIdentities != nil { + identity.UserAssignedIdentities = make(map[string]EncryptionSetIdentity_UserAssignedIdentities_STATUS, len(typedInput.UserAssignedIdentities)) + for key, value := range typedInput.UserAssignedIdentities { + var value1 EncryptionSetIdentity_UserAssignedIdentities_STATUS + err := value1.PopulateFromARM(owner, value) + if err != nil { + return err + } + identity.UserAssignedIdentities[key] = value1 + } + } + + // No error + return nil +} + +// AssignProperties_From_EncryptionSetIdentity_STATUS populates our EncryptionSetIdentity_STATUS from the provided source EncryptionSetIdentity_STATUS +func (identity *EncryptionSetIdentity_STATUS) AssignProperties_From_EncryptionSetIdentity_STATUS(source *v20220702s.EncryptionSetIdentity_STATUS) error { + + // PrincipalId + identity.PrincipalId = genruntime.ClonePointerToString(source.PrincipalId) + + // TenantId + identity.TenantId = genruntime.ClonePointerToString(source.TenantId) + + // Type + if source.Type != nil { + typeVar := EncryptionSetIdentity_Type_STATUS(*source.Type) + identity.Type = &typeVar + } else { + identity.Type = nil + } + + // UserAssignedIdentities + if source.UserAssignedIdentities != nil { + userAssignedIdentityMap := make(map[string]EncryptionSetIdentity_UserAssignedIdentities_STATUS, len(source.UserAssignedIdentities)) + for userAssignedIdentityKey, userAssignedIdentityValue := range source.UserAssignedIdentities { + // Shadow the loop variable to avoid aliasing + userAssignedIdentityValue := userAssignedIdentityValue + var userAssignedIdentity EncryptionSetIdentity_UserAssignedIdentities_STATUS + err := userAssignedIdentity.AssignProperties_From_EncryptionSetIdentity_UserAssignedIdentities_STATUS(&userAssignedIdentityValue) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_EncryptionSetIdentity_UserAssignedIdentities_STATUS() to populate field UserAssignedIdentities") + } + userAssignedIdentityMap[userAssignedIdentityKey] = userAssignedIdentity + } + identity.UserAssignedIdentities = userAssignedIdentityMap + } else { + identity.UserAssignedIdentities = nil + } + + // No error + return nil +} + +// AssignProperties_To_EncryptionSetIdentity_STATUS populates the provided destination EncryptionSetIdentity_STATUS from our EncryptionSetIdentity_STATUS +func (identity *EncryptionSetIdentity_STATUS) AssignProperties_To_EncryptionSetIdentity_STATUS(destination *v20220702s.EncryptionSetIdentity_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // PrincipalId + destination.PrincipalId = genruntime.ClonePointerToString(identity.PrincipalId) + + // TenantId + destination.TenantId = genruntime.ClonePointerToString(identity.TenantId) + + // Type + if identity.Type != nil { + typeVar := string(*identity.Type) + destination.Type = &typeVar + } else { + destination.Type = nil + } + + // UserAssignedIdentities + if identity.UserAssignedIdentities != nil { + userAssignedIdentityMap := make(map[string]v20220702s.EncryptionSetIdentity_UserAssignedIdentities_STATUS, len(identity.UserAssignedIdentities)) + for userAssignedIdentityKey, userAssignedIdentityValue := range identity.UserAssignedIdentities { + // Shadow the loop variable to avoid aliasing + userAssignedIdentityValue := userAssignedIdentityValue + var userAssignedIdentity v20220702s.EncryptionSetIdentity_UserAssignedIdentities_STATUS + err := userAssignedIdentityValue.AssignProperties_To_EncryptionSetIdentity_UserAssignedIdentities_STATUS(&userAssignedIdentity) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_EncryptionSetIdentity_UserAssignedIdentities_STATUS() to populate field UserAssignedIdentities") + } + userAssignedIdentityMap[userAssignedIdentityKey] = userAssignedIdentity + } + destination.UserAssignedIdentities = userAssignedIdentityMap + } else { + destination.UserAssignedIdentities = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots +type KeyForDiskEncryptionSet struct { + // KeyUrl: Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of + // rotationToLatestKeyVersionEnabled value. + KeyUrl *string `json:"keyUrl,omitempty" optionalConfigMapPair:"KeyUrl"` + + // KeyUrlFromConfig: Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required + // regardless of rotationToLatestKeyVersionEnabled value. + KeyUrlFromConfig *genruntime.ConfigMapReference `json:"keyUrlFromConfig,omitempty" optionalConfigMapPair:"KeyUrl"` + + // SourceVault: Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if + // the KeyVault subscription is not the same as the Disk Encryption Set subscription. + SourceVault *SourceVault `json:"sourceVault,omitempty"` +} + +var _ genruntime.ARMTransformer = &KeyForDiskEncryptionSet{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (encryptionSet *KeyForDiskEncryptionSet) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if encryptionSet == nil { + return nil, nil + } + result := &KeyForDiskEncryptionSet_ARM{} + + // Set property "KeyUrl": + if encryptionSet.KeyUrl != nil { + keyUrl := *encryptionSet.KeyUrl + result.KeyUrl = &keyUrl + } + if encryptionSet.KeyUrlFromConfig != nil { + keyUrlValue, err := resolved.ResolvedConfigMaps.Lookup(*encryptionSet.KeyUrlFromConfig) + if err != nil { + return nil, errors.Wrap(err, "looking up configmap for property KeyUrl") + } + keyUrl := keyUrlValue + result.KeyUrl = &keyUrl + } + + // Set property "SourceVault": + if encryptionSet.SourceVault != nil { + sourceVault_ARM, err := (*encryptionSet.SourceVault).ConvertToARM(resolved) + if err != nil { + return nil, err + } + sourceVault := *sourceVault_ARM.(*SourceVault_ARM) + result.SourceVault = &sourceVault + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (encryptionSet *KeyForDiskEncryptionSet) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &KeyForDiskEncryptionSet_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (encryptionSet *KeyForDiskEncryptionSet) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(KeyForDiskEncryptionSet_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected KeyForDiskEncryptionSet_ARM, got %T", armInput) + } + + // Set property "KeyUrl": + if typedInput.KeyUrl != nil { + keyUrl := *typedInput.KeyUrl + encryptionSet.KeyUrl = &keyUrl + } + + // no assignment for property "KeyUrlFromConfig" + + // Set property "SourceVault": + if typedInput.SourceVault != nil { + var sourceVault1 SourceVault + err := sourceVault1.PopulateFromARM(owner, *typedInput.SourceVault) + if err != nil { + return err + } + sourceVault := sourceVault1 + encryptionSet.SourceVault = &sourceVault + } + + // No error + return nil +} + +// AssignProperties_From_KeyForDiskEncryptionSet populates our KeyForDiskEncryptionSet from the provided source KeyForDiskEncryptionSet +func (encryptionSet *KeyForDiskEncryptionSet) AssignProperties_From_KeyForDiskEncryptionSet(source *v20220702s.KeyForDiskEncryptionSet) error { + + // KeyUrl + encryptionSet.KeyUrl = genruntime.ClonePointerToString(source.KeyUrl) + + // KeyUrlFromConfig + if source.KeyUrlFromConfig != nil { + keyUrlFromConfig := source.KeyUrlFromConfig.Copy() + encryptionSet.KeyUrlFromConfig = &keyUrlFromConfig + } else { + encryptionSet.KeyUrlFromConfig = nil + } + + // SourceVault + if source.SourceVault != nil { + var sourceVault SourceVault + err := sourceVault.AssignProperties_From_SourceVault(source.SourceVault) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_SourceVault() to populate field SourceVault") + } + encryptionSet.SourceVault = &sourceVault + } else { + encryptionSet.SourceVault = nil + } + + // No error + return nil +} + +// AssignProperties_To_KeyForDiskEncryptionSet populates the provided destination KeyForDiskEncryptionSet from our KeyForDiskEncryptionSet +func (encryptionSet *KeyForDiskEncryptionSet) AssignProperties_To_KeyForDiskEncryptionSet(destination *v20220702s.KeyForDiskEncryptionSet) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // KeyUrl + destination.KeyUrl = genruntime.ClonePointerToString(encryptionSet.KeyUrl) + + // KeyUrlFromConfig + if encryptionSet.KeyUrlFromConfig != nil { + keyUrlFromConfig := encryptionSet.KeyUrlFromConfig.Copy() + destination.KeyUrlFromConfig = &keyUrlFromConfig + } else { + destination.KeyUrlFromConfig = nil + } + + // SourceVault + if encryptionSet.SourceVault != nil { + var sourceVault v20220702s.SourceVault + err := encryptionSet.SourceVault.AssignProperties_To_SourceVault(&sourceVault) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_SourceVault() to populate field SourceVault") + } + destination.SourceVault = &sourceVault + } else { + destination.SourceVault = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_KeyForDiskEncryptionSet_STATUS populates our KeyForDiskEncryptionSet from the provided source KeyForDiskEncryptionSet_STATUS +func (encryptionSet *KeyForDiskEncryptionSet) Initialize_From_KeyForDiskEncryptionSet_STATUS(source *KeyForDiskEncryptionSet_STATUS) error { + + // KeyUrl + encryptionSet.KeyUrl = genruntime.ClonePointerToString(source.KeyUrl) + + // SourceVault + if source.SourceVault != nil { + var sourceVault SourceVault + err := sourceVault.Initialize_From_SourceVault_STATUS(source.SourceVault) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_SourceVault_STATUS() to populate field SourceVault") + } + encryptionSet.SourceVault = &sourceVault + } else { + encryptionSet.SourceVault = nil + } + + // No error + return nil +} + +// Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots +type KeyForDiskEncryptionSet_STATUS struct { + // KeyUrl: Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of + // rotationToLatestKeyVersionEnabled value. + KeyUrl *string `json:"keyUrl,omitempty"` + + // SourceVault: Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if + // the KeyVault subscription is not the same as the Disk Encryption Set subscription. + SourceVault *SourceVault_STATUS `json:"sourceVault,omitempty"` +} + +var _ genruntime.FromARMConverter = &KeyForDiskEncryptionSet_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (encryptionSet *KeyForDiskEncryptionSet_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &KeyForDiskEncryptionSet_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (encryptionSet *KeyForDiskEncryptionSet_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(KeyForDiskEncryptionSet_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected KeyForDiskEncryptionSet_STATUS_ARM, got %T", armInput) + } + + // Set property "KeyUrl": + if typedInput.KeyUrl != nil { + keyUrl := *typedInput.KeyUrl + encryptionSet.KeyUrl = &keyUrl + } + + // Set property "SourceVault": + if typedInput.SourceVault != nil { + var sourceVault1 SourceVault_STATUS + err := sourceVault1.PopulateFromARM(owner, *typedInput.SourceVault) + if err != nil { + return err + } + sourceVault := sourceVault1 + encryptionSet.SourceVault = &sourceVault + } + + // No error + return nil +} + +// AssignProperties_From_KeyForDiskEncryptionSet_STATUS populates our KeyForDiskEncryptionSet_STATUS from the provided source KeyForDiskEncryptionSet_STATUS +func (encryptionSet *KeyForDiskEncryptionSet_STATUS) AssignProperties_From_KeyForDiskEncryptionSet_STATUS(source *v20220702s.KeyForDiskEncryptionSet_STATUS) error { + + // KeyUrl + encryptionSet.KeyUrl = genruntime.ClonePointerToString(source.KeyUrl) + + // SourceVault + if source.SourceVault != nil { + var sourceVault SourceVault_STATUS + err := sourceVault.AssignProperties_From_SourceVault_STATUS(source.SourceVault) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_SourceVault_STATUS() to populate field SourceVault") + } + encryptionSet.SourceVault = &sourceVault + } else { + encryptionSet.SourceVault = nil + } + + // No error + return nil +} + +// AssignProperties_To_KeyForDiskEncryptionSet_STATUS populates the provided destination KeyForDiskEncryptionSet_STATUS from our KeyForDiskEncryptionSet_STATUS +func (encryptionSet *KeyForDiskEncryptionSet_STATUS) AssignProperties_To_KeyForDiskEncryptionSet_STATUS(destination *v20220702s.KeyForDiskEncryptionSet_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // KeyUrl + destination.KeyUrl = genruntime.ClonePointerToString(encryptionSet.KeyUrl) + + // SourceVault + if encryptionSet.SourceVault != nil { + var sourceVault v20220702s.SourceVault_STATUS + err := encryptionSet.SourceVault.AssignProperties_To_SourceVault_STATUS(&sourceVault) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_SourceVault_STATUS() to populate field SourceVault") + } + destination.SourceVault = &sourceVault + } else { + destination.SourceVault = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Api error base. +type ApiErrorBase_STATUS struct { + // Code: The error code. + Code *string `json:"code,omitempty"` + + // Message: The error message. + Message *string `json:"message,omitempty"` + + // Target: The target of the particular error. + Target *string `json:"target,omitempty"` +} + +var _ genruntime.FromARMConverter = &ApiErrorBase_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (base *ApiErrorBase_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ApiErrorBase_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (base *ApiErrorBase_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ApiErrorBase_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ApiErrorBase_STATUS_ARM, got %T", armInput) + } + + // Set property "Code": + if typedInput.Code != nil { + code := *typedInput.Code + base.Code = &code + } + + // Set property "Message": + if typedInput.Message != nil { + message := *typedInput.Message + base.Message = &message + } + + // Set property "Target": + if typedInput.Target != nil { + target := *typedInput.Target + base.Target = &target + } + + // No error + return nil +} + +// 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 { + + // Code + base.Code = genruntime.ClonePointerToString(source.Code) + + // Message + base.Message = genruntime.ClonePointerToString(source.Message) + + // Target + base.Target = genruntime.ClonePointerToString(source.Target) + + // 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 { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // 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 + } + + // No error + return nil +} + +type EncryptionSetIdentity_UserAssignedIdentities_STATUS struct { + // ClientId: The client id of user assigned identity. + ClientId *string `json:"clientId,omitempty"` + + // PrincipalId: The principal id of user assigned identity. + PrincipalId *string `json:"principalId,omitempty"` +} + +var _ genruntime.FromARMConverter = &EncryptionSetIdentity_UserAssignedIdentities_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (identities *EncryptionSetIdentity_UserAssignedIdentities_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (identities *EncryptionSetIdentity_UserAssignedIdentities_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM, got %T", armInput) + } + + // Set property "ClientId": + if typedInput.ClientId != nil { + clientId := *typedInput.ClientId + identities.ClientId = &clientId + } + + // Set property "PrincipalId": + if typedInput.PrincipalId != nil { + principalId := *typedInput.PrincipalId + identities.PrincipalId = &principalId + } + + // No error + return nil +} + +// AssignProperties_From_EncryptionSetIdentity_UserAssignedIdentities_STATUS populates our EncryptionSetIdentity_UserAssignedIdentities_STATUS from the provided source EncryptionSetIdentity_UserAssignedIdentities_STATUS +func (identities *EncryptionSetIdentity_UserAssignedIdentities_STATUS) AssignProperties_From_EncryptionSetIdentity_UserAssignedIdentities_STATUS(source *v20220702s.EncryptionSetIdentity_UserAssignedIdentities_STATUS) error { + + // ClientId + identities.ClientId = genruntime.ClonePointerToString(source.ClientId) + + // PrincipalId + identities.PrincipalId = genruntime.ClonePointerToString(source.PrincipalId) + + // No error + return nil +} + +// AssignProperties_To_EncryptionSetIdentity_UserAssignedIdentities_STATUS populates the provided destination EncryptionSetIdentity_UserAssignedIdentities_STATUS from our EncryptionSetIdentity_UserAssignedIdentities_STATUS +func (identities *EncryptionSetIdentity_UserAssignedIdentities_STATUS) AssignProperties_To_EncryptionSetIdentity_UserAssignedIdentities_STATUS(destination *v20220702s.EncryptionSetIdentity_UserAssignedIdentities_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // ClientId + destination.ClientId = genruntime.ClonePointerToString(identities.ClientId) + + // PrincipalId + destination.PrincipalId = genruntime.ClonePointerToString(identities.PrincipalId) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Inner error details. +type InnerError_STATUS struct { + // Errordetail: The internal error message or exception dump. + Errordetail *string `json:"errordetail,omitempty"` + + // Exceptiontype: The exception type. + Exceptiontype *string `json:"exceptiontype,omitempty"` +} + +var _ genruntime.FromARMConverter = &InnerError_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (error *InnerError_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &InnerError_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (error *InnerError_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(InnerError_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected InnerError_STATUS_ARM, got %T", armInput) + } + + // Set property "Errordetail": + if typedInput.Errordetail != nil { + errordetail := *typedInput.Errordetail + error.Errordetail = &errordetail + } + + // Set property "Exceptiontype": + if typedInput.Exceptiontype != nil { + exceptiontype := *typedInput.Exceptiontype + error.Exceptiontype = &exceptiontype + } + + // No error + return nil +} + +// 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 { + + // Errordetail + error.Errordetail = genruntime.ClonePointerToString(source.Errordetail) + + // Exceptiontype + error.Exceptiontype = genruntime.ClonePointerToString(source.Exceptiontype) + + // 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 { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // 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 + } + + // No error + return nil +} + +// The vault id is an Azure Resource Manager Resource id in the form +// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} +type SourceVault struct { + // Reference: Resource Id + Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"` +} + +var _ genruntime.ARMTransformer = &SourceVault{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (vault *SourceVault) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if vault == nil { + return nil, nil + } + result := &SourceVault_ARM{} + + // Set property "Id": + if vault.Reference != nil { + referenceARMID, err := resolved.ResolvedReferences.Lookup(*vault.Reference) + if err != nil { + return nil, err + } + reference := referenceARMID + result.Id = &reference + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (vault *SourceVault) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &SourceVault_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (vault *SourceVault) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + _, ok := armInput.(SourceVault_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected SourceVault_ARM, got %T", armInput) + } + + // no assignment for property "Reference" + + // No error + return nil +} + +// AssignProperties_From_SourceVault populates our SourceVault from the provided source SourceVault +func (vault *SourceVault) AssignProperties_From_SourceVault(source *v20220702s.SourceVault) error { + + // Reference + if source.Reference != nil { + reference := source.Reference.Copy() + vault.Reference = &reference + } else { + vault.Reference = nil + } + + // No error + return nil +} + +// AssignProperties_To_SourceVault populates the provided destination SourceVault from our SourceVault +func (vault *SourceVault) AssignProperties_To_SourceVault(destination *v20220702s.SourceVault) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Reference + if vault.Reference != nil { + reference := vault.Reference.Copy() + destination.Reference = &reference + } else { + destination.Reference = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_SourceVault_STATUS populates our SourceVault from the provided source SourceVault_STATUS +func (vault *SourceVault) Initialize_From_SourceVault_STATUS(source *SourceVault_STATUS) error { + + // Reference + if source.Id != nil { + reference := genruntime.CreateResourceReferenceFromARMID(*source.Id) + vault.Reference = &reference + } else { + vault.Reference = nil + } + + // No error + return nil +} + +// The vault id is an Azure Resource Manager Resource id in the form +// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} +type SourceVault_STATUS struct { + // Id: Resource Id + Id *string `json:"id,omitempty"` +} + +var _ genruntime.FromARMConverter = &SourceVault_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (vault *SourceVault_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &SourceVault_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (vault *SourceVault_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(SourceVault_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected SourceVault_STATUS_ARM, got %T", armInput) + } + + // Set property "Id": + if typedInput.Id != nil { + id := *typedInput.Id + vault.Id = &id + } + + // No error + return nil +} + +// AssignProperties_From_SourceVault_STATUS populates our SourceVault_STATUS from the provided source SourceVault_STATUS +func (vault *SourceVault_STATUS) AssignProperties_From_SourceVault_STATUS(source *v20220702s.SourceVault_STATUS) error { + + // Id + vault.Id = genruntime.ClonePointerToString(source.Id) + + // No error + return nil +} + +// AssignProperties_To_SourceVault_STATUS populates the provided destination SourceVault_STATUS from our SourceVault_STATUS +func (vault *SourceVault_STATUS) AssignProperties_To_SourceVault_STATUS(destination *v20220702s.SourceVault_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Id + destination.Id = genruntime.ClonePointerToString(vault.Id) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Information about the user assigned identity for the resource +type UserAssignedIdentityDetails struct { + Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"` +} + +// AssignProperties_From_UserAssignedIdentityDetails populates our UserAssignedIdentityDetails from the provided source UserAssignedIdentityDetails +func (details *UserAssignedIdentityDetails) AssignProperties_From_UserAssignedIdentityDetails(source *v20220702s.UserAssignedIdentityDetails) error { + + // Reference + details.Reference = source.Reference.Copy() + + // No error + return nil +} + +// AssignProperties_To_UserAssignedIdentityDetails populates the provided destination UserAssignedIdentityDetails from our UserAssignedIdentityDetails +func (details *UserAssignedIdentityDetails) AssignProperties_To_UserAssignedIdentityDetails(destination *v20220702s.UserAssignedIdentityDetails) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Reference + destination.Reference = details.Reference.Copy() + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +func init() { + SchemeBuilder.Register(&DiskEncryptionSet{}, &DiskEncryptionSetList{}) +} diff --git a/v2/api/compute/v1api20220702/disk_encryption_set_types_gen_test.go b/v2/api/compute/v1api20220702/disk_encryption_set_types_gen_test.go new file mode 100644 index 00000000000..acfcc4831af --- /dev/null +++ b/v2/api/compute/v1api20220702/disk_encryption_set_types_gen_test.go @@ -0,0 +1,1621 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20220702 + +import ( + "encoding/json" + v20220702s "github.com/Azure/azure-service-operator/v2/api/compute/v1api20220702storage" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_DiskEncryptionSet_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from DiskEncryptionSet to hub returns original", + prop.ForAll(RunResourceConversionTestForDiskEncryptionSet, DiskEncryptionSetGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForDiskEncryptionSet tests if a specific instance of DiskEncryptionSet round trips to the hub storage version and back losslessly +func RunResourceConversionTestForDiskEncryptionSet(subject DiskEncryptionSet) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v20220702s.DiskEncryptionSet + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual DiskEncryptionSet + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_DiskEncryptionSet_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from DiskEncryptionSet to DiskEncryptionSet via AssignProperties_To_DiskEncryptionSet & AssignProperties_From_DiskEncryptionSet returns original", + prop.ForAll(RunPropertyAssignmentTestForDiskEncryptionSet, DiskEncryptionSetGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDiskEncryptionSet tests if a specific instance of DiskEncryptionSet can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForDiskEncryptionSet(subject DiskEncryptionSet) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.DiskEncryptionSet + err := copied.AssignProperties_To_DiskEncryptionSet(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual DiskEncryptionSet + err = actual.AssignProperties_From_DiskEncryptionSet(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_DiskEncryptionSet_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DiskEncryptionSet via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDiskEncryptionSet, DiskEncryptionSetGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDiskEncryptionSet runs a test to see if a specific instance of DiskEncryptionSet round trips to JSON and back losslessly +func RunJSONSerializationTestForDiskEncryptionSet(subject DiskEncryptionSet) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DiskEncryptionSet + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DiskEncryptionSet instances for property testing - lazily instantiated by DiskEncryptionSetGenerator() +var diskEncryptionSetGenerator gopter.Gen + +// DiskEncryptionSetGenerator returns a generator of DiskEncryptionSet instances for property testing. +func DiskEncryptionSetGenerator() gopter.Gen { + if diskEncryptionSetGenerator != nil { + return diskEncryptionSetGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForDiskEncryptionSet(generators) + diskEncryptionSetGenerator = gen.Struct(reflect.TypeOf(DiskEncryptionSet{}), generators) + + return diskEncryptionSetGenerator +} + +// AddRelatedPropertyGeneratorsForDiskEncryptionSet is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForDiskEncryptionSet(gens map[string]gopter.Gen) { + gens["Spec"] = DiskEncryptionSet_SpecGenerator() + gens["Status"] = DiskEncryptionSet_STATUSGenerator() +} + +func Test_DiskEncryptionSet_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from DiskEncryptionSet_Spec to DiskEncryptionSet_Spec via AssignProperties_To_DiskEncryptionSet_Spec & AssignProperties_From_DiskEncryptionSet_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForDiskEncryptionSet_Spec, DiskEncryptionSet_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDiskEncryptionSet_Spec tests if a specific instance of DiskEncryptionSet_Spec can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForDiskEncryptionSet_Spec(subject DiskEncryptionSet_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.DiskEncryptionSet_Spec + err := copied.AssignProperties_To_DiskEncryptionSet_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual DiskEncryptionSet_Spec + err = actual.AssignProperties_From_DiskEncryptionSet_Spec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_DiskEncryptionSet_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DiskEncryptionSet_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDiskEncryptionSet_Spec, DiskEncryptionSet_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDiskEncryptionSet_Spec runs a test to see if a specific instance of DiskEncryptionSet_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForDiskEncryptionSet_Spec(subject DiskEncryptionSet_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DiskEncryptionSet_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DiskEncryptionSet_Spec instances for property testing - lazily instantiated by +// DiskEncryptionSet_SpecGenerator() +var diskEncryptionSet_SpecGenerator gopter.Gen + +// DiskEncryptionSet_SpecGenerator returns a generator of DiskEncryptionSet_Spec instances for property testing. +// We first initialize diskEncryptionSet_SpecGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func DiskEncryptionSet_SpecGenerator() gopter.Gen { + if diskEncryptionSet_SpecGenerator != nil { + return diskEncryptionSet_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDiskEncryptionSet_Spec(generators) + diskEncryptionSet_SpecGenerator = gen.Struct(reflect.TypeOf(DiskEncryptionSet_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDiskEncryptionSet_Spec(generators) + AddRelatedPropertyGeneratorsForDiskEncryptionSet_Spec(generators) + diskEncryptionSet_SpecGenerator = gen.Struct(reflect.TypeOf(DiskEncryptionSet_Spec{}), generators) + + return diskEncryptionSet_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForDiskEncryptionSet_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDiskEncryptionSet_Spec(gens map[string]gopter.Gen) { + gens["AzureName"] = gen.AlphaString() + gens["EncryptionType"] = gen.PtrOf(gen.OneConstOf(DiskEncryptionSetType_ConfidentialVmEncryptedWithCustomerKey, DiskEncryptionSetType_EncryptionAtRestWithCustomerKey, DiskEncryptionSetType_EncryptionAtRestWithPlatformAndCustomerKeys)) + gens["FederatedClientId"] = gen.PtrOf(gen.AlphaString()) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["RotationToLatestKeyVersionEnabled"] = gen.PtrOf(gen.Bool()) + gens["Tags"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForDiskEncryptionSet_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForDiskEncryptionSet_Spec(gens map[string]gopter.Gen) { + gens["ActiveKey"] = gen.PtrOf(KeyForDiskEncryptionSetGenerator()) + gens["Identity"] = gen.PtrOf(EncryptionSetIdentityGenerator()) +} + +func Test_DiskEncryptionSet_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from DiskEncryptionSet_STATUS to DiskEncryptionSet_STATUS via AssignProperties_To_DiskEncryptionSet_STATUS & AssignProperties_From_DiskEncryptionSet_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForDiskEncryptionSet_STATUS, DiskEncryptionSet_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDiskEncryptionSet_STATUS tests if a specific instance of DiskEncryptionSet_STATUS can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForDiskEncryptionSet_STATUS(subject DiskEncryptionSet_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.DiskEncryptionSet_STATUS + err := copied.AssignProperties_To_DiskEncryptionSet_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual DiskEncryptionSet_STATUS + err = actual.AssignProperties_From_DiskEncryptionSet_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_DiskEncryptionSet_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DiskEncryptionSet_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDiskEncryptionSet_STATUS, DiskEncryptionSet_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDiskEncryptionSet_STATUS runs a test to see if a specific instance of DiskEncryptionSet_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForDiskEncryptionSet_STATUS(subject DiskEncryptionSet_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DiskEncryptionSet_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DiskEncryptionSet_STATUS instances for property testing - lazily instantiated by +// DiskEncryptionSet_STATUSGenerator() +var diskEncryptionSet_STATUSGenerator gopter.Gen + +// DiskEncryptionSet_STATUSGenerator returns a generator of DiskEncryptionSet_STATUS instances for property testing. +// We first initialize diskEncryptionSet_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func DiskEncryptionSet_STATUSGenerator() gopter.Gen { + if diskEncryptionSet_STATUSGenerator != nil { + return diskEncryptionSet_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDiskEncryptionSet_STATUS(generators) + diskEncryptionSet_STATUSGenerator = gen.Struct(reflect.TypeOf(DiskEncryptionSet_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDiskEncryptionSet_STATUS(generators) + AddRelatedPropertyGeneratorsForDiskEncryptionSet_STATUS(generators) + diskEncryptionSet_STATUSGenerator = gen.Struct(reflect.TypeOf(DiskEncryptionSet_STATUS{}), generators) + + return diskEncryptionSet_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForDiskEncryptionSet_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDiskEncryptionSet_STATUS(gens map[string]gopter.Gen) { + gens["EncryptionType"] = gen.PtrOf(gen.OneConstOf(DiskEncryptionSetType_STATUS_ConfidentialVmEncryptedWithCustomerKey, DiskEncryptionSetType_STATUS_EncryptionAtRestWithCustomerKey, DiskEncryptionSetType_STATUS_EncryptionAtRestWithPlatformAndCustomerKeys)) + gens["FederatedClientId"] = gen.PtrOf(gen.AlphaString()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["LastKeyRotationTimestamp"] = gen.PtrOf(gen.AlphaString()) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["ProvisioningState"] = gen.PtrOf(gen.AlphaString()) + gens["RotationToLatestKeyVersionEnabled"] = gen.PtrOf(gen.Bool()) + gens["Tags"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForDiskEncryptionSet_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForDiskEncryptionSet_STATUS(gens map[string]gopter.Gen) { + gens["ActiveKey"] = gen.PtrOf(KeyForDiskEncryptionSet_STATUSGenerator()) + gens["AutoKeyRotationError"] = gen.PtrOf(ApiError_STATUSGenerator()) + gens["Identity"] = gen.PtrOf(EncryptionSetIdentity_STATUSGenerator()) + gens["PreviousKeys"] = gen.SliceOf(KeyForDiskEncryptionSet_STATUSGenerator()) +} + +func Test_ApiError_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ApiError_STATUS to ApiError_STATUS via AssignProperties_To_ApiError_STATUS & AssignProperties_From_ApiError_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForApiError_STATUS, ApiError_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForApiError_STATUS tests if a specific instance of ApiError_STATUS can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForApiError_STATUS(subject ApiError_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.ApiError_STATUS + err := copied.AssignProperties_To_ApiError_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ApiError_STATUS + err = actual.AssignProperties_From_ApiError_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ApiError_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ApiError_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForApiError_STATUS, ApiError_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForApiError_STATUS runs a test to see if a specific instance of ApiError_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForApiError_STATUS(subject ApiError_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ApiError_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ApiError_STATUS instances for property testing - lazily instantiated by ApiError_STATUSGenerator() +var apiError_STATUSGenerator gopter.Gen + +// ApiError_STATUSGenerator returns a generator of ApiError_STATUS instances for property testing. +// We first initialize apiError_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ApiError_STATUSGenerator() gopter.Gen { + if apiError_STATUSGenerator != nil { + return apiError_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForApiError_STATUS(generators) + apiError_STATUSGenerator = gen.Struct(reflect.TypeOf(ApiError_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForApiError_STATUS(generators) + AddRelatedPropertyGeneratorsForApiError_STATUS(generators) + apiError_STATUSGenerator = gen.Struct(reflect.TypeOf(ApiError_STATUS{}), generators) + + return apiError_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForApiError_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForApiError_STATUS(gens map[string]gopter.Gen) { + gens["Code"] = gen.PtrOf(gen.AlphaString()) + gens["Message"] = gen.PtrOf(gen.AlphaString()) + gens["Target"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForApiError_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForApiError_STATUS(gens map[string]gopter.Gen) { + gens["Details"] = gen.SliceOf(ApiErrorBase_STATUSGenerator()) + gens["Innererror"] = gen.PtrOf(InnerError_STATUSGenerator()) +} + +func Test_EncryptionSetIdentity_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from EncryptionSetIdentity to EncryptionSetIdentity via AssignProperties_To_EncryptionSetIdentity & AssignProperties_From_EncryptionSetIdentity returns original", + prop.ForAll(RunPropertyAssignmentTestForEncryptionSetIdentity, EncryptionSetIdentityGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEncryptionSetIdentity tests if a specific instance of EncryptionSetIdentity can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForEncryptionSetIdentity(subject EncryptionSetIdentity) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.EncryptionSetIdentity + err := copied.AssignProperties_To_EncryptionSetIdentity(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual EncryptionSetIdentity + err = actual.AssignProperties_From_EncryptionSetIdentity(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_EncryptionSetIdentity_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionSetIdentity via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionSetIdentity, EncryptionSetIdentityGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionSetIdentity runs a test to see if a specific instance of EncryptionSetIdentity round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionSetIdentity(subject EncryptionSetIdentity) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionSetIdentity + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionSetIdentity instances for property testing - lazily instantiated by +// EncryptionSetIdentityGenerator() +var encryptionSetIdentityGenerator gopter.Gen + +// EncryptionSetIdentityGenerator returns a generator of EncryptionSetIdentity instances for property testing. +// We first initialize encryptionSetIdentityGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func EncryptionSetIdentityGenerator() gopter.Gen { + if encryptionSetIdentityGenerator != nil { + return encryptionSetIdentityGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionSetIdentity(generators) + encryptionSetIdentityGenerator = gen.Struct(reflect.TypeOf(EncryptionSetIdentity{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionSetIdentity(generators) + AddRelatedPropertyGeneratorsForEncryptionSetIdentity(generators) + encryptionSetIdentityGenerator = gen.Struct(reflect.TypeOf(EncryptionSetIdentity{}), generators) + + return encryptionSetIdentityGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionSetIdentity is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionSetIdentity(gens map[string]gopter.Gen) { + gens["Type"] = gen.PtrOf(gen.OneConstOf( + EncryptionSetIdentity_Type_None, + EncryptionSetIdentity_Type_SystemAssigned, + EncryptionSetIdentity_Type_SystemAssignedUserAssigned, + EncryptionSetIdentity_Type_UserAssigned)) +} + +// AddRelatedPropertyGeneratorsForEncryptionSetIdentity is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryptionSetIdentity(gens map[string]gopter.Gen) { + gens["UserAssignedIdentities"] = gen.SliceOf(UserAssignedIdentityDetailsGenerator()) +} + +func Test_EncryptionSetIdentity_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from EncryptionSetIdentity_STATUS to EncryptionSetIdentity_STATUS via AssignProperties_To_EncryptionSetIdentity_STATUS & AssignProperties_From_EncryptionSetIdentity_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForEncryptionSetIdentity_STATUS, EncryptionSetIdentity_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEncryptionSetIdentity_STATUS tests if a specific instance of EncryptionSetIdentity_STATUS can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForEncryptionSetIdentity_STATUS(subject EncryptionSetIdentity_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.EncryptionSetIdentity_STATUS + err := copied.AssignProperties_To_EncryptionSetIdentity_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual EncryptionSetIdentity_STATUS + err = actual.AssignProperties_From_EncryptionSetIdentity_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_EncryptionSetIdentity_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionSetIdentity_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionSetIdentity_STATUS, EncryptionSetIdentity_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionSetIdentity_STATUS runs a test to see if a specific instance of EncryptionSetIdentity_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionSetIdentity_STATUS(subject EncryptionSetIdentity_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionSetIdentity_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionSetIdentity_STATUS instances for property testing - lazily instantiated by +// EncryptionSetIdentity_STATUSGenerator() +var encryptionSetIdentity_STATUSGenerator gopter.Gen + +// EncryptionSetIdentity_STATUSGenerator returns a generator of EncryptionSetIdentity_STATUS instances for property testing. +// We first initialize encryptionSetIdentity_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func EncryptionSetIdentity_STATUSGenerator() gopter.Gen { + if encryptionSetIdentity_STATUSGenerator != nil { + return encryptionSetIdentity_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionSetIdentity_STATUS(generators) + encryptionSetIdentity_STATUSGenerator = gen.Struct(reflect.TypeOf(EncryptionSetIdentity_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionSetIdentity_STATUS(generators) + AddRelatedPropertyGeneratorsForEncryptionSetIdentity_STATUS(generators) + encryptionSetIdentity_STATUSGenerator = gen.Struct(reflect.TypeOf(EncryptionSetIdentity_STATUS{}), generators) + + return encryptionSetIdentity_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionSetIdentity_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionSetIdentity_STATUS(gens map[string]gopter.Gen) { + gens["PrincipalId"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.OneConstOf( + EncryptionSetIdentity_Type_STATUS_None, + EncryptionSetIdentity_Type_STATUS_SystemAssigned, + EncryptionSetIdentity_Type_STATUS_SystemAssignedUserAssigned, + EncryptionSetIdentity_Type_STATUS_UserAssigned)) +} + +// AddRelatedPropertyGeneratorsForEncryptionSetIdentity_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryptionSetIdentity_STATUS(gens map[string]gopter.Gen) { + gens["UserAssignedIdentities"] = gen.MapOf(gen.AlphaString(), EncryptionSetIdentity_UserAssignedIdentities_STATUSGenerator()) +} + +func Test_KeyForDiskEncryptionSet_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from KeyForDiskEncryptionSet to KeyForDiskEncryptionSet via AssignProperties_To_KeyForDiskEncryptionSet & AssignProperties_From_KeyForDiskEncryptionSet returns original", + prop.ForAll(RunPropertyAssignmentTestForKeyForDiskEncryptionSet, KeyForDiskEncryptionSetGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForKeyForDiskEncryptionSet tests if a specific instance of KeyForDiskEncryptionSet can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForKeyForDiskEncryptionSet(subject KeyForDiskEncryptionSet) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.KeyForDiskEncryptionSet + err := copied.AssignProperties_To_KeyForDiskEncryptionSet(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual KeyForDiskEncryptionSet + err = actual.AssignProperties_From_KeyForDiskEncryptionSet(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_KeyForDiskEncryptionSet_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyForDiskEncryptionSet via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyForDiskEncryptionSet, KeyForDiskEncryptionSetGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyForDiskEncryptionSet runs a test to see if a specific instance of KeyForDiskEncryptionSet round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyForDiskEncryptionSet(subject KeyForDiskEncryptionSet) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyForDiskEncryptionSet + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyForDiskEncryptionSet instances for property testing - lazily instantiated by +// KeyForDiskEncryptionSetGenerator() +var keyForDiskEncryptionSetGenerator gopter.Gen + +// KeyForDiskEncryptionSetGenerator returns a generator of KeyForDiskEncryptionSet instances for property testing. +// We first initialize keyForDiskEncryptionSetGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func KeyForDiskEncryptionSetGenerator() gopter.Gen { + if keyForDiskEncryptionSetGenerator != nil { + return keyForDiskEncryptionSetGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet(generators) + keyForDiskEncryptionSetGenerator = gen.Struct(reflect.TypeOf(KeyForDiskEncryptionSet{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet(generators) + AddRelatedPropertyGeneratorsForKeyForDiskEncryptionSet(generators) + keyForDiskEncryptionSetGenerator = gen.Struct(reflect.TypeOf(KeyForDiskEncryptionSet{}), generators) + + return keyForDiskEncryptionSetGenerator +} + +// AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet(gens map[string]gopter.Gen) { + gens["KeyUrl"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForKeyForDiskEncryptionSet is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForKeyForDiskEncryptionSet(gens map[string]gopter.Gen) { + gens["SourceVault"] = gen.PtrOf(SourceVaultGenerator()) +} + +func Test_KeyForDiskEncryptionSet_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from KeyForDiskEncryptionSet_STATUS to KeyForDiskEncryptionSet_STATUS via AssignProperties_To_KeyForDiskEncryptionSet_STATUS & AssignProperties_From_KeyForDiskEncryptionSet_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForKeyForDiskEncryptionSet_STATUS, KeyForDiskEncryptionSet_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForKeyForDiskEncryptionSet_STATUS tests if a specific instance of KeyForDiskEncryptionSet_STATUS can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForKeyForDiskEncryptionSet_STATUS(subject KeyForDiskEncryptionSet_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.KeyForDiskEncryptionSet_STATUS + err := copied.AssignProperties_To_KeyForDiskEncryptionSet_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual KeyForDiskEncryptionSet_STATUS + err = actual.AssignProperties_From_KeyForDiskEncryptionSet_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_KeyForDiskEncryptionSet_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyForDiskEncryptionSet_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyForDiskEncryptionSet_STATUS, KeyForDiskEncryptionSet_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyForDiskEncryptionSet_STATUS runs a test to see if a specific instance of KeyForDiskEncryptionSet_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyForDiskEncryptionSet_STATUS(subject KeyForDiskEncryptionSet_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyForDiskEncryptionSet_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyForDiskEncryptionSet_STATUS instances for property testing - lazily instantiated by +// KeyForDiskEncryptionSet_STATUSGenerator() +var keyForDiskEncryptionSet_STATUSGenerator gopter.Gen + +// KeyForDiskEncryptionSet_STATUSGenerator returns a generator of KeyForDiskEncryptionSet_STATUS instances for property testing. +// We first initialize keyForDiskEncryptionSet_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func KeyForDiskEncryptionSet_STATUSGenerator() gopter.Gen { + if keyForDiskEncryptionSet_STATUSGenerator != nil { + return keyForDiskEncryptionSet_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS(generators) + keyForDiskEncryptionSet_STATUSGenerator = gen.Struct(reflect.TypeOf(KeyForDiskEncryptionSet_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS(generators) + AddRelatedPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS(generators) + keyForDiskEncryptionSet_STATUSGenerator = gen.Struct(reflect.TypeOf(KeyForDiskEncryptionSet_STATUS{}), generators) + + return keyForDiskEncryptionSet_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS(gens map[string]gopter.Gen) { + gens["KeyUrl"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS(gens map[string]gopter.Gen) { + gens["SourceVault"] = gen.PtrOf(SourceVault_STATUSGenerator()) +} + +func Test_ApiErrorBase_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ApiErrorBase_STATUS to ApiErrorBase_STATUS via AssignProperties_To_ApiErrorBase_STATUS & AssignProperties_From_ApiErrorBase_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForApiErrorBase_STATUS, ApiErrorBase_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForApiErrorBase_STATUS tests if a specific instance of ApiErrorBase_STATUS can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForApiErrorBase_STATUS(subject ApiErrorBase_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.ApiErrorBase_STATUS + err := copied.AssignProperties_To_ApiErrorBase_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ApiErrorBase_STATUS + err = actual.AssignProperties_From_ApiErrorBase_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_ApiErrorBase_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ApiErrorBase_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForApiErrorBase_STATUS, ApiErrorBase_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForApiErrorBase_STATUS runs a test to see if a specific instance of ApiErrorBase_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForApiErrorBase_STATUS(subject ApiErrorBase_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ApiErrorBase_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ApiErrorBase_STATUS instances for property testing - lazily instantiated by +// ApiErrorBase_STATUSGenerator() +var apiErrorBase_STATUSGenerator gopter.Gen + +// ApiErrorBase_STATUSGenerator returns a generator of ApiErrorBase_STATUS instances for property testing. +func ApiErrorBase_STATUSGenerator() gopter.Gen { + if apiErrorBase_STATUSGenerator != nil { + return apiErrorBase_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForApiErrorBase_STATUS(generators) + apiErrorBase_STATUSGenerator = gen.Struct(reflect.TypeOf(ApiErrorBase_STATUS{}), generators) + + return apiErrorBase_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForApiErrorBase_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForApiErrorBase_STATUS(gens map[string]gopter.Gen) { + gens["Code"] = gen.PtrOf(gen.AlphaString()) + gens["Message"] = gen.PtrOf(gen.AlphaString()) + gens["Target"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_EncryptionSetIdentity_UserAssignedIdentities_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from EncryptionSetIdentity_UserAssignedIdentities_STATUS to EncryptionSetIdentity_UserAssignedIdentities_STATUS via AssignProperties_To_EncryptionSetIdentity_UserAssignedIdentities_STATUS & AssignProperties_From_EncryptionSetIdentity_UserAssignedIdentities_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForEncryptionSetIdentity_UserAssignedIdentities_STATUS, EncryptionSetIdentity_UserAssignedIdentities_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForEncryptionSetIdentity_UserAssignedIdentities_STATUS tests if a specific instance of EncryptionSetIdentity_UserAssignedIdentities_STATUS can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForEncryptionSetIdentity_UserAssignedIdentities_STATUS(subject EncryptionSetIdentity_UserAssignedIdentities_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.EncryptionSetIdentity_UserAssignedIdentities_STATUS + err := copied.AssignProperties_To_EncryptionSetIdentity_UserAssignedIdentities_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual EncryptionSetIdentity_UserAssignedIdentities_STATUS + err = actual.AssignProperties_From_EncryptionSetIdentity_UserAssignedIdentities_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_EncryptionSetIdentity_UserAssignedIdentities_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionSetIdentity_UserAssignedIdentities_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionSetIdentity_UserAssignedIdentities_STATUS, EncryptionSetIdentity_UserAssignedIdentities_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionSetIdentity_UserAssignedIdentities_STATUS runs a test to see if a specific instance of EncryptionSetIdentity_UserAssignedIdentities_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionSetIdentity_UserAssignedIdentities_STATUS(subject EncryptionSetIdentity_UserAssignedIdentities_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionSetIdentity_UserAssignedIdentities_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionSetIdentity_UserAssignedIdentities_STATUS instances for property testing - lazily instantiated +// by EncryptionSetIdentity_UserAssignedIdentities_STATUSGenerator() +var encryptionSetIdentity_UserAssignedIdentities_STATUSGenerator gopter.Gen + +// EncryptionSetIdentity_UserAssignedIdentities_STATUSGenerator returns a generator of EncryptionSetIdentity_UserAssignedIdentities_STATUS instances for property testing. +func EncryptionSetIdentity_UserAssignedIdentities_STATUSGenerator() gopter.Gen { + if encryptionSetIdentity_UserAssignedIdentities_STATUSGenerator != nil { + return encryptionSetIdentity_UserAssignedIdentities_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionSetIdentity_UserAssignedIdentities_STATUS(generators) + encryptionSetIdentity_UserAssignedIdentities_STATUSGenerator = gen.Struct(reflect.TypeOf(EncryptionSetIdentity_UserAssignedIdentities_STATUS{}), generators) + + return encryptionSetIdentity_UserAssignedIdentities_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionSetIdentity_UserAssignedIdentities_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionSetIdentity_UserAssignedIdentities_STATUS(gens map[string]gopter.Gen) { + gens["ClientId"] = gen.PtrOf(gen.AlphaString()) + gens["PrincipalId"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_InnerError_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from InnerError_STATUS to InnerError_STATUS via AssignProperties_To_InnerError_STATUS & AssignProperties_From_InnerError_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForInnerError_STATUS, InnerError_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForInnerError_STATUS tests if a specific instance of InnerError_STATUS can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForInnerError_STATUS(subject InnerError_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.InnerError_STATUS + err := copied.AssignProperties_To_InnerError_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual InnerError_STATUS + err = actual.AssignProperties_From_InnerError_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_InnerError_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of InnerError_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForInnerError_STATUS, InnerError_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForInnerError_STATUS runs a test to see if a specific instance of InnerError_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForInnerError_STATUS(subject InnerError_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual InnerError_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of InnerError_STATUS instances for property testing - lazily instantiated by InnerError_STATUSGenerator() +var innerError_STATUSGenerator gopter.Gen + +// InnerError_STATUSGenerator returns a generator of InnerError_STATUS instances for property testing. +func InnerError_STATUSGenerator() gopter.Gen { + if innerError_STATUSGenerator != nil { + return innerError_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForInnerError_STATUS(generators) + innerError_STATUSGenerator = gen.Struct(reflect.TypeOf(InnerError_STATUS{}), generators) + + return innerError_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForInnerError_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForInnerError_STATUS(gens map[string]gopter.Gen) { + gens["Errordetail"] = gen.PtrOf(gen.AlphaString()) + gens["Exceptiontype"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_SourceVault_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SourceVault to SourceVault via AssignProperties_To_SourceVault & AssignProperties_From_SourceVault returns original", + prop.ForAll(RunPropertyAssignmentTestForSourceVault, SourceVaultGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSourceVault tests if a specific instance of SourceVault can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForSourceVault(subject SourceVault) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.SourceVault + err := copied.AssignProperties_To_SourceVault(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SourceVault + err = actual.AssignProperties_From_SourceVault(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_SourceVault_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SourceVault via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSourceVault, SourceVaultGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSourceVault runs a test to see if a specific instance of SourceVault round trips to JSON and back losslessly +func RunJSONSerializationTestForSourceVault(subject SourceVault) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SourceVault + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SourceVault instances for property testing - lazily instantiated by SourceVaultGenerator() +var sourceVaultGenerator gopter.Gen + +// SourceVaultGenerator returns a generator of SourceVault instances for property testing. +func SourceVaultGenerator() gopter.Gen { + if sourceVaultGenerator != nil { + return sourceVaultGenerator + } + + generators := make(map[string]gopter.Gen) + sourceVaultGenerator = gen.Struct(reflect.TypeOf(SourceVault{}), generators) + + return sourceVaultGenerator +} + +func Test_SourceVault_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SourceVault_STATUS to SourceVault_STATUS via AssignProperties_To_SourceVault_STATUS & AssignProperties_From_SourceVault_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForSourceVault_STATUS, SourceVault_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSourceVault_STATUS tests if a specific instance of SourceVault_STATUS can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForSourceVault_STATUS(subject SourceVault_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.SourceVault_STATUS + err := copied.AssignProperties_To_SourceVault_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SourceVault_STATUS + err = actual.AssignProperties_From_SourceVault_STATUS(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_SourceVault_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SourceVault_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSourceVault_STATUS, SourceVault_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSourceVault_STATUS runs a test to see if a specific instance of SourceVault_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForSourceVault_STATUS(subject SourceVault_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SourceVault_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SourceVault_STATUS instances for property testing - lazily instantiated by SourceVault_STATUSGenerator() +var sourceVault_STATUSGenerator gopter.Gen + +// SourceVault_STATUSGenerator returns a generator of SourceVault_STATUS instances for property testing. +func SourceVault_STATUSGenerator() gopter.Gen { + if sourceVault_STATUSGenerator != nil { + return sourceVault_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSourceVault_STATUS(generators) + sourceVault_STATUSGenerator = gen.Struct(reflect.TypeOf(SourceVault_STATUS{}), generators) + + return sourceVault_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForSourceVault_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSourceVault_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_UserAssignedIdentityDetails_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from UserAssignedIdentityDetails to UserAssignedIdentityDetails via AssignProperties_To_UserAssignedIdentityDetails & AssignProperties_From_UserAssignedIdentityDetails returns original", + prop.ForAll(RunPropertyAssignmentTestForUserAssignedIdentityDetails, UserAssignedIdentityDetailsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForUserAssignedIdentityDetails tests if a specific instance of UserAssignedIdentityDetails can be assigned to v1api20220702storage and back losslessly +func RunPropertyAssignmentTestForUserAssignedIdentityDetails(subject UserAssignedIdentityDetails) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v20220702s.UserAssignedIdentityDetails + err := copied.AssignProperties_To_UserAssignedIdentityDetails(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual UserAssignedIdentityDetails + err = actual.AssignProperties_From_UserAssignedIdentityDetails(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_UserAssignedIdentityDetails_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of UserAssignedIdentityDetails via JSON returns original", + prop.ForAll(RunJSONSerializationTestForUserAssignedIdentityDetails, UserAssignedIdentityDetailsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForUserAssignedIdentityDetails runs a test to see if a specific instance of UserAssignedIdentityDetails round trips to JSON and back losslessly +func RunJSONSerializationTestForUserAssignedIdentityDetails(subject UserAssignedIdentityDetails) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual UserAssignedIdentityDetails + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of UserAssignedIdentityDetails instances for property testing - lazily instantiated by +// UserAssignedIdentityDetailsGenerator() +var userAssignedIdentityDetailsGenerator gopter.Gen + +// UserAssignedIdentityDetailsGenerator returns a generator of UserAssignedIdentityDetails instances for property testing. +func UserAssignedIdentityDetailsGenerator() gopter.Gen { + if userAssignedIdentityDetailsGenerator != nil { + return userAssignedIdentityDetailsGenerator + } + + generators := make(map[string]gopter.Gen) + userAssignedIdentityDetailsGenerator = gen.Struct(reflect.TypeOf(UserAssignedIdentityDetails{}), generators) + + return userAssignedIdentityDetailsGenerator +} diff --git a/v2/api/compute/v1api20220702/doc.go b/v2/api/compute/v1api20220702/doc.go new file mode 100644 index 00000000000..ff25854c1a6 --- /dev/null +++ b/v2/api/compute/v1api20220702/doc.go @@ -0,0 +1,10 @@ +/* +Copyright (c) Microsoft Corporation. +Licensed under the MIT license. +*/ + +// Code generated by azure-service-operator-codegen. DO NOT EDIT. + +// Package v1api20220702 contains API Schema definitions for the compute v1api20220702 API group +// +groupName=compute.azure.com +package v1api20220702 diff --git a/v2/api/compute/v1api20220702/groupversion_info_gen.go b/v2/api/compute/v1api20220702/groupversion_info_gen.go new file mode 100644 index 00000000000..7a13303d28d --- /dev/null +++ b/v2/api/compute/v1api20220702/groupversion_info_gen.go @@ -0,0 +1,31 @@ +/* +Copyright (c) Microsoft Corporation. +Licensed under the MIT license. +*/ + +// Code generated by azure-service-operator-codegen. DO NOT EDIT. + +// Package v1api20220702 contains API Schema definitions for the compute v1api20220702 API group +// +kubebuilder:object:generate=true +// All object properties are optional by default, this will be overridden when needed: +// +kubebuilder:validation:Optional +// +groupName=compute.azure.com +package v1api20220702 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "compute.azure.com", Version: "v1api20220702"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme + + localSchemeBuilder = SchemeBuilder.SchemeBuilder +) diff --git a/v2/api/compute/v1api20220702/structure.txt b/v2/api/compute/v1api20220702/structure.txt new file mode 100644 index 00000000000..1bf6ba0c60e --- /dev/null +++ b/v2/api/compute/v1api20220702/structure.txt @@ -0,0 +1,143 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +github.com/Azure/azure-service-operator/v2/api/compute/v1api20220702 +├── APIVersion: Enum (1 value) +│ └── "2022-07-02" +├── DiskEncryptionSet: Resource +│ ├── Owner: github.com/Azure/azure-service-operator/v2/api/resources/v1apiv20191001.ResourceGroup +│ ├── Spec: Object (10 properties) +│ │ ├── ActiveKey: *Object (3 properties) +│ │ │ ├── KeyUrl: *string +│ │ │ ├── KeyUrlFromConfig: *genruntime.ConfigMapReference +│ │ │ └── SourceVault: *Object (1 property) +│ │ │ └── Reference: *genruntime.ResourceReference +│ │ ├── AzureName: string +│ │ ├── EncryptionType: *Enum (3 values) +│ │ │ ├── "ConfidentialVmEncryptedWithCustomerKey" +│ │ │ ├── "EncryptionAtRestWithCustomerKey" +│ │ │ └── "EncryptionAtRestWithPlatformAndCustomerKeys" +│ │ ├── FederatedClientId: *string +│ │ ├── FederatedClientIdFromConfig: *genruntime.ConfigMapReference +│ │ ├── Identity: *Object (2 properties) +│ │ │ ├── Type: *Enum (4 values) +│ │ │ │ ├── "None" +│ │ │ │ ├── "SystemAssigned" +│ │ │ │ ├── "SystemAssigned, UserAssigned" +│ │ │ │ └── "UserAssigned" +│ │ │ └── UserAssignedIdentities: Object (1 property)[] +│ │ │ └── Reference: genruntime.ResourceReference +│ │ ├── Location: *string +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ ├── RotationToLatestKeyVersionEnabled: *bool +│ │ └── Tags: map[string]string +│ └── Status: Object (15 properties) +│ ├── ActiveKey: *Object (2 properties) +│ │ ├── KeyUrl: *string +│ │ └── SourceVault: *Object (1 property) +│ │ └── Id: *string +│ ├── AutoKeyRotationError: *Object (5 properties) +│ │ ├── Code: *string +│ │ ├── Details: Object (3 properties)[] +│ │ │ ├── Code: *string +│ │ │ ├── Message: *string +│ │ │ └── Target: *string +│ │ ├── Innererror: *Object (2 properties) +│ │ │ ├── Errordetail: *string +│ │ │ └── Exceptiontype: *string +│ │ ├── Message: *string +│ │ └── Target: *string +│ ├── Conditions: conditions.Condition[] +│ ├── EncryptionType: *Enum (3 values) +│ │ ├── "ConfidentialVmEncryptedWithCustomerKey" +│ │ ├── "EncryptionAtRestWithCustomerKey" +│ │ └── "EncryptionAtRestWithPlatformAndCustomerKeys" +│ ├── FederatedClientId: *string +│ ├── Id: *string +│ ├── Identity: *Object (4 properties) +│ │ ├── PrincipalId: *string +│ │ ├── TenantId: *string +│ │ ├── Type: *Enum (4 values) +│ │ │ ├── "None" +│ │ │ ├── "SystemAssigned" +│ │ │ ├── "SystemAssigned, UserAssigned" +│ │ │ └── "UserAssigned" +│ │ └── UserAssignedIdentities: map[string]Object (2 properties) +│ │ ├── ClientId: *string +│ │ └── PrincipalId: *string +│ ├── LastKeyRotationTimestamp: *string +│ ├── Location: *string +│ ├── Name: *string +│ ├── PreviousKeys: Object (2 properties)[] +│ │ ├── KeyUrl: *string +│ │ └── SourceVault: *Object (1 property) +│ │ └── Id: *string +│ ├── ProvisioningState: *string +│ ├── RotationToLatestKeyVersionEnabled: *bool +│ ├── Tags: map[string]string +│ └── Type: *string +├── DiskEncryptionSet_STATUS_ARM: Object (7 properties) +│ ├── Id: *string +│ ├── Identity: *Object (4 properties) +│ │ ├── PrincipalId: *string +│ │ ├── TenantId: *string +│ │ ├── Type: *Enum (4 values) +│ │ │ ├── "None" +│ │ │ ├── "SystemAssigned" +│ │ │ ├── "SystemAssigned, UserAssigned" +│ │ │ └── "UserAssigned" +│ │ └── UserAssignedIdentities: map[string]Object (2 properties) +│ │ ├── ClientId: *string +│ │ └── PrincipalId: *string +│ ├── Location: *string +│ ├── Name: *string +│ ├── Properties: *Object (8 properties) +│ │ ├── ActiveKey: *Object (2 properties) +│ │ │ ├── KeyUrl: *string +│ │ │ └── SourceVault: *Object (1 property) +│ │ │ └── Id: *string +│ │ ├── AutoKeyRotationError: *Object (5 properties) +│ │ │ ├── Code: *string +│ │ │ ├── Details: Object (3 properties)[] +│ │ │ │ ├── Code: *string +│ │ │ │ ├── Message: *string +│ │ │ │ └── Target: *string +│ │ │ ├── Innererror: *Object (2 properties) +│ │ │ │ ├── Errordetail: *string +│ │ │ │ └── Exceptiontype: *string +│ │ │ ├── Message: *string +│ │ │ └── Target: *string +│ │ ├── EncryptionType: *Enum (3 values) +│ │ │ ├── "ConfidentialVmEncryptedWithCustomerKey" +│ │ │ ├── "EncryptionAtRestWithCustomerKey" +│ │ │ └── "EncryptionAtRestWithPlatformAndCustomerKeys" +│ │ ├── FederatedClientId: *string +│ │ ├── LastKeyRotationTimestamp: *string +│ │ ├── PreviousKeys: Object (2 properties)[] +│ │ │ ├── KeyUrl: *string +│ │ │ └── SourceVault: *Object (1 property) +│ │ │ └── Id: *string +│ │ ├── ProvisioningState: *string +│ │ └── RotationToLatestKeyVersionEnabled: *bool +│ ├── Tags: map[string]string +│ └── Type: *string +└── DiskEncryptionSet_Spec_ARM: Object (5 properties) + ├── Identity: *Object (2 properties) + │ ├── Type: *Enum (4 values) + │ │ ├── "None" + │ │ ├── "SystemAssigned" + │ │ ├── "SystemAssigned, UserAssigned" + │ │ └── "UserAssigned" + │ └── UserAssignedIdentities: map[string]Object (0 properties) + ├── Location: *string + ├── Name: string + ├── Properties: *Object (4 properties) + │ ├── ActiveKey: *Object (2 properties) + │ │ ├── KeyUrl: *string + │ │ └── SourceVault: *Object (1 property) + │ │ └── Id: *string + │ ├── EncryptionType: *Enum (3 values) + │ │ ├── "ConfidentialVmEncryptedWithCustomerKey" + │ │ ├── "EncryptionAtRestWithCustomerKey" + │ │ └── "EncryptionAtRestWithPlatformAndCustomerKeys" + │ ├── FederatedClientId: *string + │ └── RotationToLatestKeyVersionEnabled: *bool + └── Tags: map[string]string diff --git a/v2/api/compute/v1api20220702/zz_generated.deepcopy.go b/v2/api/compute/v1api20220702/zz_generated.deepcopy.go new file mode 100644 index 00000000000..c572c344650 --- /dev/null +++ b/v2/api/compute/v1api20220702/zz_generated.deepcopy.go @@ -0,0 +1,1000 @@ +//go:build !ignore_autogenerated + +/* +Copyright (c) Microsoft Corporation. +Licensed under the MIT license. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1api20220702 + +import ( + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApiErrorBase_STATUS) DeepCopyInto(out *ApiErrorBase_STATUS) { + *out = *in + if in.Code != nil { + in, out := &in.Code, &out.Code + *out = new(string) + **out = **in + } + if in.Message != nil { + in, out := &in.Message, &out.Message + *out = new(string) + **out = **in + } + if in.Target != nil { + in, out := &in.Target, &out.Target + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApiErrorBase_STATUS. +func (in *ApiErrorBase_STATUS) DeepCopy() *ApiErrorBase_STATUS { + if in == nil { + return nil + } + out := new(ApiErrorBase_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApiErrorBase_STATUS_ARM) DeepCopyInto(out *ApiErrorBase_STATUS_ARM) { + *out = *in + if in.Code != nil { + in, out := &in.Code, &out.Code + *out = new(string) + **out = **in + } + if in.Message != nil { + in, out := &in.Message, &out.Message + *out = new(string) + **out = **in + } + if in.Target != nil { + in, out := &in.Target, &out.Target + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApiErrorBase_STATUS_ARM. +func (in *ApiErrorBase_STATUS_ARM) DeepCopy() *ApiErrorBase_STATUS_ARM { + if in == nil { + return nil + } + out := new(ApiErrorBase_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApiError_STATUS) DeepCopyInto(out *ApiError_STATUS) { + *out = *in + if in.Code != nil { + in, out := &in.Code, &out.Code + *out = new(string) + **out = **in + } + if in.Details != nil { + in, out := &in.Details, &out.Details + *out = make([]ApiErrorBase_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Innererror != nil { + in, out := &in.Innererror, &out.Innererror + *out = new(InnerError_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Message != nil { + in, out := &in.Message, &out.Message + *out = new(string) + **out = **in + } + if in.Target != nil { + in, out := &in.Target, &out.Target + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApiError_STATUS. +func (in *ApiError_STATUS) DeepCopy() *ApiError_STATUS { + if in == nil { + return nil + } + out := new(ApiError_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApiError_STATUS_ARM) DeepCopyInto(out *ApiError_STATUS_ARM) { + *out = *in + if in.Code != nil { + in, out := &in.Code, &out.Code + *out = new(string) + **out = **in + } + if in.Details != nil { + in, out := &in.Details, &out.Details + *out = make([]ApiErrorBase_STATUS_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Innererror != nil { + in, out := &in.Innererror, &out.Innererror + *out = new(InnerError_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Message != nil { + in, out := &in.Message, &out.Message + *out = new(string) + **out = **in + } + if in.Target != nil { + in, out := &in.Target, &out.Target + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApiError_STATUS_ARM. +func (in *ApiError_STATUS_ARM) DeepCopy() *ApiError_STATUS_ARM { + if in == nil { + return nil + } + out := new(ApiError_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DiskEncryptionSet) DeepCopyInto(out *DiskEncryptionSet) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskEncryptionSet. +func (in *DiskEncryptionSet) DeepCopy() *DiskEncryptionSet { + if in == nil { + return nil + } + out := new(DiskEncryptionSet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DiskEncryptionSet) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DiskEncryptionSetList) DeepCopyInto(out *DiskEncryptionSetList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DiskEncryptionSet, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskEncryptionSetList. +func (in *DiskEncryptionSetList) DeepCopy() *DiskEncryptionSetList { + if in == nil { + return nil + } + out := new(DiskEncryptionSetList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DiskEncryptionSetList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DiskEncryptionSet_STATUS) DeepCopyInto(out *DiskEncryptionSet_STATUS) { + *out = *in + if in.ActiveKey != nil { + in, out := &in.ActiveKey, &out.ActiveKey + *out = new(KeyForDiskEncryptionSet_STATUS) + (*in).DeepCopyInto(*out) + } + if in.AutoKeyRotationError != nil { + in, out := &in.AutoKeyRotationError, &out.AutoKeyRotationError + *out = new(ApiError_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.EncryptionType != nil { + in, out := &in.EncryptionType, &out.EncryptionType + *out = new(DiskEncryptionSetType_STATUS) + **out = **in + } + if in.FederatedClientId != nil { + in, out := &in.FederatedClientId, &out.FederatedClientId + *out = new(string) + **out = **in + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(EncryptionSetIdentity_STATUS) + (*in).DeepCopyInto(*out) + } + if in.LastKeyRotationTimestamp != nil { + in, out := &in.LastKeyRotationTimestamp, &out.LastKeyRotationTimestamp + *out = new(string) + **out = **in + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PreviousKeys != nil { + in, out := &in.PreviousKeys, &out.PreviousKeys + *out = make([]KeyForDiskEncryptionSet_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ProvisioningState != nil { + in, out := &in.ProvisioningState, &out.ProvisioningState + *out = new(string) + **out = **in + } + if in.RotationToLatestKeyVersionEnabled != nil { + in, out := &in.RotationToLatestKeyVersionEnabled, &out.RotationToLatestKeyVersionEnabled + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskEncryptionSet_STATUS. +func (in *DiskEncryptionSet_STATUS) DeepCopy() *DiskEncryptionSet_STATUS { + if in == nil { + return nil + } + out := new(DiskEncryptionSet_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DiskEncryptionSet_STATUS_ARM) DeepCopyInto(out *DiskEncryptionSet_STATUS_ARM) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(EncryptionSetIdentity_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(EncryptionSetProperties_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskEncryptionSet_STATUS_ARM. +func (in *DiskEncryptionSet_STATUS_ARM) DeepCopy() *DiskEncryptionSet_STATUS_ARM { + if in == nil { + return nil + } + out := new(DiskEncryptionSet_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DiskEncryptionSet_Spec) DeepCopyInto(out *DiskEncryptionSet_Spec) { + *out = *in + if in.ActiveKey != nil { + in, out := &in.ActiveKey, &out.ActiveKey + *out = new(KeyForDiskEncryptionSet) + (*in).DeepCopyInto(*out) + } + if in.EncryptionType != nil { + in, out := &in.EncryptionType, &out.EncryptionType + *out = new(DiskEncryptionSetType) + **out = **in + } + if in.FederatedClientId != nil { + in, out := &in.FederatedClientId, &out.FederatedClientId + *out = new(string) + **out = **in + } + if in.FederatedClientIdFromConfig != nil { + in, out := &in.FederatedClientIdFromConfig, &out.FederatedClientIdFromConfig + *out = new(genruntime.ConfigMapReference) + **out = **in + } + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(EncryptionSetIdentity) + (*in).DeepCopyInto(*out) + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.RotationToLatestKeyVersionEnabled != nil { + in, out := &in.RotationToLatestKeyVersionEnabled, &out.RotationToLatestKeyVersionEnabled + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskEncryptionSet_Spec. +func (in *DiskEncryptionSet_Spec) DeepCopy() *DiskEncryptionSet_Spec { + if in == nil { + return nil + } + out := new(DiskEncryptionSet_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DiskEncryptionSet_Spec_ARM) DeepCopyInto(out *DiskEncryptionSet_Spec_ARM) { + *out = *in + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(EncryptionSetIdentity_ARM) + (*in).DeepCopyInto(*out) + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(EncryptionSetProperties_ARM) + (*in).DeepCopyInto(*out) + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskEncryptionSet_Spec_ARM. +func (in *DiskEncryptionSet_Spec_ARM) DeepCopy() *DiskEncryptionSet_Spec_ARM { + if in == nil { + return nil + } + out := new(DiskEncryptionSet_Spec_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionSetIdentity) DeepCopyInto(out *EncryptionSetIdentity) { + *out = *in + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(EncryptionSetIdentity_Type) + **out = **in + } + if in.UserAssignedIdentities != nil { + in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities + *out = make([]UserAssignedIdentityDetails, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionSetIdentity. +func (in *EncryptionSetIdentity) DeepCopy() *EncryptionSetIdentity { + if in == nil { + return nil + } + out := new(EncryptionSetIdentity) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionSetIdentity_ARM) DeepCopyInto(out *EncryptionSetIdentity_ARM) { + *out = *in + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(EncryptionSetIdentity_Type) + **out = **in + } + if in.UserAssignedIdentities != nil { + in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities + *out = make(map[string]UserAssignedIdentityDetails_ARM, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionSetIdentity_ARM. +func (in *EncryptionSetIdentity_ARM) DeepCopy() *EncryptionSetIdentity_ARM { + if in == nil { + return nil + } + out := new(EncryptionSetIdentity_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionSetIdentity_STATUS) DeepCopyInto(out *EncryptionSetIdentity_STATUS) { + *out = *in + if in.PrincipalId != nil { + in, out := &in.PrincipalId, &out.PrincipalId + *out = new(string) + **out = **in + } + if in.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(EncryptionSetIdentity_Type_STATUS) + **out = **in + } + if in.UserAssignedIdentities != nil { + in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities + *out = make(map[string]EncryptionSetIdentity_UserAssignedIdentities_STATUS, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionSetIdentity_STATUS. +func (in *EncryptionSetIdentity_STATUS) DeepCopy() *EncryptionSetIdentity_STATUS { + if in == nil { + return nil + } + out := new(EncryptionSetIdentity_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionSetIdentity_STATUS_ARM) DeepCopyInto(out *EncryptionSetIdentity_STATUS_ARM) { + *out = *in + if in.PrincipalId != nil { + in, out := &in.PrincipalId, &out.PrincipalId + *out = new(string) + **out = **in + } + if in.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(EncryptionSetIdentity_Type_STATUS) + **out = **in + } + if in.UserAssignedIdentities != nil { + in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities + *out = make(map[string]EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionSetIdentity_STATUS_ARM. +func (in *EncryptionSetIdentity_STATUS_ARM) DeepCopy() *EncryptionSetIdentity_STATUS_ARM { + if in == nil { + return nil + } + out := new(EncryptionSetIdentity_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionSetIdentity_UserAssignedIdentities_STATUS) DeepCopyInto(out *EncryptionSetIdentity_UserAssignedIdentities_STATUS) { + *out = *in + if in.ClientId != nil { + in, out := &in.ClientId, &out.ClientId + *out = new(string) + **out = **in + } + if in.PrincipalId != nil { + in, out := &in.PrincipalId, &out.PrincipalId + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionSetIdentity_UserAssignedIdentities_STATUS. +func (in *EncryptionSetIdentity_UserAssignedIdentities_STATUS) DeepCopy() *EncryptionSetIdentity_UserAssignedIdentities_STATUS { + if in == nil { + return nil + } + out := new(EncryptionSetIdentity_UserAssignedIdentities_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM) DeepCopyInto(out *EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM) { + *out = *in + if in.ClientId != nil { + in, out := &in.ClientId, &out.ClientId + *out = new(string) + **out = **in + } + if in.PrincipalId != nil { + in, out := &in.PrincipalId, &out.PrincipalId + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM. +func (in *EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM) DeepCopy() *EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM { + if in == nil { + return nil + } + out := new(EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionSetProperties_ARM) DeepCopyInto(out *EncryptionSetProperties_ARM) { + *out = *in + if in.ActiveKey != nil { + in, out := &in.ActiveKey, &out.ActiveKey + *out = new(KeyForDiskEncryptionSet_ARM) + (*in).DeepCopyInto(*out) + } + if in.EncryptionType != nil { + in, out := &in.EncryptionType, &out.EncryptionType + *out = new(DiskEncryptionSetType) + **out = **in + } + if in.FederatedClientId != nil { + in, out := &in.FederatedClientId, &out.FederatedClientId + *out = new(string) + **out = **in + } + if in.RotationToLatestKeyVersionEnabled != nil { + in, out := &in.RotationToLatestKeyVersionEnabled, &out.RotationToLatestKeyVersionEnabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionSetProperties_ARM. +func (in *EncryptionSetProperties_ARM) DeepCopy() *EncryptionSetProperties_ARM { + if in == nil { + return nil + } + out := new(EncryptionSetProperties_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionSetProperties_STATUS_ARM) DeepCopyInto(out *EncryptionSetProperties_STATUS_ARM) { + *out = *in + if in.ActiveKey != nil { + in, out := &in.ActiveKey, &out.ActiveKey + *out = new(KeyForDiskEncryptionSet_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.AutoKeyRotationError != nil { + in, out := &in.AutoKeyRotationError, &out.AutoKeyRotationError + *out = new(ApiError_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.EncryptionType != nil { + in, out := &in.EncryptionType, &out.EncryptionType + *out = new(DiskEncryptionSetType_STATUS) + **out = **in + } + if in.FederatedClientId != nil { + in, out := &in.FederatedClientId, &out.FederatedClientId + *out = new(string) + **out = **in + } + if in.LastKeyRotationTimestamp != nil { + in, out := &in.LastKeyRotationTimestamp, &out.LastKeyRotationTimestamp + *out = new(string) + **out = **in + } + if in.PreviousKeys != nil { + in, out := &in.PreviousKeys, &out.PreviousKeys + *out = make([]KeyForDiskEncryptionSet_STATUS_ARM, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ProvisioningState != nil { + in, out := &in.ProvisioningState, &out.ProvisioningState + *out = new(string) + **out = **in + } + if in.RotationToLatestKeyVersionEnabled != nil { + in, out := &in.RotationToLatestKeyVersionEnabled, &out.RotationToLatestKeyVersionEnabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionSetProperties_STATUS_ARM. +func (in *EncryptionSetProperties_STATUS_ARM) DeepCopy() *EncryptionSetProperties_STATUS_ARM { + if in == nil { + return nil + } + out := new(EncryptionSetProperties_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InnerError_STATUS) DeepCopyInto(out *InnerError_STATUS) { + *out = *in + if in.Errordetail != nil { + in, out := &in.Errordetail, &out.Errordetail + *out = new(string) + **out = **in + } + if in.Exceptiontype != nil { + in, out := &in.Exceptiontype, &out.Exceptiontype + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InnerError_STATUS. +func (in *InnerError_STATUS) DeepCopy() *InnerError_STATUS { + if in == nil { + return nil + } + out := new(InnerError_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InnerError_STATUS_ARM) DeepCopyInto(out *InnerError_STATUS_ARM) { + *out = *in + if in.Errordetail != nil { + in, out := &in.Errordetail, &out.Errordetail + *out = new(string) + **out = **in + } + if in.Exceptiontype != nil { + in, out := &in.Exceptiontype, &out.Exceptiontype + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InnerError_STATUS_ARM. +func (in *InnerError_STATUS_ARM) DeepCopy() *InnerError_STATUS_ARM { + if in == nil { + return nil + } + out := new(InnerError_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyForDiskEncryptionSet) DeepCopyInto(out *KeyForDiskEncryptionSet) { + *out = *in + if in.KeyUrl != nil { + in, out := &in.KeyUrl, &out.KeyUrl + *out = new(string) + **out = **in + } + if in.KeyUrlFromConfig != nil { + in, out := &in.KeyUrlFromConfig, &out.KeyUrlFromConfig + *out = new(genruntime.ConfigMapReference) + **out = **in + } + if in.SourceVault != nil { + in, out := &in.SourceVault, &out.SourceVault + *out = new(SourceVault) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyForDiskEncryptionSet. +func (in *KeyForDiskEncryptionSet) DeepCopy() *KeyForDiskEncryptionSet { + if in == nil { + return nil + } + out := new(KeyForDiskEncryptionSet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyForDiskEncryptionSet_ARM) DeepCopyInto(out *KeyForDiskEncryptionSet_ARM) { + *out = *in + if in.KeyUrl != nil { + in, out := &in.KeyUrl, &out.KeyUrl + *out = new(string) + **out = **in + } + if in.SourceVault != nil { + in, out := &in.SourceVault, &out.SourceVault + *out = new(SourceVault_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyForDiskEncryptionSet_ARM. +func (in *KeyForDiskEncryptionSet_ARM) DeepCopy() *KeyForDiskEncryptionSet_ARM { + if in == nil { + return nil + } + out := new(KeyForDiskEncryptionSet_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyForDiskEncryptionSet_STATUS) DeepCopyInto(out *KeyForDiskEncryptionSet_STATUS) { + *out = *in + if in.KeyUrl != nil { + in, out := &in.KeyUrl, &out.KeyUrl + *out = new(string) + **out = **in + } + if in.SourceVault != nil { + in, out := &in.SourceVault, &out.SourceVault + *out = new(SourceVault_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyForDiskEncryptionSet_STATUS. +func (in *KeyForDiskEncryptionSet_STATUS) DeepCopy() *KeyForDiskEncryptionSet_STATUS { + if in == nil { + return nil + } + out := new(KeyForDiskEncryptionSet_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyForDiskEncryptionSet_STATUS_ARM) DeepCopyInto(out *KeyForDiskEncryptionSet_STATUS_ARM) { + *out = *in + if in.KeyUrl != nil { + in, out := &in.KeyUrl, &out.KeyUrl + *out = new(string) + **out = **in + } + if in.SourceVault != nil { + in, out := &in.SourceVault, &out.SourceVault + *out = new(SourceVault_STATUS_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyForDiskEncryptionSet_STATUS_ARM. +func (in *KeyForDiskEncryptionSet_STATUS_ARM) DeepCopy() *KeyForDiskEncryptionSet_STATUS_ARM { + if in == nil { + return nil + } + out := new(KeyForDiskEncryptionSet_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceVault) DeepCopyInto(out *SourceVault) { + *out = *in + if in.Reference != nil { + in, out := &in.Reference, &out.Reference + *out = new(genruntime.ResourceReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceVault. +func (in *SourceVault) DeepCopy() *SourceVault { + if in == nil { + return nil + } + out := new(SourceVault) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceVault_ARM) DeepCopyInto(out *SourceVault_ARM) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceVault_ARM. +func (in *SourceVault_ARM) DeepCopy() *SourceVault_ARM { + if in == nil { + return nil + } + out := new(SourceVault_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceVault_STATUS) DeepCopyInto(out *SourceVault_STATUS) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceVault_STATUS. +func (in *SourceVault_STATUS) DeepCopy() *SourceVault_STATUS { + if in == nil { + return nil + } + out := new(SourceVault_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceVault_STATUS_ARM) DeepCopyInto(out *SourceVault_STATUS_ARM) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceVault_STATUS_ARM. +func (in *SourceVault_STATUS_ARM) DeepCopy() *SourceVault_STATUS_ARM { + if in == nil { + return nil + } + out := new(SourceVault_STATUS_ARM) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserAssignedIdentityDetails) DeepCopyInto(out *UserAssignedIdentityDetails) { + *out = *in + out.Reference = in.Reference +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAssignedIdentityDetails. +func (in *UserAssignedIdentityDetails) DeepCopy() *UserAssignedIdentityDetails { + if in == nil { + return nil + } + out := new(UserAssignedIdentityDetails) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserAssignedIdentityDetails_ARM) DeepCopyInto(out *UserAssignedIdentityDetails_ARM) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAssignedIdentityDetails_ARM. +func (in *UserAssignedIdentityDetails_ARM) DeepCopy() *UserAssignedIdentityDetails_ARM { + if in == nil { + return nil + } + out := new(UserAssignedIdentityDetails_ARM) + in.DeepCopyInto(out) + return out +} diff --git a/v2/api/compute/v1api20220702storage/disk_encryption_set_types_gen.go b/v2/api/compute/v1api20220702storage/disk_encryption_set_types_gen.go new file mode 100644 index 00000000000..0cef61577c8 --- /dev/null +++ b/v2/api/compute/v1api20220702storage/disk_encryption_set_types_gen.go @@ -0,0 +1,326 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20220702storage + +import ( + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// +kubebuilder:rbac:groups=compute.azure.com,resources=diskencryptionsets,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=compute.azure.com,resources={diskencryptionsets/status,diskencryptionsets/finalizers},verbs=get;update;patch + +// +kubebuilder:object:root=true +// +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 v1api20220702.DiskEncryptionSet +// Generator information: +// - Generated from: /compute/resource-manager/Microsoft.Compute/DiskRP/stable/2022-07-02/diskEncryptionSet.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName} +type DiskEncryptionSet struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec DiskEncryptionSet_Spec `json:"spec,omitempty"` + Status DiskEncryptionSet_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &DiskEncryptionSet{} + +// GetConditions returns the conditions of the resource +func (encryptionSet *DiskEncryptionSet) GetConditions() conditions.Conditions { + return encryptionSet.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (encryptionSet *DiskEncryptionSet) SetConditions(conditions conditions.Conditions) { + encryptionSet.Status.Conditions = conditions +} + +var _ genruntime.KubernetesResource = &DiskEncryptionSet{} + +// AzureName returns the Azure name of the resource +func (encryptionSet *DiskEncryptionSet) AzureName() string { + return encryptionSet.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2022-07-02" +func (encryptionSet DiskEncryptionSet) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (encryptionSet *DiskEncryptionSet) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (encryptionSet *DiskEncryptionSet) GetSpec() genruntime.ConvertibleSpec { + return &encryptionSet.Spec +} + +// GetStatus returns the status of this resource +func (encryptionSet *DiskEncryptionSet) GetStatus() genruntime.ConvertibleStatus { + return &encryptionSet.Status +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.Compute/diskEncryptionSets" +func (encryptionSet *DiskEncryptionSet) GetType() string { + return "Microsoft.Compute/diskEncryptionSets" +} + +// NewEmptyStatus returns a new empty (blank) status +func (encryptionSet *DiskEncryptionSet) NewEmptyStatus() genruntime.ConvertibleStatus { + return &DiskEncryptionSet_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (encryptionSet *DiskEncryptionSet) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(encryptionSet.Spec) + return &genruntime.ResourceReference{ + Group: group, + Kind: kind, + Name: encryptionSet.Spec.Owner.Name, + } +} + +// SetStatus sets the status of this resource +func (encryptionSet *DiskEncryptionSet) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*DiskEncryptionSet_STATUS); ok { + encryptionSet.Status = *st + return nil + } + + // Convert status to required version + var st DiskEncryptionSet_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + encryptionSet.Status = st + return nil +} + +// Hub marks that this DiskEncryptionSet is the hub type for conversion +func (encryptionSet *DiskEncryptionSet) Hub() {} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (encryptionSet *DiskEncryptionSet) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: encryptionSet.Spec.OriginalVersion, + Kind: "DiskEncryptionSet", + } +} + +// +kubebuilder:object:root=true +// Storage version of v1api20220702.DiskEncryptionSet +// Generator information: +// - Generated from: /compute/resource-manager/Microsoft.Compute/DiskRP/stable/2022-07-02/diskEncryptionSet.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName} +type DiskEncryptionSetList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DiskEncryptionSet `json:"items"` +} + +// Storage version of v1api20220702.APIVersion +// +kubebuilder:validation:Enum={"2022-07-02"} +type APIVersion string + +const APIVersion_Value = APIVersion("2022-07-02") + +// Storage version of v1api20220702.DiskEncryptionSet_Spec +type DiskEncryptionSet_Spec struct { + ActiveKey *KeyForDiskEncryptionSet `json:"activeKey,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"` + EncryptionType *string `json:"encryptionType,omitempty"` + FederatedClientId *string `json:"federatedClientId,omitempty" optionalConfigMapPair:"FederatedClientId"` + FederatedClientIdFromConfig *genruntime.ConfigMapReference `json:"federatedClientIdFromConfig,omitempty" optionalConfigMapPair:"FederatedClientId"` + Identity *EncryptionSetIdentity `json:"identity,omitempty"` + Location *string `json:"location,omitempty"` + OriginalVersion string `json:"originalVersion,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"` + Tags map[string]string `json:"tags,omitempty"` +} + +var _ genruntime.ConvertibleSpec = &DiskEncryptionSet_Spec{} + +// ConvertSpecFrom populates our DiskEncryptionSet_Spec from the provided source +func (encryptionSet *DiskEncryptionSet_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + if source == encryptionSet { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return source.ConvertSpecTo(encryptionSet) +} + +// ConvertSpecTo populates the provided destination from our DiskEncryptionSet_Spec +func (encryptionSet *DiskEncryptionSet_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + if destination == encryptionSet { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return destination.ConvertSpecFrom(encryptionSet) +} + +// Storage version of v1api20220702.DiskEncryptionSet_STATUS +// disk encryption set resource. +type DiskEncryptionSet_STATUS struct { + ActiveKey *KeyForDiskEncryptionSet_STATUS `json:"activeKey,omitempty"` + AutoKeyRotationError *ApiError_STATUS `json:"autoKeyRotationError,omitempty"` + Conditions []conditions.Condition `json:"conditions,omitempty"` + EncryptionType *string `json:"encryptionType,omitempty"` + FederatedClientId *string `json:"federatedClientId,omitempty"` + Id *string `json:"id,omitempty"` + Identity *EncryptionSetIdentity_STATUS `json:"identity,omitempty"` + LastKeyRotationTimestamp *string `json:"lastKeyRotationTimestamp,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + PreviousKeys []KeyForDiskEncryptionSet_STATUS `json:"previousKeys,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"` + Tags map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &DiskEncryptionSet_STATUS{} + +// ConvertStatusFrom populates our DiskEncryptionSet_STATUS from the provided source +func (encryptionSet *DiskEncryptionSet_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + if source == encryptionSet { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return source.ConvertStatusTo(encryptionSet) +} + +// ConvertStatusTo populates the provided destination from our DiskEncryptionSet_STATUS +func (encryptionSet *DiskEncryptionSet_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + if destination == encryptionSet { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return destination.ConvertStatusFrom(encryptionSet) +} + +// Storage version of v1api20220702.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"` +} + +// Storage version of v1api20220702.EncryptionSetIdentity +// The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used +// to encrypt disks. +type EncryptionSetIdentity struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Type *string `json:"type,omitempty"` + UserAssignedIdentities []UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"` +} + +// Storage version of v1api20220702.EncryptionSetIdentity_STATUS +// The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used +// to encrypt disks. +type EncryptionSetIdentity_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]EncryptionSetIdentity_UserAssignedIdentities_STATUS `json:"userAssignedIdentities,omitempty"` +} + +// Storage version of v1api20220702.KeyForDiskEncryptionSet +// Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots +type KeyForDiskEncryptionSet struct { + KeyUrl *string `json:"keyUrl,omitempty" optionalConfigMapPair:"KeyUrl"` + KeyUrlFromConfig *genruntime.ConfigMapReference `json:"keyUrlFromConfig,omitempty" optionalConfigMapPair:"KeyUrl"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SourceVault *SourceVault `json:"sourceVault,omitempty"` +} + +// Storage version of v1api20220702.KeyForDiskEncryptionSet_STATUS +// Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots +type KeyForDiskEncryptionSet_STATUS struct { + KeyUrl *string `json:"keyUrl,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SourceVault *SourceVault_STATUS `json:"sourceVault,omitempty"` +} + +// Storage version of v1api20220702.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"` +} + +// Storage version of v1api20220702.EncryptionSetIdentity_UserAssignedIdentities_STATUS +type EncryptionSetIdentity_UserAssignedIdentities_STATUS struct { + ClientId *string `json:"clientId,omitempty"` + PrincipalId *string `json:"principalId,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20220702.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"` +} + +// Storage version of v1api20220702.SourceVault +// The vault id is an Azure Resource Manager Resource id in the form +// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} +type SourceVault struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + + // Reference: Resource Id + Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"` +} + +// Storage version of v1api20220702.SourceVault_STATUS +// The vault id is an Azure Resource Manager Resource id in the form +// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} +type SourceVault_STATUS struct { + Id *string `json:"id,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// Storage version of v1api20220702.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"` +} + +func init() { + SchemeBuilder.Register(&DiskEncryptionSet{}, &DiskEncryptionSetList{}) +} diff --git a/v2/api/compute/v1api20220702storage/disk_encryption_set_types_gen_test.go b/v2/api/compute/v1api20220702storage/disk_encryption_set_types_gen_test.go new file mode 100644 index 00000000000..6fefee2e61b --- /dev/null +++ b/v2/api/compute/v1api20220702storage/disk_encryption_set_types_gen_test.go @@ -0,0 +1,982 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20220702storage + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_DiskEncryptionSet_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DiskEncryptionSet via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDiskEncryptionSet, DiskEncryptionSetGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDiskEncryptionSet runs a test to see if a specific instance of DiskEncryptionSet round trips to JSON and back losslessly +func RunJSONSerializationTestForDiskEncryptionSet(subject DiskEncryptionSet) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DiskEncryptionSet + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DiskEncryptionSet instances for property testing - lazily instantiated by DiskEncryptionSetGenerator() +var diskEncryptionSetGenerator gopter.Gen + +// DiskEncryptionSetGenerator returns a generator of DiskEncryptionSet instances for property testing. +func DiskEncryptionSetGenerator() gopter.Gen { + if diskEncryptionSetGenerator != nil { + return diskEncryptionSetGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForDiskEncryptionSet(generators) + diskEncryptionSetGenerator = gen.Struct(reflect.TypeOf(DiskEncryptionSet{}), generators) + + return diskEncryptionSetGenerator +} + +// AddRelatedPropertyGeneratorsForDiskEncryptionSet is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForDiskEncryptionSet(gens map[string]gopter.Gen) { + gens["Spec"] = DiskEncryptionSet_SpecGenerator() + gens["Status"] = DiskEncryptionSet_STATUSGenerator() +} + +func Test_DiskEncryptionSet_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DiskEncryptionSet_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDiskEncryptionSet_Spec, DiskEncryptionSet_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDiskEncryptionSet_Spec runs a test to see if a specific instance of DiskEncryptionSet_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForDiskEncryptionSet_Spec(subject DiskEncryptionSet_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DiskEncryptionSet_Spec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DiskEncryptionSet_Spec instances for property testing - lazily instantiated by +// DiskEncryptionSet_SpecGenerator() +var diskEncryptionSet_SpecGenerator gopter.Gen + +// DiskEncryptionSet_SpecGenerator returns a generator of DiskEncryptionSet_Spec instances for property testing. +// We first initialize diskEncryptionSet_SpecGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func DiskEncryptionSet_SpecGenerator() gopter.Gen { + if diskEncryptionSet_SpecGenerator != nil { + return diskEncryptionSet_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDiskEncryptionSet_Spec(generators) + diskEncryptionSet_SpecGenerator = gen.Struct(reflect.TypeOf(DiskEncryptionSet_Spec{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDiskEncryptionSet_Spec(generators) + AddRelatedPropertyGeneratorsForDiskEncryptionSet_Spec(generators) + diskEncryptionSet_SpecGenerator = gen.Struct(reflect.TypeOf(DiskEncryptionSet_Spec{}), generators) + + return diskEncryptionSet_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForDiskEncryptionSet_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDiskEncryptionSet_Spec(gens map[string]gopter.Gen) { + gens["AzureName"] = gen.AlphaString() + gens["EncryptionType"] = gen.PtrOf(gen.AlphaString()) + gens["FederatedClientId"] = gen.PtrOf(gen.AlphaString()) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["OriginalVersion"] = gen.AlphaString() + gens["RotationToLatestKeyVersionEnabled"] = gen.PtrOf(gen.Bool()) + gens["Tags"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForDiskEncryptionSet_Spec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForDiskEncryptionSet_Spec(gens map[string]gopter.Gen) { + gens["ActiveKey"] = gen.PtrOf(KeyForDiskEncryptionSetGenerator()) + gens["Identity"] = gen.PtrOf(EncryptionSetIdentityGenerator()) +} + +func Test_DiskEncryptionSet_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DiskEncryptionSet_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDiskEncryptionSet_STATUS, DiskEncryptionSet_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDiskEncryptionSet_STATUS runs a test to see if a specific instance of DiskEncryptionSet_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForDiskEncryptionSet_STATUS(subject DiskEncryptionSet_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DiskEncryptionSet_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DiskEncryptionSet_STATUS instances for property testing - lazily instantiated by +// DiskEncryptionSet_STATUSGenerator() +var diskEncryptionSet_STATUSGenerator gopter.Gen + +// DiskEncryptionSet_STATUSGenerator returns a generator of DiskEncryptionSet_STATUS instances for property testing. +// We first initialize diskEncryptionSet_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func DiskEncryptionSet_STATUSGenerator() gopter.Gen { + if diskEncryptionSet_STATUSGenerator != nil { + return diskEncryptionSet_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDiskEncryptionSet_STATUS(generators) + diskEncryptionSet_STATUSGenerator = gen.Struct(reflect.TypeOf(DiskEncryptionSet_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDiskEncryptionSet_STATUS(generators) + AddRelatedPropertyGeneratorsForDiskEncryptionSet_STATUS(generators) + diskEncryptionSet_STATUSGenerator = gen.Struct(reflect.TypeOf(DiskEncryptionSet_STATUS{}), generators) + + return diskEncryptionSet_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForDiskEncryptionSet_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDiskEncryptionSet_STATUS(gens map[string]gopter.Gen) { + gens["EncryptionType"] = gen.PtrOf(gen.AlphaString()) + gens["FederatedClientId"] = gen.PtrOf(gen.AlphaString()) + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["LastKeyRotationTimestamp"] = gen.PtrOf(gen.AlphaString()) + gens["Location"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["ProvisioningState"] = gen.PtrOf(gen.AlphaString()) + gens["RotationToLatestKeyVersionEnabled"] = gen.PtrOf(gen.Bool()) + gens["Tags"] = gen.MapOf(gen.AlphaString(), gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForDiskEncryptionSet_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForDiskEncryptionSet_STATUS(gens map[string]gopter.Gen) { + gens["ActiveKey"] = gen.PtrOf(KeyForDiskEncryptionSet_STATUSGenerator()) + gens["AutoKeyRotationError"] = gen.PtrOf(ApiError_STATUSGenerator()) + gens["Identity"] = gen.PtrOf(EncryptionSetIdentity_STATUSGenerator()) + gens["PreviousKeys"] = gen.SliceOf(KeyForDiskEncryptionSet_STATUSGenerator()) +} + +func Test_ApiError_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ApiError_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForApiError_STATUS, ApiError_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForApiError_STATUS runs a test to see if a specific instance of ApiError_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForApiError_STATUS(subject ApiError_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ApiError_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ApiError_STATUS instances for property testing - lazily instantiated by ApiError_STATUSGenerator() +var apiError_STATUSGenerator gopter.Gen + +// ApiError_STATUSGenerator returns a generator of ApiError_STATUS instances for property testing. +// We first initialize apiError_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ApiError_STATUSGenerator() gopter.Gen { + if apiError_STATUSGenerator != nil { + return apiError_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForApiError_STATUS(generators) + apiError_STATUSGenerator = gen.Struct(reflect.TypeOf(ApiError_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForApiError_STATUS(generators) + AddRelatedPropertyGeneratorsForApiError_STATUS(generators) + apiError_STATUSGenerator = gen.Struct(reflect.TypeOf(ApiError_STATUS{}), generators) + + return apiError_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForApiError_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForApiError_STATUS(gens map[string]gopter.Gen) { + gens["Code"] = gen.PtrOf(gen.AlphaString()) + gens["Message"] = gen.PtrOf(gen.AlphaString()) + gens["Target"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForApiError_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForApiError_STATUS(gens map[string]gopter.Gen) { + gens["Details"] = gen.SliceOf(ApiErrorBase_STATUSGenerator()) + gens["Innererror"] = gen.PtrOf(InnerError_STATUSGenerator()) +} + +func Test_EncryptionSetIdentity_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionSetIdentity via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionSetIdentity, EncryptionSetIdentityGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionSetIdentity runs a test to see if a specific instance of EncryptionSetIdentity round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionSetIdentity(subject EncryptionSetIdentity) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionSetIdentity + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionSetIdentity instances for property testing - lazily instantiated by +// EncryptionSetIdentityGenerator() +var encryptionSetIdentityGenerator gopter.Gen + +// EncryptionSetIdentityGenerator returns a generator of EncryptionSetIdentity instances for property testing. +// We first initialize encryptionSetIdentityGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func EncryptionSetIdentityGenerator() gopter.Gen { + if encryptionSetIdentityGenerator != nil { + return encryptionSetIdentityGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionSetIdentity(generators) + encryptionSetIdentityGenerator = gen.Struct(reflect.TypeOf(EncryptionSetIdentity{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionSetIdentity(generators) + AddRelatedPropertyGeneratorsForEncryptionSetIdentity(generators) + encryptionSetIdentityGenerator = gen.Struct(reflect.TypeOf(EncryptionSetIdentity{}), generators) + + return encryptionSetIdentityGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionSetIdentity is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionSetIdentity(gens map[string]gopter.Gen) { + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForEncryptionSetIdentity is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryptionSetIdentity(gens map[string]gopter.Gen) { + gens["UserAssignedIdentities"] = gen.SliceOf(UserAssignedIdentityDetailsGenerator()) +} + +func Test_EncryptionSetIdentity_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionSetIdentity_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionSetIdentity_STATUS, EncryptionSetIdentity_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionSetIdentity_STATUS runs a test to see if a specific instance of EncryptionSetIdentity_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionSetIdentity_STATUS(subject EncryptionSetIdentity_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionSetIdentity_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionSetIdentity_STATUS instances for property testing - lazily instantiated by +// EncryptionSetIdentity_STATUSGenerator() +var encryptionSetIdentity_STATUSGenerator gopter.Gen + +// EncryptionSetIdentity_STATUSGenerator returns a generator of EncryptionSetIdentity_STATUS instances for property testing. +// We first initialize encryptionSetIdentity_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func EncryptionSetIdentity_STATUSGenerator() gopter.Gen { + if encryptionSetIdentity_STATUSGenerator != nil { + return encryptionSetIdentity_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionSetIdentity_STATUS(generators) + encryptionSetIdentity_STATUSGenerator = gen.Struct(reflect.TypeOf(EncryptionSetIdentity_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionSetIdentity_STATUS(generators) + AddRelatedPropertyGeneratorsForEncryptionSetIdentity_STATUS(generators) + encryptionSetIdentity_STATUSGenerator = gen.Struct(reflect.TypeOf(EncryptionSetIdentity_STATUS{}), generators) + + return encryptionSetIdentity_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionSetIdentity_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionSetIdentity_STATUS(gens map[string]gopter.Gen) { + gens["PrincipalId"] = gen.PtrOf(gen.AlphaString()) + gens["TenantId"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForEncryptionSetIdentity_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForEncryptionSetIdentity_STATUS(gens map[string]gopter.Gen) { + gens["UserAssignedIdentities"] = gen.MapOf(gen.AlphaString(), EncryptionSetIdentity_UserAssignedIdentities_STATUSGenerator()) +} + +func Test_KeyForDiskEncryptionSet_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyForDiskEncryptionSet via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyForDiskEncryptionSet, KeyForDiskEncryptionSetGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyForDiskEncryptionSet runs a test to see if a specific instance of KeyForDiskEncryptionSet round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyForDiskEncryptionSet(subject KeyForDiskEncryptionSet) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyForDiskEncryptionSet + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyForDiskEncryptionSet instances for property testing - lazily instantiated by +// KeyForDiskEncryptionSetGenerator() +var keyForDiskEncryptionSetGenerator gopter.Gen + +// KeyForDiskEncryptionSetGenerator returns a generator of KeyForDiskEncryptionSet instances for property testing. +// We first initialize keyForDiskEncryptionSetGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func KeyForDiskEncryptionSetGenerator() gopter.Gen { + if keyForDiskEncryptionSetGenerator != nil { + return keyForDiskEncryptionSetGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet(generators) + keyForDiskEncryptionSetGenerator = gen.Struct(reflect.TypeOf(KeyForDiskEncryptionSet{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet(generators) + AddRelatedPropertyGeneratorsForKeyForDiskEncryptionSet(generators) + keyForDiskEncryptionSetGenerator = gen.Struct(reflect.TypeOf(KeyForDiskEncryptionSet{}), generators) + + return keyForDiskEncryptionSetGenerator +} + +// AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet(gens map[string]gopter.Gen) { + gens["KeyUrl"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForKeyForDiskEncryptionSet is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForKeyForDiskEncryptionSet(gens map[string]gopter.Gen) { + gens["SourceVault"] = gen.PtrOf(SourceVaultGenerator()) +} + +func Test_KeyForDiskEncryptionSet_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of KeyForDiskEncryptionSet_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForKeyForDiskEncryptionSet_STATUS, KeyForDiskEncryptionSet_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForKeyForDiskEncryptionSet_STATUS runs a test to see if a specific instance of KeyForDiskEncryptionSet_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForKeyForDiskEncryptionSet_STATUS(subject KeyForDiskEncryptionSet_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual KeyForDiskEncryptionSet_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of KeyForDiskEncryptionSet_STATUS instances for property testing - lazily instantiated by +// KeyForDiskEncryptionSet_STATUSGenerator() +var keyForDiskEncryptionSet_STATUSGenerator gopter.Gen + +// KeyForDiskEncryptionSet_STATUSGenerator returns a generator of KeyForDiskEncryptionSet_STATUS instances for property testing. +// We first initialize keyForDiskEncryptionSet_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func KeyForDiskEncryptionSet_STATUSGenerator() gopter.Gen { + if keyForDiskEncryptionSet_STATUSGenerator != nil { + return keyForDiskEncryptionSet_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS(generators) + keyForDiskEncryptionSet_STATUSGenerator = gen.Struct(reflect.TypeOf(KeyForDiskEncryptionSet_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS(generators) + AddRelatedPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS(generators) + keyForDiskEncryptionSet_STATUSGenerator = gen.Struct(reflect.TypeOf(KeyForDiskEncryptionSet_STATUS{}), generators) + + return keyForDiskEncryptionSet_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS(gens map[string]gopter.Gen) { + gens["KeyUrl"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForKeyForDiskEncryptionSet_STATUS(gens map[string]gopter.Gen) { + gens["SourceVault"] = gen.PtrOf(SourceVault_STATUSGenerator()) +} + +func Test_ApiErrorBase_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ApiErrorBase_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForApiErrorBase_STATUS, ApiErrorBase_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForApiErrorBase_STATUS runs a test to see if a specific instance of ApiErrorBase_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForApiErrorBase_STATUS(subject ApiErrorBase_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ApiErrorBase_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of ApiErrorBase_STATUS instances for property testing - lazily instantiated by +// ApiErrorBase_STATUSGenerator() +var apiErrorBase_STATUSGenerator gopter.Gen + +// ApiErrorBase_STATUSGenerator returns a generator of ApiErrorBase_STATUS instances for property testing. +func ApiErrorBase_STATUSGenerator() gopter.Gen { + if apiErrorBase_STATUSGenerator != nil { + return apiErrorBase_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForApiErrorBase_STATUS(generators) + apiErrorBase_STATUSGenerator = gen.Struct(reflect.TypeOf(ApiErrorBase_STATUS{}), generators) + + return apiErrorBase_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForApiErrorBase_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForApiErrorBase_STATUS(gens map[string]gopter.Gen) { + gens["Code"] = gen.PtrOf(gen.AlphaString()) + gens["Message"] = gen.PtrOf(gen.AlphaString()) + gens["Target"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_EncryptionSetIdentity_UserAssignedIdentities_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of EncryptionSetIdentity_UserAssignedIdentities_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForEncryptionSetIdentity_UserAssignedIdentities_STATUS, EncryptionSetIdentity_UserAssignedIdentities_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForEncryptionSetIdentity_UserAssignedIdentities_STATUS runs a test to see if a specific instance of EncryptionSetIdentity_UserAssignedIdentities_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForEncryptionSetIdentity_UserAssignedIdentities_STATUS(subject EncryptionSetIdentity_UserAssignedIdentities_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual EncryptionSetIdentity_UserAssignedIdentities_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of EncryptionSetIdentity_UserAssignedIdentities_STATUS instances for property testing - lazily instantiated +// by EncryptionSetIdentity_UserAssignedIdentities_STATUSGenerator() +var encryptionSetIdentity_UserAssignedIdentities_STATUSGenerator gopter.Gen + +// EncryptionSetIdentity_UserAssignedIdentities_STATUSGenerator returns a generator of EncryptionSetIdentity_UserAssignedIdentities_STATUS instances for property testing. +func EncryptionSetIdentity_UserAssignedIdentities_STATUSGenerator() gopter.Gen { + if encryptionSetIdentity_UserAssignedIdentities_STATUSGenerator != nil { + return encryptionSetIdentity_UserAssignedIdentities_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForEncryptionSetIdentity_UserAssignedIdentities_STATUS(generators) + encryptionSetIdentity_UserAssignedIdentities_STATUSGenerator = gen.Struct(reflect.TypeOf(EncryptionSetIdentity_UserAssignedIdentities_STATUS{}), generators) + + return encryptionSetIdentity_UserAssignedIdentities_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForEncryptionSetIdentity_UserAssignedIdentities_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForEncryptionSetIdentity_UserAssignedIdentities_STATUS(gens map[string]gopter.Gen) { + gens["ClientId"] = gen.PtrOf(gen.AlphaString()) + gens["PrincipalId"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_InnerError_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of InnerError_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForInnerError_STATUS, InnerError_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForInnerError_STATUS runs a test to see if a specific instance of InnerError_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForInnerError_STATUS(subject InnerError_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual InnerError_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of InnerError_STATUS instances for property testing - lazily instantiated by InnerError_STATUSGenerator() +var innerError_STATUSGenerator gopter.Gen + +// InnerError_STATUSGenerator returns a generator of InnerError_STATUS instances for property testing. +func InnerError_STATUSGenerator() gopter.Gen { + if innerError_STATUSGenerator != nil { + return innerError_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForInnerError_STATUS(generators) + innerError_STATUSGenerator = gen.Struct(reflect.TypeOf(InnerError_STATUS{}), generators) + + return innerError_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForInnerError_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForInnerError_STATUS(gens map[string]gopter.Gen) { + gens["Errordetail"] = gen.PtrOf(gen.AlphaString()) + gens["Exceptiontype"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_SourceVault_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SourceVault via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSourceVault, SourceVaultGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSourceVault runs a test to see if a specific instance of SourceVault round trips to JSON and back losslessly +func RunJSONSerializationTestForSourceVault(subject SourceVault) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SourceVault + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SourceVault instances for property testing - lazily instantiated by SourceVaultGenerator() +var sourceVaultGenerator gopter.Gen + +// SourceVaultGenerator returns a generator of SourceVault instances for property testing. +func SourceVaultGenerator() gopter.Gen { + if sourceVaultGenerator != nil { + return sourceVaultGenerator + } + + generators := make(map[string]gopter.Gen) + sourceVaultGenerator = gen.Struct(reflect.TypeOf(SourceVault{}), generators) + + return sourceVaultGenerator +} + +func Test_SourceVault_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SourceVault_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSourceVault_STATUS, SourceVault_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSourceVault_STATUS runs a test to see if a specific instance of SourceVault_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForSourceVault_STATUS(subject SourceVault_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SourceVault_STATUS + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SourceVault_STATUS instances for property testing - lazily instantiated by SourceVault_STATUSGenerator() +var sourceVault_STATUSGenerator gopter.Gen + +// SourceVault_STATUSGenerator returns a generator of SourceVault_STATUS instances for property testing. +func SourceVault_STATUSGenerator() gopter.Gen { + if sourceVault_STATUSGenerator != nil { + return sourceVault_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForSourceVault_STATUS(generators) + sourceVault_STATUSGenerator = gen.Struct(reflect.TypeOf(SourceVault_STATUS{}), generators) + + return sourceVault_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForSourceVault_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForSourceVault_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) +} + +func Test_UserAssignedIdentityDetails_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of UserAssignedIdentityDetails via JSON returns original", + prop.ForAll(RunJSONSerializationTestForUserAssignedIdentityDetails, UserAssignedIdentityDetailsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForUserAssignedIdentityDetails runs a test to see if a specific instance of UserAssignedIdentityDetails round trips to JSON and back losslessly +func RunJSONSerializationTestForUserAssignedIdentityDetails(subject UserAssignedIdentityDetails) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual UserAssignedIdentityDetails + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of UserAssignedIdentityDetails instances for property testing - lazily instantiated by +// UserAssignedIdentityDetailsGenerator() +var userAssignedIdentityDetailsGenerator gopter.Gen + +// UserAssignedIdentityDetailsGenerator returns a generator of UserAssignedIdentityDetails instances for property testing. +func UserAssignedIdentityDetailsGenerator() gopter.Gen { + if userAssignedIdentityDetailsGenerator != nil { + return userAssignedIdentityDetailsGenerator + } + + generators := make(map[string]gopter.Gen) + userAssignedIdentityDetailsGenerator = gen.Struct(reflect.TypeOf(UserAssignedIdentityDetails{}), generators) + + return userAssignedIdentityDetailsGenerator +} diff --git a/v2/api/compute/v1api20220702storage/groupversion_info_gen.go b/v2/api/compute/v1api20220702storage/groupversion_info_gen.go new file mode 100644 index 00000000000..8a9126ad2e3 --- /dev/null +++ b/v2/api/compute/v1api20220702storage/groupversion_info_gen.go @@ -0,0 +1,31 @@ +/* +Copyright (c) Microsoft Corporation. +Licensed under the MIT license. +*/ + +// Code generated by azure-service-operator-codegen. DO NOT EDIT. + +// Package v1api20220702storage contains API Schema definitions for the compute v1api20220702storage API group +// +kubebuilder:object:generate=true +// All object properties are optional by default, this will be overridden when needed: +// +kubebuilder:validation:Optional +// +groupName=compute.azure.com +package v1api20220702storage + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "compute.azure.com", Version: "v1api20220702storage"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme + + localSchemeBuilder = SchemeBuilder.SchemeBuilder +) diff --git a/v2/api/compute/v1api20220702storage/structure.txt b/v2/api/compute/v1api20220702storage/structure.txt new file mode 100644 index 00000000000..be7b0927f3e --- /dev/null +++ b/v2/api/compute/v1api20220702storage/structure.txt @@ -0,0 +1,78 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +github.com/Azure/azure-service-operator/v2/api/compute/v1api20220702storage +├── APIVersion: Enum (1 value) +│ └── "2022-07-02" +└── DiskEncryptionSet: Resource + ├── Owner: github.com/Azure/azure-service-operator/v2/api/resources/v1apiv20191001.ResourceGroup + ├── Spec: Object (12 properties) + │ ├── ActiveKey: *Object (4 properties) + │ │ ├── KeyUrl: *string + │ │ ├── KeyUrlFromConfig: *genruntime.ConfigMapReference + │ │ ├── PropertyBag: genruntime.PropertyBag + │ │ └── SourceVault: *Object (2 properties) + │ │ ├── PropertyBag: genruntime.PropertyBag + │ │ └── Reference: *genruntime.ResourceReference + │ ├── AzureName: string + │ ├── EncryptionType: *string + │ ├── FederatedClientId: *string + │ ├── FederatedClientIdFromConfig: *genruntime.ConfigMapReference + │ ├── Identity: *Object (3 properties) + │ │ ├── PropertyBag: genruntime.PropertyBag + │ │ ├── Type: *string + │ │ └── UserAssignedIdentities: Object (2 properties)[] + │ │ ├── PropertyBag: genruntime.PropertyBag + │ │ └── Reference: genruntime.ResourceReference + │ ├── Location: *string + │ ├── OriginalVersion: string + │ ├── Owner: *genruntime.KnownResourceReference + │ ├── PropertyBag: genruntime.PropertyBag + │ ├── RotationToLatestKeyVersionEnabled: *bool + │ └── Tags: map[string]string + └── Status: Object (16 properties) + ├── ActiveKey: *Object (3 properties) + │ ├── KeyUrl: *string + │ ├── PropertyBag: genruntime.PropertyBag + │ └── SourceVault: *Object (2 properties) + │ ├── Id: *string + │ └── PropertyBag: genruntime.PropertyBag + ├── AutoKeyRotationError: *Object (6 properties) + │ ├── Code: *string + │ ├── Details: Object (4 properties)[] + │ │ ├── Code: *string + │ │ ├── Message: *string + │ │ ├── PropertyBag: genruntime.PropertyBag + │ │ └── Target: *string + │ ├── Innererror: *Object (3 properties) + │ │ ├── Errordetail: *string + │ │ ├── Exceptiontype: *string + │ │ └── PropertyBag: genruntime.PropertyBag + │ ├── Message: *string + │ ├── PropertyBag: genruntime.PropertyBag + │ └── Target: *string + ├── Conditions: conditions.Condition[] + ├── EncryptionType: *string + ├── FederatedClientId: *string + ├── Id: *string + ├── Identity: *Object (5 properties) + │ ├── PrincipalId: *string + │ ├── PropertyBag: genruntime.PropertyBag + │ ├── TenantId: *string + │ ├── Type: *string + │ └── UserAssignedIdentities: map[string]Object (3 properties) + │ ├── ClientId: *string + │ ├── PrincipalId: *string + │ └── PropertyBag: genruntime.PropertyBag + ├── LastKeyRotationTimestamp: *string + ├── Location: *string + ├── Name: *string + ├── PreviousKeys: Object (3 properties)[] + │ ├── KeyUrl: *string + │ ├── PropertyBag: genruntime.PropertyBag + │ └── SourceVault: *Object (2 properties) + │ ├── Id: *string + │ └── PropertyBag: genruntime.PropertyBag + ├── PropertyBag: genruntime.PropertyBag + ├── ProvisioningState: *string + ├── RotationToLatestKeyVersionEnabled: *bool + ├── Tags: map[string]string + └── Type: *string diff --git a/v2/api/compute/v1api20220702storage/zz_generated.deepcopy.go b/v2/api/compute/v1api20220702storage/zz_generated.deepcopy.go new file mode 100644 index 00000000000..dc286ad25a7 --- /dev/null +++ b/v2/api/compute/v1api20220702storage/zz_generated.deepcopy.go @@ -0,0 +1,621 @@ +//go:build !ignore_autogenerated + +/* +Copyright (c) Microsoft Corporation. +Licensed under the MIT license. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1api20220702storage + +import ( + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApiErrorBase_STATUS) DeepCopyInto(out *ApiErrorBase_STATUS) { + *out = *in + if in.Code != nil { + in, out := &in.Code, &out.Code + *out = new(string) + **out = **in + } + if in.Message != nil { + in, out := &in.Message, &out.Message + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Target != nil { + in, out := &in.Target, &out.Target + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApiErrorBase_STATUS. +func (in *ApiErrorBase_STATUS) DeepCopy() *ApiErrorBase_STATUS { + if in == nil { + return nil + } + out := new(ApiErrorBase_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApiError_STATUS) DeepCopyInto(out *ApiError_STATUS) { + *out = *in + if in.Code != nil { + in, out := &in.Code, &out.Code + *out = new(string) + **out = **in + } + if in.Details != nil { + in, out := &in.Details, &out.Details + *out = make([]ApiErrorBase_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Innererror != nil { + in, out := &in.Innererror, &out.Innererror + *out = new(InnerError_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Message != nil { + in, out := &in.Message, &out.Message + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Target != nil { + in, out := &in.Target, &out.Target + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApiError_STATUS. +func (in *ApiError_STATUS) DeepCopy() *ApiError_STATUS { + if in == nil { + return nil + } + out := new(ApiError_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DiskEncryptionSet) DeepCopyInto(out *DiskEncryptionSet) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskEncryptionSet. +func (in *DiskEncryptionSet) DeepCopy() *DiskEncryptionSet { + if in == nil { + return nil + } + out := new(DiskEncryptionSet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DiskEncryptionSet) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DiskEncryptionSetList) DeepCopyInto(out *DiskEncryptionSetList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DiskEncryptionSet, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskEncryptionSetList. +func (in *DiskEncryptionSetList) DeepCopy() *DiskEncryptionSetList { + if in == nil { + return nil + } + out := new(DiskEncryptionSetList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DiskEncryptionSetList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DiskEncryptionSet_STATUS) DeepCopyInto(out *DiskEncryptionSet_STATUS) { + *out = *in + if in.ActiveKey != nil { + in, out := &in.ActiveKey, &out.ActiveKey + *out = new(KeyForDiskEncryptionSet_STATUS) + (*in).DeepCopyInto(*out) + } + if in.AutoKeyRotationError != nil { + in, out := &in.AutoKeyRotationError, &out.AutoKeyRotationError + *out = new(ApiError_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.EncryptionType != nil { + in, out := &in.EncryptionType, &out.EncryptionType + *out = new(string) + **out = **in + } + if in.FederatedClientId != nil { + in, out := &in.FederatedClientId, &out.FederatedClientId + *out = new(string) + **out = **in + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(EncryptionSetIdentity_STATUS) + (*in).DeepCopyInto(*out) + } + if in.LastKeyRotationTimestamp != nil { + in, out := &in.LastKeyRotationTimestamp, &out.LastKeyRotationTimestamp + *out = new(string) + **out = **in + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.PreviousKeys != nil { + in, out := &in.PreviousKeys, &out.PreviousKeys + *out = make([]KeyForDiskEncryptionSet_STATUS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ProvisioningState != nil { + in, out := &in.ProvisioningState, &out.ProvisioningState + *out = new(string) + **out = **in + } + if in.RotationToLatestKeyVersionEnabled != nil { + in, out := &in.RotationToLatestKeyVersionEnabled, &out.RotationToLatestKeyVersionEnabled + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskEncryptionSet_STATUS. +func (in *DiskEncryptionSet_STATUS) DeepCopy() *DiskEncryptionSet_STATUS { + if in == nil { + return nil + } + out := new(DiskEncryptionSet_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DiskEncryptionSet_Spec) DeepCopyInto(out *DiskEncryptionSet_Spec) { + *out = *in + if in.ActiveKey != nil { + in, out := &in.ActiveKey, &out.ActiveKey + *out = new(KeyForDiskEncryptionSet) + (*in).DeepCopyInto(*out) + } + if in.EncryptionType != nil { + in, out := &in.EncryptionType, &out.EncryptionType + *out = new(string) + **out = **in + } + if in.FederatedClientId != nil { + in, out := &in.FederatedClientId, &out.FederatedClientId + *out = new(string) + **out = **in + } + if in.FederatedClientIdFromConfig != nil { + in, out := &in.FederatedClientIdFromConfig, &out.FederatedClientIdFromConfig + *out = new(genruntime.ConfigMapReference) + **out = **in + } + if in.Identity != nil { + in, out := &in.Identity, &out.Identity + *out = new(EncryptionSetIdentity) + (*in).DeepCopyInto(*out) + } + if in.Location != nil { + in, out := &in.Location, &out.Location + *out = new(string) + **out = **in + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.RotationToLatestKeyVersionEnabled != nil { + in, out := &in.RotationToLatestKeyVersionEnabled, &out.RotationToLatestKeyVersionEnabled + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskEncryptionSet_Spec. +func (in *DiskEncryptionSet_Spec) DeepCopy() *DiskEncryptionSet_Spec { + if in == nil { + return nil + } + out := new(DiskEncryptionSet_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionSetIdentity) DeepCopyInto(out *EncryptionSetIdentity) { + *out = *in + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } + if in.UserAssignedIdentities != nil { + in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities + *out = make([]UserAssignedIdentityDetails, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionSetIdentity. +func (in *EncryptionSetIdentity) DeepCopy() *EncryptionSetIdentity { + if in == nil { + return nil + } + out := new(EncryptionSetIdentity) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionSetIdentity_STATUS) DeepCopyInto(out *EncryptionSetIdentity_STATUS) { + *out = *in + if in.PrincipalId != nil { + in, out := &in.PrincipalId, &out.PrincipalId + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.TenantId != nil { + in, out := &in.TenantId, &out.TenantId + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } + if in.UserAssignedIdentities != nil { + in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities + *out = make(map[string]EncryptionSetIdentity_UserAssignedIdentities_STATUS, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionSetIdentity_STATUS. +func (in *EncryptionSetIdentity_STATUS) DeepCopy() *EncryptionSetIdentity_STATUS { + if in == nil { + return nil + } + out := new(EncryptionSetIdentity_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EncryptionSetIdentity_UserAssignedIdentities_STATUS) DeepCopyInto(out *EncryptionSetIdentity_UserAssignedIdentities_STATUS) { + *out = *in + if in.ClientId != nil { + in, out := &in.ClientId, &out.ClientId + *out = new(string) + **out = **in + } + if in.PrincipalId != nil { + in, out := &in.PrincipalId, &out.PrincipalId + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionSetIdentity_UserAssignedIdentities_STATUS. +func (in *EncryptionSetIdentity_UserAssignedIdentities_STATUS) DeepCopy() *EncryptionSetIdentity_UserAssignedIdentities_STATUS { + if in == nil { + return nil + } + out := new(EncryptionSetIdentity_UserAssignedIdentities_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InnerError_STATUS) DeepCopyInto(out *InnerError_STATUS) { + *out = *in + if in.Errordetail != nil { + in, out := &in.Errordetail, &out.Errordetail + *out = new(string) + **out = **in + } + if in.Exceptiontype != nil { + in, out := &in.Exceptiontype, &out.Exceptiontype + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InnerError_STATUS. +func (in *InnerError_STATUS) DeepCopy() *InnerError_STATUS { + if in == nil { + return nil + } + out := new(InnerError_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyForDiskEncryptionSet) DeepCopyInto(out *KeyForDiskEncryptionSet) { + *out = *in + if in.KeyUrl != nil { + in, out := &in.KeyUrl, &out.KeyUrl + *out = new(string) + **out = **in + } + if in.KeyUrlFromConfig != nil { + in, out := &in.KeyUrlFromConfig, &out.KeyUrlFromConfig + *out = new(genruntime.ConfigMapReference) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SourceVault != nil { + in, out := &in.SourceVault, &out.SourceVault + *out = new(SourceVault) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyForDiskEncryptionSet. +func (in *KeyForDiskEncryptionSet) DeepCopy() *KeyForDiskEncryptionSet { + if in == nil { + return nil + } + out := new(KeyForDiskEncryptionSet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyForDiskEncryptionSet_STATUS) DeepCopyInto(out *KeyForDiskEncryptionSet_STATUS) { + *out = *in + if in.KeyUrl != nil { + in, out := &in.KeyUrl, &out.KeyUrl + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SourceVault != nil { + in, out := &in.SourceVault, &out.SourceVault + *out = new(SourceVault_STATUS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyForDiskEncryptionSet_STATUS. +func (in *KeyForDiskEncryptionSet_STATUS) DeepCopy() *KeyForDiskEncryptionSet_STATUS { + if in == nil { + return nil + } + out := new(KeyForDiskEncryptionSet_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceVault) DeepCopyInto(out *SourceVault) { + *out = *in + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Reference != nil { + in, out := &in.Reference, &out.Reference + *out = new(genruntime.ResourceReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceVault. +func (in *SourceVault) DeepCopy() *SourceVault { + if in == nil { + return nil + } + out := new(SourceVault) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceVault_STATUS) DeepCopyInto(out *SourceVault_STATUS) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceVault_STATUS. +func (in *SourceVault_STATUS) DeepCopy() *SourceVault_STATUS { + if in == nil { + return nil + } + out := new(SourceVault_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserAssignedIdentityDetails) DeepCopyInto(out *UserAssignedIdentityDetails) { + *out = *in + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + out.Reference = in.Reference +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAssignedIdentityDetails. +func (in *UserAssignedIdentityDetails) DeepCopy() *UserAssignedIdentityDetails { + if in == nil { + return nil + } + out := new(UserAssignedIdentityDetails) + in.DeepCopyInto(out) + return out +} diff --git a/v2/api/compute/versions_matrix.md b/v2/api/compute/versions_matrix.md index 16d04b51810..daa7f22719b 100644 --- a/v2/api/compute/versions_matrix.md +++ b/v2/api/compute/versions_matrix.md @@ -1,370 +1,384 @@ -| Type Definitions in package "compute" | v1api20200930 | v1api20201201 | v1api20210701 | v1api20220301 | v1beta20200930 | v1beta20201201 | v1beta20210701 | v1beta20220301 | -|--------------------------------------------------------------------------------------------|---------------|---------------|---------------|---------------|----------------|----------------|----------------|----------------| -| APIVersion | v1api20200930 | v1api20201201 | v1api20210701 | v1api20220301 | v1beta20200930 | v1beta20201201 | v1beta20210701 | v1beta20220301 | -| AdditionalCapabilities | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| AdditionalCapabilities_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| AdditionalUnattendContent | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| AdditionalUnattendContent_ComponentName | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| AdditionalUnattendContent_ComponentName_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| AdditionalUnattendContent_PassName | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| AdditionalUnattendContent_PassName_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| AdditionalUnattendContent_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| AdditionalUnattendContent_SettingName | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| AdditionalUnattendContent_SettingName_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| ApiEntityReference | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| ApiEntityReference_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| ApiErrorBase_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| ApiError_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| ApplicationProfile | | | | v1api20220301 | | | | v1beta20220301 | -| ApplicationProfile_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| AutomaticOSUpgradePolicy | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| AutomaticOSUpgradePolicy_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| AutomaticRepairsPolicy | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| AutomaticRepairsPolicy_RepairAction | | | | v1api20220301 | | | | v1beta20220301 | -| AutomaticRepairsPolicy_RepairAction_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| AutomaticRepairsPolicy_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| AvailablePatchSummary_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| AvailablePatchSummary_Status_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| BillingProfile | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| BillingProfile_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| BootDiagnostics | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| BootDiagnosticsInstanceView_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| BootDiagnostics_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| Caching | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| Caching_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| CapacityReservationProfile | | | | v1api20220301 | | | | v1beta20220301 | -| CapacityReservationProfile_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| CreateOption | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| CreateOption_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| CreationData | v1api20200930 | | | | v1beta20200930 | | | | -| CreationData_CreateOption | v1api20200930 | | | | v1beta20200930 | | | | -| CreationData_CreateOption_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| CreationData_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| DataDisk | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| DataDisk_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| DeleteOption | | | | v1api20220301 | | | | v1beta20220301 | -| DeleteOption_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| DetachOption | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| DetachOption_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| DiagnosticsProfile | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| DiagnosticsProfile_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| DiffDiskOption | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| DiffDiskOption_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| DiffDiskPlacement | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| DiffDiskPlacement_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| DiffDiskSettings | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| DiffDiskSettings_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| Disk | v1api20200930 | | | | v1beta20200930 | | | | -| DiskEncryptionSettings | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| DiskEncryptionSettings_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| DiskInstanceView_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| DiskProperties | v1api20200930 | | | | v1beta20200930 | | | | -| DiskProperties_HyperVGeneration | v1api20200930 | | | | v1beta20200930 | | | | -| DiskProperties_HyperVGeneration_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| DiskProperties_OsType | v1api20200930 | | | | v1beta20200930 | | | | -| DiskProperties_OsType_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| DiskProperties_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| DiskSku | v1api20200930 | | | | v1beta20200930 | | | | -| DiskSku_Name | v1api20200930 | | | | v1beta20200930 | | | | -| DiskSku_Name_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| DiskSku_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| DiskState | v1api20200930 | | | | v1beta20200930 | | | | -| DiskState_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| Disk_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| Disk_Spec | v1api20200930 | | | | v1beta20200930 | | | | -| Encryption | v1api20200930 | | | | v1beta20200930 | | | | -| EncryptionSettingsCollection | v1api20200930 | | | | v1beta20200930 | | | | -| EncryptionSettingsCollection_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| EncryptionSettingsElement | v1api20200930 | | | | v1beta20200930 | | | | -| EncryptionSettingsElement_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| EncryptionType | v1api20200930 | | | | v1beta20200930 | | | | -| EncryptionType_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| Encryption_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| EvictionPolicy | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| EvictionPolicy_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| ExtendedLocation | v1api20200930 | v1api20201201 | v1api20210701 | v1api20220301 | v1beta20200930 | v1beta20201201 | v1beta20210701 | v1beta20220301 | -| ExtendedLocationType | v1api20200930 | v1api20201201 | v1api20210701 | v1api20220301 | v1beta20200930 | v1beta20201201 | v1beta20210701 | v1beta20220301 | -| ExtendedLocationType_STATUS | v1api20200930 | v1api20201201 | v1api20210701 | v1api20220301 | v1beta20200930 | v1beta20201201 | v1beta20210701 | v1beta20220301 | -| ExtendedLocation_STATUS | v1api20200930 | v1api20201201 | v1api20210701 | v1api20220301 | v1beta20200930 | v1beta20201201 | v1beta20210701 | v1beta20220301 | -| HardwareProfile | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| HardwareProfile_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| HardwareProfile_VmSize | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| HardwareProfile_VmSize_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| HyperVGenerationType | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| HyperVGenerationType_STATUS | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| Image | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| ImageDataDisk | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| ImageDataDisk_Caching | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| ImageDataDisk_Caching_STATUS | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| ImageDataDisk_STATUS | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| ImageDiskReference | v1api20200930 | | | | v1beta20200930 | | | | -| ImageDiskReference_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| ImageOSDisk | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| ImageOSDisk_Caching | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| ImageOSDisk_Caching_STATUS | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| ImageOSDisk_OsState | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| ImageOSDisk_OsState_STATUS | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| ImageOSDisk_OsType | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| ImageOSDisk_OsType_STATUS | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| ImageOSDisk_STATUS | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| ImageProperties | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| ImageProperties_STATUS | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| ImageReference | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| ImageReference_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| ImageStorageProfile | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| ImageStorageProfile_STATUS | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| Image_STATUS | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| Image_Spec | | | v1api20210701 | v1api20220301 | | | v1beta20210701 | v1beta20220301 | -| InnerError_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| InstanceViewStatus_Level_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| InstanceViewStatus_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| KeyVaultAndKeyReference | v1api20200930 | | | | v1beta20200930 | | | | -| KeyVaultAndKeyReference_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| KeyVaultAndSecretReference | v1api20200930 | | | | v1beta20200930 | | | | -| KeyVaultAndSecretReference_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| KeyVaultKeyReference | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| KeyVaultKeyReference_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| KeyVaultSecretReference | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| KeyVaultSecretReference_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| LastPatchInstallationSummary_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| LastPatchInstallationSummary_Status_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| LinuxConfiguration | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| LinuxConfiguration_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| LinuxPatchSettings | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| LinuxPatchSettings_AssessmentMode | | | | v1api20220301 | | | | v1beta20220301 | -| LinuxPatchSettings_AssessmentMode_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| LinuxPatchSettings_PatchMode | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| LinuxPatchSettings_PatchMode_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| LinuxPatchSettings_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| LinuxVMGuestPatchAutomaticByPlatformSettings | | | | v1api20220301 | | | | v1beta20220301 | -| LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting | | | | v1api20220301 | | | | v1beta20220301 | -| LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| LinuxVMGuestPatchAutomaticByPlatformSettings_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| MaintenanceRedeployStatus_LastOperationResultCode_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| MaintenanceRedeployStatus_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| ManagedDiskParameters | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| ManagedDiskParameters_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| NetworkAccessPolicy | v1api20200930 | | | | v1beta20200930 | | | | -| NetworkAccessPolicy_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| NetworkInterfaceReference | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| NetworkInterfaceReferenceProperties | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| NetworkInterfaceReferenceProperties_DeleteOption | | | | v1api20220301 | | | | v1beta20220301 | -| NetworkInterfaceReferenceProperties_DeleteOption_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| NetworkInterfaceReferenceProperties_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| NetworkInterfaceReference_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| NetworkProfile | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| NetworkProfile_NetworkApiVersion | | | | v1api20220301 | | | | v1beta20220301 | -| NetworkProfile_NetworkApiVersion_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| NetworkProfile_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| OSDisk | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| OSDisk_OsType | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| OSDisk_OsType_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| OSDisk_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| OSProfile | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| OSProfile_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| OrchestrationMode | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| OrchestrationMode_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| PatchSettings | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| PatchSettings_AssessmentMode | | | | v1api20220301 | | | | v1beta20220301 | -| PatchSettings_AssessmentMode_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| PatchSettings_PatchMode | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| PatchSettings_PatchMode_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| PatchSettings_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| Plan | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| Plan_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| Priority | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| Priority_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| PublicIPAddressSku | | | | v1api20220301 | | | | v1beta20220301 | -| PublicIPAddressSku_Name | | | | v1api20220301 | | | | v1beta20220301 | -| PublicIPAddressSku_Name_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| PublicIPAddressSku_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| PublicIPAddressSku_Tier | | | | v1api20220301 | | | | v1beta20220301 | -| PublicIPAddressSku_Tier_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| PurchasePlan | v1api20200930 | | | | v1beta20200930 | | | | -| PurchasePlan_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| RollingUpgradePolicy | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| RollingUpgradePolicy_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| ScaleInPolicy | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| ScaleInPolicy_Rules | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| ScaleInPolicy_Rules_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| ScaleInPolicy_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| ScheduledEventsProfile | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| ScheduledEventsProfile_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| SecurityProfile | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| SecurityProfile_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| SecurityProfile_SecurityType | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| SecurityProfile_SecurityType_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| ShareInfoElement_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| Sku | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| Sku_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| Snapshot | v1api20200930 | | | | v1beta20200930 | | | | -| SnapshotProperties | v1api20200930 | | | | v1beta20200930 | | | | -| SnapshotProperties_HyperVGeneration | v1api20200930 | | | | v1beta20200930 | | | | -| SnapshotProperties_HyperVGeneration_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| SnapshotProperties_OsType | v1api20200930 | | | | v1beta20200930 | | | | -| SnapshotProperties_OsType_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| SnapshotProperties_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| SnapshotSku | v1api20200930 | | | | v1beta20200930 | | | | -| SnapshotSku_Name | v1api20200930 | | | | v1beta20200930 | | | | -| SnapshotSku_Name_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| SnapshotSku_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| Snapshot_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| Snapshot_Spec | v1api20200930 | | | | v1beta20200930 | | | | -| SourceVault | v1api20200930 | | | | v1beta20200930 | | | | -| SourceVault_STATUS | v1api20200930 | | | | v1beta20200930 | | | | -| SpotRestorePolicy | | | | v1api20220301 | | | | v1beta20220301 | -| SpotRestorePolicy_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| SshConfiguration | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| SshConfiguration_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| SshPublicKeySpec | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| SshPublicKey_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| StorageAccountType | | v1api20201201 | v1api20210701 | v1api20220301 | | v1beta20201201 | v1beta20210701 | v1beta20220301 | -| StorageAccountType_STATUS | | v1api20201201 | v1api20210701 | v1api20220301 | | v1beta20201201 | v1beta20210701 | v1beta20220301 | -| StorageProfile | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| StorageProfile_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| SubResource | | v1api20201201 | v1api20210701 | v1api20220301 | | v1beta20201201 | v1beta20210701 | v1beta20220301 | -| SubResource_STATUS | | v1api20201201 | v1api20210701 | v1api20220301 | | v1beta20201201 | v1beta20210701 | v1beta20220301 | -| TerminateNotificationProfile | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| TerminateNotificationProfile_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| UefiSettings | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| UefiSettings_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| UpgradePolicy | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| UpgradePolicy_Mode | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| UpgradePolicy_Mode_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| UpgradePolicy_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| UserAssignedIdentityDetails | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VMDiskSecurityProfile | | | | v1api20220301 | | | | v1beta20220301 | -| VMDiskSecurityProfile_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VMDiskSecurityProfile_SecurityEncryptionType | | | | v1api20220301 | | | | v1beta20220301 | -| VMDiskSecurityProfile_SecurityEncryptionType_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VMGalleryApplication | | | | v1api20220301 | | | | v1beta20220301 | -| VMGalleryApplication_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VMSizeProperties | | | | v1api20220301 | | | | v1beta20220301 | -| VMSizeProperties_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VaultCertificate | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VaultCertificate_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VaultSecretGroup | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VaultSecretGroup_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualHardDisk | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualHardDisk_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachine | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineAgentInstanceView_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineExtensionHandlerInstanceView_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineExtensionInstanceView_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineExtensionProperties_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineExtension_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineHealthStatus_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineIdentity | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineIdentity_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineIdentity_Type | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineIdentity_Type_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineIdentity_UserAssignedIdentities_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineInstanceView_HyperVGeneration_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineInstanceView_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineIpTag | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineIpTag_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineNetworkInterfaceConfiguration | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineNetworkInterfaceConfigurationProperties | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineNetworkInterfaceConfigurationProperties_DeleteOption | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineNetworkInterfaceConfigurationProperties_DeleteOption_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineNetworkInterfaceConfigurationProperties_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineNetworkInterfaceConfiguration_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineNetworkInterfaceDnsSettingsConfiguration | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineNetworkInterfaceDnsSettingsConfiguration_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineNetworkInterfaceIPConfiguration | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineNetworkInterfaceIPConfigurationProperties | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineNetworkInterfaceIPConfigurationProperties_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineNetworkInterfaceIPConfiguration_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachinePatchStatus_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineProperties | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineProperties_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachinePublicIPAddressConfiguration | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachinePublicIPAddressConfigurationProperties | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachinePublicIPAddressConfigurationProperties_DeleteOption | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachinePublicIPAddressConfigurationProperties_DeleteOption_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachinePublicIPAddressConfigurationProperties_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachinePublicIPAddressConfiguration_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachinePublicIPAddressDnsSettingsConfiguration | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachinePublicIPAddressDnsSettingsConfiguration_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineScaleSet | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetDataDisk | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetDataDisk_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetExtension | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetExtensionProfile | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetExtensionProfile_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetExtensionProperties | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetExtensionProperties_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetExtension_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetHardwareProfile | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineScaleSetHardwareProfile_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineScaleSetIPConfiguration | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetIPConfigurationProperties | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetIPConfigurationProperties_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetIPConfiguration_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetIdentity | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetIdentity_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetIdentity_Type | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetIdentity_Type_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetIdentity_UserAssignedIdentities_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetIpTag | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetIpTag_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetManagedDiskParameters | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetManagedDiskParameters_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetNetworkConfiguration | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetNetworkConfigurationDnsSettings | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetNetworkConfigurationDnsSettings_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetNetworkConfigurationProperties | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetNetworkConfigurationProperties_DeleteOption | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineScaleSetNetworkConfigurationProperties_DeleteOption_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineScaleSetNetworkConfigurationProperties_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetNetworkConfiguration_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetNetworkProfile | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetNetworkProfile_NetworkApiVersion | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineScaleSetNetworkProfile_NetworkApiVersion_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineScaleSetNetworkProfile_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetOSDisk | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetOSDisk_OsType | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetOSDisk_OsType_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetOSDisk_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetOSProfile | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetOSProfile_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetProperties | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetProperties_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetPublicIPAddressConfiguration | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetPublicIPAddressConfigurationProperties | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetPublicIPAddressConfigurationProperties_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetPublicIPAddressConfiguration_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetStorageProfile | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetStorageProfile_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetVMProfile | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSetVMProfile_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSet_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachineScaleSet_Spec | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachine_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| VirtualMachine_Spec | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| WinRMConfiguration | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| WinRMConfiguration_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| WinRMListener | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| WinRMListener_Protocol | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| WinRMListener_Protocol_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| WinRMListener_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| WindowsConfiguration | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| WindowsConfiguration_STATUS | | v1api20201201 | | v1api20220301 | | v1beta20201201 | | v1beta20220301 | -| WindowsVMGuestPatchAutomaticByPlatformSettings | | | | v1api20220301 | | | | v1beta20220301 | -| WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting | | | | v1api20220301 | | | | v1beta20220301 | -| WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS | | | | v1api20220301 | | | | v1beta20220301 | -| WindowsVMGuestPatchAutomaticByPlatformSettings_STATUS | | | | v1api20220301 | | | | v1beta20220301 | +| Type Definitions in package "compute" | v1api20200930 | v1api20201201 | v1api20210701 | v1api20220301 | v1api20220702 | v1beta20200930 | v1beta20201201 | v1beta20210701 | v1beta20220301 | +|--------------------------------------------------------------------------------------------|---------------|---------------|---------------|---------------|---------------|----------------|----------------|----------------|----------------| +| APIVersion | v1api20200930 | v1api20201201 | v1api20210701 | v1api20220301 | v1api20220702 | v1beta20200930 | v1beta20201201 | v1beta20210701 | v1beta20220301 | +| AdditionalCapabilities | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| AdditionalCapabilities_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| AdditionalUnattendContent | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| AdditionalUnattendContent_ComponentName | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| AdditionalUnattendContent_ComponentName_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| AdditionalUnattendContent_PassName | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| AdditionalUnattendContent_PassName_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| AdditionalUnattendContent_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| AdditionalUnattendContent_SettingName | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| AdditionalUnattendContent_SettingName_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| ApiEntityReference | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| ApiEntityReference_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| ApiErrorBase_STATUS | | v1api20201201 | | v1api20220301 | v1api20220702 | | v1beta20201201 | | v1beta20220301 | +| ApiError_STATUS | | v1api20201201 | | v1api20220301 | v1api20220702 | | v1beta20201201 | | v1beta20220301 | +| ApplicationProfile | | | | v1api20220301 | | | | | v1beta20220301 | +| ApplicationProfile_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| AutomaticOSUpgradePolicy | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| AutomaticOSUpgradePolicy_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| AutomaticRepairsPolicy | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| AutomaticRepairsPolicy_RepairAction | | | | v1api20220301 | | | | | v1beta20220301 | +| AutomaticRepairsPolicy_RepairAction_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| AutomaticRepairsPolicy_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| AvailablePatchSummary_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| AvailablePatchSummary_Status_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| BillingProfile | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| BillingProfile_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| BootDiagnostics | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| BootDiagnosticsInstanceView_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| BootDiagnostics_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| Caching | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| Caching_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| CapacityReservationProfile | | | | v1api20220301 | | | | | v1beta20220301 | +| CapacityReservationProfile_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| CreateOption | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| CreateOption_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| CreationData | v1api20200930 | | | | | v1beta20200930 | | | | +| CreationData_CreateOption | v1api20200930 | | | | | v1beta20200930 | | | | +| CreationData_CreateOption_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| CreationData_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| DataDisk | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| DataDisk_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| DeleteOption | | | | v1api20220301 | | | | | v1beta20220301 | +| DeleteOption_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| DetachOption | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| DetachOption_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| DiagnosticsProfile | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| DiagnosticsProfile_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| DiffDiskOption | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| DiffDiskOption_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| DiffDiskPlacement | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| DiffDiskPlacement_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| DiffDiskSettings | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| DiffDiskSettings_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| Disk | v1api20200930 | | | | | v1beta20200930 | | | | +| DiskEncryptionSet | | | | | v1api20220702 | | | | | +| DiskEncryptionSetType | | | | | v1api20220702 | | | | | +| DiskEncryptionSetType_STATUS | | | | | v1api20220702 | | | | | +| DiskEncryptionSet_STATUS | | | | | v1api20220702 | | | | | +| DiskEncryptionSet_Spec | | | | | v1api20220702 | | | | | +| DiskEncryptionSettings | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| DiskEncryptionSettings_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| DiskInstanceView_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| DiskProperties | v1api20200930 | | | | | v1beta20200930 | | | | +| DiskProperties_HyperVGeneration | v1api20200930 | | | | | v1beta20200930 | | | | +| DiskProperties_HyperVGeneration_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| DiskProperties_OsType | v1api20200930 | | | | | v1beta20200930 | | | | +| DiskProperties_OsType_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| DiskProperties_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| DiskSku | v1api20200930 | | | | | v1beta20200930 | | | | +| DiskSku_Name | v1api20200930 | | | | | v1beta20200930 | | | | +| DiskSku_Name_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| DiskSku_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| DiskState | v1api20200930 | | | | | v1beta20200930 | | | | +| DiskState_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| Disk_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| Disk_Spec | v1api20200930 | | | | | v1beta20200930 | | | | +| Encryption | v1api20200930 | | | | | v1beta20200930 | | | | +| EncryptionSetIdentity | | | | | v1api20220702 | | | | | +| EncryptionSetIdentity_STATUS | | | | | v1api20220702 | | | | | +| EncryptionSetIdentity_Type | | | | | v1api20220702 | | | | | +| EncryptionSetIdentity_Type_STATUS | | | | | v1api20220702 | | | | | +| EncryptionSetIdentity_UserAssignedIdentities_STATUS | | | | | v1api20220702 | | | | | +| EncryptionSetProperties | | | | | v1api20220702 | | | | | +| EncryptionSetProperties_STATUS | | | | | v1api20220702 | | | | | +| EncryptionSettingsCollection | v1api20200930 | | | | | v1beta20200930 | | | | +| EncryptionSettingsCollection_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| EncryptionSettingsElement | v1api20200930 | | | | | v1beta20200930 | | | | +| EncryptionSettingsElement_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| EncryptionType | v1api20200930 | | | | | v1beta20200930 | | | | +| EncryptionType_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| Encryption_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| EvictionPolicy | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| EvictionPolicy_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| ExtendedLocation | v1api20200930 | v1api20201201 | v1api20210701 | v1api20220301 | | v1beta20200930 | v1beta20201201 | v1beta20210701 | v1beta20220301 | +| ExtendedLocationType | v1api20200930 | v1api20201201 | v1api20210701 | v1api20220301 | | v1beta20200930 | v1beta20201201 | v1beta20210701 | v1beta20220301 | +| ExtendedLocationType_STATUS | v1api20200930 | v1api20201201 | v1api20210701 | v1api20220301 | | v1beta20200930 | v1beta20201201 | v1beta20210701 | v1beta20220301 | +| ExtendedLocation_STATUS | v1api20200930 | v1api20201201 | v1api20210701 | v1api20220301 | | v1beta20200930 | v1beta20201201 | v1beta20210701 | v1beta20220301 | +| HardwareProfile | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| HardwareProfile_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| HardwareProfile_VmSize | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| HardwareProfile_VmSize_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| HyperVGenerationType | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| HyperVGenerationType_STATUS | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| Image | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| ImageDataDisk | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| ImageDataDisk_Caching | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| ImageDataDisk_Caching_STATUS | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| ImageDataDisk_STATUS | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| ImageDiskReference | v1api20200930 | | | | | v1beta20200930 | | | | +| ImageDiskReference_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| ImageOSDisk | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| ImageOSDisk_Caching | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| ImageOSDisk_Caching_STATUS | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| ImageOSDisk_OsState | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| ImageOSDisk_OsState_STATUS | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| ImageOSDisk_OsType | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| ImageOSDisk_OsType_STATUS | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| ImageOSDisk_STATUS | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| ImageProperties | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| ImageProperties_STATUS | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| ImageReference | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| ImageReference_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| ImageStorageProfile | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| ImageStorageProfile_STATUS | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| Image_STATUS | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| Image_Spec | | | v1api20210701 | v1api20220301 | | | | v1beta20210701 | v1beta20220301 | +| InnerError_STATUS | | v1api20201201 | | v1api20220301 | v1api20220702 | | v1beta20201201 | | v1beta20220301 | +| InstanceViewStatus_Level_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| InstanceViewStatus_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| KeyForDiskEncryptionSet | | | | | v1api20220702 | | | | | +| KeyForDiskEncryptionSet_STATUS | | | | | v1api20220702 | | | | | +| KeyVaultAndKeyReference | v1api20200930 | | | | | v1beta20200930 | | | | +| KeyVaultAndKeyReference_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| KeyVaultAndSecretReference | v1api20200930 | | | | | v1beta20200930 | | | | +| KeyVaultAndSecretReference_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| KeyVaultKeyReference | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| KeyVaultKeyReference_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| KeyVaultSecretReference | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| KeyVaultSecretReference_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| LastPatchInstallationSummary_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| LastPatchInstallationSummary_Status_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| LinuxConfiguration | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| LinuxConfiguration_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| LinuxPatchSettings | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| LinuxPatchSettings_AssessmentMode | | | | v1api20220301 | | | | | v1beta20220301 | +| LinuxPatchSettings_AssessmentMode_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| LinuxPatchSettings_PatchMode | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| LinuxPatchSettings_PatchMode_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| LinuxPatchSettings_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| LinuxVMGuestPatchAutomaticByPlatformSettings | | | | v1api20220301 | | | | | v1beta20220301 | +| LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting | | | | v1api20220301 | | | | | v1beta20220301 | +| LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| LinuxVMGuestPatchAutomaticByPlatformSettings_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| MaintenanceRedeployStatus_LastOperationResultCode_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| MaintenanceRedeployStatus_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| ManagedDiskParameters | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| ManagedDiskParameters_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| NetworkAccessPolicy | v1api20200930 | | | | | v1beta20200930 | | | | +| NetworkAccessPolicy_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| NetworkInterfaceReference | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| NetworkInterfaceReferenceProperties | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| NetworkInterfaceReferenceProperties_DeleteOption | | | | v1api20220301 | | | | | v1beta20220301 | +| NetworkInterfaceReferenceProperties_DeleteOption_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| NetworkInterfaceReferenceProperties_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| NetworkInterfaceReference_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| NetworkProfile | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| NetworkProfile_NetworkApiVersion | | | | v1api20220301 | | | | | v1beta20220301 | +| NetworkProfile_NetworkApiVersion_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| NetworkProfile_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| OSDisk | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| OSDisk_OsType | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| OSDisk_OsType_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| OSDisk_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| OSProfile | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| OSProfile_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| OrchestrationMode | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| OrchestrationMode_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| PatchSettings | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| PatchSettings_AssessmentMode | | | | v1api20220301 | | | | | v1beta20220301 | +| PatchSettings_AssessmentMode_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| PatchSettings_PatchMode | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| PatchSettings_PatchMode_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| PatchSettings_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| Plan | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| Plan_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| Priority | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| Priority_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| PublicIPAddressSku | | | | v1api20220301 | | | | | v1beta20220301 | +| PublicIPAddressSku_Name | | | | v1api20220301 | | | | | v1beta20220301 | +| PublicIPAddressSku_Name_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| PublicIPAddressSku_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| PublicIPAddressSku_Tier | | | | v1api20220301 | | | | | v1beta20220301 | +| PublicIPAddressSku_Tier_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| PurchasePlan | v1api20200930 | | | | | v1beta20200930 | | | | +| PurchasePlan_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| RollingUpgradePolicy | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| RollingUpgradePolicy_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| ScaleInPolicy | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| ScaleInPolicy_Rules | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| ScaleInPolicy_Rules_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| ScaleInPolicy_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| ScheduledEventsProfile | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| ScheduledEventsProfile_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| SecurityProfile | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| SecurityProfile_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| SecurityProfile_SecurityType | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| SecurityProfile_SecurityType_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| ShareInfoElement_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| Sku | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| Sku_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| Snapshot | v1api20200930 | | | | | v1beta20200930 | | | | +| SnapshotProperties | v1api20200930 | | | | | v1beta20200930 | | | | +| SnapshotProperties_HyperVGeneration | v1api20200930 | | | | | v1beta20200930 | | | | +| SnapshotProperties_HyperVGeneration_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| SnapshotProperties_OsType | v1api20200930 | | | | | v1beta20200930 | | | | +| SnapshotProperties_OsType_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| SnapshotProperties_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| SnapshotSku | v1api20200930 | | | | | v1beta20200930 | | | | +| SnapshotSku_Name | v1api20200930 | | | | | v1beta20200930 | | | | +| SnapshotSku_Name_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| SnapshotSku_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| Snapshot_STATUS | v1api20200930 | | | | | v1beta20200930 | | | | +| Snapshot_Spec | v1api20200930 | | | | | v1beta20200930 | | | | +| SourceVault | v1api20200930 | | | | v1api20220702 | v1beta20200930 | | | | +| SourceVault_STATUS | v1api20200930 | | | | v1api20220702 | v1beta20200930 | | | | +| SpotRestorePolicy | | | | v1api20220301 | | | | | v1beta20220301 | +| SpotRestorePolicy_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| SshConfiguration | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| SshConfiguration_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| SshPublicKeySpec | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| SshPublicKey_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| StorageAccountType | | v1api20201201 | v1api20210701 | v1api20220301 | | | v1beta20201201 | v1beta20210701 | v1beta20220301 | +| StorageAccountType_STATUS | | v1api20201201 | v1api20210701 | v1api20220301 | | | v1beta20201201 | v1beta20210701 | v1beta20220301 | +| StorageProfile | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| StorageProfile_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| SubResource | | v1api20201201 | v1api20210701 | v1api20220301 | | | v1beta20201201 | v1beta20210701 | v1beta20220301 | +| SubResource_STATUS | | v1api20201201 | v1api20210701 | v1api20220301 | | | v1beta20201201 | v1beta20210701 | v1beta20220301 | +| TerminateNotificationProfile | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| TerminateNotificationProfile_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| UefiSettings | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| UefiSettings_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| UpgradePolicy | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| UpgradePolicy_Mode | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| UpgradePolicy_Mode_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| UpgradePolicy_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| UserAssignedIdentityDetails | | v1api20201201 | | v1api20220301 | v1api20220702 | | v1beta20201201 | | v1beta20220301 | +| VMDiskSecurityProfile | | | | v1api20220301 | | | | | v1beta20220301 | +| VMDiskSecurityProfile_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VMDiskSecurityProfile_SecurityEncryptionType | | | | v1api20220301 | | | | | v1beta20220301 | +| VMDiskSecurityProfile_SecurityEncryptionType_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VMGalleryApplication | | | | v1api20220301 | | | | | v1beta20220301 | +| VMGalleryApplication_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VMSizeProperties | | | | v1api20220301 | | | | | v1beta20220301 | +| VMSizeProperties_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VaultCertificate | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VaultCertificate_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VaultSecretGroup | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VaultSecretGroup_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualHardDisk | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualHardDisk_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachine | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineAgentInstanceView_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineExtensionHandlerInstanceView_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineExtensionInstanceView_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineExtensionProperties_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineExtension_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineHealthStatus_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineIdentity | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineIdentity_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineIdentity_Type | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineIdentity_Type_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineIdentity_UserAssignedIdentities_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineInstanceView_HyperVGeneration_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineInstanceView_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineIpTag | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineIpTag_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineNetworkInterfaceConfiguration | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineNetworkInterfaceConfigurationProperties | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineNetworkInterfaceConfigurationProperties_DeleteOption | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineNetworkInterfaceConfigurationProperties_DeleteOption_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineNetworkInterfaceConfigurationProperties_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineNetworkInterfaceConfiguration_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineNetworkInterfaceDnsSettingsConfiguration | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineNetworkInterfaceDnsSettingsConfiguration_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineNetworkInterfaceIPConfiguration | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineNetworkInterfaceIPConfigurationProperties | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineNetworkInterfaceIPConfigurationProperties_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineNetworkInterfaceIPConfiguration_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachinePatchStatus_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineProperties | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineProperties_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachinePublicIPAddressConfiguration | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachinePublicIPAddressConfigurationProperties | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachinePublicIPAddressConfigurationProperties_DeleteOption | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachinePublicIPAddressConfigurationProperties_DeleteOption_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachinePublicIPAddressConfigurationProperties_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachinePublicIPAddressConfiguration_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachinePublicIPAddressDnsSettingsConfiguration | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachinePublicIPAddressDnsSettingsConfiguration_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineScaleSet | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetDataDisk | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetDataDisk_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetExtension | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetExtensionProfile | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetExtensionProfile_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetExtensionProperties | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetExtensionProperties_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetExtension_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetHardwareProfile | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineScaleSetHardwareProfile_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineScaleSetIPConfiguration | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetIPConfigurationProperties | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetIPConfigurationProperties_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetIPConfiguration_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetIdentity | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetIdentity_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetIdentity_Type | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetIdentity_Type_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetIdentity_UserAssignedIdentities_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetIpTag | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetIpTag_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetManagedDiskParameters | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetManagedDiskParameters_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetNetworkConfiguration | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetNetworkConfigurationDnsSettings | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetNetworkConfigurationDnsSettings_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetNetworkConfigurationProperties | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetNetworkConfigurationProperties_DeleteOption | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineScaleSetNetworkConfigurationProperties_DeleteOption_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineScaleSetNetworkConfigurationProperties_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetNetworkConfiguration_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetNetworkProfile | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetNetworkProfile_NetworkApiVersion | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineScaleSetNetworkProfile_NetworkApiVersion_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineScaleSetNetworkProfile_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetOSDisk | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetOSDisk_OsType | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetOSDisk_OsType_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetOSDisk_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetOSProfile | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetOSProfile_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetProperties | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetProperties_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetPublicIPAddressConfiguration | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetPublicIPAddressConfigurationProperties | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetPublicIPAddressConfigurationProperties_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetPublicIPAddressConfiguration_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetStorageProfile | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetStorageProfile_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetVMProfile | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSetVMProfile_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSet_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachineScaleSet_Spec | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachine_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| VirtualMachine_Spec | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| WinRMConfiguration | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| WinRMConfiguration_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| WinRMListener | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| WinRMListener_Protocol | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| WinRMListener_Protocol_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| WinRMListener_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| WindowsConfiguration | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| WindowsConfiguration_STATUS | | v1api20201201 | | v1api20220301 | | | v1beta20201201 | | v1beta20220301 | +| WindowsVMGuestPatchAutomaticByPlatformSettings | | | | v1api20220301 | | | | | v1beta20220301 | +| WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting | | | | v1api20220301 | | | | | v1beta20220301 | +| WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | +| WindowsVMGuestPatchAutomaticByPlatformSettings_STATUS | | | | v1api20220301 | | | | | v1beta20220301 | diff --git a/v2/azure-arm.yaml b/v2/azure-arm.yaml index c439cf0dac1..5c62f3c781b 100644 --- a/v2/azure-arm.yaml +++ b/v2/azure-arm.yaml @@ -925,6 +925,19 @@ objectModelConfiguration: $isResource: false VirtualMachineScaleSetNetworkConfiguration_STATUS: $isResource: false + 2022-07-02: + DiskEncryptionSet: + $export: true + $supportedFrom: v2.3.0 + SourceVault: + Id: + $armReference: true + KeyForDiskEncryptionSet: + KeyUrl: + $importConfigMapMode: optional + EncryptionSetProperties: + FederatedClientId: + $importConfigMapMode: optional containerinstance: 2021-10-01: ContainerGroup: diff --git a/v2/go.mod b/v2/go.mod index 76fa87e59c4..0efe535a956 100644 --- a/v2/go.mod +++ b/v2/go.mod @@ -9,6 +9,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice v1.0.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos v1.0.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.1.1 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.2.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning v1.0.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis v1.0.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/search/armsearch v1.1.0 diff --git a/v2/go.sum b/v2/go.sum index ddea15767bd..29b55f8299d 100644 --- a/v2/go.sum +++ b/v2/go.sum @@ -15,6 +15,8 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos v1.0.0/go github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.1.1 h1:Dh8SxVXcSyQN76LI4IseKyrnqyTUsx336Axg8zDYSMs= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.1.1/go.mod h1:fqmmortNEICbosf7BfNVO3wWs6Cz/pkxYfExJC97Vy8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.2.0 h1:8d4U82r7ItT1Es91x3eUcAQweih36KWvUha8AZ9X0Rs= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.2.0/go.mod h1:/1bkGperHinQbAHMWivoec/Ucu6//iXo6jn5mhmqCVU= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning v1.0.0 h1:KWvCVjnOTKCZAlqED5KPNoN9AfcK2BhUeveLdiwy33Q= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning v1.0.0/go.mod h1:qNN4I5AKYbXMLriS9XKebBw8EVIQkX6tJzrdtjOoJ4I= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis v1.0.0 h1:nmpTBgRg1HynngFYICRhceC7s5dmbKN9fJ/XQz/UQ2I= diff --git a/v2/internal/controllers/controller_resources_gen.go b/v2/internal/controllers/controller_resources_gen.go index d8ed616d3f0..591eb301773 100644 --- a/v2/internal/controllers/controller_resources_gen.go +++ b/v2/internal/controllers/controller_resources_gen.go @@ -46,6 +46,8 @@ import ( compute_v20210701s "github.com/Azure/azure-service-operator/v2/api/compute/v1api20210701storage" compute_v20220301 "github.com/Azure/azure-service-operator/v2/api/compute/v1api20220301" compute_v20220301s "github.com/Azure/azure-service-operator/v2/api/compute/v1api20220301storage" + compute_v20220702 "github.com/Azure/azure-service-operator/v2/api/compute/v1api20220702" + compute_v20220702s "github.com/Azure/azure-service-operator/v2/api/compute/v1api20220702storage" compute_v1beta20200930 "github.com/Azure/azure-service-operator/v2/api/compute/v1beta20200930" compute_v1beta20200930s "github.com/Azure/azure-service-operator/v2/api/compute/v1beta20200930storage" compute_v1beta20201201 "github.com/Azure/azure-service-operator/v2/api/compute/v1beta20201201" @@ -276,6 +278,25 @@ func getKnownStorageTypes() []*registration.StorageType { }, }, }) + result = append(result, ®istration.StorageType{ + Obj: new(compute_v20220702s.DiskEncryptionSet), + Indexes: []registration.Index{ + { + Key: ".spec.federatedClientIdFromConfig", + Func: indexComputeDiskEncryptionSetFederatedClientIdFromConfig, + }, + { + Key: ".spec.activeKey.keyUrlFromConfig", + Func: indexComputeDiskEncryptionSetKeyUrlFromConfig, + }, + }, + Watches: []registration.Watch{ + { + Type: &v1.ConfigMap{}, + MakeEventHandler: watchConfigMapsFactory([]string{".spec.activeKey.keyUrlFromConfig", ".spec.federatedClientIdFromConfig"}, &compute_v20220702s.DiskEncryptionSetList{}), + }, + }, + }) result = append(result, ®istration.StorageType{ Obj: new(containerinstance_v20211001s.ContainerGroup), Indexes: []registration.Index{ @@ -938,6 +959,8 @@ func getKnownTypes() []client.Object { new(compute_v20220301s.Image), new(compute_v20220301s.VirtualMachine), new(compute_v20220301s.VirtualMachineScaleSet)) + result = append(result, new(compute_v20220702.DiskEncryptionSet)) + result = append(result, new(compute_v20220702s.DiskEncryptionSet)) result = append(result, new(containerinstance_v1beta20211001.ContainerGroup)) result = append(result, new(containerinstance_v1beta20211001s.ContainerGroup)) result = append(result, new(containerinstance_v20211001.ContainerGroup)) @@ -1547,6 +1570,8 @@ func createScheme() *runtime.Scheme { _ = compute_v20210701s.AddToScheme(scheme) _ = compute_v20220301.AddToScheme(scheme) _ = compute_v20220301s.AddToScheme(scheme) + _ = compute_v20220702.AddToScheme(scheme) + _ = compute_v20220702s.AddToScheme(scheme) _ = containerinstance_v1beta20211001.AddToScheme(scheme) _ = containerinstance_v1beta20211001s.AddToScheme(scheme) _ = containerinstance_v20211001.AddToScheme(scheme) @@ -1690,6 +1715,7 @@ func getResourceExtensions() []genruntime.ResourceExtension { result = append(result, &cache_customizations.RedisPatchScheduleExtension{}) result = append(result, &cdn_customizations.ProfileExtension{}) result = append(result, &cdn_customizations.ProfilesEndpointExtension{}) + result = append(result, &compute_customizations.DiskEncryptionSetExtension{}) result = append(result, &compute_customizations.DiskExtension{}) result = append(result, &compute_customizations.ImageExtension{}) result = append(result, &compute_customizations.SnapshotExtension{}) @@ -1850,6 +1876,33 @@ func indexAuthorizationRoleAssignmentPrincipalIdFromConfig(rawObj client.Object) return obj.Spec.PrincipalIdFromConfig.Index() } +// indexComputeDiskEncryptionSetFederatedClientIdFromConfig an index function for compute_v20220702s.DiskEncryptionSet .spec.federatedClientIdFromConfig +func indexComputeDiskEncryptionSetFederatedClientIdFromConfig(rawObj client.Object) []string { + obj, ok := rawObj.(*compute_v20220702s.DiskEncryptionSet) + if !ok { + return nil + } + if obj.Spec.FederatedClientIdFromConfig == nil { + return nil + } + return obj.Spec.FederatedClientIdFromConfig.Index() +} + +// indexComputeDiskEncryptionSetKeyUrlFromConfig an index function for compute_v20220702s.DiskEncryptionSet .spec.activeKey.keyUrlFromConfig +func indexComputeDiskEncryptionSetKeyUrlFromConfig(rawObj client.Object) []string { + obj, ok := rawObj.(*compute_v20220702s.DiskEncryptionSet) + if !ok { + return nil + } + if obj.Spec.ActiveKey == nil { + return nil + } + if obj.Spec.ActiveKey.KeyUrlFromConfig == nil { + return nil + } + return obj.Spec.ActiveKey.KeyUrlFromConfig.Index() +} + // indexComputeVirtualMachineAdminPassword an index function for compute_v20220301s.VirtualMachine .spec.osProfile.adminPassword func indexComputeVirtualMachineAdminPassword(rawObj client.Object) []string { obj, ok := rawObj.(*compute_v20220301s.VirtualMachine) diff --git a/v2/internal/controllers/crd_compute_diskencryptionset_test.go b/v2/internal/controllers/crd_compute_diskencryptionset_test.go new file mode 100644 index 00000000000..ec99f15b764 --- /dev/null +++ b/v2/internal/controllers/crd_compute_diskencryptionset_test.go @@ -0,0 +1,160 @@ +/* +Copyright (c) Microsoft Corporation. +Licensed under the MIT license. +*/ + +package controllers_test + +import ( + "context" + "testing" + + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault" + . "github.com/onsi/gomega" + + compute "github.com/Azure/azure-service-operator/v2/api/compute/v1api20220702" + "github.com/Azure/azure-service-operator/v2/api/keyvault/v1api20210401preview" + keyvault "github.com/Azure/azure-service-operator/v2/api/keyvault/v1api20210401preview" + managedidentity "github.com/Azure/azure-service-operator/v2/api/managedidentity/v1api20181130" + resources "github.com/Azure/azure-service-operator/v2/api/resources/v1api20200601" + "github.com/Azure/azure-service-operator/v2/internal/testcommon" + "github.com/Azure/azure-service-operator/v2/internal/util/to" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) + +func Test_Compute_DiskEncryptionSet_CRUD(t *testing.T) { + t.Parallel() + + tc := globalTestContext.ForTest(t) + + rg := tc.CreateTestResourceGroupAndWait() + + configMapName := "my-configmap" + principalIdKey := "principalId" + tenantIdKey := "tenantId" + clientIdKey := "clientId" + mi := &managedidentity.UserAssignedIdentity{ + ObjectMeta: tc.MakeObjectMeta("mi"), + Spec: managedidentity.UserAssignedIdentity_Spec{ + Location: tc.AzureRegion, + Owner: testcommon.AsOwner(rg), + OperatorSpec: &managedidentity.UserAssignedIdentityOperatorSpec{ + ConfigMaps: &managedidentity.UserAssignedIdentityOperatorConfigMaps{ + ClientId: &genruntime.ConfigMapDestination{ + Name: configMapName, + Key: clientIdKey, + }, + PrincipalId: &genruntime.ConfigMapDestination{ + Name: configMapName, + Key: principalIdKey, + }, + TenantId: &genruntime.ConfigMapDestination{ + Name: configMapName, + Key: tenantIdKey, + }, + }, + }, + }, + } + + kv := newVaultForDiskEncryptionSet("kv", tc, rg) + accessPolicyFromConfig := keyvault.AccessPolicyEntry{ + ApplicationIdFromConfig: &genruntime.ConfigMapReference{ + Name: configMapName, + Key: clientIdKey, + }, + ObjectIdFromConfig: &genruntime.ConfigMapReference{ + Name: configMapName, + Key: principalIdKey, + }, + TenantIdFromConfig: &genruntime.ConfigMapReference{ + Name: configMapName, + Key: tenantIdKey, + }, + Permissions: &keyvault.Permissions{ + Certificates: []keyvault.Permissions_Certificates{keyvault.Permissions_Certificates_Get}, + Keys: []keyvault.Permissions_Keys{ + keyvault.Permissions_Keys_Get, + keyvault.Permissions_Keys_UnwrapKey, + keyvault.Permissions_Keys_WrapKey, + }, + Secrets: []keyvault.Permissions_Secrets{keyvault.Permissions_Secrets_Get}, + Storage: []keyvault.Permissions_Storage{keyvault.Permissions_Storage_Get}, + }, + } + kv.Spec.Properties.AccessPolicies = []keyvault.AccessPolicyEntry{accessPolicyFromConfig} + tc.CreateResourcesAndWait(mi, kv) + key := createKeyVaultKey(tc, kv, rg) + + diskEncryptionSet := &compute.DiskEncryptionSet{ + ObjectMeta: tc.MakeObjectMeta("set"), + Spec: compute.DiskEncryptionSet_Spec{ + ActiveKey: &compute.KeyForDiskEncryptionSet{ + KeyUrl: key.Properties.KeyURIWithVersion, + SourceVault: &compute.SourceVault{ + Reference: tc.MakeReferenceFromResource(kv), + }, + }, + EncryptionType: to.Ptr(compute.DiskEncryptionSetType_EncryptionAtRestWithCustomerKey), + Identity: &compute.EncryptionSetIdentity{ + Type: to.Ptr(compute.EncryptionSetIdentity_Type_SystemAssigned), + }, + Location: tc.AzureRegion, + Owner: testcommon.AsOwner(rg), + }, + } + + tc.CreateResourceAndWait(diskEncryptionSet) + + tc.Expect(diskEncryptionSet.Status.Id).ToNot(BeNil()) + armId := *diskEncryptionSet.Status.Id + + tc.DeleteResourceAndWait(diskEncryptionSet) + + // Ensure delete + exists, retryAfter, err := tc.AzureClient.HeadByID(tc.Ctx, armId, string(compute.APIVersion_Value)) + tc.Expect(err).ToNot(HaveOccurred()) + tc.Expect(retryAfter).To(BeZero()) + tc.Expect(exists).To(BeFalse()) +} + +func newVaultForDiskEncryptionSet(name string, tc *testcommon.KubePerTestContext, rg *resources.ResourceGroup) *keyvault.Vault { + return &keyvault.Vault{ + ObjectMeta: tc.MakeObjectMeta(name), + Spec: keyvault.Vault_Spec{ + Location: tc.AzureRegion, + Owner: testcommon.AsOwner(rg), + Properties: &keyvault.VaultProperties{ + Sku: &keyvault.Sku{ + Family: to.Ptr(keyvault.Sku_Family_A), + Name: to.Ptr(keyvault.Sku_Name_Standard), + }, + TenantId: to.Ptr(tc.AzureTenant), + EnabledForDiskEncryption: to.Ptr(true), + SoftDeleteRetentionInDays: to.Ptr(7), + }, + }, + } +} + +// TODO: Hacking this around for now. We currently don't support Keyvault/Keys resource. +// TODO: Should be good to replace this with an actual resource once https://github.com/Azure/azure-service-operator/issues/3188 is resolved. +func createKeyVaultKey(tc *testcommon.KubePerTestContext, kv *v1api20210401preview.Vault, rg *resources.ResourceGroup) armkeyvault.Key { + client, err := armkeyvault.NewKeysClient(tc.AzureSubscription, tc.AzureClient.Creds(), tc.AzureClient.ClientOptions()) + tc.Expect(err).To(BeNil()) + + keyProperties := armkeyvault.KeyCreateParameters{ + Properties: &armkeyvault.KeyProperties{ + Attributes: &armkeyvault.KeyAttributes{ + Enabled: to.Ptr(true), + }, + KeySize: to.Ptr(int32(2048)), + Kty: to.Ptr(armkeyvault.JSONWebKeyTypeRSA), + }, + } + + keyResp, err := client.CreateIfNotExist(context.TODO(), rg.Name, kv.Name, "testkey", keyProperties, nil) + tc.Expect(err).To(BeNil()) + + return keyResp.Key +} diff --git a/v2/internal/controllers/recordings/Test_Compute_DiskEncryptionSet_CRUD.yaml b/v2/internal/controllers/recordings/Test_Compute_DiskEncryptionSet_CRUD.yaml new file mode 100644 index 00000000000..1662cc12b64 --- /dev/null +++ b/v2/internal/controllers/recordings/Test_Compute_DiskEncryptionSet_CRUD.yaml @@ -0,0 +1,926 @@ +--- +version: 1 +interactions: +- request: + body: '{"location":"westus2","name":"asotest-rg-iwwxqu","tags":{"CreatedAt":"2001-02-03T04:05:06Z"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "93" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu?api-version=2020-06-01 + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu","name":"asotest-rg-iwwxqu","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "276" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu?api-version=2020-06-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu","name":"asotest-rg-iwwxqu","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"location":"westus2","name":"asotest-mi-ucnovq"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "49" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-ucnovq?api-version=2018-11-30 + method: PUT + response: + body: '{"location":"westus2","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-iwwxqu/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-ucnovq","name":"asotest-mi-ucnovq","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"00000000-0000-0000-0000-000000000000","principalId":"ca7ccb88-6a2b-4bc2-81b8-f5cf144a7806","clientId":"c448fe67-0a46-4b22-b211-49c90bbd6530"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "454" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Location: + - /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-iwwxqu/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-ucnovq + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"location":"westus2","name":"asotest-mi-ucnovq"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "49" + Content-Type: + - application/json + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-ucnovq?api-version=2018-11-30 + method: PUT + response: + body: '{"location":"westus2","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-iwwxqu/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-ucnovq","name":"asotest-mi-ucnovq","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"00000000-0000-0000-0000-000000000000","principalId":"ca7ccb88-6a2b-4bc2-81b8-f5cf144a7806","clientId":"c448fe67-0a46-4b22-b211-49c90bbd6530"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-ucnovq?api-version=2018-11-30 + method: GET + response: + body: '{"location":"westus2","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-iwwxqu/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-ucnovq","name":"asotest-mi-ucnovq","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"00000000-0000-0000-0000-000000000000","principalId":"ca7ccb88-6a2b-4bc2-81b8-f5cf144a7806","clientId":"c448fe67-0a46-4b22-b211-49c90bbd6530"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"location":"westus2","name":"asotest-kv-qlixyt","properties":{"accessPolicies":[{"applicationId":"c448fe67-0a46-4b22-b211-49c90bbd6530","objectId":"ca7ccb88-6a2b-4bc2-81b8-f5cf144a7806","permissions":{"certificates":["get"],"keys":["get","unwrapKey","wrapKey"],"secrets":["get"],"storage":["get"]},"tenantId":"00000000-0000-0000-0000-000000000000"}],"enabledForDiskEncryption":true,"sku":{"family":"A","name":"standard"},"softDeleteRetentionInDays":7,"tenantId":"00000000-0000-0000-0000-000000000000"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "503" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.KeyVault/vaults/asotest-kv-qlixyt?api-version=2021-04-01-preview + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.KeyVault/vaults/asotest-kv-qlixyt","name":"asotest-kv-qlixyt","type":"Microsoft.KeyVault/vaults","location":"westus2","tags":{},"systemData":{"createdBy":"5fe8acba-4694-403d-8c10-581a22063ff8","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"5fe8acba-4694-403d-8c10-581a22063ff8","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"ca7ccb88-6a2b-4bc2-81b8-f5cf144a7806","applicationId":"c448fe67-0a46-4b22-b211-49c90bbd6530","permissions":{"certificates":["get"],"keys":["get","unwrapKey","wrapKey"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":true,"enableSoftDelete":true,"softDeleteRetentionInDays":7,"vaultUri":"https://asotest-kv-qlixyt.vault.azure.net","provisioningState":"RegisteringDns"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-IIS/10.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aspnet-Version: + - 4.0.30319 + X-Content-Type-Options: + - nosniff + X-Ms-Keyvault-Service-Version: + - 1.5.885.0 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.KeyVault/vaults/asotest-kv-qlixyt?api-version=2021-04-01-preview + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.KeyVault/vaults/asotest-kv-qlixyt","name":"asotest-kv-qlixyt","type":"Microsoft.KeyVault/vaults","location":"westus2","tags":{},"systemData":{"createdBy":"5fe8acba-4694-403d-8c10-581a22063ff8","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"5fe8acba-4694-403d-8c10-581a22063ff8","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"ca7ccb88-6a2b-4bc2-81b8-f5cf144a7806","applicationId":"c448fe67-0a46-4b22-b211-49c90bbd6530","permissions":{"certificates":["get"],"keys":["get","unwrapKey","wrapKey"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":true,"enableSoftDelete":true,"softDeleteRetentionInDays":7,"vaultUri":"https://asotest-kv-qlixyt.vault.azure.net/","provisioningState":"RegisteringDns"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-IIS/10.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aspnet-Version: + - 4.0.30319 + X-Content-Type-Options: + - nosniff + X-Ms-Keyvault-Service-Version: + - 1.5.885.0 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.KeyVault/vaults/asotest-kv-qlixyt?api-version=2021-04-01-preview + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.KeyVault/vaults/asotest-kv-qlixyt","name":"asotest-kv-qlixyt","type":"Microsoft.KeyVault/vaults","location":"westus2","tags":{},"systemData":{"createdBy":"5fe8acba-4694-403d-8c10-581a22063ff8","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"5fe8acba-4694-403d-8c10-581a22063ff8","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"ca7ccb88-6a2b-4bc2-81b8-f5cf144a7806","applicationId":"c448fe67-0a46-4b22-b211-49c90bbd6530","permissions":{"certificates":["get"],"keys":["get","unwrapKey","wrapKey"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":true,"enableSoftDelete":true,"softDeleteRetentionInDays":7,"vaultUri":"https://asotest-kv-qlixyt.vault.azure.net/","provisioningState":"RegisteringDns"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-IIS/10.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aspnet-Version: + - 4.0.30319 + X-Content-Type-Options: + - nosniff + X-Ms-Keyvault-Service-Version: + - 1.5.885.0 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.KeyVault/vaults/asotest-kv-qlixyt?api-version=2021-04-01-preview + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.KeyVault/vaults/asotest-kv-qlixyt","name":"asotest-kv-qlixyt","type":"Microsoft.KeyVault/vaults","location":"westus2","tags":{},"systemData":{"createdBy":"5fe8acba-4694-403d-8c10-581a22063ff8","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"5fe8acba-4694-403d-8c10-581a22063ff8","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"ca7ccb88-6a2b-4bc2-81b8-f5cf144a7806","applicationId":"c448fe67-0a46-4b22-b211-49c90bbd6530","permissions":{"certificates":["get"],"keys":["get","unwrapKey","wrapKey"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":true,"enableSoftDelete":true,"softDeleteRetentionInDays":7,"vaultUri":"https://asotest-kv-qlixyt.vault.azure.net/","provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-IIS/10.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aspnet-Version: + - 4.0.30319 + X-Content-Type-Options: + - nosniff + X-Ms-Keyvault-Service-Version: + - 1.5.885.0 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.KeyVault/vaults/asotest-kv-qlixyt?api-version=2021-04-01-preview + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.KeyVault/vaults/asotest-kv-qlixyt","name":"asotest-kv-qlixyt","type":"Microsoft.KeyVault/vaults","location":"westus2","tags":{},"systemData":{"createdBy":"5fe8acba-4694-403d-8c10-581a22063ff8","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"5fe8acba-4694-403d-8c10-581a22063ff8","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"ca7ccb88-6a2b-4bc2-81b8-f5cf144a7806","applicationId":"c448fe67-0a46-4b22-b211-49c90bbd6530","permissions":{"certificates":["get"],"keys":["get","unwrapKey","wrapKey"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":true,"enableSoftDelete":true,"softDeleteRetentionInDays":7,"vaultUri":"https://asotest-kv-qlixyt.vault.azure.net/","provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-IIS/10.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aspnet-Version: + - 4.0.30319 + X-Content-Type-Options: + - nosniff + X-Ms-Keyvault-Service-Version: + - 1.5.885.0 + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"properties":{"attributes":{"enabled":true},"keySize":2048,"kty":"RSA"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "73" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.KeyVault/vaults/asotest-kv-qlixyt/keys/testkey?api-version=2023-02-01 + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.KeyVault/vaults/asotest-kv-qlixyt/keys/testkey","name":"testkey","type":"Microsoft.KeyVault/vaults/keys","location":"westus2","properties":{"attributes":{"enabled":true,"created":1693003849,"updated":1693003849,"recoveryLevel":"CustomizedRecoverable+Purgeable","exportable":false},"kty":"RSA","keyOps":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"keySize":2048,"keyUri":"https://asotest-kv-qlixyt.vault.azure.net/keys/testkey","keyUriWithVersion":"https://asotest-kv-qlixyt.vault.azure.net/keys/testkey/8e214b81aecf4c2ab0542f7ddb8378b3"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-IIS/10.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aspnet-Version: + - 4.0.30319 + X-Content-Type-Options: + - nosniff + X-Ms-Keyvault-Service-Version: + - 1.5.885.0 + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"identity":{"type":"SystemAssigned"},"location":"westus2","name":"asotest-set-yyowxd","properties":{"activeKey":{"keyUrl":"https://asotest-kv-qlixyt.vault.azure.net/keys/testkey/8e214b81aecf4c2ab0542f7ddb8378b3","sourceVault":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.KeyVault/vaults/asotest-kv-qlixyt"}},"encryptionType":"EncryptionAtRestWithCustomerKey"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "428" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.Compute/diskEncryptionSets/asotest-set-yyowxd?api-version=2022-07-02 + method: PUT + response: + body: "{\r\n \"name\": \"asotest-set-yyowxd\",\r\n \"location\": \"westus2\",\r\n + \ \"identity\": {\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"properties\": + {\r\n \"activeKey\": {\r\n \"sourceVault\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.KeyVault/vaults/asotest-kv-qlixyt\"\r\n + \ },\r\n \"keyUrl\": \"https://asotest-kv-qlixyt.vault.azure.net/keys/testkey/8e214b81aecf4c2ab0542f7ddb8378b3\"\r\n + \ },\r\n \"encryptionType\": \"EncryptionAtRestWithCustomerKey\",\r\n \"provisioningState\": + \"Updating\"\r\n }\r\n}" + headers: + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus2/DiskOperations/c00adafc-cc5d-444d-bf0d-c254bb92d799?p=330bd1e4-9ec8-43c5-83fb-8151747429a9&api-version=2022-07-02 + Cache-Control: + - no-cache + Content-Length: + - "560" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus2/DiskOperations/c00adafc-cc5d-444d-bf0d-c254bb92d799?p=330bd1e4-9ec8-43c5-83fb-8151747429a9&monitor=true&api-version=2022-07-02 + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Resource: + - Microsoft.Compute/CreateUpdateHighCostDiskEncryptionSet3Min;99,Microsoft.Compute/CreateUpdateHighCostDiskEncryptionSet30Min;299 + X-Ms-Served-By: + - 330bd1e4-9ec8-43c5-83fb-8151747429a9_133242837544050696 + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus2/DiskOperations/c00adafc-cc5d-444d-bf0d-c254bb92d799?p=330bd1e4-9ec8-43c5-83fb-8151747429a9&api-version=2022-07-02 + method: GET + response: + body: "{\r\n \"startTime\": \"2023-08-25T22:50:52.4881497+00:00\",\r\n \"endTime\": + \"2023-08-25T22:50:52.5662626+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"properties\": + {\r\n \"output\": {\r\n \"name\": \"asotest-set-yyowxd\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.Compute/diskEncryptionSets/asotest-set-yyowxd\",\r\n + \ \"type\": \"Microsoft.Compute/diskEncryptionSets\",\r\n \"location\": \"westus2\",\r\n + \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": + \"793e9845-62ad-4eb8-912b-8521f72a5287\",\r\n \"tenantId\": \"00000000-0000-0000-0000-000000000000\"\r\n + \ },\r\n \"properties\": {\r\n \"activeKey\": {\r\n \"sourceVault\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.KeyVault/vaults/asotest-kv-qlixyt\"\r\n + \ },\r\n \"keyUrl\": \"https://asotest-kv-qlixyt.vault.azure.net/keys/testkey/8e214b81aecf4c2ab0542f7ddb8378b3\"\r\n + \ },\r\n \"encryptionType\": \"EncryptionAtRestWithCustomerKey\",\r\n \"provisioningState\": + \"Succeeded\"\r\n }\r\n}\r\n },\r\n \"name\": \"c00adafc-cc5d-444d-bf0d-c254bb92d799\"\r\n}" + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Resource: + - Microsoft.Compute/GetOperation3Min;49999,Microsoft.Compute/GetOperation30Min;399999 + X-Ms-Served-By: + - 330bd1e4-9ec8-43c5-83fb-8151747429a9_133242837544050696 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.Compute/diskEncryptionSets/asotest-set-yyowxd?api-version=2022-07-02 + method: GET + response: + body: "{\r\n \"name\": \"asotest-set-yyowxd\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.Compute/diskEncryptionSets/asotest-set-yyowxd\",\r\n + \ \"type\": \"Microsoft.Compute/diskEncryptionSets\",\r\n \"location\": \"westus2\",\r\n + \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": + \"793e9845-62ad-4eb8-912b-8521f72a5287\",\r\n \"tenantId\": \"00000000-0000-0000-0000-000000000000\"\r\n + \ },\r\n \"properties\": {\r\n \"activeKey\": {\r\n \"sourceVault\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.KeyVault/vaults/asotest-kv-qlixyt\"\r\n + \ },\r\n \"keyUrl\": \"https://asotest-kv-qlixyt.vault.azure.net/keys/testkey/8e214b81aecf4c2ab0542f7ddb8378b3\"\r\n + \ },\r\n \"encryptionType\": \"EncryptionAtRestWithCustomerKey\",\r\n \"provisioningState\": + \"Succeeded\"\r\n }\r\n}" + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Resource: + - Microsoft.Compute/LowCostGet3Min;14999,Microsoft.Compute/LowCostGet30Min;119999 + X-Ms-Served-By: + - 330bd1e4-9ec8-43c5-83fb-8151747429a9_133242837544050696 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.Compute/diskEncryptionSets/asotest-set-yyowxd?api-version=2022-07-02 + method: GET + response: + body: "{\r\n \"name\": \"asotest-set-yyowxd\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.Compute/diskEncryptionSets/asotest-set-yyowxd\",\r\n + \ \"type\": \"Microsoft.Compute/diskEncryptionSets\",\r\n \"location\": \"westus2\",\r\n + \ \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": + \"793e9845-62ad-4eb8-912b-8521f72a5287\",\r\n \"tenantId\": \"00000000-0000-0000-0000-000000000000\"\r\n + \ },\r\n \"properties\": {\r\n \"activeKey\": {\r\n \"sourceVault\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.KeyVault/vaults/asotest-kv-qlixyt\"\r\n + \ },\r\n \"keyUrl\": \"https://asotest-kv-qlixyt.vault.azure.net/keys/testkey/8e214b81aecf4c2ab0542f7ddb8378b3\"\r\n + \ },\r\n \"encryptionType\": \"EncryptionAtRestWithCustomerKey\",\r\n \"provisioningState\": + \"Succeeded\"\r\n }\r\n}" + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Resource: + - Microsoft.Compute/LowCostGet3Min;14998,Microsoft.Compute/LowCostGet30Min;119998 + X-Ms-Served-By: + - 330bd1e4-9ec8-43c5-83fb-8151747429a9_133242837544050696 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.Compute/diskEncryptionSets/asotest-set-yyowxd?api-version=2022-07-02 + method: DELETE + response: + body: "" + headers: + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus2/DiskOperations/d02da823-d6f2-48c9-b939-c3b263c925a9?p=330bd1e4-9ec8-43c5-83fb-8151747429a9&api-version=2022-07-02 + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus2/DiskOperations/d02da823-d6f2-48c9-b939-c3b263c925a9?p=330bd1e4-9ec8-43c5-83fb-8151747429a9&monitor=true&api-version=2022-07-02 + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Resource: + - Microsoft.Compute/DeleteHighCostDiskEncryptionSet3Min;199,Microsoft.Compute/DeleteHighCostDiskEncryptionSet30Min;499 + X-Ms-Served-By: + - 330bd1e4-9ec8-43c5-83fb-8151747429a9_133242837544050696 + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus2/DiskOperations/d02da823-d6f2-48c9-b939-c3b263c925a9?p=330bd1e4-9ec8-43c5-83fb-8151747429a9&api-version=2022-07-02 + method: GET + response: + body: "{\r\n \"startTime\": \"2023-08-25T22:51:00.8319957+00:00\",\r\n \"endTime\": + \"2023-08-25T22:51:00.8944952+00:00\",\r\n \"status\": \"Succeeded\",\r\n \"name\": + \"d02da823-d6f2-48c9-b939-c3b263c925a9\"\r\n}" + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Resource: + - Microsoft.Compute/GetOperation3Min;49998,Microsoft.Compute/GetOperation30Min;399998 + X-Ms-Served-By: + - 330bd1e4-9ec8-43c5-83fb-8151747429a9_133242837544050696 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.Compute/diskEncryptionSets/asotest-set-yyowxd?api-version=2022-07-02 + method: GET + response: + body: "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": + \"DiskEncryptionSet 'asotest-set-yyowxd' was not found.\"\r\n }\r\n}" + headers: + Cache-Control: + - no-cache + Content-Length: + - "120" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Resource: + - Microsoft.Compute/LowCostGet3Min;14997,Microsoft.Compute/LowCostGet30Min;119997 + X-Ms-Served-By: + - 330bd1e4-9ec8-43c5-83fb-8151747429a9_133242837544050696 + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu?api-version=2020-06-01 + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRJV1dYUVUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRJV1dYUVUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRJV1dYUVUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRJV1dYUVUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRJV1dYUVUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRJV1dYUVUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRJV1dYUVUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRJV1dYUVUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRJV1dYUVUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "4" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRJV1dYUVUtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mi-ucnovq?api-version=2018-11-30 + method: DELETE + response: + body: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group ''asotest-rg-iwwxqu'' + could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "109" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-iwwxqu/providers/Microsoft.KeyVault/vaults/asotest-kv-qlixyt?api-version=2021-04-01-preview + method: DELETE + response: + body: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group ''asotest-rg-iwwxqu'' + could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "109" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + status: 404 Not Found + code: 404 + duration: "" diff --git a/v2/internal/testcommon/samples_tester.go b/v2/internal/testcommon/samples_tester.go index 3d7009c2c92..6b3a3edb700 100644 --- a/v2/internal/testcommon/samples_tester.go +++ b/v2/internal/testcommon/samples_tester.go @@ -52,6 +52,10 @@ var exclusions = []string{ "serversadministrator", "serversazureadonlyauthentication", "serversfailovergroup", // Requires creating multiple linked SQL servers which is hard to do in the samples + + // TODO: Unable to test diskencryptionsets sample since it requires keyvault/key URI. + // TODO: we don't support Keyvault/Keys to automate the process + "diskencryptionset", } type SamplesTester struct { diff --git a/v2/samples/compute/v1api/v1api20220702_diskencryptionset.yaml b/v2/samples/compute/v1api/v1api20220702_diskencryptionset.yaml new file mode 100644 index 00000000000..a9354cc947d --- /dev/null +++ b/v2/samples/compute/v1api/v1api20220702_diskencryptionset.yaml @@ -0,0 +1,19 @@ +apiVersion: compute.azure.com/v1api20220702 +kind: DiskEncryptionSet +metadata: + name: aso-sample-diskencryptionset + namespace: default +spec: + activeKey: + keyUrl: https://aso-sample-kv.vault.azure.net/keys/testkey/{version} + sourceVault: + reference: + group: keyvault.azure.com + kind: Vault + name: aso-sample-kv + encryptionType: EncryptionAtRestWithCustomerKey + identity: + type: SystemAssigned + location: westus2 + owner: + name: aso-sample-rg